提交 9fb8f561 编写于 作者: M Martin Sperl 提交者: Zheng Zengkai

Register the clocks early during the boot process, so that special/critical...

Register the clocks early during the boot process, so that special/critical clocks can get enabled early on in the boot process avoiding the risk of disabling a clock, pll_divider or pll when a claiming driver fails to install propperly - maybe it needs to defer.

raspberrypi inclusion
category: feature
bugzilla: 50432

--------------------------------
Signed-off-by: NMartin Sperl <kernel@martin.sperl.org>
Signed-off-by: NFang Yafen <yafen@iscas.ac.cn>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 95c76ffe
...@@ -2295,8 +2295,15 @@ static int bcm2835_clk_probe(struct platform_device *pdev) ...@@ -2295,8 +2295,15 @@ static int bcm2835_clk_probe(struct platform_device *pdev)
if (ret) if (ret)
return ret; return ret;
return of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get, ret = of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get,
&cprman->onecell); &cprman->onecell);
if (ret)
return ret;
/* note that we have registered all the clocks */
dev_dbg(dev, "registered %d clocks\n", asize);
return 0;
} }
static const struct cprman_plat_data cprman_bcm2835_plat_data = { static const struct cprman_plat_data cprman_bcm2835_plat_data = {
...@@ -2322,7 +2329,11 @@ static struct platform_driver bcm2835_clk_driver = { ...@@ -2322,7 +2329,11 @@ static struct platform_driver bcm2835_clk_driver = {
.probe = bcm2835_clk_probe, .probe = bcm2835_clk_probe,
}; };
builtin_platform_driver(bcm2835_clk_driver); static int __init __bcm2835_clk_driver_init(void)
{
return platform_driver_register(&bcm2835_clk_driver);
}
core_initcall(__bcm2835_clk_driver_init);
MODULE_AUTHOR("Eric Anholt <eric@anholt.net>"); MODULE_AUTHOR("Eric Anholt <eric@anholt.net>");
MODULE_DESCRIPTION("BCM2835 clock driver"); MODULE_DESCRIPTION("BCM2835 clock driver");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册