Skip to contentSkip to conversation

Exynos5: clock: Fix a typo bug in exynos clock init

PATCH New Akshay Saraswat 3 participants 3 messages Mar 21, 2013 – Mar 29, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Exynos5: clock: Fix a typo bug in exynos clock init

We intended to clear the bits of CLK_SRC_TOP2 register, instead we were writing on the reserved bits of src_core1 register. Since the default value of clk_src_top2 register were itself zero, this typo was not creating any big issue. But it is better to fix this error for better readability of the code.

---
 board/samsung/smdk5250/clock_init.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
board/samsung/smdk5250/clock_init.c +4 -4
index c009ae5..0ee65ae 100644
@@ -434,10 +434,10 @@ void system_clock_init()
 		val = readl(&clk->mux_stat_core1);
 	} while ((val | MUX_MPLL_SEL_MASK) != val);
 
-	clrbits_le32(&clk->src_core1, MUX_CPLL_SEL_MASK);
-	clrbits_le32(&clk->src_core1, MUX_EPLL_SEL_MASK);
-	clrbits_le32(&clk->src_core1, MUX_VPLL_SEL_MASK);
-	clrbits_le32(&clk->src_core1, MUX_GPLL_SEL_MASK);
+	clrbits_le32(&clk->src_top2, MUX_CPLL_SEL_MASK);
+	clrbits_le32(&clk->src_top2, MUX_EPLL_SEL_MASK);
+	clrbits_le32(&clk->src_top2, MUX_VPLL_SEL_MASK);
+	clrbits_le32(&clk->src_top2, MUX_GPLL_SEL_MASK);
 	tmp = MUX_CPLL_SEL_MASK | MUX_EPLL_SEL_MASK | MUX_VPLL_SEL_MASK
 		| MUX_GPLL_SEL_MASK;
 	do {
Signature · 1 line
1.8.0
#1 lore raw

PATCH 1/1 Exynos5: clock: Fix a typo bug in exynos clock init

Quoted 8 lines · Akshay Saraswat

We intended to clear the bits of CLK_SRC_TOP2 register, instead we were writing on the reserved bits of src_core1 register. Since the default value of clk_src_top2 register were itself zero, this typo was not creating any big issue. But it is better to fix this error for better readability of the code.

#2 lore raw

PATCH 1/1 Exynos5: clock: Fix a typo bug in exynos clock init

In reply to Akshay Saraswat
Quoted 22 lines · Akshay Saraswat

We intended to clear the bits of CLK_SRC_TOP2 register, instead we were writing on the reserved bits of src_core1 register. Since the default value of clk_src_top2 register were itself zero, this typo was not creating any big issue. But it is better to fix this error for better readability of the code.

---
 board/samsung/smdk5250/clock_init.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
board/samsung/smdk5250/clock_init.c +0 -1
index c009ae5..0ee65ae 100644
@@ -434,10 +434,10 @@ void system_clock_init()
 		val = readl(&clk->mux_stat_core1);
 	} while ((val | MUX_MPLL_SEL_MASK) != val);
 
-	clrbits_le32(&clk->src_core1, MUX_CPLL_SEL_MASK);

board/samsung/smdk5250/clock_init.c void system_clock_init() · line 443

Quoted 10 lines
board/samsung/smdk5250/clock_init.c +4 -3
-	clrbits_le32(&clk->src_core1, MUX_EPLL_SEL_MASK);
-	clrbits_le32(&clk->src_core1, MUX_VPLL_SEL_MASK);
-	clrbits_le32(&clk->src_core1, MUX_GPLL_SEL_MASK);
+	clrbits_le32(&clk->src_top2, MUX_CPLL_SEL_MASK);
+	clrbits_le32(&clk->src_top2, MUX_EPLL_SEL_MASK);
+	clrbits_le32(&clk->src_top2, MUX_VPLL_SEL_MASK);
+	clrbits_le32(&clk->src_top2, MUX_GPLL_SEL_MASK);
 	tmp = MUX_CPLL_SEL_MASK | MUX_EPLL_SEL_MASK | MUX_VPLL_SEL_MASK
 		| MUX_GPLL_SEL_MASK;
 	do {

applied to u-boot-samsung.

Thanks,
Minkyu Kang