Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Andrew Victor and committed by
Russell King
0a51810a 38a6fe8c

+11 -5
+5
arch/arm/mach-ks8695/include/mach/hardware.h
··· 17 17 #include <asm/sizes.h> 18 18 19 19 /* 20 + * Clocks are derived from MCLK, which is 25Mhz 21 + */ 22 + #define KS8695_CLOCK_RATE 25000000 23 + 24 + /* 20 25 * Physical RAM address. 21 26 */ 22 27 #define KS8695_SDRAM_PA 0x00000000
+3 -2
arch/arm/mach-ks8695/include/mach/timex.h
··· 14 14 #ifndef __ASM_ARCH_TIMEX_H 15 15 #define __ASM_ARCH_TIMEX_H 16 16 17 - /* timers are derived from MCLK, which is 25MHz */ 18 - #define CLOCK_TICK_RATE 25000000 17 + #include <mach/hardware.h> 18 + 19 + #define CLOCK_TICK_RATE KS8695_CLOCK_RATE 19 20 20 21 #endif
+1 -1
drivers/serial/serial_ks8695.c
··· 549 549 .mapbase = KS8695_UART_VA, 550 550 .iotype = SERIAL_IO_MEM, 551 551 .irq = KS8695_IRQ_UART_TX, 552 - .uartclk = CLOCK_TICK_RATE * 16, 552 + .uartclk = KS8695_CLOCK_RATE * 16, 553 553 .fifosize = 16, 554 554 .ops = &ks8695uart_pops, 555 555 .flags = ASYNC_BOOT_AUTOCONF,
+2 -2
drivers/watchdog/ks8695_wdt.c
··· 66 66 static inline void ks8695_wdt_start(void) 67 67 { 68 68 unsigned long tmcon; 69 - unsigned long tval = wdt_time * CLOCK_TICK_RATE; 69 + unsigned long tval = wdt_time * KS8695_CLOCK_RATE; 70 70 71 71 spin_lock(&ks8695_lock); 72 72 /* disable timer0 */ ··· 103 103 static int ks8695_wdt_settimeout(int new_time) 104 104 { 105 105 /* 106 - * All counting occurs at SLOW_CLOCK / 128 = 0.256 Hz 106 + * All counting occurs at KS8695_CLOCK_RATE / 128 = 0.256 Hz 107 107 * 108 108 * Since WDV is a 16-bit counter, the maximum period is 109 109 * 65536 / 0.256 = 256 seconds.