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, 2001 by Ralf Baechle
9 * Copyright (C) 2001 MIPS Technologies, Inc.
11 #include <linux/eisa.h>
12 #include <linux/hdreg.h>
13 #include <linux/init.h>
14 #include <linux/ioport.h>
15 #include <linux/sched.h>
16 #include <linux/interrupt.h>
18 #include <linux/console.h>
20 #include <linux/ide.h>
22 #include <linux/screen_info.h>
24 #include <asm/bootinfo.h>
27 #include <asm/jazzdma.h>
28 #include <asm/reboot.h>
30 #include <asm/pgtable.h>
32 #include <asm/traps.h>
34 extern asmlinkage void jazz_handle_int(void);
36 extern void jazz_machine_restart(char *command);
37 extern void jazz_machine_halt(void);
38 extern void jazz_machine_power_off(void);
40 void __init plat_timer_setup(struct irqaction *irq)
42 /* set the clock to 100 Hz */
43 r4030_write_reg32(JAZZ_TIMER_INTERVAL, 9);
44 setup_irq(JAZZ_TIMER_IRQ, irq);
47 static struct resource jazz_io_resources[] = {
52 .flags = IORESOURCE_BUSY
57 .end = IORESOURCE_BUSY
61 .name = "dma page reg",
62 .flags = IORESOURCE_BUSY
67 .flags = IORESOURCE_BUSY
71 void __init plat_mem_setup(void)
75 /* Map 0xe0000000 -> 0x0:800005C0, 0xe0010000 -> 0x1:30000580 */
76 add_wired_entry (0x02000017, 0x03c00017, 0xe0000000, PM_64K);
78 /* Map 0xe2000000 -> 0x0:900005C0, 0xe3010000 -> 0x0:910005C0 */
79 add_wired_entry (0x02400017, 0x02440017, 0xe2000000, PM_16M);
81 /* Map 0xe4000000 -> 0x0:600005C0, 0xe4100000 -> 400005C0 */
82 add_wired_entry (0x01800017, 0x01000017, 0xe4000000, PM_4M);
84 set_io_port_base(JAZZ_PORT_BASE);
86 if (mips_machtype == MACH_MIPS_MAGNUM_4000)
89 isa_slot_offset = 0xe3000000;
91 /* request I/O space for devices used on all i[345]86 PCs */
92 for (i = 0; i < ARRAY_SIZE(jazz_io_resources); i++)
93 request_resource(&ioport_resource, jazz_io_resources + i);
95 /* The RTC is outside the port address space */
97 _machine_restart = jazz_machine_restart;
98 _machine_halt = jazz_machine_halt;
99 pm_power_off = jazz_machine_power_off;
101 screen_info = (struct screen_info) {
102 0, 0, /* orig-x, orig-y */
104 0, /* orig_video_page */
105 0, /* orig_video_mode */
106 160, /* orig_video_cols */
107 0, 0, 0, /* unused, ega_bx, unused */
108 64, /* orig_video_lines */
109 0, /* orig_video_isVGA */
110 16 /* orig_video_points */