diff options
Diffstat (limited to 'arch/m68k/mac/config.c')
-rw-r--r-- | arch/m68k/mac/config.c | 354 |
1 files changed, 222 insertions, 132 deletions
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index be017984a456..1c16b1baf8db 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/vt_kern.h> | 24 | #include <linux/vt_kern.h> |
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <linux/adb.h> | ||
27 | #include <linux/cuda.h> | ||
26 | 28 | ||
27 | #define BOOTINFO_COMPAT_1_0 | 29 | #define BOOTINFO_COMPAT_1_0 |
28 | #include <asm/setup.h> | 30 | #include <asm/setup.h> |
@@ -44,12 +46,7 @@ | |||
44 | #include <asm/mac_oss.h> | 46 | #include <asm/mac_oss.h> |
45 | #include <asm/mac_psc.h> | 47 | #include <asm/mac_psc.h> |
46 | 48 | ||
47 | /* platform device info */ | ||
48 | |||
49 | #define SWIM_IO_SIZE 0x2000 /* SWIM IO resource size */ | ||
50 | |||
51 | /* Mac bootinfo struct */ | 49 | /* Mac bootinfo struct */ |
52 | |||
53 | struct mac_booter_data mac_bi_data; | 50 | struct mac_booter_data mac_bi_data; |
54 | 51 | ||
55 | /* The phys. video addr. - might be bogus on some machines */ | 52 | /* The phys. video addr. - might be bogus on some machines */ |
@@ -70,8 +67,6 @@ extern void baboon_init(void); | |||
70 | 67 | ||
71 | extern void mac_mksound(unsigned int, unsigned int); | 68 | extern void mac_mksound(unsigned int, unsigned int); |
72 | 69 | ||
73 | extern void nubus_sweep_video(void); | ||
74 | |||
75 | static void mac_get_model(char *str); | 70 | static void mac_get_model(char *str); |
76 | static void mac_identify(void); | 71 | static void mac_identify(void); |
77 | static void mac_report_hardware(void); | 72 | static void mac_report_hardware(void); |
@@ -153,7 +148,7 @@ static void mac_cache_card_flush(int writeback) | |||
153 | void __init config_mac(void) | 148 | void __init config_mac(void) |
154 | { | 149 | { |
155 | if (!MACH_IS_MAC) | 150 | if (!MACH_IS_MAC) |
156 | printk(KERN_ERR "ERROR: no Mac, but config_mac() called!! \n"); | 151 | printk(KERN_ERR "ERROR: no Mac, but config_mac() called!!\n"); |
157 | 152 | ||
158 | mach_sched_init = mac_sched_init; | 153 | mach_sched_init = mac_sched_init; |
159 | mach_init_IRQ = mac_init_IRQ; | 154 | mach_init_IRQ = mac_init_IRQ; |
@@ -168,12 +163,6 @@ void __init config_mac(void) | |||
168 | #if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) | 163 | #if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) |
169 | mach_beep = mac_mksound; | 164 | mach_beep = mac_mksound; |
170 | #endif | 165 | #endif |
171 | #ifdef CONFIG_HEARTBEAT | ||
172 | #if 0 | ||
173 | mach_heartbeat = mac_heartbeat; | ||
174 | mach_heartbeat_irq = IRQ_MAC_TIMER; | ||
175 | #endif | ||
176 | #endif | ||
177 | 166 | ||
178 | /* | 167 | /* |
179 | * Determine hardware present | 168 | * Determine hardware present |
@@ -191,27 +180,19 @@ void __init config_mac(void) | |||
191 | if (macintosh_config->ident == MAC_MODEL_IICI | 180 | if (macintosh_config->ident == MAC_MODEL_IICI |
192 | || macintosh_config->ident == MAC_MODEL_IIFX) | 181 | || macintosh_config->ident == MAC_MODEL_IIFX) |
193 | mach_l2_flush = mac_cache_card_flush; | 182 | mach_l2_flush = mac_cache_card_flush; |
194 | |||
195 | /* | ||
196 | * Check for machine specific fixups. | ||
197 | */ | ||
198 | |||
199 | #ifdef OLD_NUBUS_CODE | ||
200 | nubus_sweep_video(); | ||
201 | #endif | ||
202 | } | 183 | } |
203 | 184 | ||
204 | 185 | ||
205 | /* | 186 | /* |
206 | * Macintosh Table: hardcoded model configuration data. | 187 | * Macintosh Table: hardcoded model configuration data. |
207 | * | 188 | * |
208 | * Much of this was defined by Alan, based on who knows what docs. | 189 | * Much of this was defined by Alan, based on who knows what docs. |
209 | * I've added a lot more, and some of that was pure guesswork based | 190 | * I've added a lot more, and some of that was pure guesswork based |
210 | * on hardware pages present on the Mac web site. Possibly wildly | 191 | * on hardware pages present on the Mac web site. Possibly wildly |
211 | * inaccurate, so look here if a new Mac model won't run. Example: if | 192 | * inaccurate, so look here if a new Mac model won't run. Example: if |
212 | * a Mac crashes immediately after the VIA1 registers have been dumped | 193 | * a Mac crashes immediately after the VIA1 registers have been dumped |
213 | * to the screen, it probably died attempting to read DirB on a RBV. | 194 | * to the screen, it probably died attempting to read DirB on a RBV. |
214 | * Meaning it should have MAC_VIA_IIci here :-) | 195 | * Meaning it should have MAC_VIA_IIci here :-) |
215 | */ | 196 | */ |
216 | 197 | ||
217 | struct mac_model *macintosh_config; | 198 | struct mac_model *macintosh_config; |
@@ -219,7 +200,7 @@ EXPORT_SYMBOL(macintosh_config); | |||
219 | 200 | ||
220 | static struct mac_model mac_data_table[] = { | 201 | static struct mac_model mac_data_table[] = { |
221 | /* | 202 | /* |
222 | * We'll pretend to be a Macintosh II, that's pretty safe. | 203 | * We'll pretend to be a Macintosh II, that's pretty safe. |
223 | */ | 204 | */ |
224 | 205 | ||
225 | { | 206 | { |
@@ -230,12 +211,11 @@ static struct mac_model mac_data_table[] = { | |||
230 | .scsi_type = MAC_SCSI_OLD, | 211 | .scsi_type = MAC_SCSI_OLD, |
231 | .scc_type = MAC_SCC_II, | 212 | .scc_type = MAC_SCC_II, |
232 | .nubus_type = MAC_NUBUS, | 213 | .nubus_type = MAC_NUBUS, |
233 | .floppy_type = MAC_FLOPPY_IWM | 214 | .floppy_type = MAC_FLOPPY_IWM, |
234 | }, | 215 | }, |
235 | 216 | ||
236 | /* | 217 | /* |
237 | * Original MacII hardware | 218 | * Original Mac II hardware |
238 | * | ||
239 | */ | 219 | */ |
240 | 220 | ||
241 | { | 221 | { |
@@ -246,7 +226,7 @@ static struct mac_model mac_data_table[] = { | |||
246 | .scsi_type = MAC_SCSI_OLD, | 226 | .scsi_type = MAC_SCSI_OLD, |
247 | .scc_type = MAC_SCC_II, | 227 | .scc_type = MAC_SCC_II, |
248 | .nubus_type = MAC_NUBUS, | 228 | .nubus_type = MAC_NUBUS, |
249 | .floppy_type = MAC_FLOPPY_IWM | 229 | .floppy_type = MAC_FLOPPY_IWM, |
250 | }, { | 230 | }, { |
251 | .ident = MAC_MODEL_IIX, | 231 | .ident = MAC_MODEL_IIX, |
252 | .name = "IIx", | 232 | .name = "IIx", |
@@ -255,7 +235,7 @@ static struct mac_model mac_data_table[] = { | |||
255 | .scsi_type = MAC_SCSI_OLD, | 235 | .scsi_type = MAC_SCSI_OLD, |
256 | .scc_type = MAC_SCC_II, | 236 | .scc_type = MAC_SCC_II, |
257 | .nubus_type = MAC_NUBUS, | 237 | .nubus_type = MAC_NUBUS, |
258 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 238 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
259 | }, { | 239 | }, { |
260 | .ident = MAC_MODEL_IICX, | 240 | .ident = MAC_MODEL_IICX, |
261 | .name = "IIcx", | 241 | .name = "IIcx", |
@@ -264,7 +244,7 @@ static struct mac_model mac_data_table[] = { | |||
264 | .scsi_type = MAC_SCSI_OLD, | 244 | .scsi_type = MAC_SCSI_OLD, |
265 | .scc_type = MAC_SCC_II, | 245 | .scc_type = MAC_SCC_II, |
266 | .nubus_type = MAC_NUBUS, | 246 | .nubus_type = MAC_NUBUS, |
267 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 247 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
268 | }, { | 248 | }, { |
269 | .ident = MAC_MODEL_SE30, | 249 | .ident = MAC_MODEL_SE30, |
270 | .name = "SE/30", | 250 | .name = "SE/30", |
@@ -273,13 +253,13 @@ static struct mac_model mac_data_table[] = { | |||
273 | .scsi_type = MAC_SCSI_OLD, | 253 | .scsi_type = MAC_SCSI_OLD, |
274 | .scc_type = MAC_SCC_II, | 254 | .scc_type = MAC_SCC_II, |
275 | .nubus_type = MAC_NUBUS, | 255 | .nubus_type = MAC_NUBUS, |
276 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 256 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
277 | }, | 257 | }, |
278 | 258 | ||
279 | /* | 259 | /* |
280 | * Weirdified MacII hardware - all subtly different. Gee thanks | 260 | * Weirdified Mac II hardware - all subtly different. Gee thanks |
281 | * Apple. All these boxes seem to have VIA2 in a different place to | 261 | * Apple. All these boxes seem to have VIA2 in a different place to |
282 | * the MacII (+1A000 rather than +4000) | 262 | * the Mac II (+1A000 rather than +4000) |
283 | * CSA: see http://developer.apple.com/technotes/hw/hw_09.html | 263 | * CSA: see http://developer.apple.com/technotes/hw/hw_09.html |
284 | */ | 264 | */ |
285 | 265 | ||
@@ -291,7 +271,7 @@ static struct mac_model mac_data_table[] = { | |||
291 | .scsi_type = MAC_SCSI_OLD, | 271 | .scsi_type = MAC_SCSI_OLD, |
292 | .scc_type = MAC_SCC_II, | 272 | .scc_type = MAC_SCC_II, |
293 | .nubus_type = MAC_NUBUS, | 273 | .nubus_type = MAC_NUBUS, |
294 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 274 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
295 | }, { | 275 | }, { |
296 | .ident = MAC_MODEL_IIFX, | 276 | .ident = MAC_MODEL_IIFX, |
297 | .name = "IIfx", | 277 | .name = "IIfx", |
@@ -300,7 +280,7 @@ static struct mac_model mac_data_table[] = { | |||
300 | .scsi_type = MAC_SCSI_OLD, | 280 | .scsi_type = MAC_SCSI_OLD, |
301 | .scc_type = MAC_SCC_IOP, | 281 | .scc_type = MAC_SCC_IOP, |
302 | .nubus_type = MAC_NUBUS, | 282 | .nubus_type = MAC_NUBUS, |
303 | .floppy_type = MAC_FLOPPY_SWIM_IOP | 283 | .floppy_type = MAC_FLOPPY_SWIM_IOP, |
304 | }, { | 284 | }, { |
305 | .ident = MAC_MODEL_IISI, | 285 | .ident = MAC_MODEL_IISI, |
306 | .name = "IIsi", | 286 | .name = "IIsi", |
@@ -309,7 +289,7 @@ static struct mac_model mac_data_table[] = { | |||
309 | .scsi_type = MAC_SCSI_OLD, | 289 | .scsi_type = MAC_SCSI_OLD, |
310 | .scc_type = MAC_SCC_II, | 290 | .scc_type = MAC_SCC_II, |
311 | .nubus_type = MAC_NUBUS, | 291 | .nubus_type = MAC_NUBUS, |
312 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 292 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
313 | }, { | 293 | }, { |
314 | .ident = MAC_MODEL_IIVI, | 294 | .ident = MAC_MODEL_IIVI, |
315 | .name = "IIvi", | 295 | .name = "IIvi", |
@@ -318,7 +298,7 @@ static struct mac_model mac_data_table[] = { | |||
318 | .scsi_type = MAC_SCSI_OLD, | 298 | .scsi_type = MAC_SCSI_OLD, |
319 | .scc_type = MAC_SCC_II, | 299 | .scc_type = MAC_SCC_II, |
320 | .nubus_type = MAC_NUBUS, | 300 | .nubus_type = MAC_NUBUS, |
321 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 301 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
322 | }, { | 302 | }, { |
323 | .ident = MAC_MODEL_IIVX, | 303 | .ident = MAC_MODEL_IIVX, |
324 | .name = "IIvx", | 304 | .name = "IIvx", |
@@ -327,11 +307,11 @@ static struct mac_model mac_data_table[] = { | |||
327 | .scsi_type = MAC_SCSI_OLD, | 307 | .scsi_type = MAC_SCSI_OLD, |
328 | .scc_type = MAC_SCC_II, | 308 | .scc_type = MAC_SCC_II, |
329 | .nubus_type = MAC_NUBUS, | 309 | .nubus_type = MAC_NUBUS, |
330 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 310 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
331 | }, | 311 | }, |
332 | 312 | ||
333 | /* | 313 | /* |
334 | * Classic models (guessing: similar to SE/30 ?? Nope, similar to LC ...) | 314 | * Classic models (guessing: similar to SE/30? Nope, similar to LC...) |
335 | */ | 315 | */ |
336 | 316 | ||
337 | { | 317 | { |
@@ -342,7 +322,7 @@ static struct mac_model mac_data_table[] = { | |||
342 | .scsi_type = MAC_SCSI_OLD, | 322 | .scsi_type = MAC_SCSI_OLD, |
343 | .scc_type = MAC_SCC_II, | 323 | .scc_type = MAC_SCC_II, |
344 | .nubus_type = MAC_NUBUS, | 324 | .nubus_type = MAC_NUBUS, |
345 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 325 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
346 | }, { | 326 | }, { |
347 | .ident = MAC_MODEL_CCL, | 327 | .ident = MAC_MODEL_CCL, |
348 | .name = "Color Classic", | 328 | .name = "Color Classic", |
@@ -351,11 +331,11 @@ static struct mac_model mac_data_table[] = { | |||
351 | .scsi_type = MAC_SCSI_OLD, | 331 | .scsi_type = MAC_SCSI_OLD, |
352 | .scc_type = MAC_SCC_II, | 332 | .scc_type = MAC_SCC_II, |
353 | .nubus_type = MAC_NUBUS, | 333 | .nubus_type = MAC_NUBUS, |
354 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 334 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
355 | }, | 335 | }, |
356 | 336 | ||
357 | /* | 337 | /* |
358 | * Some Mac LC machines. Basically the same as the IIci, ADB like IIsi | 338 | * Some Mac LC machines. Basically the same as the IIci, ADB like IIsi |
359 | */ | 339 | */ |
360 | 340 | ||
361 | { | 341 | { |
@@ -366,7 +346,7 @@ static struct mac_model mac_data_table[] = { | |||
366 | .scsi_type = MAC_SCSI_OLD, | 346 | .scsi_type = MAC_SCSI_OLD, |
367 | .scc_type = MAC_SCC_II, | 347 | .scc_type = MAC_SCC_II, |
368 | .nubus_type = MAC_NUBUS, | 348 | .nubus_type = MAC_NUBUS, |
369 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 349 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
370 | }, { | 350 | }, { |
371 | .ident = MAC_MODEL_LCII, | 351 | .ident = MAC_MODEL_LCII, |
372 | .name = "LC II", | 352 | .name = "LC II", |
@@ -375,7 +355,7 @@ static struct mac_model mac_data_table[] = { | |||
375 | .scsi_type = MAC_SCSI_OLD, | 355 | .scsi_type = MAC_SCSI_OLD, |
376 | .scc_type = MAC_SCC_II, | 356 | .scc_type = MAC_SCC_II, |
377 | .nubus_type = MAC_NUBUS, | 357 | .nubus_type = MAC_NUBUS, |
378 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 358 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
379 | }, { | 359 | }, { |
380 | .ident = MAC_MODEL_LCIII, | 360 | .ident = MAC_MODEL_LCIII, |
381 | .name = "LC III", | 361 | .name = "LC III", |
@@ -384,17 +364,17 @@ static struct mac_model mac_data_table[] = { | |||
384 | .scsi_type = MAC_SCSI_OLD, | 364 | .scsi_type = MAC_SCSI_OLD, |
385 | .scc_type = MAC_SCC_II, | 365 | .scc_type = MAC_SCC_II, |
386 | .nubus_type = MAC_NUBUS, | 366 | .nubus_type = MAC_NUBUS, |
387 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 367 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
388 | }, | 368 | }, |
389 | 369 | ||
390 | /* | 370 | /* |
391 | * Quadra. Video is at 0xF9000000, via is like a MacII. We label it differently | 371 | * Quadra. Video is at 0xF9000000, via is like a MacII. We label it |
392 | * as some of the stuff connected to VIA2 seems different. Better SCSI chip and | 372 | * differently as some of the stuff connected to VIA2 seems different. |
393 | * onboard ethernet using a NatSemi SONIC except the 660AV and 840AV which use an | 373 | * Better SCSI chip and onboard ethernet using a NatSemi SONIC except |
394 | * AMD 79C940 (MACE). | 374 | * the 660AV and 840AV which use an AMD 79C940 (MACE). |
395 | * The 700, 900 and 950 have some I/O chips in the wrong place to | 375 | * The 700, 900 and 950 have some I/O chips in the wrong place to |
396 | * confuse us. The 840AV has a SCSI location of its own (same as | 376 | * confuse us. The 840AV has a SCSI location of its own (same as |
397 | * the 660AV). | 377 | * the 660AV). |
398 | */ | 378 | */ |
399 | 379 | ||
400 | { | 380 | { |
@@ -405,7 +385,7 @@ static struct mac_model mac_data_table[] = { | |||
405 | .scsi_type = MAC_SCSI_QUADRA, | 385 | .scsi_type = MAC_SCSI_QUADRA, |
406 | .scc_type = MAC_SCC_QUADRA, | 386 | .scc_type = MAC_SCC_QUADRA, |
407 | .nubus_type = MAC_NUBUS, | 387 | .nubus_type = MAC_NUBUS, |
408 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 | 388 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
409 | }, { | 389 | }, { |
410 | .ident = MAC_MODEL_Q605_ACC, | 390 | .ident = MAC_MODEL_Q605_ACC, |
411 | .name = "Quadra 605", | 391 | .name = "Quadra 605", |
@@ -414,7 +394,7 @@ static struct mac_model mac_data_table[] = { | |||
414 | .scsi_type = MAC_SCSI_QUADRA, | 394 | .scsi_type = MAC_SCSI_QUADRA, |
415 | .scc_type = MAC_SCC_QUADRA, | 395 | .scc_type = MAC_SCC_QUADRA, |
416 | .nubus_type = MAC_NUBUS, | 396 | .nubus_type = MAC_NUBUS, |
417 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 | 397 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
418 | }, { | 398 | }, { |
419 | .ident = MAC_MODEL_Q610, | 399 | .ident = MAC_MODEL_Q610, |
420 | .name = "Quadra 610", | 400 | .name = "Quadra 610", |
@@ -424,7 +404,7 @@ static struct mac_model mac_data_table[] = { | |||
424 | .scc_type = MAC_SCC_QUADRA, | 404 | .scc_type = MAC_SCC_QUADRA, |
425 | .ether_type = MAC_ETHER_SONIC, | 405 | .ether_type = MAC_ETHER_SONIC, |
426 | .nubus_type = MAC_NUBUS, | 406 | .nubus_type = MAC_NUBUS, |
427 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 | 407 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
428 | }, { | 408 | }, { |
429 | .ident = MAC_MODEL_Q630, | 409 | .ident = MAC_MODEL_Q630, |
430 | .name = "Quadra 630", | 410 | .name = "Quadra 630", |
@@ -435,7 +415,7 @@ static struct mac_model mac_data_table[] = { | |||
435 | .scc_type = MAC_SCC_QUADRA, | 415 | .scc_type = MAC_SCC_QUADRA, |
436 | .ether_type = MAC_ETHER_SONIC, | 416 | .ether_type = MAC_ETHER_SONIC, |
437 | .nubus_type = MAC_NUBUS, | 417 | .nubus_type = MAC_NUBUS, |
438 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 | 418 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
439 | }, { | 419 | }, { |
440 | .ident = MAC_MODEL_Q650, | 420 | .ident = MAC_MODEL_Q650, |
441 | .name = "Quadra 650", | 421 | .name = "Quadra 650", |
@@ -445,9 +425,9 @@ static struct mac_model mac_data_table[] = { | |||
445 | .scc_type = MAC_SCC_QUADRA, | 425 | .scc_type = MAC_SCC_QUADRA, |
446 | .ether_type = MAC_ETHER_SONIC, | 426 | .ether_type = MAC_ETHER_SONIC, |
447 | .nubus_type = MAC_NUBUS, | 427 | .nubus_type = MAC_NUBUS, |
448 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 | 428 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
449 | }, | 429 | }, |
450 | /* The Q700 does have a NS Sonic */ | 430 | /* The Q700 does have a NS Sonic */ |
451 | { | 431 | { |
452 | .ident = MAC_MODEL_Q700, | 432 | .ident = MAC_MODEL_Q700, |
453 | .name = "Quadra 700", | 433 | .name = "Quadra 700", |
@@ -457,7 +437,7 @@ static struct mac_model mac_data_table[] = { | |||
457 | .scc_type = MAC_SCC_QUADRA, | 437 | .scc_type = MAC_SCC_QUADRA, |
458 | .ether_type = MAC_ETHER_SONIC, | 438 | .ether_type = MAC_ETHER_SONIC, |
459 | .nubus_type = MAC_NUBUS, | 439 | .nubus_type = MAC_NUBUS, |
460 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 | 440 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
461 | }, { | 441 | }, { |
462 | .ident = MAC_MODEL_Q800, | 442 | .ident = MAC_MODEL_Q800, |
463 | .name = "Quadra 800", | 443 | .name = "Quadra 800", |
@@ -467,7 +447,7 @@ static struct mac_model mac_data_table[] = { | |||
467 | .scc_type = MAC_SCC_QUADRA, | 447 | .scc_type = MAC_SCC_QUADRA, |
468 | .ether_type = MAC_ETHER_SONIC, | 448 | .ether_type = MAC_ETHER_SONIC, |
469 | .nubus_type = MAC_NUBUS, | 449 | .nubus_type = MAC_NUBUS, |
470 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 | 450 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
471 | }, { | 451 | }, { |
472 | .ident = MAC_MODEL_Q840, | 452 | .ident = MAC_MODEL_Q840, |
473 | .name = "Quadra 840AV", | 453 | .name = "Quadra 840AV", |
@@ -477,7 +457,7 @@ static struct mac_model mac_data_table[] = { | |||
477 | .scc_type = MAC_SCC_PSC, | 457 | .scc_type = MAC_SCC_PSC, |
478 | .ether_type = MAC_ETHER_MACE, | 458 | .ether_type = MAC_ETHER_MACE, |
479 | .nubus_type = MAC_NUBUS, | 459 | .nubus_type = MAC_NUBUS, |
480 | .floppy_type = MAC_FLOPPY_AV | 460 | .floppy_type = MAC_FLOPPY_AV, |
481 | }, { | 461 | }, { |
482 | .ident = MAC_MODEL_Q900, | 462 | .ident = MAC_MODEL_Q900, |
483 | .name = "Quadra 900", | 463 | .name = "Quadra 900", |
@@ -487,7 +467,7 @@ static struct mac_model mac_data_table[] = { | |||
487 | .scc_type = MAC_SCC_IOP, | 467 | .scc_type = MAC_SCC_IOP, |
488 | .ether_type = MAC_ETHER_SONIC, | 468 | .ether_type = MAC_ETHER_SONIC, |
489 | .nubus_type = MAC_NUBUS, | 469 | .nubus_type = MAC_NUBUS, |
490 | .floppy_type = MAC_FLOPPY_SWIM_IOP | 470 | .floppy_type = MAC_FLOPPY_SWIM_IOP, |
491 | }, { | 471 | }, { |
492 | .ident = MAC_MODEL_Q950, | 472 | .ident = MAC_MODEL_Q950, |
493 | .name = "Quadra 950", | 473 | .name = "Quadra 950", |
@@ -497,60 +477,60 @@ static struct mac_model mac_data_table[] = { | |||
497 | .scc_type = MAC_SCC_IOP, | 477 | .scc_type = MAC_SCC_IOP, |
498 | .ether_type = MAC_ETHER_SONIC, | 478 | .ether_type = MAC_ETHER_SONIC, |
499 | .nubus_type = MAC_NUBUS, | 479 | .nubus_type = MAC_NUBUS, |
500 | .floppy_type = MAC_FLOPPY_SWIM_IOP | 480 | .floppy_type = MAC_FLOPPY_SWIM_IOP, |
501 | }, | 481 | }, |
502 | 482 | ||
503 | /* | 483 | /* |
504 | * Performa - more LC type machines | 484 | * Performa - more LC type machines |
505 | */ | 485 | */ |
506 | 486 | ||
507 | { | 487 | { |
508 | .ident = MAC_MODEL_P460, | 488 | .ident = MAC_MODEL_P460, |
509 | .name = "Performa 460", | 489 | .name = "Performa 460", |
510 | .adb_type = MAC_ADB_IISI, | 490 | .adb_type = MAC_ADB_IISI, |
511 | .via_type = MAC_VIA_IIci, | 491 | .via_type = MAC_VIA_IIci, |
512 | .scsi_type = MAC_SCSI_OLD, | 492 | .scsi_type = MAC_SCSI_OLD, |
513 | .scc_type = MAC_SCC_II, | 493 | .scc_type = MAC_SCC_II, |
514 | .nubus_type = MAC_NUBUS, | 494 | .nubus_type = MAC_NUBUS, |
515 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 495 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
516 | }, { | 496 | }, { |
517 | .ident = MAC_MODEL_P475, | 497 | .ident = MAC_MODEL_P475, |
518 | .name = "Performa 475", | 498 | .name = "Performa 475", |
519 | .adb_type = MAC_ADB_CUDA, | 499 | .adb_type = MAC_ADB_CUDA, |
520 | .via_type = MAC_VIA_QUADRA, | 500 | .via_type = MAC_VIA_QUADRA, |
521 | .scsi_type = MAC_SCSI_QUADRA, | 501 | .scsi_type = MAC_SCSI_QUADRA, |
522 | .scc_type = MAC_SCC_II, | 502 | .scc_type = MAC_SCC_II, |
523 | .nubus_type = MAC_NUBUS, | 503 | .nubus_type = MAC_NUBUS, |
524 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 | 504 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
525 | }, { | 505 | }, { |
526 | .ident = MAC_MODEL_P475F, | 506 | .ident = MAC_MODEL_P475F, |
527 | .name = "Performa 475", | 507 | .name = "Performa 475", |
528 | .adb_type = MAC_ADB_CUDA, | 508 | .adb_type = MAC_ADB_CUDA, |
529 | .via_type = MAC_VIA_QUADRA, | 509 | .via_type = MAC_VIA_QUADRA, |
530 | .scsi_type = MAC_SCSI_QUADRA, | 510 | .scsi_type = MAC_SCSI_QUADRA, |
531 | .scc_type = MAC_SCC_II, | 511 | .scc_type = MAC_SCC_II, |
532 | .nubus_type = MAC_NUBUS, | 512 | .nubus_type = MAC_NUBUS, |
533 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 | 513 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
534 | }, { | 514 | }, { |
535 | .ident = MAC_MODEL_P520, | 515 | .ident = MAC_MODEL_P520, |
536 | .name = "Performa 520", | 516 | .name = "Performa 520", |
537 | .adb_type = MAC_ADB_CUDA, | 517 | .adb_type = MAC_ADB_CUDA, |
538 | .via_type = MAC_VIA_IIci, | 518 | .via_type = MAC_VIA_IIci, |
539 | .scsi_type = MAC_SCSI_OLD, | 519 | .scsi_type = MAC_SCSI_OLD, |
540 | .scc_type = MAC_SCC_II, | 520 | .scc_type = MAC_SCC_II, |
541 | .nubus_type = MAC_NUBUS, | 521 | .nubus_type = MAC_NUBUS, |
542 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 522 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
543 | }, { | 523 | }, { |
544 | .ident = MAC_MODEL_P550, | 524 | .ident = MAC_MODEL_P550, |
545 | .name = "Performa 550", | 525 | .name = "Performa 550", |
546 | .adb_type = MAC_ADB_CUDA, | 526 | .adb_type = MAC_ADB_CUDA, |
547 | .via_type = MAC_VIA_IIci, | 527 | .via_type = MAC_VIA_IIci, |
548 | .scsi_type = MAC_SCSI_OLD, | 528 | .scsi_type = MAC_SCSI_OLD, |
549 | .scc_type = MAC_SCC_II, | 529 | .scc_type = MAC_SCC_II, |
550 | .nubus_type = MAC_NUBUS, | 530 | .nubus_type = MAC_NUBUS, |
551 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 531 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
552 | }, | 532 | }, |
553 | /* These have the comm slot, and therefore the possibility of SONIC ethernet */ | 533 | /* These have the comm slot, and therefore possibly SONIC ethernet */ |
554 | { | 534 | { |
555 | .ident = MAC_MODEL_P575, | 535 | .ident = MAC_MODEL_P575, |
556 | .name = "Performa 575", | 536 | .name = "Performa 575", |
@@ -560,7 +540,7 @@ static struct mac_model mac_data_table[] = { | |||
560 | .scc_type = MAC_SCC_II, | 540 | .scc_type = MAC_SCC_II, |
561 | .ether_type = MAC_ETHER_SONIC, | 541 | .ether_type = MAC_ETHER_SONIC, |
562 | .nubus_type = MAC_NUBUS, | 542 | .nubus_type = MAC_NUBUS, |
563 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 | 543 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
564 | }, { | 544 | }, { |
565 | .ident = MAC_MODEL_P588, | 545 | .ident = MAC_MODEL_P588, |
566 | .name = "Performa 588", | 546 | .name = "Performa 588", |
@@ -571,7 +551,7 @@ static struct mac_model mac_data_table[] = { | |||
571 | .scc_type = MAC_SCC_II, | 551 | .scc_type = MAC_SCC_II, |
572 | .ether_type = MAC_ETHER_SONIC, | 552 | .ether_type = MAC_ETHER_SONIC, |
573 | .nubus_type = MAC_NUBUS, | 553 | .nubus_type = MAC_NUBUS, |
574 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 | 554 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
575 | }, { | 555 | }, { |
576 | .ident = MAC_MODEL_TV, | 556 | .ident = MAC_MODEL_TV, |
577 | .name = "TV", | 557 | .name = "TV", |
@@ -580,7 +560,7 @@ static struct mac_model mac_data_table[] = { | |||
580 | .scsi_type = MAC_SCSI_OLD, | 560 | .scsi_type = MAC_SCSI_OLD, |
581 | .scc_type = MAC_SCC_II, | 561 | .scc_type = MAC_SCC_II, |
582 | .nubus_type = MAC_NUBUS, | 562 | .nubus_type = MAC_NUBUS, |
583 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 563 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
584 | }, { | 564 | }, { |
585 | .ident = MAC_MODEL_P600, | 565 | .ident = MAC_MODEL_P600, |
586 | .name = "Performa 600", | 566 | .name = "Performa 600", |
@@ -589,14 +569,14 @@ static struct mac_model mac_data_table[] = { | |||
589 | .scsi_type = MAC_SCSI_OLD, | 569 | .scsi_type = MAC_SCSI_OLD, |
590 | .scc_type = MAC_SCC_II, | 570 | .scc_type = MAC_SCC_II, |
591 | .nubus_type = MAC_NUBUS, | 571 | .nubus_type = MAC_NUBUS, |
592 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 572 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
593 | }, | 573 | }, |
594 | 574 | ||
595 | /* | 575 | /* |
596 | * Centris - just guessing again; maybe like Quadra | 576 | * Centris - just guessing again; maybe like Quadra. |
577 | * The C610 may or may not have SONIC. We probe to make sure. | ||
597 | */ | 578 | */ |
598 | 579 | ||
599 | /* The C610 may or may not have SONIC. We probe to make sure */ | ||
600 | { | 580 | { |
601 | .ident = MAC_MODEL_C610, | 581 | .ident = MAC_MODEL_C610, |
602 | .name = "Centris 610", | 582 | .name = "Centris 610", |
@@ -606,7 +586,7 @@ static struct mac_model mac_data_table[] = { | |||
606 | .scc_type = MAC_SCC_QUADRA, | 586 | .scc_type = MAC_SCC_QUADRA, |
607 | .ether_type = MAC_ETHER_SONIC, | 587 | .ether_type = MAC_ETHER_SONIC, |
608 | .nubus_type = MAC_NUBUS, | 588 | .nubus_type = MAC_NUBUS, |
609 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 | 589 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
610 | }, { | 590 | }, { |
611 | .ident = MAC_MODEL_C650, | 591 | .ident = MAC_MODEL_C650, |
612 | .name = "Centris 650", | 592 | .name = "Centris 650", |
@@ -616,7 +596,7 @@ static struct mac_model mac_data_table[] = { | |||
616 | .scc_type = MAC_SCC_QUADRA, | 596 | .scc_type = MAC_SCC_QUADRA, |
617 | .ether_type = MAC_ETHER_SONIC, | 597 | .ether_type = MAC_ETHER_SONIC, |
618 | .nubus_type = MAC_NUBUS, | 598 | .nubus_type = MAC_NUBUS, |
619 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 | 599 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
620 | }, { | 600 | }, { |
621 | .ident = MAC_MODEL_C660, | 601 | .ident = MAC_MODEL_C660, |
622 | .name = "Centris 660AV", | 602 | .name = "Centris 660AV", |
@@ -626,7 +606,7 @@ static struct mac_model mac_data_table[] = { | |||
626 | .scc_type = MAC_SCC_PSC, | 606 | .scc_type = MAC_SCC_PSC, |
627 | .ether_type = MAC_ETHER_MACE, | 607 | .ether_type = MAC_ETHER_MACE, |
628 | .nubus_type = MAC_NUBUS, | 608 | .nubus_type = MAC_NUBUS, |
629 | .floppy_type = MAC_FLOPPY_AV | 609 | .floppy_type = MAC_FLOPPY_AV, |
630 | }, | 610 | }, |
631 | 611 | ||
632 | /* | 612 | /* |
@@ -643,7 +623,7 @@ static struct mac_model mac_data_table[] = { | |||
643 | .scsi_type = MAC_SCSI_OLD, | 623 | .scsi_type = MAC_SCSI_OLD, |
644 | .scc_type = MAC_SCC_QUADRA, | 624 | .scc_type = MAC_SCC_QUADRA, |
645 | .nubus_type = MAC_NUBUS, | 625 | .nubus_type = MAC_NUBUS, |
646 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 626 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
647 | }, { | 627 | }, { |
648 | .ident = MAC_MODEL_PB145, | 628 | .ident = MAC_MODEL_PB145, |
649 | .name = "PowerBook 145", | 629 | .name = "PowerBook 145", |
@@ -652,7 +632,7 @@ static struct mac_model mac_data_table[] = { | |||
652 | .scsi_type = MAC_SCSI_OLD, | 632 | .scsi_type = MAC_SCSI_OLD, |
653 | .scc_type = MAC_SCC_QUADRA, | 633 | .scc_type = MAC_SCC_QUADRA, |
654 | .nubus_type = MAC_NUBUS, | 634 | .nubus_type = MAC_NUBUS, |
655 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 635 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
656 | }, { | 636 | }, { |
657 | .ident = MAC_MODEL_PB150, | 637 | .ident = MAC_MODEL_PB150, |
658 | .name = "PowerBook 150", | 638 | .name = "PowerBook 150", |
@@ -662,7 +642,7 @@ static struct mac_model mac_data_table[] = { | |||
662 | .ide_type = MAC_IDE_PB, | 642 | .ide_type = MAC_IDE_PB, |
663 | .scc_type = MAC_SCC_QUADRA, | 643 | .scc_type = MAC_SCC_QUADRA, |
664 | .nubus_type = MAC_NUBUS, | 644 | .nubus_type = MAC_NUBUS, |
665 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 645 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
666 | }, { | 646 | }, { |
667 | .ident = MAC_MODEL_PB160, | 647 | .ident = MAC_MODEL_PB160, |
668 | .name = "PowerBook 160", | 648 | .name = "PowerBook 160", |
@@ -671,7 +651,7 @@ static struct mac_model mac_data_table[] = { | |||
671 | .scsi_type = MAC_SCSI_OLD, | 651 | .scsi_type = MAC_SCSI_OLD, |
672 | .scc_type = MAC_SCC_QUADRA, | 652 | .scc_type = MAC_SCC_QUADRA, |
673 | .nubus_type = MAC_NUBUS, | 653 | .nubus_type = MAC_NUBUS, |
674 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 654 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
675 | }, { | 655 | }, { |
676 | .ident = MAC_MODEL_PB165, | 656 | .ident = MAC_MODEL_PB165, |
677 | .name = "PowerBook 165", | 657 | .name = "PowerBook 165", |
@@ -680,7 +660,7 @@ static struct mac_model mac_data_table[] = { | |||
680 | .scsi_type = MAC_SCSI_OLD, | 660 | .scsi_type = MAC_SCSI_OLD, |
681 | .scc_type = MAC_SCC_QUADRA, | 661 | .scc_type = MAC_SCC_QUADRA, |
682 | .nubus_type = MAC_NUBUS, | 662 | .nubus_type = MAC_NUBUS, |
683 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 663 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
684 | }, { | 664 | }, { |
685 | .ident = MAC_MODEL_PB165C, | 665 | .ident = MAC_MODEL_PB165C, |
686 | .name = "PowerBook 165c", | 666 | .name = "PowerBook 165c", |
@@ -689,7 +669,7 @@ static struct mac_model mac_data_table[] = { | |||
689 | .scsi_type = MAC_SCSI_OLD, | 669 | .scsi_type = MAC_SCSI_OLD, |
690 | .scc_type = MAC_SCC_QUADRA, | 670 | .scc_type = MAC_SCC_QUADRA, |
691 | .nubus_type = MAC_NUBUS, | 671 | .nubus_type = MAC_NUBUS, |
692 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 672 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
693 | }, { | 673 | }, { |
694 | .ident = MAC_MODEL_PB170, | 674 | .ident = MAC_MODEL_PB170, |
695 | .name = "PowerBook 170", | 675 | .name = "PowerBook 170", |
@@ -698,7 +678,7 @@ static struct mac_model mac_data_table[] = { | |||
698 | .scsi_type = MAC_SCSI_OLD, | 678 | .scsi_type = MAC_SCSI_OLD, |
699 | .scc_type = MAC_SCC_QUADRA, | 679 | .scc_type = MAC_SCC_QUADRA, |
700 | .nubus_type = MAC_NUBUS, | 680 | .nubus_type = MAC_NUBUS, |
701 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 681 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
702 | }, { | 682 | }, { |
703 | .ident = MAC_MODEL_PB180, | 683 | .ident = MAC_MODEL_PB180, |
704 | .name = "PowerBook 180", | 684 | .name = "PowerBook 180", |
@@ -707,7 +687,7 @@ static struct mac_model mac_data_table[] = { | |||
707 | .scsi_type = MAC_SCSI_OLD, | 687 | .scsi_type = MAC_SCSI_OLD, |
708 | .scc_type = MAC_SCC_QUADRA, | 688 | .scc_type = MAC_SCC_QUADRA, |
709 | .nubus_type = MAC_NUBUS, | 689 | .nubus_type = MAC_NUBUS, |
710 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 690 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
711 | }, { | 691 | }, { |
712 | .ident = MAC_MODEL_PB180C, | 692 | .ident = MAC_MODEL_PB180C, |
713 | .name = "PowerBook 180c", | 693 | .name = "PowerBook 180c", |
@@ -716,7 +696,7 @@ static struct mac_model mac_data_table[] = { | |||
716 | .scsi_type = MAC_SCSI_OLD, | 696 | .scsi_type = MAC_SCSI_OLD, |
717 | .scc_type = MAC_SCC_QUADRA, | 697 | .scc_type = MAC_SCC_QUADRA, |
718 | .nubus_type = MAC_NUBUS, | 698 | .nubus_type = MAC_NUBUS, |
719 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 699 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
720 | }, { | 700 | }, { |
721 | .ident = MAC_MODEL_PB190, | 701 | .ident = MAC_MODEL_PB190, |
722 | .name = "PowerBook 190", | 702 | .name = "PowerBook 190", |
@@ -726,7 +706,7 @@ static struct mac_model mac_data_table[] = { | |||
726 | .ide_type = MAC_IDE_BABOON, | 706 | .ide_type = MAC_IDE_BABOON, |
727 | .scc_type = MAC_SCC_QUADRA, | 707 | .scc_type = MAC_SCC_QUADRA, |
728 | .nubus_type = MAC_NUBUS, | 708 | .nubus_type = MAC_NUBUS, |
729 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 709 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
730 | }, { | 710 | }, { |
731 | .ident = MAC_MODEL_PB520, | 711 | .ident = MAC_MODEL_PB520, |
732 | .name = "PowerBook 520", | 712 | .name = "PowerBook 520", |
@@ -736,7 +716,7 @@ static struct mac_model mac_data_table[] = { | |||
736 | .scc_type = MAC_SCC_QUADRA, | 716 | .scc_type = MAC_SCC_QUADRA, |
737 | .ether_type = MAC_ETHER_SONIC, | 717 | .ether_type = MAC_ETHER_SONIC, |
738 | .nubus_type = MAC_NUBUS, | 718 | .nubus_type = MAC_NUBUS, |
739 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 719 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
740 | }, | 720 | }, |
741 | 721 | ||
742 | /* | 722 | /* |
@@ -757,7 +737,7 @@ static struct mac_model mac_data_table[] = { | |||
757 | .scsi_type = MAC_SCSI_OLD, | 737 | .scsi_type = MAC_SCSI_OLD, |
758 | .scc_type = MAC_SCC_QUADRA, | 738 | .scc_type = MAC_SCC_QUADRA, |
759 | .nubus_type = MAC_NUBUS, | 739 | .nubus_type = MAC_NUBUS, |
760 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 740 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
761 | }, { | 741 | }, { |
762 | .ident = MAC_MODEL_PB230, | 742 | .ident = MAC_MODEL_PB230, |
763 | .name = "PowerBook Duo 230", | 743 | .name = "PowerBook Duo 230", |
@@ -766,7 +746,7 @@ static struct mac_model mac_data_table[] = { | |||
766 | .scsi_type = MAC_SCSI_OLD, | 746 | .scsi_type = MAC_SCSI_OLD, |
767 | .scc_type = MAC_SCC_QUADRA, | 747 | .scc_type = MAC_SCC_QUADRA, |
768 | .nubus_type = MAC_NUBUS, | 748 | .nubus_type = MAC_NUBUS, |
769 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 749 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
770 | }, { | 750 | }, { |
771 | .ident = MAC_MODEL_PB250, | 751 | .ident = MAC_MODEL_PB250, |
772 | .name = "PowerBook Duo 250", | 752 | .name = "PowerBook Duo 250", |
@@ -775,7 +755,7 @@ static struct mac_model mac_data_table[] = { | |||
775 | .scsi_type = MAC_SCSI_OLD, | 755 | .scsi_type = MAC_SCSI_OLD, |
776 | .scc_type = MAC_SCC_QUADRA, | 756 | .scc_type = MAC_SCC_QUADRA, |
777 | .nubus_type = MAC_NUBUS, | 757 | .nubus_type = MAC_NUBUS, |
778 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 758 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
779 | }, { | 759 | }, { |
780 | .ident = MAC_MODEL_PB270C, | 760 | .ident = MAC_MODEL_PB270C, |
781 | .name = "PowerBook Duo 270c", | 761 | .name = "PowerBook Duo 270c", |
@@ -784,7 +764,7 @@ static struct mac_model mac_data_table[] = { | |||
784 | .scsi_type = MAC_SCSI_OLD, | 764 | .scsi_type = MAC_SCSI_OLD, |
785 | .scc_type = MAC_SCC_QUADRA, | 765 | .scc_type = MAC_SCC_QUADRA, |
786 | .nubus_type = MAC_NUBUS, | 766 | .nubus_type = MAC_NUBUS, |
787 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 767 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
788 | }, { | 768 | }, { |
789 | .ident = MAC_MODEL_PB280, | 769 | .ident = MAC_MODEL_PB280, |
790 | .name = "PowerBook Duo 280", | 770 | .name = "PowerBook Duo 280", |
@@ -793,7 +773,7 @@ static struct mac_model mac_data_table[] = { | |||
793 | .scsi_type = MAC_SCSI_OLD, | 773 | .scsi_type = MAC_SCSI_OLD, |
794 | .scc_type = MAC_SCC_QUADRA, | 774 | .scc_type = MAC_SCC_QUADRA, |
795 | .nubus_type = MAC_NUBUS, | 775 | .nubus_type = MAC_NUBUS, |
796 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 776 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
797 | }, { | 777 | }, { |
798 | .ident = MAC_MODEL_PB280C, | 778 | .ident = MAC_MODEL_PB280C, |
799 | .name = "PowerBook Duo 280c", | 779 | .name = "PowerBook Duo 280c", |
@@ -802,17 +782,44 @@ static struct mac_model mac_data_table[] = { | |||
802 | .scsi_type = MAC_SCSI_OLD, | 782 | .scsi_type = MAC_SCSI_OLD, |
803 | .scc_type = MAC_SCC_QUADRA, | 783 | .scc_type = MAC_SCC_QUADRA, |
804 | .nubus_type = MAC_NUBUS, | 784 | .nubus_type = MAC_NUBUS, |
805 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 | 785 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
806 | }, | 786 | }, |
807 | 787 | ||
808 | /* | 788 | /* |
809 | * Other stuff ?? | 789 | * Other stuff? |
810 | */ | 790 | */ |
791 | |||
811 | { | 792 | { |
812 | .ident = -1 | 793 | .ident = -1 |
813 | } | 794 | } |
814 | }; | 795 | }; |
815 | 796 | ||
797 | static struct resource scc_a_rsrcs[] = { | ||
798 | { .flags = IORESOURCE_MEM }, | ||
799 | { .flags = IORESOURCE_IRQ }, | ||
800 | }; | ||
801 | |||
802 | static struct resource scc_b_rsrcs[] = { | ||
803 | { .flags = IORESOURCE_MEM }, | ||
804 | { .flags = IORESOURCE_IRQ }, | ||
805 | }; | ||
806 | |||
807 | struct platform_device scc_a_pdev = { | ||
808 | .name = "scc", | ||
809 | .id = 0, | ||
810 | .num_resources = ARRAY_SIZE(scc_a_rsrcs), | ||
811 | .resource = scc_a_rsrcs, | ||
812 | }; | ||
813 | EXPORT_SYMBOL(scc_a_pdev); | ||
814 | |||
815 | struct platform_device scc_b_pdev = { | ||
816 | .name = "scc", | ||
817 | .id = 1, | ||
818 | .num_resources = ARRAY_SIZE(scc_b_rsrcs), | ||
819 | .resource = scc_b_rsrcs, | ||
820 | }; | ||
821 | EXPORT_SYMBOL(scc_b_pdev); | ||
822 | |||
816 | static void __init mac_identify(void) | 823 | static void __init mac_identify(void) |
817 | { | 824 | { |
818 | struct mac_model *m; | 825 | struct mac_model *m; |
@@ -823,7 +830,8 @@ static void __init mac_identify(void) | |||
823 | /* no bootinfo model id -> NetBSD booter was used! */ | 830 | /* no bootinfo model id -> NetBSD booter was used! */ |
824 | /* XXX FIXME: breaks for model > 31 */ | 831 | /* XXX FIXME: breaks for model > 31 */ |
825 | model = (mac_bi_data.cpuid >> 2) & 63; | 832 | model = (mac_bi_data.cpuid >> 2) & 63; |
826 | printk(KERN_WARNING "No bootinfo model ID, using cpuid instead (hey, use Penguin!)\n"); | 833 | printk(KERN_WARNING "No bootinfo model ID, using cpuid instead " |
834 | "(obsolete bootloader?)\n"); | ||
827 | } | 835 | } |
828 | 836 | ||
829 | macintosh_config = mac_data_table; | 837 | macintosh_config = mac_data_table; |
@@ -834,28 +842,48 @@ static void __init mac_identify(void) | |||
834 | } | 842 | } |
835 | } | 843 | } |
836 | 844 | ||
837 | /* We need to pre-init the IOPs, if any. Otherwise */ | 845 | /* Set up serial port resources for the console initcall. */ |
838 | /* the serial console won't work if the user had */ | 846 | |
839 | /* the serial ports set to "Faster" mode in MacOS. */ | 847 | scc_a_rsrcs[0].start = (resource_size_t) mac_bi_data.sccbase + 2; |
848 | scc_a_rsrcs[0].end = scc_a_rsrcs[0].start; | ||
849 | scc_b_rsrcs[0].start = (resource_size_t) mac_bi_data.sccbase; | ||
850 | scc_b_rsrcs[0].end = scc_b_rsrcs[0].start; | ||
840 | 851 | ||
852 | switch (macintosh_config->scc_type) { | ||
853 | case MAC_SCC_PSC: | ||
854 | scc_a_rsrcs[1].start = scc_a_rsrcs[1].end = IRQ_MAC_SCC_A; | ||
855 | scc_b_rsrcs[1].start = scc_b_rsrcs[1].end = IRQ_MAC_SCC_B; | ||
856 | break; | ||
857 | default: | ||
858 | scc_a_rsrcs[1].start = scc_a_rsrcs[1].end = IRQ_MAC_SCC; | ||
859 | scc_b_rsrcs[1].start = scc_b_rsrcs[1].end = IRQ_MAC_SCC; | ||
860 | break; | ||
861 | } | ||
862 | |||
863 | /* | ||
864 | * We need to pre-init the IOPs, if any. Otherwise | ||
865 | * the serial console won't work if the user had | ||
866 | * the serial ports set to "Faster" mode in MacOS. | ||
867 | */ | ||
841 | iop_preinit(); | 868 | iop_preinit(); |
842 | 869 | ||
843 | printk(KERN_INFO "Detected Macintosh model: %d \n", model); | 870 | printk(KERN_INFO "Detected Macintosh model: %d\n", model); |
844 | 871 | ||
845 | /* | 872 | /* |
846 | * Report booter data: | 873 | * Report booter data: |
847 | */ | 874 | */ |
848 | printk(KERN_DEBUG " Penguin bootinfo data:\n"); | 875 | printk(KERN_DEBUG " Penguin bootinfo data:\n"); |
849 | printk(KERN_DEBUG " Video: addr 0x%lx row 0x%lx depth %lx dimensions %ld x %ld\n", | 876 | printk(KERN_DEBUG " Video: addr 0x%lx " |
877 | "row 0x%lx depth %lx dimensions %ld x %ld\n", | ||
850 | mac_bi_data.videoaddr, mac_bi_data.videorow, | 878 | mac_bi_data.videoaddr, mac_bi_data.videorow, |
851 | mac_bi_data.videodepth, mac_bi_data.dimensions & 0xFFFF, | 879 | mac_bi_data.videodepth, mac_bi_data.dimensions & 0xFFFF, |
852 | mac_bi_data.dimensions >> 16); | 880 | mac_bi_data.dimensions >> 16); |
853 | printk(KERN_DEBUG " Videological 0x%lx phys. 0x%lx, SCC at 0x%lx \n", | 881 | printk(KERN_DEBUG " Videological 0x%lx phys. 0x%lx, SCC at 0x%lx\n", |
854 | mac_bi_data.videological, mac_orig_videoaddr, | 882 | mac_bi_data.videological, mac_orig_videoaddr, |
855 | mac_bi_data.sccbase); | 883 | mac_bi_data.sccbase); |
856 | printk(KERN_DEBUG " Boottime: 0x%lx GMTBias: 0x%lx \n", | 884 | printk(KERN_DEBUG " Boottime: 0x%lx GMTBias: 0x%lx\n", |
857 | mac_bi_data.boottime, mac_bi_data.gmtbias); | 885 | mac_bi_data.boottime, mac_bi_data.gmtbias); |
858 | printk(KERN_DEBUG " Machine ID: %ld CPUid: 0x%lx memory size: 0x%lx \n", | 886 | printk(KERN_DEBUG " Machine ID: %ld CPUid: 0x%lx memory size: 0x%lx\n", |
859 | mac_bi_data.id, mac_bi_data.cpuid, mac_bi_data.memsize); | 887 | mac_bi_data.id, mac_bi_data.cpuid, mac_bi_data.memsize); |
860 | 888 | ||
861 | iop_init(); | 889 | iop_init(); |
@@ -863,6 +891,10 @@ static void __init mac_identify(void) | |||
863 | oss_init(); | 891 | oss_init(); |
864 | psc_init(); | 892 | psc_init(); |
865 | baboon_init(); | 893 | baboon_init(); |
894 | |||
895 | #ifdef CONFIG_ADB_CUDA | ||
896 | find_via_cuda(); | ||
897 | #endif | ||
866 | } | 898 | } |
867 | 899 | ||
868 | static void __init mac_report_hardware(void) | 900 | static void __init mac_report_hardware(void) |
@@ -876,23 +908,50 @@ static void mac_get_model(char *str) | |||
876 | strcat(str, macintosh_config->name); | 908 | strcat(str, macintosh_config->name); |
877 | } | 909 | } |
878 | 910 | ||
879 | static struct resource swim_resources[1]; | 911 | static struct resource swim_rsrc = { .flags = IORESOURCE_MEM }; |
880 | 912 | ||
881 | static struct platform_device swim_device = { | 913 | static struct platform_device swim_pdev = { |
882 | .name = "swim", | 914 | .name = "swim", |
883 | .id = -1, | 915 | .id = -1, |
884 | .num_resources = ARRAY_SIZE(swim_resources), | 916 | .num_resources = 1, |
885 | .resource = swim_resources, | 917 | .resource = &swim_rsrc, |
886 | }; | 918 | }; |
887 | 919 | ||
888 | static struct platform_device *mac_platform_devices[] __initdata = { | 920 | static struct platform_device esp_0_pdev = { |
889 | &swim_device | 921 | .name = "mac_esp", |
922 | .id = 0, | ||
923 | }; | ||
924 | |||
925 | static struct platform_device esp_1_pdev = { | ||
926 | .name = "mac_esp", | ||
927 | .id = 1, | ||
928 | }; | ||
929 | |||
930 | static struct platform_device sonic_pdev = { | ||
931 | .name = "macsonic", | ||
932 | .id = -1, | ||
933 | }; | ||
934 | |||
935 | static struct platform_device mace_pdev = { | ||
936 | .name = "macmace", | ||
937 | .id = -1, | ||
890 | }; | 938 | }; |
891 | 939 | ||
892 | int __init mac_platform_init(void) | 940 | int __init mac_platform_init(void) |
893 | { | 941 | { |
894 | u8 *swim_base; | 942 | u8 *swim_base; |
895 | 943 | ||
944 | /* | ||
945 | * Serial devices | ||
946 | */ | ||
947 | |||
948 | platform_device_register(&scc_a_pdev); | ||
949 | platform_device_register(&scc_b_pdev); | ||
950 | |||
951 | /* | ||
952 | * Floppy device | ||
953 | */ | ||
954 | |||
896 | switch (macintosh_config->floppy_type) { | 955 | switch (macintosh_config->floppy_type) { |
897 | case MAC_FLOPPY_SWIM_ADDR1: | 956 | case MAC_FLOPPY_SWIM_ADDR1: |
898 | swim_base = (u8 *)(VIA1_BASE + 0x1E000); | 957 | swim_base = (u8 *)(VIA1_BASE + 0x1E000); |
@@ -901,16 +960,47 @@ int __init mac_platform_init(void) | |||
901 | swim_base = (u8 *)(VIA1_BASE + 0x16000); | 960 | swim_base = (u8 *)(VIA1_BASE + 0x16000); |
902 | break; | 961 | break; |
903 | default: | 962 | default: |
904 | return 0; | 963 | swim_base = NULL; |
964 | break; | ||
905 | } | 965 | } |
906 | 966 | ||
907 | swim_resources[0].name = "swim-regs"; | 967 | if (swim_base) { |
908 | swim_resources[0].start = (resource_size_t)swim_base; | 968 | swim_rsrc.start = (resource_size_t) swim_base, |
909 | swim_resources[0].end = (resource_size_t)(swim_base + SWIM_IO_SIZE); | 969 | swim_rsrc.end = (resource_size_t) swim_base + 0x2000, |
910 | swim_resources[0].flags = IORESOURCE_MEM; | 970 | platform_device_register(&swim_pdev); |
971 | } | ||
972 | |||
973 | /* | ||
974 | * SCSI device(s) | ||
975 | */ | ||
976 | |||
977 | switch (macintosh_config->scsi_type) { | ||
978 | case MAC_SCSI_QUADRA: | ||
979 | case MAC_SCSI_QUADRA3: | ||
980 | platform_device_register(&esp_0_pdev); | ||
981 | break; | ||
982 | case MAC_SCSI_QUADRA2: | ||
983 | platform_device_register(&esp_0_pdev); | ||
984 | if ((macintosh_config->ident == MAC_MODEL_Q900) || | ||
985 | (macintosh_config->ident == MAC_MODEL_Q950)) | ||
986 | platform_device_register(&esp_1_pdev); | ||
987 | break; | ||
988 | } | ||
989 | |||
990 | /* | ||
991 | * Ethernet device | ||
992 | */ | ||
993 | |||
994 | switch (macintosh_config->ether_type) { | ||
995 | case MAC_ETHER_SONIC: | ||
996 | platform_device_register(&sonic_pdev); | ||
997 | break; | ||
998 | case MAC_ETHER_MACE: | ||
999 | platform_device_register(&mace_pdev); | ||
1000 | break; | ||
1001 | } | ||
911 | 1002 | ||
912 | return platform_add_devices(mac_platform_devices, | 1003 | return 0; |
913 | ARRAY_SIZE(mac_platform_devices)); | ||
914 | } | 1004 | } |
915 | 1005 | ||
916 | arch_initcall(mac_platform_init); | 1006 | arch_initcall(mac_platform_init); |