blob: 68d7cf609b4fcabd36396ec85c4838b203ff1f89 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
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 *
Ralf Baechlefcdb27a2006-01-18 17:37:07 +00008 * Copyright (C) 1996, 97, 98, 2000, 03, 04, 06 Ralf Baechle (ralf@linux-mips.org)
Thomas Bogendoerferc066a322006-12-28 18:22:32 +01009 * Copyright (C) 2006 Thomas Bogendoerfer (tsbogend@alpha.franken.de)
Linus Torvalds1da177e2005-04-16 15:20:36 -070010 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070011#include <linux/eisa.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070012#include <linux/init.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <linux/console.h>
14#include <linux/fb.h>
Jon Smirl894673e2006-07-10 04:44:13 -070015#include <linux/screen_info.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070016
Thomas Bogendoerfer4a0312f2006-06-13 13:59:01 +020017#ifdef CONFIG_ARC
Linus Torvalds1da177e2005-04-16 15:20:36 -070018#include <asm/arc/types.h>
19#include <asm/sgialib.h>
Thomas Bogendoerfer4a0312f2006-06-13 13:59:01 +020020#endif
21
Linus Torvalds1da177e2005-04-16 15:20:36 -070022#include <asm/io.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070023#include <asm/reboot.h>
24#include <asm/sni.h>
Thomas Bogendoerferc066a322006-12-28 18:22:32 +010025
26unsigned int sni_brd_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -070027
28extern void sni_machine_restart(char *command);
29extern void sni_machine_halt(void);
30extern void sni_machine_power_off(void);
31
Linus Torvalds1da177e2005-04-16 15:20:36 -070032static void __init sni_display_setup(void)
33{
Thomas Bogendoerfer4a0312f2006-06-13 13:59:01 +020034#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE) && defined(CONFIG_ARC)
Linus Torvalds1da177e2005-04-16 15:20:36 -070035 struct screen_info *si = &screen_info;
36 DISPLAY_STATUS *di;
37
38 di = ArcGetDisplayStatus(1);
39
40 if (di) {
41 si->orig_x = di->CursorXPosition;
42 si->orig_y = di->CursorYPosition;
43 si->orig_video_cols = di->CursorMaxXPosition;
44 si->orig_video_lines = di->CursorMaxYPosition;
45 si->orig_video_isVGA = VIDEO_TYPE_VGAC;
46 si->orig_video_points = 16;
47 }
48#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070049}
50
Linus Torvalds1da177e2005-04-16 15:20:36 -070051
Ralf Baechle2925aba2006-06-18 01:32:22 +010052void __init plat_mem_setup(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070053{
Linus Torvalds1da177e2005-04-16 15:20:36 -070054 set_io_port_base(SNI_PORT_BASE);
Thomas Bogendoerferc066a322006-12-28 18:22:32 +010055// ioport_resource.end = sni_io_resource.end;
Linus Torvalds1da177e2005-04-16 15:20:36 -070056
57 /*
58 * Setup (E)ISA I/O memory access stuff
59 */
60 isa_slot_offset = 0xb0000000;
61#ifdef CONFIG_EISA
62 EISA_bus = 1;
63#endif
64
Thomas Bogendoerferc066a322006-12-28 18:22:32 +010065 switch (sni_brd_type) {
66 case SNI_BRD_10:
67 case SNI_BRD_10NEW:
68 case SNI_BRD_TOWER_OASIC:
69 case SNI_BRD_MINITOWER:
70 sni_a20r_init();
71 break;
72
73 case SNI_BRD_PCI_TOWER:
74 case SNI_BRD_PCI_TOWER_CPLUS:
75 sni_pcit_init();
76 break;
77
78 case SNI_BRD_RM200:
79 sni_rm200_init();
80 break;
81
82 case SNI_BRD_PCI_MTOWER:
83 case SNI_BRD_PCI_DESKTOP:
84 case SNI_BRD_PCI_MTOWER_CPLUS:
85 sni_pcimt_init();
86 break;
87 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070088
89 _machine_restart = sni_machine_restart;
90 _machine_halt = sni_machine_halt;
Ralf Baechlefcdb27a2006-01-18 17:37:07 +000091 pm_power_off = sni_machine_power_off;
Linus Torvalds1da177e2005-04-16 15:20:36 -070092
93 sni_display_setup();
Linus Torvalds1da177e2005-04-16 15:20:36 -070094}