diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2012-05-02 05:10:07 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2012-05-08 08:36:38 -0400 |
commit | a010bc2b9e2ccc0b59057d4cc136d48a1f7cebcb (patch) | |
tree | dee9f11fb15a975c8d85cb5e66d3eed3829ad3fe /arch | |
parent | 390e0cfd320b28d6964b92d83d59168a33c28866 (diff) |
ARM: ux500: use machine specific hook for late init
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch')
-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 77d03c1fbd04..348ebd959399 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -722,6 +722,7 @@ MACHINE_START(U8500, "ST-Ericsson MOP500 platform") | |||
722 | .timer = &ux500_timer, | 722 | .timer = &ux500_timer, |
723 | .handle_irq = gic_handle_irq, | 723 | .handle_irq = gic_handle_irq, |
724 | .init_machine = mop500_init_machine, | 724 | .init_machine = mop500_init_machine, |
725 | .init_late = ux500_init_late, | ||
725 | MACHINE_END | 726 | MACHINE_END |
726 | 727 | ||
727 | MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+") | 728 | MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+") |
@@ -731,6 +732,7 @@ MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+") | |||
731 | .timer = &ux500_timer, | 732 | .timer = &ux500_timer, |
732 | .handle_irq = gic_handle_irq, | 733 | .handle_irq = gic_handle_irq, |
733 | .init_machine = hrefv60_init_machine, | 734 | .init_machine = hrefv60_init_machine, |
735 | .init_late = ux500_init_late, | ||
734 | MACHINE_END | 736 | MACHINE_END |
735 | 737 | ||
736 | MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") | 738 | MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") |
@@ -741,6 +743,7 @@ MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") | |||
741 | .timer = &ux500_timer, | 743 | .timer = &ux500_timer, |
742 | .handle_irq = gic_handle_irq, | 744 | .handle_irq = gic_handle_irq, |
743 | .init_machine = snowball_init_machine, | 745 | .init_machine = snowball_init_machine, |
746 | .init_late = ux500_init_late, | ||
744 | MACHINE_END | 747 | MACHINE_END |
745 | 748 | ||
746 | #ifdef CONFIG_MACH_UX500_DT | 749 | #ifdef CONFIG_MACH_UX500_DT |
@@ -830,6 +833,7 @@ DT_MACHINE_START(U8500_DT, "ST-Ericsson U8500 platform (Device Tree Support)") | |||
830 | .timer = &ux500_timer, | 833 | .timer = &ux500_timer, |
831 | .handle_irq = gic_handle_irq, | 834 | .handle_irq = gic_handle_irq, |
832 | .init_machine = u8500_init_machine, | 835 | .init_machine = u8500_init_machine, |
836 | .init_late = ux500_init_late, | ||
833 | .dt_compat = u8500_dt_board_compat, | 837 | .dt_compat = u8500_dt_board_compat, |
834 | MACHINE_END | 838 | MACHINE_END |
835 | #endif | 839 | #endif |
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c index ec35f0aa5665..ce00f5ee14ba 100644 --- a/arch/arm/mach-ux500/clock.c +++ b/arch/arm/mach-ux500/clock.c | |||
@@ -633,7 +633,7 @@ static int clk_debugfs_register(struct clk *c) | |||
633 | return 0; | 633 | return 0; |
634 | } | 634 | } |
635 | 635 | ||
636 | static int __init clk_debugfs_init(void) | 636 | int __init clk_debugfs_init(void) |
637 | { | 637 | { |
638 | struct clk *c; | 638 | struct clk *c; |
639 | struct dentry *d; | 639 | struct dentry *d; |
@@ -655,7 +655,6 @@ err_out: | |||
655 | return err; | 655 | return err; |
656 | } | 656 | } |
657 | 657 | ||
658 | late_initcall(clk_debugfs_init); | ||
659 | #endif /* defined(CONFIG_DEBUG_FS) */ | 658 | #endif /* defined(CONFIG_DEBUG_FS) */ |
660 | 659 | ||
661 | unsigned long clk_smp_twd_rate = 500000000; | 660 | unsigned long clk_smp_twd_rate = 500000000; |
@@ -694,12 +693,11 @@ static struct notifier_block clk_twd_cpufreq_nb = { | |||
694 | .notifier_call = clk_twd_cpufreq_transition, | 693 | .notifier_call = clk_twd_cpufreq_transition, |
695 | }; | 694 | }; |
696 | 695 | ||
697 | static int clk_init_smp_twd_cpufreq(void) | 696 | int clk_init_smp_twd_cpufreq(void) |
698 | { | 697 | { |
699 | return cpufreq_register_notifier(&clk_twd_cpufreq_nb, | 698 | return cpufreq_register_notifier(&clk_twd_cpufreq_nb, |
700 | CPUFREQ_TRANSITION_NOTIFIER); | 699 | CPUFREQ_TRANSITION_NOTIFIER); |
701 | } | 700 | } |
702 | late_initcall(clk_init_smp_twd_cpufreq); | ||
703 | 701 | ||
704 | #endif | 702 | #endif |
705 | 703 | ||
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 d11f3892a27d..9856c5788815 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c | |||
@@ -67,6 +67,12 @@ void __init ux500_init_irq(void) | |||
67 | clk_init(); | 67 | clk_init(); |
68 | } | 68 | } |
69 | 69 | ||
70 | void __init ux500_init_late(void) | ||
71 | { | ||
72 | clk_debugfs_init(); | ||
73 | clk_init_smp_twd_cpufreq(); | ||
74 | } | ||
75 | |||
70 | static const char * __init ux500_get_machine(void) | 76 | static const char * __init ux500_get_machine(void) |
71 | { | 77 | { |
72 | return kasprintf(GFP_KERNEL, "DB%4x", dbx500_partnumber()); | 78 | 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 3dc00ffa7bfa..7b5d865ac591 100644 --- a/arch/arm/mach-ux500/include/mach/setup.h +++ b/arch/arm/mach-ux500/include/mach/setup.h | |||
@@ -22,6 +22,7 @@ extern struct device * __init u5500_init_devices(void); | |||
22 | extern struct device * __init u8500_init_devices(void); | 22 | extern struct device * __init u8500_init_devices(void); |
23 | 23 | ||
24 | extern void __init ux500_init_irq(void); | 24 | extern void __init ux500_init_irq(void); |
25 | extern void __init ux500_init_late(void); | ||
25 | 26 | ||
26 | extern void __init u5500_sdi_init(struct device *parent); | 27 | extern void __init u5500_sdi_init(struct device *parent); |
27 | 28 | ||