From: Linus Torvalds Date: Fri, 11 Sep 2009 13:11:45 -0700 (PDT) Subject: [ath9k-devel] [PATCH 3/4] ath5k: define ath_common ops In-Reply-To: <43e72e890909111043m78411058i86e61909a35412f@mail.gmail.com> References: <1252632895-11914-1-git-send-email-lrodriguez@atheros.com> <1252632895-11914-4-git-send-email-lrodriguez@atheros.com> <40f31dec0909102316q7902098jbee7fd8d17c3f622@mail.gmail.com> <4AA9F22C.3090007@gmail.com> <43e72e890909110023k62a512bejd712a3449cc8328d@mail.gmail.com> <43e72e890909111043m78411058i86e61909a35412f@mail.gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org On Fri, 11 Sep 2009, Luis R. Rodriguez wrote: > > > In fact, if you know what kind of IO op it is (ie "it's always MMIO"), > > you'd be even better using "writel()" directly, > > Heh.. you realize I tried to document such a thing a while ago and it > seems you opposed it [1]? If it's mapped with "pci_iomap()" you should use ioread*/iowrite*. But if you know it's always MMIO, and you use just ioremap() to map it, and then readl/writel. It's the _mixing_ of the two that I object to: - pci_iomap() - can do either MMIO of PIO - readl/writel - always just MMIO should preferably not be mixed. (Sure it will _work_, but I wouldn't encourage it) Linus