diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-26 16:14:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-26 16:14:01 -0400 |
commit | f465d145d76803fe6332092775d891c8c509aa44 (patch) | |
tree | 45889e2eee7e8288ef269e9b661111364a71c25f /arch/arm/mach-ux500 | |
parent | 30b842889eea1bea02dff55b13d2ddf07a46ce78 (diff) | |
parent | 80b9abf973462499c1a0110df47f62cc90361e2c (diff) |
Merge tag 'cleanup-initcall' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull sweeping late_initcall cleanup for arm-soc from Olof Johansson:
"This is a patch series from Shawn Guo that moves from individual
late_initcalls() to using a member in the machine structure to invoke
a platform's late initcalls.
This cleanup is a step in the move towards multiplatform kernels since
it would reduce the need to check for compatible platforms in each and
every initcall."
Fix up trivial conflicts in arch/arm/mach-{exynos/mach-universal_c210.c,
imx/mach-cpuimx51.c, omap2/board-generic.c} due to changes nearby (and,
in the case of cpuimx51.c the board support being deleted)
* tag 'cleanup-initcall' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
ARM: ux500: use machine specific hook for late init
ARM: tegra: use machine specific hook for late init
ARM: shmobile: use machine specific hook for late init
ARM: sa1100: use machine specific hook for late init
ARM: s3c64xx: use machine specific hook for late init
ARM: prima2: use machine specific hook for late init
ARM: pnx4008: use machine specific hook for late init
ARM: omap2: use machine specific hook for late init
ARM: omap1: use machine specific hook for late init
ARM: msm: use machine specific hook for late init
ARM: imx: use machine specific hook for late init
ARM: exynos: use machine specific hook for late init
ARM: ep93xx: use machine specific hook for late init
ARM: davinci: use machine specific hook for late init
ARM: provide a late_initcall hook for platform initialization
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-ux500/clock.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-ux500/clock.h | 12 | ||||
-rw-r--r-- | arch/arm/mach-ux500/cpu.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/setup.h | 1 |
5 files changed, 25 insertions, 4 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index f943687acaf0..b23a643f03f4 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -785,6 +785,7 @@ MACHINE_START(U8500, "ST-Ericsson MOP500 platform") | |||
785 | .timer = &ux500_timer, | 785 | .timer = &ux500_timer, |
786 | .handle_irq = gic_handle_irq, | 786 | .handle_irq = gic_handle_irq, |
787 | .init_machine = mop500_init_machine, | 787 | .init_machine = mop500_init_machine, |
788 | .init_late = ux500_init_late, | ||
788 | MACHINE_END | 789 | MACHINE_END |
789 | 790 | ||
790 | MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+") | 791 | MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+") |
@@ -794,6 +795,7 @@ MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+") | |||
794 | .timer = &ux500_timer, | 795 | .timer = &ux500_timer, |
795 | .handle_irq = gic_handle_irq, | 796 | .handle_irq = gic_handle_irq, |
796 | .init_machine = hrefv60_init_machine, | 797 | .init_machine = hrefv60_init_machine, |
798 | .init_late = ux500_init_late, | ||
797 | MACHINE_END | 799 | MACHINE_END |
798 | 800 | ||
799 | MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") | 801 | MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") |
@@ -804,6 +806,7 @@ MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") | |||
804 | .timer = &ux500_timer, | 806 | .timer = &ux500_timer, |
805 | .handle_irq = gic_handle_irq, | 807 | .handle_irq = gic_handle_irq, |
806 | .init_machine = snowball_init_machine, | 808 | .init_machine = snowball_init_machine, |
809 | .init_late = ux500_init_late, | ||
807 | MACHINE_END | 810 | MACHINE_END |
808 | 811 | ||
809 | #ifdef CONFIG_MACH_UX500_DT | 812 | #ifdef CONFIG_MACH_UX500_DT |
@@ -918,6 +921,7 @@ DT_MACHINE_START(U8500_DT, "ST-Ericsson U8500 platform (Device Tree Support)") | |||
918 | .timer = &ux500_timer, | 921 | .timer = &ux500_timer, |
919 | .handle_irq = gic_handle_irq, | 922 | .handle_irq = gic_handle_irq, |
920 | .init_machine = u8500_init_machine, | 923 | .init_machine = u8500_init_machine, |
924 | .init_late = ux500_init_late, | ||
921 | .dt_compat = u8500_dt_board_compat, | 925 | .dt_compat = u8500_dt_board_compat, |
922 | MACHINE_END | 926 | MACHINE_END |
923 | #endif | 927 | #endif |
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c index 1762c4728f1e..8d73b066a18d 100644 --- a/arch/arm/mach-ux500/clock.c +++ b/arch/arm/mach-ux500/clock.c | |||
@@ -635,7 +635,7 @@ static int clk_debugfs_register(struct clk *c) | |||
635 | return 0; | 635 | return 0; |
636 | } | 636 | } |
637 | 637 | ||
638 | static int __init clk_debugfs_init(void) | 638 | int __init clk_debugfs_init(void) |
639 | { | 639 | { |
640 | struct clk *c; | 640 | struct clk *c; |
641 | struct dentry *d; | 641 | struct dentry *d; |
@@ -657,7 +657,6 @@ err_out: | |||
657 | return err; | 657 | return err; |
658 | } | 658 | } |
659 | 659 | ||
660 | late_initcall(clk_debugfs_init); | ||
661 | #endif /* defined(CONFIG_DEBUG_FS) */ | 660 | #endif /* defined(CONFIG_DEBUG_FS) */ |
662 | 661 | ||
663 | unsigned long clk_smp_twd_rate = 500000000; | 662 | unsigned long clk_smp_twd_rate = 500000000; |
@@ -696,12 +695,11 @@ static struct notifier_block clk_twd_cpufreq_nb = { | |||
696 | .notifier_call = clk_twd_cpufreq_transition, | 695 | .notifier_call = clk_twd_cpufreq_transition, |
697 | }; | 696 | }; |
698 | 697 | ||
699 | static int clk_init_smp_twd_cpufreq(void) | 698 | int clk_init_smp_twd_cpufreq(void) |
700 | { | 699 | { |
701 | return cpufreq_register_notifier(&clk_twd_cpufreq_nb, | 700 | return cpufreq_register_notifier(&clk_twd_cpufreq_nb, |
702 | CPUFREQ_TRANSITION_NOTIFIER); | 701 | CPUFREQ_TRANSITION_NOTIFIER); |
703 | } | 702 | } |
704 | late_initcall(clk_init_smp_twd_cpufreq); | ||
705 | 703 | ||
706 | #endif | 704 | #endif |
707 | 705 | ||
diff --git a/arch/arm/mach-ux500/clock.h b/arch/arm/mach-ux500/clock.h index d776ada08dbf..65d27a13f46d 100644 --- a/arch/arm/mach-ux500/clock.h +++ b/arch/arm/mach-ux500/clock.h | |||
@@ -150,3 +150,15 @@ struct clk clk_##_name = { \ | |||
150 | 150 | ||
151 | int __init clk_db8500_ed_fixup(void); | 151 | int __init clk_db8500_ed_fixup(void); |
152 | int __init clk_init(void); | 152 | int __init clk_init(void); |
153 | |||
154 | #ifdef CONFIG_DEBUG_FS | ||
155 | int clk_debugfs_init(void); | ||
156 | #else | ||
157 | static inline int clk_debugfs_init(void) { return 0; } | ||
158 | #endif | ||
159 | |||
160 | #ifdef CONFIG_CPU_FREQ | ||
161 | int clk_init_smp_twd_cpufreq(void); | ||
162 | #else | ||
163 | static inline int clk_init_smp_twd_cpufreq(void) { return 0; } | ||
164 | #endif | ||
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index a29a0e3adcf9..e2360e7c770d 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c | |||
@@ -73,6 +73,12 @@ void __init ux500_init_irq(void) | |||
73 | clk_init(); | 73 | clk_init(); |
74 | } | 74 | } |
75 | 75 | ||
76 | void __init ux500_init_late(void) | ||
77 | { | ||
78 | clk_debugfs_init(); | ||
79 | clk_init_smp_twd_cpufreq(); | ||
80 | } | ||
81 | |||
76 | static const char * __init ux500_get_machine(void) | 82 | static const char * __init ux500_get_machine(void) |
77 | { | 83 | { |
78 | return kasprintf(GFP_KERNEL, "DB%4x", dbx500_partnumber()); | 84 | return kasprintf(GFP_KERNEL, "DB%4x", dbx500_partnumber()); |
diff --git a/arch/arm/mach-ux500/include/mach/setup.h b/arch/arm/mach-ux500/include/mach/setup.h index 4e369f1645ec..8b7ed82a2866 100644 --- a/arch/arm/mach-ux500/include/mach/setup.h +++ b/arch/arm/mach-ux500/include/mach/setup.h | |||
@@ -20,6 +20,7 @@ extern void __init u8500_map_io(void); | |||
20 | extern struct device * __init u8500_init_devices(void); | 20 | extern struct device * __init u8500_init_devices(void); |
21 | 21 | ||
22 | extern void __init ux500_init_irq(void); | 22 | extern void __init ux500_init_irq(void); |
23 | extern void __init ux500_init_late(void); | ||
23 | 24 | ||
24 | extern struct device *ux500_soc_device_init(const char *soc_id); | 25 | extern struct device *ux500_soc_device_init(const char *soc_id); |
25 | 26 | ||