Commit 284ed66f authored by Anatolij Gustschin's avatar Anatolij Gustschin Committed by Grant Likely

powerpc/mpc5121: avoid using arch_initcall for clock init

Move mpc5121_clk_init() call to platform init code so it won't
get called on non-5121 platforms on a multiplatform kernel.
Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 724e6d3f
......@@ -698,8 +698,7 @@ static struct clk_interface mpc5121_clk_functions = {
.clk_get_parent = NULL,
};
static int
mpc5121_clk_init(void)
int __init mpc5121_clk_init(void)
{
struct device_node *np;
......@@ -724,6 +723,3 @@ mpc5121_clk_init(void)
clk_functions = mpc5121_clk_functions;
return 0;
}
arch_initcall(mpc5121_clk_init);
......@@ -64,7 +64,7 @@ define_machine(mpc5121_ads) {
.name = "MPC5121 ADS",
.probe = mpc5121_ads_probe,
.setup_arch = mpc5121_ads_setup_arch,
.init = mpc512x_declare_of_platform_devices,
.init = mpc512x_init,
.init_IRQ = mpc5121_ads_init_IRQ,
.get_irq = ipic_get_irq,
.calibrate_decr = generic_calibrate_decr,
......
......@@ -51,7 +51,7 @@ static int __init mpc5121_generic_probe(void)
define_machine(mpc5121_generic) {
.name = "MPC5121 generic",
.probe = mpc5121_generic_probe,
.init = mpc512x_declare_of_platform_devices,
.init = mpc512x_init,
.init_IRQ = mpc512x_init_IRQ,
.get_irq = ipic_get_irq,
.calibrate_decr = generic_calibrate_decr,
......
......@@ -12,5 +12,7 @@
#ifndef __MPC512X_H__
#define __MPC512X_H__
extern void __init mpc512x_init_IRQ(void);
extern void __init mpc512x_init(void);
extern int __init mpc5121_clk_init(void);
void __init mpc512x_declare_of_platform_devices(void);
#endif /* __MPC512X_H__ */
......@@ -58,3 +58,8 @@ void __init mpc512x_declare_of_platform_devices(void)
"Error while probing of_platform bus\n");
}
void __init mpc512x_init(void)
{
mpc512x_declare_of_platform_devices();
mpc5121_clk_init();
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment