setup.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686
  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/export.h>
  33. #include <linux/user.h>
  34. #include <linux/tty.h>
  35. #include <linux/string.h>
  36. #include <linux/delay.h>
  37. #include <linux/ioport.h>
  38. #include <linux/major.h>
  39. #include <linux/initrd.h>
  40. #include <linux/vt_kern.h>
  41. #include <linux/console.h>
  42. #include <linux/pci.h>
  43. #include <linux/adb.h>
  44. #include <linux/cuda.h>
  45. #include <linux/pmu.h>
  46. #include <linux/irq.h>
  47. #include <linux/seq_file.h>
  48. #include <linux/root_dev.h>
  49. #include <linux/bitops.h>
  50. #include <linux/suspend.h>
  51. #include <linux/of_device.h>
  52. #include <linux/of_platform.h>
  53. #include <linux/memblock.h>
  54. #include <asm/reg.h>
  55. #include <asm/sections.h>
  56. #include <asm/prom.h>
  57. #include <asm/pgtable.h>
  58. #include <asm/io.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/mmu_context.h>
  69. #include <asm/iommu.h>
  70. #include <asm/smu.h>
  71. #include <asm/pmc.h>
  72. #include <asm/udbg.h>
  73. #include "pmac.h"
  74. #undef SHOW_GATWICK_IRQS
  75. int ppc_override_l2cr = 0;
  76. int ppc_override_l2cr_value;
  77. int has_l2cache = 0;
  78. int pmac_newworld;
  79. static int current_root_goodness = -1;
  80. extern struct machdep_calls pmac_md;
  81. #define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */
  82. #ifdef CONFIG_PPC64
  83. int sccdbg;
  84. #endif
  85. sys_ctrler_t sys_ctrler = SYS_CTRLER_UNKNOWN;
  86. EXPORT_SYMBOL(sys_ctrler);
  87. #ifdef CONFIG_PMAC_SMU
  88. unsigned long smu_cmdbuf_abs;
  89. EXPORT_SYMBOL(smu_cmdbuf_abs);
  90. #endif
  91. static void pmac_show_cpuinfo(struct seq_file *m)
  92. {
  93. struct device_node *np;
  94. const char *pp;
  95. int plen;
  96. int mbmodel;
  97. unsigned int mbflags;
  98. char* mbname;
  99. mbmodel = pmac_call_feature(PMAC_FTR_GET_MB_INFO, NULL,
  100. PMAC_MB_INFO_MODEL, 0);
  101. mbflags = pmac_call_feature(PMAC_FTR_GET_MB_INFO, NULL,
  102. PMAC_MB_INFO_FLAGS, 0);
  103. if (pmac_call_feature(PMAC_FTR_GET_MB_INFO, NULL, PMAC_MB_INFO_NAME,
  104. (long) &mbname) != 0)
  105. mbname = "Unknown";
  106. /* find motherboard type */
  107. seq_printf(m, "machine\t\t: ");
  108. np = of_find_node_by_path("/");
  109. if (np != NULL) {
  110. pp = of_get_property(np, "model", NULL);
  111. if (pp != NULL)
  112. seq_printf(m, "%s\n", pp);
  113. else
  114. seq_printf(m, "PowerMac\n");
  115. pp = of_get_property(np, "compatible", &plen);
  116. if (pp != NULL) {
  117. seq_printf(m, "motherboard\t:");
  118. while (plen > 0) {
  119. int l = strlen(pp) + 1;
  120. seq_printf(m, " %s", pp);
  121. plen -= l;
  122. pp += l;
  123. }
  124. seq_printf(m, "\n");
  125. }
  126. of_node_put(np);
  127. } else
  128. seq_printf(m, "PowerMac\n");
  129. /* print parsed model */
  130. seq_printf(m, "detected as\t: %d (%s)\n", mbmodel, mbname);
  131. seq_printf(m, "pmac flags\t: %08x\n", mbflags);
  132. /* find l2 cache info */
  133. np = of_find_node_by_name(NULL, "l2-cache");
  134. if (np == NULL)
  135. np = of_find_node_by_type(NULL, "cache");
  136. if (np != NULL) {
  137. const unsigned int *ic =
  138. of_get_property(np, "i-cache-size", NULL);
  139. const unsigned int *dc =
  140. of_get_property(np, "d-cache-size", NULL);
  141. seq_printf(m, "L2 cache\t:");
  142. has_l2cache = 1;
  143. if (of_get_property(np, "cache-unified", NULL) != 0 && dc) {
  144. seq_printf(m, " %dK unified", *dc / 1024);
  145. } else {
  146. if (ic)
  147. seq_printf(m, " %dK instruction", *ic / 1024);
  148. if (dc)
  149. seq_printf(m, "%s %dK data",
  150. (ic? " +": ""), *dc / 1024);
  151. }
  152. pp = of_get_property(np, "ram-type", NULL);
  153. if (pp)
  154. seq_printf(m, " %s", pp);
  155. seq_printf(m, "\n");
  156. of_node_put(np);
  157. }
  158. /* Indicate newworld/oldworld */
  159. seq_printf(m, "pmac-generation\t: %s\n",
  160. pmac_newworld ? "NewWorld" : "OldWorld");
  161. }
  162. #ifndef CONFIG_ADB_CUDA
  163. int find_via_cuda(void)
  164. {
  165. struct device_node *dn = of_find_node_by_name(NULL, "via-cuda");
  166. if (!dn)
  167. return 0;
  168. of_node_put(dn);
  169. printk("WARNING ! Your machine is CUDA-based but your kernel\n");
  170. printk(" wasn't compiled with CONFIG_ADB_CUDA option !\n");
  171. return 0;
  172. }
  173. #endif
  174. #ifndef CONFIG_ADB_PMU
  175. int find_via_pmu(void)
  176. {
  177. struct device_node *dn = of_find_node_by_name(NULL, "via-pmu");
  178. if (!dn)
  179. return 0;
  180. of_node_put(dn);
  181. printk("WARNING ! Your machine is PMU-based but your kernel\n");
  182. printk(" wasn't compiled with CONFIG_ADB_PMU option !\n");
  183. return 0;
  184. }
  185. #endif
  186. #ifndef CONFIG_PMAC_SMU
  187. int smu_init(void)
  188. {
  189. /* should check and warn if SMU is present */
  190. return 0;
  191. }
  192. #endif
  193. #ifdef CONFIG_PPC32
  194. static volatile u32 *sysctrl_regs;
  195. static void __init ohare_init(void)
  196. {
  197. struct device_node *dn;
  198. /* this area has the CPU identification register
  199. and some registers used by smp boards */
  200. sysctrl_regs = (volatile u32 *) ioremap(0xf8000000, 0x1000);
  201. /*
  202. * Turn on the L2 cache.
  203. * We assume that we have a PSX memory controller iff
  204. * we have an ohare I/O controller.
  205. */
  206. dn = of_find_node_by_name(NULL, "ohare");
  207. if (dn) {
  208. of_node_put(dn);
  209. if (((sysctrl_regs[2] >> 24) & 0xf) >= 3) {
  210. if (sysctrl_regs[4] & 0x10)
  211. sysctrl_regs[4] |= 0x04000020;
  212. else
  213. sysctrl_regs[4] |= 0x04000000;
  214. if(has_l2cache)
  215. printk(KERN_INFO "Level 2 cache enabled\n");
  216. }
  217. }
  218. }
  219. static void __init l2cr_init(void)
  220. {
  221. /* Checks "l2cr-value" property in the registry */
  222. if (cpu_has_feature(CPU_FTR_L2CR)) {
  223. struct device_node *np = of_find_node_by_name(NULL, "cpus");
  224. if (np == 0)
  225. np = of_find_node_by_type(NULL, "cpu");
  226. if (np != 0) {
  227. const unsigned int *l2cr =
  228. of_get_property(np, "l2cr-value", NULL);
  229. if (l2cr != 0) {
  230. ppc_override_l2cr = 1;
  231. ppc_override_l2cr_value = *l2cr;
  232. _set_L2CR(0);
  233. _set_L2CR(ppc_override_l2cr_value);
  234. }
  235. of_node_put(np);
  236. }
  237. }
  238. if (ppc_override_l2cr)
  239. printk(KERN_INFO "L2CR overridden (0x%x), "
  240. "backside cache is %s\n",
  241. ppc_override_l2cr_value,
  242. (ppc_override_l2cr_value & 0x80000000)
  243. ? "enabled" : "disabled");
  244. }
  245. #endif
  246. static void __init pmac_setup_arch(void)
  247. {
  248. struct device_node *cpu, *ic;
  249. const int *fp;
  250. unsigned long pvr;
  251. pvr = PVR_VER(mfspr(SPRN_PVR));
  252. /* Set loops_per_jiffy to a half-way reasonable value,
  253. for use until calibrate_delay gets called. */
  254. loops_per_jiffy = 50000000 / HZ;
  255. cpu = of_find_node_by_type(NULL, "cpu");
  256. if (cpu != NULL) {
  257. fp = of_get_property(cpu, "clock-frequency", NULL);
  258. if (fp != NULL) {
  259. if (pvr >= 0x30 && pvr < 0x80)
  260. /* PPC970 etc. */
  261. loops_per_jiffy = *fp / (3 * HZ);
  262. else if (pvr == 4 || pvr >= 8)
  263. /* 604, G3, G4 etc. */
  264. loops_per_jiffy = *fp / HZ;
  265. else
  266. /* 601, 603, etc. */
  267. loops_per_jiffy = *fp / (2 * HZ);
  268. }
  269. of_node_put(cpu);
  270. }
  271. /* See if newworld or oldworld */
  272. ic = of_find_node_with_property(NULL, "interrupt-controller");
  273. if (ic) {
  274. pmac_newworld = 1;
  275. of_node_put(ic);
  276. }
  277. /* Lookup PCI hosts */
  278. pmac_pci_init();
  279. #ifdef CONFIG_PPC32
  280. ohare_init();
  281. l2cr_init();
  282. #endif /* CONFIG_PPC32 */
  283. find_via_cuda();
  284. find_via_pmu();
  285. smu_init();
  286. #if defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE) || \
  287. defined(CONFIG_PPC64)
  288. pmac_nvram_init();
  289. #endif
  290. #ifdef CONFIG_PPC32
  291. #ifdef CONFIG_BLK_DEV_INITRD
  292. if (initrd_start)
  293. ROOT_DEV = Root_RAM0;
  294. else
  295. #endif
  296. ROOT_DEV = DEFAULT_ROOT_DEVICE;
  297. #endif
  298. #ifdef CONFIG_ADB
  299. if (strstr(cmd_line, "adb_sync")) {
  300. extern int __adb_probe_sync;
  301. __adb_probe_sync = 1;
  302. }
  303. #endif /* CONFIG_ADB */
  304. }
  305. #ifdef CONFIG_SCSI
  306. void note_scsi_host(struct device_node *node, void *host)
  307. {
  308. }
  309. EXPORT_SYMBOL(note_scsi_host);
  310. #endif
  311. static int initializing = 1;
  312. static int pmac_late_init(void)
  313. {
  314. initializing = 0;
  315. return 0;
  316. }
  317. machine_late_initcall(powermac, pmac_late_init);
  318. /*
  319. * This is __init_refok because we check for "initializing" before
  320. * touching any of the __init sensitive things and "initializing"
  321. * will be false after __init time. This can't be __init because it
  322. * can be called whenever a disk is first accessed.
  323. */
  324. void __init_refok note_bootable_part(dev_t dev, int part, int goodness)
  325. {
  326. char *p;
  327. if (!initializing)
  328. return;
  329. if ((goodness <= current_root_goodness) &&
  330. ROOT_DEV != DEFAULT_ROOT_DEVICE)
  331. return;
  332. p = strstr(boot_command_line, "root=");
  333. if (p != NULL && (p == boot_command_line || p[-1] == ' '))
  334. return;
  335. ROOT_DEV = dev + part;
  336. current_root_goodness = goodness;
  337. }
  338. #ifdef CONFIG_ADB_CUDA
  339. static void cuda_restart(void)
  340. {
  341. struct adb_request req;
  342. cuda_request(&req, NULL, 2, CUDA_PACKET, CUDA_RESET_SYSTEM);
  343. for (;;)
  344. cuda_poll();
  345. }
  346. static void cuda_shutdown(void)
  347. {
  348. struct adb_request req;
  349. cuda_request(&req, NULL, 2, CUDA_PACKET, CUDA_POWERDOWN);
  350. for (;;)
  351. cuda_poll();
  352. }
  353. #else
  354. #define cuda_restart()
  355. #define cuda_shutdown()
  356. #endif
  357. #ifndef CONFIG_ADB_PMU
  358. #define pmu_restart()
  359. #define pmu_shutdown()
  360. #endif
  361. #ifndef CONFIG_PMAC_SMU
  362. #define smu_restart()
  363. #define smu_shutdown()
  364. #endif
  365. static void pmac_restart(char *cmd)
  366. {
  367. switch (sys_ctrler) {
  368. case SYS_CTRLER_CUDA:
  369. cuda_restart();
  370. break;
  371. case SYS_CTRLER_PMU:
  372. pmu_restart();
  373. break;
  374. case SYS_CTRLER_SMU:
  375. smu_restart();
  376. break;
  377. default: ;
  378. }
  379. }
  380. static void pmac_power_off(void)
  381. {
  382. switch (sys_ctrler) {
  383. case SYS_CTRLER_CUDA:
  384. cuda_shutdown();
  385. break;
  386. case SYS_CTRLER_PMU:
  387. pmu_shutdown();
  388. break;
  389. case SYS_CTRLER_SMU:
  390. smu_shutdown();
  391. break;
  392. default: ;
  393. }
  394. }
  395. static void
  396. pmac_halt(void)
  397. {
  398. pmac_power_off();
  399. }
  400. /*
  401. * Early initialization.
  402. */
  403. static void __init pmac_init_early(void)
  404. {
  405. /* Enable early btext debug if requested */
  406. if (strstr(cmd_line, "btextdbg")) {
  407. udbg_adb_init_early();
  408. register_early_udbg_console();
  409. }
  410. /* Probe motherboard chipset */
  411. pmac_feature_init();
  412. /* Initialize debug stuff */
  413. udbg_scc_init(!!strstr(cmd_line, "sccdbg"));
  414. udbg_adb_init(!!strstr(cmd_line, "btextdbg"));
  415. #ifdef CONFIG_PPC64
  416. iommu_init_early_dart();
  417. #endif
  418. /* SMP Init has to be done early as we need to patch up
  419. * cpu_possible_mask before interrupt stacks are allocated
  420. * or kaboom...
  421. */
  422. #ifdef CONFIG_SMP
  423. pmac_setup_smp();
  424. #endif
  425. }
  426. static int __init pmac_declare_of_platform_devices(void)
  427. {
  428. struct device_node *np;
  429. if (machine_is(chrp))
  430. return -1;
  431. np = of_find_node_by_name(NULL, "valkyrie");
  432. if (np) {
  433. of_platform_device_create(np, "valkyrie", NULL);
  434. of_node_put(np);
  435. }
  436. np = of_find_node_by_name(NULL, "platinum");
  437. if (np) {
  438. of_platform_device_create(np, "platinum", NULL);
  439. of_node_put(np);
  440. }
  441. np = of_find_node_by_type(NULL, "smu");
  442. if (np) {
  443. of_platform_device_create(np, "smu", NULL);
  444. of_node_put(np);
  445. }
  446. np = of_find_node_by_type(NULL, "fcu");
  447. if (np == NULL) {
  448. /* Some machines have strangely broken device-tree */
  449. np = of_find_node_by_path("/u3@0,f8000000/i2c@f8001000/fan@15e");
  450. }
  451. if (np) {
  452. of_platform_device_create(np, "temperature", NULL);
  453. of_node_put(np);
  454. }
  455. return 0;
  456. }
  457. machine_device_initcall(powermac, pmac_declare_of_platform_devices);
  458. #ifdef CONFIG_SERIAL_PMACZILOG_CONSOLE
  459. /*
  460. * This is called very early, as part of console_init() (typically just after
  461. * time_init()). This function is respondible for trying to find a good
  462. * default console on serial ports. It tries to match the open firmware
  463. * default output with one of the available serial console drivers.
  464. */
  465. static int __init check_pmac_serial_console(void)
  466. {
  467. struct device_node *prom_stdout = NULL;
  468. int offset = 0;
  469. const char *name;
  470. #ifdef CONFIG_SERIAL_PMACZILOG_TTYS
  471. char *devname = "ttyS";
  472. #else
  473. char *devname = "ttyPZ";
  474. #endif
  475. pr_debug(" -> check_pmac_serial_console()\n");
  476. /* The user has requested a console so this is already set up. */
  477. if (strstr(boot_command_line, "console=")) {
  478. pr_debug(" console was specified !\n");
  479. return -EBUSY;
  480. }
  481. if (!of_chosen) {
  482. pr_debug(" of_chosen is NULL !\n");
  483. return -ENODEV;
  484. }
  485. /* We are getting a weird phandle from OF ... */
  486. /* ... So use the full path instead */
  487. name = of_get_property(of_chosen, "linux,stdout-path", NULL);
  488. if (name == NULL) {
  489. pr_debug(" no linux,stdout-path !\n");
  490. return -ENODEV;
  491. }
  492. prom_stdout = of_find_node_by_path(name);
  493. if (!prom_stdout) {
  494. pr_debug(" can't find stdout package %s !\n", name);
  495. return -ENODEV;
  496. }
  497. pr_debug("stdout is %s\n", prom_stdout->full_name);
  498. name = of_get_property(prom_stdout, "name", NULL);
  499. if (!name) {
  500. pr_debug(" stdout package has no name !\n");
  501. goto not_found;
  502. }
  503. if (strcmp(name, "ch-a") == 0)
  504. offset = 0;
  505. else if (strcmp(name, "ch-b") == 0)
  506. offset = 1;
  507. else
  508. goto not_found;
  509. of_node_put(prom_stdout);
  510. pr_debug("Found serial console at %s%d\n", devname, offset);
  511. return add_preferred_console(devname, offset, NULL);
  512. not_found:
  513. pr_debug("No preferred console found !\n");
  514. of_node_put(prom_stdout);
  515. return -ENODEV;
  516. }
  517. console_initcall(check_pmac_serial_console);
  518. #endif /* CONFIG_SERIAL_PMACZILOG_CONSOLE */
  519. /*
  520. * Called very early, MMU is off, device-tree isn't unflattened
  521. */
  522. static int __init pmac_probe(void)
  523. {
  524. unsigned long root = of_get_flat_dt_root();
  525. if (!of_flat_dt_is_compatible(root, "Power Macintosh") &&
  526. !of_flat_dt_is_compatible(root, "MacRISC"))
  527. return 0;
  528. #ifdef CONFIG_PPC64
  529. /*
  530. * On U3, the DART (iommu) must be allocated now since it
  531. * has an impact on htab_initialize (due to the large page it
  532. * occupies having to be broken up so the DART itself is not
  533. * part of the cacheable linar mapping
  534. */
  535. alloc_dart_table();
  536. hpte_init_native();
  537. #endif
  538. #ifdef CONFIG_PPC32
  539. /* isa_io_base gets set in pmac_pci_init */
  540. ISA_DMA_THRESHOLD = ~0L;
  541. DMA_MODE_READ = 1;
  542. DMA_MODE_WRITE = 2;
  543. #endif /* CONFIG_PPC32 */
  544. #ifdef CONFIG_PMAC_SMU
  545. /*
  546. * SMU based G5s need some memory below 2Gb, at least the current
  547. * driver needs that. We have to allocate it now. We allocate 4k
  548. * (1 small page) for now.
  549. */
  550. smu_cmdbuf_abs = memblock_alloc_base(4096, 4096, 0x80000000UL);
  551. #endif /* CONFIG_PMAC_SMU */
  552. return 1;
  553. }
  554. #ifdef CONFIG_PPC64
  555. /* Move that to pci.c */
  556. static int pmac_pci_probe_mode(struct pci_bus *bus)
  557. {
  558. struct device_node *node = pci_bus_to_OF_node(bus);
  559. /* We need to use normal PCI probing for the AGP bus,
  560. * since the device for the AGP bridge isn't in the tree.
  561. * Same for the PCIe host on U4 and the HT host bridge.
  562. */
  563. if (bus->self == NULL && (of_device_is_compatible(node, "u3-agp") ||
  564. of_device_is_compatible(node, "u4-pcie") ||
  565. of_device_is_compatible(node, "u3-ht")))
  566. return PCI_PROBE_NORMAL;
  567. return PCI_PROBE_DEVTREE;
  568. }
  569. #endif /* CONFIG_PPC64 */
  570. define_machine(powermac) {
  571. .name = "PowerMac",
  572. .probe = pmac_probe,
  573. .setup_arch = pmac_setup_arch,
  574. .init_early = pmac_init_early,
  575. .show_cpuinfo = pmac_show_cpuinfo,
  576. .init_IRQ = pmac_pic_init,
  577. .get_irq = NULL, /* changed later */
  578. .pci_irq_fixup = pmac_pci_irq_fixup,
  579. .restart = pmac_restart,
  580. .power_off = pmac_power_off,
  581. .halt = pmac_halt,
  582. .time_init = pmac_time_init,
  583. .get_boot_time = pmac_get_boot_time,
  584. .set_rtc_time = pmac_set_rtc_time,
  585. .get_rtc_time = pmac_get_rtc_time,
  586. .calibrate_decr = pmac_calibrate_decr,
  587. .feature_call = pmac_do_feature_call,
  588. .progress = udbg_progress,
  589. #ifdef CONFIG_PPC64
  590. .pci_probe_mode = pmac_pci_probe_mode,
  591. .power_save = power4_idle,
  592. .enable_pmcs = power4_enable_pmcs,
  593. #endif /* CONFIG_PPC64 */
  594. #ifdef CONFIG_PPC32
  595. .pcibios_enable_device_hook = pmac_pci_enable_device_hook,
  596. .pcibios_after_init = pmac_pcibios_after_init,
  597. .phys_mem_access_prot = pci_phys_mem_access_prot,
  598. #endif
  599. };