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 #warning move to adb/via init
167 mach_hwclk = mac_hwclk;
169 mach_set_clock_mmss = mac_set_clock_mmss;
170 mach_reset = mac_reset;
171 mach_halt = mac_poweroff;
172 mach_power_off = mac_poweroff;
173 mach_max_dma_address = 0xffffffff;
174 #if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE)
175 mach_beep = mac_mksound;
177 #ifdef CONFIG_HEARTBEAT
179 mach_heartbeat = mac_heartbeat;
180 mach_heartbeat_irq = IRQ_MAC_TIMER;
185 * Determine hardware present
189 mac_report_hardware();
192 * AFAIK only the IIci takes a cache card. The IIfx has onboard
193 * cache ... someone needs to figure out how to tell if it's on or
197 if (macintosh_config->ident == MAC_MODEL_IICI
198 || macintosh_config->ident == MAC_MODEL_IIFX)
199 mach_l2_flush = mac_cache_card_flush;
202 * Check for machine specific fixups.
205 #ifdef OLD_NUBUS_CODE
212 * Macintosh Table: hardcoded model configuration data.
214 * Much of this was defined by Alan, based on who knows what docs.
215 * I've added a lot more, and some of that was pure guesswork based
216 * on hardware pages present on the Mac web site. Possibly wildly
217 * inaccurate, so look here if a new Mac model won't run. Example: if
218 * a Mac crashes immediately after the VIA1 registers have been dumped
219 * to the screen, it probably died attempting to read DirB on a RBV.
220 * Meaning it should have MAC_VIA_IIci here :-)
223 struct mac_model *macintosh_config;
224 EXPORT_SYMBOL(macintosh_config);
226 static struct mac_model mac_data_table[] = {
228 * We'll pretend to be a Macintosh II, that's pretty safe.
232 .ident = MAC_MODEL_II,
234 .adb_type = MAC_ADB_II,
235 .via_type = MAC_VIA_II,
236 .scsi_type = MAC_SCSI_OLD,
237 .scc_type = MAC_SCC_II,
238 .nubus_type = MAC_NUBUS
242 * Original MacII hardware
247 .ident = MAC_MODEL_II,
249 .adb_type = MAC_ADB_II,
250 .via_type = MAC_VIA_II,
251 .scsi_type = MAC_SCSI_OLD,
252 .scc_type = MAC_SCC_II,
253 .nubus_type = MAC_NUBUS
255 .ident = MAC_MODEL_IIX,
257 .adb_type = MAC_ADB_II,
258 .via_type = MAC_VIA_II,
259 .scsi_type = MAC_SCSI_OLD,
260 .scc_type = MAC_SCC_II,
261 .nubus_type = MAC_NUBUS
263 .ident = MAC_MODEL_IICX,
265 .adb_type = MAC_ADB_II,
266 .via_type = MAC_VIA_II,
267 .scsi_type = MAC_SCSI_OLD,
268 .scc_type = MAC_SCC_II,
269 .nubus_type = MAC_NUBUS
271 .ident = MAC_MODEL_SE30,
273 .adb_type = MAC_ADB_II,
274 .via_type = MAC_VIA_II,
275 .scsi_type = MAC_SCSI_OLD,
276 .scc_type = MAC_SCC_II,
277 .nubus_type = MAC_NUBUS
281 * Weirdified MacII hardware - all subtly different. Gee thanks
282 * Apple. All these boxes seem to have VIA2 in a different place to
283 * the MacII (+1A000 rather than +4000)
284 * CSA: see http://developer.apple.com/technotes/hw/hw_09.html
288 .ident = MAC_MODEL_IICI,
290 .adb_type = MAC_ADB_II,
291 .via_type = MAC_VIA_IIci,
292 .scsi_type = MAC_SCSI_OLD,
293 .scc_type = MAC_SCC_II,
294 .nubus_type = MAC_NUBUS
296 .ident = MAC_MODEL_IIFX,
298 .adb_type = MAC_ADB_IOP,
299 .via_type = MAC_VIA_IIci,
300 .scsi_type = MAC_SCSI_OLD,
301 .scc_type = MAC_SCC_IOP,
302 .nubus_type = MAC_NUBUS
304 .ident = MAC_MODEL_IISI,
306 .adb_type = MAC_ADB_IISI,
307 .via_type = MAC_VIA_IIci,
308 .scsi_type = MAC_SCSI_OLD,
309 .scc_type = MAC_SCC_II,
310 .nubus_type = MAC_NUBUS
312 .ident = MAC_MODEL_IIVI,
314 .adb_type = MAC_ADB_IISI,
315 .via_type = MAC_VIA_IIci,
316 .scsi_type = MAC_SCSI_OLD,
317 .scc_type = MAC_SCC_II,
318 .nubus_type = MAC_NUBUS
320 .ident = MAC_MODEL_IIVX,
322 .adb_type = MAC_ADB_IISI,
323 .via_type = MAC_VIA_IIci,
324 .scsi_type = MAC_SCSI_OLD,
325 .scc_type = MAC_SCC_II,
326 .nubus_type = MAC_NUBUS
330 * Classic models (guessing: similar to SE/30 ?? Nope, similar to LC ...)
334 .ident = MAC_MODEL_CLII,
335 .name = "Classic II",
336 .adb_type = MAC_ADB_IISI,
337 .via_type = MAC_VIA_IIci,
338 .scsi_type = MAC_SCSI_OLD,
339 .scc_type = MAC_SCC_II,
340 .nubus_type = MAC_NUBUS
342 .ident = MAC_MODEL_CCL,
343 .name = "Color Classic",
344 .adb_type = MAC_ADB_CUDA,
345 .via_type = MAC_VIA_IIci,
346 .scsi_type = MAC_SCSI_OLD,
347 .scc_type = MAC_SCC_II,
348 .nubus_type = MAC_NUBUS},
351 * Some Mac LC machines. Basically the same as the IIci, ADB like IIsi
355 .ident = MAC_MODEL_LC,
357 .adb_type = MAC_ADB_IISI,
358 .via_type = MAC_VIA_IIci,
359 .scsi_type = MAC_SCSI_OLD,
360 .scc_type = MAC_SCC_II,
361 .nubus_type = MAC_NUBUS
363 .ident = MAC_MODEL_LCII,
365 .adb_type = MAC_ADB_IISI,
366 .via_type = MAC_VIA_IIci,
367 .scsi_type = MAC_SCSI_OLD,
368 .scc_type = MAC_SCC_II,
369 .nubus_type = MAC_NUBUS
371 .ident = MAC_MODEL_LCIII,
373 .adb_type = MAC_ADB_IISI,
374 .via_type = MAC_VIA_IIci,
375 .scsi_type = MAC_SCSI_OLD,
376 .scc_type = MAC_SCC_II,
377 .nubus_type = MAC_NUBUS
381 * Quadra. Video is at 0xF9000000, via is like a MacII. We label it differently
382 * as some of the stuff connected to VIA2 seems different. Better SCSI chip and
383 * onboard ethernet using a NatSemi SONIC except the 660AV and 840AV which use an
385 * The 700, 900 and 950 have some I/O chips in the wrong place to
386 * confuse us. The 840AV has a SCSI location of its own (same as
391 .ident = MAC_MODEL_Q605,
392 .name = "Quadra 605",
393 .adb_type = MAC_ADB_CUDA,
394 .via_type = MAC_VIA_QUADRA,
395 .scsi_type = MAC_SCSI_QUADRA,
396 .scc_type = MAC_SCC_QUADRA,
397 .nubus_type = MAC_NUBUS
399 .ident = MAC_MODEL_Q605_ACC,
400 .name = "Quadra 605",
401 .adb_type = MAC_ADB_CUDA,
402 .via_type = MAC_VIA_QUADRA,
403 .scsi_type = MAC_SCSI_QUADRA,
404 .scc_type = MAC_SCC_QUADRA,
405 .nubus_type = MAC_NUBUS
407 .ident = MAC_MODEL_Q610,
408 .name = "Quadra 610",
409 .adb_type = MAC_ADB_II,
410 .via_type = MAC_VIA_QUADRA,
411 .scsi_type = MAC_SCSI_QUADRA,
412 .scc_type = MAC_SCC_QUADRA,
413 .ether_type = MAC_ETHER_SONIC,
414 .nubus_type = MAC_NUBUS
416 .ident = MAC_MODEL_Q630,
417 .name = "Quadra 630",
418 .adb_type = MAC_ADB_CUDA,
419 .via_type = MAC_VIA_QUADRA,
420 .scsi_type = MAC_SCSI_QUADRA,
421 .ide_type = MAC_IDE_QUADRA,
422 .scc_type = MAC_SCC_QUADRA,
423 .ether_type = MAC_ETHER_SONIC,
424 .nubus_type = MAC_NUBUS
426 .ident = MAC_MODEL_Q650,
427 .name = "Quadra 650",
428 .adb_type = MAC_ADB_II,
429 .via_type = MAC_VIA_QUADRA,
430 .scsi_type = MAC_SCSI_QUADRA,
431 .scc_type = MAC_SCC_QUADRA,
432 .ether_type = MAC_ETHER_SONIC,
433 .nubus_type = MAC_NUBUS
435 /* The Q700 does have a NS Sonic */
437 .ident = MAC_MODEL_Q700,
438 .name = "Quadra 700",
439 .adb_type = MAC_ADB_II,
440 .via_type = MAC_VIA_QUADRA,
441 .scsi_type = MAC_SCSI_QUADRA2,
442 .scc_type = MAC_SCC_QUADRA,
443 .ether_type = MAC_ETHER_SONIC,
444 .nubus_type = MAC_NUBUS
446 .ident = MAC_MODEL_Q800,
447 .name = "Quadra 800",
448 .adb_type = MAC_ADB_II,
449 .via_type = MAC_VIA_QUADRA,
450 .scsi_type = MAC_SCSI_QUADRA,
451 .scc_type = MAC_SCC_QUADRA,
452 .ether_type = MAC_ETHER_SONIC,
453 .nubus_type = MAC_NUBUS
455 .ident = MAC_MODEL_Q840,
456 .name = "Quadra 840AV",
457 .adb_type = MAC_ADB_CUDA,
458 .via_type = MAC_VIA_QUADRA,
459 .scsi_type = MAC_SCSI_QUADRA3,
460 .scc_type = MAC_SCC_PSC,
461 .ether_type = MAC_ETHER_MACE,
462 .nubus_type = MAC_NUBUS
464 .ident = MAC_MODEL_Q900,
465 .name = "Quadra 900",
466 .adb_type = MAC_ADB_IOP,
467 .via_type = MAC_VIA_QUADRA,
468 .scsi_type = MAC_SCSI_QUADRA2,
469 .scc_type = MAC_SCC_IOP,
470 .ether_type = MAC_ETHER_SONIC,
471 .nubus_type = MAC_NUBUS
473 .ident = MAC_MODEL_Q950,
474 .name = "Quadra 950",
475 .adb_type = MAC_ADB_IOP,
476 .via_type = MAC_VIA_QUADRA,
477 .scsi_type = MAC_SCSI_QUADRA2,
478 .scc_type = MAC_SCC_IOP,
479 .ether_type = MAC_ETHER_SONIC,
480 .nubus_type = MAC_NUBUS
484 * Performa - more LC type machines
488 .ident = MAC_MODEL_P460,
489 .name = "Performa 460",
490 .adb_type = MAC_ADB_IISI,
491 .via_type = MAC_VIA_IIci,
492 .scsi_type = MAC_SCSI_OLD,
493 .scc_type = MAC_SCC_II,
494 .nubus_type = MAC_NUBUS
496 .ident = MAC_MODEL_P475,
497 .name = "Performa 475",
498 .adb_type = MAC_ADB_CUDA,
499 .via_type = MAC_VIA_QUADRA,
500 .scsi_type = MAC_SCSI_QUADRA,
501 .scc_type = MAC_SCC_II,
502 .nubus_type = MAC_NUBUS
504 .ident = MAC_MODEL_P475F,
505 .name = "Performa 475",
506 .adb_type = MAC_ADB_CUDA,
507 .via_type = MAC_VIA_QUADRA,
508 .scsi_type = MAC_SCSI_QUADRA,
509 .scc_type = MAC_SCC_II,
510 .nubus_type = MAC_NUBUS
512 .ident = MAC_MODEL_P520,
513 .name = "Performa 520",
514 .adb_type = MAC_ADB_CUDA,
515 .via_type = MAC_VIA_IIci,
516 .scsi_type = MAC_SCSI_OLD,
517 .scc_type = MAC_SCC_II,
518 .nubus_type = MAC_NUBUS
520 .ident = MAC_MODEL_P550,
521 .name = "Performa 550",
522 .adb_type = MAC_ADB_CUDA,
523 .via_type = MAC_VIA_IIci,
524 .scsi_type = MAC_SCSI_OLD,
525 .scc_type = MAC_SCC_II,
526 .nubus_type = MAC_NUBUS
528 /* These have the comm slot, and therefore the possibility of SONIC ethernet */
530 .ident = MAC_MODEL_P575,
531 .name = "Performa 575",
532 .adb_type = MAC_ADB_CUDA,
533 .via_type = MAC_VIA_QUADRA,
534 .scsi_type = MAC_SCSI_QUADRA,
535 .scc_type = MAC_SCC_II,
536 .ether_type = MAC_ETHER_SONIC,
537 .nubus_type = MAC_NUBUS
539 .ident = MAC_MODEL_P588,
540 .name = "Performa 588",
541 .adb_type = MAC_ADB_CUDA,
542 .via_type = MAC_VIA_QUADRA,
543 .scsi_type = MAC_SCSI_QUADRA,
544 .ide_type = MAC_IDE_QUADRA,
545 .scc_type = MAC_SCC_II,
546 .ether_type = MAC_ETHER_SONIC,
547 .nubus_type = MAC_NUBUS
549 .ident = MAC_MODEL_TV,
551 .adb_type = MAC_ADB_CUDA,
552 .via_type = MAC_VIA_QUADRA,
553 .scsi_type = MAC_SCSI_OLD,
554 .scc_type = MAC_SCC_II,
555 .nubus_type = MAC_NUBUS
557 .ident = MAC_MODEL_P600,
558 .name = "Performa 600",
559 .adb_type = MAC_ADB_IISI,
560 .via_type = MAC_VIA_IIci,
561 .scsi_type = MAC_SCSI_OLD,
562 .scc_type = MAC_SCC_II,
563 .nubus_type = MAC_NUBUS
567 * Centris - just guessing again; maybe like Quadra
570 /* The C610 may or may not have SONIC. We probe to make sure */
572 .ident = MAC_MODEL_C610,
573 .name = "Centris 610",
574 .adb_type = MAC_ADB_II,
575 .via_type = MAC_VIA_QUADRA,
576 .scsi_type = MAC_SCSI_QUADRA,
577 .scc_type = MAC_SCC_QUADRA,
578 .ether_type = MAC_ETHER_SONIC,
579 .nubus_type = MAC_NUBUS
581 .ident = MAC_MODEL_C650,
582 .name = "Centris 650",
583 .adb_type = MAC_ADB_II,
584 .via_type = MAC_VIA_QUADRA,
585 .scsi_type = MAC_SCSI_QUADRA,
586 .scc_type = MAC_SCC_QUADRA,
587 .ether_type = MAC_ETHER_SONIC,
588 .nubus_type = MAC_NUBUS
590 .ident = MAC_MODEL_C660,
591 .name = "Centris 660AV",
592 .adb_type = MAC_ADB_CUDA,
593 .via_type = MAC_VIA_QUADRA,
594 .scsi_type = MAC_SCSI_QUADRA3,
595 .scc_type = MAC_SCC_PSC,
596 .ether_type = MAC_ETHER_MACE,
597 .nubus_type = MAC_NUBUS
601 * The PowerBooks all the same "Combo" custom IC for SCSI and SCC
602 * and a PMU (in two variations?) for ADB. Most of them use the
603 * Quadra-style VIAs. A few models also have IDE from hell.
607 .ident = MAC_MODEL_PB140,
608 .name = "PowerBook 140",
609 .adb_type = MAC_ADB_PB1,
610 .via_type = MAC_VIA_QUADRA,
611 .scsi_type = MAC_SCSI_OLD,
612 .scc_type = MAC_SCC_QUADRA,
613 .nubus_type = MAC_NUBUS
615 .ident = MAC_MODEL_PB145,
616 .name = "PowerBook 145",
617 .adb_type = MAC_ADB_PB1,
618 .via_type = MAC_VIA_QUADRA,
619 .scsi_type = MAC_SCSI_OLD,
620 .scc_type = MAC_SCC_QUADRA,
621 .nubus_type = MAC_NUBUS
623 .ident = MAC_MODEL_PB150,
624 .name = "PowerBook 150",
625 .adb_type = MAC_ADB_PB1,
626 .via_type = MAC_VIA_IIci,
627 .scsi_type = MAC_SCSI_OLD,
628 .ide_type = MAC_IDE_PB,
629 .scc_type = MAC_SCC_QUADRA,
630 .nubus_type = MAC_NUBUS
632 .ident = MAC_MODEL_PB160,
633 .name = "PowerBook 160",
634 .adb_type = MAC_ADB_PB1,
635 .via_type = MAC_VIA_QUADRA,
636 .scsi_type = MAC_SCSI_OLD,
637 .scc_type = MAC_SCC_QUADRA,
638 .nubus_type = MAC_NUBUS
640 .ident = MAC_MODEL_PB165,
641 .name = "PowerBook 165",
642 .adb_type = MAC_ADB_PB1,
643 .via_type = MAC_VIA_QUADRA,
644 .scsi_type = MAC_SCSI_OLD,
645 .scc_type = MAC_SCC_QUADRA,
646 .nubus_type = MAC_NUBUS
648 .ident = MAC_MODEL_PB165C,
649 .name = "PowerBook 165c",
650 .adb_type = MAC_ADB_PB1,
651 .via_type = MAC_VIA_QUADRA,
652 .scsi_type = MAC_SCSI_OLD,
653 .scc_type = MAC_SCC_QUADRA,
654 .nubus_type = MAC_NUBUS
656 .ident = MAC_MODEL_PB170,
657 .name = "PowerBook 170",
658 .adb_type = MAC_ADB_PB1,
659 .via_type = MAC_VIA_QUADRA,
660 .scsi_type = MAC_SCSI_OLD,
661 .scc_type = MAC_SCC_QUADRA,
662 .nubus_type = MAC_NUBUS
664 .ident = MAC_MODEL_PB180,
665 .name = "PowerBook 180",
666 .adb_type = MAC_ADB_PB1,
667 .via_type = MAC_VIA_QUADRA,
668 .scsi_type = MAC_SCSI_OLD,
669 .scc_type = MAC_SCC_QUADRA,
670 .nubus_type = MAC_NUBUS
672 .ident = MAC_MODEL_PB180C,
673 .name = "PowerBook 180c",
674 .adb_type = MAC_ADB_PB1,
675 .via_type = MAC_VIA_QUADRA,
676 .scsi_type = MAC_SCSI_OLD,
677 .scc_type = MAC_SCC_QUADRA,
678 .nubus_type = MAC_NUBUS
680 .ident = MAC_MODEL_PB190,
681 .name = "PowerBook 190",
682 .adb_type = MAC_ADB_PB2,
683 .via_type = MAC_VIA_QUADRA,
684 .scsi_type = MAC_SCSI_OLD,
685 .ide_type = MAC_IDE_BABOON,
686 .scc_type = MAC_SCC_QUADRA,
687 .nubus_type = MAC_NUBUS
689 .ident = MAC_MODEL_PB520,
690 .name = "PowerBook 520",
691 .adb_type = MAC_ADB_PB2,
692 .via_type = MAC_VIA_QUADRA,
693 .scsi_type = MAC_SCSI_OLD,
694 .scc_type = MAC_SCC_QUADRA,
695 .ether_type = MAC_ETHER_SONIC,
696 .nubus_type = MAC_NUBUS
700 * PowerBook Duos are pretty much like normal PowerBooks
701 * All of these probably have onboard SONIC in the Dock which
702 * means we'll have to probe for it eventually.
704 * Are these really MAC_VIA_IIci? The developer notes for the
705 * Duos show pretty much the same custom parts as in most of
706 * the other PowerBooks which would imply MAC_VIA_QUADRA.
710 .ident = MAC_MODEL_PB210,
711 .name = "PowerBook Duo 210",
712 .adb_type = MAC_ADB_PB2,
713 .via_type = MAC_VIA_IIci,
714 .scsi_type = MAC_SCSI_OLD,
715 .scc_type = MAC_SCC_QUADRA,
716 .nubus_type = MAC_NUBUS
718 .ident = MAC_MODEL_PB230,
719 .name = "PowerBook Duo 230",
720 .adb_type = MAC_ADB_PB2,
721 .via_type = MAC_VIA_IIci,
722 .scsi_type = MAC_SCSI_OLD,
723 .scc_type = MAC_SCC_QUADRA,
724 .nubus_type = MAC_NUBUS
726 .ident = MAC_MODEL_PB250,
727 .name = "PowerBook Duo 250",
728 .adb_type = MAC_ADB_PB2,
729 .via_type = MAC_VIA_IIci,
730 .scsi_type = MAC_SCSI_OLD,
731 .scc_type = MAC_SCC_QUADRA,
732 .nubus_type = MAC_NUBUS
734 .ident = MAC_MODEL_PB270C,
735 .name = "PowerBook Duo 270c",
736 .adb_type = MAC_ADB_PB2,
737 .via_type = MAC_VIA_IIci,
738 .scsi_type = MAC_SCSI_OLD,
739 .scc_type = MAC_SCC_QUADRA,
740 .nubus_type = MAC_NUBUS
742 .ident = MAC_MODEL_PB280,
743 .name = "PowerBook Duo 280",
744 .adb_type = MAC_ADB_PB2,
745 .via_type = MAC_VIA_IIci,
746 .scsi_type = MAC_SCSI_OLD,
747 .scc_type = MAC_SCC_QUADRA,
748 .nubus_type = MAC_NUBUS
750 .ident = MAC_MODEL_PB280C,
751 .name = "PowerBook Duo 280c",
752 .adb_type = MAC_ADB_PB2,
753 .via_type = MAC_VIA_IIci,
754 .scsi_type = MAC_SCSI_OLD,
755 .scc_type = MAC_SCC_QUADRA,
756 .nubus_type = MAC_NUBUS
767 static void __init mac_identify(void)
771 /* Penguin data useful? */
772 int model = mac_bi_data.id;
774 /* no bootinfo model id -> NetBSD booter was used! */
775 /* XXX FIXME: breaks for model > 31 */
776 model = (mac_bi_data.cpuid >> 2) & 63;
777 printk(KERN_WARNING "No bootinfo model ID, using cpuid instead (hey, use Penguin!)\n");
780 macintosh_config = mac_data_table;
781 for (m = macintosh_config; m->ident != -1; m++) {
782 if (m->ident == model) {
783 macintosh_config = m;
788 /* We need to pre-init the IOPs, if any. Otherwise */
789 /* the serial console won't work if the user had */
790 /* the serial ports set to "Faster" mode in MacOS. */
794 printk(KERN_INFO "Detected Macintosh model: %d \n", model);
797 * Report booter data:
799 printk(KERN_DEBUG " Penguin bootinfo data:\n");
800 printk(KERN_DEBUG " Video: addr 0x%lx row 0x%lx depth %lx dimensions %ld x %ld\n",
801 mac_bi_data.videoaddr, mac_bi_data.videorow,
802 mac_bi_data.videodepth, mac_bi_data.dimensions & 0xFFFF,
803 mac_bi_data.dimensions >> 16);
804 printk(KERN_DEBUG " Videological 0x%lx phys. 0x%lx, SCC at 0x%lx \n",
805 mac_bi_data.videological, mac_orig_videoaddr,
806 mac_bi_data.sccbase);
807 printk(KERN_DEBUG " Boottime: 0x%lx GMTBias: 0x%lx \n",
808 mac_bi_data.boottime, mac_bi_data.gmtbias);
809 printk(KERN_DEBUG " Machine ID: %ld CPUid: 0x%lx memory size: 0x%lx \n",
810 mac_bi_data.id, mac_bi_data.cpuid, mac_bi_data.memsize);
812 printk("Ramdisk: addr 0x%lx size 0x%lx\n",
813 m68k_ramdisk.addr, m68k_ramdisk.size);
823 static void __init mac_report_hardware(void)
825 printk(KERN_INFO "Apple Macintosh %s\n", macintosh_config->name);
828 static void mac_get_model(char *str)
830 strcpy(str, "Macintosh ");
831 strcat(str, macintosh_config->name);