Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * linux/arch/m68k/mac/config.c |
| 3 | * |
| 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 | */ |
| 8 | |
| 9 | /* |
| 10 | * Miscellaneous linux stuff |
| 11 | */ |
| 12 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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> |
| 25 | |
| 26 | #define BOOTINFO_COMPAT_1_0 |
| 27 | #include <asm/setup.h> |
| 28 | #include <asm/bootinfo.h> |
| 29 | |
| 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> |
| 36 | |
| 37 | #include <asm/macintosh.h> |
| 38 | #include <asm/macints.h> |
| 39 | #include <asm/machw.h> |
| 40 | |
| 41 | #include <asm/mac_iop.h> |
| 42 | #include <asm/mac_via.h> |
| 43 | #include <asm/mac_oss.h> |
| 44 | #include <asm/mac_psc.h> |
| 45 | |
| 46 | /* Mac bootinfo struct */ |
| 47 | |
| 48 | struct mac_booter_data mac_bi_data; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | /* The phys. video addr. - might be bogus on some machines */ |
Adrian Bunk | 8dfbdf4 | 2008-07-17 21:16:25 +0200 | [diff] [blame] | 51 | static unsigned long mac_orig_videoaddr; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 52 | |
| 53 | /* Mac specific timer functions */ |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 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); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 57 | extern void iop_preinit(void); |
| 58 | extern void iop_init(void); |
| 59 | extern void via_init(void); |
David Howells | 40220c1 | 2006-10-09 12:19:47 +0100 | [diff] [blame] | 60 | extern void via_init_clock(irq_handler_t func); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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); |
| 65 | |
| 66 | extern void mac_mksound(unsigned int, unsigned int); |
| 67 | |
| 68 | extern void nubus_sweep_video(void); |
| 69 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 70 | static void mac_get_model(char *str); |
Adrian Bunk | 8dfbdf4 | 2008-07-17 21:16:25 +0200 | [diff] [blame] | 71 | static void mac_identify(void); |
| 72 | static void mac_report_hardware(void); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 73 | |
Al Viro | 66a3f82 | 2007-07-20 04:33:28 +0100 | [diff] [blame] | 74 | static void __init mac_sched_init(irq_handler_t vector) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 75 | { |
| 76 | via_init_clock(vector); |
| 77 | } |
| 78 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 79 | /* |
| 80 | * Parse a Macintosh-specific record in the bootinfo |
| 81 | */ |
| 82 | |
| 83 | int __init mac_parse_bootinfo(const struct bi_record *record) |
| 84 | { |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 85 | int unknown = 0; |
| 86 | const u_long *data = record->data; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 87 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 88 | switch (record->tag) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 89 | case BI_MAC_MODEL: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 90 | mac_bi_data.id = *data; |
| 91 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 92 | case BI_MAC_VADDR: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 93 | mac_bi_data.videoaddr = *data; |
| 94 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 95 | case BI_MAC_VDEPTH: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 96 | mac_bi_data.videodepth = *data; |
| 97 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 98 | case BI_MAC_VROW: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 99 | mac_bi_data.videorow = *data; |
| 100 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 101 | case BI_MAC_VDIM: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 102 | mac_bi_data.dimensions = *data; |
| 103 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 104 | case BI_MAC_VLOGICAL: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 105 | mac_bi_data.videological = VIDEOMEMBASE + (*data & ~VIDEOMEMMASK); |
| 106 | mac_orig_videoaddr = *data; |
| 107 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 108 | case BI_MAC_SCCBASE: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 109 | mac_bi_data.sccbase = *data; |
| 110 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 111 | case BI_MAC_BTIME: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 112 | mac_bi_data.boottime = *data; |
| 113 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 114 | case BI_MAC_GMTBIAS: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 115 | mac_bi_data.gmtbias = *data; |
| 116 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 117 | case BI_MAC_MEMSIZE: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 118 | mac_bi_data.memsize = *data; |
| 119 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 120 | case BI_MAC_CPUID: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 121 | mac_bi_data.cpuid = *data; |
| 122 | break; |
| 123 | case BI_MAC_ROMBASE: |
| 124 | mac_bi_data.rombase = *data; |
| 125 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 126 | default: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 127 | unknown = 1; |
| 128 | break; |
| 129 | } |
| 130 | return unknown; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 131 | } |
| 132 | |
| 133 | /* |
| 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! |
| 137 | */ |
| 138 | |
| 139 | static void mac_cache_card_flush(int writeback) |
| 140 | { |
| 141 | unsigned long flags; |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 142 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 143 | local_irq_save(flags); |
| 144 | via_flush_cache(); |
| 145 | local_irq_restore(flags); |
| 146 | } |
| 147 | |
| 148 | void __init config_mac(void) |
| 149 | { |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 150 | if (!MACH_IS_MAC) |
| 151 | printk(KERN_ERR "ERROR: no Mac, but config_mac() called!! \n"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 152 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 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; |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 157 | mach_hwclk = mac_hwclk; |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 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; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 162 | mach_max_dma_address = 0xffffffff; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 163 | #if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 164 | mach_beep = mac_mksound; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 |
| 172 | |
| 173 | /* |
| 174 | * Determine hardware present |
| 175 | */ |
| 176 | |
| 177 | mac_identify(); |
| 178 | mac_report_hardware(); |
| 179 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 180 | /* |
| 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. |
| 184 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 185 | |
| 186 | if (macintosh_config->ident == MAC_MODEL_IICI |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 187 | || macintosh_config->ident == MAC_MODEL_IIFX) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 188 | mach_l2_flush = mac_cache_card_flush; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 189 | |
| 190 | /* |
| 191 | * Check for machine specific fixups. |
| 192 | */ |
| 193 | |
| 194 | #ifdef OLD_NUBUS_CODE |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 195 | nubus_sweep_video(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 196 | #endif |
| 197 | } |
| 198 | |
| 199 | |
| 200 | /* |
| 201 | * Macintosh Table: hardcoded model configuration data. |
| 202 | * |
| 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 :-) |
| 210 | */ |
| 211 | |
| 212 | struct mac_model *macintosh_config; |
| 213 | EXPORT_SYMBOL(macintosh_config); |
| 214 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 215 | static struct mac_model mac_data_table[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 216 | /* |
| 217 | * We'll pretend to be a Macintosh II, that's pretty safe. |
| 218 | */ |
| 219 | |
| 220 | { |
| 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, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 227 | .nubus_type = MAC_NUBUS, |
| 228 | .floppy_type = MAC_FLOPPY_IWM |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 229 | }, |
| 230 | |
| 231 | /* |
| 232 | * Original MacII hardware |
| 233 | * |
| 234 | */ |
| 235 | |
| 236 | { |
| 237 | .ident = MAC_MODEL_II, |
| 238 | .name = "II", |
| 239 | .adb_type = MAC_ADB_II, |
| 240 | .via_type = MAC_VIA_II, |
| 241 | .scsi_type = MAC_SCSI_OLD, |
| 242 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 243 | .nubus_type = MAC_NUBUS, |
| 244 | .floppy_type = MAC_FLOPPY_IWM |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 245 | }, { |
| 246 | .ident = MAC_MODEL_IIX, |
| 247 | .name = "IIx", |
| 248 | .adb_type = MAC_ADB_II, |
| 249 | .via_type = MAC_VIA_II, |
| 250 | .scsi_type = MAC_SCSI_OLD, |
| 251 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 252 | .nubus_type = MAC_NUBUS, |
| 253 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 254 | }, { |
| 255 | .ident = MAC_MODEL_IICX, |
| 256 | .name = "IIcx", |
| 257 | .adb_type = MAC_ADB_II, |
| 258 | .via_type = MAC_VIA_II, |
| 259 | .scsi_type = MAC_SCSI_OLD, |
| 260 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 261 | .nubus_type = MAC_NUBUS, |
| 262 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 263 | }, { |
| 264 | .ident = MAC_MODEL_SE30, |
| 265 | .name = "SE/30", |
| 266 | .adb_type = MAC_ADB_II, |
| 267 | .via_type = MAC_VIA_II, |
| 268 | .scsi_type = MAC_SCSI_OLD, |
| 269 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 270 | .nubus_type = MAC_NUBUS, |
| 271 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 272 | }, |
| 273 | |
| 274 | /* |
Simon Arlott | 0c79cf6 | 2007-10-20 01:20:32 +0200 | [diff] [blame] | 275 | * Weirdified MacII hardware - all subtly different. Gee thanks |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 276 | * Apple. All these boxes seem to have VIA2 in a different place to |
| 277 | * the MacII (+1A000 rather than +4000) |
| 278 | * CSA: see http://developer.apple.com/technotes/hw/hw_09.html |
| 279 | */ |
| 280 | |
| 281 | { |
| 282 | .ident = MAC_MODEL_IICI, |
| 283 | .name = "IIci", |
| 284 | .adb_type = MAC_ADB_II, |
| 285 | .via_type = MAC_VIA_IIci, |
| 286 | .scsi_type = MAC_SCSI_OLD, |
| 287 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 288 | .nubus_type = MAC_NUBUS, |
| 289 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 290 | }, { |
| 291 | .ident = MAC_MODEL_IIFX, |
| 292 | .name = "IIfx", |
| 293 | .adb_type = MAC_ADB_IOP, |
| 294 | .via_type = MAC_VIA_IIci, |
| 295 | .scsi_type = MAC_SCSI_OLD, |
| 296 | .scc_type = MAC_SCC_IOP, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 297 | .nubus_type = MAC_NUBUS, |
| 298 | .floppy_type = MAC_FLOPPY_SWIM_IOP |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 299 | }, { |
| 300 | .ident = MAC_MODEL_IISI, |
| 301 | .name = "IIsi", |
| 302 | .adb_type = MAC_ADB_IISI, |
| 303 | .via_type = MAC_VIA_IIci, |
| 304 | .scsi_type = MAC_SCSI_OLD, |
| 305 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 306 | .nubus_type = MAC_NUBUS, |
| 307 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 308 | }, { |
| 309 | .ident = MAC_MODEL_IIVI, |
| 310 | .name = "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, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 315 | .nubus_type = MAC_NUBUS, |
| 316 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 317 | }, { |
| 318 | .ident = MAC_MODEL_IIVX, |
| 319 | .name = "IIvx", |
| 320 | .adb_type = MAC_ADB_IISI, |
| 321 | .via_type = MAC_VIA_IIci, |
| 322 | .scsi_type = MAC_SCSI_OLD, |
| 323 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 324 | .nubus_type = MAC_NUBUS, |
| 325 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 326 | }, |
| 327 | |
| 328 | /* |
| 329 | * Classic models (guessing: similar to SE/30 ?? Nope, similar to LC ...) |
| 330 | */ |
| 331 | |
| 332 | { |
| 333 | .ident = MAC_MODEL_CLII, |
| 334 | .name = "Classic II", |
| 335 | .adb_type = MAC_ADB_IISI, |
| 336 | .via_type = MAC_VIA_IIci, |
| 337 | .scsi_type = MAC_SCSI_OLD, |
| 338 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 339 | .nubus_type = MAC_NUBUS, |
| 340 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 341 | }, { |
| 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, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 348 | .nubus_type = MAC_NUBUS, |
| 349 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
| 350 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 351 | |
| 352 | /* |
| 353 | * Some Mac LC machines. Basically the same as the IIci, ADB like IIsi |
| 354 | */ |
| 355 | |
| 356 | { |
| 357 | .ident = MAC_MODEL_LC, |
| 358 | .name = "LC", |
| 359 | .adb_type = MAC_ADB_IISI, |
| 360 | .via_type = MAC_VIA_IIci, |
| 361 | .scsi_type = MAC_SCSI_OLD, |
| 362 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 363 | .nubus_type = MAC_NUBUS, |
| 364 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 365 | }, { |
| 366 | .ident = MAC_MODEL_LCII, |
| 367 | .name = "LC II", |
| 368 | .adb_type = MAC_ADB_IISI, |
| 369 | .via_type = MAC_VIA_IIci, |
| 370 | .scsi_type = MAC_SCSI_OLD, |
| 371 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 372 | .nubus_type = MAC_NUBUS, |
| 373 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 374 | }, { |
| 375 | .ident = MAC_MODEL_LCIII, |
| 376 | .name = "LC III", |
| 377 | .adb_type = MAC_ADB_IISI, |
| 378 | .via_type = MAC_VIA_IIci, |
| 379 | .scsi_type = MAC_SCSI_OLD, |
| 380 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 381 | .nubus_type = MAC_NUBUS, |
| 382 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 383 | }, |
| 384 | |
| 385 | /* |
| 386 | * Quadra. Video is at 0xF9000000, via is like a MacII. We label it differently |
| 387 | * as some of the stuff connected to VIA2 seems different. Better SCSI chip and |
| 388 | * onboard ethernet using a NatSemi SONIC except the 660AV and 840AV which use an |
| 389 | * AMD 79C940 (MACE). |
| 390 | * The 700, 900 and 950 have some I/O chips in the wrong place to |
| 391 | * confuse us. The 840AV has a SCSI location of its own (same as |
| 392 | * the 660AV). |
| 393 | */ |
| 394 | |
| 395 | { |
| 396 | .ident = MAC_MODEL_Q605, |
| 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, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 402 | .nubus_type = MAC_NUBUS, |
| 403 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 404 | }, { |
| 405 | .ident = MAC_MODEL_Q605_ACC, |
| 406 | .name = "Quadra 605", |
| 407 | .adb_type = MAC_ADB_CUDA, |
| 408 | .via_type = MAC_VIA_QUADRA, |
| 409 | .scsi_type = MAC_SCSI_QUADRA, |
| 410 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 411 | .nubus_type = MAC_NUBUS, |
| 412 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 413 | }, { |
| 414 | .ident = MAC_MODEL_Q610, |
| 415 | .name = "Quadra 610", |
| 416 | .adb_type = MAC_ADB_II, |
| 417 | .via_type = MAC_VIA_QUADRA, |
| 418 | .scsi_type = MAC_SCSI_QUADRA, |
| 419 | .scc_type = MAC_SCC_QUADRA, |
| 420 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 421 | .nubus_type = MAC_NUBUS, |
| 422 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 423 | }, { |
| 424 | .ident = MAC_MODEL_Q630, |
| 425 | .name = "Quadra 630", |
| 426 | .adb_type = MAC_ADB_CUDA, |
| 427 | .via_type = MAC_VIA_QUADRA, |
| 428 | .scsi_type = MAC_SCSI_QUADRA, |
| 429 | .ide_type = MAC_IDE_QUADRA, |
| 430 | .scc_type = MAC_SCC_QUADRA, |
| 431 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 432 | .nubus_type = MAC_NUBUS, |
| 433 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 434 | }, { |
| 435 | .ident = MAC_MODEL_Q650, |
| 436 | .name = "Quadra 650", |
| 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, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 442 | .nubus_type = MAC_NUBUS, |
| 443 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 444 | }, |
| 445 | /* The Q700 does have a NS Sonic */ |
| 446 | { |
| 447 | .ident = MAC_MODEL_Q700, |
| 448 | .name = "Quadra 700", |
| 449 | .adb_type = MAC_ADB_II, |
| 450 | .via_type = MAC_VIA_QUADRA, |
| 451 | .scsi_type = MAC_SCSI_QUADRA2, |
| 452 | .scc_type = MAC_SCC_QUADRA, |
| 453 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 454 | .nubus_type = MAC_NUBUS, |
| 455 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 456 | }, { |
| 457 | .ident = MAC_MODEL_Q800, |
| 458 | .name = "Quadra 800", |
| 459 | .adb_type = MAC_ADB_II, |
| 460 | .via_type = MAC_VIA_QUADRA, |
| 461 | .scsi_type = MAC_SCSI_QUADRA, |
| 462 | .scc_type = MAC_SCC_QUADRA, |
| 463 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 464 | .nubus_type = MAC_NUBUS, |
| 465 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 466 | }, { |
| 467 | .ident = MAC_MODEL_Q840, |
| 468 | .name = "Quadra 840AV", |
| 469 | .adb_type = MAC_ADB_CUDA, |
| 470 | .via_type = MAC_VIA_QUADRA, |
| 471 | .scsi_type = MAC_SCSI_QUADRA3, |
| 472 | .scc_type = MAC_SCC_PSC, |
| 473 | .ether_type = MAC_ETHER_MACE, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 474 | .nubus_type = MAC_NUBUS, |
| 475 | .floppy_type = MAC_FLOPPY_AV |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 476 | }, { |
| 477 | .ident = MAC_MODEL_Q900, |
| 478 | .name = "Quadra 900", |
| 479 | .adb_type = MAC_ADB_IOP, |
| 480 | .via_type = MAC_VIA_QUADRA, |
| 481 | .scsi_type = MAC_SCSI_QUADRA2, |
| 482 | .scc_type = MAC_SCC_IOP, |
| 483 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 484 | .nubus_type = MAC_NUBUS, |
| 485 | .floppy_type = MAC_FLOPPY_SWIM_IOP |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 486 | }, { |
| 487 | .ident = MAC_MODEL_Q950, |
| 488 | .name = "Quadra 950", |
| 489 | .adb_type = MAC_ADB_IOP, |
| 490 | .via_type = MAC_VIA_QUADRA, |
| 491 | .scsi_type = MAC_SCSI_QUADRA2, |
| 492 | .scc_type = MAC_SCC_IOP, |
| 493 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 494 | .nubus_type = MAC_NUBUS, |
| 495 | .floppy_type = MAC_FLOPPY_SWIM_IOP |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 496 | }, |
| 497 | |
| 498 | /* |
| 499 | * Performa - more LC type machines |
| 500 | */ |
| 501 | |
| 502 | { |
| 503 | .ident = MAC_MODEL_P460, |
| 504 | .name = "Performa 460", |
| 505 | .adb_type = MAC_ADB_IISI, |
| 506 | .via_type = MAC_VIA_IIci, |
| 507 | .scsi_type = MAC_SCSI_OLD, |
| 508 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 509 | .nubus_type = MAC_NUBUS, |
| 510 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 511 | }, { |
| 512 | .ident = MAC_MODEL_P475, |
| 513 | .name = "Performa 475", |
| 514 | .adb_type = MAC_ADB_CUDA, |
| 515 | .via_type = MAC_VIA_QUADRA, |
| 516 | .scsi_type = MAC_SCSI_QUADRA, |
| 517 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 518 | .nubus_type = MAC_NUBUS, |
| 519 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 520 | }, { |
| 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, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 527 | .nubus_type = MAC_NUBUS, |
| 528 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 529 | }, { |
| 530 | .ident = MAC_MODEL_P520, |
| 531 | .name = "Performa 520", |
| 532 | .adb_type = MAC_ADB_CUDA, |
| 533 | .via_type = MAC_VIA_IIci, |
| 534 | .scsi_type = MAC_SCSI_OLD, |
| 535 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 536 | .nubus_type = MAC_NUBUS, |
| 537 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 538 | }, { |
| 539 | .ident = MAC_MODEL_P550, |
| 540 | .name = "Performa 550", |
| 541 | .adb_type = MAC_ADB_CUDA, |
| 542 | .via_type = MAC_VIA_IIci, |
| 543 | .scsi_type = MAC_SCSI_OLD, |
| 544 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 545 | .nubus_type = MAC_NUBUS, |
| 546 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 547 | }, |
| 548 | /* These have the comm slot, and therefore the possibility of SONIC ethernet */ |
| 549 | { |
| 550 | .ident = MAC_MODEL_P575, |
| 551 | .name = "Performa 575", |
| 552 | .adb_type = MAC_ADB_CUDA, |
| 553 | .via_type = MAC_VIA_QUADRA, |
| 554 | .scsi_type = MAC_SCSI_QUADRA, |
| 555 | .scc_type = MAC_SCC_II, |
| 556 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 557 | .nubus_type = MAC_NUBUS, |
| 558 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 559 | }, { |
| 560 | .ident = MAC_MODEL_P588, |
| 561 | .name = "Performa 588", |
| 562 | .adb_type = MAC_ADB_CUDA, |
| 563 | .via_type = MAC_VIA_QUADRA, |
| 564 | .scsi_type = MAC_SCSI_QUADRA, |
| 565 | .ide_type = MAC_IDE_QUADRA, |
| 566 | .scc_type = MAC_SCC_II, |
| 567 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 568 | .nubus_type = MAC_NUBUS, |
| 569 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 570 | }, { |
| 571 | .ident = MAC_MODEL_TV, |
| 572 | .name = "TV", |
| 573 | .adb_type = MAC_ADB_CUDA, |
| 574 | .via_type = MAC_VIA_QUADRA, |
| 575 | .scsi_type = MAC_SCSI_OLD, |
| 576 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 577 | .nubus_type = MAC_NUBUS, |
| 578 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 579 | }, { |
| 580 | .ident = MAC_MODEL_P600, |
| 581 | .name = "Performa 600", |
| 582 | .adb_type = MAC_ADB_IISI, |
| 583 | .via_type = MAC_VIA_IIci, |
| 584 | .scsi_type = MAC_SCSI_OLD, |
| 585 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 586 | .nubus_type = MAC_NUBUS, |
| 587 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 588 | }, |
| 589 | |
| 590 | /* |
| 591 | * Centris - just guessing again; maybe like Quadra |
| 592 | */ |
| 593 | |
| 594 | /* The C610 may or may not have SONIC. We probe to make sure */ |
| 595 | { |
| 596 | .ident = MAC_MODEL_C610, |
| 597 | .name = "Centris 610", |
| 598 | .adb_type = MAC_ADB_II, |
| 599 | .via_type = MAC_VIA_QUADRA, |
| 600 | .scsi_type = MAC_SCSI_QUADRA, |
| 601 | .scc_type = MAC_SCC_QUADRA, |
| 602 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 603 | .nubus_type = MAC_NUBUS, |
| 604 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 605 | }, { |
| 606 | .ident = MAC_MODEL_C650, |
| 607 | .name = "Centris 650", |
| 608 | .adb_type = MAC_ADB_II, |
| 609 | .via_type = MAC_VIA_QUADRA, |
| 610 | .scsi_type = MAC_SCSI_QUADRA, |
| 611 | .scc_type = MAC_SCC_QUADRA, |
| 612 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 613 | .nubus_type = MAC_NUBUS, |
| 614 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 615 | }, { |
| 616 | .ident = MAC_MODEL_C660, |
| 617 | .name = "Centris 660AV", |
| 618 | .adb_type = MAC_ADB_CUDA, |
| 619 | .via_type = MAC_VIA_QUADRA, |
| 620 | .scsi_type = MAC_SCSI_QUADRA3, |
| 621 | .scc_type = MAC_SCC_PSC, |
| 622 | .ether_type = MAC_ETHER_MACE, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 623 | .nubus_type = MAC_NUBUS, |
| 624 | .floppy_type = MAC_FLOPPY_AV |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 625 | }, |
| 626 | |
| 627 | /* |
| 628 | * The PowerBooks all the same "Combo" custom IC for SCSI and SCC |
| 629 | * and a PMU (in two variations?) for ADB. Most of them use the |
| 630 | * Quadra-style VIAs. A few models also have IDE from hell. |
| 631 | */ |
| 632 | |
| 633 | { |
| 634 | .ident = MAC_MODEL_PB140, |
| 635 | .name = "PowerBook 140", |
| 636 | .adb_type = MAC_ADB_PB1, |
| 637 | .via_type = MAC_VIA_QUADRA, |
| 638 | .scsi_type = MAC_SCSI_OLD, |
| 639 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 640 | .nubus_type = MAC_NUBUS, |
| 641 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 642 | }, { |
| 643 | .ident = MAC_MODEL_PB145, |
| 644 | .name = "PowerBook 145", |
| 645 | .adb_type = MAC_ADB_PB1, |
| 646 | .via_type = MAC_VIA_QUADRA, |
| 647 | .scsi_type = MAC_SCSI_OLD, |
| 648 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 649 | .nubus_type = MAC_NUBUS, |
| 650 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 651 | }, { |
| 652 | .ident = MAC_MODEL_PB150, |
| 653 | .name = "PowerBook 150", |
| 654 | .adb_type = MAC_ADB_PB1, |
| 655 | .via_type = MAC_VIA_IIci, |
| 656 | .scsi_type = MAC_SCSI_OLD, |
| 657 | .ide_type = MAC_IDE_PB, |
| 658 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 659 | .nubus_type = MAC_NUBUS, |
| 660 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 661 | }, { |
| 662 | .ident = MAC_MODEL_PB160, |
| 663 | .name = "PowerBook 160", |
| 664 | .adb_type = MAC_ADB_PB1, |
| 665 | .via_type = MAC_VIA_QUADRA, |
| 666 | .scsi_type = MAC_SCSI_OLD, |
| 667 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 668 | .nubus_type = MAC_NUBUS, |
| 669 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 670 | }, { |
| 671 | .ident = MAC_MODEL_PB165, |
| 672 | .name = "PowerBook 165", |
| 673 | .adb_type = MAC_ADB_PB1, |
| 674 | .via_type = MAC_VIA_QUADRA, |
| 675 | .scsi_type = MAC_SCSI_OLD, |
| 676 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 677 | .nubus_type = MAC_NUBUS, |
| 678 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 679 | }, { |
| 680 | .ident = MAC_MODEL_PB165C, |
| 681 | .name = "PowerBook 165c", |
| 682 | .adb_type = MAC_ADB_PB1, |
| 683 | .via_type = MAC_VIA_QUADRA, |
| 684 | .scsi_type = MAC_SCSI_OLD, |
| 685 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 686 | .nubus_type = MAC_NUBUS, |
| 687 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 688 | }, { |
| 689 | .ident = MAC_MODEL_PB170, |
| 690 | .name = "PowerBook 170", |
| 691 | .adb_type = MAC_ADB_PB1, |
| 692 | .via_type = MAC_VIA_QUADRA, |
| 693 | .scsi_type = MAC_SCSI_OLD, |
| 694 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 695 | .nubus_type = MAC_NUBUS, |
| 696 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 697 | }, { |
| 698 | .ident = MAC_MODEL_PB180, |
| 699 | .name = "PowerBook 180", |
| 700 | .adb_type = MAC_ADB_PB1, |
| 701 | .via_type = MAC_VIA_QUADRA, |
| 702 | .scsi_type = MAC_SCSI_OLD, |
| 703 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 704 | .nubus_type = MAC_NUBUS, |
| 705 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 706 | }, { |
| 707 | .ident = MAC_MODEL_PB180C, |
| 708 | .name = "PowerBook 180c", |
| 709 | .adb_type = MAC_ADB_PB1, |
| 710 | .via_type = MAC_VIA_QUADRA, |
| 711 | .scsi_type = MAC_SCSI_OLD, |
| 712 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 713 | .nubus_type = MAC_NUBUS, |
| 714 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 715 | }, { |
| 716 | .ident = MAC_MODEL_PB190, |
| 717 | .name = "PowerBook 190", |
| 718 | .adb_type = MAC_ADB_PB2, |
| 719 | .via_type = MAC_VIA_QUADRA, |
| 720 | .scsi_type = MAC_SCSI_OLD, |
| 721 | .ide_type = MAC_IDE_BABOON, |
| 722 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 723 | .nubus_type = MAC_NUBUS, |
| 724 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 725 | }, { |
| 726 | .ident = MAC_MODEL_PB520, |
| 727 | .name = "PowerBook 520", |
| 728 | .adb_type = MAC_ADB_PB2, |
| 729 | .via_type = MAC_VIA_QUADRA, |
| 730 | .scsi_type = MAC_SCSI_OLD, |
| 731 | .scc_type = MAC_SCC_QUADRA, |
| 732 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 733 | .nubus_type = MAC_NUBUS, |
| 734 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 735 | }, |
| 736 | |
| 737 | /* |
| 738 | * PowerBook Duos are pretty much like normal PowerBooks |
| 739 | * All of these probably have onboard SONIC in the Dock which |
| 740 | * means we'll have to probe for it eventually. |
| 741 | * |
Simon Arlott | 0c79cf6 | 2007-10-20 01:20:32 +0200 | [diff] [blame] | 742 | * Are these really MAC_VIA_IIci? The developer notes for the |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 743 | * Duos show pretty much the same custom parts as in most of |
| 744 | * the other PowerBooks which would imply MAC_VIA_QUADRA. |
| 745 | */ |
| 746 | |
| 747 | { |
| 748 | .ident = MAC_MODEL_PB210, |
| 749 | .name = "PowerBook Duo 210", |
| 750 | .adb_type = MAC_ADB_PB2, |
| 751 | .via_type = MAC_VIA_IIci, |
| 752 | .scsi_type = MAC_SCSI_OLD, |
| 753 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 754 | .nubus_type = MAC_NUBUS, |
| 755 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 756 | }, { |
| 757 | .ident = MAC_MODEL_PB230, |
| 758 | .name = "PowerBook Duo 230", |
| 759 | .adb_type = MAC_ADB_PB2, |
| 760 | .via_type = MAC_VIA_IIci, |
| 761 | .scsi_type = MAC_SCSI_OLD, |
| 762 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 763 | .nubus_type = MAC_NUBUS, |
| 764 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 765 | }, { |
| 766 | .ident = MAC_MODEL_PB250, |
| 767 | .name = "PowerBook Duo 250", |
| 768 | .adb_type = MAC_ADB_PB2, |
| 769 | .via_type = MAC_VIA_IIci, |
| 770 | .scsi_type = MAC_SCSI_OLD, |
| 771 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 772 | .nubus_type = MAC_NUBUS, |
| 773 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 774 | }, { |
| 775 | .ident = MAC_MODEL_PB270C, |
| 776 | .name = "PowerBook Duo 270c", |
| 777 | .adb_type = MAC_ADB_PB2, |
| 778 | .via_type = MAC_VIA_IIci, |
| 779 | .scsi_type = MAC_SCSI_OLD, |
| 780 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 781 | .nubus_type = MAC_NUBUS, |
| 782 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 783 | }, { |
| 784 | .ident = MAC_MODEL_PB280, |
| 785 | .name = "PowerBook Duo 280", |
| 786 | .adb_type = MAC_ADB_PB2, |
| 787 | .via_type = MAC_VIA_IIci, |
| 788 | .scsi_type = MAC_SCSI_OLD, |
| 789 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 790 | .nubus_type = MAC_NUBUS, |
| 791 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 792 | }, { |
| 793 | .ident = MAC_MODEL_PB280C, |
| 794 | .name = "PowerBook Duo 280c", |
| 795 | .adb_type = MAC_ADB_PB2, |
| 796 | .via_type = MAC_VIA_IIci, |
| 797 | .scsi_type = MAC_SCSI_OLD, |
| 798 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame^] | 799 | .nubus_type = MAC_NUBUS, |
| 800 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 801 | }, |
| 802 | |
| 803 | /* |
| 804 | * Other stuff ?? |
| 805 | */ |
| 806 | { |
| 807 | .ident = -1 |
| 808 | } |
| 809 | }; |
| 810 | |
Adrian Bunk | 8dfbdf4 | 2008-07-17 21:16:25 +0200 | [diff] [blame] | 811 | static void __init mac_identify(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 812 | { |
| 813 | struct mac_model *m; |
| 814 | |
| 815 | /* Penguin data useful? */ |
| 816 | int model = mac_bi_data.id; |
| 817 | if (!model) { |
| 818 | /* no bootinfo model id -> NetBSD booter was used! */ |
| 819 | /* XXX FIXME: breaks for model > 31 */ |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 820 | model = (mac_bi_data.cpuid >> 2) & 63; |
| 821 | printk(KERN_WARNING "No bootinfo model ID, using cpuid instead (hey, use Penguin!)\n"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 822 | } |
| 823 | |
| 824 | macintosh_config = mac_data_table; |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 825 | for (m = macintosh_config; m->ident != -1; m++) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 826 | if (m->ident == model) { |
| 827 | macintosh_config = m; |
| 828 | break; |
| 829 | } |
| 830 | } |
| 831 | |
| 832 | /* We need to pre-init the IOPs, if any. Otherwise */ |
| 833 | /* the serial console won't work if the user had */ |
| 834 | /* the serial ports set to "Faster" mode in MacOS. */ |
| 835 | |
| 836 | iop_preinit(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 837 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 838 | printk(KERN_INFO "Detected Macintosh model: %d \n", model); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 839 | |
| 840 | /* |
| 841 | * Report booter data: |
| 842 | */ |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 843 | printk(KERN_DEBUG " Penguin bootinfo data:\n"); |
| 844 | printk(KERN_DEBUG " Video: addr 0x%lx row 0x%lx depth %lx dimensions %ld x %ld\n", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 845 | mac_bi_data.videoaddr, mac_bi_data.videorow, |
| 846 | mac_bi_data.videodepth, mac_bi_data.dimensions & 0xFFFF, |
| 847 | mac_bi_data.dimensions >> 16); |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 848 | printk(KERN_DEBUG " Videological 0x%lx phys. 0x%lx, SCC at 0x%lx \n", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 849 | mac_bi_data.videological, mac_orig_videoaddr, |
| 850 | mac_bi_data.sccbase); |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 851 | printk(KERN_DEBUG " Boottime: 0x%lx GMTBias: 0x%lx \n", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 852 | mac_bi_data.boottime, mac_bi_data.gmtbias); |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 853 | printk(KERN_DEBUG " Machine ID: %ld CPUid: 0x%lx memory size: 0x%lx \n", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 854 | mac_bi_data.id, mac_bi_data.cpuid, mac_bi_data.memsize); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 855 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 856 | iop_init(); |
| 857 | via_init(); |
| 858 | oss_init(); |
| 859 | psc_init(); |
| 860 | baboon_init(); |
| 861 | } |
| 862 | |
Adrian Bunk | 8dfbdf4 | 2008-07-17 21:16:25 +0200 | [diff] [blame] | 863 | static void __init mac_report_hardware(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 864 | { |
| 865 | printk(KERN_INFO "Apple Macintosh %s\n", macintosh_config->name); |
| 866 | } |
| 867 | |
| 868 | static void mac_get_model(char *str) |
| 869 | { |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 870 | strcpy(str, "Macintosh "); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 871 | strcat(str, macintosh_config->name); |
| 872 | } |