From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:53913 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754380AbZIKUMd (ORCPT ); Fri, 11 Sep 2009 16:12:33 -0400 Date: Fri, 11 Sep 2009 13:11:45 -0700 (PDT) From: Linus Torvalds To: "Luis R. Rodriguez" cc: devel@driverdev.osuosl.org, ath9k-devel@venema.h4ckr.net, Jeff Garzik , linux-wireless@vger.kernel.org, Nick Kossifidis , Alan Cox Subject: Re: [PATCH 3/4] ath5k: define ath_common ops In-Reply-To: <43e72e890909111043m78411058i86e61909a35412f@mail.gmail.com> Message-ID: 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> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-wireless-owner@vger.kernel.org List-ID: 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