mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-22 09:22:37 +00:00
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>
This commit is contained in:
parent
724e6d3fe8
commit
284ed66fc3
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user