summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/s5pc1xx
diff options
context:
space:
mode:
authorMinkyu Kang <mk7.kang@samsung.com>2010-12-27 15:55:48 +0900
committerAlbert Aribaud <albert.aribaud@free.fr>2011-02-02 00:54:44 +0100
commit3c152165c78408e44845f2d08469db887f050e43 (patch)
treed7c52a543729044292c0d8b97b0ea6b4bcb6048e /arch/arm/cpu/armv7/s5pc1xx
parent724bd3c50fb14b663fde7478784848405bc93459 (diff)
downloadu-boot-imx-3c152165c78408e44845f2d08469db887f050e43.zip
u-boot-imx-3c152165c78408e44845f2d08469db887f050e43.tar.gz
u-boot-imx-3c152165c78408e44845f2d08469db887f050e43.tar.bz2
armv7: s5pc1xx: don't use function pointer for clock functions
Because of the bss area is cleared after relocation, we've lost pointers. This patch fixed it. Signed-off-by: Minkyu Kang <mk7.kang@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'arch/arm/cpu/armv7/s5pc1xx')
-rw-r--r--arch/arm/cpu/armv7/s5pc1xx/clock.c38
1 files changed, 23 insertions, 15 deletions
diff --git a/arch/arm/cpu/armv7/s5pc1xx/clock.c b/arch/arm/cpu/armv7/s5pc1xx/clock.c
index 98a27e5..e92647c 100644
--- a/arch/arm/cpu/armv7/s5pc1xx/clock.c
+++ b/arch/arm/cpu/armv7/s5pc1xx/clock.c
@@ -38,11 +38,6 @@
#define CONFIG_SYS_CLK_FREQ_C110 24000000
#endif
-unsigned long (*get_uart_clk)(int dev_index);
-unsigned long (*get_pwm_clk)(void);
-unsigned long (*get_arm_clk)(void);
-unsigned long (*get_pll_clk)(int);
-
/* s5pc110: return pll clock frequency */
static unsigned long s5pc100_get_pll_clk(int pllreg)
{
@@ -316,15 +311,28 @@ static unsigned long s5pc1xx_get_pwm_clk(void)
return s5pc100_get_pclk();
}
-void s5p_clock_init(void)
+unsigned long get_pll_clk(int pllreg)
{
- if (cpu_is_s5pc110()) {
- get_pll_clk = s5pc110_get_pll_clk;
- get_arm_clk = s5pc110_get_arm_clk;
- } else {
- get_pll_clk = s5pc100_get_pll_clk;
- get_arm_clk = s5pc100_get_arm_clk;
- }
- get_uart_clk = s5pc1xx_get_uart_clk;
- get_pwm_clk = s5pc1xx_get_pwm_clk;
+ if (cpu_is_s5pc110())
+ return s5pc110_get_pll_clk(pllreg);
+ else
+ return s5pc100_get_pll_clk(pllreg);
+}
+
+unsigned long get_arm_clk(void)
+{
+ if (cpu_is_s5pc110())
+ return s5pc110_get_arm_clk();
+ else
+ return s5pc100_get_arm_clk();
+}
+
+unsigned long get_pwm_clk(void)
+{
+ return s5pc1xx_get_pwm_clk();
+}
+
+unsigned long get_uart_clk(int dev_index)
+{
+ return s5pc1xx_get_uart_clk(dev_index);
}