2 * linux/arch/arm/mach-shark/arch.c
4 * Architecture specific stuff.
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>
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
));
33 #define HZ_TIME ((1193180 + HZ/2) / HZ)
36 shark_timer_interrupt(int irq
, void *dev_id
, struct pt_regs
*regs
)
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)
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)
69 INITIRQ(shark_init_irq
)
70 INITTIME(shark_init_time
)