diff options
Diffstat (limited to 'arch/mips/sni/setup.c')
-rw-r--r-- | arch/mips/sni/setup.c | 135 |
1 files changed, 110 insertions, 25 deletions
diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c index 01ba6c581e3d..a050bb6ae704 100644 --- a/arch/mips/sni/setup.c +++ b/arch/mips/sni/setup.c | |||
@@ -21,8 +21,11 @@ | |||
21 | #include <linux/fb.h> | 21 | #include <linux/fb.h> |
22 | #include <linux/tty.h> | 22 | #include <linux/tty.h> |
23 | 23 | ||
24 | #ifdef CONFIG_ARC | ||
24 | #include <asm/arc/types.h> | 25 | #include <asm/arc/types.h> |
25 | #include <asm/sgialib.h> | 26 | #include <asm/sgialib.h> |
27 | #endif | ||
28 | |||
26 | #include <asm/bcache.h> | 29 | #include <asm/bcache.h> |
27 | #include <asm/bootinfo.h> | 30 | #include <asm/bootinfo.h> |
28 | #include <asm/io.h> | 31 | #include <asm/io.h> |
@@ -72,8 +75,7 @@ static inline void sni_pcimt_detect(void) | |||
72 | 75 | ||
73 | static void __init sni_display_setup(void) | 76 | static void __init sni_display_setup(void) |
74 | { | 77 | { |
75 | #ifdef CONFIG_VT | 78 | #if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE) && defined(CONFIG_ARC) |
76 | #if defined(CONFIG_VGA_CONSOLE) | ||
77 | struct screen_info *si = &screen_info; | 79 | struct screen_info *si = &screen_info; |
78 | DISPLAY_STATUS *di; | 80 | DISPLAY_STATUS *di; |
79 | 81 | ||
@@ -88,24 +90,54 @@ static void __init sni_display_setup(void) | |||
88 | si->orig_video_points = 16; | 90 | si->orig_video_points = 16; |
89 | } | 91 | } |
90 | #endif | 92 | #endif |
91 | #endif | ||
92 | } | 93 | } |
93 | 94 | ||
94 | static struct resource sni_io_resource = { | 95 | static struct resource sni_io_resource = { |
95 | "PCIMT IO MEM", 0x00001000UL, 0x03bfffffUL, IORESOURCE_IO, | 96 | .start = 0x00001000UL, |
97 | .end = 0x03bfffffUL, | ||
98 | .name = "PCIMT IO MEM", | ||
99 | .flags = IORESOURCE_IO, | ||
96 | }; | 100 | }; |
97 | 101 | ||
98 | static struct resource pcimt_io_resources[] = { | 102 | static struct resource pcimt_io_resources[] = { |
99 | { "dma1", 0x00, 0x1f, IORESOURCE_BUSY }, | 103 | { |
100 | { "timer", 0x40, 0x5f, IORESOURCE_BUSY }, | 104 | .start = 0x00, |
101 | { "keyboard", 0x60, 0x6f, IORESOURCE_BUSY }, | 105 | .end = 0x1f, |
102 | { "dma page reg", 0x80, 0x8f, IORESOURCE_BUSY }, | 106 | .name = "dma1", |
103 | { "dma2", 0xc0, 0xdf, IORESOURCE_BUSY }, | 107 | .flags = IORESOURCE_BUSY |
104 | { "PCI config data", 0xcfc, 0xcff, IORESOURCE_BUSY } | 108 | }, { |
109 | .start = 0x40, | ||
110 | .end = 0x5f, | ||
111 | .name = "timer", | ||
112 | .flags = IORESOURCE_BUSY | ||
113 | }, { | ||
114 | .start = 0x60, | ||
115 | .end = 0x6f, | ||
116 | .name = "keyboard", | ||
117 | .flags = IORESOURCE_BUSY | ||
118 | }, { | ||
119 | .start = 0x80, | ||
120 | .end = 0x8f, | ||
121 | .name = "dma page reg", | ||
122 | .flags = IORESOURCE_BUSY | ||
123 | }, { | ||
124 | .start = 0xc0, | ||
125 | .end = 0xdf, | ||
126 | .name = "dma2", | ||
127 | .flags = IORESOURCE_BUSY | ||
128 | }, { | ||
129 | .start = 0xcfc, | ||
130 | .end = 0xcff, | ||
131 | .name = "PCI config data", | ||
132 | .flags = IORESOURCE_BUSY | ||
133 | } | ||
105 | }; | 134 | }; |
106 | 135 | ||
107 | static struct resource sni_mem_resource = { | 136 | static struct resource sni_mem_resource = { |
108 | "PCIMT PCI MEM", 0x10000000UL, 0xffffffffUL, IORESOURCE_MEM | 137 | .start = 0x10000000UL, |
138 | .end = 0xffffffffUL, | ||
139 | .name = "PCIMT PCI MEM", | ||
140 | .flags = IORESOURCE_MEM | ||
109 | }; | 141 | }; |
110 | 142 | ||
111 | /* | 143 | /* |
@@ -122,19 +154,72 @@ static struct resource sni_mem_resource = { | |||
122 | * 0xa0000000 - 0xffffffff (1.5GB) PCI/EISA Bus Memory | 154 | * 0xa0000000 - 0xffffffff (1.5GB) PCI/EISA Bus Memory |
123 | */ | 155 | */ |
124 | static struct resource pcimt_mem_resources[] = { | 156 | static struct resource pcimt_mem_resources[] = { |
125 | { "Video RAM area", 0x100a0000, 0x100bffff, IORESOURCE_BUSY }, | 157 | { |
126 | { "ISA Reserved", 0x100c0000, 0x100fffff, IORESOURCE_BUSY }, | 158 | .start = 0x100a0000, |
127 | { "PCI IO", 0x14000000, 0x17bfffff, IORESOURCE_BUSY }, | 159 | .end = 0x100bffff, |
128 | { "Cache Replacement Area", 0x17c00000, 0x17ffffff, IORESOURCE_BUSY}, | 160 | .name = "Video RAM area", |
129 | { "PCI INT Acknowledge", 0x1a000000, 0x1a000003, IORESOURCE_BUSY }, | 161 | .flags = IORESOURCE_BUSY |
130 | { "Boot PROM", 0x1fc00000, 0x1fc7ffff, IORESOURCE_BUSY}, | 162 | }, { |
131 | { "Diag PROM", 0x1fc80000, 0x1fcfffff, IORESOURCE_BUSY}, | 163 | .start = 0x100c0000, |
132 | { "X-Bus", 0x1fd00000, 0x1fdfffff, IORESOURCE_BUSY}, | 164 | .end = 0x100fffff, |
133 | { "BIOS map", 0x1fe00000, 0x1fefffff, IORESOURCE_BUSY}, | 165 | .name = "ISA Reserved", |
134 | { "NVRAM / EEPROM", 0x1ff00000, 0x1ff7ffff, IORESOURCE_BUSY}, | 166 | .flags = IORESOURCE_BUSY |
135 | { "ASIC PCI", 0x1fff0000, 0x1fffefff, IORESOURCE_BUSY}, | 167 | }, { |
136 | { "MP Agent", 0x1ffff000, 0x1fffffff, IORESOURCE_BUSY}, | 168 | .start = 0x14000000, |
137 | { "Main Memory", 0x20000000, 0x9fffffff, IORESOURCE_BUSY} | 169 | .end = 0x17bfffff, |
170 | .name = "PCI IO", | ||
171 | .flags = IORESOURCE_BUSY | ||
172 | }, { | ||
173 | .start = 0x17c00000, | ||
174 | .end = 0x17ffffff, | ||
175 | .name = "Cache Replacement Area", | ||
176 | .flags = IORESOURCE_BUSY | ||
177 | }, { | ||
178 | .start = 0x1a000000, | ||
179 | .end = 0x1a000003, | ||
180 | .name = "PCI INT Acknowledge", | ||
181 | .flags = IORESOURCE_BUSY | ||
182 | }, { | ||
183 | .start = 0x1fc00000, | ||
184 | .end = 0x1fc7ffff, | ||
185 | .name = "Boot PROM", | ||
186 | .flags = IORESOURCE_BUSY | ||
187 | }, { | ||
188 | .start = 0x1fc80000, | ||
189 | .end = 0x1fcfffff, | ||
190 | .name = "Diag PROM", | ||
191 | .flags = IORESOURCE_BUSY | ||
192 | }, { | ||
193 | .start = 0x1fd00000, | ||
194 | .end = 0x1fdfffff, | ||
195 | .name = "X-Bus", | ||
196 | .flags = IORESOURCE_BUSY | ||
197 | }, { | ||
198 | .start = 0x1fe00000, | ||
199 | .end = 0x1fefffff, | ||
200 | .name = "BIOS map", | ||
201 | .flags = IORESOURCE_BUSY | ||
202 | }, { | ||
203 | .start = 0x1ff00000, | ||
204 | .end = 0x1ff7ffff, | ||
205 | .name = "NVRAM / EEPROM", | ||
206 | .flags = IORESOURCE_BUSY | ||
207 | }, { | ||
208 | .start = 0x1fff0000, | ||
209 | .end = 0x1fffefff, | ||
210 | .name = "ASIC PCI", | ||
211 | .flags = IORESOURCE_BUSY | ||
212 | }, { | ||
213 | .start = 0x1ffff000, | ||
214 | .end = 0x1fffffff, | ||
215 | .name = "MP Agent", | ||
216 | .flags = IORESOURCE_BUSY | ||
217 | }, { | ||
218 | .start = 0x20000000, | ||
219 | .end = 0x9fffffff, | ||
220 | .name = "Main Memory", | ||
221 | .flags = IORESOURCE_BUSY | ||
222 | } | ||
138 | }; | 223 | }; |
139 | 224 | ||
140 | static void __init sni_resource_init(void) | 225 | static void __init sni_resource_init(void) |
@@ -168,7 +253,7 @@ static inline void sni_pcimt_time_init(void) | |||
168 | rtc_mips_set_time = mc146818_set_rtc_mmss; | 253 | rtc_mips_set_time = mc146818_set_rtc_mmss; |
169 | } | 254 | } |
170 | 255 | ||
171 | void __init plat_setup(void) | 256 | void __init plat_mem_setup(void) |
172 | { | 257 | { |
173 | sni_pcimt_detect(); | 258 | sni_pcimt_detect(); |
174 | sni_pcimt_sc_init(); | 259 | sni_pcimt_sc_init(); |