hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/arch/m68k/mac/config.c
....@@ -24,6 +24,7 @@
2424 #include <linux/init.h>
2525 #include <linux/vt_kern.h>
2626 #include <linux/platform_device.h>
27
+#include <linux/ata_platform.h>
2728 #include <linux/adb.h>
2829 #include <linux/cuda.h>
2930 #include <linux/pmu.h>
....@@ -36,7 +37,6 @@
3637
3738 #include <asm/io.h>
3839 #include <asm/irq.h>
39
-#include <asm/pgtable.h>
4040 #include <asm/machdep.h>
4141
4242 #include <asm/macintosh.h>
....@@ -54,8 +54,6 @@
5454 /* The phys. video addr. - might be bogus on some machines */
5555 static unsigned long mac_orig_videoaddr;
5656
57
-/* Mac specific timer functions */
58
-extern u32 mac_gettimeoffset(void);
5957 extern int mac_hwclk(int, struct rtc_time *);
6058 extern void iop_preinit(void);
6159 extern void iop_init(void);
....@@ -139,7 +137,6 @@
139137 mach_sched_init = mac_sched_init;
140138 mach_init_IRQ = mac_init_IRQ;
141139 mach_get_model = mac_get_model;
142
- arch_gettimeoffset = mac_gettimeoffset;
143140 mach_hwclk = mac_hwclk;
144141 mach_reset = mac_reset;
145142 mach_halt = mac_poweroff;
....@@ -195,7 +192,7 @@
195192 .scsi_type = MAC_SCSI_OLD,
196193 .scc_type = MAC_SCC_II,
197194 .expansion_type = MAC_EXP_NUBUS,
198
- .floppy_type = MAC_FLOPPY_IWM,
195
+ .floppy_type = MAC_FLOPPY_UNSUPPORTED, /* IWM */
199196 },
200197
201198 /*
....@@ -210,7 +207,7 @@
210207 .scsi_type = MAC_SCSI_OLD,
211208 .scc_type = MAC_SCC_II,
212209 .expansion_type = MAC_EXP_NUBUS,
213
- .floppy_type = MAC_FLOPPY_IWM,
210
+ .floppy_type = MAC_FLOPPY_UNSUPPORTED, /* IWM */
214211 }, {
215212 .ident = MAC_MODEL_IIX,
216213 .name = "IIx",
....@@ -219,7 +216,7 @@
219216 .scsi_type = MAC_SCSI_OLD,
220217 .scc_type = MAC_SCC_II,
221218 .expansion_type = MAC_EXP_NUBUS,
222
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
219
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM */
223220 }, {
224221 .ident = MAC_MODEL_IICX,
225222 .name = "IIcx",
....@@ -228,7 +225,7 @@
228225 .scsi_type = MAC_SCSI_OLD,
229226 .scc_type = MAC_SCC_II,
230227 .expansion_type = MAC_EXP_NUBUS,
231
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
228
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM */
232229 }, {
233230 .ident = MAC_MODEL_SE30,
234231 .name = "SE/30",
....@@ -237,7 +234,7 @@
237234 .scsi_type = MAC_SCSI_OLD,
238235 .scc_type = MAC_SCC_II,
239236 .expansion_type = MAC_EXP_PDS,
240
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
237
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM */
241238 },
242239
243240 /*
....@@ -255,7 +252,7 @@
255252 .scsi_type = MAC_SCSI_OLD,
256253 .scc_type = MAC_SCC_II,
257254 .expansion_type = MAC_EXP_NUBUS,
258
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
255
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM */
259256 }, {
260257 .ident = MAC_MODEL_IIFX,
261258 .name = "IIfx",
....@@ -264,7 +261,7 @@
264261 .scsi_type = MAC_SCSI_IIFX,
265262 .scc_type = MAC_SCC_IOP,
266263 .expansion_type = MAC_EXP_PDS_NUBUS,
267
- .floppy_type = MAC_FLOPPY_SWIM_IOP,
264
+ .floppy_type = MAC_FLOPPY_SWIM_IOP, /* SWIM */
268265 }, {
269266 .ident = MAC_MODEL_IISI,
270267 .name = "IIsi",
....@@ -273,7 +270,7 @@
273270 .scsi_type = MAC_SCSI_OLD,
274271 .scc_type = MAC_SCC_II,
275272 .expansion_type = MAC_EXP_PDS_NUBUS,
276
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
273
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM */
277274 }, {
278275 .ident = MAC_MODEL_IIVI,
279276 .name = "IIvi",
....@@ -282,7 +279,7 @@
282279 .scsi_type = MAC_SCSI_LC,
283280 .scc_type = MAC_SCC_II,
284281 .expansion_type = MAC_EXP_NUBUS,
285
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
282
+ .floppy_type = MAC_FLOPPY_LC, /* SWIM */
286283 }, {
287284 .ident = MAC_MODEL_IIVX,
288285 .name = "IIvx",
....@@ -291,7 +288,7 @@
291288 .scsi_type = MAC_SCSI_LC,
292289 .scc_type = MAC_SCC_II,
293290 .expansion_type = MAC_EXP_NUBUS,
294
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
291
+ .floppy_type = MAC_FLOPPY_LC, /* SWIM */
295292 },
296293
297294 /*
....@@ -305,7 +302,7 @@
305302 .via_type = MAC_VIA_IICI,
306303 .scsi_type = MAC_SCSI_LC,
307304 .scc_type = MAC_SCC_II,
308
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
305
+ .floppy_type = MAC_FLOPPY_LC, /* SWIM */
309306 }, {
310307 .ident = MAC_MODEL_CCL,
311308 .name = "Color Classic",
....@@ -314,7 +311,7 @@
314311 .scsi_type = MAC_SCSI_LC,
315312 .scc_type = MAC_SCC_II,
316313 .expansion_type = MAC_EXP_PDS,
317
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
314
+ .floppy_type = MAC_FLOPPY_LC, /* SWIM 2 */
318315 }, {
319316 .ident = MAC_MODEL_CCLII,
320317 .name = "Color Classic II",
....@@ -323,7 +320,7 @@
323320 .scsi_type = MAC_SCSI_LC,
324321 .scc_type = MAC_SCC_II,
325322 .expansion_type = MAC_EXP_PDS,
326
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
323
+ .floppy_type = MAC_FLOPPY_LC, /* SWIM 2 */
327324 },
328325
329326 /*
....@@ -338,7 +335,7 @@
338335 .scsi_type = MAC_SCSI_LC,
339336 .scc_type = MAC_SCC_II,
340337 .expansion_type = MAC_EXP_PDS,
341
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
338
+ .floppy_type = MAC_FLOPPY_LC, /* SWIM */
342339 }, {
343340 .ident = MAC_MODEL_LCII,
344341 .name = "LC II",
....@@ -347,7 +344,7 @@
347344 .scsi_type = MAC_SCSI_LC,
348345 .scc_type = MAC_SCC_II,
349346 .expansion_type = MAC_EXP_PDS,
350
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
347
+ .floppy_type = MAC_FLOPPY_LC, /* SWIM */
351348 }, {
352349 .ident = MAC_MODEL_LCIII,
353350 .name = "LC III",
....@@ -356,7 +353,7 @@
356353 .scsi_type = MAC_SCSI_LC,
357354 .scc_type = MAC_SCC_II,
358355 .expansion_type = MAC_EXP_PDS,
359
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
356
+ .floppy_type = MAC_FLOPPY_LC, /* SWIM 2 */
360357 },
361358
362359 /*
....@@ -377,7 +374,7 @@
377374 .scsi_type = MAC_SCSI_QUADRA,
378375 .scc_type = MAC_SCC_QUADRA,
379376 .expansion_type = MAC_EXP_PDS,
380
- .floppy_type = MAC_FLOPPY_SWIM_ADDR1,
377
+ .floppy_type = MAC_FLOPPY_QUADRA, /* SWIM 2 */
381378 }, {
382379 .ident = MAC_MODEL_Q605_ACC,
383380 .name = "Quadra 605",
....@@ -386,7 +383,7 @@
386383 .scsi_type = MAC_SCSI_QUADRA,
387384 .scc_type = MAC_SCC_QUADRA,
388385 .expansion_type = MAC_EXP_PDS,
389
- .floppy_type = MAC_FLOPPY_SWIM_ADDR1,
386
+ .floppy_type = MAC_FLOPPY_QUADRA, /* SWIM 2 */
390387 }, {
391388 .ident = MAC_MODEL_Q610,
392389 .name = "Quadra 610",
....@@ -396,7 +393,7 @@
396393 .scc_type = MAC_SCC_QUADRA,
397394 .ether_type = MAC_ETHER_SONIC,
398395 .expansion_type = MAC_EXP_PDS_NUBUS,
399
- .floppy_type = MAC_FLOPPY_SWIM_ADDR1,
396
+ .floppy_type = MAC_FLOPPY_QUADRA, /* SWIM 2 */
400397 }, {
401398 .ident = MAC_MODEL_Q630,
402399 .name = "Quadra 630",
....@@ -406,7 +403,7 @@
406403 .ide_type = MAC_IDE_QUADRA,
407404 .scc_type = MAC_SCC_QUADRA,
408405 .expansion_type = MAC_EXP_PDS_COMM,
409
- .floppy_type = MAC_FLOPPY_SWIM_ADDR1,
406
+ .floppy_type = MAC_FLOPPY_QUADRA, /* SWIM 2 */
410407 }, {
411408 .ident = MAC_MODEL_Q650,
412409 .name = "Quadra 650",
....@@ -416,7 +413,7 @@
416413 .scc_type = MAC_SCC_QUADRA,
417414 .ether_type = MAC_ETHER_SONIC,
418415 .expansion_type = MAC_EXP_PDS_NUBUS,
419
- .floppy_type = MAC_FLOPPY_SWIM_ADDR1,
416
+ .floppy_type = MAC_FLOPPY_QUADRA, /* SWIM 2 */
420417 },
421418 /* The Q700 does have a NS Sonic */
422419 {
....@@ -428,7 +425,7 @@
428425 .scc_type = MAC_SCC_QUADRA,
429426 .ether_type = MAC_ETHER_SONIC,
430427 .expansion_type = MAC_EXP_PDS_NUBUS,
431
- .floppy_type = MAC_FLOPPY_SWIM_ADDR1,
428
+ .floppy_type = MAC_FLOPPY_QUADRA, /* SWIM */
432429 }, {
433430 .ident = MAC_MODEL_Q800,
434431 .name = "Quadra 800",
....@@ -438,7 +435,7 @@
438435 .scc_type = MAC_SCC_QUADRA,
439436 .ether_type = MAC_ETHER_SONIC,
440437 .expansion_type = MAC_EXP_PDS_NUBUS,
441
- .floppy_type = MAC_FLOPPY_SWIM_ADDR1,
438
+ .floppy_type = MAC_FLOPPY_QUADRA, /* SWIM 2 */
442439 }, {
443440 .ident = MAC_MODEL_Q840,
444441 .name = "Quadra 840AV",
....@@ -448,7 +445,7 @@
448445 .scc_type = MAC_SCC_PSC,
449446 .ether_type = MAC_ETHER_MACE,
450447 .expansion_type = MAC_EXP_NUBUS,
451
- .floppy_type = MAC_FLOPPY_AV,
448
+ .floppy_type = MAC_FLOPPY_UNSUPPORTED, /* New Age */
452449 }, {
453450 .ident = MAC_MODEL_Q900,
454451 .name = "Quadra 900",
....@@ -458,7 +455,7 @@
458455 .scc_type = MAC_SCC_IOP,
459456 .ether_type = MAC_ETHER_SONIC,
460457 .expansion_type = MAC_EXP_PDS_NUBUS,
461
- .floppy_type = MAC_FLOPPY_SWIM_IOP,
458
+ .floppy_type = MAC_FLOPPY_SWIM_IOP, /* SWIM */
462459 }, {
463460 .ident = MAC_MODEL_Q950,
464461 .name = "Quadra 950",
....@@ -468,7 +465,7 @@
468465 .scc_type = MAC_SCC_IOP,
469466 .ether_type = MAC_ETHER_SONIC,
470467 .expansion_type = MAC_EXP_PDS_NUBUS,
471
- .floppy_type = MAC_FLOPPY_SWIM_IOP,
468
+ .floppy_type = MAC_FLOPPY_SWIM_IOP, /* SWIM */
472469 },
473470
474471 /*
....@@ -483,7 +480,7 @@
483480 .scsi_type = MAC_SCSI_LC,
484481 .scc_type = MAC_SCC_II,
485482 .expansion_type = MAC_EXP_PDS,
486
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
483
+ .floppy_type = MAC_FLOPPY_LC, /* SWIM 2 */
487484 }, {
488485 .ident = MAC_MODEL_P475,
489486 .name = "Performa 475",
....@@ -492,7 +489,7 @@
492489 .scsi_type = MAC_SCSI_QUADRA,
493490 .scc_type = MAC_SCC_II,
494491 .expansion_type = MAC_EXP_PDS,
495
- .floppy_type = MAC_FLOPPY_SWIM_ADDR1,
492
+ .floppy_type = MAC_FLOPPY_QUADRA, /* SWIM 2 */
496493 }, {
497494 .ident = MAC_MODEL_P475F,
498495 .name = "Performa 475",
....@@ -501,7 +498,7 @@
501498 .scsi_type = MAC_SCSI_QUADRA,
502499 .scc_type = MAC_SCC_II,
503500 .expansion_type = MAC_EXP_PDS,
504
- .floppy_type = MAC_FLOPPY_SWIM_ADDR1,
501
+ .floppy_type = MAC_FLOPPY_QUADRA, /* SWIM 2 */
505502 }, {
506503 .ident = MAC_MODEL_P520,
507504 .name = "Performa 520",
....@@ -510,7 +507,7 @@
510507 .scsi_type = MAC_SCSI_LC,
511508 .scc_type = MAC_SCC_II,
512509 .expansion_type = MAC_EXP_PDS,
513
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
510
+ .floppy_type = MAC_FLOPPY_LC, /* SWIM 2 */
514511 }, {
515512 .ident = MAC_MODEL_P550,
516513 .name = "Performa 550",
....@@ -519,7 +516,7 @@
519516 .scsi_type = MAC_SCSI_LC,
520517 .scc_type = MAC_SCC_II,
521518 .expansion_type = MAC_EXP_PDS,
522
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
519
+ .floppy_type = MAC_FLOPPY_LC, /* SWIM 2 */
523520 },
524521 /* These have the comm slot, and therefore possibly SONIC ethernet */
525522 {
....@@ -530,7 +527,7 @@
530527 .scsi_type = MAC_SCSI_QUADRA,
531528 .scc_type = MAC_SCC_II,
532529 .expansion_type = MAC_EXP_PDS_COMM,
533
- .floppy_type = MAC_FLOPPY_SWIM_ADDR1,
530
+ .floppy_type = MAC_FLOPPY_QUADRA, /* SWIM 2 */
534531 }, {
535532 .ident = MAC_MODEL_P588,
536533 .name = "Performa 588",
....@@ -540,7 +537,7 @@
540537 .ide_type = MAC_IDE_QUADRA,
541538 .scc_type = MAC_SCC_II,
542539 .expansion_type = MAC_EXP_PDS_COMM,
543
- .floppy_type = MAC_FLOPPY_SWIM_ADDR1,
540
+ .floppy_type = MAC_FLOPPY_QUADRA, /* SWIM 2 */
544541 }, {
545542 .ident = MAC_MODEL_TV,
546543 .name = "TV",
....@@ -548,7 +545,7 @@
548545 .via_type = MAC_VIA_IICI,
549546 .scsi_type = MAC_SCSI_LC,
550547 .scc_type = MAC_SCC_II,
551
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
548
+ .floppy_type = MAC_FLOPPY_LC, /* SWIM 2 */
552549 }, {
553550 .ident = MAC_MODEL_P600,
554551 .name = "Performa 600",
....@@ -557,7 +554,7 @@
557554 .scsi_type = MAC_SCSI_LC,
558555 .scc_type = MAC_SCC_II,
559556 .expansion_type = MAC_EXP_NUBUS,
560
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
557
+ .floppy_type = MAC_FLOPPY_LC, /* SWIM */
561558 },
562559
563560 /*
....@@ -574,7 +571,7 @@
574571 .scc_type = MAC_SCC_QUADRA,
575572 .ether_type = MAC_ETHER_SONIC,
576573 .expansion_type = MAC_EXP_PDS_NUBUS,
577
- .floppy_type = MAC_FLOPPY_SWIM_ADDR1,
574
+ .floppy_type = MAC_FLOPPY_QUADRA, /* SWIM 2 */
578575 }, {
579576 .ident = MAC_MODEL_C650,
580577 .name = "Centris 650",
....@@ -584,7 +581,7 @@
584581 .scc_type = MAC_SCC_QUADRA,
585582 .ether_type = MAC_ETHER_SONIC,
586583 .expansion_type = MAC_EXP_PDS_NUBUS,
587
- .floppy_type = MAC_FLOPPY_SWIM_ADDR1,
584
+ .floppy_type = MAC_FLOPPY_QUADRA, /* SWIM 2 */
588585 }, {
589586 .ident = MAC_MODEL_C660,
590587 .name = "Centris 660AV",
....@@ -594,7 +591,7 @@
594591 .scc_type = MAC_SCC_PSC,
595592 .ether_type = MAC_ETHER_MACE,
596593 .expansion_type = MAC_EXP_PDS_NUBUS,
597
- .floppy_type = MAC_FLOPPY_AV,
594
+ .floppy_type = MAC_FLOPPY_UNSUPPORTED, /* New Age */
598595 },
599596
600597 /*
....@@ -610,7 +607,7 @@
610607 .via_type = MAC_VIA_QUADRA,
611608 .scsi_type = MAC_SCSI_OLD,
612609 .scc_type = MAC_SCC_QUADRA,
613
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
610
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM */
614611 }, {
615612 .ident = MAC_MODEL_PB145,
616613 .name = "PowerBook 145",
....@@ -618,7 +615,7 @@
618615 .via_type = MAC_VIA_QUADRA,
619616 .scsi_type = MAC_SCSI_OLD,
620617 .scc_type = MAC_SCC_QUADRA,
621
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
618
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM */
622619 }, {
623620 .ident = MAC_MODEL_PB150,
624621 .name = "PowerBook 150",
....@@ -627,7 +624,7 @@
627624 .scsi_type = MAC_SCSI_OLD,
628625 .ide_type = MAC_IDE_PB,
629626 .scc_type = MAC_SCC_QUADRA,
630
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
627
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM */
631628 }, {
632629 .ident = MAC_MODEL_PB160,
633630 .name = "PowerBook 160",
....@@ -635,7 +632,7 @@
635632 .via_type = MAC_VIA_QUADRA,
636633 .scsi_type = MAC_SCSI_OLD,
637634 .scc_type = MAC_SCC_QUADRA,
638
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
635
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM */
639636 }, {
640637 .ident = MAC_MODEL_PB165,
641638 .name = "PowerBook 165",
....@@ -643,7 +640,7 @@
643640 .via_type = MAC_VIA_QUADRA,
644641 .scsi_type = MAC_SCSI_OLD,
645642 .scc_type = MAC_SCC_QUADRA,
646
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
643
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM */
647644 }, {
648645 .ident = MAC_MODEL_PB165C,
649646 .name = "PowerBook 165c",
....@@ -651,7 +648,7 @@
651648 .via_type = MAC_VIA_QUADRA,
652649 .scsi_type = MAC_SCSI_OLD,
653650 .scc_type = MAC_SCC_QUADRA,
654
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
651
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM */
655652 }, {
656653 .ident = MAC_MODEL_PB170,
657654 .name = "PowerBook 170",
....@@ -659,7 +656,7 @@
659656 .via_type = MAC_VIA_QUADRA,
660657 .scsi_type = MAC_SCSI_OLD,
661658 .scc_type = MAC_SCC_QUADRA,
662
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
659
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM */
663660 }, {
664661 .ident = MAC_MODEL_PB180,
665662 .name = "PowerBook 180",
....@@ -667,7 +664,7 @@
667664 .via_type = MAC_VIA_QUADRA,
668665 .scsi_type = MAC_SCSI_OLD,
669666 .scc_type = MAC_SCC_QUADRA,
670
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
667
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM */
671668 }, {
672669 .ident = MAC_MODEL_PB180C,
673670 .name = "PowerBook 180c",
....@@ -675,7 +672,7 @@
675672 .via_type = MAC_VIA_QUADRA,
676673 .scsi_type = MAC_SCSI_OLD,
677674 .scc_type = MAC_SCC_QUADRA,
678
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
675
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM */
679676 }, {
680677 .ident = MAC_MODEL_PB190,
681678 .name = "PowerBook 190",
....@@ -684,7 +681,7 @@
684681 .scsi_type = MAC_SCSI_OLD,
685682 .ide_type = MAC_IDE_BABOON,
686683 .scc_type = MAC_SCC_QUADRA,
687
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
684
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM 2 */
688685 }, {
689686 .ident = MAC_MODEL_PB520,
690687 .name = "PowerBook 520",
....@@ -693,7 +690,7 @@
693690 .scsi_type = MAC_SCSI_OLD,
694691 .scc_type = MAC_SCC_QUADRA,
695692 .ether_type = MAC_ETHER_SONIC,
696
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
693
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM 2 */
697694 },
698695
699696 /*
....@@ -710,7 +707,7 @@
710707 .scsi_type = MAC_SCSI_DUO,
711708 .scc_type = MAC_SCC_QUADRA,
712709 .expansion_type = MAC_EXP_NUBUS,
713
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
710
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM */
714711 }, {
715712 .ident = MAC_MODEL_PB230,
716713 .name = "PowerBook Duo 230",
....@@ -719,7 +716,7 @@
719716 .scsi_type = MAC_SCSI_DUO,
720717 .scc_type = MAC_SCC_QUADRA,
721718 .expansion_type = MAC_EXP_NUBUS,
722
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
719
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM */
723720 }, {
724721 .ident = MAC_MODEL_PB250,
725722 .name = "PowerBook Duo 250",
....@@ -728,7 +725,7 @@
728725 .scsi_type = MAC_SCSI_DUO,
729726 .scc_type = MAC_SCC_QUADRA,
730727 .expansion_type = MAC_EXP_NUBUS,
731
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
728
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM */
732729 }, {
733730 .ident = MAC_MODEL_PB270C,
734731 .name = "PowerBook Duo 270c",
....@@ -737,7 +734,7 @@
737734 .scsi_type = MAC_SCSI_DUO,
738735 .scc_type = MAC_SCC_QUADRA,
739736 .expansion_type = MAC_EXP_NUBUS,
740
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
737
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM */
741738 }, {
742739 .ident = MAC_MODEL_PB280,
743740 .name = "PowerBook Duo 280",
....@@ -746,7 +743,7 @@
746743 .scsi_type = MAC_SCSI_DUO,
747744 .scc_type = MAC_SCC_QUADRA,
748745 .expansion_type = MAC_EXP_NUBUS,
749
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
746
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM */
750747 }, {
751748 .ident = MAC_MODEL_PB280C,
752749 .name = "PowerBook Duo 280c",
....@@ -755,7 +752,7 @@
755752 .scsi_type = MAC_SCSI_DUO,
756753 .scc_type = MAC_SCC_QUADRA,
757754 .expansion_type = MAC_EXP_NUBUS,
758
- .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
755
+ .floppy_type = MAC_FLOPPY_OLD, /* SWIM */
759756 },
760757
761758 /*
....@@ -780,16 +777,12 @@
780777 struct platform_device scc_a_pdev = {
781778 .name = "scc",
782779 .id = 0,
783
- .num_resources = ARRAY_SIZE(scc_a_rsrcs),
784
- .resource = scc_a_rsrcs,
785780 };
786781 EXPORT_SYMBOL(scc_a_pdev);
787782
788783 struct platform_device scc_b_pdev = {
789784 .name = "scc",
790785 .id = 1,
791
- .num_resources = ARRAY_SIZE(scc_b_rsrcs),
792
- .resource = scc_b_rsrcs,
793786 };
794787 EXPORT_SYMBOL(scc_b_pdev);
795788
....@@ -816,10 +809,15 @@
816809
817810 /* Set up serial port resources for the console initcall. */
818811
819
- scc_a_rsrcs[0].start = (resource_size_t) mac_bi_data.sccbase + 2;
820
- scc_a_rsrcs[0].end = scc_a_rsrcs[0].start;
821
- scc_b_rsrcs[0].start = (resource_size_t) mac_bi_data.sccbase;
822
- scc_b_rsrcs[0].end = scc_b_rsrcs[0].start;
812
+ scc_a_rsrcs[0].start = (resource_size_t)mac_bi_data.sccbase + 2;
813
+ scc_a_rsrcs[0].end = scc_a_rsrcs[0].start;
814
+ scc_a_pdev.num_resources = ARRAY_SIZE(scc_a_rsrcs);
815
+ scc_a_pdev.resource = scc_a_rsrcs;
816
+
817
+ scc_b_rsrcs[0].start = (resource_size_t)mac_bi_data.sccbase;
818
+ scc_b_rsrcs[0].end = scc_b_rsrcs[0].start;
819
+ scc_b_pdev.num_resources = ARRAY_SIZE(scc_b_rsrcs);
820
+ scc_b_pdev.resource = scc_b_rsrcs;
823821
824822 switch (macintosh_config->scc_type) {
825823 case MAC_SCC_PSC:
....@@ -897,6 +895,10 @@
897895 .flags = IORESOURCE_MEM,
898896 .start = 0x50008000,
899897 .end = 0x50009FFF,
898
+ }, {
899
+ .flags = IORESOURCE_MEM,
900
+ .start = 0x50008000,
901
+ .end = 0x50009FFF,
900902 },
901903 };
902904
....@@ -940,9 +942,29 @@
940942 },
941943 };
942944
945
+static const struct resource mac_ide_quadra_rsrc[] __initconst = {
946
+ DEFINE_RES_MEM(0x50F1A000, 0x104),
947
+ DEFINE_RES_IRQ(IRQ_NUBUS_F),
948
+};
949
+
950
+static const struct resource mac_ide_pb_rsrc[] __initconst = {
951
+ DEFINE_RES_MEM(0x50F1A000, 0x104),
952
+ DEFINE_RES_IRQ(IRQ_NUBUS_C),
953
+};
954
+
955
+static const struct resource mac_pata_baboon_rsrc[] __initconst = {
956
+ DEFINE_RES_MEM(0x50F1A000, 0x38),
957
+ DEFINE_RES_MEM(0x50F1A038, 0x04),
958
+ DEFINE_RES_IRQ(IRQ_BABOON_1),
959
+};
960
+
961
+static const struct pata_platform_info mac_pata_baboon_data __initconst = {
962
+ .ioport_shift = 2,
963
+};
964
+
943965 int __init mac_platform_init(void)
944966 {
945
- u8 *swim_base;
967
+ phys_addr_t swim_base = 0;
946968
947969 if (!MACH_IS_MAC)
948970 return -ENODEV;
....@@ -959,22 +981,22 @@
959981 */
960982
961983 switch (macintosh_config->floppy_type) {
962
- case MAC_FLOPPY_SWIM_ADDR1:
963
- swim_base = (u8 *)(VIA1_BASE + 0x1E000);
984
+ case MAC_FLOPPY_QUADRA:
985
+ swim_base = 0x5001E000;
964986 break;
965
- case MAC_FLOPPY_SWIM_ADDR2:
966
- swim_base = (u8 *)(VIA1_BASE + 0x16000);
987
+ case MAC_FLOPPY_OLD:
988
+ swim_base = 0x50016000;
967989 break;
968
- default:
969
- swim_base = NULL;
990
+ case MAC_FLOPPY_LC:
991
+ swim_base = 0x50F16000;
970992 break;
971993 }
972994
973995 if (swim_base) {
974996 struct resource swim_rsrc = {
975997 .flags = IORESOURCE_MEM,
976
- .start = (resource_size_t)swim_base,
977
- .end = (resource_size_t)swim_base + 0x1FFF,
998
+ .start = swim_base,
999
+ .end = swim_base + 0x1FFF,
9781000 };
9791001
9801002 platform_device_register_simple("swim", -1, &swim_rsrc, 1);
....@@ -998,10 +1020,12 @@
9981020 case MAC_SCSI_IIFX:
9991021 /* Addresses from The Guide to Mac Family Hardware.
10001022 * $5000 8000 - $5000 9FFF: SCSI DMA
1023
+ * $5000 A000 - $5000 BFFF: Alternate SCSI
10011024 * $5000 C000 - $5000 DFFF: Alternate SCSI (DMA)
10021025 * $5000 E000 - $5000 FFFF: Alternate SCSI (Hsk)
1003
- * The SCSI DMA custom IC embeds the 53C80 core. mac_scsi does
1004
- * not make use of its DMA or hardware handshaking logic.
1026
+ * The A/UX header file sys/uconfig.h says $50F0 8000.
1027
+ * The "SCSI DMA" custom IC embeds the 53C80 core and
1028
+ * supports Programmed IO, DMA and PDMA (hardware handshake).
10051029 */
10061030 platform_device_register_simple("mac_scsi", 0,
10071031 mac_scsi_iifx_rsrc, ARRAY_SIZE(mac_scsi_iifx_rsrc));
....@@ -1016,7 +1040,7 @@
10161040 */
10171041 platform_device_register_simple("mac_scsi", 1,
10181042 mac_scsi_duo_rsrc, ARRAY_SIZE(mac_scsi_duo_rsrc));
1019
- /* fall through */
1043
+ fallthrough;
10201044 case MAC_SCSI_OLD:
10211045 /* Addresses from Developer Notes for Duo System,
10221046 * PowerBook 180 & 160, 140 & 170, Macintosh IIsi
....@@ -1047,6 +1071,26 @@
10471071 }
10481072
10491073 /*
1074
+ * IDE device
1075
+ */
1076
+
1077
+ switch (macintosh_config->ide_type) {
1078
+ case MAC_IDE_QUADRA:
1079
+ platform_device_register_simple("mac_ide", -1,
1080
+ mac_ide_quadra_rsrc, ARRAY_SIZE(mac_ide_quadra_rsrc));
1081
+ break;
1082
+ case MAC_IDE_PB:
1083
+ platform_device_register_simple("mac_ide", -1,
1084
+ mac_ide_pb_rsrc, ARRAY_SIZE(mac_ide_pb_rsrc));
1085
+ break;
1086
+ case MAC_IDE_BABOON:
1087
+ platform_device_register_resndata(NULL, "pata_platform", -1,
1088
+ mac_pata_baboon_rsrc, ARRAY_SIZE(mac_pata_baboon_rsrc),
1089
+ &mac_pata_baboon_data, sizeof(mac_pata_baboon_data));
1090
+ break;
1091
+ }
1092
+
1093
+ /*
10501094 * Ethernet device
10511095 */
10521096