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> |
Laurent Vivier | 8852ecd | 2008-11-15 16:10:10 +0100 | [diff] [blame] | 25 | #include <linux/platform_device.h> |
Finn Thain | 18814ee | 2009-11-17 20:03:05 +1100 | [diff] [blame] | 26 | #include <linux/adb.h> |
| 27 | #include <linux/cuda.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 28 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | #include <asm/setup.h> |
| 30 | #include <asm/bootinfo.h> |
Geert Uytterhoeven | 4c3c522 | 2013-10-02 11:37:33 +0200 | [diff] [blame^] | 31 | #include <asm/bootinfo-mac.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | #include <asm/io.h> |
| 34 | #include <asm/irq.h> |
| 35 | #include <asm/pgtable.h> |
| 36 | #include <asm/rtc.h> |
| 37 | #include <asm/machdep.h> |
| 38 | |
| 39 | #include <asm/macintosh.h> |
| 40 | #include <asm/macints.h> |
| 41 | #include <asm/machw.h> |
| 42 | |
| 43 | #include <asm/mac_iop.h> |
| 44 | #include <asm/mac_via.h> |
| 45 | #include <asm/mac_oss.h> |
| 46 | #include <asm/mac_psc.h> |
| 47 | |
| 48 | /* Mac bootinfo struct */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | struct mac_booter_data mac_bi_data; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | /* The phys. video addr. - might be bogus on some machines */ |
Adrian Bunk | 8dfbdf4 | 2008-07-17 21:16:25 +0200 | [diff] [blame] | 52 | static unsigned long mac_orig_videoaddr; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | |
| 54 | /* Mac specific timer functions */ |
Stephen Warren | c8d5ba1 | 2012-11-08 11:34:55 -0700 | [diff] [blame] | 55 | extern u32 mac_gettimeoffset(void); |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 56 | extern int mac_hwclk(int, struct rtc_time *); |
| 57 | extern int mac_set_clock_mmss(unsigned long); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 58 | extern void iop_preinit(void); |
| 59 | extern void iop_init(void); |
| 60 | extern void via_init(void); |
David Howells | 40220c1 | 2006-10-09 12:19:47 +0100 | [diff] [blame] | 61 | extern void via_init_clock(irq_handler_t func); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 62 | extern void via_flush_cache(void); |
| 63 | extern void oss_init(void); |
| 64 | extern void psc_init(void); |
| 65 | extern void baboon_init(void); |
| 66 | |
| 67 | extern void mac_mksound(unsigned int, unsigned int); |
| 68 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 69 | static void mac_get_model(char *str); |
Adrian Bunk | 8dfbdf4 | 2008-07-17 21:16:25 +0200 | [diff] [blame] | 70 | static void mac_identify(void); |
| 71 | static void mac_report_hardware(void); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 72 | |
Finn Thain | 93edd02 | 2011-10-24 01:11:12 +1100 | [diff] [blame] | 73 | #ifdef CONFIG_EARLY_PRINTK |
| 74 | asmlinkage void __init mac_early_print(const char *s, unsigned n); |
| 75 | |
| 76 | static void __init mac_early_cons_write(struct console *con, |
| 77 | const char *s, unsigned n) |
| 78 | { |
| 79 | mac_early_print(s, n); |
| 80 | } |
| 81 | |
| 82 | static struct console __initdata mac_early_cons = { |
| 83 | .name = "early", |
| 84 | .write = mac_early_cons_write, |
| 85 | .flags = CON_PRINTBUFFER | CON_BOOT, |
| 86 | .index = -1 |
| 87 | }; |
| 88 | |
| 89 | int __init mac_unregister_early_cons(void) |
| 90 | { |
| 91 | /* mac_early_print can't be used after init sections are discarded */ |
| 92 | return unregister_console(&mac_early_cons); |
| 93 | } |
| 94 | |
| 95 | late_initcall(mac_unregister_early_cons); |
| 96 | #endif |
| 97 | |
Al Viro | 66a3f82 | 2007-07-20 04:33:28 +0100 | [diff] [blame] | 98 | static void __init mac_sched_init(irq_handler_t vector) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 99 | { |
| 100 | via_init_clock(vector); |
| 101 | } |
| 102 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 103 | /* |
| 104 | * Parse a Macintosh-specific record in the bootinfo |
| 105 | */ |
| 106 | |
| 107 | int __init mac_parse_bootinfo(const struct bi_record *record) |
| 108 | { |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 109 | int unknown = 0; |
| 110 | const u_long *data = record->data; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 111 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 112 | switch (record->tag) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 113 | case BI_MAC_MODEL: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 114 | mac_bi_data.id = *data; |
| 115 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 116 | case BI_MAC_VADDR: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 117 | mac_bi_data.videoaddr = *data; |
| 118 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 119 | case BI_MAC_VDEPTH: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 120 | mac_bi_data.videodepth = *data; |
| 121 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 122 | case BI_MAC_VROW: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 123 | mac_bi_data.videorow = *data; |
| 124 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 125 | case BI_MAC_VDIM: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 126 | mac_bi_data.dimensions = *data; |
| 127 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 128 | case BI_MAC_VLOGICAL: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 129 | mac_bi_data.videological = VIDEOMEMBASE + (*data & ~VIDEOMEMMASK); |
| 130 | mac_orig_videoaddr = *data; |
| 131 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 132 | case BI_MAC_SCCBASE: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 133 | mac_bi_data.sccbase = *data; |
| 134 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 135 | case BI_MAC_BTIME: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 136 | mac_bi_data.boottime = *data; |
| 137 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 138 | case BI_MAC_GMTBIAS: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 139 | mac_bi_data.gmtbias = *data; |
| 140 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 141 | case BI_MAC_MEMSIZE: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 142 | mac_bi_data.memsize = *data; |
| 143 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 144 | case BI_MAC_CPUID: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 145 | mac_bi_data.cpuid = *data; |
| 146 | break; |
| 147 | case BI_MAC_ROMBASE: |
| 148 | mac_bi_data.rombase = *data; |
| 149 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 150 | default: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 151 | unknown = 1; |
| 152 | break; |
| 153 | } |
| 154 | return unknown; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 155 | } |
| 156 | |
| 157 | /* |
| 158 | * Flip into 24bit mode for an instant - flushes the L2 cache card. We |
| 159 | * have to disable interrupts for this. Our IRQ handlers will crap |
| 160 | * themselves if they take an IRQ in 24bit mode! |
| 161 | */ |
| 162 | |
| 163 | static void mac_cache_card_flush(int writeback) |
| 164 | { |
| 165 | unsigned long flags; |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 166 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 167 | local_irq_save(flags); |
| 168 | via_flush_cache(); |
| 169 | local_irq_restore(flags); |
| 170 | } |
| 171 | |
| 172 | void __init config_mac(void) |
| 173 | { |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 174 | if (!MACH_IS_MAC) |
Frans Pop | b9b0d8b | 2010-02-06 18:47:11 +0100 | [diff] [blame] | 175 | printk(KERN_ERR "ERROR: no Mac, but config_mac() called!!\n"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 176 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 177 | mach_sched_init = mac_sched_init; |
| 178 | mach_init_IRQ = mac_init_IRQ; |
| 179 | mach_get_model = mac_get_model; |
Stephen Warren | c8d5ba1 | 2012-11-08 11:34:55 -0700 | [diff] [blame] | 180 | arch_gettimeoffset = mac_gettimeoffset; |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 181 | mach_hwclk = mac_hwclk; |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 182 | mach_set_clock_mmss = mac_set_clock_mmss; |
| 183 | mach_reset = mac_reset; |
| 184 | mach_halt = mac_poweroff; |
| 185 | mach_power_off = mac_poweroff; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 186 | mach_max_dma_address = 0xffffffff; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 187 | #if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 188 | mach_beep = mac_mksound; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 189 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 190 | |
Finn Thain | 93edd02 | 2011-10-24 01:11:12 +1100 | [diff] [blame] | 191 | #ifdef CONFIG_EARLY_PRINTK |
| 192 | register_console(&mac_early_cons); |
| 193 | #endif |
| 194 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 195 | /* |
| 196 | * Determine hardware present |
| 197 | */ |
| 198 | |
| 199 | mac_identify(); |
| 200 | mac_report_hardware(); |
| 201 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 202 | /* |
| 203 | * AFAIK only the IIci takes a cache card. The IIfx has onboard |
| 204 | * cache ... someone needs to figure out how to tell if it's on or |
| 205 | * not. |
| 206 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 207 | |
| 208 | if (macintosh_config->ident == MAC_MODEL_IICI |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 209 | || macintosh_config->ident == MAC_MODEL_IIFX) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 210 | mach_l2_flush = mac_cache_card_flush; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 211 | } |
| 212 | |
| 213 | |
| 214 | /* |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 215 | * Macintosh Table: hardcoded model configuration data. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 216 | * |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 217 | * Much of this was defined by Alan, based on who knows what docs. |
| 218 | * I've added a lot more, and some of that was pure guesswork based |
| 219 | * on hardware pages present on the Mac web site. Possibly wildly |
| 220 | * inaccurate, so look here if a new Mac model won't run. Example: if |
| 221 | * a Mac crashes immediately after the VIA1 registers have been dumped |
| 222 | * to the screen, it probably died attempting to read DirB on a RBV. |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 223 | * Meaning it should have MAC_VIA_IICI here :-) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 224 | */ |
| 225 | |
| 226 | struct mac_model *macintosh_config; |
| 227 | EXPORT_SYMBOL(macintosh_config); |
| 228 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 229 | static struct mac_model mac_data_table[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 230 | /* |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 231 | * We'll pretend to be a Macintosh II, that's pretty safe. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 232 | */ |
| 233 | |
| 234 | { |
| 235 | .ident = MAC_MODEL_II, |
| 236 | .name = "Unknown", |
| 237 | .adb_type = MAC_ADB_II, |
| 238 | .via_type = MAC_VIA_II, |
| 239 | .scsi_type = MAC_SCSI_OLD, |
| 240 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 241 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 242 | .floppy_type = MAC_FLOPPY_IWM, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 243 | }, |
| 244 | |
| 245 | /* |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 246 | * Original Mac II hardware |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 247 | */ |
| 248 | |
| 249 | { |
| 250 | .ident = MAC_MODEL_II, |
| 251 | .name = "II", |
| 252 | .adb_type = MAC_ADB_II, |
| 253 | .via_type = MAC_VIA_II, |
| 254 | .scsi_type = MAC_SCSI_OLD, |
| 255 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 256 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 257 | .floppy_type = MAC_FLOPPY_IWM, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 258 | }, { |
| 259 | .ident = MAC_MODEL_IIX, |
| 260 | .name = "IIx", |
| 261 | .adb_type = MAC_ADB_II, |
| 262 | .via_type = MAC_VIA_II, |
| 263 | .scsi_type = MAC_SCSI_OLD, |
| 264 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 265 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 266 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 267 | }, { |
| 268 | .ident = MAC_MODEL_IICX, |
| 269 | .name = "IIcx", |
| 270 | .adb_type = MAC_ADB_II, |
| 271 | .via_type = MAC_VIA_II, |
| 272 | .scsi_type = MAC_SCSI_OLD, |
| 273 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 274 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 275 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 276 | }, { |
| 277 | .ident = MAC_MODEL_SE30, |
| 278 | .name = "SE/30", |
| 279 | .adb_type = MAC_ADB_II, |
| 280 | .via_type = MAC_VIA_II, |
| 281 | .scsi_type = MAC_SCSI_OLD, |
| 282 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 283 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 284 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 285 | }, |
| 286 | |
| 287 | /* |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 288 | * Weirdified Mac II hardware - all subtly different. Gee thanks |
| 289 | * Apple. All these boxes seem to have VIA2 in a different place to |
| 290 | * the Mac II (+1A000 rather than +4000) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 291 | * CSA: see http://developer.apple.com/technotes/hw/hw_09.html |
| 292 | */ |
| 293 | |
| 294 | { |
| 295 | .ident = MAC_MODEL_IICI, |
| 296 | .name = "IIci", |
| 297 | .adb_type = MAC_ADB_II, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 298 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 299 | .scsi_type = MAC_SCSI_OLD, |
| 300 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 301 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 302 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 303 | }, { |
| 304 | .ident = MAC_MODEL_IIFX, |
| 305 | .name = "IIfx", |
| 306 | .adb_type = MAC_ADB_IOP, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 307 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 308 | .scsi_type = MAC_SCSI_OLD, |
| 309 | .scc_type = MAC_SCC_IOP, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 310 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 311 | .floppy_type = MAC_FLOPPY_SWIM_IOP, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 312 | }, { |
| 313 | .ident = MAC_MODEL_IISI, |
| 314 | .name = "IIsi", |
| 315 | .adb_type = MAC_ADB_IISI, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 316 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 317 | .scsi_type = MAC_SCSI_OLD, |
| 318 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 319 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 320 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 321 | }, { |
| 322 | .ident = MAC_MODEL_IIVI, |
| 323 | .name = "IIvi", |
| 324 | .adb_type = MAC_ADB_IISI, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 325 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 326 | .scsi_type = MAC_SCSI_OLD, |
| 327 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 328 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 329 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 330 | }, { |
| 331 | .ident = MAC_MODEL_IIVX, |
| 332 | .name = "IIvx", |
| 333 | .adb_type = MAC_ADB_IISI, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 334 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 335 | .scsi_type = MAC_SCSI_OLD, |
| 336 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 337 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 338 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 339 | }, |
| 340 | |
| 341 | /* |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 342 | * Classic models (guessing: similar to SE/30? Nope, similar to LC...) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 343 | */ |
| 344 | |
| 345 | { |
| 346 | .ident = MAC_MODEL_CLII, |
| 347 | .name = "Classic II", |
| 348 | .adb_type = MAC_ADB_IISI, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 349 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 350 | .scsi_type = MAC_SCSI_OLD, |
| 351 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 352 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 353 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 354 | }, { |
| 355 | .ident = MAC_MODEL_CCL, |
| 356 | .name = "Color Classic", |
| 357 | .adb_type = MAC_ADB_CUDA, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 358 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 359 | .scsi_type = MAC_SCSI_OLD, |
| 360 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 361 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 362 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Finn Thain | 1b46010 | 2010-05-29 03:27:18 +1000 | [diff] [blame] | 363 | }, { |
| 364 | .ident = MAC_MODEL_CCLII, |
| 365 | .name = "Color Classic II", |
| 366 | .adb_type = MAC_ADB_CUDA, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 367 | .via_type = MAC_VIA_IICI, |
Finn Thain | 1b46010 | 2010-05-29 03:27:18 +1000 | [diff] [blame] | 368 | .scsi_type = MAC_SCSI_OLD, |
| 369 | .scc_type = MAC_SCC_II, |
| 370 | .nubus_type = MAC_NUBUS, |
| 371 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 372 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 373 | |
| 374 | /* |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 375 | * Some Mac LC machines. Basically the same as the IIci, ADB like IIsi |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 376 | */ |
| 377 | |
| 378 | { |
| 379 | .ident = MAC_MODEL_LC, |
| 380 | .name = "LC", |
| 381 | .adb_type = MAC_ADB_IISI, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 382 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 383 | .scsi_type = MAC_SCSI_OLD, |
| 384 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 385 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 386 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 387 | }, { |
| 388 | .ident = MAC_MODEL_LCII, |
| 389 | .name = "LC II", |
| 390 | .adb_type = MAC_ADB_IISI, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 391 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 392 | .scsi_type = MAC_SCSI_OLD, |
| 393 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 394 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 395 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 396 | }, { |
| 397 | .ident = MAC_MODEL_LCIII, |
| 398 | .name = "LC III", |
| 399 | .adb_type = MAC_ADB_IISI, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 400 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 401 | .scsi_type = MAC_SCSI_OLD, |
| 402 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 403 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 404 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 405 | }, |
| 406 | |
| 407 | /* |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 408 | * Quadra. Video is at 0xF9000000, via is like a MacII. We label it |
| 409 | * differently as some of the stuff connected to VIA2 seems different. |
| 410 | * Better SCSI chip and onboard ethernet using a NatSemi SONIC except |
| 411 | * the 660AV and 840AV which use an AMD 79C940 (MACE). |
| 412 | * The 700, 900 and 950 have some I/O chips in the wrong place to |
| 413 | * confuse us. The 840AV has a SCSI location of its own (same as |
| 414 | * the 660AV). |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 415 | */ |
| 416 | |
| 417 | { |
| 418 | .ident = MAC_MODEL_Q605, |
| 419 | .name = "Quadra 605", |
| 420 | .adb_type = MAC_ADB_CUDA, |
| 421 | .via_type = MAC_VIA_QUADRA, |
| 422 | .scsi_type = MAC_SCSI_QUADRA, |
| 423 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 424 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 425 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 426 | }, { |
| 427 | .ident = MAC_MODEL_Q605_ACC, |
| 428 | .name = "Quadra 605", |
| 429 | .adb_type = MAC_ADB_CUDA, |
| 430 | .via_type = MAC_VIA_QUADRA, |
| 431 | .scsi_type = MAC_SCSI_QUADRA, |
| 432 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 433 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 434 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 435 | }, { |
| 436 | .ident = MAC_MODEL_Q610, |
| 437 | .name = "Quadra 610", |
| 438 | .adb_type = MAC_ADB_II, |
| 439 | .via_type = MAC_VIA_QUADRA, |
| 440 | .scsi_type = MAC_SCSI_QUADRA, |
| 441 | .scc_type = MAC_SCC_QUADRA, |
| 442 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 443 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 444 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 445 | }, { |
| 446 | .ident = MAC_MODEL_Q630, |
| 447 | .name = "Quadra 630", |
| 448 | .adb_type = MAC_ADB_CUDA, |
| 449 | .via_type = MAC_VIA_QUADRA, |
| 450 | .scsi_type = MAC_SCSI_QUADRA, |
| 451 | .ide_type = MAC_IDE_QUADRA, |
| 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, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 455 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 456 | }, { |
| 457 | .ident = MAC_MODEL_Q650, |
| 458 | .name = "Quadra 650", |
| 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, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 465 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 466 | }, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 467 | /* The Q700 does have a NS Sonic */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 468 | { |
| 469 | .ident = MAC_MODEL_Q700, |
| 470 | .name = "Quadra 700", |
| 471 | .adb_type = MAC_ADB_II, |
| 472 | .via_type = MAC_VIA_QUADRA, |
| 473 | .scsi_type = MAC_SCSI_QUADRA2, |
| 474 | .scc_type = MAC_SCC_QUADRA, |
| 475 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 476 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 477 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 478 | }, { |
| 479 | .ident = MAC_MODEL_Q800, |
| 480 | .name = "Quadra 800", |
| 481 | .adb_type = MAC_ADB_II, |
| 482 | .via_type = MAC_VIA_QUADRA, |
| 483 | .scsi_type = MAC_SCSI_QUADRA, |
| 484 | .scc_type = MAC_SCC_QUADRA, |
| 485 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 486 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 487 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 488 | }, { |
| 489 | .ident = MAC_MODEL_Q840, |
| 490 | .name = "Quadra 840AV", |
| 491 | .adb_type = MAC_ADB_CUDA, |
| 492 | .via_type = MAC_VIA_QUADRA, |
| 493 | .scsi_type = MAC_SCSI_QUADRA3, |
| 494 | .scc_type = MAC_SCC_PSC, |
| 495 | .ether_type = MAC_ETHER_MACE, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 496 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 497 | .floppy_type = MAC_FLOPPY_AV, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 498 | }, { |
| 499 | .ident = MAC_MODEL_Q900, |
| 500 | .name = "Quadra 900", |
| 501 | .adb_type = MAC_ADB_IOP, |
| 502 | .via_type = MAC_VIA_QUADRA, |
| 503 | .scsi_type = MAC_SCSI_QUADRA2, |
| 504 | .scc_type = MAC_SCC_IOP, |
| 505 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 506 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 507 | .floppy_type = MAC_FLOPPY_SWIM_IOP, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 508 | }, { |
| 509 | .ident = MAC_MODEL_Q950, |
| 510 | .name = "Quadra 950", |
| 511 | .adb_type = MAC_ADB_IOP, |
| 512 | .via_type = MAC_VIA_QUADRA, |
| 513 | .scsi_type = MAC_SCSI_QUADRA2, |
| 514 | .scc_type = MAC_SCC_IOP, |
| 515 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 516 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 517 | .floppy_type = MAC_FLOPPY_SWIM_IOP, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 518 | }, |
| 519 | |
| 520 | /* |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 521 | * Performa - more LC type machines |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 522 | */ |
| 523 | |
| 524 | { |
| 525 | .ident = MAC_MODEL_P460, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 526 | .name = "Performa 460", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 527 | .adb_type = MAC_ADB_IISI, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 528 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 529 | .scsi_type = MAC_SCSI_OLD, |
| 530 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 531 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 532 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 533 | }, { |
| 534 | .ident = MAC_MODEL_P475, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 535 | .name = "Performa 475", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 536 | .adb_type = MAC_ADB_CUDA, |
| 537 | .via_type = MAC_VIA_QUADRA, |
| 538 | .scsi_type = MAC_SCSI_QUADRA, |
| 539 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 540 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 541 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 542 | }, { |
| 543 | .ident = MAC_MODEL_P475F, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 544 | .name = "Performa 475", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 545 | .adb_type = MAC_ADB_CUDA, |
| 546 | .via_type = MAC_VIA_QUADRA, |
| 547 | .scsi_type = MAC_SCSI_QUADRA, |
| 548 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 549 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 550 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 551 | }, { |
| 552 | .ident = MAC_MODEL_P520, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 553 | .name = "Performa 520", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 554 | .adb_type = MAC_ADB_CUDA, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 555 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 556 | .scsi_type = MAC_SCSI_OLD, |
| 557 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 558 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 559 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 560 | }, { |
| 561 | .ident = MAC_MODEL_P550, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 562 | .name = "Performa 550", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 563 | .adb_type = MAC_ADB_CUDA, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 564 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 565 | .scsi_type = MAC_SCSI_OLD, |
| 566 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 567 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 568 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 569 | }, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 570 | /* These have the comm slot, and therefore possibly SONIC ethernet */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 571 | { |
| 572 | .ident = MAC_MODEL_P575, |
| 573 | .name = "Performa 575", |
| 574 | .adb_type = MAC_ADB_CUDA, |
| 575 | .via_type = MAC_VIA_QUADRA, |
| 576 | .scsi_type = MAC_SCSI_QUADRA, |
| 577 | .scc_type = MAC_SCC_II, |
| 578 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 579 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 580 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 581 | }, { |
| 582 | .ident = MAC_MODEL_P588, |
| 583 | .name = "Performa 588", |
| 584 | .adb_type = MAC_ADB_CUDA, |
| 585 | .via_type = MAC_VIA_QUADRA, |
| 586 | .scsi_type = MAC_SCSI_QUADRA, |
| 587 | .ide_type = MAC_IDE_QUADRA, |
| 588 | .scc_type = MAC_SCC_II, |
| 589 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 590 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 591 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 592 | }, { |
| 593 | .ident = MAC_MODEL_TV, |
| 594 | .name = "TV", |
| 595 | .adb_type = MAC_ADB_CUDA, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 596 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 597 | .scsi_type = MAC_SCSI_OLD, |
| 598 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 599 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 600 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 601 | }, { |
| 602 | .ident = MAC_MODEL_P600, |
| 603 | .name = "Performa 600", |
| 604 | .adb_type = MAC_ADB_IISI, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 605 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 606 | .scsi_type = MAC_SCSI_OLD, |
| 607 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 608 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 609 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 610 | }, |
| 611 | |
| 612 | /* |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 613 | * Centris - just guessing again; maybe like Quadra. |
| 614 | * The C610 may or may not have SONIC. We probe to make sure. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 615 | */ |
| 616 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 617 | { |
| 618 | .ident = MAC_MODEL_C610, |
| 619 | .name = "Centris 610", |
| 620 | .adb_type = MAC_ADB_II, |
| 621 | .via_type = MAC_VIA_QUADRA, |
| 622 | .scsi_type = MAC_SCSI_QUADRA, |
| 623 | .scc_type = MAC_SCC_QUADRA, |
| 624 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 625 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 626 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 627 | }, { |
| 628 | .ident = MAC_MODEL_C650, |
| 629 | .name = "Centris 650", |
| 630 | .adb_type = MAC_ADB_II, |
| 631 | .via_type = MAC_VIA_QUADRA, |
| 632 | .scsi_type = MAC_SCSI_QUADRA, |
| 633 | .scc_type = MAC_SCC_QUADRA, |
| 634 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 635 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 636 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 637 | }, { |
| 638 | .ident = MAC_MODEL_C660, |
| 639 | .name = "Centris 660AV", |
| 640 | .adb_type = MAC_ADB_CUDA, |
| 641 | .via_type = MAC_VIA_QUADRA, |
| 642 | .scsi_type = MAC_SCSI_QUADRA3, |
| 643 | .scc_type = MAC_SCC_PSC, |
| 644 | .ether_type = MAC_ETHER_MACE, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 645 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 646 | .floppy_type = MAC_FLOPPY_AV, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 647 | }, |
| 648 | |
| 649 | /* |
| 650 | * The PowerBooks all the same "Combo" custom IC for SCSI and SCC |
| 651 | * and a PMU (in two variations?) for ADB. Most of them use the |
| 652 | * Quadra-style VIAs. A few models also have IDE from hell. |
| 653 | */ |
| 654 | |
| 655 | { |
| 656 | .ident = MAC_MODEL_PB140, |
| 657 | .name = "PowerBook 140", |
| 658 | .adb_type = MAC_ADB_PB1, |
| 659 | .via_type = MAC_VIA_QUADRA, |
| 660 | .scsi_type = MAC_SCSI_OLD, |
| 661 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 662 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 663 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 664 | }, { |
| 665 | .ident = MAC_MODEL_PB145, |
| 666 | .name = "PowerBook 145", |
| 667 | .adb_type = MAC_ADB_PB1, |
| 668 | .via_type = MAC_VIA_QUADRA, |
| 669 | .scsi_type = MAC_SCSI_OLD, |
| 670 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 671 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 672 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 673 | }, { |
| 674 | .ident = MAC_MODEL_PB150, |
| 675 | .name = "PowerBook 150", |
Finn Thain | 4107c45 | 2011-10-24 01:11:20 +1100 | [diff] [blame] | 676 | .adb_type = MAC_ADB_PB2, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 677 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 678 | .scsi_type = MAC_SCSI_OLD, |
| 679 | .ide_type = MAC_IDE_PB, |
| 680 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 681 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 682 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 683 | }, { |
| 684 | .ident = MAC_MODEL_PB160, |
| 685 | .name = "PowerBook 160", |
| 686 | .adb_type = MAC_ADB_PB1, |
| 687 | .via_type = MAC_VIA_QUADRA, |
| 688 | .scsi_type = MAC_SCSI_OLD, |
| 689 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 690 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 691 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 692 | }, { |
| 693 | .ident = MAC_MODEL_PB165, |
| 694 | .name = "PowerBook 165", |
| 695 | .adb_type = MAC_ADB_PB1, |
| 696 | .via_type = MAC_VIA_QUADRA, |
| 697 | .scsi_type = MAC_SCSI_OLD, |
| 698 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 699 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 700 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 701 | }, { |
| 702 | .ident = MAC_MODEL_PB165C, |
| 703 | .name = "PowerBook 165c", |
| 704 | .adb_type = MAC_ADB_PB1, |
| 705 | .via_type = MAC_VIA_QUADRA, |
| 706 | .scsi_type = MAC_SCSI_OLD, |
| 707 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 708 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 709 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 710 | }, { |
| 711 | .ident = MAC_MODEL_PB170, |
| 712 | .name = "PowerBook 170", |
| 713 | .adb_type = MAC_ADB_PB1, |
| 714 | .via_type = MAC_VIA_QUADRA, |
| 715 | .scsi_type = MAC_SCSI_OLD, |
| 716 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 717 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 718 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 719 | }, { |
| 720 | .ident = MAC_MODEL_PB180, |
| 721 | .name = "PowerBook 180", |
| 722 | .adb_type = MAC_ADB_PB1, |
| 723 | .via_type = MAC_VIA_QUADRA, |
| 724 | .scsi_type = MAC_SCSI_OLD, |
| 725 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 726 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 727 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 728 | }, { |
| 729 | .ident = MAC_MODEL_PB180C, |
| 730 | .name = "PowerBook 180c", |
| 731 | .adb_type = MAC_ADB_PB1, |
| 732 | .via_type = MAC_VIA_QUADRA, |
| 733 | .scsi_type = MAC_SCSI_OLD, |
| 734 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 735 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 736 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 737 | }, { |
| 738 | .ident = MAC_MODEL_PB190, |
| 739 | .name = "PowerBook 190", |
| 740 | .adb_type = MAC_ADB_PB2, |
| 741 | .via_type = MAC_VIA_QUADRA, |
| 742 | .scsi_type = MAC_SCSI_OLD, |
| 743 | .ide_type = MAC_IDE_BABOON, |
| 744 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 745 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 746 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 747 | }, { |
| 748 | .ident = MAC_MODEL_PB520, |
| 749 | .name = "PowerBook 520", |
| 750 | .adb_type = MAC_ADB_PB2, |
| 751 | .via_type = MAC_VIA_QUADRA, |
| 752 | .scsi_type = MAC_SCSI_OLD, |
| 753 | .scc_type = MAC_SCC_QUADRA, |
| 754 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 755 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 756 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 757 | }, |
| 758 | |
| 759 | /* |
| 760 | * PowerBook Duos are pretty much like normal PowerBooks |
| 761 | * All of these probably have onboard SONIC in the Dock which |
| 762 | * means we'll have to probe for it eventually. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 763 | */ |
| 764 | |
| 765 | { |
| 766 | .ident = MAC_MODEL_PB210, |
| 767 | .name = "PowerBook Duo 210", |
| 768 | .adb_type = MAC_ADB_PB2, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 769 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 773 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 774 | }, { |
| 775 | .ident = MAC_MODEL_PB230, |
| 776 | .name = "PowerBook Duo 230", |
| 777 | .adb_type = MAC_ADB_PB2, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 778 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 782 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 783 | }, { |
| 784 | .ident = MAC_MODEL_PB250, |
| 785 | .name = "PowerBook Duo 250", |
| 786 | .adb_type = MAC_ADB_PB2, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 787 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 791 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 792 | }, { |
| 793 | .ident = MAC_MODEL_PB270C, |
| 794 | .name = "PowerBook Duo 270c", |
| 795 | .adb_type = MAC_ADB_PB2, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 796 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 800 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 801 | }, { |
| 802 | .ident = MAC_MODEL_PB280, |
| 803 | .name = "PowerBook Duo 280", |
| 804 | .adb_type = MAC_ADB_PB2, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 805 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 806 | .scsi_type = MAC_SCSI_OLD, |
| 807 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 808 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 809 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 810 | }, { |
| 811 | .ident = MAC_MODEL_PB280C, |
| 812 | .name = "PowerBook Duo 280c", |
| 813 | .adb_type = MAC_ADB_PB2, |
Finn Thain | 608e287 | 2011-10-24 01:11:22 +1100 | [diff] [blame] | 814 | .via_type = MAC_VIA_IICI, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 815 | .scsi_type = MAC_SCSI_OLD, |
| 816 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 817 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 818 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 819 | }, |
| 820 | |
| 821 | /* |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 822 | * Other stuff? |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 823 | */ |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 824 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 825 | { |
| 826 | .ident = -1 |
| 827 | } |
| 828 | }; |
| 829 | |
Finn Thain | 80614e5 | 2009-11-17 20:06:48 +1100 | [diff] [blame] | 830 | static struct resource scc_a_rsrcs[] = { |
| 831 | { .flags = IORESOURCE_MEM }, |
| 832 | { .flags = IORESOURCE_IRQ }, |
| 833 | }; |
| 834 | |
| 835 | static struct resource scc_b_rsrcs[] = { |
| 836 | { .flags = IORESOURCE_MEM }, |
| 837 | { .flags = IORESOURCE_IRQ }, |
| 838 | }; |
| 839 | |
| 840 | struct platform_device scc_a_pdev = { |
| 841 | .name = "scc", |
| 842 | .id = 0, |
| 843 | .num_resources = ARRAY_SIZE(scc_a_rsrcs), |
| 844 | .resource = scc_a_rsrcs, |
| 845 | }; |
| 846 | EXPORT_SYMBOL(scc_a_pdev); |
| 847 | |
| 848 | struct platform_device scc_b_pdev = { |
| 849 | .name = "scc", |
| 850 | .id = 1, |
| 851 | .num_resources = ARRAY_SIZE(scc_b_rsrcs), |
| 852 | .resource = scc_b_rsrcs, |
| 853 | }; |
| 854 | EXPORT_SYMBOL(scc_b_pdev); |
| 855 | |
Adrian Bunk | 8dfbdf4 | 2008-07-17 21:16:25 +0200 | [diff] [blame] | 856 | static void __init mac_identify(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 857 | { |
| 858 | struct mac_model *m; |
| 859 | |
| 860 | /* Penguin data useful? */ |
| 861 | int model = mac_bi_data.id; |
| 862 | if (!model) { |
| 863 | /* no bootinfo model id -> NetBSD booter was used! */ |
| 864 | /* XXX FIXME: breaks for model > 31 */ |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 865 | model = (mac_bi_data.cpuid >> 2) & 63; |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 866 | printk(KERN_WARNING "No bootinfo model ID, using cpuid instead " |
| 867 | "(obsolete bootloader?)\n"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 868 | } |
| 869 | |
| 870 | macintosh_config = mac_data_table; |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 871 | for (m = macintosh_config; m->ident != -1; m++) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 872 | if (m->ident == model) { |
| 873 | macintosh_config = m; |
| 874 | break; |
| 875 | } |
| 876 | } |
| 877 | |
Finn Thain | 80614e5 | 2009-11-17 20:06:48 +1100 | [diff] [blame] | 878 | /* Set up serial port resources for the console initcall. */ |
| 879 | |
| 880 | scc_a_rsrcs[0].start = (resource_size_t) mac_bi_data.sccbase + 2; |
| 881 | scc_a_rsrcs[0].end = scc_a_rsrcs[0].start; |
| 882 | scc_b_rsrcs[0].start = (resource_size_t) mac_bi_data.sccbase; |
| 883 | scc_b_rsrcs[0].end = scc_b_rsrcs[0].start; |
| 884 | |
| 885 | switch (macintosh_config->scc_type) { |
| 886 | case MAC_SCC_PSC: |
| 887 | scc_a_rsrcs[1].start = scc_a_rsrcs[1].end = IRQ_MAC_SCC_A; |
| 888 | scc_b_rsrcs[1].start = scc_b_rsrcs[1].end = IRQ_MAC_SCC_B; |
| 889 | break; |
| 890 | default: |
Finn Thain | da3fb3c | 2011-10-24 01:11:18 +1100 | [diff] [blame] | 891 | /* On non-PSC machines, the serial ports share an IRQ. */ |
| 892 | if (macintosh_config->ident == MAC_MODEL_IIFX) { |
| 893 | scc_a_rsrcs[1].start = scc_a_rsrcs[1].end = IRQ_MAC_SCC; |
| 894 | scc_b_rsrcs[1].start = scc_b_rsrcs[1].end = IRQ_MAC_SCC; |
| 895 | } else { |
| 896 | scc_a_rsrcs[1].start = scc_a_rsrcs[1].end = IRQ_AUTO_4; |
| 897 | scc_b_rsrcs[1].start = scc_b_rsrcs[1].end = IRQ_AUTO_4; |
| 898 | } |
Finn Thain | 80614e5 | 2009-11-17 20:06:48 +1100 | [diff] [blame] | 899 | break; |
| 900 | } |
| 901 | |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 902 | /* |
| 903 | * We need to pre-init the IOPs, if any. Otherwise |
| 904 | * the serial console won't work if the user had |
| 905 | * the serial ports set to "Faster" mode in MacOS. |
| 906 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 907 | iop_preinit(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 908 | |
Frans Pop | b9b0d8b | 2010-02-06 18:47:11 +0100 | [diff] [blame] | 909 | printk(KERN_INFO "Detected Macintosh model: %d\n", model); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 910 | |
| 911 | /* |
| 912 | * Report booter data: |
| 913 | */ |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 914 | printk(KERN_DEBUG " Penguin bootinfo data:\n"); |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame] | 915 | printk(KERN_DEBUG " Video: addr 0x%lx " |
| 916 | "row 0x%lx depth %lx dimensions %ld x %ld\n", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 917 | mac_bi_data.videoaddr, mac_bi_data.videorow, |
| 918 | mac_bi_data.videodepth, mac_bi_data.dimensions & 0xFFFF, |
| 919 | mac_bi_data.dimensions >> 16); |
Frans Pop | b9b0d8b | 2010-02-06 18:47:11 +0100 | [diff] [blame] | 920 | 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] | 921 | mac_bi_data.videological, mac_orig_videoaddr, |
| 922 | mac_bi_data.sccbase); |
Frans Pop | b9b0d8b | 2010-02-06 18:47:11 +0100 | [diff] [blame] | 923 | printk(KERN_DEBUG " Boottime: 0x%lx GMTBias: 0x%lx\n", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 924 | mac_bi_data.boottime, mac_bi_data.gmtbias); |
Frans Pop | b9b0d8b | 2010-02-06 18:47:11 +0100 | [diff] [blame] | 925 | 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] | 926 | mac_bi_data.id, mac_bi_data.cpuid, mac_bi_data.memsize); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 927 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 928 | iop_init(); |
| 929 | via_init(); |
| 930 | oss_init(); |
| 931 | psc_init(); |
| 932 | baboon_init(); |
Finn Thain | 18814ee | 2009-11-17 20:03:05 +1100 | [diff] [blame] | 933 | |
| 934 | #ifdef CONFIG_ADB_CUDA |
| 935 | find_via_cuda(); |
| 936 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 937 | } |
| 938 | |
Adrian Bunk | 8dfbdf4 | 2008-07-17 21:16:25 +0200 | [diff] [blame] | 939 | static void __init mac_report_hardware(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 940 | { |
| 941 | printk(KERN_INFO "Apple Macintosh %s\n", macintosh_config->name); |
| 942 | } |
| 943 | |
| 944 | static void mac_get_model(char *str) |
| 945 | { |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 946 | strcpy(str, "Macintosh "); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 947 | strcat(str, macintosh_config->name); |
| 948 | } |
Laurent Vivier | 8852ecd | 2008-11-15 16:10:10 +0100 | [diff] [blame] | 949 | |
Finn Thain | 2724daf | 2009-11-04 00:39:56 +1100 | [diff] [blame] | 950 | static struct resource swim_rsrc = { .flags = IORESOURCE_MEM }; |
Laurent Vivier | 8852ecd | 2008-11-15 16:10:10 +0100 | [diff] [blame] | 951 | |
Finn Thain | 2724daf | 2009-11-04 00:39:56 +1100 | [diff] [blame] | 952 | static struct platform_device swim_pdev = { |
Laurent Vivier | 8852ecd | 2008-11-15 16:10:10 +0100 | [diff] [blame] | 953 | .name = "swim", |
| 954 | .id = -1, |
Finn Thain | 2724daf | 2009-11-04 00:39:56 +1100 | [diff] [blame] | 955 | .num_resources = 1, |
| 956 | .resource = &swim_rsrc, |
Laurent Vivier | 8852ecd | 2008-11-15 16:10:10 +0100 | [diff] [blame] | 957 | }; |
| 958 | |
Finn Thain | cff75f1 | 2009-11-04 00:41:35 +1100 | [diff] [blame] | 959 | static struct platform_device esp_0_pdev = { |
| 960 | .name = "mac_esp", |
| 961 | .id = 0, |
| 962 | }; |
| 963 | |
| 964 | static struct platform_device esp_1_pdev = { |
| 965 | .name = "mac_esp", |
| 966 | .id = 1, |
| 967 | }; |
| 968 | |
Finn Thain | eeb9c18 | 2009-11-04 00:42:02 +1100 | [diff] [blame] | 969 | static struct platform_device sonic_pdev = { |
| 970 | .name = "macsonic", |
| 971 | .id = -1, |
| 972 | }; |
| 973 | |
| 974 | static struct platform_device mace_pdev = { |
| 975 | .name = "macmace", |
| 976 | .id = -1, |
| 977 | }; |
| 978 | |
Laurent Vivier | 8852ecd | 2008-11-15 16:10:10 +0100 | [diff] [blame] | 979 | int __init mac_platform_init(void) |
| 980 | { |
| 981 | u8 *swim_base; |
| 982 | |
Geert Uytterhoeven | 6cfeba5 | 2012-03-18 13:21:38 +0100 | [diff] [blame] | 983 | if (!MACH_IS_MAC) |
| 984 | return -ENODEV; |
| 985 | |
Finn Thain | 2724daf | 2009-11-04 00:39:56 +1100 | [diff] [blame] | 986 | /* |
Finn Thain | 80614e5 | 2009-11-17 20:06:48 +1100 | [diff] [blame] | 987 | * Serial devices |
| 988 | */ |
| 989 | |
| 990 | platform_device_register(&scc_a_pdev); |
| 991 | platform_device_register(&scc_b_pdev); |
| 992 | |
| 993 | /* |
Finn Thain | 2724daf | 2009-11-04 00:39:56 +1100 | [diff] [blame] | 994 | * Floppy device |
| 995 | */ |
| 996 | |
Laurent Vivier | 8852ecd | 2008-11-15 16:10:10 +0100 | [diff] [blame] | 997 | switch (macintosh_config->floppy_type) { |
| 998 | case MAC_FLOPPY_SWIM_ADDR1: |
| 999 | swim_base = (u8 *)(VIA1_BASE + 0x1E000); |
| 1000 | break; |
| 1001 | case MAC_FLOPPY_SWIM_ADDR2: |
| 1002 | swim_base = (u8 *)(VIA1_BASE + 0x16000); |
| 1003 | break; |
| 1004 | default: |
Finn Thain | 2724daf | 2009-11-04 00:39:56 +1100 | [diff] [blame] | 1005 | swim_base = NULL; |
| 1006 | break; |
Laurent Vivier | 8852ecd | 2008-11-15 16:10:10 +0100 | [diff] [blame] | 1007 | } |
| 1008 | |
Finn Thain | 2724daf | 2009-11-04 00:39:56 +1100 | [diff] [blame] | 1009 | if (swim_base) { |
| 1010 | swim_rsrc.start = (resource_size_t) swim_base, |
| 1011 | swim_rsrc.end = (resource_size_t) swim_base + 0x2000, |
| 1012 | platform_device_register(&swim_pdev); |
| 1013 | } |
Laurent Vivier | 8852ecd | 2008-11-15 16:10:10 +0100 | [diff] [blame] | 1014 | |
Finn Thain | cff75f1 | 2009-11-04 00:41:35 +1100 | [diff] [blame] | 1015 | /* |
| 1016 | * SCSI device(s) |
| 1017 | */ |
| 1018 | |
| 1019 | switch (macintosh_config->scsi_type) { |
| 1020 | case MAC_SCSI_QUADRA: |
| 1021 | case MAC_SCSI_QUADRA3: |
| 1022 | platform_device_register(&esp_0_pdev); |
| 1023 | break; |
| 1024 | case MAC_SCSI_QUADRA2: |
| 1025 | platform_device_register(&esp_0_pdev); |
| 1026 | if ((macintosh_config->ident == MAC_MODEL_Q900) || |
| 1027 | (macintosh_config->ident == MAC_MODEL_Q950)) |
| 1028 | platform_device_register(&esp_1_pdev); |
| 1029 | break; |
| 1030 | } |
| 1031 | |
Finn Thain | eeb9c18 | 2009-11-04 00:42:02 +1100 | [diff] [blame] | 1032 | /* |
| 1033 | * Ethernet device |
| 1034 | */ |
| 1035 | |
| 1036 | switch (macintosh_config->ether_type) { |
| 1037 | case MAC_ETHER_SONIC: |
| 1038 | platform_device_register(&sonic_pdev); |
| 1039 | break; |
| 1040 | case MAC_ETHER_MACE: |
| 1041 | platform_device_register(&mace_pdev); |
| 1042 | break; |
| 1043 | } |
| 1044 | |
Finn Thain | 2724daf | 2009-11-04 00:39:56 +1100 | [diff] [blame] | 1045 | return 0; |
Laurent Vivier | 8852ecd | 2008-11-15 16:10:10 +0100 | [diff] [blame] | 1046 | } |
| 1047 | |
| 1048 | arch_initcall(mac_platform_init); |