Skip to content

Commit be3cb3d

Browse files
tsbogendjejb
authored andcommitted
[SCSI] WD33C93: let platform stub override no_sync/fast/dma_mode
SGI machines with WD33C93 allow usage of burst mode DMA, which increases performance noticable. To make this selectable by the sgiwd93 stub, setting the values for no_sync, fast and dma_mode has been moved to the individual platform stubs. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
1 parent 7748369 commit be3cb3d

6 files changed

Lines changed: 16 additions & 6 deletions

File tree

‎drivers/scsi/a2091.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ int __init a2091_detect(struct scsi_host_template *tpnt)
179179
DMA(instance)->DAWR = DAWR_A2091;
180180
regs.SASR = &(DMA(instance)->SASR);
181181
regs.SCMD = &(DMA(instance)->SCMD);
182+
HDATA(a3000_host)->no_sync = 0xff;
183+
HDATA(a3000_host)->fast = 0;
184+
HDATA(a3000_host)->dma_mode = CTRL_DMA;
182185
wd33c93_init(instance, regs, dma_setup, dma_stop, WD33C93_FS_8_10);
183186
request_irq(IRQ_AMIGA_PORTS, a2091_intr, IRQF_SHARED, "A2091 SCSI",
184187
instance);

‎drivers/scsi/a3000.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ int __init a3000_detect(struct scsi_host_template *tpnt)
178178
DMA(a3000_host)->DAWR = DAWR_A3000;
179179
regs.SASR = &(DMA(a3000_host)->SASR);
180180
regs.SCMD = &(DMA(a3000_host)->SCMD);
181+
HDATA(a3000_host)->no_sync = 0xff;
182+
HDATA(a3000_host)->fast = 0;
183+
HDATA(a3000_host)->dma_mode = CTRL_DMA;
181184
wd33c93_init(a3000_host, regs, dma_setup, dma_stop, WD33C93_FS_12_15);
182185
if (request_irq(IRQ_AMIGA_PORTS, a3000_intr, IRQF_SHARED, "A3000 SCSI",
183186
a3000_intr))

‎drivers/scsi/gvp11.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,9 @@ int __init gvp11_detect(struct scsi_host_template *tpnt)
322322
*/
323323
regs.SASR = &(DMA(instance)->SASR);
324324
regs.SCMD = &(DMA(instance)->SCMD);
325+
HDATA(a3000_host)->no_sync = 0xff;
326+
HDATA(a3000_host)->fast = 0;
327+
HDATA(a3000_host)->dma_mode = CTRL_DMA;
325328
wd33c93_init(instance, regs, dma_setup, dma_stop,
326329
(epc & GVP_SCSICLKMASK) ? WD33C93_FS_8_10
327330
: WD33C93_FS_12_15);

‎drivers/scsi/mvme147.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ int mvme147_detect(struct scsi_host_template *tpnt)
8282
mvme147_host->irq = MVME147_IRQ_SCSI_PORT;
8383
regs.SASR = (volatile unsigned char *)0xfffe4000;
8484
regs.SCMD = (volatile unsigned char *)0xfffe4001;
85+
HDATA(a3000_host)->no_sync = 0xff;
86+
HDATA(a3000_host)->fast = 0;
87+
HDATA(a3000_host)->dma_mode = CTRL_DMA;
8588
wd33c93_init(mvme147_host, regs, dma_setup, dma_stop, WD33C93_FS_8_10);
8689

8790
if (request_irq(MVME147_IRQ_SCSI_PORT, mvme147_intr, 0, "MVME147 SCSI PORT", mvme147_intr))

‎drivers/scsi/sgiwd93.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,11 @@ static int __init sgiwd93_probe(struct platform_device *pdev)
263263
regs.SASR = wdregs + 3;
264264
regs.SCMD = wdregs + 7;
265265

266-
wd33c93_init(host, regs, dma_setup, dma_stop, WD33C93_FS_MHZ(20));
266+
hdata->wh.no_sync = 0;
267+
hdata->wh.fast = 1;
268+
hdata->wh.dma_mode = CTRL_BURST;
267269

268-
if (hdata->wh.no_sync == 0xff)
269-
hdata->wh.no_sync = 0;
270+
wd33c93_init(host, regs, dma_setup, dma_stop, WD33C93_FS_MHZ(20));
270271

271272
err = request_irq(irq, sgiwd93_intr, 0, "SGI WD93", host);
272273
if (err) {

‎drivers/scsi/wd33c93.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1973,10 +1973,7 @@ wd33c93_init(struct Scsi_Host *instance, const wd33c93_regs regs,
19731973
hostdata->incoming_ptr = 0;
19741974
hostdata->outgoing_len = 0;
19751975
hostdata->default_sx_per = DEFAULT_SX_PER;
1976-
hostdata->no_sync = 0xff; /* sync defaults to off */
19771976
hostdata->no_dma = 0; /* default is DMA enabled */
1978-
hostdata->fast = 0; /* default is Fast SCSI transfers disabled */
1979-
hostdata->dma_mode = CTRL_DMA; /* default is Single Byte DMA */
19801977

19811978
#ifdef PROC_INTERFACE
19821979
hostdata->proc = PR_VERSION | PR_INFO | PR_STATISTICS |

0 commit comments

Comments
 (0)