diff options
author | Anatolij Gustschin <agust@denx.de> | 2010-02-16 12:35:13 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-02-16 12:35:13 -0500 |
commit | 284ed66fc3beca509a7549aae06af5c74023304c (patch) | |
tree | 16147ca13e10d4235b759d5b126c223f2f9f18c0 /arch/powerpc | |
parent | 724e6d3fe8003c3f60bf404bf22e4e331327c596 (diff) |
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')
-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 = { | |||
698 | .clk_get_parent = NULL, | 698 | .clk_get_parent = NULL, |
699 | }; | 699 | }; |
700 | 700 | ||
701 | static int | 701 | int __init mpc5121_clk_init(void) |
702 | mpc5121_clk_init(void) | ||
703 | { | 702 | { |
704 | struct device_node *np; | 703 | struct device_node *np; |
705 | 704 | ||
@@ -724,6 +723,3 @@ mpc5121_clk_init(void) | |||
724 | clk_functions = mpc5121_clk_functions; | 723 | clk_functions = mpc5121_clk_functions; |
725 | return 0; | 724 | return 0; |
726 | } | 725 | } |
727 | |||
728 | |||
729 | 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) { | |||
64 | .name = "MPC5121 ADS", | 64 | .name = "MPC5121 ADS", |
65 | .probe = mpc5121_ads_probe, | 65 | .probe = mpc5121_ads_probe, |
66 | .setup_arch = mpc5121_ads_setup_arch, | 66 | .setup_arch = mpc5121_ads_setup_arch, |
67 | .init = mpc512x_declare_of_platform_devices, | 67 | .init = mpc512x_init, |
68 | .init_IRQ = mpc5121_ads_init_IRQ, | 68 | .init_IRQ = mpc5121_ads_init_IRQ, |
69 | .get_irq = ipic_get_irq, | 69 | .get_irq = ipic_get_irq, |
70 | .calibrate_decr = generic_calibrate_decr, | 70 | .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) | |||
51 | define_machine(mpc5121_generic) { | 51 | define_machine(mpc5121_generic) { |
52 | .name = "MPC5121 generic", | 52 | .name = "MPC5121 generic", |
53 | .probe = mpc5121_generic_probe, | 53 | .probe = mpc5121_generic_probe, |
54 | .init = mpc512x_declare_of_platform_devices, | 54 | .init = mpc512x_init, |
55 | .init_IRQ = mpc512x_init_IRQ, | 55 | .init_IRQ = mpc512x_init_IRQ, |
56 | .get_irq = ipic_get_irq, | 56 | .get_irq = ipic_get_irq, |
57 | .calibrate_decr = generic_calibrate_decr, | 57 | .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 @@ | |||
12 | #ifndef __MPC512X_H__ | 12 | #ifndef __MPC512X_H__ |
13 | #define __MPC512X_H__ | 13 | #define __MPC512X_H__ |
14 | extern void __init mpc512x_init_IRQ(void); | 14 | extern void __init mpc512x_init_IRQ(void); |
15 | extern void __init mpc512x_init(void); | ||
16 | extern int __init mpc5121_clk_init(void); | ||
15 | void __init mpc512x_declare_of_platform_devices(void); | 17 | void __init mpc512x_declare_of_platform_devices(void); |
16 | #endif /* __MPC512X_H__ */ | 18 | #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) | |||
58 | "Error while probing of_platform bus\n"); | 58 | "Error while probing of_platform bus\n"); |
59 | } | 59 | } |
60 | 60 | ||
61 | void __init mpc512x_init(void) | ||
62 | { | ||
63 | mpc512x_declare_of_platform_devices(); | ||
64 | mpc5121_clk_init(); | ||
65 | } | ||