initial commit with v2.6.9
[linux-2.6.9-moxart.git] / arch / arm / mach-shark / core.c
blobe4ae688899c12054589140d8fdd825c4f815fcae
1 /*
2 * linux/arch/arm/mach-shark/arch.c
4 * Architecture specific stuff.
5 */
6 #include <linux/kernel.h>
7 #include <linux/init.h>
8 #include <linux/interrupt.h>
9 #include <linux/sched.h>
11 #include <asm/setup.h>
12 #include <asm/mach-types.h>
13 #include <asm/io.h>
14 #include <asm/leds.h>
15 #include <asm/param.h>
17 #include <asm/mach/map.h>
18 #include <asm/mach/arch.h>
19 #include <asm/mach/time.h>
21 extern void shark_init_irq(void);
23 static struct map_desc shark_io_desc[] __initdata = {
24 { IO_BASE , IO_START , IO_SIZE , MT_DEVICE }
27 static void __init shark_map_io(void)
29 iotable_init(shark_io_desc, ARRAY_SIZE(shark_io_desc));
32 #define IRQ_TIMER 0
33 #define HZ_TIME ((1193180 + HZ/2) / HZ)
35 static irqreturn_t
36 shark_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
38 timer_tick(regs);
40 return IRQ_HANDLED;
43 static struct irqaction shark_timer_irq = {
44 .name = "Shark Timer Tick",
45 .flags = SA_INTERRUPT,
46 .handler = shark_timer_interrupt
50 * Set up timer interrupt, and return the current time in seconds.
52 void __init shark_init_time(void)
54 unsigned long flags;
56 outb(0x34, 0x43); /* binary, mode 0, LSB/MSB, Ch 0 */
57 outb(HZ_TIME & 0xff, 0x40); /* LSB of count */
58 outb(HZ_TIME >> 8, 0x40);
60 setup_irq(IRQ_TIMER, &shark_timer_irq);
64 MACHINE_START(SHARK, "Shark")
65 MAINTAINER("Alexander Schulz")
66 BOOT_MEM(0x08000000, 0x40000000, 0xe0000000)
67 BOOT_PARAMS(0x08003000)
68 MAPIO(shark_map_io)
69 INITIRQ(shark_init_irq)
70 INITTIME(shark_init_time)
71 MACHINE_END