aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/dreamcast/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boards/dreamcast/setup.c')
-rw-r--r--arch/sh/boards/dreamcast/setup.c83
1 files changed, 83 insertions, 0 deletions
diff --git a/arch/sh/boards/dreamcast/setup.c b/arch/sh/boards/dreamcast/setup.c
new file mode 100644
index 000000000000..55dece35cde5
--- /dev/null
+++ b/arch/sh/boards/dreamcast/setup.c
@@ -0,0 +1,83 @@
1/*
2 * arch/sh/boards/dreamcast/setup.c
3 *
4 * Hardware support for the Sega Dreamcast.
5 *
6 * Copyright (c) 2001, 2002 M. R. Brown <mrbrown@linuxdc.org>
7 * Copyright (c) 2002, 2003, 2004 Paul Mundt <lethal@linux-sh.org>
8 *
9 * This file is part of the LinuxDC project (www.linuxdc.org)
10 *
11 * Released under the terms of the GNU GPL v2.0.
12 *
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
16 */
17
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
26#include <asm/io.h>
27#include <asm/irq.h>
28#include <asm/machvec.h>
29#include <asm/machvec_init.h>
30#include <asm/mach/sysasic.h>
31
32extern struct hw_interrupt_type systemasic_int;
33/* XXX: Move this into it's proper header. */
34extern void (*board_time_init)(void);
35extern void aica_time_init(void);
36extern int gapspci_init(void);
37extern int systemasic_irq_demux(int);
38
39void *dreamcast_consistent_alloc(struct device *, size_t, dma_addr_t *, int);
40int dreamcast_consistent_free(struct device *, size_t, void *, dma_addr_t);
41
42const char *get_system_type(void)
43{
44 return "Sega Dreamcast";
45}
46
47struct sh_machine_vector mv_dreamcast __initmv = {
48 .mv_nr_irqs = NR_IRQS,
49
50 .mv_irq_demux = systemasic_irq_demux,
51
52#ifdef CONFIG_PCI
53 .mv_consistent_alloc = dreamcast_consistent_alloc,
54 .mv_consistent_free = dreamcast_consistent_free,
55#endif
56};
57ALIAS_MV(dreamcast)
58
59int __init platform_setup(void)
60{
61 int i;
62
63 /* Mask all hardware events */
64 /* XXX */
65
66 /* Acknowledge any previous events */
67 /* XXX */
68
69 __set_io_port_base(0xa0000000);
70
71 /* Assign all virtual IRQs to the System ASIC int. handler */
72 for (i = HW_EVENT_IRQ_BASE; i < HW_EVENT_IRQ_MAX; i++)
73 irq_desc[i].handler = &systemasic_int;
74
75 board_time_init = aica_time_init;
76
77#ifdef CONFIG_PCI
78 if (gapspci_init() < 0)
79 printk(KERN_WARNING "GAPSPCI was not detected.\n");
80#endif
81
82 return 0;
83}