X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fsh%2Fboards%2Fdreamcast%2Fsetup.c;h=f13017eeeb27ebba6cb68571044155fcf7d6a5a0;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=c59d1599b7641cc428bd076af777e29a6ecd28af;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/arch/sh/boards/dreamcast/setup.c b/arch/sh/boards/dreamcast/setup.c index c59d1599b..f13017eee 100644 --- a/arch/sh/boards/dreamcast/setup.c +++ b/arch/sh/boards/dreamcast/setup.c @@ -1,15 +1,15 @@ -/* +/* * arch/sh/boards/dreamcast/setup.c * * Hardware support for the Sega Dreamcast. * * Copyright (c) 2001, 2002 M. R. Brown - * Copyright (c) 2002, 2003 Paul Mundt + * Copyright (c) 2002, 2003, 2004 Paul Mundt * * This file is part of the LinuxDC project (www.linuxdc.org) * * Released under the terms of the GNU GPL v2.0. - * + * * This file originally bore the message (with enclosed-$): * Id: setup_dc.c,v 1.5 2001/05/24 05:09:16 mrbrown Exp * SEGA Dreamcast support @@ -21,32 +21,22 @@ #include #include #include - +#include #include #include +#include #include -#include #include extern struct hw_interrupt_type systemasic_int; -/* XXX: Move this into it's proper header. */ -extern void (*board_time_init)(void); extern void aica_time_init(void); extern int gapspci_init(void); extern int systemasic_irq_demux(int); -const char *get_system_type(void) -{ - return "Sega Dreamcast"; -} -struct sh_machine_vector mv_dreamcast __initmv = { - .mv_nr_irqs = NR_IRQS, - - .mv_irq_demux = systemasic_irq_demux, -}; -ALIAS_MV(dreamcast) +void *dreamcast_consistent_alloc(struct device *, size_t, dma_addr_t *, gfp_t); +int dreamcast_consistent_free(struct device *, size_t, void *, dma_addr_t); -int __init platform_setup(void) +static void __init dreamcast_setup(char **cmdline_p) { int i; @@ -60,7 +50,7 @@ int __init platform_setup(void) /* Assign all virtual IRQs to the System ASIC int. handler */ for (i = HW_EVENT_IRQ_BASE; i < HW_EVENT_IRQ_MAX; i++) - irq_desc[i].handler = &systemasic_int; + irq_desc[i].chip = &systemasic_int; board_time_init = aica_time_init; @@ -68,6 +58,16 @@ int __init platform_setup(void) if (gapspci_init() < 0) printk(KERN_WARNING "GAPSPCI was not detected.\n"); #endif - - return 0; } + +struct sh_machine_vector mv_dreamcast __initmv = { + .mv_name = "Sega Dreamcast", + .mv_setup = dreamcast_setup, + .mv_irq_demux = systemasic_irq_demux, + +#ifdef CONFIG_PCI + .mv_consistent_alloc = dreamcast_consistent_alloc, + .mv_consistent_free = dreamcast_consistent_free, +#endif +}; +ALIAS_MV(dreamcast)