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, 1997, 1998, 2000 by Ralf Baechle
10 #include <asm/ptrace.h>
11 #include <linux/config.h>
12 #include <linux/hdreg.h>
13 #include <linux/ioport.h>
14 #include <linux/sched.h>
15 #include <linux/init.h>
16 #include <linux/interrupt.h>
17 #include <linux/timex.h>
18 #include <linux/pci.h>
19 #include <linux/mc146818rtc.h>
20 #include <linux/console.h>
22 #include <linux/ide.h>
24 #include <asm/bcache.h>
25 #include <asm/bootinfo.h>
28 #include <asm/processor.h>
29 #include <asm/reboot.h>
32 #include <asm/traps.h>
34 extern void sni_machine_restart(char *command
);
35 extern void sni_machine_halt(void);
36 extern void sni_machine_power_off(void);
38 extern struct ide_ops std_ide_ops
;
39 extern struct rtc_ops std_rtc_ops
;
41 static void __init
sni_rm200_pci_timer_setup(struct irqaction
*irq
)
43 /* set the clock to 100 Hz */
44 outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */
45 outb_p(LATCH
& 0xff , 0x40); /* LSB */
46 outb(LATCH
>> 8 , 0x40); /* MSB */
51 extern unsigned char sni_map_isa_cache
;
54 * A bit more gossip about the iron we're running on ...
56 static inline void sni_pcimt_detect(void)
63 csmsr
= *(volatile unsigned char *)PCIMT_CSMSR
;
65 p
+= sprintf(p
, "%s PCI", (csmsr
& 0x80) ? "RM200" : "RM300");
66 if ((csmsr
& 0x80) == 0)
67 p
+= sprintf(p
, ", board revision %s",
68 (csmsr
& 0x20) ? "D" : "C");
70 asic
= (csmsr
& 0x08) ? asic
: !asic
;
71 p
+= sprintf(p
, ", ASIC PCI Rev %s", asic
? "1.0" : "1.1");
72 printk("%s.\n", boardtype
);
75 void __init
sni_rm200_pci_setup(void)
80 set_io_port_base(SNI_PORT_BASE
);
83 * Setup (E)ISA I/O memory access stuff
85 isa_slot_offset
= 0xb0000000;
86 // sni_map_isa_cache = 0;
89 request_region(0x00,0x20,"dma1");
90 request_region(0x40,0x20,"timer");
91 /* XXX FIXME: CONFIG_RTC */
92 request_region(0x70,0x10,"rtc");
93 request_region(0x80,0x10,"dma page reg");
94 request_region(0xc0,0x20,"dma2");
95 board_timer_setup
= sni_rm200_pci_timer_setup
;
97 _machine_restart
= sni_machine_restart
;
98 _machine_halt
= sni_machine_halt
;
99 _machine_power_off
= sni_machine_power_off
;
102 * Some cluefull person has placed the PCI config data directly in
103 * the I/O port space ...
105 request_region(0xcfc,0x04,"PCI config data");
107 #ifdef CONFIG_BLK_DEV_IDE
108 ide_ops
= &std_ide_ops
;
110 conswitchp
= &vga_con
;
112 screen_info
= (struct screen_info
) {
113 0, 0, /* orig-x, orig-y */
115 52, /* orig_video_page */
116 3, /* orig_video_mode */
117 80, /* orig_video_cols */
118 4626, 3, 9, /* unused, ega_bx, unused */
119 50, /* orig_video_lines */
120 0x22, /* orig_video_isVGA */
121 16 /* orig_video_points */
124 rtc_ops
= &std_rtc_ops
;