13 #include <linux/module.h>
14 #include <linux/types.h>
16 #include <linux/tty.h>
20 #include <linux/random.h>
26 #include <linux/adb.h>
27 #include <linux/cuda.h>
29 #define BOOTINFO_COMPAT_1_0
30 #include <asm/setup.h>
31 #include <asm/bootinfo.h>
35 #include <asm/pgtable.h>
37 #include <asm/machdep.h>
52 static unsigned long mac_orig_videoaddr;
67 extern void mac_mksound(
unsigned int,
unsigned int);
69 static void mac_get_model(
char *
str);
70 static void mac_identify(
void);
71 static void mac_report_hardware(
void);
73 #ifdef CONFIG_EARLY_PRINTK
77 const char *
s,
unsigned n)
79 mac_early_print(s, n);
84 .write = mac_early_cons_write,
89 int __init mac_unregister_early_cons(
void)
112 switch (record->
tag) {
130 mac_orig_videoaddr = *
data;
163 static void mac_cache_card_flush(
int writeback)
187 #if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE)
191 #ifdef CONFIG_EARLY_PRINTK
200 mac_report_hardware();
229 static struct mac_model mac_data_table[] = {
347 .name =
"Classic II",
356 .name =
"Color Classic",
365 .name =
"Color Classic II",
419 .name =
"Quadra 605",
428 .name =
"Quadra 605",
437 .name =
"Quadra 610",
447 .name =
"Quadra 630",
458 .name =
"Quadra 650",
470 .name =
"Quadra 700",
480 .name =
"Quadra 800",
490 .name =
"Quadra 840AV",
500 .name =
"Quadra 900",
510 .name =
"Quadra 950",
526 .name =
"Performa 460",
535 .name =
"Performa 475",
544 .name =
"Performa 475",
553 .name =
"Performa 520",
562 .name =
"Performa 550",
573 .name =
"Performa 575",
583 .name =
"Performa 588",
603 .name =
"Performa 600",
619 .name =
"Centris 610",
629 .name =
"Centris 650",
639 .name =
"Centris 660AV",
657 .name =
"PowerBook 140",
666 .name =
"PowerBook 145",
675 .name =
"PowerBook 150",
685 .name =
"PowerBook 160",
694 .name =
"PowerBook 165",
703 .name =
"PowerBook 165c",
712 .name =
"PowerBook 170",
721 .name =
"PowerBook 180",
730 .name =
"PowerBook 180c",
739 .name =
"PowerBook 190",
749 .name =
"PowerBook 520",
767 .name =
"PowerBook Duo 210",
776 .name =
"PowerBook Duo 230",
785 .name =
"PowerBook Duo 250",
794 .name =
"PowerBook Duo 270c",
803 .name =
"PowerBook Duo 280",
812 .name =
"PowerBook Duo 280c",
830 static struct resource scc_a_rsrcs[] = {
835 static struct resource scc_b_rsrcs[] = {
844 .resource = scc_a_rsrcs,
852 .resource = scc_b_rsrcs,
856 static void __init mac_identify(
void)
867 "(obsolete bootloader?)\n");
870 macintosh_config = mac_data_table;
871 for (m = macintosh_config; m->
ident != -1; m++) {
872 if (m->
ident == model) {
873 macintosh_config =
m;
881 scc_a_rsrcs[0].
end = scc_a_rsrcs[0].
start;
883 scc_b_rsrcs[0].
end = scc_b_rsrcs[0].
start;
885 switch (macintosh_config->
scc_type) {
896 scc_a_rsrcs[1].
start = scc_a_rsrcs[1].
end = IRQ_AUTO_4;
897 scc_b_rsrcs[1].
start = scc_b_rsrcs[1].
end = IRQ_AUTO_4;
916 "row 0x%lx depth %lx dimensions %ld x %ld\n",
934 #ifdef CONFIG_ADB_CUDA
939 static void __init mac_report_hardware(
void)
944 static void mac_get_model(
char *
str)
946 strcpy(str,
"Macintosh ");
956 .resource = &swim_rsrc,