diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2018-10-16 16:31:25 +1100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-10-17 21:38:20 -0400 |
commit | 53dce332db507a2bd9797adc938fa293d1f1acc6 (patch) | |
tree | b8eef76f487785808d03ad882d87b0c8e196bfd7 /drivers/scsi/esp_scsi.h | |
parent | 8bca2143335116af838305440d94539367382555 (diff) | |
download | linux-53dce332db507a2bd9797adc938fa293d1f1acc6.tar.bz2 |
scsi: esp_scsi: De-duplicate PIO routines
As a temporary measure, the code to implement PIO transfers was
duplicated in zorro_esp and mac_esp. Now that it has stabilized move the
common code into the core driver but don't build it unless needed.
This replaces the inline assembler with more portable writesb() calls.
Optimizing the m68k writesb() implementation is a separate patch.
[mkp: applied by hand]
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Tested-by: Stan Johnson <userm57@yahoo.com>
Tested-by: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/esp_scsi.h')
-rw-r--r-- | drivers/scsi/esp_scsi.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/esp_scsi.h b/drivers/scsi/esp_scsi.h index 81125ecd597c..aa87a6b72dcc 100644 --- a/drivers/scsi/esp_scsi.h +++ b/drivers/scsi/esp_scsi.h @@ -524,6 +524,9 @@ struct esp { void *dma; int dmarev; + /* These are used by esp_send_pio_cmd() */ + u8 __iomem *fifo_reg; + int send_cmd_error; u32 send_cmd_residual; }; @@ -564,4 +567,7 @@ extern void scsi_esp_unregister(struct esp *); extern irqreturn_t scsi_esp_intr(int, void *); extern void scsi_esp_cmd(struct esp *, u8); +extern void esp_send_pio_cmd(struct esp *esp, u32 dma_addr, u32 esp_count, + u32 dma_count, int write, u8 cmd); + #endif /* !(_ESP_SCSI_H) */ |