openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Ryan Chen <ryanchen.aspeed@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: openbmc@lists.ozlabs.org, joel@jms.id.au, andrew@aj.id.au,
	ryan_chen@aspeedtech.com, mine260309@gmail.com
Subject: Re: [PATCH linux dev-4.17 1/7] clk: Aspeed: Modify clk-aspeed.c driver probe sequence
Date: Tue, 17 Jul 2018 14:04:11 +0800	[thread overview]
Message-ID: <20180717060411.GA10750@ryan-ubuntu> (raw)
In-Reply-To: <84064771141b017e5fe3cafef8dc8307f5d97eba.camel@kernel.crashing.org>

On Wed, Jul 11, 2018 at 03:47:56PM +1000, Benjamin Herrenschmidt wrote:
> On Wed, 2018-07-11 at 13:17 +0800, Ryan Chen wrote:
> > In Aspeed's SoC, all IP clk gating and pll parameter is in scu
> > controller, before IP driver probe, scu driver need prepare for it.
> > So buildin_platform_driver to core_initcall.
> > 
> > Signed-off-by: Ryan Chen <ryanchen.aspeed@gmail.com>
> > ---
> >  drivers/clk/clk-aspeed.c | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/clk/clk-aspeed.c b/drivers/clk/clk-aspeed.c
> > index 8796b8a..9e55743 100644
> > --- a/drivers/clk/clk-aspeed.c
> > +++ b/drivers/clk/clk-aspeed.c
> > @@ -573,7 +573,12 @@ static struct platform_driver aspeed_clk_driver = {
> >  		.suppress_bind_attrs = true,
> >  	},
> >  };
> > -builtin_platform_driver(aspeed_clk_driver);
> > +
> > +static int __init aspeed_clk_init(void)
> > +{
> > +	return platform_driver_register(&aspeed_clk_driver);
> > +}
> > +core_initcall(aspeed_clk_init);
> >  
> >  static void __init aspeed_ast2400_cc(struct regmap *map)
> >  {
> 
> It's generally considered dangerous to register drivers at core
> initcall time.

Understand. 

But if interrupt controller have clk gating. 
the scu driver should be eraly than irq chip driver probe. 
Is this point is reasonable? 

> 
> Any reason we don't use the generic clock driver registration mechanism
> that runs at of_clk_init() time ?

I will use "if (gate->reset_idx == aspeed_resets[ASPEED_RESET_SDHCI])", 
is it suitable ?  


Ryan Chen

> 
> Cheers,
> Ben.
> 

  reply	other threads:[~2018-07-17  6:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11  5:17 [PATCH linux dev-4.17 0/7] drivers/mmc/host: Add Aspeed SDIO driver Ryan Chen
2018-07-11  5:17 ` [PATCH linux dev-4.17 1/7] clk: Aspeed: Modify clk-aspeed.c driver probe sequence Ryan Chen
2018-07-11  5:47   ` Benjamin Herrenschmidt
2018-07-17  6:04     ` Ryan Chen [this message]
2018-07-17  9:45       ` Benjamin Herrenschmidt
2018-07-18  6:37         ` Joel Stanley
2018-07-18  7:16           ` Ryan Chen
2018-07-11  5:17 ` [PATCH linux dev-4.17 2/7] clk: Aspeed: Add sdhci reset and clock Ryan Chen
2018-07-11  5:26   ` Joel Stanley
2018-07-11  5:49   ` Benjamin Herrenschmidt
2018-07-11  5:17 ` [PATCH linux dev-4.17 3/7] irqchip: Aspeed: Add Aspeed sdhci irq driver Ryan Chen
2018-07-11  5:29   ` Joel Stanley
2018-07-11  5:17 ` [PATCH linux dev-4.17 4/7] dts: Aspeed: Add Aspeed sdhci dts document Ryan Chen
2018-07-11  5:30   ` Joel Stanley
2018-07-11  5:17 ` [PATCH linux dev-4.17 5/7] mmc: Aspeed: Add driver for Aspeed sdhci Ryan Chen
2018-07-11  5:32   ` Joel Stanley
2018-07-11  5:17 ` [PATCH linux dev-4.17 6/7] dts: Aspeed: Add devicetree " Ryan Chen
2018-07-11  5:17 ` [PATCH linux dev-4.17 7/7] configs: Aspeed: enable mmc host in defconfig Ryan Chen
2018-07-17  7:26 [PATCHv2 linux dev-4.17 0/7] mmc/host: Add Aspeed SDIO driver Ryan Chen
2018-07-17  7:26 ` [PATCH linux dev-4.17 1/7] clk: Aspeed: Modify clk-aspeed.c driver probe sequence Ryan Chen

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=20180717060411.GA10750@ryan-ubuntu \
    --to=ryanchen.aspeed@gmail.com \
    --cc=andrew@aj.id.au \
    --cc=benh@kernel.crashing.org \
    --cc=joel@jms.id.au \
    --cc=mine260309@gmail.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=ryan_chen@aspeedtech.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).