Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | * |
Ralf Baechle | fcdb27a | 2006-01-18 17:37:07 +0000 | [diff] [blame] | 8 | * Copyright (C) 1996, 97, 98, 2000, 03, 04, 06 Ralf Baechle (ralf@linux-mips.org) |
Thomas Bogendoerfer | c066a32 | 2006-12-28 18:22:32 +0100 | [diff] [blame^] | 9 | * Copyright (C) 2006 Thomas Bogendoerfer (tsbogend@alpha.franken.de) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | #include <linux/eisa.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | #include <linux/init.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | #include <linux/console.h> |
| 14 | #include <linux/fb.h> |
Jon Smirl | 894673e | 2006-07-10 04:44:13 -0700 | [diff] [blame] | 15 | #include <linux/screen_info.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | |
Thomas Bogendoerfer | 4a0312f | 2006-06-13 13:59:01 +0200 | [diff] [blame] | 17 | #ifdef CONFIG_ARC |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | #include <asm/arc/types.h> |
| 19 | #include <asm/sgialib.h> |
Thomas Bogendoerfer | 4a0312f | 2006-06-13 13:59:01 +0200 | [diff] [blame] | 20 | #endif |
| 21 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | #include <asm/io.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | #include <asm/reboot.h> |
| 24 | #include <asm/sni.h> |
Thomas Bogendoerfer | c066a32 | 2006-12-28 18:22:32 +0100 | [diff] [blame^] | 25 | |
| 26 | unsigned int sni_brd_type; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | |
| 28 | extern void sni_machine_restart(char *command); |
| 29 | extern void sni_machine_halt(void); |
| 30 | extern void sni_machine_power_off(void); |
| 31 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | static void __init sni_display_setup(void) |
| 33 | { |
Thomas Bogendoerfer | 4a0312f | 2006-06-13 13:59:01 +0200 | [diff] [blame] | 34 | #if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE) && defined(CONFIG_ARC) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | 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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | } |
| 50 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | |
Ralf Baechle | 2925aba | 2006-06-18 01:32:22 +0100 | [diff] [blame] | 52 | void __init plat_mem_setup(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 54 | set_io_port_base(SNI_PORT_BASE); |
Thomas Bogendoerfer | c066a32 | 2006-12-28 18:22:32 +0100 | [diff] [blame^] | 55 | // ioport_resource.end = sni_io_resource.end; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 56 | |
| 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 Bogendoerfer | c066a32 | 2006-12-28 18:22:32 +0100 | [diff] [blame^] | 65 | 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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 88 | |
| 89 | _machine_restart = sni_machine_restart; |
| 90 | _machine_halt = sni_machine_halt; |
Ralf Baechle | fcdb27a | 2006-01-18 17:37:07 +0000 | [diff] [blame] | 91 | pm_power_off = sni_machine_power_off; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 92 | |
| 93 | sni_display_setup(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 94 | } |