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> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | |
| 27 | #define BOOTINFO_COMPAT_1_0 |
| 28 | #include <asm/setup.h> |
| 29 | #include <asm/bootinfo.h> |
| 30 | |
| 31 | #include <asm/system.h> |
| 32 | #include <asm/io.h> |
| 33 | #include <asm/irq.h> |
| 34 | #include <asm/pgtable.h> |
| 35 | #include <asm/rtc.h> |
| 36 | #include <asm/machdep.h> |
| 37 | |
| 38 | #include <asm/macintosh.h> |
| 39 | #include <asm/macints.h> |
| 40 | #include <asm/machw.h> |
| 41 | |
| 42 | #include <asm/mac_iop.h> |
| 43 | #include <asm/mac_via.h> |
| 44 | #include <asm/mac_oss.h> |
| 45 | #include <asm/mac_psc.h> |
| 46 | |
Laurent Vivier | 8852ecd | 2008-11-15 16:10:10 +0100 | [diff] [blame] | 47 | /* platform device info */ |
| 48 | |
| 49 | #define SWIM_IO_SIZE 0x2000 /* SWIM IO resource size */ |
| 50 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | /* Mac bootinfo struct */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 52 | struct mac_booter_data mac_bi_data; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 54 | /* The phys. video addr. - might be bogus on some machines */ |
Adrian Bunk | 8dfbdf4 | 2008-07-17 21:16:25 +0200 | [diff] [blame] | 55 | static unsigned long mac_orig_videoaddr; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 56 | |
| 57 | /* Mac specific timer functions */ |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 58 | extern unsigned long mac_gettimeoffset(void); |
| 59 | extern int mac_hwclk(int, struct rtc_time *); |
| 60 | extern int mac_set_clock_mmss(unsigned long); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 61 | extern void iop_preinit(void); |
| 62 | extern void iop_init(void); |
| 63 | extern void via_init(void); |
David Howells | 40220c1 | 2006-10-09 12:19:47 +0100 | [diff] [blame] | 64 | extern void via_init_clock(irq_handler_t func); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 65 | extern void via_flush_cache(void); |
| 66 | extern void oss_init(void); |
| 67 | extern void psc_init(void); |
| 68 | extern void baboon_init(void); |
| 69 | |
| 70 | extern void mac_mksound(unsigned int, unsigned int); |
| 71 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 72 | static void mac_get_model(char *str); |
Adrian Bunk | 8dfbdf4 | 2008-07-17 21:16:25 +0200 | [diff] [blame] | 73 | static void mac_identify(void); |
| 74 | static void mac_report_hardware(void); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 75 | |
Al Viro | 66a3f82 | 2007-07-20 04:33:28 +0100 | [diff] [blame] | 76 | static void __init mac_sched_init(irq_handler_t vector) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 77 | { |
| 78 | via_init_clock(vector); |
| 79 | } |
| 80 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 81 | /* |
| 82 | * Parse a Macintosh-specific record in the bootinfo |
| 83 | */ |
| 84 | |
| 85 | int __init mac_parse_bootinfo(const struct bi_record *record) |
| 86 | { |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 87 | int unknown = 0; |
| 88 | const u_long *data = record->data; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 89 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 90 | switch (record->tag) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 91 | case BI_MAC_MODEL: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 92 | mac_bi_data.id = *data; |
| 93 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 94 | case BI_MAC_VADDR: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 95 | mac_bi_data.videoaddr = *data; |
| 96 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 97 | case BI_MAC_VDEPTH: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 98 | mac_bi_data.videodepth = *data; |
| 99 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 100 | case BI_MAC_VROW: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 101 | mac_bi_data.videorow = *data; |
| 102 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 103 | case BI_MAC_VDIM: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 104 | mac_bi_data.dimensions = *data; |
| 105 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 106 | case BI_MAC_VLOGICAL: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 107 | mac_bi_data.videological = VIDEOMEMBASE + (*data & ~VIDEOMEMMASK); |
| 108 | mac_orig_videoaddr = *data; |
| 109 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 110 | case BI_MAC_SCCBASE: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 111 | mac_bi_data.sccbase = *data; |
| 112 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 113 | case BI_MAC_BTIME: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 114 | mac_bi_data.boottime = *data; |
| 115 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 116 | case BI_MAC_GMTBIAS: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 117 | mac_bi_data.gmtbias = *data; |
| 118 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 119 | case BI_MAC_MEMSIZE: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 120 | mac_bi_data.memsize = *data; |
| 121 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 122 | case BI_MAC_CPUID: |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 123 | mac_bi_data.cpuid = *data; |
| 124 | break; |
| 125 | case BI_MAC_ROMBASE: |
| 126 | mac_bi_data.rombase = *data; |
| 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) |
| 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; |
| 158 | mach_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; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 165 | #if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) |
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. |
| 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, |
| 272 | .via_type = MAC_VIA_IIci, |
| 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, |
| 281 | .via_type = MAC_VIA_IIci, |
| 282 | .scsi_type = MAC_SCSI_OLD, |
| 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", |
| 289 | .adb_type = MAC_ADB_IISI, |
| 290 | .via_type = MAC_VIA_IIci, |
| 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", |
| 298 | .adb_type = MAC_ADB_IISI, |
| 299 | .via_type = MAC_VIA_IIci, |
| 300 | .scsi_type = MAC_SCSI_OLD, |
| 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", |
| 307 | .adb_type = MAC_ADB_IISI, |
| 308 | .via_type = MAC_VIA_IIci, |
| 309 | .scsi_type = MAC_SCSI_OLD, |
| 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", |
| 322 | .adb_type = MAC_ADB_IISI, |
| 323 | .via_type = MAC_VIA_IIci, |
| 324 | .scsi_type = MAC_SCSI_OLD, |
| 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, |
| 332 | .via_type = MAC_VIA_IIci, |
| 333 | .scsi_type = MAC_SCSI_OLD, |
| 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, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 337 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 338 | |
| 339 | /* |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 340 | * 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] | 341 | */ |
| 342 | |
| 343 | { |
| 344 | .ident = MAC_MODEL_LC, |
| 345 | .name = "LC", |
| 346 | .adb_type = MAC_ADB_IISI, |
| 347 | .via_type = MAC_VIA_IIci, |
| 348 | .scsi_type = MAC_SCSI_OLD, |
| 349 | .scc_type = MAC_SCC_II, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 350 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 351 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 352 | }, { |
| 353 | .ident = MAC_MODEL_LCII, |
| 354 | .name = "LC II", |
| 355 | .adb_type = MAC_ADB_IISI, |
| 356 | .via_type = MAC_VIA_IIci, |
| 357 | .scsi_type = MAC_SCSI_OLD, |
| 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_LCIII, |
| 363 | .name = "LC III", |
| 364 | .adb_type = MAC_ADB_IISI, |
| 365 | .via_type = MAC_VIA_IIci, |
| 366 | .scsi_type = MAC_SCSI_OLD, |
| 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 | |
| 372 | /* |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 373 | * Quadra. Video is at 0xF9000000, via is like a MacII. We label it |
| 374 | * differently as some of the stuff connected to VIA2 seems different. |
| 375 | * Better SCSI chip and onboard ethernet using a NatSemi SONIC except |
| 376 | * the 660AV and 840AV which use an AMD 79C940 (MACE). |
| 377 | * The 700, 900 and 950 have some I/O chips in the wrong place to |
| 378 | * confuse us. The 840AV has a SCSI location of its own (same as |
| 379 | * the 660AV). |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 380 | */ |
| 381 | |
| 382 | { |
| 383 | .ident = MAC_MODEL_Q605, |
| 384 | .name = "Quadra 605", |
| 385 | .adb_type = MAC_ADB_CUDA, |
| 386 | .via_type = MAC_VIA_QUADRA, |
| 387 | .scsi_type = MAC_SCSI_QUADRA, |
| 388 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 389 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 390 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 391 | }, { |
| 392 | .ident = MAC_MODEL_Q605_ACC, |
| 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_Q610, |
| 402 | .name = "Quadra 610", |
| 403 | .adb_type = MAC_ADB_II, |
| 404 | .via_type = MAC_VIA_QUADRA, |
| 405 | .scsi_type = MAC_SCSI_QUADRA, |
| 406 | .scc_type = MAC_SCC_QUADRA, |
| 407 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 408 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 409 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 410 | }, { |
| 411 | .ident = MAC_MODEL_Q630, |
| 412 | .name = "Quadra 630", |
| 413 | .adb_type = MAC_ADB_CUDA, |
| 414 | .via_type = MAC_VIA_QUADRA, |
| 415 | .scsi_type = MAC_SCSI_QUADRA, |
| 416 | .ide_type = MAC_IDE_QUADRA, |
| 417 | .scc_type = MAC_SCC_QUADRA, |
| 418 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 419 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 420 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 421 | }, { |
| 422 | .ident = MAC_MODEL_Q650, |
| 423 | .name = "Quadra 650", |
| 424 | .adb_type = MAC_ADB_II, |
| 425 | .via_type = MAC_VIA_QUADRA, |
| 426 | .scsi_type = MAC_SCSI_QUADRA, |
| 427 | .scc_type = MAC_SCC_QUADRA, |
| 428 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 429 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 430 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 431 | }, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 432 | /* The Q700 does have a NS Sonic */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 433 | { |
| 434 | .ident = MAC_MODEL_Q700, |
| 435 | .name = "Quadra 700", |
| 436 | .adb_type = MAC_ADB_II, |
| 437 | .via_type = MAC_VIA_QUADRA, |
| 438 | .scsi_type = MAC_SCSI_QUADRA2, |
| 439 | .scc_type = MAC_SCC_QUADRA, |
| 440 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 441 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 442 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 443 | }, { |
| 444 | .ident = MAC_MODEL_Q800, |
| 445 | .name = "Quadra 800", |
| 446 | .adb_type = MAC_ADB_II, |
| 447 | .via_type = MAC_VIA_QUADRA, |
| 448 | .scsi_type = MAC_SCSI_QUADRA, |
| 449 | .scc_type = MAC_SCC_QUADRA, |
| 450 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 451 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 452 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 453 | }, { |
| 454 | .ident = MAC_MODEL_Q840, |
| 455 | .name = "Quadra 840AV", |
| 456 | .adb_type = MAC_ADB_CUDA, |
| 457 | .via_type = MAC_VIA_QUADRA, |
| 458 | .scsi_type = MAC_SCSI_QUADRA3, |
| 459 | .scc_type = MAC_SCC_PSC, |
| 460 | .ether_type = MAC_ETHER_MACE, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 461 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 462 | .floppy_type = MAC_FLOPPY_AV, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 463 | }, { |
| 464 | .ident = MAC_MODEL_Q900, |
| 465 | .name = "Quadra 900", |
| 466 | .adb_type = MAC_ADB_IOP, |
| 467 | .via_type = MAC_VIA_QUADRA, |
| 468 | .scsi_type = MAC_SCSI_QUADRA2, |
| 469 | .scc_type = MAC_SCC_IOP, |
| 470 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 471 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 472 | .floppy_type = MAC_FLOPPY_SWIM_IOP, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 473 | }, { |
| 474 | .ident = MAC_MODEL_Q950, |
| 475 | .name = "Quadra 950", |
| 476 | .adb_type = MAC_ADB_IOP, |
| 477 | .via_type = MAC_VIA_QUADRA, |
| 478 | .scsi_type = MAC_SCSI_QUADRA2, |
| 479 | .scc_type = MAC_SCC_IOP, |
| 480 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 481 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 482 | .floppy_type = MAC_FLOPPY_SWIM_IOP, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 483 | }, |
| 484 | |
| 485 | /* |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 486 | * Performa - more LC type machines |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 487 | */ |
| 488 | |
| 489 | { |
| 490 | .ident = MAC_MODEL_P460, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 491 | .name = "Performa 460", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 492 | .adb_type = MAC_ADB_IISI, |
| 493 | .via_type = MAC_VIA_IIci, |
| 494 | .scsi_type = MAC_SCSI_OLD, |
| 495 | .scc_type = MAC_SCC_II, |
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_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 498 | }, { |
| 499 | .ident = MAC_MODEL_P475, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 500 | .name = "Performa 475", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 501 | .adb_type = MAC_ADB_CUDA, |
| 502 | .via_type = MAC_VIA_QUADRA, |
| 503 | .scsi_type = MAC_SCSI_QUADRA, |
| 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_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 507 | }, { |
| 508 | .ident = MAC_MODEL_P475F, |
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_P520, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 518 | .name = "Performa 520", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 519 | .adb_type = MAC_ADB_CUDA, |
| 520 | .via_type = MAC_VIA_IIci, |
| 521 | .scsi_type = MAC_SCSI_OLD, |
| 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_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 525 | }, { |
| 526 | .ident = MAC_MODEL_P550, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 527 | .name = "Performa 550", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 528 | .adb_type = MAC_ADB_CUDA, |
| 529 | .via_type = MAC_VIA_IIci, |
| 530 | .scsi_type = MAC_SCSI_OLD, |
| 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 | }, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 535 | /* These have the comm slot, and therefore possibly SONIC ethernet */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 536 | { |
| 537 | .ident = MAC_MODEL_P575, |
| 538 | .name = "Performa 575", |
| 539 | .adb_type = MAC_ADB_CUDA, |
| 540 | .via_type = MAC_VIA_QUADRA, |
| 541 | .scsi_type = MAC_SCSI_QUADRA, |
| 542 | .scc_type = MAC_SCC_II, |
| 543 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 544 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 545 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 546 | }, { |
| 547 | .ident = MAC_MODEL_P588, |
| 548 | .name = "Performa 588", |
| 549 | .adb_type = MAC_ADB_CUDA, |
| 550 | .via_type = MAC_VIA_QUADRA, |
| 551 | .scsi_type = MAC_SCSI_QUADRA, |
| 552 | .ide_type = MAC_IDE_QUADRA, |
| 553 | .scc_type = MAC_SCC_II, |
| 554 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 555 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 556 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 557 | }, { |
| 558 | .ident = MAC_MODEL_TV, |
| 559 | .name = "TV", |
| 560 | .adb_type = MAC_ADB_CUDA, |
| 561 | .via_type = MAC_VIA_QUADRA, |
| 562 | .scsi_type = MAC_SCSI_OLD, |
| 563 | .scc_type = MAC_SCC_II, |
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_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 566 | }, { |
| 567 | .ident = MAC_MODEL_P600, |
| 568 | .name = "Performa 600", |
| 569 | .adb_type = MAC_ADB_IISI, |
| 570 | .via_type = MAC_VIA_IIci, |
| 571 | .scsi_type = MAC_SCSI_OLD, |
| 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 | |
| 577 | /* |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 578 | * Centris - just guessing again; maybe like Quadra. |
| 579 | * 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] | 580 | */ |
| 581 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 582 | { |
| 583 | .ident = MAC_MODEL_C610, |
| 584 | .name = "Centris 610", |
| 585 | .adb_type = MAC_ADB_II, |
| 586 | .via_type = MAC_VIA_QUADRA, |
| 587 | .scsi_type = MAC_SCSI_QUADRA, |
| 588 | .scc_type = MAC_SCC_QUADRA, |
| 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_C650, |
| 594 | .name = "Centris 650", |
| 595 | .adb_type = MAC_ADB_II, |
| 596 | .via_type = MAC_VIA_QUADRA, |
| 597 | .scsi_type = MAC_SCSI_QUADRA, |
| 598 | .scc_type = MAC_SCC_QUADRA, |
| 599 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 600 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 601 | .floppy_type = MAC_FLOPPY_SWIM_ADDR1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 602 | }, { |
| 603 | .ident = MAC_MODEL_C660, |
| 604 | .name = "Centris 660AV", |
| 605 | .adb_type = MAC_ADB_CUDA, |
| 606 | .via_type = MAC_VIA_QUADRA, |
| 607 | .scsi_type = MAC_SCSI_QUADRA3, |
| 608 | .scc_type = MAC_SCC_PSC, |
| 609 | .ether_type = MAC_ETHER_MACE, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 610 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 611 | .floppy_type = MAC_FLOPPY_AV, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 612 | }, |
| 613 | |
| 614 | /* |
| 615 | * The PowerBooks all the same "Combo" custom IC for SCSI and SCC |
| 616 | * and a PMU (in two variations?) for ADB. Most of them use the |
| 617 | * Quadra-style VIAs. A few models also have IDE from hell. |
| 618 | */ |
| 619 | |
| 620 | { |
| 621 | .ident = MAC_MODEL_PB140, |
| 622 | .name = "PowerBook 140", |
| 623 | .adb_type = MAC_ADB_PB1, |
| 624 | .via_type = MAC_VIA_QUADRA, |
| 625 | .scsi_type = MAC_SCSI_OLD, |
| 626 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 627 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 628 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 629 | }, { |
| 630 | .ident = MAC_MODEL_PB145, |
| 631 | .name = "PowerBook 145", |
| 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_PB150, |
| 640 | .name = "PowerBook 150", |
| 641 | .adb_type = MAC_ADB_PB1, |
| 642 | .via_type = MAC_VIA_IIci, |
| 643 | .scsi_type = MAC_SCSI_OLD, |
| 644 | .ide_type = MAC_IDE_PB, |
| 645 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 646 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 647 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 648 | }, { |
| 649 | .ident = MAC_MODEL_PB160, |
| 650 | .name = "PowerBook 160", |
| 651 | .adb_type = MAC_ADB_PB1, |
| 652 | .via_type = MAC_VIA_QUADRA, |
| 653 | .scsi_type = MAC_SCSI_OLD, |
| 654 | .scc_type = MAC_SCC_QUADRA, |
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_PB165, |
| 659 | .name = "PowerBook 165", |
| 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_PB165C, |
| 668 | .name = "PowerBook 165c", |
| 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_PB170, |
| 677 | .name = "PowerBook 170", |
| 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_PB180, |
| 686 | .name = "PowerBook 180", |
| 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_PB180C, |
| 695 | .name = "PowerBook 180c", |
| 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_PB190, |
| 704 | .name = "PowerBook 190", |
| 705 | .adb_type = MAC_ADB_PB2, |
| 706 | .via_type = MAC_VIA_QUADRA, |
| 707 | .scsi_type = MAC_SCSI_OLD, |
| 708 | .ide_type = MAC_IDE_BABOON, |
| 709 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 710 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 711 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 712 | }, { |
| 713 | .ident = MAC_MODEL_PB520, |
| 714 | .name = "PowerBook 520", |
| 715 | .adb_type = MAC_ADB_PB2, |
| 716 | .via_type = MAC_VIA_QUADRA, |
| 717 | .scsi_type = MAC_SCSI_OLD, |
| 718 | .scc_type = MAC_SCC_QUADRA, |
| 719 | .ether_type = MAC_ETHER_SONIC, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 720 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 721 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 722 | }, |
| 723 | |
| 724 | /* |
| 725 | * PowerBook Duos are pretty much like normal PowerBooks |
| 726 | * All of these probably have onboard SONIC in the Dock which |
| 727 | * means we'll have to probe for it eventually. |
| 728 | * |
Simon Arlott | 0c79cf6 | 2007-10-20 01:20:32 +0200 | [diff] [blame] | 729 | * Are these really MAC_VIA_IIci? The developer notes for the |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 730 | * Duos show pretty much the same custom parts as in most of |
| 731 | * the other PowerBooks which would imply MAC_VIA_QUADRA. |
| 732 | */ |
| 733 | |
| 734 | { |
| 735 | .ident = MAC_MODEL_PB210, |
| 736 | .name = "PowerBook Duo 210", |
| 737 | .adb_type = MAC_ADB_PB2, |
| 738 | .via_type = MAC_VIA_IIci, |
| 739 | .scsi_type = MAC_SCSI_OLD, |
| 740 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 741 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 742 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 743 | }, { |
| 744 | .ident = MAC_MODEL_PB230, |
| 745 | .name = "PowerBook Duo 230", |
| 746 | .adb_type = MAC_ADB_PB2, |
| 747 | .via_type = MAC_VIA_IIci, |
| 748 | .scsi_type = MAC_SCSI_OLD, |
| 749 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 750 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 751 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 752 | }, { |
| 753 | .ident = MAC_MODEL_PB250, |
| 754 | .name = "PowerBook Duo 250", |
| 755 | .adb_type = MAC_ADB_PB2, |
| 756 | .via_type = MAC_VIA_IIci, |
| 757 | .scsi_type = MAC_SCSI_OLD, |
| 758 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 759 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 760 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 761 | }, { |
| 762 | .ident = MAC_MODEL_PB270C, |
| 763 | .name = "PowerBook Duo 270c", |
| 764 | .adb_type = MAC_ADB_PB2, |
| 765 | .via_type = MAC_VIA_IIci, |
| 766 | .scsi_type = MAC_SCSI_OLD, |
| 767 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 768 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 769 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 770 | }, { |
| 771 | .ident = MAC_MODEL_PB280, |
| 772 | .name = "PowerBook Duo 280", |
| 773 | .adb_type = MAC_ADB_PB2, |
| 774 | .via_type = MAC_VIA_IIci, |
| 775 | .scsi_type = MAC_SCSI_OLD, |
| 776 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 777 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 778 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 779 | }, { |
| 780 | .ident = MAC_MODEL_PB280C, |
| 781 | .name = "PowerBook Duo 280c", |
| 782 | .adb_type = MAC_ADB_PB2, |
| 783 | .via_type = MAC_VIA_IIci, |
| 784 | .scsi_type = MAC_SCSI_OLD, |
| 785 | .scc_type = MAC_SCC_QUADRA, |
Laurent Vivier | 7ad93b4 | 2008-11-06 20:57:41 +0100 | [diff] [blame] | 786 | .nubus_type = MAC_NUBUS, |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 787 | .floppy_type = MAC_FLOPPY_SWIM_ADDR2, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 788 | }, |
| 789 | |
| 790 | /* |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 791 | * Other stuff? |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 792 | */ |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 793 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 794 | { |
| 795 | .ident = -1 |
| 796 | } |
| 797 | }; |
| 798 | |
Adrian Bunk | 8dfbdf4 | 2008-07-17 21:16:25 +0200 | [diff] [blame] | 799 | static void __init mac_identify(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 800 | { |
| 801 | struct mac_model *m; |
| 802 | |
| 803 | /* Penguin data useful? */ |
| 804 | int model = mac_bi_data.id; |
| 805 | if (!model) { |
| 806 | /* no bootinfo model id -> NetBSD booter was used! */ |
| 807 | /* XXX FIXME: breaks for model > 31 */ |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 808 | model = (mac_bi_data.cpuid >> 2) & 63; |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 809 | printk(KERN_WARNING "No bootinfo model ID, using cpuid instead " |
| 810 | "(obsolete bootloader?)\n"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 811 | } |
| 812 | |
| 813 | macintosh_config = mac_data_table; |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 814 | for (m = macintosh_config; m->ident != -1; m++) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 815 | if (m->ident == model) { |
| 816 | macintosh_config = m; |
| 817 | break; |
| 818 | } |
| 819 | } |
| 820 | |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 821 | /* |
| 822 | * We need to pre-init the IOPs, if any. Otherwise |
| 823 | * the serial console won't work if the user had |
| 824 | * the serial ports set to "Faster" mode in MacOS. |
| 825 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 826 | iop_preinit(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 827 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 828 | printk(KERN_INFO "Detected Macintosh model: %d \n", model); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 829 | |
| 830 | /* |
| 831 | * Report booter data: |
| 832 | */ |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 833 | printk(KERN_DEBUG " Penguin bootinfo data:\n"); |
Finn Thain | 53aac0a | 2009-11-04 00:39:09 +1100 | [diff] [blame^] | 834 | printk(KERN_DEBUG " Video: addr 0x%lx " |
| 835 | "row 0x%lx depth %lx dimensions %ld x %ld\n", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 836 | mac_bi_data.videoaddr, mac_bi_data.videorow, |
| 837 | mac_bi_data.videodepth, mac_bi_data.dimensions & 0xFFFF, |
| 838 | mac_bi_data.dimensions >> 16); |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 839 | 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] | 840 | mac_bi_data.videological, mac_orig_videoaddr, |
| 841 | mac_bi_data.sccbase); |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 842 | printk(KERN_DEBUG " Boottime: 0x%lx GMTBias: 0x%lx \n", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 843 | mac_bi_data.boottime, mac_bi_data.gmtbias); |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 844 | 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] | 845 | mac_bi_data.id, mac_bi_data.cpuid, mac_bi_data.memsize); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 846 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 847 | iop_init(); |
| 848 | via_init(); |
| 849 | oss_init(); |
| 850 | psc_init(); |
| 851 | baboon_init(); |
| 852 | } |
| 853 | |
Adrian Bunk | 8dfbdf4 | 2008-07-17 21:16:25 +0200 | [diff] [blame] | 854 | static void __init mac_report_hardware(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 855 | { |
| 856 | printk(KERN_INFO "Apple Macintosh %s\n", macintosh_config->name); |
| 857 | } |
| 858 | |
| 859 | static void mac_get_model(char *str) |
| 860 | { |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 861 | strcpy(str, "Macintosh "); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 862 | strcat(str, macintosh_config->name); |
| 863 | } |
Laurent Vivier | 8852ecd | 2008-11-15 16:10:10 +0100 | [diff] [blame] | 864 | |
| 865 | static struct resource swim_resources[1]; |
| 866 | |
| 867 | static struct platform_device swim_device = { |
| 868 | .name = "swim", |
| 869 | .id = -1, |
| 870 | .num_resources = ARRAY_SIZE(swim_resources), |
| 871 | .resource = swim_resources, |
| 872 | }; |
| 873 | |
| 874 | static struct platform_device *mac_platform_devices[] __initdata = { |
| 875 | &swim_device |
| 876 | }; |
| 877 | |
| 878 | int __init mac_platform_init(void) |
| 879 | { |
| 880 | u8 *swim_base; |
| 881 | |
| 882 | switch (macintosh_config->floppy_type) { |
| 883 | case MAC_FLOPPY_SWIM_ADDR1: |
| 884 | swim_base = (u8 *)(VIA1_BASE + 0x1E000); |
| 885 | break; |
| 886 | case MAC_FLOPPY_SWIM_ADDR2: |
| 887 | swim_base = (u8 *)(VIA1_BASE + 0x16000); |
| 888 | break; |
| 889 | default: |
| 890 | return 0; |
| 891 | } |
| 892 | |
| 893 | swim_resources[0].name = "swim-regs"; |
| 894 | swim_resources[0].start = (resource_size_t)swim_base; |
| 895 | swim_resources[0].end = (resource_size_t)(swim_base + SWIM_IO_SIZE); |
| 896 | swim_resources[0].flags = IORESOURCE_MEM; |
| 897 | |
| 898 | return platform_add_devices(mac_platform_devices, |
| 899 | ARRAY_SIZE(mac_platform_devices)); |
| 900 | } |
| 901 | |
| 902 | arch_initcall(mac_platform_init); |