Commit 0a51810a authored by Andrew Victor's avatar Andrew Victor Committed by Russell King

ARM: 5637/1: [KS8695] Don't reference CLOCK_TICK_RATE in drivers

Stop referencing CLOCK_TICK_RATE in the KS8695 drivers, rather refer
to a KS8695_CLOCK_RATE.
Issue pointed out by Russell King on arm-linux-kernel mailing list.
Signed-off-by: default avatarAndrew Victor <linux@maxim.org.za>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 38a6fe8c
...@@ -16,6 +16,11 @@ ...@@ -16,6 +16,11 @@
#include <asm/sizes.h> #include <asm/sizes.h>
/*
* Clocks are derived from MCLK, which is 25Mhz
*/
#define KS8695_CLOCK_RATE 25000000
/* /*
* Physical RAM address. * Physical RAM address.
*/ */
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
#ifndef __ASM_ARCH_TIMEX_H #ifndef __ASM_ARCH_TIMEX_H
#define __ASM_ARCH_TIMEX_H #define __ASM_ARCH_TIMEX_H
/* timers are derived from MCLK, which is 25MHz */ #include <mach/hardware.h>
#define CLOCK_TICK_RATE 25000000
#define CLOCK_TICK_RATE KS8695_CLOCK_RATE
#endif #endif
...@@ -549,7 +549,7 @@ static struct uart_port ks8695uart_ports[SERIAL_KS8695_NR] = { ...@@ -549,7 +549,7 @@ static struct uart_port ks8695uart_ports[SERIAL_KS8695_NR] = {
.mapbase = KS8695_UART_VA, .mapbase = KS8695_UART_VA,
.iotype = SERIAL_IO_MEM, .iotype = SERIAL_IO_MEM,
.irq = KS8695_IRQ_UART_TX, .irq = KS8695_IRQ_UART_TX,
.uartclk = CLOCK_TICK_RATE * 16, .uartclk = KS8695_CLOCK_RATE * 16,
.fifosize = 16, .fifosize = 16,
.ops = &ks8695uart_pops, .ops = &ks8695uart_pops,
.flags = ASYNC_BOOT_AUTOCONF, .flags = ASYNC_BOOT_AUTOCONF,
......
...@@ -66,7 +66,7 @@ static inline void ks8695_wdt_stop(void) ...@@ -66,7 +66,7 @@ static inline void ks8695_wdt_stop(void)
static inline void ks8695_wdt_start(void) static inline void ks8695_wdt_start(void)
{ {
unsigned long tmcon; unsigned long tmcon;
unsigned long tval = wdt_time * CLOCK_TICK_RATE; unsigned long tval = wdt_time * KS8695_CLOCK_RATE;
spin_lock(&ks8695_lock); spin_lock(&ks8695_lock);
/* disable timer0 */ /* disable timer0 */
...@@ -103,7 +103,7 @@ static inline void ks8695_wdt_reload(void) ...@@ -103,7 +103,7 @@ static inline void ks8695_wdt_reload(void)
static int ks8695_wdt_settimeout(int new_time) static int ks8695_wdt_settimeout(int new_time)
{ {
/* /*
* All counting occurs at SLOW_CLOCK / 128 = 0.256 Hz * All counting occurs at KS8695_CLOCK_RATE / 128 = 0.256 Hz
* *
* Since WDV is a 16-bit counter, the maximum period is * Since WDV is a 16-bit counter, the maximum period is
* 65536 / 0.256 = 256 seconds. * 65536 / 0.256 = 256 seconds.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment