aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-26 16:14:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-26 16:14:01 -0400
commitf465d145d76803fe6332092775d891c8c509aa44 (patch)
tree45889e2eee7e8288ef269e9b661111364a71c25f /arch/arm/mach-ux500
parent30b842889eea1bea02dff55b13d2ddf07a46ce78 (diff)
parent80b9abf973462499c1a0110df47f62cc90361e2c (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.c4
-rw-r--r--arch/arm/mach-ux500/clock.c6
-rw-r--r--arch/arm/mach-ux500/clock.h12
-rw-r--r--arch/arm/mach-ux500/cpu.c6
-rw-r--r--arch/arm/mach-ux500/include/mach/setup.h1
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,
788MACHINE_END 789MACHINE_END
789 790
790MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+") 791MACHINE_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,
797MACHINE_END 799MACHINE_END
798 800
799MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") 801MACHINE_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,
807MACHINE_END 810MACHINE_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,
922MACHINE_END 926MACHINE_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
638static int __init clk_debugfs_init(void) 638int __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
660late_initcall(clk_debugfs_init);
661#endif /* defined(CONFIG_DEBUG_FS) */ 660#endif /* defined(CONFIG_DEBUG_FS) */
662 661
663unsigned long clk_smp_twd_rate = 500000000; 662unsigned 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
699static int clk_init_smp_twd_cpufreq(void) 698int 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}
704late_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
151int __init clk_db8500_ed_fixup(void); 151int __init clk_db8500_ed_fixup(void);
152int __init clk_init(void); 152int __init clk_init(void);
153
154#ifdef CONFIG_DEBUG_FS
155int clk_debugfs_init(void);
156#else
157static inline int clk_debugfs_init(void) { return 0; }
158#endif
159
160#ifdef CONFIG_CPU_FREQ
161int clk_init_smp_twd_cpufreq(void);
162#else
163static 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
76void __init ux500_init_late(void)
77{
78 clk_debugfs_init();
79 clk_init_smp_twd_cpufreq();
80}
81
76static const char * __init ux500_get_machine(void) 82static 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);
20extern struct device * __init u8500_init_devices(void); 20extern struct device * __init u8500_init_devices(void);
21 21
22extern void __init ux500_init_irq(void); 22extern void __init ux500_init_irq(void);
23extern void __init ux500_init_late(void);
23 24
24extern struct device *ux500_soc_device_init(const char *soc_id); 25extern struct device *ux500_soc_device_init(const char *soc_id);
25 26