setup.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691
  1. /*
  2. * Powermac setup and early boot code plus other random bits.
  3. *
  4. * PowerPC version
  5. * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
  6. *
  7. * Adapted for Power Macintosh by Paul Mackerras
  8. * Copyright (C) 1996 Paul Mackerras (paulus@samba.org)
  9. *
  10. * Derived from "arch/alpha/kernel/setup.c"
  11. * Copyright (C) 1995 Linus Torvalds
  12. *
  13. * Maintained by Benjamin Herrenschmidt (benh@kernel.crashing.org)
  14. *
  15. * This program is free software; you can redistribute it and/or
  16. * modify it under the terms of the GNU General Public License
  17. * as published by the Free Software Foundation; either version
  18. * 2 of the License, or (at your option) any later version.
  19. *
  20. */
  21. /*
  22. * bootup setup stuff..
  23. */
  24. #include <linux/init.h>
  25. #include <linux/errno.h>
  26. #include <linux/sched.h>
  27. #include <linux/kernel.h>
  28. #include <linux/mm.h>
  29. #include <linux/stddef.h>
  30. #include <linux/unistd.h>
  31. #include <linux/ptrace.h>
  32. #include <linux/slab.h>
  33. #include <linux/user.h>
  34. #include <linux/a.out.h>
  35. #include <linux/tty.h>
  36. #include <linux/string.h>
  37. #include <linux/delay.h>
  38. #include <linux/ioport.h>
  39. #include <linux/major.h>
  40. #include <linux/initrd.h>
  41. #include <linux/vt_kern.h>
  42. #include <linux/console.h>
  43. #include <linux/pci.h>
  44. #include <linux/adb.h>
  45. #include <linux/cuda.h>
  46. #include <linux/pmu.h>
  47. #include <linux/irq.h>
  48. #include <linux/seq_file.h>
  49. #include <linux/root_dev.h>
  50. #include <linux/bitops.h>
  51. #include <linux/suspend.h>
  52. #include <linux/of_device.h>
  53. #include <linux/of_platform.h>
  54. #include <linux/lmb.h>
  55. #include <asm/reg.h>
  56. #include <asm/sections.h>
  57. #include <asm/prom.h>
  58. #include <asm/system.h>
  59. #include <asm/pgtable.h>
  60. #include <asm/io.h>
  61. #include <asm/kexec.h>
  62. #include <asm/pci-bridge.h>
  63. #include <asm/ohare.h>
  64. #include <asm/mediabay.h>
  65. #include <asm/machdep.h>
  66. #include <asm/dma.h>
  67. #include <asm/cputable.h>
  68. #include <asm/btext.h>
  69. #include <asm/pmac_feature.h>
  70. #include <asm/time.h>
  71. #include <asm/mmu_context.h>
  72. #include <asm/iommu.h>
  73. #include <asm/smu.h>
  74. #include <asm/pmc.h>
  75. #include <asm/udbg.h>
  76. #include "pmac.h"
  77. #undef SHOW_GATWICK_IRQS
  78. int ppc_override_l2cr = 0;
  79. int ppc_override_l2cr_value;
  80. int has_l2cache = 0;
  81. int pmac_newworld;
  82. static int current_root_goodness = -1;
  83. extern struct machdep_calls pmac_md;
  84. #define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */
  85. #ifdef CONFIG_PPC64
  86. int sccdbg;
  87. #endif
  88. extern void zs_kgdb_hook(int tty_num);
  89. sys_ctrler_t sys_ctrler = SYS_CTRLER_UNKNOWN;
  90. EXPORT_SYMBOL(sys_ctrler);
  91. #ifdef CONFIG_PMAC_SMU
  92. unsigned long smu_cmdbuf_abs;
  93. EXPORT_SYMBOL(smu_cmdbuf_abs);
  94. #endif
  95. #ifdef CONFIG_SMP
  96. extern struct smp_ops_t psurge_smp_ops;
  97. extern struct smp_ops_t core99_smp_ops;
  98. #endif /* CONFIG_SMP */
  99. static void pmac_show_cpuinfo(struct seq_file *m)
  100. {
  101. struct device_node *np;
  102. const char *pp;
  103. int plen;
  104. int mbmodel;
  105. unsigned int mbflags;
  106. char* mbname;
  107. mbmodel = pmac_call_feature(PMAC_FTR_GET_MB_INFO, NULL,
  108. PMAC_MB_INFO_MODEL, 0);
  109. mbflags = pmac_call_feature(PMAC_FTR_GET_MB_INFO, NULL,
  110. PMAC_MB_INFO_FLAGS, 0);
  111. if (pmac_call_feature(PMAC_FTR_GET_MB_INFO, NULL, PMAC_MB_INFO_NAME,
  112. (long) &mbname) != 0)
  113. mbname = "Unknown";
  114. /* find motherboard type */
  115. seq_printf(m, "machine\t\t: ");
  116. np = of_find_node_by_path("/");
  117. if (np != NULL) {
  118. pp = of_get_property(np, "model", NULL);
  119. if (pp != NULL)
  120. seq_printf(m, "%s\n", pp);
  121. else
  122. seq_printf(m, "PowerMac\n");
  123. pp = of_get_property(np, "compatible", &plen);
  124. if (pp != NULL) {
  125. seq_printf(m, "motherboard\t:");
  126. while (plen > 0) {
  127. int l = strlen(pp) + 1;
  128. seq_printf(m, " %s", pp);
  129. plen -= l;
  130. pp += l;
  131. }
  132. seq_printf(m, "\n");
  133. }
  134. of_node_put(np);
  135. } else
  136. seq_printf(m, "PowerMac\n");
  137. /* print parsed model */
  138. seq_printf(m, "detected as\t: %d (%s)\n", mbmodel, mbname);
  139. seq_printf(m, "pmac flags\t: %08x\n", mbflags);
  140. /* find l2 cache info */
  141. np = of_find_node_by_name(NULL, "l2-cache");
  142. if (np == NULL)
  143. np = of_find_node_by_type(NULL, "cache");
  144. if (np != NULL) {
  145. const unsigned int *ic =
  146. of_get_property(np, "i-cache-size", NULL);
  147. const unsigned int *dc =
  148. of_get_property(np, "d-cache-size", NULL);
  149. seq_printf(m, "L2 cache\t:");
  150. has_l2cache = 1;
  151. if (of_get_property(np, "cache-unified", NULL) != 0 && dc) {
  152. seq_printf(m, " %dK unified", *dc / 1024);
  153. } else {
  154. if (ic)
  155. seq_printf(m, " %dK instruction", *ic / 1024);
  156. if (dc)
  157. seq_printf(m, "%s %dK data",
  158. (ic? " +": ""), *dc / 1024);
  159. }
  160. pp = of_get_property(np, "ram-type", NULL);
  161. if (pp)
  162. seq_printf(m, " %s", pp);
  163. seq_printf(m, "\n");
  164. of_node_put(np);
  165. }
  166. /* Indicate newworld/oldworld */
  167. seq_printf(m, "pmac-generation\t: %s\n",
  168. pmac_newworld ? "NewWorld" : "OldWorld");
  169. }
  170. #ifndef CONFIG_ADB_CUDA
  171. int find_via_cuda(void)
  172. {
  173. struct device_node *dn = of_find_node_by_name(NULL, "via-cuda");
  174. if (!dn)
  175. return 0;
  176. of_node_put(dn);
  177. printk("WARNING ! Your machine is CUDA-based but your kernel\n");
  178. printk(" wasn't compiled with CONFIG_ADB_CUDA option !\n");
  179. return 0;
  180. }
  181. #endif
  182. #ifndef CONFIG_ADB_PMU
  183. int find_via_pmu(void)
  184. {
  185. struct device_node *dn = of_find_node_by_name(NULL, "via-pmu");
  186. if (!dn)
  187. return 0;
  188. of_node_put(dn);
  189. printk("WARNING ! Your machine is PMU-based but your kernel\n");
  190. printk(" wasn't compiled with CONFIG_ADB_PMU option !\n");
  191. return 0;
  192. }
  193. #endif
  194. #ifndef CONFIG_PMAC_SMU
  195. int smu_init(void)
  196. {
  197. /* should check and warn if SMU is present */
  198. return 0;
  199. }
  200. #endif
  201. #ifdef CONFIG_PPC32
  202. static volatile u32 *sysctrl_regs;
  203. static void __init ohare_init(void)
  204. {
  205. struct device_node *dn;
  206. /* this area has the CPU identification register
  207. and some registers used by smp boards */
  208. sysctrl_regs = (volatile u32 *) ioremap(0xf8000000, 0x1000);
  209. /*
  210. * Turn on the L2 cache.
  211. * We assume that we have a PSX memory controller iff
  212. * we have an ohare I/O controller.
  213. */
  214. dn = of_find_node_by_name(NULL, "ohare");
  215. if (dn) {
  216. of_node_put(dn);
  217. if (((sysctrl_regs[2] >> 24) & 0xf) >= 3) {
  218. if (sysctrl_regs[4] & 0x10)
  219. sysctrl_regs[4] |= 0x04000020;
  220. else
  221. sysctrl_regs[4] |= 0x04000000;
  222. if(has_l2cache)
  223. printk(KERN_INFO "Level 2 cache enabled\n");
  224. }
  225. }
  226. }
  227. static void __init l2cr_init(void)
  228. {
  229. /* Checks "l2cr-value" property in the registry */
  230. if (cpu_has_feature(CPU_FTR_L2CR)) {
  231. struct device_node *np = of_find_node_by_name(NULL, "cpus");
  232. if (np == 0)
  233. np = of_find_node_by_type(NULL, "cpu");
  234. if (np != 0) {
  235. const unsigned int *l2cr =
  236. of_get_property(np, "l2cr-value", NULL);
  237. if (l2cr != 0) {
  238. ppc_override_l2cr = 1;
  239. ppc_override_l2cr_value = *l2cr;
  240. _set_L2CR(0);
  241. _set_L2CR(ppc_override_l2cr_value);
  242. }
  243. of_node_put(np);
  244. }
  245. }
  246. if (ppc_override_l2cr)
  247. printk(KERN_INFO "L2CR overridden (0x%x), "
  248. "backside cache is %s\n",
  249. ppc_override_l2cr_value,
  250. (ppc_override_l2cr_value & 0x80000000)
  251. ? "enabled" : "disabled");
  252. }
  253. #endif
  254. static void __init pmac_setup_arch(void)
  255. {
  256. struct device_node *cpu, *ic;
  257. const int *fp;
  258. unsigned long pvr;
  259. pvr = PVR_VER(mfspr(SPRN_PVR));
  260. /* Set loops_per_jiffy to a half-way reasonable value,
  261. for use until calibrate_delay gets called. */
  262. loops_per_jiffy = 50000000 / HZ;
  263. cpu = of_find_node_by_type(NULL, "cpu");
  264. if (cpu != NULL) {
  265. fp = of_get_property(cpu, "clock-frequency", NULL);
  266. if (fp != NULL) {
  267. if (pvr >= 0x30 && pvr < 0x80)
  268. /* PPC970 etc. */
  269. loops_per_jiffy = *fp / (3 * HZ);
  270. else if (pvr == 4 || pvr >= 8)
  271. /* 604, G3, G4 etc. */
  272. loops_per_jiffy = *fp / HZ;
  273. else
  274. /* 601, 603, etc. */
  275. loops_per_jiffy = *fp / (2 * HZ);
  276. }
  277. of_node_put(cpu);
  278. }
  279. /* See if newworld or oldworld */
  280. for (ic = NULL; (ic = of_find_all_nodes(ic)) != NULL; )
  281. if (of_get_property(ic, "interrupt-controller", NULL))
  282. break;
  283. if (ic) {
  284. pmac_newworld = 1;
  285. of_node_put(ic);
  286. }
  287. /* Lookup PCI hosts */
  288. pmac_pci_init();
  289. #ifdef CONFIG_PPC32
  290. ohare_init();
  291. l2cr_init();
  292. #endif /* CONFIG_PPC32 */
  293. #ifdef CONFIG_KGDB
  294. zs_kgdb_hook(0);
  295. #endif
  296. find_via_cuda();
  297. find_via_pmu();
  298. smu_init();
  299. #if defined(CONFIG_NVRAM) || defined(CONFIG_PPC64)
  300. pmac_nvram_init();
  301. #endif
  302. #ifdef CONFIG_PPC32
  303. #ifdef CONFIG_BLK_DEV_INITRD
  304. if (initrd_start)
  305. ROOT_DEV = Root_RAM0;
  306. else
  307. #endif
  308. ROOT_DEV = DEFAULT_ROOT_DEVICE;
  309. #endif
  310. #ifdef CONFIG_SMP
  311. /* Check for Core99 */
  312. ic = of_find_node_by_name(NULL, "uni-n");
  313. if (!ic)
  314. ic = of_find_node_by_name(NULL, "u3");
  315. if (!ic)
  316. ic = of_find_node_by_name(NULL, "u4");
  317. if (ic) {
  318. of_node_put(ic);
  319. smp_ops = &core99_smp_ops;
  320. }
  321. #ifdef CONFIG_PPC32
  322. else {
  323. /*
  324. * We have to set bits in cpu_possible_map here since the
  325. * secondary CPU(s) aren't in the device tree, and
  326. * setup_per_cpu_areas only allocates per-cpu data for
  327. * CPUs in the cpu_possible_map.
  328. */
  329. int cpu;
  330. for (cpu = 1; cpu < 4 && cpu < NR_CPUS; ++cpu)
  331. cpu_set(cpu, cpu_possible_map);
  332. smp_ops = &psurge_smp_ops;
  333. }
  334. #endif
  335. #endif /* CONFIG_SMP */
  336. #ifdef CONFIG_ADB
  337. if (strstr(cmd_line, "adb_sync")) {
  338. extern int __adb_probe_sync;
  339. __adb_probe_sync = 1;
  340. }
  341. #endif /* CONFIG_ADB */
  342. }
  343. #ifdef CONFIG_SCSI
  344. void note_scsi_host(struct device_node *node, void *host)
  345. {
  346. }
  347. EXPORT_SYMBOL(note_scsi_host);
  348. #endif
  349. static int initializing = 1;
  350. static int pmac_late_init(void)
  351. {
  352. initializing = 0;
  353. /* this is udbg (which is __init) and we can later use it during
  354. * cpu hotplug (in smp_core99_kick_cpu) */
  355. ppc_md.progress = NULL;
  356. return 0;
  357. }
  358. machine_late_initcall(powermac, pmac_late_init);
  359. /*
  360. * This is __init_refok because we check for "initializing" before
  361. * touching any of the __init sensitive things and "initializing"
  362. * will be false after __init time. This can't be __init because it
  363. * can be called whenever a disk is first accessed.
  364. */
  365. void __init_refok note_bootable_part(dev_t dev, int part, int goodness)
  366. {
  367. char *p;
  368. if (!initializing)
  369. return;
  370. if ((goodness <= current_root_goodness) &&
  371. ROOT_DEV != DEFAULT_ROOT_DEVICE)
  372. return;
  373. p = strstr(boot_command_line, "root=");
  374. if (p != NULL && (p == boot_command_line || p[-1] == ' '))
  375. return;
  376. ROOT_DEV = dev + part;
  377. current_root_goodness = goodness;
  378. }
  379. #ifdef CONFIG_ADB_CUDA
  380. static void cuda_restart(void)
  381. {
  382. struct adb_request req;
  383. cuda_request(&req, NULL, 2, CUDA_PACKET, CUDA_RESET_SYSTEM);
  384. for (;;)
  385. cuda_poll();
  386. }
  387. static void cuda_shutdown(void)
  388. {
  389. struct adb_request req;
  390. cuda_request(&req, NULL, 2, CUDA_PACKET, CUDA_POWERDOWN);
  391. for (;;)
  392. cuda_poll();
  393. }
  394. #else
  395. #define cuda_restart()
  396. #define cuda_shutdown()
  397. #endif
  398. #ifndef CONFIG_ADB_PMU
  399. #define pmu_restart()
  400. #define pmu_shutdown()
  401. #endif
  402. #ifndef CONFIG_PMAC_SMU
  403. #define smu_restart()
  404. #define smu_shutdown()
  405. #endif
  406. static void pmac_restart(char *cmd)
  407. {
  408. switch (sys_ctrler) {
  409. case SYS_CTRLER_CUDA:
  410. cuda_restart();
  411. break;
  412. case SYS_CTRLER_PMU:
  413. pmu_restart();
  414. break;
  415. case SYS_CTRLER_SMU:
  416. smu_restart();
  417. break;
  418. default: ;
  419. }
  420. }
  421. static void pmac_power_off(void)
  422. {
  423. switch (sys_ctrler) {
  424. case SYS_CTRLER_CUDA:
  425. cuda_shutdown();
  426. break;
  427. case SYS_CTRLER_PMU:
  428. pmu_shutdown();
  429. break;
  430. case SYS_CTRLER_SMU:
  431. smu_shutdown();
  432. break;
  433. default: ;
  434. }
  435. }
  436. static void
  437. pmac_halt(void)
  438. {
  439. pmac_power_off();
  440. }
  441. /*
  442. * Early initialization.
  443. */
  444. static void __init pmac_init_early(void)
  445. {
  446. /* Enable early btext debug if requested */
  447. if (strstr(cmd_line, "btextdbg")) {
  448. udbg_adb_init_early();
  449. register_early_udbg_console();
  450. }
  451. /* Probe motherboard chipset */
  452. pmac_feature_init();
  453. /* Initialize debug stuff */
  454. udbg_scc_init(!!strstr(cmd_line, "sccdbg"));
  455. udbg_adb_init(!!strstr(cmd_line, "btextdbg"));
  456. #ifdef CONFIG_PPC64
  457. iommu_init_early_dart();
  458. #endif
  459. }
  460. static int __init pmac_declare_of_platform_devices(void)
  461. {
  462. struct device_node *np;
  463. if (machine_is(chrp))
  464. return -1;
  465. np = of_find_node_by_name(NULL, "valkyrie");
  466. if (np)
  467. of_platform_device_create(np, "valkyrie", NULL);
  468. np = of_find_node_by_name(NULL, "platinum");
  469. if (np)
  470. of_platform_device_create(np, "platinum", NULL);
  471. np = of_find_node_by_type(NULL, "smu");
  472. if (np) {
  473. of_platform_device_create(np, "smu", NULL);
  474. of_node_put(np);
  475. }
  476. return 0;
  477. }
  478. machine_device_initcall(powermac, pmac_declare_of_platform_devices);
  479. /*
  480. * Called very early, MMU is off, device-tree isn't unflattened
  481. */
  482. static int __init pmac_probe(void)
  483. {
  484. unsigned long root = of_get_flat_dt_root();
  485. if (!of_flat_dt_is_compatible(root, "Power Macintosh") &&
  486. !of_flat_dt_is_compatible(root, "MacRISC"))
  487. return 0;
  488. #ifdef CONFIG_PPC64
  489. /*
  490. * On U3, the DART (iommu) must be allocated now since it
  491. * has an impact on htab_initialize (due to the large page it
  492. * occupies having to be broken up so the DART itself is not
  493. * part of the cacheable linar mapping
  494. */
  495. alloc_dart_table();
  496. hpte_init_native();
  497. #endif
  498. #ifdef CONFIG_PPC32
  499. /* isa_io_base gets set in pmac_pci_init */
  500. ISA_DMA_THRESHOLD = ~0L;
  501. DMA_MODE_READ = 1;
  502. DMA_MODE_WRITE = 2;
  503. #endif /* CONFIG_PPC32 */
  504. #ifdef CONFIG_PMAC_SMU
  505. /*
  506. * SMU based G5s need some memory below 2Gb, at least the current
  507. * driver needs that. We have to allocate it now. We allocate 4k
  508. * (1 small page) for now.
  509. */
  510. smu_cmdbuf_abs = lmb_alloc_base(4096, 4096, 0x80000000UL);
  511. #endif /* CONFIG_PMAC_SMU */
  512. return 1;
  513. }
  514. #ifdef CONFIG_PPC64
  515. /* Move that to pci.c */
  516. static int pmac_pci_probe_mode(struct pci_bus *bus)
  517. {
  518. struct device_node *node = bus->sysdata;
  519. /* We need to use normal PCI probing for the AGP bus,
  520. * since the device for the AGP bridge isn't in the tree.
  521. * Same for the PCIe host on U4 and the HT host bridge.
  522. */
  523. if (bus->self == NULL && (of_device_is_compatible(node, "u3-agp") ||
  524. of_device_is_compatible(node, "u4-pcie") ||
  525. of_device_is_compatible(node, "u3-ht")))
  526. return PCI_PROBE_NORMAL;
  527. return PCI_PROBE_DEVTREE;
  528. }
  529. #ifdef CONFIG_HOTPLUG_CPU
  530. /* access per cpu vars from generic smp.c */
  531. DECLARE_PER_CPU(int, cpu_state);
  532. static void pmac_cpu_die(void)
  533. {
  534. /*
  535. * turn off as much as possible, we'll be
  536. * kicked out as this will only be invoked
  537. * on core99 platforms for now ...
  538. */
  539. printk(KERN_INFO "CPU#%d offline\n", smp_processor_id());
  540. __get_cpu_var(cpu_state) = CPU_DEAD;
  541. smp_wmb();
  542. /*
  543. * during the path that leads here preemption is disabled,
  544. * reenable it now so that when coming up preempt count is
  545. * zero correctly
  546. */
  547. preempt_enable();
  548. /*
  549. * hard-disable interrupts for the non-NAP case, the NAP code
  550. * needs to re-enable interrupts (but soft-disables them)
  551. */
  552. hard_irq_disable();
  553. while (1) {
  554. /* let's not take timer interrupts too often ... */
  555. set_dec(0x7fffffff);
  556. /* should always be true at this point */
  557. if (cpu_has_feature(CPU_FTR_CAN_NAP))
  558. power4_cpu_offline_powersave();
  559. else {
  560. HMT_low();
  561. HMT_very_low();
  562. }
  563. }
  564. }
  565. #endif /* CONFIG_HOTPLUG_CPU */
  566. #endif /* CONFIG_PPC64 */
  567. define_machine(powermac) {
  568. .name = "PowerMac",
  569. .probe = pmac_probe,
  570. .setup_arch = pmac_setup_arch,
  571. .init_early = pmac_init_early,
  572. .show_cpuinfo = pmac_show_cpuinfo,
  573. .init_IRQ = pmac_pic_init,
  574. .get_irq = NULL, /* changed later */
  575. .pci_irq_fixup = pmac_pci_irq_fixup,
  576. .restart = pmac_restart,
  577. .power_off = pmac_power_off,
  578. .halt = pmac_halt,
  579. .time_init = pmac_time_init,
  580. .get_boot_time = pmac_get_boot_time,
  581. .set_rtc_time = pmac_set_rtc_time,
  582. .get_rtc_time = pmac_get_rtc_time,
  583. .calibrate_decr = pmac_calibrate_decr,
  584. .feature_call = pmac_do_feature_call,
  585. .progress = udbg_progress,
  586. #ifdef CONFIG_PPC64
  587. .pci_probe_mode = pmac_pci_probe_mode,
  588. .power_save = power4_idle,
  589. .enable_pmcs = power4_enable_pmcs,
  590. #ifdef CONFIG_KEXEC
  591. .machine_kexec = default_machine_kexec,
  592. .machine_kexec_prepare = default_machine_kexec_prepare,
  593. .machine_crash_shutdown = default_machine_crash_shutdown,
  594. #endif
  595. #endif /* CONFIG_PPC64 */
  596. #ifdef CONFIG_PPC32
  597. .pcibios_enable_device_hook = pmac_pci_enable_device_hook,
  598. .pcibios_after_init = pmac_pcibios_after_init,
  599. .phys_mem_access_prot = pci_phys_mem_access_prot,
  600. #endif
  601. #if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PPC64)
  602. .cpu_die = pmac_cpu_die,
  603. #endif
  604. };