Linux-2.6.12-rc2
[linux-2.6/next.git] / arch / mips / vr4181 / osprey / setup.c
blob2ff7140e7ed79d8fe8982064e300dce92b034351
1 /*
2 * linux/arch/mips/vr4181/setup.c
4 * VR41xx setup routines
6 * Copyright (C) 1999 Bradley D. LaRonde
7 * Copyright (C) 1999, 2000 Michael Klar
9 * Copyright 2001 MontaVista Software Inc.
10 * Author: jsun@mvista.com or jsun@junsun.net
11 * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org)
13 * This file is subject to the terms and conditions of the GNU General Public
14 * License. See the file "COPYING" in the main directory of this archive
15 * for more details.
19 #include <linux/ide.h>
20 #include <linux/init.h>
21 #include <linux/delay.h>
22 #include <asm/reboot.h>
23 #include <asm/vr4181/vr4181.h>
24 #include <asm/io.h>
27 extern void nec_osprey_restart(char* c);
28 extern void nec_osprey_halt(void);
29 extern void nec_osprey_power_off(void);
31 extern void vr4181_init_serial(void);
32 extern void vr4181_init_time(void);
34 static void __init nec_osprey_setup(void)
36 set_io_port_base(VR4181_PORT_BASE);
37 isa_slot_offset = VR4181_ISAMEM_BASE;
39 vr4181_init_serial();
40 vr4181_init_time();
42 _machine_restart = nec_osprey_restart;
43 _machine_halt = nec_osprey_halt;
44 _machine_power_off = nec_osprey_power_off;
46 /* setup resource limit */
47 ioport_resource.end = 0xffffffff;
48 iomem_resource.end = 0xffffffff;
50 /* [jsun] hack */
52 printk("[jsun] hack to change external ISA control register, %x -> %x\n",
53 (*VR4181_XISACTL),
54 (*VR4181_XISACTL) | 0x2);
55 *VR4181_XISACTL |= 0x2;
58 // *VR4181_GPHIBSTH = 0x2000;
59 // *VR4181_GPMD0REG = 0x00c0;
60 // *VR4181_GPINTEN = 1<<6;
62 /* [jsun] I believe this will get the interrupt type right
63 * for the ether port.
65 *VR4181_GPINTTYPL = 0x3000;
68 early_initcall(nec_osprey_setup);