setup.c 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. * Setup pointers to hardware-dependent routines.
  3. *
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. *
  8. * Copyright (C) 1996, 97, 98, 2000, 03, 04, 06 Ralf Baechle (ralf@linux-mips.org)
  9. * Copyright (C) 2006 Thomas Bogendoerfer (tsbogend@alpha.franken.de)
  10. */
  11. #include <linux/eisa.h>
  12. #include <linux/init.h>
  13. #include <linux/console.h>
  14. #include <linux/fb.h>
  15. #include <linux/screen_info.h>
  16. #ifdef CONFIG_ARC
  17. #include <asm/arc/types.h>
  18. #include <asm/sgialib.h>
  19. #endif
  20. #include <asm/io.h>
  21. #include <asm/reboot.h>
  22. #include <asm/sni.h>
  23. unsigned int sni_brd_type;
  24. extern void sni_machine_restart(char *command);
  25. extern void sni_machine_halt(void);
  26. extern void sni_machine_power_off(void);
  27. static void __init sni_display_setup(void)
  28. {
  29. #if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE) && defined(CONFIG_ARC)
  30. struct screen_info *si = &screen_info;
  31. DISPLAY_STATUS *di;
  32. di = ArcGetDisplayStatus(1);
  33. if (di) {
  34. si->orig_x = di->CursorXPosition;
  35. si->orig_y = di->CursorYPosition;
  36. si->orig_video_cols = di->CursorMaxXPosition;
  37. si->orig_video_lines = di->CursorMaxYPosition;
  38. si->orig_video_isVGA = VIDEO_TYPE_VGAC;
  39. si->orig_video_points = 16;
  40. }
  41. #endif
  42. }
  43. void __init plat_mem_setup(void)
  44. {
  45. set_io_port_base(SNI_PORT_BASE);
  46. // ioport_resource.end = sni_io_resource.end;
  47. /*
  48. * Setup (E)ISA I/O memory access stuff
  49. */
  50. isa_slot_offset = 0xb0000000;
  51. #ifdef CONFIG_EISA
  52. EISA_bus = 1;
  53. #endif
  54. switch (sni_brd_type) {
  55. case SNI_BRD_10:
  56. case SNI_BRD_10NEW:
  57. case SNI_BRD_TOWER_OASIC:
  58. case SNI_BRD_MINITOWER:
  59. sni_a20r_init();
  60. break;
  61. case SNI_BRD_PCI_TOWER:
  62. case SNI_BRD_PCI_TOWER_CPLUS:
  63. sni_pcit_init();
  64. break;
  65. case SNI_BRD_RM200:
  66. sni_rm200_init();
  67. break;
  68. case SNI_BRD_PCI_MTOWER:
  69. case SNI_BRD_PCI_DESKTOP:
  70. case SNI_BRD_PCI_MTOWER_CPLUS:
  71. sni_pcimt_init();
  72. break;
  73. }
  74. _machine_restart = sni_machine_restart;
  75. _machine_halt = sni_machine_halt;
  76. pm_power_off = sni_machine_power_off;
  77. sni_display_setup();
  78. }