Skip to content

Commit

Permalink
[SCSI] WD33C93: let platform stub override no_sync/fast/dma_mode
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Bogendoerfer authored and James Bottomley committed Apr 7, 2008
1 parent 7748369 commit be3cb3d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 6 deletions.
3 changes: 3 additions & 0 deletions drivers/scsi/a2091.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ int __init a2091_detect(struct scsi_host_template *tpnt)
DMA(instance)->DAWR = DAWR_A2091;
regs.SASR = &(DMA(instance)->SASR);
regs.SCMD = &(DMA(instance)->SCMD);
HDATA(a3000_host)->no_sync = 0xff;
HDATA(a3000_host)->fast = 0;
HDATA(a3000_host)->dma_mode = CTRL_DMA;
wd33c93_init(instance, regs, dma_setup, dma_stop, WD33C93_FS_8_10);
request_irq(IRQ_AMIGA_PORTS, a2091_intr, IRQF_SHARED, "A2091 SCSI",
instance);
Expand Down
3 changes: 3 additions & 0 deletions drivers/scsi/a3000.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ int __init a3000_detect(struct scsi_host_template *tpnt)
DMA(a3000_host)->DAWR = DAWR_A3000;
regs.SASR = &(DMA(a3000_host)->SASR);
regs.SCMD = &(DMA(a3000_host)->SCMD);
HDATA(a3000_host)->no_sync = 0xff;
HDATA(a3000_host)->fast = 0;
HDATA(a3000_host)->dma_mode = CTRL_DMA;
wd33c93_init(a3000_host, regs, dma_setup, dma_stop, WD33C93_FS_12_15);
if (request_irq(IRQ_AMIGA_PORTS, a3000_intr, IRQF_SHARED, "A3000 SCSI",
a3000_intr))
Expand Down
3 changes: 3 additions & 0 deletions drivers/scsi/gvp11.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@ int __init gvp11_detect(struct scsi_host_template *tpnt)
*/
regs.SASR = &(DMA(instance)->SASR);
regs.SCMD = &(DMA(instance)->SCMD);
HDATA(a3000_host)->no_sync = 0xff;
HDATA(a3000_host)->fast = 0;
HDATA(a3000_host)->dma_mode = CTRL_DMA;
wd33c93_init(instance, regs, dma_setup, dma_stop,
(epc & GVP_SCSICLKMASK) ? WD33C93_FS_8_10
: WD33C93_FS_12_15);
Expand Down
3 changes: 3 additions & 0 deletions drivers/scsi/mvme147.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ int mvme147_detect(struct scsi_host_template *tpnt)
mvme147_host->irq = MVME147_IRQ_SCSI_PORT;
regs.SASR = (volatile unsigned char *)0xfffe4000;
regs.SCMD = (volatile unsigned char *)0xfffe4001;
HDATA(a3000_host)->no_sync = 0xff;
HDATA(a3000_host)->fast = 0;
HDATA(a3000_host)->dma_mode = CTRL_DMA;
wd33c93_init(mvme147_host, regs, dma_setup, dma_stop, WD33C93_FS_8_10);

if (request_irq(MVME147_IRQ_SCSI_PORT, mvme147_intr, 0, "MVME147 SCSI PORT", mvme147_intr))
Expand Down
7 changes: 4 additions & 3 deletions drivers/scsi/sgiwd93.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,11 @@ static int __init sgiwd93_probe(struct platform_device *pdev)
regs.SASR = wdregs + 3;
regs.SCMD = wdregs + 7;

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

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

err = request_irq(irq, sgiwd93_intr, 0, "SGI WD93", host);
if (err) {
Expand Down
3 changes: 0 additions & 3 deletions drivers/scsi/wd33c93.c
Original file line number Diff line number Diff line change
Expand Up @@ -1973,10 +1973,7 @@ wd33c93_init(struct Scsi_Host *instance, const wd33c93_regs regs,
hostdata->incoming_ptr = 0;
hostdata->outgoing_len = 0;
hostdata->default_sx_per = DEFAULT_SX_PER;
hostdata->no_sync = 0xff; /* sync defaults to off */
hostdata->no_dma = 0; /* default is DMA enabled */
hostdata->fast = 0; /* default is Fast SCSI transfers disabled */
hostdata->dma_mode = CTRL_DMA; /* default is Single Byte DMA */

#ifdef PROC_INTERFACE
hostdata->proc = PR_VERSION | PR_INFO | PR_STATISTICS |
Expand Down

0 comments on commit be3cb3d

Please sign in to comment.