config.c 28 KB

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