setup.c 16 KB

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