Skip to contentSkip to conversation

ARM: S5PC100: Bug fix EPLL_CON MASK settings

PATCH In review Kukjin Kim 2 participants 2 messages Sep 28, 2010

Subsystems (3)
lore
Share & tools
lore

Kukjin Kim

author
#0 lore raw

PATCH 1/1 ARM: S5PC100: Bug fix EPLL_CON MASK settings

From: Seungwhan Youn <[email protected]>

This patch fixes EPLL_CON MASK settings which did not contain its shift values when set epll rate on S5PC100.

---
 arch/arm/mach-s5pc100/clock.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
arch/arm/mach-s5pc100/clock.c +3 -1
index 084abd1..ff125b4 100644
@@ -323,7 +323,9 @@ static int s5pc100_epll_set_rate(struct clk *clk, unsigned long rate)
 
 	epll_con = __raw_readl(S5P_EPLL_CON);
 
-	epll_con &= ~(PLL65XX_MDIV_MASK | PLL65XX_PDIV_MASK | PLL65XX_SDIV_MASK);
+	epll_con &= ~((PLL65XX_MDIV_MASK << PLL65XX_MDIV_SHIFT) |
+		      (PLL65XX_PDIV_MASK << PLL65XX_PDIV_SHIFT) |
+		      (PLL65XX_SDIV_MASK << PLL65XX_SDIV_SHIFT));
 
 	for (i = 0; i < ARRAY_SIZE(epll_div); i++) {
 		if (epll_div[i][0] == rate) {
Signature · 1 line
1.6.2.5
#1 lore raw
Quoted 16 lines · Kukjin Kim

From: Seungwhan Youn <[email protected]>

This patch fixes EPLL_CON MASK settings which did not contain its shift values when set epll rate on S5PC100.

---
 arch/arm/mach-s5pc100/clock.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
arch/arm/mach-s5pc100/clock.c +0 -0
index 084abd1..ff125b4 100644

arch/arm/mach-s5pc100/clock.c static int s5pc100_epll_set_rate(struct clk *clk, unsigned long rate) · line 328

Quoted 7 lines
arch/arm/mach-s5pc100/clock.c +3 -1
@@ -323,7 +323,9 @@ static int s5pc100_epll_set_rate(struct clk *clk, unsigned long rate)
 
 	epll_con = __raw_readl(S5P_EPLL_CON);
 
-	epll_con &= ~(PLL65XX_MDIV_MASK | PLL65XX_PDIV_MASK | PLL65XX_SDIV_MASK);
+	epll_con &= ~((PLL65XX_MDIV_MASK << PLL65XX_MDIV_SHIFT) |
+		      (PLL65XX_PDIV_MASK << PLL65XX_PDIV_SHIFT) |
+		      (PLL65XX_SDIV_MASK << PLL65XX_SDIV_SHIFT));

you know, it'd probably be easier to calculatet what you need to keep from this register.

Signature · 4 lines
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.