[U-Boot] [PATCH 3/6] Exynos: Clock.c: Replace exynos4 prefix with exynos

Chander Kashyap chander.kashyap at linaro.org
Thu Dec 22 11:52:45 CET 2011


Replace exynos4 prefix with exynos in arch/arm/cpu/armv7/exynos/clock.c
as clock.c is common for exynos architecture. By doing so automatic
selection of appropriate clock structure can be done.

As per above reason replace exynos4_clock to exynos_clock in clock.h
header file.

Signed-off-by: Chander Kashyap <chander.kashyap at linaro.org>
---
 arch/arm/cpu/armv7/exynos/clock.c        |   50 +++++++++++++++---------------
 arch/arm/include/asm/arch-exynos/clock.h |    2 +-
 2 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/arch/arm/cpu/armv7/exynos/clock.c b/arch/arm/cpu/armv7/exynos/clock.c
index 4d92c53..b101f96 100644
--- a/arch/arm/cpu/armv7/exynos/clock.c
+++ b/arch/arm/cpu/armv7/exynos/clock.c
@@ -26,11 +26,11 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/clk.h>
 
-/* exynos4: return pll clock frequency */
-static unsigned long exynos4_get_pll_clk(int pllreg)
+/* exynos: return pll clock frequency */
+static unsigned long exynos_get_pll_clk(int pllreg)
 {
-	struct exynos4_clock *clk =
-		(struct exynos4_clock *)samsung_get_base_clock();
+	struct exynos_clock *clk =
+		(struct exynos_clock *)samsung_get_base_clock();
 	unsigned long r, m, p, s, k = 0, mask, fout;
 	unsigned int freq;
 
@@ -92,11 +92,11 @@ static unsigned long exynos4_get_pll_clk(int pllreg)
 	return fout;
 }
 
-/* exynos4: return ARM clock frequency */
-static unsigned long exynos4_get_arm_clk(void)
+/* exynos: return ARM clock frequency */
+static unsigned long exynos_get_arm_clk(void)
 {
-	struct exynos4_clock *clk =
-		(struct exynos4_clock *)samsung_get_base_clock();
+	struct exynos_clock *clk =
+		(struct exynos_clock *)samsung_get_base_clock();
 	unsigned long div;
 	unsigned long armclk;
 	unsigned int core_ratio;
@@ -114,11 +114,11 @@ static unsigned long exynos4_get_arm_clk(void)
 	return armclk;
 }
 
-/* exynos4: return pwm clock frequency */
-static unsigned long exynos4_get_pwm_clk(void)
+/* exynos: return pwm clock frequency */
+static unsigned long exynos_get_pwm_clk(void)
 {
-	struct exynos4_clock *clk =
-		(struct exynos4_clock *)samsung_get_base_clock();
+	struct exynos_clock *clk =
+		(struct exynos_clock *)samsung_get_base_clock();
 	unsigned long pclk, sclk;
 	unsigned int sel;
 	unsigned int ratio;
@@ -157,11 +157,11 @@ static unsigned long exynos4_get_pwm_clk(void)
 	return pclk;
 }
 
-/* exynos4: return uart clock frequency */
-static unsigned long exynos4_get_uart_clk(int dev_index)
+/* exynos: return uart clock frequency */
+static unsigned long exynos_get_uart_clk(int dev_index)
 {
-	struct exynos4_clock *clk =
-		(struct exynos4_clock *)samsung_get_base_clock();
+	struct exynos_clock *clk =
+		(struct exynos_clock *)samsung_get_base_clock();
 	unsigned long uclk, sclk;
 	unsigned int sel;
 	unsigned int ratio;
@@ -204,11 +204,11 @@ static unsigned long exynos4_get_uart_clk(int dev_index)
 	return uclk;
 }
 
-/* exynos4: set the mmc clock */
-static void exynos4_set_mmc_clk(int dev_index, unsigned int div)
+/* exynos: set the mmc clock */
+static void exynos_set_mmc_clk(int dev_index, unsigned int div)
 {
-	struct exynos4_clock *clk =
-		(struct exynos4_clock *)samsung_get_base_clock();
+	struct exynos_clock *clk =
+		(struct exynos_clock *)samsung_get_base_clock();
 	unsigned int addr;
 	unsigned int val;
 
@@ -233,25 +233,25 @@ static void exynos4_set_mmc_clk(int dev_index, unsigned int div)
 
 unsigned long get_pll_clk(int pllreg)
 {
-	return exynos4_get_pll_clk(pllreg);
+	return exynos_get_pll_clk(pllreg);
 }
 
 unsigned long get_arm_clk(void)
 {
-	return exynos4_get_arm_clk();
+	return exynos_get_arm_clk();
 }
 
 unsigned long get_pwm_clk(void)
 {
-	return exynos4_get_pwm_clk();
+	return exynos_get_pwm_clk();
 }
 
 unsigned long get_uart_clk(int dev_index)
 {
-	return exynos4_get_uart_clk(dev_index);
+	return exynos_get_uart_clk(dev_index);
 }
 
 void set_mmc_clk(int dev_index, unsigned int div)
 {
-	exynos4_set_mmc_clk(dev_index, div);
+	exynos_set_mmc_clk(dev_index, div);
 }
diff --git a/arch/arm/include/asm/arch-exynos/clock.h b/arch/arm/include/asm/arch-exynos/clock.h
index 483c911..ecd0cb1 100644
--- a/arch/arm/include/asm/arch-exynos/clock.h
+++ b/arch/arm/include/asm/arch-exynos/clock.h
@@ -23,7 +23,7 @@
 #define __ASM_ARM_ARCH_CLOCK_H_
 
 #ifndef __ASSEMBLY__
-struct exynos4_clock {
+struct exynos_clock {
 	unsigned char	res1[0x4200];
 	unsigned int	src_leftbus;
 	unsigned char	res2[0x1fc];
-- 
1.7.5.4



More information about the U-Boot mailing list