Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Anton Vorontsov <cbouatmailru@gmail.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Jassi Brar <jassisinghbrar@gmail.com>,
	linux-ide@vger.kernel.org, Jassi Brar <jassi.brar@samsung.com>
Subject: Re: [PATCH] ahci_platform: Provide for vendor specific init
Date: Fri, 25 Jun 2010 11:48:24 +0400	[thread overview]
Message-ID: <20100625074824.GA2809@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <4C245A42.1070203@pobox.com>

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@samsung.com>
> >
> >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@samsung.com>
> >---
> >  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@gmail.com
irc://irc.freenode.net/bd2

  parent reply	other threads:[~2010-06-25  7:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-25  4:57 [PATCH] ahci_platform: Provide for vendor specific init Jassi Brar
2010-06-25  7:26 ` Jeff Garzik
2010-06-25  7:40   ` Jassi Brar
2010-06-25  7:48   ` Anton Vorontsov [this message]
2010-06-25  7:49 ` Anton Vorontsov
2010-06-25  9:25   ` Jassi Brar

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=20100625074824.GA2809@oksana.dev.rtsoft.ru \
    --to=cbouatmailru@gmail.com \
    --cc=jassi.brar@samsung.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox