aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/mac/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k/mac/config.c')
-rw-r--r--arch/m68k/mac/config.c93
1 files changed, 62 insertions, 31 deletions
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c
index c247de02bc7e..f60ff5f59205 100644
--- a/arch/m68k/mac/config.c
+++ b/arch/m68k/mac/config.c
@@ -71,6 +71,31 @@ static void mac_get_model(char *str);
71static void mac_identify(void); 71static void mac_identify(void);
72static void mac_report_hardware(void); 72static void mac_report_hardware(void);
73 73
74#ifdef CONFIG_EARLY_PRINTK
75asmlinkage void __init mac_early_print(const char *s, unsigned n);
76
77static void __init mac_early_cons_write(struct console *con,
78 const char *s, unsigned n)
79{
80 mac_early_print(s, n);
81}
82
83static struct console __initdata mac_early_cons = {
84 .name = "early",
85 .write = mac_early_cons_write,
86 .flags = CON_PRINTBUFFER | CON_BOOT,
87 .index = -1
88};
89
90int __init mac_unregister_early_cons(void)
91{
92 /* mac_early_print can't be used after init sections are discarded */
93 return unregister_console(&mac_early_cons);
94}
95
96late_initcall(mac_unregister_early_cons);
97#endif
98
74static void __init mac_sched_init(irq_handler_t vector) 99static void __init mac_sched_init(irq_handler_t vector)
75{ 100{
76 via_init_clock(vector); 101 via_init_clock(vector);
@@ -164,6 +189,10 @@ void __init config_mac(void)
164 mach_beep = mac_mksound; 189 mach_beep = mac_mksound;
165#endif 190#endif
166 191
192#ifdef CONFIG_EARLY_PRINTK
193 register_console(&mac_early_cons);
194#endif
195
167 /* 196 /*
168 * Determine hardware present 197 * Determine hardware present
169 */ 198 */
@@ -192,7 +221,7 @@ void __init config_mac(void)
192 * inaccurate, so look here if a new Mac model won't run. Example: if 221 * inaccurate, so look here if a new Mac model won't run. Example: if
193 * a Mac crashes immediately after the VIA1 registers have been dumped 222 * a Mac crashes immediately after the VIA1 registers have been dumped
194 * to the screen, it probably died attempting to read DirB on a RBV. 223 * to the screen, it probably died attempting to read DirB on a RBV.
195 * Meaning it should have MAC_VIA_IIci here :-) 224 * Meaning it should have MAC_VIA_IICI here :-)
196 */ 225 */
197 226
198struct mac_model *macintosh_config; 227struct mac_model *macintosh_config;
@@ -267,7 +296,7 @@ static struct mac_model mac_data_table[] = {
267 .ident = MAC_MODEL_IICI, 296 .ident = MAC_MODEL_IICI,
268 .name = "IIci", 297 .name = "IIci",
269 .adb_type = MAC_ADB_II, 298 .adb_type = MAC_ADB_II,
270 .via_type = MAC_VIA_IIci, 299 .via_type = MAC_VIA_IICI,
271 .scsi_type = MAC_SCSI_OLD, 300 .scsi_type = MAC_SCSI_OLD,
272 .scc_type = MAC_SCC_II, 301 .scc_type = MAC_SCC_II,
273 .nubus_type = MAC_NUBUS, 302 .nubus_type = MAC_NUBUS,
@@ -276,7 +305,7 @@ static struct mac_model mac_data_table[] = {
276 .ident = MAC_MODEL_IIFX, 305 .ident = MAC_MODEL_IIFX,
277 .name = "IIfx", 306 .name = "IIfx",
278 .adb_type = MAC_ADB_IOP, 307 .adb_type = MAC_ADB_IOP,
279 .via_type = MAC_VIA_IIci, 308 .via_type = MAC_VIA_IICI,
280 .scsi_type = MAC_SCSI_OLD, 309 .scsi_type = MAC_SCSI_OLD,
281 .scc_type = MAC_SCC_IOP, 310 .scc_type = MAC_SCC_IOP,
282 .nubus_type = MAC_NUBUS, 311 .nubus_type = MAC_NUBUS,
@@ -285,7 +314,7 @@ static struct mac_model mac_data_table[] = {
285 .ident = MAC_MODEL_IISI, 314 .ident = MAC_MODEL_IISI,
286 .name = "IIsi", 315 .name = "IIsi",
287 .adb_type = MAC_ADB_IISI, 316 .adb_type = MAC_ADB_IISI,
288 .via_type = MAC_VIA_IIci, 317 .via_type = MAC_VIA_IICI,
289 .scsi_type = MAC_SCSI_OLD, 318 .scsi_type = MAC_SCSI_OLD,
290 .scc_type = MAC_SCC_II, 319 .scc_type = MAC_SCC_II,
291 .nubus_type = MAC_NUBUS, 320 .nubus_type = MAC_NUBUS,
@@ -294,7 +323,7 @@ static struct mac_model mac_data_table[] = {
294 .ident = MAC_MODEL_IIVI, 323 .ident = MAC_MODEL_IIVI,
295 .name = "IIvi", 324 .name = "IIvi",
296 .adb_type = MAC_ADB_IISI, 325 .adb_type = MAC_ADB_IISI,
297 .via_type = MAC_VIA_IIci, 326 .via_type = MAC_VIA_IICI,
298 .scsi_type = MAC_SCSI_OLD, 327 .scsi_type = MAC_SCSI_OLD,
299 .scc_type = MAC_SCC_II, 328 .scc_type = MAC_SCC_II,
300 .nubus_type = MAC_NUBUS, 329 .nubus_type = MAC_NUBUS,
@@ -303,7 +332,7 @@ static struct mac_model mac_data_table[] = {
303 .ident = MAC_MODEL_IIVX, 332 .ident = MAC_MODEL_IIVX,
304 .name = "IIvx", 333 .name = "IIvx",
305 .adb_type = MAC_ADB_IISI, 334 .adb_type = MAC_ADB_IISI,
306 .via_type = MAC_VIA_IIci, 335 .via_type = MAC_VIA_IICI,
307 .scsi_type = MAC_SCSI_OLD, 336 .scsi_type = MAC_SCSI_OLD,
308 .scc_type = MAC_SCC_II, 337 .scc_type = MAC_SCC_II,
309 .nubus_type = MAC_NUBUS, 338 .nubus_type = MAC_NUBUS,
@@ -318,7 +347,7 @@ static struct mac_model mac_data_table[] = {
318 .ident = MAC_MODEL_CLII, 347 .ident = MAC_MODEL_CLII,
319 .name = "Classic II", 348 .name = "Classic II",
320 .adb_type = MAC_ADB_IISI, 349 .adb_type = MAC_ADB_IISI,
321 .via_type = MAC_VIA_IIci, 350 .via_type = MAC_VIA_IICI,
322 .scsi_type = MAC_SCSI_OLD, 351 .scsi_type = MAC_SCSI_OLD,
323 .scc_type = MAC_SCC_II, 352 .scc_type = MAC_SCC_II,
324 .nubus_type = MAC_NUBUS, 353 .nubus_type = MAC_NUBUS,
@@ -327,7 +356,7 @@ static struct mac_model mac_data_table[] = {
327 .ident = MAC_MODEL_CCL, 356 .ident = MAC_MODEL_CCL,
328 .name = "Color Classic", 357 .name = "Color Classic",
329 .adb_type = MAC_ADB_CUDA, 358 .adb_type = MAC_ADB_CUDA,
330 .via_type = MAC_VIA_IIci, 359 .via_type = MAC_VIA_IICI,
331 .scsi_type = MAC_SCSI_OLD, 360 .scsi_type = MAC_SCSI_OLD,
332 .scc_type = MAC_SCC_II, 361 .scc_type = MAC_SCC_II,
333 .nubus_type = MAC_NUBUS, 362 .nubus_type = MAC_NUBUS,
@@ -336,7 +365,7 @@ static struct mac_model mac_data_table[] = {
336 .ident = MAC_MODEL_CCLII, 365 .ident = MAC_MODEL_CCLII,
337 .name = "Color Classic II", 366 .name = "Color Classic II",
338 .adb_type = MAC_ADB_CUDA, 367 .adb_type = MAC_ADB_CUDA,
339 .via_type = MAC_VIA_IIci, 368 .via_type = MAC_VIA_IICI,
340 .scsi_type = MAC_SCSI_OLD, 369 .scsi_type = MAC_SCSI_OLD,
341 .scc_type = MAC_SCC_II, 370 .scc_type = MAC_SCC_II,
342 .nubus_type = MAC_NUBUS, 371 .nubus_type = MAC_NUBUS,
@@ -351,7 +380,7 @@ static struct mac_model mac_data_table[] = {
351 .ident = MAC_MODEL_LC, 380 .ident = MAC_MODEL_LC,
352 .name = "LC", 381 .name = "LC",
353 .adb_type = MAC_ADB_IISI, 382 .adb_type = MAC_ADB_IISI,
354 .via_type = MAC_VIA_IIci, 383 .via_type = MAC_VIA_IICI,
355 .scsi_type = MAC_SCSI_OLD, 384 .scsi_type = MAC_SCSI_OLD,
356 .scc_type = MAC_SCC_II, 385 .scc_type = MAC_SCC_II,
357 .nubus_type = MAC_NUBUS, 386 .nubus_type = MAC_NUBUS,
@@ -360,7 +389,7 @@ static struct mac_model mac_data_table[] = {
360 .ident = MAC_MODEL_LCII, 389 .ident = MAC_MODEL_LCII,
361 .name = "LC II", 390 .name = "LC II",
362 .adb_type = MAC_ADB_IISI, 391 .adb_type = MAC_ADB_IISI,
363 .via_type = MAC_VIA_IIci, 392 .via_type = MAC_VIA_IICI,
364 .scsi_type = MAC_SCSI_OLD, 393 .scsi_type = MAC_SCSI_OLD,
365 .scc_type = MAC_SCC_II, 394 .scc_type = MAC_SCC_II,
366 .nubus_type = MAC_NUBUS, 395 .nubus_type = MAC_NUBUS,
@@ -369,7 +398,7 @@ static struct mac_model mac_data_table[] = {
369 .ident = MAC_MODEL_LCIII, 398 .ident = MAC_MODEL_LCIII,
370 .name = "LC III", 399 .name = "LC III",
371 .adb_type = MAC_ADB_IISI, 400 .adb_type = MAC_ADB_IISI,
372 .via_type = MAC_VIA_IIci, 401 .via_type = MAC_VIA_IICI,
373 .scsi_type = MAC_SCSI_OLD, 402 .scsi_type = MAC_SCSI_OLD,
374 .scc_type = MAC_SCC_II, 403 .scc_type = MAC_SCC_II,
375 .nubus_type = MAC_NUBUS, 404 .nubus_type = MAC_NUBUS,
@@ -497,7 +526,7 @@ static struct mac_model mac_data_table[] = {
497 .ident = MAC_MODEL_P460, 526 .ident = MAC_MODEL_P460,
498 .name = "Performa 460", 527 .name = "Performa 460",
499 .adb_type = MAC_ADB_IISI, 528 .adb_type = MAC_ADB_IISI,
500 .via_type = MAC_VIA_IIci, 529 .via_type = MAC_VIA_IICI,
501 .scsi_type = MAC_SCSI_OLD, 530 .scsi_type = MAC_SCSI_OLD,
502 .scc_type = MAC_SCC_II, 531 .scc_type = MAC_SCC_II,
503 .nubus_type = MAC_NUBUS, 532 .nubus_type = MAC_NUBUS,
@@ -524,7 +553,7 @@ static struct mac_model mac_data_table[] = {
524 .ident = MAC_MODEL_P520, 553 .ident = MAC_MODEL_P520,
525 .name = "Performa 520", 554 .name = "Performa 520",
526 .adb_type = MAC_ADB_CUDA, 555 .adb_type = MAC_ADB_CUDA,
527 .via_type = MAC_VIA_IIci, 556 .via_type = MAC_VIA_IICI,
528 .scsi_type = MAC_SCSI_OLD, 557 .scsi_type = MAC_SCSI_OLD,
529 .scc_type = MAC_SCC_II, 558 .scc_type = MAC_SCC_II,
530 .nubus_type = MAC_NUBUS, 559 .nubus_type = MAC_NUBUS,
@@ -533,7 +562,7 @@ static struct mac_model mac_data_table[] = {
533 .ident = MAC_MODEL_P550, 562 .ident = MAC_MODEL_P550,
534 .name = "Performa 550", 563 .name = "Performa 550",
535 .adb_type = MAC_ADB_CUDA, 564 .adb_type = MAC_ADB_CUDA,
536 .via_type = MAC_VIA_IIci, 565 .via_type = MAC_VIA_IICI,
537 .scsi_type = MAC_SCSI_OLD, 566 .scsi_type = MAC_SCSI_OLD,
538 .scc_type = MAC_SCC_II, 567 .scc_type = MAC_SCC_II,
539 .nubus_type = MAC_NUBUS, 568 .nubus_type = MAC_NUBUS,
@@ -565,7 +594,7 @@ static struct mac_model mac_data_table[] = {
565 .ident = MAC_MODEL_TV, 594 .ident = MAC_MODEL_TV,
566 .name = "TV", 595 .name = "TV",
567 .adb_type = MAC_ADB_CUDA, 596 .adb_type = MAC_ADB_CUDA,
568 .via_type = MAC_VIA_QUADRA, 597 .via_type = MAC_VIA_IICI,
569 .scsi_type = MAC_SCSI_OLD, 598 .scsi_type = MAC_SCSI_OLD,
570 .scc_type = MAC_SCC_II, 599 .scc_type = MAC_SCC_II,
571 .nubus_type = MAC_NUBUS, 600 .nubus_type = MAC_NUBUS,
@@ -574,7 +603,7 @@ static struct mac_model mac_data_table[] = {
574 .ident = MAC_MODEL_P600, 603 .ident = MAC_MODEL_P600,
575 .name = "Performa 600", 604 .name = "Performa 600",
576 .adb_type = MAC_ADB_IISI, 605 .adb_type = MAC_ADB_IISI,
577 .via_type = MAC_VIA_IIci, 606 .via_type = MAC_VIA_IICI,
578 .scsi_type = MAC_SCSI_OLD, 607 .scsi_type = MAC_SCSI_OLD,
579 .scc_type = MAC_SCC_II, 608 .scc_type = MAC_SCC_II,
580 .nubus_type = MAC_NUBUS, 609 .nubus_type = MAC_NUBUS,
@@ -645,8 +674,8 @@ static struct mac_model mac_data_table[] = {
645 }, { 674 }, {
646 .ident = MAC_MODEL_PB150, 675 .ident = MAC_MODEL_PB150,
647 .name = "PowerBook 150", 676 .name = "PowerBook 150",
648 .adb_type = MAC_ADB_PB1, 677 .adb_type = MAC_ADB_PB2,
649 .via_type = MAC_VIA_IIci, 678 .via_type = MAC_VIA_IICI,
650 .scsi_type = MAC_SCSI_OLD, 679 .scsi_type = MAC_SCSI_OLD,
651 .ide_type = MAC_IDE_PB, 680 .ide_type = MAC_IDE_PB,
652 .scc_type = MAC_SCC_QUADRA, 681 .scc_type = MAC_SCC_QUADRA,
@@ -732,17 +761,13 @@ static struct mac_model mac_data_table[] = {
732 * PowerBook Duos are pretty much like normal PowerBooks 761 * PowerBook Duos are pretty much like normal PowerBooks
733 * All of these probably have onboard SONIC in the Dock which 762 * All of these probably have onboard SONIC in the Dock which
734 * means we'll have to probe for it eventually. 763 * means we'll have to probe for it eventually.
735 *
736 * Are these really MAC_VIA_IIci? The developer notes for the
737 * Duos show pretty much the same custom parts as in most of
738 * the other PowerBooks which would imply MAC_VIA_QUADRA.
739 */ 764 */
740 765
741 { 766 {
742 .ident = MAC_MODEL_PB210, 767 .ident = MAC_MODEL_PB210,
743 .name = "PowerBook Duo 210", 768 .name = "PowerBook Duo 210",
744 .adb_type = MAC_ADB_PB2, 769 .adb_type = MAC_ADB_PB2,
745 .via_type = MAC_VIA_IIci, 770 .via_type = MAC_VIA_IICI,
746 .scsi_type = MAC_SCSI_OLD, 771 .scsi_type = MAC_SCSI_OLD,
747 .scc_type = MAC_SCC_QUADRA, 772 .scc_type = MAC_SCC_QUADRA,
748 .nubus_type = MAC_NUBUS, 773 .nubus_type = MAC_NUBUS,
@@ -751,7 +776,7 @@ static struct mac_model mac_data_table[] = {
751 .ident = MAC_MODEL_PB230, 776 .ident = MAC_MODEL_PB230,
752 .name = "PowerBook Duo 230", 777 .name = "PowerBook Duo 230",
753 .adb_type = MAC_ADB_PB2, 778 .adb_type = MAC_ADB_PB2,
754 .via_type = MAC_VIA_IIci, 779 .via_type = MAC_VIA_IICI,
755 .scsi_type = MAC_SCSI_OLD, 780 .scsi_type = MAC_SCSI_OLD,
756 .scc_type = MAC_SCC_QUADRA, 781 .scc_type = MAC_SCC_QUADRA,
757 .nubus_type = MAC_NUBUS, 782 .nubus_type = MAC_NUBUS,
@@ -760,7 +785,7 @@ static struct mac_model mac_data_table[] = {
760 .ident = MAC_MODEL_PB250, 785 .ident = MAC_MODEL_PB250,
761 .name = "PowerBook Duo 250", 786 .name = "PowerBook Duo 250",
762 .adb_type = MAC_ADB_PB2, 787 .adb_type = MAC_ADB_PB2,
763 .via_type = MAC_VIA_IIci, 788 .via_type = MAC_VIA_IICI,
764 .scsi_type = MAC_SCSI_OLD, 789 .scsi_type = MAC_SCSI_OLD,
765 .scc_type = MAC_SCC_QUADRA, 790 .scc_type = MAC_SCC_QUADRA,
766 .nubus_type = MAC_NUBUS, 791 .nubus_type = MAC_NUBUS,
@@ -769,7 +794,7 @@ static struct mac_model mac_data_table[] = {
769 .ident = MAC_MODEL_PB270C, 794 .ident = MAC_MODEL_PB270C,
770 .name = "PowerBook Duo 270c", 795 .name = "PowerBook Duo 270c",
771 .adb_type = MAC_ADB_PB2, 796 .adb_type = MAC_ADB_PB2,
772 .via_type = MAC_VIA_IIci, 797 .via_type = MAC_VIA_IICI,
773 .scsi_type = MAC_SCSI_OLD, 798 .scsi_type = MAC_SCSI_OLD,
774 .scc_type = MAC_SCC_QUADRA, 799 .scc_type = MAC_SCC_QUADRA,
775 .nubus_type = MAC_NUBUS, 800 .nubus_type = MAC_NUBUS,
@@ -778,7 +803,7 @@ static struct mac_model mac_data_table[] = {
778 .ident = MAC_MODEL_PB280, 803 .ident = MAC_MODEL_PB280,
779 .name = "PowerBook Duo 280", 804 .name = "PowerBook Duo 280",
780 .adb_type = MAC_ADB_PB2, 805 .adb_type = MAC_ADB_PB2,
781 .via_type = MAC_VIA_IIci, 806 .via_type = MAC_VIA_IICI,
782 .scsi_type = MAC_SCSI_OLD, 807 .scsi_type = MAC_SCSI_OLD,
783 .scc_type = MAC_SCC_QUADRA, 808 .scc_type = MAC_SCC_QUADRA,
784 .nubus_type = MAC_NUBUS, 809 .nubus_type = MAC_NUBUS,
@@ -787,7 +812,7 @@ static struct mac_model mac_data_table[] = {
787 .ident = MAC_MODEL_PB280C, 812 .ident = MAC_MODEL_PB280C,
788 .name = "PowerBook Duo 280c", 813 .name = "PowerBook Duo 280c",
789 .adb_type = MAC_ADB_PB2, 814 .adb_type = MAC_ADB_PB2,
790 .via_type = MAC_VIA_IIci, 815 .via_type = MAC_VIA_IICI,
791 .scsi_type = MAC_SCSI_OLD, 816 .scsi_type = MAC_SCSI_OLD,
792 .scc_type = MAC_SCC_QUADRA, 817 .scc_type = MAC_SCC_QUADRA,
793 .nubus_type = MAC_NUBUS, 818 .nubus_type = MAC_NUBUS,
@@ -864,8 +889,14 @@ static void __init mac_identify(void)
864 scc_b_rsrcs[1].start = scc_b_rsrcs[1].end = IRQ_MAC_SCC_B; 889 scc_b_rsrcs[1].start = scc_b_rsrcs[1].end = IRQ_MAC_SCC_B;
865 break; 890 break;
866 default: 891 default:
867 scc_a_rsrcs[1].start = scc_a_rsrcs[1].end = IRQ_MAC_SCC; 892 /* On non-PSC machines, the serial ports share an IRQ. */
868 scc_b_rsrcs[1].start = scc_b_rsrcs[1].end = IRQ_MAC_SCC; 893 if (macintosh_config->ident == MAC_MODEL_IIFX) {
894 scc_a_rsrcs[1].start = scc_a_rsrcs[1].end = IRQ_MAC_SCC;
895 scc_b_rsrcs[1].start = scc_b_rsrcs[1].end = IRQ_MAC_SCC;
896 } else {
897 scc_a_rsrcs[1].start = scc_a_rsrcs[1].end = IRQ_AUTO_4;
898 scc_b_rsrcs[1].start = scc_b_rsrcs[1].end = IRQ_AUTO_4;
899 }
869 break; 900 break;
870 } 901 }
871 902