All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: "Luis R. Rodriguez" <mcgrof@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	Jeff Garzik <jeff@garzik.org>
Subject: Re: [PATCH] revert ath5k ioread32()/iowrite32() usage - use readl()/writel(),  we're MMIO-only
Date: Mon, 17 Sep 2007 22:44:37 +0200	[thread overview]
Message-ID: <46EEE735.5050306@gmail.com> (raw)
In-Reply-To: <43e72e890709171334y321dc2c8ke255a126a733dad6@mail.gmail.com>

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@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);
>  }
> 
>  /*
> 

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@gmail.com)
Faculty of Informatics, Masaryk University

  reply	other threads:[~2007-09-17 20:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2007-09-17 20:59   ` Jeff Garzik
2007-09-17 21:44     ` Jiri Slaby
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:18             ` Benjamin Herrenschmidt
2007-09-18 22:44             ` Jeff Garzik
2007-09-18 22:44               ` Jeff Garzik
2007-09-17 20:59   ` Luis R. Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46EEE735.5050306@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=jeff@garzik.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mcgrof@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.