Search Linux Wireless

Re: [PATCH] revert ath5k ioread32()/iowrite32() usage - use readl()/writel(), we're MMIO-only

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/17/2007 10:34 PM, Luis R. Rodriguez wrote:
> 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@xxxxxxxxx>
> 
> ---
> 
>  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);
>  }
> 
>  /*
> 

NACK, this is wrong. iomap returns platform dependant return value, which may or
may not correspond to what is accepted by readX/writeX. (but is 100% accepted by
ioreadXX/iowriteXX).

regards,
-- 
Jiri Slaby (jirislaby@xxxxxxxxx)
Faculty of Informatics, Masaryk University
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux