]> git.karo-electronics.de Git - linux-beck.git/commitdiff
arm: tcc8k: Avoid reading clock register twice
authorOskar Schirmer <oskar@linutronix.de>
Thu, 17 Feb 2011 15:43:00 +0000 (16:43 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 11 Mar 2011 09:06:06 +0000 (10:06 +0100)
There is no reason why in case of PLL2 the configuration register
should be read twice, while for PLL0/1 using the value previously read
is used. Do the same for PLL2.

Signed-off-by: Oskar Schirmer <oskar@linutronix.de>
Cc: bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/arm/mach-tcc8k/clock.c

index 7ebcbff4652a7af3e948eb3729837b918bb6da39..a25e3fcb716f9abcda75a893163e3fae10ca41ea 100644 (file)
@@ -199,7 +199,7 @@ static unsigned long get_rate_pll_div(int pll)
                addr = CKC_BASE + CLKDIVC1_OFFS;
                reg = __raw_readl(addr);
                if (reg & CLKDIVC1_P2E)
-                       div = __raw_readl(addr) & 0x3f;
+                       div = reg & 0x3f;
                break;
        }
        return get_rate_pll(pll) / (div + 1);