sparc: Move SBUS DMA attribute interfaces out of asm/sbus.h
This is in preparation for the subsequent asm/sbus.h removal.
Also, make these routines take a "struct device" or no
arguments, as appropriate.
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index f607e59..7213590 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -819,8 +819,8 @@
/* get the supported DVMA burst sizes */
bursts = prom_getintdefault(sbus_dev->bus->prom_node, "burst-sizes", 0x00);
- if (sbus_can_dma_64bit(sbus_dev))
- sbus_set_sbus64(sbus_dev, bursts);
+ if (sbus_can_dma_64bit())
+ sbus_set_sbus64(&sbus_dev->ofdev.dev, bursts);
fore200e->state = FORE200E_STATE_MAP;
return 0;
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c
index 858880b..f2a3ff2 100644
--- a/drivers/net/myri_sbus.c
+++ b/drivers/net/myri_sbus.c
@@ -1050,7 +1050,7 @@
mp->myri_bursts = prom_getintdefault(mp->myri_sdev->bus->prom_node,
"burst-sizes", 0x00);
- if (!sbus_can_burst64(sdev))
+ if (!sbus_can_burst64())
mp->myri_bursts &= ~(DMA_BURST64);
DET(("MYRI bursts %02x\n", mp->myri_bursts));
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c
index 69cc771..d15da94 100644
--- a/drivers/net/sunhme.c
+++ b/drivers/net/sunhme.c
@@ -1575,7 +1575,7 @@
if ((hp->happy_bursts & DMA_BURST64) &&
((hp->happy_flags & HFLAG_PCI) != 0
#ifdef CONFIG_SBUS
- || sbus_can_burst64(hp->happy_dev)
+ || sbus_can_burst64()
#endif
|| 0)) {
u32 gcfg = GREG_CFG_BURST64;
@@ -1585,11 +1585,13 @@
* do not. -DaveM
*/
#ifdef CONFIG_SBUS
- if ((hp->happy_flags & HFLAG_PCI) == 0 &&
- sbus_can_dma_64bit(hp->happy_dev)) {
- sbus_set_sbus64(hp->happy_dev,
- hp->happy_bursts);
- gcfg |= GREG_CFG_64BIT;
+ if ((hp->happy_flags & HFLAG_PCI) == 0) {
+ struct sbus_dev *sdev = hp->happy_dev;
+ if (sbus_can_dma_64bit()) {
+ sbus_set_sbus64(&sdev->ofdev.dev,
+ hp->happy_bursts);
+ gcfg |= GREG_CFG_64BIT;
+ }
}
#endif
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c
index 66f66ee..4521972 100644
--- a/drivers/net/sunqe.c
+++ b/drivers/net/sunqe.c
@@ -722,7 +722,7 @@
{
u8 bsizes = qecp->qec_bursts;
- if (sbus_can_burst64(qsdev) && (bsizes & DMA_BURST64)) {
+ if (sbus_can_burst64() && (bsizes & DMA_BURST64)) {
sbus_writel(GLOB_CTRL_B64, qecp->gregs + GLOB_CTRL);
} else if (bsizes & DMA_BURST32) {
sbus_writel(GLOB_CTRL_B32, qecp->gregs + GLOB_CTRL);
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 1559d45..e16c56c 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -158,7 +158,7 @@
* is a nop and the chip ends up using the smallest burst
* size. -DaveM
*/
- if (sbus_can_burst64(qpti->sdev) && (bursts & DMA_BURST64)) {
+ if (sbus_can_burst64() && (bursts & DMA_BURST64)) {
val = (SBUS_CFG1_BENAB | SBUS_CFG1_B64);
} else
#endif
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c
index f750874..ea0c572 100644
--- a/drivers/scsi/sun_esp.c
+++ b/drivers/scsi/sun_esp.c
@@ -265,15 +265,17 @@
{
int can_do_burst16, can_do_burst32, can_do_burst64;
int can_do_sbus64, lim;
+ struct sbus_dev *sdev;
u32 val;
can_do_burst16 = (esp->bursts & DMA_BURST16) != 0;
can_do_burst32 = (esp->bursts & DMA_BURST32) != 0;
can_do_burst64 = 0;
can_do_sbus64 = 0;
- if (sbus_can_dma_64bit(esp->dev))
+ sdev = esp->dev;
+ if (sbus_can_dma_64bit())
can_do_sbus64 = 1;
- if (sbus_can_burst64(esp->sdev))
+ if (sbus_can_burst64())
can_do_burst64 = (esp->bursts & DMA_BURST64) != 0;
/* Put the DVMA into a known state. */
@@ -300,7 +302,7 @@
if (can_do_sbus64) {
esp->prev_hme_dmacsr |= DMA_SCSI_SBUS64;
- sbus_set_sbus64(esp->dev, esp->bursts);
+ sbus_set_sbus64(&sdev->ofdev.dev, esp->bursts);
}
lim = 1000;