diff options
Diffstat (limited to 'arch/mips/au1000/common/time.c')
-rw-r--r-- | arch/mips/au1000/common/time.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/mips/au1000/common/time.c b/arch/mips/au1000/common/time.c index 94f09194d63d..6768638883ea 100644 --- a/arch/mips/au1000/common/time.c +++ b/arch/mips/au1000/common/time.c | |||
@@ -82,7 +82,6 @@ unsigned long wtimer; | |||
82 | void mips_timer_interrupt(void) | 82 | void mips_timer_interrupt(void) |
83 | { | 83 | { |
84 | int irq = 63; | 84 | int irq = 63; |
85 | unsigned long count; | ||
86 | 85 | ||
87 | irq_enter(); | 86 | irq_enter(); |
88 | kstat_this_cpu.irqs[irq]++; | 87 | kstat_this_cpu.irqs[irq]++; |
@@ -231,7 +230,6 @@ wakeup_counter0_set(int ticks) | |||
231 | */ | 230 | */ |
232 | unsigned long cal_r4koff(void) | 231 | unsigned long cal_r4koff(void) |
233 | { | 232 | { |
234 | unsigned long count; | ||
235 | unsigned long cpu_speed; | 233 | unsigned long cpu_speed; |
236 | unsigned long flags; | 234 | unsigned long flags; |
237 | unsigned long counter; | 235 | unsigned long counter; |
@@ -258,7 +256,7 @@ unsigned long cal_r4koff(void) | |||
258 | 256 | ||
259 | #if defined(CONFIG_AU1000_USE32K) | 257 | #if defined(CONFIG_AU1000_USE32K) |
260 | { | 258 | { |
261 | unsigned long start, end; | 259 | unsigned long start, end, count; |
262 | 260 | ||
263 | start = au_readl(SYS_RTCREAD); | 261 | start = au_readl(SYS_RTCREAD); |
264 | start += 2; | 262 | start += 2; |
@@ -282,7 +280,6 @@ unsigned long cal_r4koff(void) | |||
282 | #else | 280 | #else |
283 | cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) * | 281 | cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) * |
284 | AU1000_SRC_CLK; | 282 | AU1000_SRC_CLK; |
285 | count = cpu_speed / 2; | ||
286 | #endif | 283 | #endif |
287 | } | 284 | } |
288 | else { | 285 | else { |
@@ -291,10 +288,9 @@ unsigned long cal_r4koff(void) | |||
291 | * NOTE: some old silicon doesn't allow reading the PLL. | 288 | * NOTE: some old silicon doesn't allow reading the PLL. |
292 | */ | 289 | */ |
293 | cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) * AU1000_SRC_CLK; | 290 | cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) * AU1000_SRC_CLK; |
294 | count = cpu_speed / 2; | ||
295 | no_au1xxx_32khz = 1; | 291 | no_au1xxx_32khz = 1; |
296 | } | 292 | } |
297 | mips_hpt_frequency = count; | 293 | mips_hpt_frequency = cpu_speed; |
298 | // Equation: Baudrate = CPU / (SD * 2 * CLKDIV * 16) | 294 | // Equation: Baudrate = CPU / (SD * 2 * CLKDIV * 16) |
299 | set_au1x00_uart_baud_base(cpu_speed / (2 * ((int)(au_readl(SYS_POWERCTRL)&0x03) + 2) * 16)); | 295 | set_au1x00_uart_baud_base(cpu_speed / (2 * ((int)(au_readl(SYS_POWERCTRL)&0x03) + 2) * 16)); |
300 | spin_unlock_irqrestore(&time_lock, flags); | 296 | spin_unlock_irqrestore(&time_lock, flags); |