]>
Commit | Line | Data |
---|---|---|
1da177e4 LT |
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 | * | |
8 | * Copyright (C) 1996, 1997, 1998, 2001 by Ralf Baechle | |
9 | * Copyright (C) 2001 MIPS Technologies, Inc. | |
10 | */ | |
11 | #include <linux/config.h> | |
12 | #include <linux/eisa.h> | |
13 | #include <linux/hdreg.h> | |
14 | #include <linux/init.h> | |
15 | #include <linux/ioport.h> | |
16 | #include <linux/sched.h> | |
17 | #include <linux/interrupt.h> | |
18 | #include <linux/mm.h> | |
19 | #include <linux/console.h> | |
20 | #include <linux/fb.h> | |
21 | #include <linux/ide.h> | |
22 | #include <asm/bootinfo.h> | |
23 | #include <asm/irq.h> | |
24 | #include <asm/jazz.h> | |
25 | #include <asm/jazzdma.h> | |
26 | #include <asm/ptrace.h> | |
27 | #include <asm/reboot.h> | |
28 | #include <asm/io.h> | |
29 | #include <asm/pgtable.h> | |
30 | #include <asm/time.h> | |
31 | #include <asm/traps.h> | |
32 | ||
33 | extern asmlinkage void jazz_handle_int(void); | |
34 | ||
35 | extern void jazz_machine_restart(char *command); | |
36 | extern void jazz_machine_halt(void); | |
37 | extern void jazz_machine_power_off(void); | |
38 | ||
39 | static void __init jazz_time_init(struct irqaction *irq) | |
40 | { | |
41 | /* set the clock to 100 Hz */ | |
42 | r4030_write_reg32(JAZZ_TIMER_INTERVAL, 9); | |
43 | setup_irq(JAZZ_TIMER_IRQ, irq); | |
44 | } | |
45 | ||
46 | static struct resource jazz_io_resources[] = { | |
47 | { "dma1", 0x00, 0x1f, IORESOURCE_BUSY }, | |
48 | { "timer", 0x40, 0x5f, IORESOURCE_BUSY }, | |
49 | { "dma page reg", 0x80, 0x8f, IORESOURCE_BUSY }, | |
50 | { "dma2", 0xc0, 0xdf, IORESOURCE_BUSY }, | |
51 | }; | |
52 | ||
c83cfc9c | 53 | void __init plat_setup(void) |
1da177e4 LT |
54 | { |
55 | int i; | |
56 | ||
57 | /* Map 0xe0000000 -> 0x0:800005C0, 0xe0010000 -> 0x1:30000580 */ | |
58 | add_wired_entry (0x02000017, 0x03c00017, 0xe0000000, PM_64K); | |
59 | ||
60 | /* Map 0xe2000000 -> 0x0:900005C0, 0xe3010000 -> 0x0:910005C0 */ | |
61 | add_wired_entry (0x02400017, 0x02440017, 0xe2000000, PM_16M); | |
62 | ||
63 | /* Map 0xe4000000 -> 0x0:600005C0, 0xe4100000 -> 400005C0 */ | |
64 | add_wired_entry (0x01800017, 0x01000017, 0xe4000000, PM_4M); | |
65 | ||
66 | set_io_port_base(JAZZ_PORT_BASE); | |
67 | #ifdef CONFIG_EISA | |
68 | if (mips_machtype == MACH_MIPS_MAGNUM_4000) | |
69 | EISA_bus = 1; | |
70 | #endif | |
71 | isa_slot_offset = 0xe3000000; | |
72 | ||
73 | /* request I/O space for devices used on all i[345]86 PCs */ | |
74 | for (i = 0; i < ARRAY_SIZE(jazz_io_resources); i++) | |
75 | request_resource(&ioport_resource, jazz_io_resources + i); | |
76 | ||
77 | board_timer_setup = jazz_time_init; | |
78 | /* The RTC is outside the port address space */ | |
79 | ||
80 | _machine_restart = jazz_machine_restart; | |
81 | _machine_halt = jazz_machine_halt; | |
82 | _machine_power_off = jazz_machine_power_off; | |
83 | ||
84 | #warning "Somebody should check if screen_info is ok for Jazz." | |
85 | ||
86 | screen_info = (struct screen_info) { | |
87 | 0, 0, /* orig-x, orig-y */ | |
88 | 0, /* unused */ | |
89 | 0, /* orig_video_page */ | |
90 | 0, /* orig_video_mode */ | |
91 | 160, /* orig_video_cols */ | |
92 | 0, 0, 0, /* unused, ega_bx, unused */ | |
93 | 64, /* orig_video_lines */ | |
94 | 0, /* orig_video_isVGA */ | |
95 | 16 /* orig_video_points */ | |
96 | }; | |
97 | ||
98 | vdma_init(); | |
99 | } |