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