clk: rockchip: rk3399: Keep DMAC1 enable always for SPI5
[firefly-linux-kernel-4.4.55.git] / drivers / scsi / nsp32.c
index 1e3879dcbdcc70d2d3b8e02d6aa341458a044843..53c84771f0e8939f53e561cad198c40ac337c2f2 100644 (file)
@@ -274,7 +274,6 @@ static struct scsi_host_template nsp32_template = {
        .can_queue                      = 1,
        .sg_tablesize                   = NSP32_SG_SIZE,
        .max_sectors                    = 128,
-       .cmd_per_lun                    = 1,
        .this_id                        = NSP32_HOST_SCSIID,
        .use_clustering                 = DISABLE_CLUSTERING,
        .eh_abort_handler               = nsp32_eh_abort,
@@ -915,7 +914,7 @@ static int nsp32_queuecommand_lck(struct scsi_cmnd *SCpnt, void (*done)(struct s
        int ret;
 
        nsp32_dbg(NSP32_DEBUG_QUEUECOMMAND,
-                 "enter. target: 0x%x LUN: 0x%x cmnd: 0x%x cmndlen: 0x%x "
+                 "enter. target: 0x%x LUN: 0x%llx cmnd: 0x%x cmndlen: 0x%x "
                  "use_sg: 0x%x reqbuf: 0x%lx reqlen: 0x%x",
                  SCpnt->device->id, SCpnt->device->lun, SCpnt->cmnd[0], SCpnt->cmd_len,
                  scsi_sg_count(SCpnt), scsi_sglist(SCpnt), scsi_bufflen(SCpnt));
@@ -930,7 +929,7 @@ static int nsp32_queuecommand_lck(struct scsi_cmnd *SCpnt, void (*done)(struct s
 
        /* check target ID is not same as this initiator ID */
        if (scmd_id(SCpnt) == SCpnt->device->host->this_id) {
-               nsp32_dbg(NSP32_DEBUG_QUEUECOMMAND, "terget==host???");
+               nsp32_dbg(NSP32_DEBUG_QUEUECOMMAND, "target==host???");
                SCpnt->result = DID_BAD_TARGET << 16;
                done(SCpnt);
                return 0;
@@ -1441,8 +1440,6 @@ static irqreturn_t do_nsp32_isr(int irq, void *dev_id)
        return IRQ_RETVAL(handled);
 }
 
-#undef SPRINTF
-#define SPRINTF(args...) seq_printf(m, ##args)
 
 static int nsp32_show_info(struct seq_file *m, struct Scsi_Host *host)
 {
@@ -1458,64 +1455,63 @@ static int nsp32_show_info(struct seq_file *m, struct Scsi_Host *host)
        data = (nsp32_hw_data *)host->hostdata;
        base = host->io_port;
 
-       SPRINTF("NinjaSCSI-32 status\n\n");
-       SPRINTF("Driver version:        %s, $Revision: 1.33 $\n", nsp32_release_version);
-       SPRINTF("SCSI host No.:         %d\n",          hostno);
-       SPRINTF("IRQ:                   %d\n",          host->irq);
-       SPRINTF("IO:                    0x%lx-0x%lx\n", host->io_port, host->io_port + host->n_io_port - 1);
-       SPRINTF("MMIO(virtual address): 0x%lx-0x%lx\n", host->base, host->base + data->MmioLength - 1);
-       SPRINTF("sg_tablesize:          %d\n",          host->sg_tablesize);
-       SPRINTF("Chip revision:         0x%x\n",        (nsp32_read2(base, INDEX_REG) >> 8) & 0xff);
+       seq_puts(m, "NinjaSCSI-32 status\n\n");
+       seq_printf(m, "Driver version:        %s, $Revision: 1.33 $\n", nsp32_release_version);
+       seq_printf(m, "SCSI host No.:         %d\n",            hostno);
+       seq_printf(m, "IRQ:                   %d\n",            host->irq);
+       seq_printf(m, "IO:                    0x%lx-0x%lx\n", host->io_port, host->io_port + host->n_io_port - 1);
+       seq_printf(m, "MMIO(virtual address): 0x%lx-0x%lx\n",   host->base, host->base + data->MmioLength - 1);
+       seq_printf(m, "sg_tablesize:          %d\n",            host->sg_tablesize);
+       seq_printf(m, "Chip revision:         0x%x\n",          (nsp32_read2(base, INDEX_REG) >> 8) & 0xff);
 
        mode_reg = nsp32_index_read1(base, CHIP_MODE);
        model    = data->pci_devid->driver_data;
 
 #ifdef CONFIG_PM
-       SPRINTF("Power Management:      %s\n",          (mode_reg & OPTF) ? "yes" : "no");
+       seq_printf(m, "Power Management:      %s\n",          (mode_reg & OPTF) ? "yes" : "no");
 #endif
-       SPRINTF("OEM:                   %ld, %s\n",     (mode_reg & (OEM0|OEM1)), nsp32_model[model]);
+       seq_printf(m, "OEM:                   %ld, %s\n",     (mode_reg & (OEM0|OEM1)), nsp32_model[model]);
 
        spin_lock_irqsave(&(data->Lock), flags);
-       SPRINTF("CurrentSC:             0x%p\n\n",      data->CurrentSC);
+       seq_printf(m, "CurrentSC:             0x%p\n\n",      data->CurrentSC);
        spin_unlock_irqrestore(&(data->Lock), flags);
 
 
-       SPRINTF("SDTR status\n");
+       seq_puts(m, "SDTR status\n");
        for (id = 0; id < ARRAY_SIZE(data->target); id++) {
 
-                SPRINTF("id %d: ", id);
+               seq_printf(m, "id %d: ", id);
 
                if (id == host->this_id) {
-                       SPRINTF("----- NinjaSCSI-32 host adapter\n");
+                       seq_puts(m, "----- NinjaSCSI-32 host adapter\n");
                        continue;
                }
 
                if (data->target[id].sync_flag == SDTR_DONE) {
                        if (data->target[id].period == 0            &&
                            data->target[id].offset == ASYNC_OFFSET ) {
-                               SPRINTF("async");
+                               seq_puts(m, "async");
                        } else {
-                               SPRINTF(" sync");
+                               seq_puts(m, " sync");
                        }
                } else {
-                       SPRINTF(" none");
+                       seq_puts(m, " none");
                }
 
                if (data->target[id].period != 0) {
 
                        speed = 1000000 / (data->target[id].period * 4);
 
-                       SPRINTF(" transfer %d.%dMB/s, offset %d",
+                       seq_printf(m, " transfer %d.%dMB/s, offset %d",
                                speed / 1000,
                                speed % 1000,
                                data->target[id].offset
                                );
                }
-               SPRINTF("\n");
+               seq_putc(m, '\n');
        }
        return 0;
 }
-#undef SPRINTF
 
 
 
@@ -2899,7 +2895,7 @@ static void nsp32_do_bus_reset(nsp32_hw_data *data)
         * reset SCSI bus
         */
        nsp32_write1(base, SCSI_BUS_CONTROL, BUSCTL_RST);
-       udelay(RESET_HOLD_TIME);
+       mdelay(RESET_HOLD_TIME / 1000);
        nsp32_write1(base, SCSI_BUS_CONTROL, 0);
        for(i = 0; i < 5; i++) {
                intrdat = nsp32_read2(base, IRQ_STATUS); /* dummy read */