On Fri, Jun 25, 2010 at 03:26:58AM -0400, Jeff Garzik wrote: > On 06/25/2010 12:57 AM, Jassi Brar wrote: > >From: Jassi Brar<jassi.brar@xxxxxxxxxxx> > > > >Some AHCI implementations may use Vendor Specific HBA[A0h, FFh] > >and/or Port[70h, 7Fh] registers to 'prepare' for initialization. > >For that, the platform needs memory mapped address of AHCI registers. > > > >This patch adds the 'mmio' argument and reorders the call to > >platform init function. > > > >Signed-off-by: Jassi Brar<jassi.brar@xxxxxxxxxxx> > >--- > > drivers/ata/ahci_platform.c | 23 +++++++++++++---------- > > include/linux/ahci_platform.h | 2 +- > > 2 files changed, 14 insertions(+), 11 deletions(-) > > It is also possible that platforms may need the init to prep the > MMIO area for use? Anton, does this patch work for you, or > introduce such a problem? Currently it doesn't introduce such a problem, but you're right, platforms might need to, for example, turn on the clocks before the MMIO area becomes accessible (otherwise machine check exception might arrive). There are two options: introduce a ->post_init() hook, or just make sure that ahci_platform driver won't start accessing the mmio region between ioremap() and pdata->init() calls. I think a simple comment in the code will suffice, so no need for the additional hook. And if we ever need some hook before ioremap(), we can name it pre_init(). Thanks, -- Anton Vorontsov email: cbouatmailru@xxxxxxxxx irc://irc.freenode.net/bd2 -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html