setup.c 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * linux/arch/mips/vr4181/setup.c
  3. *
  4. * VR41xx setup routines
  5. *
  6. * Copyright (C) 1999 Bradley D. LaRonde
  7. * Copyright (C) 1999, 2000 Michael Klar
  8. *
  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)
  12. *
  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.
  16. *
  17. */
  18. #include <linux/ide.h>
  19. #include <linux/init.h>
  20. #include <linux/delay.h>
  21. #include <asm/reboot.h>
  22. #include <asm/vr4181/vr4181.h>
  23. #include <asm/io.h>
  24. extern void nec_osprey_restart(char* c);
  25. extern void nec_osprey_halt(void);
  26. extern void nec_osprey_power_off(void);
  27. extern void vr4181_init_serial(void);
  28. extern void vr4181_init_time(void);
  29. static void __init nec_osprey_setup(void)
  30. {
  31. set_io_port_base(VR4181_PORT_BASE);
  32. isa_slot_offset = VR4181_ISAMEM_BASE;
  33. vr4181_init_serial();
  34. vr4181_init_time();
  35. _machine_restart = nec_osprey_restart;
  36. _machine_halt = nec_osprey_halt;
  37. _machine_power_off = nec_osprey_power_off;
  38. /* setup resource limit */
  39. ioport_resource.end = 0xffffffff;
  40. iomem_resource.end = 0xffffffff;
  41. /* [jsun] hack */
  42. /*
  43. printk("[jsun] hack to change external ISA control register, %x -> %x\n",
  44. (*VR4181_XISACTL),
  45. (*VR4181_XISACTL) | 0x2);
  46. *VR4181_XISACTL |= 0x2;
  47. */
  48. // *VR4181_GPHIBSTH = 0x2000;
  49. // *VR4181_GPMD0REG = 0x00c0;
  50. // *VR4181_GPINTEN = 1<<6;
  51. /* [jsun] I believe this will get the interrupt type right
  52. * for the ether port.
  53. */
  54. *VR4181_GPINTTYPL = 0x3000;
  55. }
  56. early_initcall(nec_osprey_setup);