OMAP: Add new function to check wether there is irq pending
[linux-ginger.git] / arch / sh / boards / mach-dreamcast / setup.c
blobd1bee4884cd667da313e0105e490cd2b5a5e6750
1 /*
2 * arch/sh/boards/dreamcast/setup.c
4 * Hardware support for the Sega Dreamcast.
6 * Copyright (c) 2001, 2002 M. R. Brown <mrbrown@linuxdc.org>
7 * Copyright (c) 2002, 2003, 2004 Paul Mundt <lethal@linux-sh.org>
9 * This file is part of the LinuxDC project (www.linuxdc.org)
11 * Released under the terms of the GNU GPL v2.0.
13 * This file originally bore the message (with enclosed-$):
14 * Id: setup_dc.c,v 1.5 2001/05/24 05:09:16 mrbrown Exp
15 * SEGA Dreamcast support
18 #include <linux/sched.h>
19 #include <linux/kernel.h>
20 #include <linux/param.h>
21 #include <linux/interrupt.h>
22 #include <linux/init.h>
23 #include <linux/irq.h>
24 #include <linux/device.h>
25 #include <asm/io.h>
26 #include <asm/irq.h>
27 #include <asm/rtc.h>
28 #include <asm/machvec.h>
29 #include <mach/sysasic.h>
31 extern struct irq_chip systemasic_int;
32 extern void aica_time_init(void);
33 extern int gapspci_init(void);
34 extern int systemasic_irq_demux(int);
36 static void __init dreamcast_setup(char **cmdline_p)
38 int i;
40 /* Mask all hardware events */
41 /* XXX */
43 /* Acknowledge any previous events */
44 /* XXX */
46 __set_io_port_base(0xa0000000);
48 /* Assign all virtual IRQs to the System ASIC int. handler */
49 for (i = HW_EVENT_IRQ_BASE; i < HW_EVENT_IRQ_MAX; i++)
50 set_irq_chip_and_handler(i, &systemasic_int,
51 handle_level_irq);
53 board_time_init = aica_time_init;
55 #ifdef CONFIG_PCI
56 if (gapspci_init() < 0)
57 printk(KERN_WARNING "GAPSPCI was not detected.\n");
58 #endif
61 static struct sh_machine_vector mv_dreamcast __initmv = {
62 .mv_name = "Sega Dreamcast",
63 .mv_setup = dreamcast_setup,
64 .mv_irq_demux = systemasic_irq_demux,