sound: seq_midi_event: fix decoding of (N)RPN events
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / m68k / mac / config.c
blob98b6bcfb37bf4c10aa7e073c899ef84b0e0d4854
1 /*
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
6 * for more details.
7 */
9 /*
10 * Miscellaneous linux stuff
13 #include <linux/module.h>
14 #include <linux/types.h>
15 #include <linux/mm.h>
16 #include <linux/tty.h>
17 #include <linux/console.h>
18 #include <linux/interrupt.h>
19 /* keyb */
20 #include <linux/random.h>
21 #include <linux/delay.h>
22 /* keyb */
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>
31 #include <asm/io.h>
32 #include <asm/irq.h>
33 #include <asm/pgtable.h>
34 #include <asm/rtc.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 /* The phys. video addr. - might be bogus on some machines */
51 static unsigned long mac_orig_videoaddr;
53 /* Mac specific timer functions */
54 extern unsigned long mac_gettimeoffset(void);
55 extern int mac_hwclk(int, struct rtc_time *);
56 extern int mac_set_clock_mmss(unsigned long);
57 extern void iop_preinit(void);
58 extern void iop_init(void);
59 extern void via_init(void);
60 extern void via_init_clock(irq_handler_t func);
61 extern void via_flush_cache(void);
62 extern void oss_init(void);
63 extern void psc_init(void);
64 extern void baboon_init(void);
66 extern void mac_mksound(unsigned int, unsigned int);
68 extern void nubus_sweep_video(void);
70 static void mac_get_model(char *str);
71 static void mac_identify(void);
72 static void mac_report_hardware(void);
74 static void __init mac_sched_init(irq_handler_t vector)
76 via_init_clock(vector);
80 * Parse a Macintosh-specific record in the bootinfo
83 int __init mac_parse_bootinfo(const struct bi_record *record)
85 int unknown = 0;
86 const u_long *data = record->data;
88 switch (record->tag) {
89 case BI_MAC_MODEL:
90 mac_bi_data.id = *data;
91 break;
92 case BI_MAC_VADDR:
93 mac_bi_data.videoaddr = *data;
94 break;
95 case BI_MAC_VDEPTH:
96 mac_bi_data.videodepth = *data;
97 break;
98 case BI_MAC_VROW:
99 mac_bi_data.videorow = *data;
100 break;
101 case BI_MAC_VDIM:
102 mac_bi_data.dimensions = *data;
103 break;
104 case BI_MAC_VLOGICAL:
105 mac_bi_data.videological = VIDEOMEMBASE + (*data & ~VIDEOMEMMASK);
106 mac_orig_videoaddr = *data;
107 break;
108 case BI_MAC_SCCBASE:
109 mac_bi_data.sccbase = *data;
110 break;
111 case BI_MAC_BTIME:
112 mac_bi_data.boottime = *data;
113 break;
114 case BI_MAC_GMTBIAS:
115 mac_bi_data.gmtbias = *data;
116 break;
117 case BI_MAC_MEMSIZE:
118 mac_bi_data.memsize = *data;
119 break;
120 case BI_MAC_CPUID:
121 mac_bi_data.cpuid = *data;
122 break;
123 case BI_MAC_ROMBASE:
124 mac_bi_data.rombase = *data;
125 break;
126 default:
127 unknown = 1;
128 break;
130 return unknown;
134 * Flip into 24bit mode for an instant - flushes the L2 cache card. We
135 * have to disable interrupts for this. Our IRQ handlers will crap
136 * themselves if they take an IRQ in 24bit mode!
139 static void mac_cache_card_flush(int writeback)
141 unsigned long flags;
143 local_irq_save(flags);
144 via_flush_cache();
145 local_irq_restore(flags);
148 void __init config_mac(void)
150 if (!MACH_IS_MAC)
151 printk(KERN_ERR "ERROR: no Mac, but config_mac() called!! \n");
153 mach_sched_init = mac_sched_init;
154 mach_init_IRQ = mac_init_IRQ;
155 mach_get_model = mac_get_model;
156 mach_gettimeoffset = mac_gettimeoffset;
157 mach_hwclk = mac_hwclk;
158 mach_set_clock_mmss = mac_set_clock_mmss;
159 mach_reset = mac_reset;
160 mach_halt = mac_poweroff;
161 mach_power_off = mac_poweroff;
162 mach_max_dma_address = 0xffffffff;
163 #if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE)
164 mach_beep = mac_mksound;
165 #endif
166 #ifdef CONFIG_HEARTBEAT
167 #if 0
168 mach_heartbeat = mac_heartbeat;
169 mach_heartbeat_irq = IRQ_MAC_TIMER;
170 #endif
171 #endif
174 * Determine hardware present
177 mac_identify();
178 mac_report_hardware();
181 * AFAIK only the IIci takes a cache card. The IIfx has onboard
182 * cache ... someone needs to figure out how to tell if it's on or
183 * not.
186 if (macintosh_config->ident == MAC_MODEL_IICI
187 || macintosh_config->ident == MAC_MODEL_IIFX)
188 mach_l2_flush = mac_cache_card_flush;
191 * Check for machine specific fixups.
194 #ifdef OLD_NUBUS_CODE
195 nubus_sweep_video();
196 #endif
201 * Macintosh Table: hardcoded model configuration data.
203 * Much of this was defined by Alan, based on who knows what docs.
204 * I've added a lot more, and some of that was pure guesswork based
205 * on hardware pages present on the Mac web site. Possibly wildly
206 * inaccurate, so look here if a new Mac model won't run. Example: if
207 * a Mac crashes immediately after the VIA1 registers have been dumped
208 * to the screen, it probably died attempting to read DirB on a RBV.
209 * Meaning it should have MAC_VIA_IIci here :-)
212 struct mac_model *macintosh_config;
213 EXPORT_SYMBOL(macintosh_config);
215 static struct mac_model mac_data_table[] = {
217 * We'll pretend to be a Macintosh II, that's pretty safe.
221 .ident = MAC_MODEL_II,
222 .name = "Unknown",
223 .adb_type = MAC_ADB_II,
224 .via_type = MAC_VIA_II,
225 .scsi_type = MAC_SCSI_OLD,
226 .scc_type = MAC_SCC_II,
227 .nubus_type = MAC_NUBUS
231 * Original MacII hardware
236 .ident = MAC_MODEL_II,
237 .name = "II",
238 .adb_type = MAC_ADB_II,
239 .via_type = MAC_VIA_II,
240 .scsi_type = MAC_SCSI_OLD,
241 .scc_type = MAC_SCC_II,
242 .nubus_type = MAC_NUBUS
243 }, {
244 .ident = MAC_MODEL_IIX,
245 .name = "IIx",
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
251 }, {
252 .ident = MAC_MODEL_IICX,
253 .name = "IIcx",
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
259 }, {
260 .ident = MAC_MODEL_SE30,
261 .name = "SE/30",
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
270 * Weirdified MacII hardware - all subtly different. Gee thanks
271 * Apple. All these boxes seem to have VIA2 in a different place to
272 * the MacII (+1A000 rather than +4000)
273 * CSA: see http://developer.apple.com/technotes/hw/hw_09.html
277 .ident = MAC_MODEL_IICI,
278 .name = "IIci",
279 .adb_type = MAC_ADB_II,
280 .via_type = MAC_VIA_IIci,
281 .scsi_type = MAC_SCSI_OLD,
282 .scc_type = MAC_SCC_II,
283 .nubus_type = MAC_NUBUS
284 }, {
285 .ident = MAC_MODEL_IIFX,
286 .name = "IIfx",
287 .adb_type = MAC_ADB_IOP,
288 .via_type = MAC_VIA_IIci,
289 .scsi_type = MAC_SCSI_OLD,
290 .scc_type = MAC_SCC_IOP,
291 .nubus_type = MAC_NUBUS
292 }, {
293 .ident = MAC_MODEL_IISI,
294 .name = "IIsi",
295 .adb_type = MAC_ADB_IISI,
296 .via_type = MAC_VIA_IIci,
297 .scsi_type = MAC_SCSI_OLD,
298 .scc_type = MAC_SCC_II,
299 .nubus_type = MAC_NUBUS
300 }, {
301 .ident = MAC_MODEL_IIVI,
302 .name = "IIvi",
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
308 }, {
309 .ident = MAC_MODEL_IIVX,
310 .name = "IIvx",
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
319 * Classic models (guessing: similar to SE/30 ?? Nope, similar to LC ...)
323 .ident = MAC_MODEL_CLII,
324 .name = "Classic II",
325 .adb_type = MAC_ADB_IISI,
326 .via_type = MAC_VIA_IIci,
327 .scsi_type = MAC_SCSI_OLD,
328 .scc_type = MAC_SCC_II,
329 .nubus_type = MAC_NUBUS
330 }, {
331 .ident = MAC_MODEL_CCL,
332 .name = "Color Classic",
333 .adb_type = MAC_ADB_CUDA,
334 .via_type = MAC_VIA_IIci,
335 .scsi_type = MAC_SCSI_OLD,
336 .scc_type = MAC_SCC_II,
337 .nubus_type = MAC_NUBUS},
340 * Some Mac LC machines. Basically the same as the IIci, ADB like IIsi
344 .ident = MAC_MODEL_LC,
345 .name = "LC",
346 .adb_type = MAC_ADB_IISI,
347 .via_type = MAC_VIA_IIci,
348 .scsi_type = MAC_SCSI_OLD,
349 .scc_type = MAC_SCC_II,
350 .nubus_type = MAC_NUBUS
351 }, {
352 .ident = MAC_MODEL_LCII,
353 .name = "LC II",
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
359 }, {
360 .ident = MAC_MODEL_LCIII,
361 .name = "LC III",
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
370 * Quadra. Video is at 0xF9000000, via is like a MacII. We label it differently
371 * as some of the stuff connected to VIA2 seems different. Better SCSI chip and
372 * onboard ethernet using a NatSemi SONIC except the 660AV and 840AV which use an
373 * AMD 79C940 (MACE).
374 * The 700, 900 and 950 have some I/O chips in the wrong place to
375 * confuse us. The 840AV has a SCSI location of its own (same as
376 * the 660AV).
380 .ident = MAC_MODEL_Q605,
381 .name = "Quadra 605",
382 .adb_type = MAC_ADB_CUDA,
383 .via_type = MAC_VIA_QUADRA,
384 .scsi_type = MAC_SCSI_QUADRA,
385 .scc_type = MAC_SCC_QUADRA,
386 .nubus_type = MAC_NUBUS
387 }, {
388 .ident = MAC_MODEL_Q605_ACC,
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
395 }, {
396 .ident = MAC_MODEL_Q610,
397 .name = "Quadra 610",
398 .adb_type = MAC_ADB_II,
399 .via_type = MAC_VIA_QUADRA,
400 .scsi_type = MAC_SCSI_QUADRA,
401 .scc_type = MAC_SCC_QUADRA,
402 .ether_type = MAC_ETHER_SONIC,
403 .nubus_type = MAC_NUBUS
404 }, {
405 .ident = MAC_MODEL_Q630,
406 .name = "Quadra 630",
407 .adb_type = MAC_ADB_CUDA,
408 .via_type = MAC_VIA_QUADRA,
409 .scsi_type = MAC_SCSI_QUADRA,
410 .ide_type = MAC_IDE_QUADRA,
411 .scc_type = MAC_SCC_QUADRA,
412 .ether_type = MAC_ETHER_SONIC,
413 .nubus_type = MAC_NUBUS
414 }, {
415 .ident = MAC_MODEL_Q650,
416 .name = "Quadra 650",
417 .adb_type = MAC_ADB_II,
418 .via_type = MAC_VIA_QUADRA,
419 .scsi_type = MAC_SCSI_QUADRA,
420 .scc_type = MAC_SCC_QUADRA,
421 .ether_type = MAC_ETHER_SONIC,
422 .nubus_type = MAC_NUBUS
424 /* The Q700 does have a NS Sonic */
426 .ident = MAC_MODEL_Q700,
427 .name = "Quadra 700",
428 .adb_type = MAC_ADB_II,
429 .via_type = MAC_VIA_QUADRA,
430 .scsi_type = MAC_SCSI_QUADRA2,
431 .scc_type = MAC_SCC_QUADRA,
432 .ether_type = MAC_ETHER_SONIC,
433 .nubus_type = MAC_NUBUS
434 }, {
435 .ident = MAC_MODEL_Q800,
436 .name = "Quadra 800",
437 .adb_type = MAC_ADB_II,
438 .via_type = MAC_VIA_QUADRA,
439 .scsi_type = MAC_SCSI_QUADRA,
440 .scc_type = MAC_SCC_QUADRA,
441 .ether_type = MAC_ETHER_SONIC,
442 .nubus_type = MAC_NUBUS
443 }, {
444 .ident = MAC_MODEL_Q840,
445 .name = "Quadra 840AV",
446 .adb_type = MAC_ADB_CUDA,
447 .via_type = MAC_VIA_QUADRA,
448 .scsi_type = MAC_SCSI_QUADRA3,
449 .scc_type = MAC_SCC_PSC,
450 .ether_type = MAC_ETHER_MACE,
451 .nubus_type = MAC_NUBUS
452 }, {
453 .ident = MAC_MODEL_Q900,
454 .name = "Quadra 900",
455 .adb_type = MAC_ADB_IOP,
456 .via_type = MAC_VIA_QUADRA,
457 .scsi_type = MAC_SCSI_QUADRA2,
458 .scc_type = MAC_SCC_IOP,
459 .ether_type = MAC_ETHER_SONIC,
460 .nubus_type = MAC_NUBUS
461 }, {
462 .ident = MAC_MODEL_Q950,
463 .name = "Quadra 950",
464 .adb_type = MAC_ADB_IOP,
465 .via_type = MAC_VIA_QUADRA,
466 .scsi_type = MAC_SCSI_QUADRA2,
467 .scc_type = MAC_SCC_IOP,
468 .ether_type = MAC_ETHER_SONIC,
469 .nubus_type = MAC_NUBUS
473 * Performa - more LC type machines
477 .ident = MAC_MODEL_P460,
478 .name = "Performa 460",
479 .adb_type = MAC_ADB_IISI,
480 .via_type = MAC_VIA_IIci,
481 .scsi_type = MAC_SCSI_OLD,
482 .scc_type = MAC_SCC_II,
483 .nubus_type = MAC_NUBUS
484 }, {
485 .ident = MAC_MODEL_P475,
486 .name = "Performa 475",
487 .adb_type = MAC_ADB_CUDA,
488 .via_type = MAC_VIA_QUADRA,
489 .scsi_type = MAC_SCSI_QUADRA,
490 .scc_type = MAC_SCC_II,
491 .nubus_type = MAC_NUBUS
492 }, {
493 .ident = MAC_MODEL_P475F,
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
500 }, {
501 .ident = MAC_MODEL_P520,
502 .name = "Performa 520",
503 .adb_type = MAC_ADB_CUDA,
504 .via_type = MAC_VIA_IIci,
505 .scsi_type = MAC_SCSI_OLD,
506 .scc_type = MAC_SCC_II,
507 .nubus_type = MAC_NUBUS
508 }, {
509 .ident = MAC_MODEL_P550,
510 .name = "Performa 550",
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 /* These have the comm slot, and therefore the possibility of SONIC ethernet */
519 .ident = MAC_MODEL_P575,
520 .name = "Performa 575",
521 .adb_type = MAC_ADB_CUDA,
522 .via_type = MAC_VIA_QUADRA,
523 .scsi_type = MAC_SCSI_QUADRA,
524 .scc_type = MAC_SCC_II,
525 .ether_type = MAC_ETHER_SONIC,
526 .nubus_type = MAC_NUBUS
527 }, {
528 .ident = MAC_MODEL_P588,
529 .name = "Performa 588",
530 .adb_type = MAC_ADB_CUDA,
531 .via_type = MAC_VIA_QUADRA,
532 .scsi_type = MAC_SCSI_QUADRA,
533 .ide_type = MAC_IDE_QUADRA,
534 .scc_type = MAC_SCC_II,
535 .ether_type = MAC_ETHER_SONIC,
536 .nubus_type = MAC_NUBUS
537 }, {
538 .ident = MAC_MODEL_TV,
539 .name = "TV",
540 .adb_type = MAC_ADB_CUDA,
541 .via_type = MAC_VIA_QUADRA,
542 .scsi_type = MAC_SCSI_OLD,
543 .scc_type = MAC_SCC_II,
544 .nubus_type = MAC_NUBUS
545 }, {
546 .ident = MAC_MODEL_P600,
547 .name = "Performa 600",
548 .adb_type = MAC_ADB_IISI,
549 .via_type = MAC_VIA_IIci,
550 .scsi_type = MAC_SCSI_OLD,
551 .scc_type = MAC_SCC_II,
552 .nubus_type = MAC_NUBUS
556 * Centris - just guessing again; maybe like Quadra
559 /* The C610 may or may not have SONIC. We probe to make sure */
561 .ident = MAC_MODEL_C610,
562 .name = "Centris 610",
563 .adb_type = MAC_ADB_II,
564 .via_type = MAC_VIA_QUADRA,
565 .scsi_type = MAC_SCSI_QUADRA,
566 .scc_type = MAC_SCC_QUADRA,
567 .ether_type = MAC_ETHER_SONIC,
568 .nubus_type = MAC_NUBUS
569 }, {
570 .ident = MAC_MODEL_C650,
571 .name = "Centris 650",
572 .adb_type = MAC_ADB_II,
573 .via_type = MAC_VIA_QUADRA,
574 .scsi_type = MAC_SCSI_QUADRA,
575 .scc_type = MAC_SCC_QUADRA,
576 .ether_type = MAC_ETHER_SONIC,
577 .nubus_type = MAC_NUBUS
578 }, {
579 .ident = MAC_MODEL_C660,
580 .name = "Centris 660AV",
581 .adb_type = MAC_ADB_CUDA,
582 .via_type = MAC_VIA_QUADRA,
583 .scsi_type = MAC_SCSI_QUADRA3,
584 .scc_type = MAC_SCC_PSC,
585 .ether_type = MAC_ETHER_MACE,
586 .nubus_type = MAC_NUBUS
590 * The PowerBooks all the same "Combo" custom IC for SCSI and SCC
591 * and a PMU (in two variations?) for ADB. Most of them use the
592 * Quadra-style VIAs. A few models also have IDE from hell.
596 .ident = MAC_MODEL_PB140,
597 .name = "PowerBook 140",
598 .adb_type = MAC_ADB_PB1,
599 .via_type = MAC_VIA_QUADRA,
600 .scsi_type = MAC_SCSI_OLD,
601 .scc_type = MAC_SCC_QUADRA,
602 .nubus_type = MAC_NUBUS
603 }, {
604 .ident = MAC_MODEL_PB145,
605 .name = "PowerBook 145",
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
611 }, {
612 .ident = MAC_MODEL_PB150,
613 .name = "PowerBook 150",
614 .adb_type = MAC_ADB_PB1,
615 .via_type = MAC_VIA_IIci,
616 .scsi_type = MAC_SCSI_OLD,
617 .ide_type = MAC_IDE_PB,
618 .scc_type = MAC_SCC_QUADRA,
619 .nubus_type = MAC_NUBUS
620 }, {
621 .ident = MAC_MODEL_PB160,
622 .name = "PowerBook 160",
623 .adb_type = MAC_ADB_PB1,
624 .via_type = MAC_VIA_QUADRA,
625 .scsi_type = MAC_SCSI_OLD,
626 .scc_type = MAC_SCC_QUADRA,
627 .nubus_type = MAC_NUBUS
628 }, {
629 .ident = MAC_MODEL_PB165,
630 .name = "PowerBook 165",
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
636 }, {
637 .ident = MAC_MODEL_PB165C,
638 .name = "PowerBook 165c",
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
644 }, {
645 .ident = MAC_MODEL_PB170,
646 .name = "PowerBook 170",
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
652 }, {
653 .ident = MAC_MODEL_PB180,
654 .name = "PowerBook 180",
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
660 }, {
661 .ident = MAC_MODEL_PB180C,
662 .name = "PowerBook 180c",
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
668 }, {
669 .ident = MAC_MODEL_PB190,
670 .name = "PowerBook 190",
671 .adb_type = MAC_ADB_PB2,
672 .via_type = MAC_VIA_QUADRA,
673 .scsi_type = MAC_SCSI_OLD,
674 .ide_type = MAC_IDE_BABOON,
675 .scc_type = MAC_SCC_QUADRA,
676 .nubus_type = MAC_NUBUS
677 }, {
678 .ident = MAC_MODEL_PB520,
679 .name = "PowerBook 520",
680 .adb_type = MAC_ADB_PB2,
681 .via_type = MAC_VIA_QUADRA,
682 .scsi_type = MAC_SCSI_OLD,
683 .scc_type = MAC_SCC_QUADRA,
684 .ether_type = MAC_ETHER_SONIC,
685 .nubus_type = MAC_NUBUS
689 * PowerBook Duos are pretty much like normal PowerBooks
690 * All of these probably have onboard SONIC in the Dock which
691 * means we'll have to probe for it eventually.
693 * Are these really MAC_VIA_IIci? The developer notes for the
694 * Duos show pretty much the same custom parts as in most of
695 * the other PowerBooks which would imply MAC_VIA_QUADRA.
699 .ident = MAC_MODEL_PB210,
700 .name = "PowerBook Duo 210",
701 .adb_type = MAC_ADB_PB2,
702 .via_type = MAC_VIA_IIci,
703 .scsi_type = MAC_SCSI_OLD,
704 .scc_type = MAC_SCC_QUADRA,
705 .nubus_type = MAC_NUBUS
706 }, {
707 .ident = MAC_MODEL_PB230,
708 .name = "PowerBook Duo 230",
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
714 }, {
715 .ident = MAC_MODEL_PB250,
716 .name = "PowerBook Duo 250",
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
722 }, {
723 .ident = MAC_MODEL_PB270C,
724 .name = "PowerBook Duo 270c",
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
730 }, {
731 .ident = MAC_MODEL_PB280,
732 .name = "PowerBook Duo 280",
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
738 }, {
739 .ident = MAC_MODEL_PB280C,
740 .name = "PowerBook Duo 280c",
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
749 * Other stuff ??
752 .ident = -1
756 static void __init mac_identify(void)
758 struct mac_model *m;
760 /* Penguin data useful? */
761 int model = mac_bi_data.id;
762 if (!model) {
763 /* no bootinfo model id -> NetBSD booter was used! */
764 /* XXX FIXME: breaks for model > 31 */
765 model = (mac_bi_data.cpuid >> 2) & 63;
766 printk(KERN_WARNING "No bootinfo model ID, using cpuid instead (hey, use Penguin!)\n");
769 macintosh_config = mac_data_table;
770 for (m = macintosh_config; m->ident != -1; m++) {
771 if (m->ident == model) {
772 macintosh_config = m;
773 break;
777 /* We need to pre-init the IOPs, if any. Otherwise */
778 /* the serial console won't work if the user had */
779 /* the serial ports set to "Faster" mode in MacOS. */
781 iop_preinit();
783 printk(KERN_INFO "Detected Macintosh model: %d \n", model);
786 * Report booter data:
788 printk(KERN_DEBUG " Penguin bootinfo data:\n");
789 printk(KERN_DEBUG " Video: addr 0x%lx row 0x%lx depth %lx dimensions %ld x %ld\n",
790 mac_bi_data.videoaddr, mac_bi_data.videorow,
791 mac_bi_data.videodepth, mac_bi_data.dimensions & 0xFFFF,
792 mac_bi_data.dimensions >> 16);
793 printk(KERN_DEBUG " Videological 0x%lx phys. 0x%lx, SCC at 0x%lx \n",
794 mac_bi_data.videological, mac_orig_videoaddr,
795 mac_bi_data.sccbase);
796 printk(KERN_DEBUG " Boottime: 0x%lx GMTBias: 0x%lx \n",
797 mac_bi_data.boottime, mac_bi_data.gmtbias);
798 printk(KERN_DEBUG " Machine ID: %ld CPUid: 0x%lx memory size: 0x%lx \n",
799 mac_bi_data.id, mac_bi_data.cpuid, mac_bi_data.memsize);
801 iop_init();
802 via_init();
803 oss_init();
804 psc_init();
805 baboon_init();
808 static void __init mac_report_hardware(void)
810 printk(KERN_INFO "Apple Macintosh %s\n", macintosh_config->name);
813 static void mac_get_model(char *str)
815 strcpy(str, "Macintosh ");
816 strcat(str, macintosh_config->name);