clocksource: convert footbridge to generic i8253 clocksource
Subsystems (4)
PATCH 2/4 clocksource: convert footbridge to generic i8253 clocksource
Convert the footbridge isa-timer code to use generic i8253 clocksource.
Signed-off-by Russell King <[email protected]>
--- arch/arm/include/asm/i8253.h | 15 +++++++++++ arch/arm/mach-footbridge/Kconfig | 2 + arch/arm/mach-footbridge/isa-timer.c | 45 +++------------------------------- include/linux/clocksource.h | 2 + 4 files changed, 23 insertions(+), 41 deletions(-) create mode 100644 arch/arm/include/asm/i8253.h
arch/arm/include/asm/i8253.h new file +15 -0
@@ -0,0 +1,15 @@ +#ifndef __ASMARM_I8253_H +#define __ASMARM_I8253_H + +/* i8253A PIT registers */ +#define PIT_MODE 0x43 +#define PIT_CH0 0x40 + +#define PIT_LATCH ((PIT_TICK_RATE + HZ / 2) / HZ) + +extern raw_spinlock_t i8253_lock; + +#define outb_pit outb_p +#define inb_pit inb_p + +#endif
arch/arm/mach-footbridge/Kconfig +2 -0
@@ -4,6 +4,7 @@ menu "Footbridge Implementations" config ARCH_CATS bool "CATS" + select CLKSRC_I8253 select FOOTBRIDGE_HOST select ISA select ISA_DMA
@@ -59,6 +60,7 @@ config ARCH_EBSA285_HOST config ARCH_NETWINDER bool "NetWinder" + select CLKSRC_I8253 select FOOTBRIDGE_HOST select ISA select ISA_DMA
arch/arm/mach-footbridge/isa-timer.c +4 -41
64 lines not on this page · raw message
include/linux/clocksource.h +2 -0
@@ -341,4 +341,6 @@ static inline void update_vsyscall_tz(void)extern void timekeeping_notify (struct clocksource *clock); +extern int clocksource_i8253_init (void ); +#endif /* _LINUX_CLOCKSOURCE_H */
Signature · 1 line
1.7.4.4