aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-08-27 02:33:42 -0400
committerDavid S. Miller <davem@davemloft.net>2008-08-29 05:13:31 -0400
commit63237eeb5ac92d618a0a6055f4b1f65c5d14682b (patch)
tree3d44dea70077557a7543951580447dbb71d00b05 /drivers
parent738f2b7b813913e651f39387d007dd961755dee2 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/atm/fore200e.c4
-rw-r--r--drivers/net/myri_sbus.c2
-rw-r--r--drivers/net/sunhme.c14
-rw-r--r--drivers/net/sunqe.c2
-rw-r--r--drivers/scsi/qlogicpti.c2
-rw-r--r--drivers/scsi/sun_esp.c8
6 files changed, 18 insertions, 14 deletions
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index f607e59bffae..7213590b485d 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -819,8 +819,8 @@ fore200e_sba_map(struct fore200e* fore200e)
819 /* get the supported DVMA burst sizes */ 819 /* get the supported DVMA burst sizes */
820 bursts = prom_getintdefault(sbus_dev->bus->prom_node, "burst-sizes", 0x00); 820 bursts = prom_getintdefault(sbus_dev->bus->prom_node, "burst-sizes", 0x00);
821 821
822 if (sbus_can_dma_64bit(sbus_dev)) 822 if (sbus_can_dma_64bit())
823 sbus_set_sbus64(sbus_dev, bursts); 823 sbus_set_sbus64(&sbus_dev->ofdev.dev, bursts);
824 824
825 fore200e->state = FORE200E_STATE_MAP; 825 fore200e->state = FORE200E_STATE_MAP;
826 return 0; 826 return 0;
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c
index 858880b619ce..f2a3ff24de44 100644
--- a/drivers/net/myri_sbus.c
+++ b/drivers/net/myri_sbus.c
@@ -1050,7 +1050,7 @@ static int __devinit myri_ether_init(struct sbus_dev *sdev)
1050 mp->myri_bursts = prom_getintdefault(mp->myri_sdev->bus->prom_node, 1050 mp->myri_bursts = prom_getintdefault(mp->myri_sdev->bus->prom_node,
1051 "burst-sizes", 0x00); 1051 "burst-sizes", 0x00);
1052 1052
1053 if (!sbus_can_burst64(sdev)) 1053 if (!sbus_can_burst64())
1054 mp->myri_bursts &= ~(DMA_BURST64); 1054 mp->myri_bursts &= ~(DMA_BURST64);
1055 1055
1056 DET(("MYRI bursts %02x\n", mp->myri_bursts)); 1056 DET(("MYRI bursts %02x\n", mp->myri_bursts));
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c
index 69cc77192961..d15da947c56a 100644
--- a/drivers/net/sunhme.c
+++ b/drivers/net/sunhme.c
@@ -1575,7 +1575,7 @@ static int happy_meal_init(struct happy_meal *hp)
1575 if ((hp->happy_bursts & DMA_BURST64) && 1575 if ((hp->happy_bursts & DMA_BURST64) &&
1576 ((hp->happy_flags & HFLAG_PCI) != 0 1576 ((hp->happy_flags & HFLAG_PCI) != 0
1577#ifdef CONFIG_SBUS 1577#ifdef CONFIG_SBUS
1578 || sbus_can_burst64(hp->happy_dev) 1578 || sbus_can_burst64()
1579#endif 1579#endif
1580 || 0)) { 1580 || 0)) {
1581 u32 gcfg = GREG_CFG_BURST64; 1581 u32 gcfg = GREG_CFG_BURST64;
@@ -1585,11 +1585,13 @@ static int happy_meal_init(struct happy_meal *hp)
1585 * do not. -DaveM 1585 * do not. -DaveM
1586 */ 1586 */
1587#ifdef CONFIG_SBUS 1587#ifdef CONFIG_SBUS
1588 if ((hp->happy_flags & HFLAG_PCI) == 0 && 1588 if ((hp->happy_flags & HFLAG_PCI) == 0) {
1589 sbus_can_dma_64bit(hp->happy_dev)) { 1589 struct sbus_dev *sdev = hp->happy_dev;
1590 sbus_set_sbus64(hp->happy_dev, 1590 if (sbus_can_dma_64bit()) {
1591 hp->happy_bursts); 1591 sbus_set_sbus64(&sdev->ofdev.dev,
1592 gcfg |= GREG_CFG_64BIT; 1592 hp->happy_bursts);
1593 gcfg |= GREG_CFG_64BIT;
1594 }
1593 } 1595 }
1594#endif 1596#endif
1595 1597
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c
index 66f66ee8ca63..4521972fbf3d 100644
--- a/drivers/net/sunqe.c
+++ b/drivers/net/sunqe.c
@@ -722,7 +722,7 @@ static inline void qec_init_once(struct sunqec *qecp, struct sbus_dev *qsdev)
722{ 722{
723 u8 bsizes = qecp->qec_bursts; 723 u8 bsizes = qecp->qec_bursts;
724 724
725 if (sbus_can_burst64(qsdev) && (bsizes & DMA_BURST64)) { 725 if (sbus_can_burst64() && (bsizes & DMA_BURST64)) {
726 sbus_writel(GLOB_CTRL_B64, qecp->gregs + GLOB_CTRL); 726 sbus_writel(GLOB_CTRL_B64, qecp->gregs + GLOB_CTRL);
727 } else if (bsizes & DMA_BURST32) { 727 } else if (bsizes & DMA_BURST32) {
728 sbus_writel(GLOB_CTRL_B32, qecp->gregs + GLOB_CTRL); 728 sbus_writel(GLOB_CTRL_B32, qecp->gregs + GLOB_CTRL);
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 1559d455b2b7..e16c56c515f1 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -158,7 +158,7 @@ static inline void set_sbus_cfg1(struct qlogicpti *qpti)
158 * is a nop and the chip ends up using the smallest burst 158 * is a nop and the chip ends up using the smallest burst
159 * size. -DaveM 159 * size. -DaveM
160 */ 160 */
161 if (sbus_can_burst64(qpti->sdev) && (bursts & DMA_BURST64)) { 161 if (sbus_can_burst64() && (bursts & DMA_BURST64)) {
162 val = (SBUS_CFG1_BENAB | SBUS_CFG1_B64); 162 val = (SBUS_CFG1_BENAB | SBUS_CFG1_B64);
163 } else 163 } else
164#endif 164#endif
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c
index f7508743f705..ea0c572c7504 100644
--- a/drivers/scsi/sun_esp.c
+++ b/drivers/scsi/sun_esp.c
@@ -265,15 +265,17 @@ static void sbus_esp_reset_dma(struct esp *esp)
265{ 265{
266 int can_do_burst16, can_do_burst32, can_do_burst64; 266 int can_do_burst16, can_do_burst32, can_do_burst64;
267 int can_do_sbus64, lim; 267 int can_do_sbus64, lim;
268 struct sbus_dev *sdev;
268 u32 val; 269 u32 val;
269 270
270 can_do_burst16 = (esp->bursts & DMA_BURST16) != 0; 271 can_do_burst16 = (esp->bursts & DMA_BURST16) != 0;
271 can_do_burst32 = (esp->bursts & DMA_BURST32) != 0; 272 can_do_burst32 = (esp->bursts & DMA_BURST32) != 0;
272 can_do_burst64 = 0; 273 can_do_burst64 = 0;
273 can_do_sbus64 = 0; 274 can_do_sbus64 = 0;
274 if (sbus_can_dma_64bit(esp->dev)) 275 sdev = esp->dev;
276 if (sbus_can_dma_64bit())
275 can_do_sbus64 = 1; 277 can_do_sbus64 = 1;
276 if (sbus_can_burst64(esp->sdev)) 278 if (sbus_can_burst64())
277 can_do_burst64 = (esp->bursts & DMA_BURST64) != 0; 279 can_do_burst64 = (esp->bursts & DMA_BURST64) != 0;
278 280
279 /* Put the DVMA into a known state. */ 281 /* Put the DVMA into a known state. */
@@ -300,7 +302,7 @@ static void sbus_esp_reset_dma(struct esp *esp)
300 302
301 if (can_do_sbus64) { 303 if (can_do_sbus64) {
302 esp->prev_hme_dmacsr |= DMA_SCSI_SBUS64; 304 esp->prev_hme_dmacsr |= DMA_SCSI_SBUS64;
303 sbus_set_sbus64(esp->dev, esp->bursts); 305 sbus_set_sbus64(&sdev->ofdev.dev, esp->bursts);
304 } 306 }
305 307
306 lim = 1000; 308 lim = 1000;