diff options
author | Anatolij Gustschin <agust@denx.de> | 2010-02-16 10:35:13 -0700 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-02-16 10:35:13 -0700 |
commit | 284ed66fc3beca509a7549aae06af5c74023304c (patch) | |
tree | 16147ca13e10d4235b759d5b126c223f2f9f18c0 /arch/powerpc/platforms/512x | |
parent | 724e6d3fe8003c3f60bf404bf22e4e331327c596 (diff) | |
download | blackbird-op-linux-284ed66fc3beca509a7549aae06af5c74023304c.tar.gz blackbird-op-linux-284ed66fc3beca509a7549aae06af5c74023304c.zip |
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: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/powerpc/platforms/512x')
-rw-r--r-- | arch/powerpc/platforms/512x/clock.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/512x/mpc5121_ads.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/512x/mpc5121_generic.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/512x/mpc512x.h | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/512x/mpc512x_shared.c | 5 |
5 files changed, 10 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/512x/clock.c b/arch/powerpc/platforms/512x/clock.c index 84544d072043..4c42246b86a7 100644 --- a/arch/powerpc/platforms/512x/clock.c +++ b/arch/powerpc/platforms/512x/clock.c @@ -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); diff --git a/arch/powerpc/platforms/512x/mpc5121_ads.c b/arch/powerpc/platforms/512x/mpc5121_ads.c index 441abc488851..0f8f2e96ee55 100644 --- a/arch/powerpc/platforms/512x/mpc5121_ads.c +++ b/arch/powerpc/platforms/512x/mpc5121_ads.c @@ -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, diff --git a/arch/powerpc/platforms/512x/mpc5121_generic.c b/arch/powerpc/platforms/512x/mpc5121_generic.c index 2479de9e2d12..9b8c9b0bedfb 100644 --- a/arch/powerpc/platforms/512x/mpc5121_generic.c +++ b/arch/powerpc/platforms/512x/mpc5121_generic.c @@ -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, diff --git a/arch/powerpc/platforms/512x/mpc512x.h b/arch/powerpc/platforms/512x/mpc512x.h index 22a5352407e0..ac3da1a0c4e5 100644 --- a/arch/powerpc/platforms/512x/mpc512x.h +++ b/arch/powerpc/platforms/512x/mpc512x.h @@ -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__ */ diff --git a/arch/powerpc/platforms/512x/mpc512x_shared.c b/arch/powerpc/platforms/512x/mpc512x_shared.c index 434d683df5a0..b683165a24e2 100644 --- a/arch/powerpc/platforms/512x/mpc512x_shared.c +++ b/arch/powerpc/platforms/512x/mpc512x_shared.c @@ -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(); +} |