2 * Setup pointers to hardware-dependent routines.
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
8 * Copyright (C) 1996, 97, 98, 2000, 03, 04, 06 Ralf Baechle (ralf@linux-mips.org)
9 * Copyright (C) 2006,2007 Thomas Bogendoerfer (tsbogend@alpha.franken.de)
11 #include <linux/eisa.h>
12 #include <linux/init.h>
13 #include <linux/console.h>
15 #include <linux/screen_info.h>
18 #include <asm/arc/types.h>
19 #include <asm/sgialib.h>
23 #include <asm/reboot.h>
26 unsigned int sni_brd_type;
28 extern void sni_machine_restart(char *command);
29 extern void sni_machine_power_off(void);
31 static void __init sni_display_setup(void)
33 #if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE) && defined(CONFIG_ARC)
34 struct screen_info *si = &screen_info;
37 di = ArcGetDisplayStatus(1);
40 si->orig_x = di->CursorXPosition;
41 si->orig_y = di->CursorYPosition;
42 si->orig_video_cols = di->CursorMaxXPosition;
43 si->orig_video_lines = di->CursorMaxYPosition;
44 si->orig_video_isVGA = VIDEO_TYPE_VGAC;
45 si->orig_video_points = 16;
51 void __init plat_mem_setup(void)
53 set_io_port_base(SNI_PORT_BASE);
54 // ioport_resource.end = sni_io_resource.end;
57 * Setup (E)ISA I/O memory access stuff
59 isa_slot_offset = 0xb0000000;
64 switch (sni_brd_type) {
67 case SNI_BRD_TOWER_OASIC:
68 case SNI_BRD_MINITOWER:
72 case SNI_BRD_PCI_TOWER:
73 case SNI_BRD_PCI_TOWER_CPLUS:
81 case SNI_BRD_PCI_MTOWER:
82 case SNI_BRD_PCI_DESKTOP:
83 case SNI_BRD_PCI_MTOWER_CPLUS:
88 _machine_restart = sni_machine_restart;
89 pm_power_off = sni_machine_power_off;
96 #include <linux/pci.h>
97 #include <video/vga.h>
98 #include <video/cirrus.h>
100 static void __devinit quirk_cirrus_ram_size(struct pci_dev *dev)
105 * firmware doesn't set the ram size correct, so we
106 * need to do it here, otherwise we get screen corruption
107 * on older Cirrus chips
109 pci_read_config_word (dev, PCI_COMMAND, &cmd);
110 if ((cmd & (PCI_COMMAND_IO|PCI_COMMAND_MEMORY))
111 == (PCI_COMMAND_IO|PCI_COMMAND_MEMORY)) {
112 vga_wseq (NULL, CL_SEQR6, 0x12); /* unlock all extension registers */
113 vga_wseq (NULL, CL_SEQRF, 0x18);
117 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_5434_8,
118 quirk_cirrus_ram_size);
119 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_5436,
120 quirk_cirrus_ram_size);
121 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_5446,
122 quirk_cirrus_ram_size);