linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] revert ath5k ioread32()/iowrite32() usage - use readl()/writel(), we're MMIO-only
@ 2007-09-17 20:34 Luis R. Rodriguez
  2007-09-17 20:44 ` Jiri Slaby
  0 siblings, 1 reply; 9+ messages in thread
From: Luis R. Rodriguez @ 2007-09-17 20:34 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, Jeff Garzik, Jiri Slaby

[-- Attachment #1: Type: text/plain, Size: 1346 bytes --]

Based on advise from Jeff, as described in the e-mail:

[PATCH] Clarify pci_iomap() usage for MMIO-only devices

we shouldn't use ioread32()/iowrite32() unless we really have a need
to otherwise we're creating an unnecessary branch on read/write. Lets
revert this back to readl()/writel() as our devices so far have been
MMIO-only. This reverts 9202ec15da36ca060722c363575e0e390d85fb71 on
ath5k. This patch is intended for the ath5k branch of wireless-dev.

Changes-licensed-under: ISC
Singed-off-by: Luis R. Rodriguez <mcgrof@gmail.com>

---

 drivers/net/wireless/ath5k_hw.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath5k_hw.c b/drivers/net/wireless/ath5k_hw.c
index 07ad127..3501b4c 100644
--- a/drivers/net/wireless/ath5k_hw.c
+++ b/drivers/net/wireless/ath5k_hw.c
@@ -219,7 +219,7 @@ static inline unsigned int
ath5k_hw_clocktoh(unsigned int clock, bool turbo)
  */
 static inline u32 ath5k_hw_reg_read(struct ath_hw *hal, u16 reg)
 {
-       return ioread32(hal->ah_sh + reg);
+       return readl(hal->ah_sh + reg);
 }

 /*
@@ -227,7 +227,7 @@ static inline u32 ath5k_hw_reg_read(struct ath_hw
*hal, u16 reg)
  */
 static inline void ath5k_hw_reg_write(struct ath_hw *hal, u32 val, u16 reg)
 {
-       iowrite32(val, hal->ah_sh + reg);
+       writel(val, hal->ah_sh + reg);
 }

 /*

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ath5k-revert-ioread-write.diff --]
[-- Type: text/x-patch; name="ath5k-revert-ioread-write.diff", Size: 684 bytes --]

diff --git a/drivers/net/wireless/ath5k_hw.c b/drivers/net/wireless/ath5k_hw.c
index 07ad127..3501b4c 100644
--- a/drivers/net/wireless/ath5k_hw.c
+++ b/drivers/net/wireless/ath5k_hw.c
@@ -219,7 +219,7 @@ static inline unsigned int ath5k_hw_clocktoh(unsigned int clock, bool turbo)
  */
 static inline u32 ath5k_hw_reg_read(struct ath_hw *hal, u16 reg)
 {
-	return ioread32(hal->ah_sh + reg);
+	return readl(hal->ah_sh + reg);
 }
 
 /*
@@ -227,7 +227,7 @@ static inline u32 ath5k_hw_reg_read(struct ath_hw *hal, u16 reg)
  */
 static inline void ath5k_hw_reg_write(struct ath_hw *hal, u32 val, u16 reg)
 {
-	iowrite32(val, hal->ah_sh + reg);
+	writel(val, hal->ah_sh + reg);
 }
 
 /*

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-09-18 22:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-17 20:34 [PATCH] revert ath5k ioread32()/iowrite32() usage - use readl()/writel(), we're MMIO-only Luis R. Rodriguez
2007-09-17 20:44 ` Jiri Slaby
2007-09-17 20:59   ` Jeff Garzik
2007-09-17 21:44     ` Jiri Slaby
2007-09-18 19:03       ` Luis R. Rodriguez
2007-09-18 19:12         ` Luis R. Rodriguez
2007-09-18 22:18           ` Benjamin Herrenschmidt
2007-09-18 22:44             ` Jeff Garzik
2007-09-17 20:59   ` Luis R. Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).