ARM: 6926/1: SPEAr clock: Define common clk_init routine in plat/clock.c
authorviresh kumar <viresh.kumar@st.com>
Fri, 20 May 2011 07:34:18 +0000 (08:34 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 20 May 2011 21:31:40 +0000 (22:31 +0100)
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>
arch/arm/mach-spear3xx/clock.c
arch/arm/mach-spear3xx/include/mach/generic.h
arch/arm/mach-spear3xx/spear3xx.c
arch/arm/mach-spear6xx/clock.c
arch/arm/mach-spear6xx/include/mach/generic.h
arch/arm/mach-spear6xx/spear6xx.c
arch/arm/plat-spear/clock.c
arch/arm/plat-spear/include/plat/clock.h

index 98bc7edc95a62fe71ffbbc5e41f15878d6d748c4..5707772d51f7358ed311b146ad15929a0396295c 100644 (file)
@@ -732,12 +732,12 @@ static struct clk_lookup spear_clk_lookups[] = {
 #endif
 };
 
-void __init clk_init(void)
+void __init spear3xx_clk_init(void)
 {
        int i;
 
        for (i = 0; i < ARRAY_SIZE(spear_clk_lookups); i++)
                clk_register(&spear_clk_lookups[i]);
 
-       recalc_root_clocks();
+       clk_init();
 }
index 8e30636909ef9c9a6b7518c853ab098e9ee9508b..115d3cbf7420011f0fe0c9f6a1528abb3eb353cf 100644 (file)
@@ -36,7 +36,7 @@ extern struct amba_device uart_device;
 extern struct sys_timer spear3xx_timer;
 
 /* Add spear3xx family function declarations here */
-void __init clk_init(void);
+void __init spear3xx_clk_init(void);
 void __init spear_setup_timer(void);
 void __init spear3xx_map_io(void);
 void __init spear3xx_init_irq(void);
index d3ba8ca1bc5910bb841eeb8285ccd14454ba1ea0..1316eaa148224ea20dfc3ea9589fb99f1a08ec56 100644 (file)
@@ -97,7 +97,7 @@ void __init spear3xx_map_io(void)
        iotable_init(spear3xx_io_desc, ARRAY_SIZE(spear3xx_io_desc));
 
        /* This will initialize clock framework */
-       clk_init();
+       spear3xx_clk_init();
 }
 
 /* pad multiplexing support */
index 88b748b5be80fb09807eb0ebaf5d7cff8d8212f4..ac70e0d88fef8a7a7616573788c9fdb727c252c4 100644 (file)
@@ -671,12 +671,12 @@ static struct clk_lookup spear_clk_lookups[] = {
        { .dev_id = "gpio2",            .clk = &gpio2_clk},
 };
 
-void __init clk_init(void)
+void __init spear6xx_clk_init(void)
 {
        int i;
 
        for (i = 0; i < ARRAY_SIZE(spear_clk_lookups); i++)
                clk_register(&spear_clk_lookups[i]);
 
-       recalc_root_clocks();
+       clk_init();
 }
index 94cf4a648b57394f22c03776ef433d090ab50ed2..183f0238c5e26c611a066ebc781fa29116590f58 100644 (file)
@@ -39,7 +39,7 @@ void __init spear6xx_map_io(void);
 void __init spear6xx_init_irq(void);
 void __init spear6xx_init(void);
 void __init spear600_init(void);
-void __init clk_init(void);
+void __init spear6xx_clk_init(void);
 
 /* Add spear600 machine device structure declarations here */
 
index 981812961ac7358d84c479a86028b3d00c3d9a89..e0f6628c8b2c878155fc311acad938b15a3d56d4 100644 (file)
@@ -148,7 +148,7 @@ void __init spear6xx_map_io(void)
        iotable_init(spear6xx_io_desc, ARRAY_SIZE(spear6xx_io_desc));
 
        /* This will initialize clock framework */
-       clk_init();
+       spear6xx_clk_init();
 }
 
 static void __init spear6xx_timer_init(void)
index bdbd7ec9cb6b2f0dc4f30c3bd798cf0ff9316d63..6fa474cb398e1c33da5a24c3b528fbf72875ff49 100644 (file)
@@ -903,6 +903,11 @@ void recalc_root_clocks(void)
        spin_unlock_irqrestore(&clocks_lock, flags);
 }
 
+void __init clk_init(void)
+{
+       recalc_root_clocks();
+}
+
 #ifdef CONFIG_DEBUG_FS
 /*
  *     debugfs support to trace clock tree hierarchy and attributes
index 2ae6606930a60a5fa4d301516f961ea30827da2c..e4cc7877b0beaa098d99f0071558924ab8bc5aab 100644 (file)
@@ -224,6 +224,7 @@ struct clcd_rate_tbl {
 };
 
 /* platform specific clock functions */
+void __init clk_init(void);
 void clk_register(struct clk_lookup *cl);
 void recalc_root_clocks(void);