openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Ryan Chen <ryanchen.aspeed@gmail.com>, openbmc@lists.ozlabs.org
Cc: 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: Wed, 11 Jul 2018 15:47:56 +1000	[thread overview]
Message-ID: <84064771141b017e5fe3cafef8dc8307f5d97eba.camel@kernel.crashing.org> (raw)
In-Reply-To: <1531286230-28453-2-git-send-email-ryanchen.aspeed@gmail.com>

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.

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

Cheers,
Ben.

  reply	other threads:[~2018-07-11  5:48 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 [this message]
2018-07-17  6:04     ` Ryan Chen
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=84064771141b017e5fe3cafef8dc8307f5d97eba.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=andrew@aj.id.au \
    --cc=joel@jms.id.au \
    --cc=mine260309@gmail.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=ryan_chen@aspeedtech.com \
    --cc=ryanchen.aspeed@gmail.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).