diff options
Diffstat (limited to 'arch/m68k/mac/config.c')
-rw-r--r-- | arch/m68k/mac/config.c | 93 |
1 files changed, 62 insertions, 31 deletions
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index c247de02bc7..f60ff5f5920 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c @@ -71,6 +71,31 @@ static void mac_get_model(char *str); static void mac_identify(void); static void mac_report_hardware(void); +#ifdef CONFIG_EARLY_PRINTK +asmlinkage void __init mac_early_print(const char *s, unsigned n); + +static void __init mac_early_cons_write(struct console *con, + const char *s, unsigned n) +{ + mac_early_print(s, n); +} + +static struct console __initdata mac_early_cons = { + .name = "early", + .write = mac_early_cons_write, + .flags = CON_PRINTBUFFER | CON_BOOT, + .index = -1 +}; + +int __init mac_unregister_early_cons(void) +{ + /* mac_early_print can't be used after init sections are discarded */ + return unregister_console(&mac_early_cons); +} + +late_initcall(mac_unregister_early_cons); +#endif + static void __init mac_sched_init(irq_handler_t vector) { via_init_clock(vector); @@ -164,6 +189,10 @@ void __init config_mac(void) mach_beep = mac_mksound; #endif +#ifdef CONFIG_EARLY_PRINTK + register_console(&mac_early_cons); +#endif + /* * Determine hardware present */ @@ -192,7 +221,7 @@ void __init config_mac(void) * inaccurate, so look here if a new Mac model won't run. Example: if * a Mac crashes immediately after the VIA1 registers have been dumped * to the screen, it probably died attempting to read DirB on a RBV. - * Meaning it should have MAC_VIA_IIci here :-) + * Meaning it should have MAC_VIA_IICI here :-) */ struct mac_model *macintosh_config; @@ -267,7 +296,7 @@ static struct mac_model mac_data_table[] = { .ident = MAC_MODEL_IICI, .name = "IIci", .adb_type = MAC_ADB_II, - .via_type = MAC_VIA_IIci, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS, @@ -276,7 +305,7 @@ static struct mac_model mac_data_table[] = { .ident = MAC_MODEL_IIFX, .name = "IIfx", .adb_type = MAC_ADB_IOP, - .via_type = MAC_VIA_IIci, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_IOP, .nubus_type = MAC_NUBUS, @@ -285,7 +314,7 @@ static struct mac_model mac_data_table[] = { .ident = MAC_MODEL_IISI, .name = "IIsi", .adb_type = MAC_ADB_IISI, - .via_type = MAC_VIA_IIci, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS, @@ -294,7 +323,7 @@ static struct mac_model mac_data_table[] = { .ident = MAC_MODEL_IIVI, .name = "IIvi", .adb_type = MAC_ADB_IISI, - .via_type = MAC_VIA_IIci, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS, @@ -303,7 +332,7 @@ static struct mac_model mac_data_table[] = { .ident = MAC_MODEL_IIVX, .name = "IIvx", .adb_type = MAC_ADB_IISI, - .via_type = MAC_VIA_IIci, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS, @@ -318,7 +347,7 @@ static struct mac_model mac_data_table[] = { .ident = MAC_MODEL_CLII, .name = "Classic II", .adb_type = MAC_ADB_IISI, - .via_type = MAC_VIA_IIci, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS, @@ -327,7 +356,7 @@ static struct mac_model mac_data_table[] = { .ident = MAC_MODEL_CCL, .name = "Color Classic", .adb_type = MAC_ADB_CUDA, - .via_type = MAC_VIA_IIci, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS, @@ -336,7 +365,7 @@ static struct mac_model mac_data_table[] = { .ident = MAC_MODEL_CCLII, .name = "Color Classic II", .adb_type = MAC_ADB_CUDA, - .via_type = MAC_VIA_IIci, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS, @@ -351,7 +380,7 @@ static struct mac_model mac_data_table[] = { .ident = MAC_MODEL_LC, .name = "LC", .adb_type = MAC_ADB_IISI, - .via_type = MAC_VIA_IIci, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS, @@ -360,7 +389,7 @@ static struct mac_model mac_data_table[] = { .ident = MAC_MODEL_LCII, .name = "LC II", .adb_type = MAC_ADB_IISI, - .via_type = MAC_VIA_IIci, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS, @@ -369,7 +398,7 @@ static struct mac_model mac_data_table[] = { .ident = MAC_MODEL_LCIII, .name = "LC III", .adb_type = MAC_ADB_IISI, - .via_type = MAC_VIA_IIci, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS, @@ -497,7 +526,7 @@ static struct mac_model mac_data_table[] = { .ident = MAC_MODEL_P460, .name = "Performa 460", .adb_type = MAC_ADB_IISI, - .via_type = MAC_VIA_IIci, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS, @@ -524,7 +553,7 @@ static struct mac_model mac_data_table[] = { .ident = MAC_MODEL_P520, .name = "Performa 520", .adb_type = MAC_ADB_CUDA, - .via_type = MAC_VIA_IIci, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS, @@ -533,7 +562,7 @@ static struct mac_model mac_data_table[] = { .ident = MAC_MODEL_P550, .name = "Performa 550", .adb_type = MAC_ADB_CUDA, - .via_type = MAC_VIA_IIci, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS, @@ -565,7 +594,7 @@ static struct mac_model mac_data_table[] = { .ident = MAC_MODEL_TV, .name = "TV", .adb_type = MAC_ADB_CUDA, - .via_type = MAC_VIA_QUADRA, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS, @@ -574,7 +603,7 @@ static struct mac_model mac_data_table[] = { .ident = MAC_MODEL_P600, .name = "Performa 600", .adb_type = MAC_ADB_IISI, - .via_type = MAC_VIA_IIci, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_II, .nubus_type = MAC_NUBUS, @@ -645,8 +674,8 @@ static struct mac_model mac_data_table[] = { }, { .ident = MAC_MODEL_PB150, .name = "PowerBook 150", - .adb_type = MAC_ADB_PB1, - .via_type = MAC_VIA_IIci, + .adb_type = MAC_ADB_PB2, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .ide_type = MAC_IDE_PB, .scc_type = MAC_SCC_QUADRA, @@ -732,17 +761,13 @@ static struct mac_model mac_data_table[] = { * PowerBook Duos are pretty much like normal PowerBooks * All of these probably have onboard SONIC in the Dock which * means we'll have to probe for it eventually. - * - * Are these really MAC_VIA_IIci? The developer notes for the - * Duos show pretty much the same custom parts as in most of - * the other PowerBooks which would imply MAC_VIA_QUADRA. */ { .ident = MAC_MODEL_PB210, .name = "PowerBook Duo 210", .adb_type = MAC_ADB_PB2, - .via_type = MAC_VIA_IIci, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS, @@ -751,7 +776,7 @@ static struct mac_model mac_data_table[] = { .ident = MAC_MODEL_PB230, .name = "PowerBook Duo 230", .adb_type = MAC_ADB_PB2, - .via_type = MAC_VIA_IIci, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS, @@ -760,7 +785,7 @@ static struct mac_model mac_data_table[] = { .ident = MAC_MODEL_PB250, .name = "PowerBook Duo 250", .adb_type = MAC_ADB_PB2, - .via_type = MAC_VIA_IIci, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS, @@ -769,7 +794,7 @@ static struct mac_model mac_data_table[] = { .ident = MAC_MODEL_PB270C, .name = "PowerBook Duo 270c", .adb_type = MAC_ADB_PB2, - .via_type = MAC_VIA_IIci, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS, @@ -778,7 +803,7 @@ static struct mac_model mac_data_table[] = { .ident = MAC_MODEL_PB280, .name = "PowerBook Duo 280", .adb_type = MAC_ADB_PB2, - .via_type = MAC_VIA_IIci, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS, @@ -787,7 +812,7 @@ static struct mac_model mac_data_table[] = { .ident = MAC_MODEL_PB280C, .name = "PowerBook Duo 280c", .adb_type = MAC_ADB_PB2, - .via_type = MAC_VIA_IIci, + .via_type = MAC_VIA_IICI, .scsi_type = MAC_SCSI_OLD, .scc_type = MAC_SCC_QUADRA, .nubus_type = MAC_NUBUS, @@ -864,8 +889,14 @@ static void __init mac_identify(void) scc_b_rsrcs[1].start = scc_b_rsrcs[1].end = IRQ_MAC_SCC_B; break; default: - scc_a_rsrcs[1].start = scc_a_rsrcs[1].end = IRQ_MAC_SCC; - scc_b_rsrcs[1].start = scc_b_rsrcs[1].end = IRQ_MAC_SCC; + /* On non-PSC machines, the serial ports share an IRQ. */ + if (macintosh_config->ident == MAC_MODEL_IIFX) { + scc_a_rsrcs[1].start = scc_a_rsrcs[1].end = IRQ_MAC_SCC; + scc_b_rsrcs[1].start = scc_b_rsrcs[1].end = IRQ_MAC_SCC; + } else { + scc_a_rsrcs[1].start = scc_a_rsrcs[1].end = IRQ_AUTO_4; + scc_b_rsrcs[1].start = scc_b_rsrcs[1].end = IRQ_AUTO_4; + } break; } |