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/config.h>
14 #include <linux/module.h>
15 #include <linux/types.h>
17 #include <linux/tty.h>
18 #include <linux/console.h>
19 #include <linux/interrupt.h>
21 #include <linux/random.h>
22 #include <linux/delay.h>
24 #include <linux/init.h>
25 #include <linux/vt_kern.h>
27 #define BOOTINFO_COMPAT_1_0
28 #include <asm/setup.h>
29 #include <asm/bootinfo.h>
31 #include <asm/system.h>
34 #include <asm/pgtable.h>
36 #include <asm/machdep.h>
38 #include <asm/macintosh.h>
39 #include <asm/macints.h>
40 #include <asm/machw.h>
42 #include <asm/mac_iop.h>
43 #include <asm/mac_via.h>
44 #include <asm/mac_oss.h>
45 #include <asm/mac_psc.h>
47 /* Mac bootinfo struct */
49 struct mac_booter_data mac_bi_data
;
50 int mac_bisize
= sizeof mac_bi_data
;
52 struct mac_hw_present mac_hw_present
;
54 /* New m68k bootinfo stuff and videobase */
56 extern int m68k_num_memory
;
57 extern struct mem_info m68k_memory
[NUM_MEMINFO
];
59 extern struct mem_info m68k_ramdisk
;
61 extern char m68k_command_line
[CL_SIZE
];
63 void *mac_env
; /* Loaded by the boot asm */
65 /* The phys. video addr. - might be bogus on some machines */
66 unsigned long mac_orig_videoaddr
;
68 /* Mac specific timer functions */
69 extern unsigned long mac_gettimeoffset (void);
70 extern int mac_hwclk (int, struct rtc_time
*);
71 extern int mac_set_clock_mmss (unsigned long);
72 extern int show_mac_interrupts(struct seq_file
*, void *);
73 extern void iop_preinit(void);
74 extern void iop_init(void);
75 extern void via_init(void);
76 extern void via_init_clock(irqreturn_t (*func
)(int, void *, struct pt_regs
*));
77 extern void via_flush_cache(void);
78 extern void oss_init(void);
79 extern void psc_init(void);
80 extern void baboon_init(void);
82 extern void mac_mksound(unsigned int, unsigned int);
84 extern void nubus_sweep_video(void);
86 /* Mac specific debug functions (in debug.c) */
87 extern void mac_debug_init(void);
88 extern void mac_debugging_long(int, long);
90 static void mac_get_model(char *str
);
92 static void mac_sched_init(irqreturn_t (*vector
)(int, void *, struct pt_regs
*))
94 via_init_clock(vector
);
98 * Parse a Macintosh-specific record in the bootinfo
101 int __init
mac_parse_bootinfo(const struct bi_record
*record
)
104 const u_long
*data
= record
->data
;
106 switch (record
->tag
) {
108 mac_bi_data
.id
= *data
;
111 mac_bi_data
.videoaddr
= *data
;
114 mac_bi_data
.videodepth
= *data
;
117 mac_bi_data
.videorow
= *data
;
120 mac_bi_data
.dimensions
= *data
;
122 case BI_MAC_VLOGICAL
:
123 mac_bi_data
.videological
= VIDEOMEMBASE
+ (*data
& ~VIDEOMEMMASK
);
124 mac_orig_videoaddr
= *data
;
127 mac_bi_data
.sccbase
= *data
;
130 mac_bi_data
.boottime
= *data
;
133 mac_bi_data
.gmtbias
= *data
;
136 mac_bi_data
.memsize
= *data
;
139 mac_bi_data
.cpuid
= *data
;
142 mac_bi_data
.rombase
= *data
;
151 * Flip into 24bit mode for an instant - flushes the L2 cache card. We
152 * have to disable interrupts for this. Our IRQ handlers will crap
153 * themselves if they take an IRQ in 24bit mode!
156 static void mac_cache_card_flush(int writeback
)
159 local_irq_save(flags
);
161 local_irq_restore(flags
);
164 void __init
config_mac(void)
167 printk(KERN_ERR
"ERROR: no Mac, but config_mac() called!! \n");
170 mach_sched_init
= mac_sched_init
;
171 mach_init_IRQ
= mac_init_IRQ
;
172 mach_request_irq
= mac_request_irq
;
173 mach_free_irq
= mac_free_irq
;
174 enable_irq
= mac_enable_irq
;
175 disable_irq
= mac_disable_irq
;
176 mach_get_model
= mac_get_model
;
177 mach_get_irq_list
= show_mac_interrupts
;
178 mach_gettimeoffset
= mac_gettimeoffset
;
179 #warning move to adb/via init
181 mach_hwclk
= mac_hwclk
;
183 mach_set_clock_mmss
= mac_set_clock_mmss
;
184 mach_reset
= mac_reset
;
185 mach_halt
= mac_poweroff
;
186 mach_power_off
= mac_poweroff
;
187 mach_max_dma_address
= 0xffffffff;
189 mach_debug_init
= mac_debug_init
;
191 #if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE)
192 mach_beep
= mac_mksound
;
194 #ifdef CONFIG_HEARTBEAT
196 mach_heartbeat
= mac_heartbeat
;
197 mach_heartbeat_irq
= IRQ_MAC_TIMER
;
202 * Determine hardware present
206 mac_report_hardware();
208 /* AFAIK only the IIci takes a cache card. The IIfx has onboard
209 cache ... someone needs to figure out how to tell if it's on or
212 if (macintosh_config
->ident
== MAC_MODEL_IICI
213 || macintosh_config
->ident
== MAC_MODEL_IIFX
) {
214 mach_l2_flush
= mac_cache_card_flush
;
218 * Check for machine specific fixups.
221 #ifdef OLD_NUBUS_CODE
228 * Macintosh Table: hardcoded model configuration data.
230 * Much of this was defined by Alan, based on who knows what docs.
231 * I've added a lot more, and some of that was pure guesswork based
232 * on hardware pages present on the Mac web site. Possibly wildly
233 * inaccurate, so look here if a new Mac model won't run. Example: if
234 * a Mac crashes immediately after the VIA1 registers have been dumped
235 * to the screen, it probably died attempting to read DirB on a RBV.
236 * Meaning it should have MAC_VIA_IIci here :-)
239 struct mac_model
*macintosh_config
;
240 EXPORT_SYMBOL(macintosh_config
);
242 static struct mac_model mac_data_table
[]=
245 * We'll pretend to be a Macintosh II, that's pretty safe.
249 .ident
= MAC_MODEL_II
,
251 .adb_type
= MAC_ADB_II
,
252 .via_type
= MAC_VIA_II
,
253 .scsi_type
= MAC_SCSI_OLD
,
254 .scc_type
= MAC_SCC_II
,
255 .nubus_type
= MAC_NUBUS
259 * Original MacII hardware
264 .ident
= MAC_MODEL_II
,
266 .adb_type
= MAC_ADB_II
,
267 .via_type
= MAC_VIA_II
,
268 .scsi_type
= MAC_SCSI_OLD
,
269 .scc_type
= MAC_SCC_II
,
270 .nubus_type
= MAC_NUBUS
272 .ident
= MAC_MODEL_IIX
,
274 .adb_type
= MAC_ADB_II
,
275 .via_type
= MAC_VIA_II
,
276 .scsi_type
= MAC_SCSI_OLD
,
277 .scc_type
= MAC_SCC_II
,
278 .nubus_type
= MAC_NUBUS
280 .ident
= MAC_MODEL_IICX
,
282 .adb_type
= MAC_ADB_II
,
283 .via_type
= MAC_VIA_II
,
284 .scsi_type
= MAC_SCSI_OLD
,
285 .scc_type
= MAC_SCC_II
,
286 .nubus_type
= MAC_NUBUS
288 .ident
= MAC_MODEL_SE30
,
290 .adb_type
= MAC_ADB_II
,
291 .via_type
= MAC_VIA_II
,
292 .scsi_type
= MAC_SCSI_OLD
,
293 .scc_type
= MAC_SCC_II
,
294 .nubus_type
= MAC_NUBUS
298 * Weirdified MacII hardware - all subtley different. Gee thanks
299 * Apple. All these boxes seem to have VIA2 in a different place to
300 * the MacII (+1A000 rather than +4000)
301 * CSA: see http://developer.apple.com/technotes/hw/hw_09.html
305 .ident
= MAC_MODEL_IICI
,
307 .adb_type
= MAC_ADB_II
,
308 .via_type
= MAC_VIA_IIci
,
309 .scsi_type
= MAC_SCSI_OLD
,
310 .scc_type
= MAC_SCC_II
,
311 .nubus_type
= MAC_NUBUS
313 .ident
= MAC_MODEL_IIFX
,
315 .adb_type
= MAC_ADB_IOP
,
316 .via_type
= MAC_VIA_IIci
,
317 .scsi_type
= MAC_SCSI_OLD
,
318 .scc_type
= MAC_SCC_IOP
,
319 .nubus_type
= MAC_NUBUS
321 .ident
= MAC_MODEL_IISI
,
323 .adb_type
= MAC_ADB_IISI
,
324 .via_type
= MAC_VIA_IIci
,
325 .scsi_type
= MAC_SCSI_OLD
,
326 .scc_type
= MAC_SCC_II
,
327 .nubus_type
= MAC_NUBUS
329 .ident
= MAC_MODEL_IIVI
,
331 .adb_type
= MAC_ADB_IISI
,
332 .via_type
= MAC_VIA_IIci
,
333 .scsi_type
= MAC_SCSI_OLD
,
334 .scc_type
= MAC_SCC_II
,
335 .nubus_type
= MAC_NUBUS
337 .ident
= MAC_MODEL_IIVX
,
339 .adb_type
= MAC_ADB_IISI
,
340 .via_type
= MAC_VIA_IIci
,
341 .scsi_type
= MAC_SCSI_OLD
,
342 .scc_type
= MAC_SCC_II
,
343 .nubus_type
= MAC_NUBUS
347 * Classic models (guessing: similar to SE/30 ?? Nope, similar to LC ...)
351 .ident
= MAC_MODEL_CLII
,
352 .name
= "Classic II",
353 .adb_type
= MAC_ADB_IISI
,
354 .via_type
= MAC_VIA_IIci
,
355 .scsi_type
= MAC_SCSI_OLD
,
356 .scc_type
= MAC_SCC_II
,
357 .nubus_type
= MAC_NUBUS
359 .ident
= MAC_MODEL_CCL
,
360 .name
= "Color Classic",
361 .adb_type
= MAC_ADB_CUDA
,
362 .via_type
= MAC_VIA_IIci
,
363 .scsi_type
= MAC_SCSI_OLD
,
364 .scc_type
= MAC_SCC_II
,
365 .nubus_type
= MAC_NUBUS
},
368 * Some Mac LC machines. Basically the same as the IIci, ADB like IIsi
372 .ident
= MAC_MODEL_LC
,
374 .adb_type
= MAC_ADB_IISI
,
375 .via_type
= MAC_VIA_IIci
,
376 .scsi_type
= MAC_SCSI_OLD
,
377 .scc_type
= MAC_SCC_II
,
378 .nubus_type
= MAC_NUBUS
380 .ident
= MAC_MODEL_LCII
,
382 .adb_type
= MAC_ADB_IISI
,
383 .via_type
= MAC_VIA_IIci
,
384 .scsi_type
= MAC_SCSI_OLD
,
385 .scc_type
= MAC_SCC_II
,
386 .nubus_type
= MAC_NUBUS
388 .ident
= MAC_MODEL_LCIII
,
390 .adb_type
= MAC_ADB_IISI
,
391 .via_type
= MAC_VIA_IIci
,
392 .scsi_type
= MAC_SCSI_OLD
,
393 .scc_type
= MAC_SCC_II
,
394 .nubus_type
= MAC_NUBUS
398 * Quadra. Video is at 0xF9000000, via is like a MacII. We label it differently
399 * as some of the stuff connected to VIA2 seems different. Better SCSI chip and
400 * onboard ethernet using a NatSemi SONIC except the 660AV and 840AV which use an
402 * The 700, 900 and 950 have some I/O chips in the wrong place to
403 * confuse us. The 840AV has a SCSI location of its own (same as
408 .ident
= MAC_MODEL_Q605
,
409 .name
= "Quadra 605",
410 .adb_type
= MAC_ADB_CUDA
,
411 .via_type
= MAC_VIA_QUADRA
,
412 .scsi_type
= MAC_SCSI_QUADRA
,
413 .scc_type
= MAC_SCC_QUADRA
,
414 .nubus_type
= MAC_NUBUS
416 .ident
= MAC_MODEL_Q605_ACC
,
417 .name
= "Quadra 605",
418 .adb_type
= MAC_ADB_CUDA
,
419 .via_type
= MAC_VIA_QUADRA
,
420 .scsi_type
= MAC_SCSI_QUADRA
,
421 .scc_type
= MAC_SCC_QUADRA
,
422 .nubus_type
= MAC_NUBUS
424 .ident
= MAC_MODEL_Q610
,
425 .name
= "Quadra 610",
426 .adb_type
= MAC_ADB_II
,
427 .via_type
= MAC_VIA_QUADRA
,
428 .scsi_type
= MAC_SCSI_QUADRA
,
429 .scc_type
= MAC_SCC_QUADRA
,
430 .ether_type
= MAC_ETHER_SONIC
,
431 .nubus_type
= MAC_NUBUS
433 .ident
= MAC_MODEL_Q630
,
434 .name
= "Quadra 630",
435 .adb_type
= MAC_ADB_CUDA
,
436 .via_type
= MAC_VIA_QUADRA
,
437 .scsi_type
= MAC_SCSI_QUADRA
,
438 .ide_type
= MAC_IDE_QUADRA
,
439 .scc_type
= MAC_SCC_QUADRA
,
440 .ether_type
= MAC_ETHER_SONIC
,
441 .nubus_type
= MAC_NUBUS
443 .ident
= MAC_MODEL_Q650
,
444 .name
= "Quadra 650",
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 /* The Q700 does have a NS Sonic */
454 .ident
= MAC_MODEL_Q700
,
455 .name
= "Quadra 700",
456 .adb_type
= MAC_ADB_II
,
457 .via_type
= MAC_VIA_QUADRA
,
458 .scsi_type
= MAC_SCSI_QUADRA2
,
459 .scc_type
= MAC_SCC_QUADRA
,
460 .ether_type
= MAC_ETHER_SONIC
,
461 .nubus_type
= MAC_NUBUS
463 .ident
= MAC_MODEL_Q800
,
464 .name
= "Quadra 800",
465 .adb_type
= MAC_ADB_II
,
466 .via_type
= MAC_VIA_QUADRA
,
467 .scsi_type
= MAC_SCSI_QUADRA
,
468 .scc_type
= MAC_SCC_QUADRA
,
469 .ether_type
= MAC_ETHER_SONIC
,
470 .nubus_type
= MAC_NUBUS
472 .ident
= MAC_MODEL_Q840
,
473 .name
= "Quadra 840AV",
474 .adb_type
= MAC_ADB_CUDA
,
475 .via_type
= MAC_VIA_QUADRA
,
476 .scsi_type
= MAC_SCSI_QUADRA3
,
477 .scc_type
= MAC_SCC_PSC
,
478 .ether_type
= MAC_ETHER_MACE
,
479 .nubus_type
= MAC_NUBUS
481 .ident
= MAC_MODEL_Q900
,
482 .name
= "Quadra 900",
483 .adb_type
= MAC_ADB_IOP
,
484 .via_type
= MAC_VIA_QUADRA
,
485 .scsi_type
= MAC_SCSI_QUADRA2
,
486 .scc_type
= MAC_SCC_IOP
,
487 .ether_type
= MAC_ETHER_SONIC
,
488 .nubus_type
= MAC_NUBUS
490 .ident
= MAC_MODEL_Q950
,
491 .name
= "Quadra 950",
492 .adb_type
= MAC_ADB_IOP
,
493 .via_type
= MAC_VIA_QUADRA
,
494 .scsi_type
= MAC_SCSI_QUADRA2
,
495 .scc_type
= MAC_SCC_IOP
,
496 .ether_type
= MAC_ETHER_SONIC
,
497 .nubus_type
= MAC_NUBUS
501 * Performa - more LC type machines
505 .ident
= MAC_MODEL_P460
,
506 .name
= "Performa 460",
507 .adb_type
= MAC_ADB_IISI
,
508 .via_type
= MAC_VIA_IIci
,
509 .scsi_type
= MAC_SCSI_OLD
,
510 .scc_type
= MAC_SCC_II
,
511 .nubus_type
= MAC_NUBUS
513 .ident
= MAC_MODEL_P475
,
514 .name
= "Performa 475",
515 .adb_type
= MAC_ADB_CUDA
,
516 .via_type
= MAC_VIA_QUADRA
,
517 .scsi_type
= MAC_SCSI_QUADRA
,
518 .scc_type
= MAC_SCC_II
,
519 .nubus_type
= MAC_NUBUS
521 .ident
= MAC_MODEL_P475F
,
522 .name
= "Performa 475",
523 .adb_type
= MAC_ADB_CUDA
,
524 .via_type
= MAC_VIA_QUADRA
,
525 .scsi_type
= MAC_SCSI_QUADRA
,
526 .scc_type
= MAC_SCC_II
,
527 .nubus_type
= MAC_NUBUS
529 .ident
= MAC_MODEL_P520
,
530 .name
= "Performa 520",
531 .adb_type
= MAC_ADB_CUDA
,
532 .via_type
= MAC_VIA_IIci
,
533 .scsi_type
= MAC_SCSI_OLD
,
534 .scc_type
= MAC_SCC_II
,
535 .nubus_type
= MAC_NUBUS
537 .ident
= MAC_MODEL_P550
,
538 .name
= "Performa 550",
539 .adb_type
= MAC_ADB_CUDA
,
540 .via_type
= MAC_VIA_IIci
,
541 .scsi_type
= MAC_SCSI_OLD
,
542 .scc_type
= MAC_SCC_II
,
543 .nubus_type
= MAC_NUBUS
545 /* These have the comm slot, and therefore the possibility of SONIC ethernet */
547 .ident
= MAC_MODEL_P575
,
548 .name
= "Performa 575",
549 .adb_type
= MAC_ADB_CUDA
,
550 .via_type
= MAC_VIA_QUADRA
,
551 .scsi_type
= MAC_SCSI_QUADRA
,
552 .scc_type
= MAC_SCC_II
,
553 .ether_type
= MAC_ETHER_SONIC
,
554 .nubus_type
= MAC_NUBUS
556 .ident
= MAC_MODEL_P588
,
557 .name
= "Performa 588",
558 .adb_type
= MAC_ADB_CUDA
,
559 .via_type
= MAC_VIA_QUADRA
,
560 .scsi_type
= MAC_SCSI_QUADRA
,
561 .ide_type
= MAC_IDE_QUADRA
,
562 .scc_type
= MAC_SCC_II
,
563 .ether_type
= MAC_ETHER_SONIC
,
564 .nubus_type
= MAC_NUBUS
566 .ident
= MAC_MODEL_TV
,
568 .adb_type
= MAC_ADB_CUDA
,
569 .via_type
= MAC_VIA_QUADRA
,
570 .scsi_type
= MAC_SCSI_OLD
,
571 .scc_type
= MAC_SCC_II
,
572 .nubus_type
= MAC_NUBUS
574 .ident
= MAC_MODEL_P600
,
575 .name
= "Performa 600",
576 .adb_type
= MAC_ADB_IISI
,
577 .via_type
= MAC_VIA_IIci
,
578 .scsi_type
= MAC_SCSI_OLD
,
579 .scc_type
= MAC_SCC_II
,
580 .nubus_type
= MAC_NUBUS
584 * Centris - just guessing again; maybe like Quadra
587 /* The C610 may or may not have SONIC. We probe to make sure */
589 .ident
= MAC_MODEL_C610
,
590 .name
= "Centris 610",
591 .adb_type
= MAC_ADB_II
,
592 .via_type
= MAC_VIA_QUADRA
,
593 .scsi_type
= MAC_SCSI_QUADRA
,
594 .scc_type
= MAC_SCC_QUADRA
,
595 .ether_type
= MAC_ETHER_SONIC
,
596 .nubus_type
= MAC_NUBUS
598 .ident
= MAC_MODEL_C650
,
599 .name
= "Centris 650",
600 .adb_type
= MAC_ADB_II
,
601 .via_type
= MAC_VIA_QUADRA
,
602 .scsi_type
= MAC_SCSI_QUADRA
,
603 .scc_type
= MAC_SCC_QUADRA
,
604 .ether_type
= MAC_ETHER_SONIC
,
605 .nubus_type
= MAC_NUBUS
607 .ident
= MAC_MODEL_C660
,
608 .name
= "Centris 660AV",
609 .adb_type
= MAC_ADB_CUDA
,
610 .via_type
= MAC_VIA_QUADRA
,
611 .scsi_type
= MAC_SCSI_QUADRA3
,
612 .scc_type
= MAC_SCC_PSC
,
613 .ether_type
= MAC_ETHER_MACE
,
614 .nubus_type
= MAC_NUBUS
618 * The PowerBooks all the same "Combo" custom IC for SCSI and SCC
619 * and a PMU (in two variations?) for ADB. Most of them use the
620 * Quadra-style VIAs. A few models also have IDE from hell.
624 .ident
= MAC_MODEL_PB140
,
625 .name
= "PowerBook 140",
626 .adb_type
= MAC_ADB_PB1
,
627 .via_type
= MAC_VIA_QUADRA
,
628 .scsi_type
= MAC_SCSI_OLD
,
629 .scc_type
= MAC_SCC_QUADRA
,
630 .nubus_type
= MAC_NUBUS
632 .ident
= MAC_MODEL_PB145
,
633 .name
= "PowerBook 145",
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_PB150
,
641 .name
= "PowerBook 150",
642 .adb_type
= MAC_ADB_PB1
,
643 .via_type
= MAC_VIA_IIci
,
644 .scsi_type
= MAC_SCSI_OLD
,
645 .ide_type
= MAC_IDE_PB
,
646 .scc_type
= MAC_SCC_QUADRA
,
647 .nubus_type
= MAC_NUBUS
649 .ident
= MAC_MODEL_PB160
,
650 .name
= "PowerBook 160",
651 .adb_type
= MAC_ADB_PB1
,
652 .via_type
= MAC_VIA_QUADRA
,
653 .scsi_type
= MAC_SCSI_OLD
,
654 .scc_type
= MAC_SCC_QUADRA
,
655 .nubus_type
= MAC_NUBUS
657 .ident
= MAC_MODEL_PB165
,
658 .name
= "PowerBook 165",
659 .adb_type
= MAC_ADB_PB1
,
660 .via_type
= MAC_VIA_QUADRA
,
661 .scsi_type
= MAC_SCSI_OLD
,
662 .scc_type
= MAC_SCC_QUADRA
,
663 .nubus_type
= MAC_NUBUS
665 .ident
= MAC_MODEL_PB165C
,
666 .name
= "PowerBook 165c",
667 .adb_type
= MAC_ADB_PB1
,
668 .via_type
= MAC_VIA_QUADRA
,
669 .scsi_type
= MAC_SCSI_OLD
,
670 .scc_type
= MAC_SCC_QUADRA
,
671 .nubus_type
= MAC_NUBUS
673 .ident
= MAC_MODEL_PB170
,
674 .name
= "PowerBook 170",
675 .adb_type
= MAC_ADB_PB1
,
676 .via_type
= MAC_VIA_QUADRA
,
677 .scsi_type
= MAC_SCSI_OLD
,
678 .scc_type
= MAC_SCC_QUADRA
,
679 .nubus_type
= MAC_NUBUS
681 .ident
= MAC_MODEL_PB180
,
682 .name
= "PowerBook 180",
683 .adb_type
= MAC_ADB_PB1
,
684 .via_type
= MAC_VIA_QUADRA
,
685 .scsi_type
= MAC_SCSI_OLD
,
686 .scc_type
= MAC_SCC_QUADRA
,
687 .nubus_type
= MAC_NUBUS
689 .ident
= MAC_MODEL_PB180C
,
690 .name
= "PowerBook 180c",
691 .adb_type
= MAC_ADB_PB1
,
692 .via_type
= MAC_VIA_QUADRA
,
693 .scsi_type
= MAC_SCSI_OLD
,
694 .scc_type
= MAC_SCC_QUADRA
,
695 .nubus_type
= MAC_NUBUS
697 .ident
= MAC_MODEL_PB190
,
698 .name
= "PowerBook 190",
699 .adb_type
= MAC_ADB_PB2
,
700 .via_type
= MAC_VIA_QUADRA
,
701 .scsi_type
= MAC_SCSI_OLD
,
702 .ide_type
= MAC_IDE_BABOON
,
703 .scc_type
= MAC_SCC_QUADRA
,
704 .nubus_type
= MAC_NUBUS
706 .ident
= MAC_MODEL_PB520
,
707 .name
= "PowerBook 520",
708 .adb_type
= MAC_ADB_PB2
,
709 .via_type
= MAC_VIA_QUADRA
,
710 .scsi_type
= MAC_SCSI_OLD
,
711 .scc_type
= MAC_SCC_QUADRA
,
712 .ether_type
= MAC_ETHER_SONIC
,
713 .nubus_type
= MAC_NUBUS
717 * PowerBook Duos are pretty much like normal PowerBooks
718 * All of these probably have onboard SONIC in the Dock which
719 * means we'll have to probe for it eventually.
721 * Are these reallly MAC_VIA_IIci? The developer notes for the
722 * Duos show pretty much the same custom parts as in most of
723 * the other PowerBooks which would imply MAC_VIA_QUADRA.
727 .ident
= MAC_MODEL_PB210
,
728 .name
= "PowerBook Duo 210",
729 .adb_type
= MAC_ADB_PB2
,
730 .via_type
= MAC_VIA_IIci
,
731 .scsi_type
= MAC_SCSI_OLD
,
732 .scc_type
= MAC_SCC_QUADRA
,
733 .nubus_type
= MAC_NUBUS
735 .ident
= MAC_MODEL_PB230
,
736 .name
= "PowerBook Duo 230",
737 .adb_type
= MAC_ADB_PB2
,
738 .via_type
= MAC_VIA_IIci
,
739 .scsi_type
= MAC_SCSI_OLD
,
740 .scc_type
= MAC_SCC_QUADRA
,
741 .nubus_type
= MAC_NUBUS
743 .ident
= MAC_MODEL_PB250
,
744 .name
= "PowerBook Duo 250",
745 .adb_type
= MAC_ADB_PB2
,
746 .via_type
= MAC_VIA_IIci
,
747 .scsi_type
= MAC_SCSI_OLD
,
748 .scc_type
= MAC_SCC_QUADRA
,
749 .nubus_type
= MAC_NUBUS
751 .ident
= MAC_MODEL_PB270C
,
752 .name
= "PowerBook Duo 270c",
753 .adb_type
= MAC_ADB_PB2
,
754 .via_type
= MAC_VIA_IIci
,
755 .scsi_type
= MAC_SCSI_OLD
,
756 .scc_type
= MAC_SCC_QUADRA
,
757 .nubus_type
= MAC_NUBUS
759 .ident
= MAC_MODEL_PB280
,
760 .name
= "PowerBook Duo 280",
761 .adb_type
= MAC_ADB_PB2
,
762 .via_type
= MAC_VIA_IIci
,
763 .scsi_type
= MAC_SCSI_OLD
,
764 .scc_type
= MAC_SCC_QUADRA
,
765 .nubus_type
= MAC_NUBUS
767 .ident
= MAC_MODEL_PB280C
,
768 .name
= "PowerBook Duo 280c",
769 .adb_type
= MAC_ADB_PB2
,
770 .via_type
= MAC_VIA_IIci
,
771 .scsi_type
= MAC_SCSI_OLD
,
772 .scc_type
= MAC_SCC_QUADRA
,
773 .nubus_type
= MAC_NUBUS
784 void mac_identify(void)
788 /* Penguin data useful? */
789 int model
= mac_bi_data
.id
;
791 /* no bootinfo model id -> NetBSD booter was used! */
792 /* XXX FIXME: breaks for model > 31 */
793 model
=(mac_bi_data
.cpuid
>>2)&63;
794 printk (KERN_WARNING
"No bootinfo model ID, using cpuid instead (hey, use Penguin!)\n");
797 macintosh_config
= mac_data_table
;
798 for (m
= macintosh_config
; m
->ident
!= -1 ; m
++) {
799 if (m
->ident
== model
) {
800 macintosh_config
= m
;
805 /* We need to pre-init the IOPs, if any. Otherwise */
806 /* the serial console won't work if the user had */
807 /* the serial ports set to "Faster" mode in MacOS. */
812 printk (KERN_INFO
"Detected Macintosh model: %d \n", model
);
815 * Report booter data:
817 printk (KERN_DEBUG
" Penguin bootinfo data:\n");
818 printk (KERN_DEBUG
" Video: addr 0x%lx row 0x%lx depth %lx dimensions %ld x %ld\n",
819 mac_bi_data
.videoaddr
, mac_bi_data
.videorow
,
820 mac_bi_data
.videodepth
, mac_bi_data
.dimensions
& 0xFFFF,
821 mac_bi_data
.dimensions
>> 16);
822 printk (KERN_DEBUG
" Videological 0x%lx phys. 0x%lx, SCC at 0x%lx \n",
823 mac_bi_data
.videological
, mac_orig_videoaddr
,
824 mac_bi_data
.sccbase
);
825 printk (KERN_DEBUG
" Boottime: 0x%lx GMTBias: 0x%lx \n",
826 mac_bi_data
.boottime
, mac_bi_data
.gmtbias
);
827 printk (KERN_DEBUG
" Machine ID: %ld CPUid: 0x%lx memory size: 0x%lx \n",
828 mac_bi_data
.id
, mac_bi_data
.cpuid
, mac_bi_data
.memsize
);
830 printk ("Ramdisk: addr 0x%lx size 0x%lx\n",
831 m68k_ramdisk
.addr
, m68k_ramdisk
.size
);
835 * TODO: set the various fields in macintosh_config->hw_present here!
837 switch (macintosh_config
->scsi_type
) {
839 MACHW_SET(MAC_SCSI_80
);
841 case MAC_SCSI_QUADRA
:
842 case MAC_SCSI_QUADRA2
:
843 case MAC_SCSI_QUADRA3
:
844 MACHW_SET(MAC_SCSI_96
);
845 if ((macintosh_config
->ident
== MAC_MODEL_Q900
) ||
846 (macintosh_config
->ident
== MAC_MODEL_Q950
))
847 MACHW_SET(MAC_SCSI_96_2
);
850 printk(KERN_WARNING
"config.c: wtf: unknown scsi, using 53c80\n");
851 MACHW_SET(MAC_SCSI_80
);
862 void mac_report_hardware(void)
864 printk(KERN_INFO
"Apple Macintosh %s\n", macintosh_config
->name
);
867 static void mac_get_model(char *str
)
869 strcpy(str
,"Macintosh ");
870 strcat(str
, macintosh_config
->name
);