diff options
author | viresh kumar <viresh.kumar@st.com> | 2011-05-20 03:34:18 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-05-20 17:31:40 -0400 |
commit | b997f6e2cba28e5361aaa6ac008f052eccd994e6 (patch) | |
tree | 77970fd7099ff743055ca254d5cdf1b6e75d2db6 | |
parent | 16c29dafcc86024048f1dbb8349d31cb22c7c55a (diff) |
ARM: 6926/1: SPEAr clock: Define common clk_init routine in plat/clock.c
Define common clk_init routine in plat/clock.c for calling recalc_root_clocks.
This routine will be used for any common code across all machine families.
Whereas family specific spear*xx_clk_init routines will be used for family
specific code.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/mach-spear3xx/clock.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-spear3xx/include/mach/generic.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-spear3xx/spear3xx.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-spear6xx/clock.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-spear6xx/include/mach/generic.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-spear6xx/spear6xx.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-spear/clock.c | 5 | ||||
-rw-r--r-- | arch/arm/plat-spear/include/plat/clock.h | 1 |
8 files changed, 14 insertions, 8 deletions
diff --git a/arch/arm/mach-spear3xx/clock.c b/arch/arm/mach-spear3xx/clock.c index 98bc7edc95a6..5707772d51f7 100644 --- a/arch/arm/mach-spear3xx/clock.c +++ b/arch/arm/mach-spear3xx/clock.c | |||
@@ -732,12 +732,12 @@ static struct clk_lookup spear_clk_lookups[] = { | |||
732 | #endif | 732 | #endif |
733 | }; | 733 | }; |
734 | 734 | ||
735 | void __init clk_init(void) | 735 | void __init spear3xx_clk_init(void) |
736 | { | 736 | { |
737 | int i; | 737 | int i; |
738 | 738 | ||
739 | for (i = 0; i < ARRAY_SIZE(spear_clk_lookups); i++) | 739 | for (i = 0; i < ARRAY_SIZE(spear_clk_lookups); i++) |
740 | clk_register(&spear_clk_lookups[i]); | 740 | clk_register(&spear_clk_lookups[i]); |
741 | 741 | ||
742 | recalc_root_clocks(); | 742 | clk_init(); |
743 | } | 743 | } |
diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h index 8e30636909ef..115d3cbf7420 100644 --- a/arch/arm/mach-spear3xx/include/mach/generic.h +++ b/arch/arm/mach-spear3xx/include/mach/generic.h | |||
@@ -36,7 +36,7 @@ extern struct amba_device uart_device; | |||
36 | extern struct sys_timer spear3xx_timer; | 36 | extern struct sys_timer spear3xx_timer; |
37 | 37 | ||
38 | /* Add spear3xx family function declarations here */ | 38 | /* Add spear3xx family function declarations here */ |
39 | void __init clk_init(void); | 39 | void __init spear3xx_clk_init(void); |
40 | void __init spear_setup_timer(void); | 40 | void __init spear_setup_timer(void); |
41 | void __init spear3xx_map_io(void); | 41 | void __init spear3xx_map_io(void); |
42 | void __init spear3xx_init_irq(void); | 42 | void __init spear3xx_init_irq(void); |
diff --git a/arch/arm/mach-spear3xx/spear3xx.c b/arch/arm/mach-spear3xx/spear3xx.c index d3ba8ca1bc59..1316eaa14822 100644 --- a/arch/arm/mach-spear3xx/spear3xx.c +++ b/arch/arm/mach-spear3xx/spear3xx.c | |||
@@ -97,7 +97,7 @@ void __init spear3xx_map_io(void) | |||
97 | iotable_init(spear3xx_io_desc, ARRAY_SIZE(spear3xx_io_desc)); | 97 | iotable_init(spear3xx_io_desc, ARRAY_SIZE(spear3xx_io_desc)); |
98 | 98 | ||
99 | /* This will initialize clock framework */ | 99 | /* This will initialize clock framework */ |
100 | clk_init(); | 100 | spear3xx_clk_init(); |
101 | } | 101 | } |
102 | 102 | ||
103 | /* pad multiplexing support */ | 103 | /* pad multiplexing support */ |
diff --git a/arch/arm/mach-spear6xx/clock.c b/arch/arm/mach-spear6xx/clock.c index 88b748b5be80..ac70e0d88fef 100644 --- a/arch/arm/mach-spear6xx/clock.c +++ b/arch/arm/mach-spear6xx/clock.c | |||
@@ -671,12 +671,12 @@ static struct clk_lookup spear_clk_lookups[] = { | |||
671 | { .dev_id = "gpio2", .clk = &gpio2_clk}, | 671 | { .dev_id = "gpio2", .clk = &gpio2_clk}, |
672 | }; | 672 | }; |
673 | 673 | ||
674 | void __init clk_init(void) | 674 | void __init spear6xx_clk_init(void) |
675 | { | 675 | { |
676 | int i; | 676 | int i; |
677 | 677 | ||
678 | for (i = 0; i < ARRAY_SIZE(spear_clk_lookups); i++) | 678 | for (i = 0; i < ARRAY_SIZE(spear_clk_lookups); i++) |
679 | clk_register(&spear_clk_lookups[i]); | 679 | clk_register(&spear_clk_lookups[i]); |
680 | 680 | ||
681 | recalc_root_clocks(); | 681 | clk_init(); |
682 | } | 682 | } |
diff --git a/arch/arm/mach-spear6xx/include/mach/generic.h b/arch/arm/mach-spear6xx/include/mach/generic.h index 94cf4a648b57..183f0238c5e2 100644 --- a/arch/arm/mach-spear6xx/include/mach/generic.h +++ b/arch/arm/mach-spear6xx/include/mach/generic.h | |||
@@ -39,7 +39,7 @@ void __init spear6xx_map_io(void); | |||
39 | void __init spear6xx_init_irq(void); | 39 | void __init spear6xx_init_irq(void); |
40 | void __init spear6xx_init(void); | 40 | void __init spear6xx_init(void); |
41 | void __init spear600_init(void); | 41 | void __init spear600_init(void); |
42 | void __init clk_init(void); | 42 | void __init spear6xx_clk_init(void); |
43 | 43 | ||
44 | /* Add spear600 machine device structure declarations here */ | 44 | /* Add spear600 machine device structure declarations here */ |
45 | 45 | ||
diff --git a/arch/arm/mach-spear6xx/spear6xx.c b/arch/arm/mach-spear6xx/spear6xx.c index 981812961ac7..e0f6628c8b2c 100644 --- a/arch/arm/mach-spear6xx/spear6xx.c +++ b/arch/arm/mach-spear6xx/spear6xx.c | |||
@@ -148,7 +148,7 @@ void __init spear6xx_map_io(void) | |||
148 | iotable_init(spear6xx_io_desc, ARRAY_SIZE(spear6xx_io_desc)); | 148 | iotable_init(spear6xx_io_desc, ARRAY_SIZE(spear6xx_io_desc)); |
149 | 149 | ||
150 | /* This will initialize clock framework */ | 150 | /* This will initialize clock framework */ |
151 | clk_init(); | 151 | spear6xx_clk_init(); |
152 | } | 152 | } |
153 | 153 | ||
154 | static void __init spear6xx_timer_init(void) | 154 | static void __init spear6xx_timer_init(void) |
diff --git a/arch/arm/plat-spear/clock.c b/arch/arm/plat-spear/clock.c index bdbd7ec9cb6b..6fa474cb398e 100644 --- a/arch/arm/plat-spear/clock.c +++ b/arch/arm/plat-spear/clock.c | |||
@@ -903,6 +903,11 @@ void recalc_root_clocks(void) | |||
903 | spin_unlock_irqrestore(&clocks_lock, flags); | 903 | spin_unlock_irqrestore(&clocks_lock, flags); |
904 | } | 904 | } |
905 | 905 | ||
906 | void __init clk_init(void) | ||
907 | { | ||
908 | recalc_root_clocks(); | ||
909 | } | ||
910 | |||
906 | #ifdef CONFIG_DEBUG_FS | 911 | #ifdef CONFIG_DEBUG_FS |
907 | /* | 912 | /* |
908 | * debugfs support to trace clock tree hierarchy and attributes | 913 | * debugfs support to trace clock tree hierarchy and attributes |
diff --git a/arch/arm/plat-spear/include/plat/clock.h b/arch/arm/plat-spear/include/plat/clock.h index 2ae6606930a6..e4cc7877b0be 100644 --- a/arch/arm/plat-spear/include/plat/clock.h +++ b/arch/arm/plat-spear/include/plat/clock.h | |||
@@ -224,6 +224,7 @@ struct clcd_rate_tbl { | |||
224 | }; | 224 | }; |
225 | 225 | ||
226 | /* platform specific clock functions */ | 226 | /* platform specific clock functions */ |
227 | void __init clk_init(void); | ||
227 | void clk_register(struct clk_lookup *cl); | 228 | void clk_register(struct clk_lookup *cl); |
228 | void recalc_root_clocks(void); | 229 | void recalc_root_clocks(void); |
229 | 230 | ||