aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/alchemy/common/clocks.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/alchemy/common/clocks.c')
-rw-r--r--arch/mips/alchemy/common/clocks.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/mips/alchemy/common/clocks.c b/arch/mips/alchemy/common/clocks.c
index f38298a8b98c..0e41416fa682 100644
--- a/arch/mips/alchemy/common/clocks.c
+++ b/arch/mips/alchemy/common/clocks.c
@@ -91,13 +91,13 @@ unsigned long au1xxx_calc_clock(void)
91 if (au1xxx_cpu_has_pll_wo()) 91 if (au1xxx_cpu_has_pll_wo())
92 cpu_speed = 396000000; 92 cpu_speed = 396000000;
93 else 93 else
94 cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) * AU1000_SRC_CLK; 94 cpu_speed = (alchemy_rdsys(AU1000_SYS_CPUPLL) & 0x3f) * AU1000_SRC_CLK;
95 95
96 /* On Alchemy CPU:counter ratio is 1:1 */ 96 /* On Alchemy CPU:counter ratio is 1:1 */
97 mips_hpt_frequency = cpu_speed; 97 mips_hpt_frequency = cpu_speed;
98 /* Equation: Baudrate = CPU / (SD * 2 * CLKDIV * 16) */ 98 /* Equation: Baudrate = CPU / (SD * 2 * CLKDIV * 16) */
99 set_au1x00_uart_baud_base(cpu_speed / (2 * ((int)(au_readl(SYS_POWERCTRL) 99 set_au1x00_uart_baud_base(cpu_speed / (2 *
100 & 0x03) + 2) * 16)); 100 ((alchemy_rdsys(AU1000_SYS_POWERCTRL) & 0x03) + 2) * 16));
101 101
102 set_au1x00_speed(cpu_speed); 102 set_au1x00_speed(cpu_speed);
103 103