aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ssb/pci.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2007-09-19 12:53:44 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:52:20 -0400
commit4b402c65a3a17257af45875159395278e4a2f0cd (patch)
tree0a3f3cad8fbcd4c331cc723fbb778fb3d4af2f09 /drivers/ssb/pci.c
parentb85b3b7af52d1c1bd45bfcd47aa425a15fda45f7 (diff)
[SSB]: Use ioreadX() and iowriteX() for PCI.
On a PCI bus use ioreadX() and iowriteX(). We map the I/O space with pci_iomap(), so we must use the correct accessor functions, too. readX() and writeX() are not guaranteed to accept the cookie returned from pci_iomap() (though, it currently works on most architectures). Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/ssb/pci.c')
-rw-r--r--drivers/ssb/pci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c
index 3d23ca4befe3..e19b9f90195e 100644
--- a/drivers/ssb/pci.c
+++ b/drivers/ssb/pci.c
@@ -531,7 +531,7 @@ static u16 ssb_pci_read16(struct ssb_device *dev, u16 offset)
531 if (unlikely(ssb_pci_switch_core(bus, dev))) 531 if (unlikely(ssb_pci_switch_core(bus, dev)))
532 return 0xFFFF; 532 return 0xFFFF;
533 } 533 }
534 return readw(bus->mmio + offset); 534 return ioread16(bus->mmio + offset);
535} 535}
536 536
537static u32 ssb_pci_read32(struct ssb_device *dev, u16 offset) 537static u32 ssb_pci_read32(struct ssb_device *dev, u16 offset)
@@ -544,7 +544,7 @@ static u32 ssb_pci_read32(struct ssb_device *dev, u16 offset)
544 if (unlikely(ssb_pci_switch_core(bus, dev))) 544 if (unlikely(ssb_pci_switch_core(bus, dev)))
545 return 0xFFFFFFFF; 545 return 0xFFFFFFFF;
546 } 546 }
547 return readl(bus->mmio + offset); 547 return ioread32(bus->mmio + offset);
548} 548}
549 549
550static void ssb_pci_write16(struct ssb_device *dev, u16 offset, u16 value) 550static void ssb_pci_write16(struct ssb_device *dev, u16 offset, u16 value)
@@ -557,7 +557,7 @@ static void ssb_pci_write16(struct ssb_device *dev, u16 offset, u16 value)
557 if (unlikely(ssb_pci_switch_core(bus, dev))) 557 if (unlikely(ssb_pci_switch_core(bus, dev)))
558 return; 558 return;
559 } 559 }
560 writew(value, bus->mmio + offset); 560 iowrite16(value, bus->mmio + offset);
561} 561}
562 562
563static void ssb_pci_write32(struct ssb_device *dev, u16 offset, u32 value) 563static void ssb_pci_write32(struct ssb_device *dev, u16 offset, u32 value)
@@ -570,7 +570,7 @@ static void ssb_pci_write32(struct ssb_device *dev, u16 offset, u32 value)
570 if (unlikely(ssb_pci_switch_core(bus, dev))) 570 if (unlikely(ssb_pci_switch_core(bus, dev)))
571 return; 571 return;
572 } 572 }
573 writel(value, bus->mmio + offset); 573 iowrite32(value, bus->mmio + offset);
574} 574}
575 575
576/* Not "static", as it's used in main.c */ 576/* Not "static", as it's used in main.c */