2 * linux/arch/m68k/mac/config.c
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file COPYING in the main directory of this archive
10 * Miscellaneous linux stuff
13 #include <linux/module.h>
14 #include <linux/types.h>
16 #include <linux/tty.h>
17 #include <linux/console.h>
18 #include <linux/interrupt.h>
20 #include <linux/random.h>
21 #include <linux/delay.h>
23 #include <linux/init.h>
24 #include <linux/vt_kern.h>
26 #define BOOTINFO_COMPAT_1_0
27 #include <asm/setup.h>
28 #include <asm/bootinfo.h>
30 #include <asm/system.h>
33 #include <asm/pgtable.h>
35 #include <asm/machdep.h>
37 #include <asm/macintosh.h>
38 #include <asm/macints.h>
39 #include <asm/machw.h>
41 #include <asm/mac_iop.h>
42 #include <asm/mac_via.h>
43 #include <asm/mac_oss.h>
44 #include <asm/mac_psc.h>
46 /* Mac bootinfo struct */
48 struct mac_booter_data mac_bi_data;
50 /* New m68k bootinfo stuff and videobase */
52 extern int m68k_num_memory;
53 extern struct mem_info m68k_memory[NUM_MEMINFO];
55 extern struct mem_info m68k_ramdisk;
57 /* The phys. video addr. - might be bogus on some machines */
58 static unsigned long mac_orig_videoaddr;
60 /* Mac specific timer functions */
61 extern unsigned long mac_gettimeoffset(void);
62 extern int mac_hwclk(int, struct rtc_time *);
63 extern int mac_set_clock_mmss(unsigned long);
64 extern int show_mac_interrupts(struct seq_file *, void *);
65 extern void iop_preinit(void);
66 extern void iop_init(void);
67 extern void via_init(void);
68 extern void via_init_clock(irq_handler_t func);
69 extern void via_flush_cache(void);
70 extern void oss_init(void);
71 extern void psc_init(void);
72 extern void baboon_init(void);
74 extern void mac_mksound(unsigned int, unsigned int);
76 extern void nubus_sweep_video(void);
78 static void mac_get_model(char *str);
79 static void mac_identify(void);
80 static void mac_report_hardware(void);
82 static void __init mac_sched_init(irq_handler_t vector)
84 via_init_clock(vector);
88 * Parse a Macintosh-specific record in the bootinfo
91 int __init mac_parse_bootinfo(const struct bi_record *record)
94 const u_long *data = record->data;
96 switch (record->tag) {
98 mac_bi_data.id = *data;
101 mac_bi_data.videoaddr = *data;
104 mac_bi_data.videodepth = *data;
107 mac_bi_data.videorow = *data;
110 mac_bi_data.dimensions = *data;
112 case BI_MAC_VLOGICAL:
113 mac_bi_data.videological = VIDEOMEMBASE + (*data & ~VIDEOMEMMASK);
114 mac_orig_videoaddr = *data;
117 mac_bi_data.sccbase = *data;
120 mac_bi_data.boottime = *data;
123 mac_bi_data.gmtbias = *data;
126 mac_bi_data.memsize = *data;
129 mac_bi_data.cpuid = *data;
132 mac_bi_data.rombase = *data;
142 * Flip into 24bit mode for an instant - flushes the L2 cache card. We
143 * have to disable interrupts for this. Our IRQ handlers will crap
144 * themselves if they take an IRQ in 24bit mode!
147 static void mac_cache_card_flush(int writeback)
151 local_irq_save(flags);
153 local_irq_restore(flags);
156 void __init config_mac(void)
159 printk(KERN_ERR "ERROR: no Mac, but config_mac() called!! \n");
161 mach_sched_init = mac_sched_init;
162 mach_init_IRQ = mac_init_IRQ;
163 mach_get_model = mac_get_model;
164 mach_gettimeoffset = mac_gettimeoffset;
165 mach_hwclk = mac_hwclk;
166 mach_set_clock_mmss = mac_set_clock_mmss;
167 mach_reset = mac_reset;
168 mach_halt = mac_poweroff;
169 mach_power_off = mac_poweroff;
170 mach_max_dma_address = 0xffffffff;
171 #if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE)
172 mach_beep = mac_mksound;
174 #ifdef CONFIG_HEARTBEAT
176 mach_heartbeat = mac_heartbeat;
177 mach_heartbeat_irq = IRQ_MAC_TIMER;
182 * Determine hardware present
186 mac_report_hardware();
189 * AFAIK only the IIci takes a cache card. The IIfx has onboard
190 * cache ... someone needs to figure out how to tell if it's on or
194 if (macintosh_config->ident == MAC_MODEL_IICI
195 || macintosh_config->ident == MAC_MODEL_IIFX)
196 mach_l2_flush = mac_cache_card_flush;
199 * Check for machine specific fixups.
202 #ifdef OLD_NUBUS_CODE
209 * Macintosh Table: hardcoded model configuration data.
211 * Much of this was defined by Alan, based on who knows what docs.
212 * I've added a lot more, and some of that was pure guesswork based
213 * on hardware pages present on the Mac web site. Possibly wildly
214 * inaccurate, so look here if a new Mac model won't run. Example: if
215 * a Mac crashes immediately after the VIA1 registers have been dumped
216 * to the screen, it probably died attempting to read DirB on a RBV.
217 * Meaning it should have MAC_VIA_IIci here :-)
220 struct mac_model *macintosh_config;
221 EXPORT_SYMBOL(macintosh_config);
223 static struct mac_model mac_data_table[] = {
225 * We'll pretend to be a Macintosh II, that's pretty safe.
229 .ident = MAC_MODEL_II,
231 .adb_type = MAC_ADB_II,
232 .via_type = MAC_VIA_II,
233 .scsi_type = MAC_SCSI_OLD,
234 .scc_type = MAC_SCC_II,
235 .nubus_type = MAC_NUBUS
239 * Original MacII hardware
244 .ident = MAC_MODEL_II,
246 .adb_type = MAC_ADB_II,
247 .via_type = MAC_VIA_II,
248 .scsi_type = MAC_SCSI_OLD,
249 .scc_type = MAC_SCC_II,
250 .nubus_type = MAC_NUBUS
252 .ident = MAC_MODEL_IIX,
254 .adb_type = MAC_ADB_II,
255 .via_type = MAC_VIA_II,
256 .scsi_type = MAC_SCSI_OLD,
257 .scc_type = MAC_SCC_II,
258 .nubus_type = MAC_NUBUS
260 .ident = MAC_MODEL_IICX,
262 .adb_type = MAC_ADB_II,
263 .via_type = MAC_VIA_II,
264 .scsi_type = MAC_SCSI_OLD,
265 .scc_type = MAC_SCC_II,
266 .nubus_type = MAC_NUBUS
268 .ident = MAC_MODEL_SE30,
270 .adb_type = MAC_ADB_II,
271 .via_type = MAC_VIA_II,
272 .scsi_type = MAC_SCSI_OLD,
273 .scc_type = MAC_SCC_II,
274 .nubus_type = MAC_NUBUS
278 * Weirdified MacII hardware - all subtly different. Gee thanks
279 * Apple. All these boxes seem to have VIA2 in a different place to
280 * the MacII (+1A000 rather than +4000)
281 * CSA: see http://developer.apple.com/technotes/hw/hw_09.html
285 .ident = MAC_MODEL_IICI,
287 .adb_type = MAC_ADB_II,
288 .via_type = MAC_VIA_IIci,
289 .scsi_type = MAC_SCSI_OLD,
290 .scc_type = MAC_SCC_II,
291 .nubus_type = MAC_NUBUS
293 .ident = MAC_MODEL_IIFX,
295 .adb_type = MAC_ADB_IOP,
296 .via_type = MAC_VIA_IIci,
297 .scsi_type = MAC_SCSI_OLD,
298 .scc_type = MAC_SCC_IOP,
299 .nubus_type = MAC_NUBUS
301 .ident = MAC_MODEL_IISI,
303 .adb_type = MAC_ADB_IISI,
304 .via_type = MAC_VIA_IIci,
305 .scsi_type = MAC_SCSI_OLD,
306 .scc_type = MAC_SCC_II,
307 .nubus_type = MAC_NUBUS
309 .ident = MAC_MODEL_IIVI,
311 .adb_type = MAC_ADB_IISI,
312 .via_type = MAC_VIA_IIci,
313 .scsi_type = MAC_SCSI_OLD,
314 .scc_type = MAC_SCC_II,
315 .nubus_type = MAC_NUBUS
317 .ident = MAC_MODEL_IIVX,
319 .adb_type = MAC_ADB_IISI,
320 .via_type = MAC_VIA_IIci,
321 .scsi_type = MAC_SCSI_OLD,
322 .scc_type = MAC_SCC_II,
323 .nubus_type = MAC_NUBUS
327 * Classic models (guessing: similar to SE/30 ?? Nope, similar to LC ...)
331 .ident = MAC_MODEL_CLII,
332 .name = "Classic II",
333 .adb_type = MAC_ADB_IISI,
334 .via_type = MAC_VIA_IIci,
335 .scsi_type = MAC_SCSI_OLD,
336 .scc_type = MAC_SCC_II,
337 .nubus_type = MAC_NUBUS
339 .ident = MAC_MODEL_CCL,
340 .name = "Color Classic",
341 .adb_type = MAC_ADB_CUDA,
342 .via_type = MAC_VIA_IIci,
343 .scsi_type = MAC_SCSI_OLD,
344 .scc_type = MAC_SCC_II,
345 .nubus_type = MAC_NUBUS},
348 * Some Mac LC machines. Basically the same as the IIci, ADB like IIsi
352 .ident = MAC_MODEL_LC,
354 .adb_type = MAC_ADB_IISI,
355 .via_type = MAC_VIA_IIci,
356 .scsi_type = MAC_SCSI_OLD,
357 .scc_type = MAC_SCC_II,
358 .nubus_type = MAC_NUBUS
360 .ident = MAC_MODEL_LCII,
362 .adb_type = MAC_ADB_IISI,
363 .via_type = MAC_VIA_IIci,
364 .scsi_type = MAC_SCSI_OLD,
365 .scc_type = MAC_SCC_II,
366 .nubus_type = MAC_NUBUS
368 .ident = MAC_MODEL_LCIII,
370 .adb_type = MAC_ADB_IISI,
371 .via_type = MAC_VIA_IIci,
372 .scsi_type = MAC_SCSI_OLD,
373 .scc_type = MAC_SCC_II,
374 .nubus_type = MAC_NUBUS
378 * Quadra. Video is at 0xF9000000, via is like a MacII. We label it differently
379 * as some of the stuff connected to VIA2 seems different. Better SCSI chip and
380 * onboard ethernet using a NatSemi SONIC except the 660AV and 840AV which use an
382 * The 700, 900 and 950 have some I/O chips in the wrong place to
383 * confuse us. The 840AV has a SCSI location of its own (same as
388 .ident = MAC_MODEL_Q605,
389 .name = "Quadra 605",
390 .adb_type = MAC_ADB_CUDA,
391 .via_type = MAC_VIA_QUADRA,
392 .scsi_type = MAC_SCSI_QUADRA,
393 .scc_type = MAC_SCC_QUADRA,
394 .nubus_type = MAC_NUBUS
396 .ident = MAC_MODEL_Q605_ACC,
397 .name = "Quadra 605",
398 .adb_type = MAC_ADB_CUDA,
399 .via_type = MAC_VIA_QUADRA,
400 .scsi_type = MAC_SCSI_QUADRA,
401 .scc_type = MAC_SCC_QUADRA,
402 .nubus_type = MAC_NUBUS
404 .ident = MAC_MODEL_Q610,
405 .name = "Quadra 610",
406 .adb_type = MAC_ADB_II,
407 .via_type = MAC_VIA_QUADRA,
408 .scsi_type = MAC_SCSI_QUADRA,
409 .scc_type = MAC_SCC_QUADRA,
410 .ether_type = MAC_ETHER_SONIC,
411 .nubus_type = MAC_NUBUS
413 .ident = MAC_MODEL_Q630,
414 .name = "Quadra 630",
415 .adb_type = MAC_ADB_CUDA,
416 .via_type = MAC_VIA_QUADRA,
417 .scsi_type = MAC_SCSI_QUADRA,
418 .ide_type = MAC_IDE_QUADRA,
419 .scc_type = MAC_SCC_QUADRA,
420 .ether_type = MAC_ETHER_SONIC,
421 .nubus_type = MAC_NUBUS
423 .ident = MAC_MODEL_Q650,
424 .name = "Quadra 650",
425 .adb_type = MAC_ADB_II,
426 .via_type = MAC_VIA_QUADRA,
427 .scsi_type = MAC_SCSI_QUADRA,
428 .scc_type = MAC_SCC_QUADRA,
429 .ether_type = MAC_ETHER_SONIC,
430 .nubus_type = MAC_NUBUS
432 /* The Q700 does have a NS Sonic */
434 .ident = MAC_MODEL_Q700,
435 .name = "Quadra 700",
436 .adb_type = MAC_ADB_II,
437 .via_type = MAC_VIA_QUADRA,
438 .scsi_type = MAC_SCSI_QUADRA2,
439 .scc_type = MAC_SCC_QUADRA,
440 .ether_type = MAC_ETHER_SONIC,
441 .nubus_type = MAC_NUBUS
443 .ident = MAC_MODEL_Q800,
444 .name = "Quadra 800",
445 .adb_type = MAC_ADB_II,
446 .via_type = MAC_VIA_QUADRA,
447 .scsi_type = MAC_SCSI_QUADRA,
448 .scc_type = MAC_SCC_QUADRA,
449 .ether_type = MAC_ETHER_SONIC,
450 .nubus_type = MAC_NUBUS
452 .ident = MAC_MODEL_Q840,
453 .name = "Quadra 840AV",
454 .adb_type = MAC_ADB_CUDA,
455 .via_type = MAC_VIA_QUADRA,
456 .scsi_type = MAC_SCSI_QUADRA3,
457 .scc_type = MAC_SCC_PSC,
458 .ether_type = MAC_ETHER_MACE,
459 .nubus_type = MAC_NUBUS
461 .ident = MAC_MODEL_Q900,
462 .name = "Quadra 900",
463 .adb_type = MAC_ADB_IOP,
464 .via_type = MAC_VIA_QUADRA,
465 .scsi_type = MAC_SCSI_QUADRA2,
466 .scc_type = MAC_SCC_IOP,
467 .ether_type = MAC_ETHER_SONIC,
468 .nubus_type = MAC_NUBUS
470 .ident = MAC_MODEL_Q950,
471 .name = "Quadra 950",
472 .adb_type = MAC_ADB_IOP,
473 .via_type = MAC_VIA_QUADRA,
474 .scsi_type = MAC_SCSI_QUADRA2,
475 .scc_type = MAC_SCC_IOP,
476 .ether_type = MAC_ETHER_SONIC,
477 .nubus_type = MAC_NUBUS
481 * Performa - more LC type machines
485 .ident = MAC_MODEL_P460,
486 .name = "Performa 460",
487 .adb_type = MAC_ADB_IISI,
488 .via_type = MAC_VIA_IIci,
489 .scsi_type = MAC_SCSI_OLD,
490 .scc_type = MAC_SCC_II,
491 .nubus_type = MAC_NUBUS
493 .ident = MAC_MODEL_P475,
494 .name = "Performa 475",
495 .adb_type = MAC_ADB_CUDA,
496 .via_type = MAC_VIA_QUADRA,
497 .scsi_type = MAC_SCSI_QUADRA,
498 .scc_type = MAC_SCC_II,
499 .nubus_type = MAC_NUBUS
501 .ident = MAC_MODEL_P475F,
502 .name = "Performa 475",
503 .adb_type = MAC_ADB_CUDA,
504 .via_type = MAC_VIA_QUADRA,
505 .scsi_type = MAC_SCSI_QUADRA,
506 .scc_type = MAC_SCC_II,
507 .nubus_type = MAC_NUBUS
509 .ident = MAC_MODEL_P520,
510 .name = "Performa 520",
511 .adb_type = MAC_ADB_CUDA,
512 .via_type = MAC_VIA_IIci,
513 .scsi_type = MAC_SCSI_OLD,
514 .scc_type = MAC_SCC_II,
515 .nubus_type = MAC_NUBUS
517 .ident = MAC_MODEL_P550,
518 .name = "Performa 550",
519 .adb_type = MAC_ADB_CUDA,
520 .via_type = MAC_VIA_IIci,
521 .scsi_type = MAC_SCSI_OLD,
522 .scc_type = MAC_SCC_II,
523 .nubus_type = MAC_NUBUS
525 /* These have the comm slot, and therefore the possibility of SONIC ethernet */
527 .ident = MAC_MODEL_P575,
528 .name = "Performa 575",
529 .adb_type = MAC_ADB_CUDA,
530 .via_type = MAC_VIA_QUADRA,
531 .scsi_type = MAC_SCSI_QUADRA,
532 .scc_type = MAC_SCC_II,
533 .ether_type = MAC_ETHER_SONIC,
534 .nubus_type = MAC_NUBUS
536 .ident = MAC_MODEL_P588,
537 .name = "Performa 588",
538 .adb_type = MAC_ADB_CUDA,
539 .via_type = MAC_VIA_QUADRA,
540 .scsi_type = MAC_SCSI_QUADRA,
541 .ide_type = MAC_IDE_QUADRA,
542 .scc_type = MAC_SCC_II,
543 .ether_type = MAC_ETHER_SONIC,
544 .nubus_type = MAC_NUBUS
546 .ident = MAC_MODEL_TV,
548 .adb_type = MAC_ADB_CUDA,
549 .via_type = MAC_VIA_QUADRA,
550 .scsi_type = MAC_SCSI_OLD,
551 .scc_type = MAC_SCC_II,
552 .nubus_type = MAC_NUBUS
554 .ident = MAC_MODEL_P600,
555 .name = "Performa 600",
556 .adb_type = MAC_ADB_IISI,
557 .via_type = MAC_VIA_IIci,
558 .scsi_type = MAC_SCSI_OLD,
559 .scc_type = MAC_SCC_II,
560 .nubus_type = MAC_NUBUS
564 * Centris - just guessing again; maybe like Quadra
567 /* The C610 may or may not have SONIC. We probe to make sure */
569 .ident = MAC_MODEL_C610,
570 .name = "Centris 610",
571 .adb_type = MAC_ADB_II,
572 .via_type = MAC_VIA_QUADRA,
573 .scsi_type = MAC_SCSI_QUADRA,
574 .scc_type = MAC_SCC_QUADRA,
575 .ether_type = MAC_ETHER_SONIC,
576 .nubus_type = MAC_NUBUS
578 .ident = MAC_MODEL_C650,
579 .name = "Centris 650",
580 .adb_type = MAC_ADB_II,
581 .via_type = MAC_VIA_QUADRA,
582 .scsi_type = MAC_SCSI_QUADRA,
583 .scc_type = MAC_SCC_QUADRA,
584 .ether_type = MAC_ETHER_SONIC,
585 .nubus_type = MAC_NUBUS
587 .ident = MAC_MODEL_C660,
588 .name = "Centris 660AV",
589 .adb_type = MAC_ADB_CUDA,
590 .via_type = MAC_VIA_QUADRA,
591 .scsi_type = MAC_SCSI_QUADRA3,
592 .scc_type = MAC_SCC_PSC,
593 .ether_type = MAC_ETHER_MACE,
594 .nubus_type = MAC_NUBUS
598 * The PowerBooks all the same "Combo" custom IC for SCSI and SCC
599 * and a PMU (in two variations?) for ADB. Most of them use the
600 * Quadra-style VIAs. A few models also have IDE from hell.
604 .ident = MAC_MODEL_PB140,
605 .name = "PowerBook 140",
606 .adb_type = MAC_ADB_PB1,
607 .via_type = MAC_VIA_QUADRA,
608 .scsi_type = MAC_SCSI_OLD,
609 .scc_type = MAC_SCC_QUADRA,
610 .nubus_type = MAC_NUBUS
612 .ident = MAC_MODEL_PB145,
613 .name = "PowerBook 145",
614 .adb_type = MAC_ADB_PB1,
615 .via_type = MAC_VIA_QUADRA,
616 .scsi_type = MAC_SCSI_OLD,
617 .scc_type = MAC_SCC_QUADRA,
618 .nubus_type = MAC_NUBUS
620 .ident = MAC_MODEL_PB150,
621 .name = "PowerBook 150",
622 .adb_type = MAC_ADB_PB1,
623 .via_type = MAC_VIA_IIci,
624 .scsi_type = MAC_SCSI_OLD,
625 .ide_type = MAC_IDE_PB,
626 .scc_type = MAC_SCC_QUADRA,
627 .nubus_type = MAC_NUBUS
629 .ident = MAC_MODEL_PB160,
630 .name = "PowerBook 160",
631 .adb_type = MAC_ADB_PB1,
632 .via_type = MAC_VIA_QUADRA,
633 .scsi_type = MAC_SCSI_OLD,
634 .scc_type = MAC_SCC_QUADRA,
635 .nubus_type = MAC_NUBUS
637 .ident = MAC_MODEL_PB165,
638 .name = "PowerBook 165",
639 .adb_type = MAC_ADB_PB1,
640 .via_type = MAC_VIA_QUADRA,
641 .scsi_type = MAC_SCSI_OLD,
642 .scc_type = MAC_SCC_QUADRA,
643 .nubus_type = MAC_NUBUS
645 .ident = MAC_MODEL_PB165C,
646 .name = "PowerBook 165c",
647 .adb_type = MAC_ADB_PB1,
648 .via_type = MAC_VIA_QUADRA,
649 .scsi_type = MAC_SCSI_OLD,
650 .scc_type = MAC_SCC_QUADRA,
651 .nubus_type = MAC_NUBUS
653 .ident = MAC_MODEL_PB170,
654 .name = "PowerBook 170",
655 .adb_type = MAC_ADB_PB1,
656 .via_type = MAC_VIA_QUADRA,
657 .scsi_type = MAC_SCSI_OLD,
658 .scc_type = MAC_SCC_QUADRA,
659 .nubus_type = MAC_NUBUS
661 .ident = MAC_MODEL_PB180,
662 .name = "PowerBook 180",
663 .adb_type = MAC_ADB_PB1,
664 .via_type = MAC_VIA_QUADRA,
665 .scsi_type = MAC_SCSI_OLD,
666 .scc_type = MAC_SCC_QUADRA,
667 .nubus_type = MAC_NUBUS
669 .ident = MAC_MODEL_PB180C,
670 .name = "PowerBook 180c",
671 .adb_type = MAC_ADB_PB1,
672 .via_type = MAC_VIA_QUADRA,
673 .scsi_type = MAC_SCSI_OLD,
674 .scc_type = MAC_SCC_QUADRA,
675 .nubus_type = MAC_NUBUS
677 .ident = MAC_MODEL_PB190,
678 .name = "PowerBook 190",
679 .adb_type = MAC_ADB_PB2,
680 .via_type = MAC_VIA_QUADRA,
681 .scsi_type = MAC_SCSI_OLD,
682 .ide_type = MAC_IDE_BABOON,
683 .scc_type = MAC_SCC_QUADRA,
684 .nubus_type = MAC_NUBUS
686 .ident = MAC_MODEL_PB520,
687 .name = "PowerBook 520",
688 .adb_type = MAC_ADB_PB2,
689 .via_type = MAC_VIA_QUADRA,
690 .scsi_type = MAC_SCSI_OLD,
691 .scc_type = MAC_SCC_QUADRA,
692 .ether_type = MAC_ETHER_SONIC,
693 .nubus_type = MAC_NUBUS
697 * PowerBook Duos are pretty much like normal PowerBooks
698 * All of these probably have onboard SONIC in the Dock which
699 * means we'll have to probe for it eventually.
701 * Are these really MAC_VIA_IIci? The developer notes for the
702 * Duos show pretty much the same custom parts as in most of
703 * the other PowerBooks which would imply MAC_VIA_QUADRA.
707 .ident = MAC_MODEL_PB210,
708 .name = "PowerBook Duo 210",
709 .adb_type = MAC_ADB_PB2,
710 .via_type = MAC_VIA_IIci,
711 .scsi_type = MAC_SCSI_OLD,
712 .scc_type = MAC_SCC_QUADRA,
713 .nubus_type = MAC_NUBUS
715 .ident = MAC_MODEL_PB230,
716 .name = "PowerBook Duo 230",
717 .adb_type = MAC_ADB_PB2,
718 .via_type = MAC_VIA_IIci,
719 .scsi_type = MAC_SCSI_OLD,
720 .scc_type = MAC_SCC_QUADRA,
721 .nubus_type = MAC_NUBUS
723 .ident = MAC_MODEL_PB250,
724 .name = "PowerBook Duo 250",
725 .adb_type = MAC_ADB_PB2,
726 .via_type = MAC_VIA_IIci,
727 .scsi_type = MAC_SCSI_OLD,
728 .scc_type = MAC_SCC_QUADRA,
729 .nubus_type = MAC_NUBUS
731 .ident = MAC_MODEL_PB270C,
732 .name = "PowerBook Duo 270c",
733 .adb_type = MAC_ADB_PB2,
734 .via_type = MAC_VIA_IIci,
735 .scsi_type = MAC_SCSI_OLD,
736 .scc_type = MAC_SCC_QUADRA,
737 .nubus_type = MAC_NUBUS
739 .ident = MAC_MODEL_PB280,
740 .name = "PowerBook Duo 280",
741 .adb_type = MAC_ADB_PB2,
742 .via_type = MAC_VIA_IIci,
743 .scsi_type = MAC_SCSI_OLD,
744 .scc_type = MAC_SCC_QUADRA,
745 .nubus_type = MAC_NUBUS
747 .ident = MAC_MODEL_PB280C,
748 .name = "PowerBook Duo 280c",
749 .adb_type = MAC_ADB_PB2,
750 .via_type = MAC_VIA_IIci,
751 .scsi_type = MAC_SCSI_OLD,
752 .scc_type = MAC_SCC_QUADRA,
753 .nubus_type = MAC_NUBUS
764 static void __init mac_identify(void)
768 /* Penguin data useful? */
769 int model = mac_bi_data.id;
771 /* no bootinfo model id -> NetBSD booter was used! */
772 /* XXX FIXME: breaks for model > 31 */
773 model = (mac_bi_data.cpuid >> 2) & 63;
774 printk(KERN_WARNING "No bootinfo model ID, using cpuid instead (hey, use Penguin!)\n");
777 macintosh_config = mac_data_table;
778 for (m = macintosh_config; m->ident != -1; m++) {
779 if (m->ident == model) {
780 macintosh_config = m;
785 /* We need to pre-init the IOPs, if any. Otherwise */
786 /* the serial console won't work if the user had */
787 /* the serial ports set to "Faster" mode in MacOS. */
791 printk(KERN_INFO "Detected Macintosh model: %d \n", model);
794 * Report booter data:
796 printk(KERN_DEBUG " Penguin bootinfo data:\n");
797 printk(KERN_DEBUG " Video: addr 0x%lx row 0x%lx depth %lx dimensions %ld x %ld\n",
798 mac_bi_data.videoaddr, mac_bi_data.videorow,
799 mac_bi_data.videodepth, mac_bi_data.dimensions & 0xFFFF,
800 mac_bi_data.dimensions >> 16);
801 printk(KERN_DEBUG " Videological 0x%lx phys. 0x%lx, SCC at 0x%lx \n",
802 mac_bi_data.videological, mac_orig_videoaddr,
803 mac_bi_data.sccbase);
804 printk(KERN_DEBUG " Boottime: 0x%lx GMTBias: 0x%lx \n",
805 mac_bi_data.boottime, mac_bi_data.gmtbias);
806 printk(KERN_DEBUG " Machine ID: %ld CPUid: 0x%lx memory size: 0x%lx \n",
807 mac_bi_data.id, mac_bi_data.cpuid, mac_bi_data.memsize);
809 printk("Ramdisk: addr 0x%lx size 0x%lx\n",
810 m68k_ramdisk.addr, m68k_ramdisk.size);
820 static void __init mac_report_hardware(void)
822 printk(KERN_INFO "Apple Macintosh %s\n", macintosh_config->name);
825 static void mac_get_model(char *str)
827 strcpy(str, "Macintosh ");
828 strcat(str, macintosh_config->name);