More Makefile cleanups, otherwise mainly noticeable are the netfilter fix
[davej-history.git] / arch / ppc / kernel / pmac_setup.c
blobb5bf03abc34ede2a9a91868cb40eca69b24fa369
1 /*
2 * linux/arch/ppc/kernel/setup.c
4 * PowerPC version
5 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
7 * Adapted for Power Macintosh by Paul Mackerras
8 * Copyright (C) 1996 Paul Mackerras (paulus@cs.anu.edu.au)
10 * Derived from "arch/alpha/kernel/setup.c"
11 * Copyright (C) 1995 Linus Torvalds
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version
16 * 2 of the License, or (at your option) any later version.
21 * bootup setup stuff..
24 #include <linux/config.h>
25 #include <linux/init.h>
26 #include <linux/errno.h>
27 #include <linux/sched.h>
28 #include <linux/kernel.h>
29 #include <linux/mm.h>
30 #include <linux/stddef.h>
31 #include <linux/unistd.h>
32 #include <linux/ptrace.h>
33 #include <linux/malloc.h>
34 #include <linux/user.h>
35 #include <linux/a.out.h>
36 #include <linux/tty.h>
37 #include <linux/string.h>
38 #include <linux/delay.h>
39 #include <linux/ioport.h>
40 #include <linux/major.h>
41 #include <linux/blk.h>
42 #include <linux/vt_kern.h>
43 #include <linux/console.h>
44 #include <linux/ide.h>
45 #include <linux/pci.h>
46 #include <linux/adb.h>
47 #include <linux/cuda.h>
48 #include <linux/pmu.h>
50 #include <asm/init.h>
51 #include <asm/prom.h>
52 #include <asm/system.h>
53 #include <asm/pgtable.h>
54 #include <asm/bitops.h>
55 #include <asm/io.h>
56 #include <asm/pci-bridge.h>
57 #include <asm/ohare.h>
58 #include <asm/mediabay.h>
59 #include <asm/feature.h>
60 #include <asm/machdep.h>
61 #include <asm/keyboard.h>
62 #include <asm/dma.h>
63 #include <asm/bootx.h>
65 #include <asm/time.h>
66 #include "local_irq.h"
67 #include "pmac_pic.h"
69 #undef SHOW_GATWICK_IRQS
71 extern long pmac_time_init(void);
72 extern unsigned long pmac_get_rtc_time(void);
73 extern int pmac_set_rtc_time(unsigned long nowtime);
74 extern void pmac_read_rtc_time(void);
75 extern void pmac_calibrate_decr(void);
76 extern void pmac_setup_pci_ptrs(void);
78 extern int mackbd_setkeycode(unsigned int scancode, unsigned int keycode);
79 extern int mackbd_getkeycode(unsigned int scancode);
80 extern int mackbd_translate(unsigned char keycode, unsigned char *keycodep,
81 char raw_mode);
82 extern int mackbd_unexpected_up(unsigned char keycode);
83 extern void mackbd_leds(unsigned char leds);
84 extern void __init mackbd_init_hw(void);
85 extern int mac_hid_kbd_translate(unsigned char scancode, unsigned char *keycode,
86 char raw_mode);
87 extern char mac_hid_kbd_unexpected_up(unsigned char keycode);
88 extern void mac_hid_init_hw(void);
89 #ifdef CONFIG_MAGIC_SYSRQ
90 extern unsigned char mac_hid_kbd_sysrq_xlate[128];
91 extern unsigned char pckbd_sysrq_xlate[128];
92 extern unsigned char mackbd_sysrq_xlate[128];
93 #endif /* CONFIG_MAGIC_SYSRQ */
94 extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode);
95 extern int pckbd_getkeycode(unsigned int scancode);
96 extern int pckbd_translate(unsigned char scancode, unsigned char *keycode,
97 char raw_mode);
98 extern char pckbd_unexpected_up(unsigned char keycode);
99 extern int keyboard_sends_linux_keycodes;
100 extern void pmac_nvram_update(void);
102 extern void *pmac_pci_dev_io_base(unsigned char bus, unsigned char devfn, int physical);
103 extern void *pmac_pci_dev_mem_base(unsigned char bus, unsigned char devfn);
104 extern int pmac_pci_dev_root_bridge(unsigned char bus, unsigned char devfn);
106 unsigned char drive_info;
108 int ppc_override_l2cr = 0;
109 int ppc_override_l2cr_value;
110 int has_l2cache = 0;
112 static int current_root_goodness = -1;
114 extern char saved_command_line[];
116 extern int pmac_newworld;
118 #define DEFAULT_ROOT_DEVICE 0x0801 /* sda1 - slightly silly choice */
120 extern void zs_kgdb_hook(int tty_num);
121 static void ohare_init(void);
122 static void init_p2pbridge(void);
123 #ifdef CONFIG_BOOTX_TEXT
124 void pmac_progress(char *s, unsigned short hex);
125 #endif
127 sys_ctrler_t sys_ctrler = SYS_CTRLER_UNKNOWN;
129 __pmac
131 pmac_get_cpuinfo(char *buffer)
133 int len;
134 struct device_node *np;
135 char *pp;
136 int plen;
138 /* find motherboard type */
139 len = sprintf(buffer, "machine\t\t: ");
140 np = find_devices("device-tree");
141 if (np != NULL) {
142 pp = (char *) get_property(np, "model", NULL);
143 if (pp != NULL)
144 len += sprintf(buffer+len, "%s\n", pp);
145 else
146 len += sprintf(buffer+len, "PowerMac\n");
147 pp = (char *) get_property(np, "compatible", &plen);
148 if (pp != NULL) {
149 len += sprintf(buffer+len, "motherboard\t:");
150 while (plen > 0) {
151 int l = strlen(pp) + 1;
152 len += sprintf(buffer+len, " %s", pp);
153 plen -= l;
154 pp += l;
156 buffer[len++] = '\n';
158 } else
159 len += sprintf(buffer+len, "PowerMac\n");
161 /* find l2 cache info */
162 np = find_devices("l2-cache");
163 if (np == 0)
164 np = find_type_devices("cache");
165 if (np != 0) {
166 unsigned int *ic = (unsigned int *)
167 get_property(np, "i-cache-size", NULL);
168 unsigned int *dc = (unsigned int *)
169 get_property(np, "d-cache-size", NULL);
170 len += sprintf(buffer+len, "L2 cache\t:");
171 has_l2cache = 1;
172 if (get_property(np, "cache-unified", NULL) != 0 && dc) {
173 len += sprintf(buffer+len, " %dK unified", *dc / 1024);
174 } else {
175 if (ic)
176 len += sprintf(buffer+len, " %dK instruction",
177 *ic / 1024);
178 if (dc)
179 len += sprintf(buffer+len, "%s %dK data",
180 (ic? " +": ""), *dc / 1024);
182 pp = get_property(np, "ram-type", NULL);
183 if (pp)
184 len += sprintf(buffer+len, " %s", pp);
185 buffer[len++] = '\n';
188 /* find ram info */
189 np = find_devices("memory");
190 if (np != 0) {
191 int n;
192 struct reg_property *reg = (struct reg_property *)
193 get_property(np, "reg", &n);
195 if (reg != 0) {
196 unsigned long total = 0;
198 for (n /= sizeof(struct reg_property); n > 0; --n)
199 total += (reg++)->size;
200 len += sprintf(buffer+len, "memory\t\t: %luMB\n",
201 total >> 20);
205 /* Checks "l2cr-value" property in the registry */
206 np = find_devices("cpus");
207 if (np == 0)
208 np = find_type_devices("cpu");
209 if (np != 0) {
210 unsigned int *l2cr = (unsigned int *)
211 get_property(np, "l2cr-value", NULL);
212 if (l2cr != 0) {
213 len += sprintf(buffer+len, "l2cr override\t: 0x%x\n", *l2cr);
217 /* Indicate newworld/oldworld */
218 len += sprintf(buffer+len, "pmac-generation\t: %s\n",
219 pmac_newworld ? "NewWorld" : "OldWorld");
222 return len;
225 #ifdef CONFIG_SCSI
226 /* Find the device number for the disk (if any) at target tgt
227 on host adaptor host. We just need to get the prototype from
228 sd.h */
229 #include <linux/blkdev.h>
230 #include "../../../drivers/scsi/scsi.h"
231 #include "../../../drivers/scsi/sd.h"
233 #endif
236 * Dummy mksound function that does nothing.
237 * The real one is in the dmasound driver.
239 __pmac
240 static void
241 pmac_mksound(unsigned int hz, unsigned int ticks)
245 static volatile u32 *sysctrl_regs;
247 void __init
248 pmac_setup_arch(void)
250 struct device_node *cpu;
251 int *fp;
253 /* Set loops_per_sec to a half-way reasonable value,
254 for use until calibrate_delay gets called. */
255 cpu = find_type_devices("cpu");
256 if (cpu != 0) {
257 fp = (int *) get_property(cpu, "clock-frequency", NULL);
258 if (fp != 0) {
259 switch (_get_PVR() >> 16) {
260 case 4: /* 604 */
261 case 8: /* G3 */
262 case 9: /* 604e */
263 case 10: /* mach V (604ev5) */
264 case 12: /* G4 */
265 case 20: /* 620 */
266 loops_per_sec = *fp;
267 break;
268 default: /* 601, 603, etc. */
269 loops_per_sec = *fp / 2;
271 } else
272 loops_per_sec = 50000000;
275 /* this area has the CPU identification register
276 and some registers used by smp boards */
277 sysctrl_regs = (volatile u32 *) ioremap(0xf8000000, 0x1000);
278 __ioremap(0xffc00000, 0x400000, pgprot_val(PAGE_READONLY));
279 ohare_init();
281 pmac_find_bridges();
282 init_p2pbridge();
284 /* Checks "l2cr-value" property in the registry */
285 if ( (_get_PVR() >> 16) == 8 || (_get_PVR() >> 16) == 12 ) {
286 struct device_node *np = find_devices("cpus");
287 if (np == 0)
288 np = find_type_devices("cpu");
289 if (np != 0) {
290 unsigned int *l2cr = (unsigned int *)
291 get_property(np, "l2cr-value", NULL);
292 if (l2cr != 0) {
293 ppc_override_l2cr = 1;
294 ppc_override_l2cr_value = *l2cr;
295 _set_L2CR(0);
296 _set_L2CR(ppc_override_l2cr_value);
301 if (ppc_override_l2cr)
302 printk(KERN_INFO "L2CR overriden (0x%x), backside cache is %s\n",
303 ppc_override_l2cr_value, (ppc_override_l2cr_value & 0x80000000)
304 ? "enabled" : "disabled");
306 #ifdef CONFIG_KGDB
307 zs_kgdb_hook(0);
308 #endif
310 #ifdef CONFIG_ADB_CUDA
311 find_via_cuda();
312 #endif
313 #ifdef CONFIG_ADB_PMU
314 find_via_pmu();
315 #endif
316 #ifdef CONFIG_NVRAM
317 pmac_nvram_init();
318 #endif
319 #ifdef CONFIG_DUMMY_CONSOLE
320 conswitchp = &dummy_con;
321 #endif
323 kd_mksound = pmac_mksound;
325 #ifdef CONFIG_BLK_DEV_INITRD
326 if (initrd_start)
327 ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0);
328 else
329 #endif
330 ROOT_DEV = to_kdev_t(DEFAULT_ROOT_DEVICE);
334 * Tweak the PCI-PCI bridge chip on the blue & white G3s.
336 static void __init init_p2pbridge(void)
338 struct device_node *p2pbridge;
339 unsigned char bus, devfn;
340 unsigned short val;
342 /* XXX it would be better here to identify the specific
343 PCI-PCI bridge chip we have. */
344 if ((p2pbridge = find_devices("pci-bridge")) == 0
345 || p2pbridge->parent == NULL
346 || strcmp(p2pbridge->parent->name, "pci") != 0)
347 return;
348 if (pci_device_loc(p2pbridge, &bus, &devfn) < 0)
349 return;
350 if (ppc_md.pcibios_read_config_word(bus, devfn, PCI_BRIDGE_CONTROL, &val) < 0) {
351 printk(KERN_ERR "init_p2pbridge: couldn't read bridge control\n");
352 return;
354 val &= ~PCI_BRIDGE_CTL_MASTER_ABORT;
355 ppc_md.pcibios_write_config_word(bus, devfn, PCI_BRIDGE_CONTROL, val);
356 ppc_md.pcibios_read_config_word(bus, devfn, PCI_BRIDGE_CONTROL, &val);
359 static void __init ohare_init(void)
362 * Turn on the L2 cache.
363 * We assume that we have a PSX memory controller iff
364 * we have an ohare I/O controller.
366 if (find_devices("ohare") != NULL) {
367 if (((sysctrl_regs[2] >> 24) & 0xf) >= 3) {
368 if (sysctrl_regs[4] & 0x10)
369 sysctrl_regs[4] |= 0x04000020;
370 else
371 sysctrl_regs[4] |= 0x04000000;
372 if(has_l2cache)
373 printk(KERN_INFO "Level 2 cache enabled\n");
378 extern char *bootpath;
379 extern char *bootdevice;
380 void *boot_host;
381 int boot_target;
382 int boot_part;
383 kdev_t boot_dev;
385 void __init
386 pmac_init2(void)
388 #ifdef CONFIG_ADB_PMU
389 via_pmu_start();
390 #endif
391 #ifdef CONFIG_ADB_CUDA
392 via_cuda_start();
393 #endif
394 #ifdef CONFIG_PMAC_PBOOK
395 media_bay_init();
396 #endif
399 #ifdef CONFIG_SCSI
400 void __init
401 note_scsi_host(struct device_node *node, void *host)
403 int l;
404 char *p;
406 l = strlen(node->full_name);
407 if (bootpath != NULL && bootdevice != NULL
408 && strncmp(node->full_name, bootdevice, l) == 0
409 && (bootdevice[l] == '/' || bootdevice[l] == 0)) {
410 boot_host = host;
412 * There's a bug in OF 1.0.5. (Why am I not surprised.)
413 * If you pass a path like scsi/sd@1:0 to canon, it returns
414 * something like /bandit@F2000000/gc@10/53c94@10000/sd@0,0
415 * That is, the scsi target number doesn't get preserved.
416 * So we pick the target number out of bootpath and use that.
418 p = strstr(bootpath, "/sd@");
419 if (p != NULL) {
420 p += 4;
421 boot_target = simple_strtoul(p, NULL, 10);
422 p = strchr(p, ':');
423 if (p != NULL)
424 boot_part = simple_strtoul(p + 1, NULL, 10);
428 #endif
430 #if defined(CONFIG_BLK_DEV_IDE) && defined(CONFIG_BLK_DEV_IDE_PMAC)
432 kdev_t __init find_ide_boot(void)
434 char *p;
435 int n;
436 kdev_t __init pmac_find_ide_boot(char *bootdevice, int n);
438 if (bootdevice == NULL)
439 return 0;
440 p = strrchr(bootdevice, '/');
441 if (p == NULL)
442 return 0;
443 n = p - bootdevice;
445 return pmac_find_ide_boot(bootdevice, n);
447 #endif /* CONFIG_BLK_DEV_IDE && CONFIG_BLK_DEV_IDE_PMAC */
449 void __init find_boot_device(void)
451 #ifdef CONFIG_SCSI
452 if (boot_host != NULL) {
453 boot_dev = sd_find_target(boot_host, boot_target);
454 if (boot_dev != 0)
455 return;
457 #endif
458 #if defined(CONFIG_BLK_DEV_IDE) && defined(CONFIG_BLK_DEV_IDE_PMAC)
459 boot_dev = find_ide_boot();
460 #endif
463 /* can't be __init - can be called whenever a disk is first accessed */
464 __pmac
465 void note_bootable_part(kdev_t dev, int part, int goodness)
467 static int found_boot = 0;
468 char *p;
470 /* Do nothing if the root has been set already. */
471 if ((goodness < current_root_goodness) &&
472 (ROOT_DEV != to_kdev_t(DEFAULT_ROOT_DEVICE)))
473 return;
474 p = strstr(saved_command_line, "root=");
475 if (p != NULL && (p == saved_command_line || p[-1] == ' '))
476 return;
478 if (!found_boot) {
479 find_boot_device();
480 found_boot = 1;
482 if (boot_dev == 0 || dev == boot_dev) {
483 ROOT_DEV = MKDEV(MAJOR(dev), MINOR(dev) + part);
484 boot_dev = NODEV;
485 current_root_goodness = goodness;
489 void
490 pmac_restart(char *cmd)
492 #ifdef CONFIG_ADB_CUDA
493 struct adb_request req;
494 #endif /* CONFIG_ADB_CUDA */
496 pmac_nvram_update();
498 switch (sys_ctrler) {
499 #ifdef CONFIG_ADB_CUDA
500 case SYS_CTRLER_CUDA:
501 cuda_request(&req, NULL, 2, CUDA_PACKET,
502 CUDA_RESET_SYSTEM);
503 for (;;)
504 cuda_poll();
505 break;
506 #endif /* CONFIG_ADB_CUDA */
507 #ifdef CONFIG_ADB_PMU
508 case SYS_CTRLER_PMU:
509 pmu_restart();
510 break;
511 #endif /* CONFIG_ADB_PMU */
512 default:
516 void
517 pmac_power_off(void)
519 #ifdef CONFIG_ADB_CUDA
520 struct adb_request req;
521 #endif /* CONFIG_ADB_CUDA */
523 pmac_nvram_update();
525 switch (sys_ctrler) {
526 #ifdef CONFIG_ADB_CUDA
527 case SYS_CTRLER_CUDA:
528 cuda_request(&req, NULL, 2, CUDA_PACKET,
529 CUDA_POWERDOWN);
530 for (;;)
531 cuda_poll();
532 break;
533 #endif /* CONFIG_ADB_CUDA */
534 #ifdef CONFIG_ADB_PMU
535 case SYS_CTRLER_PMU:
536 pmu_shutdown();
537 break;
538 #endif /* CONFIG_ADB_PMU */
539 default:
543 void
544 pmac_halt(void)
546 pmac_power_off();
550 #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
552 * IDE stuff.
554 void
555 pmac_ide_insw(ide_ioreg_t port, void *buf, int ns)
557 _insw_ns((unsigned short *)(port+_IO_BASE), buf, ns);
560 void
561 pmac_ide_outsw(ide_ioreg_t port, void *buf, int ns)
563 _outsw_ns((unsigned short *)(port+_IO_BASE), buf, ns);
567 pmac_ide_default_irq(ide_ioreg_t base)
569 return 0;
572 #if defined(CONFIG_BLK_DEV_IDE) && defined(CONFIG_BLK_DEV_IDE_PMAC)
573 extern ide_ioreg_t pmac_ide_get_base(int index);
574 #endif
576 ide_ioreg_t
577 pmac_ide_default_io_base(int index)
579 #if defined(CONFIG_BLK_DEV_IDE) && defined(CONFIG_BLK_DEV_IDE_PMAC)
580 return pmac_ide_get_base(index);
581 #else
582 return 0;
583 #endif
587 pmac_ide_check_region(ide_ioreg_t from, unsigned int extent)
589 return 0;
592 void
593 pmac_ide_request_region(ide_ioreg_t from,
594 unsigned int extent,
595 const char *name)
599 void
600 pmac_ide_release_region(ide_ioreg_t from,
601 unsigned int extent)
605 /* Convert the shorts/longs in hd_driveid from little to big endian;
606 * chars are endian independant, of course, but strings need to be flipped.
607 * (Despite what it says in drivers/block/ide.h, they come up as little
608 * endian...)
610 * Changes to linux/hdreg.h may require changes here. */
611 void
612 pmac_ide_fix_driveid(struct hd_driveid *id)
614 ppc_generic_ide_fix_driveid(id);
617 #if defined(CONFIG_BLK_DEV_IDE) && defined(CONFIG_BLK_DEV_IDE_PMAC)
618 /* This is declared in drivers/block/ide-pmac.c */
619 void pmac_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq);
620 #else
622 * This registers the standard ports for this architecture with the IDE
623 * driver.
625 void pmac_ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq)
628 #endif
629 #endif
631 void __init
632 pmac_init(unsigned long r3, unsigned long r4, unsigned long r5,
633 unsigned long r6, unsigned long r7)
635 pmac_setup_pci_ptrs();
637 /* isa_io_base gets set in pmac_find_bridges */
638 isa_mem_base = PMAC_ISA_MEM_BASE;
639 pci_dram_offset = PMAC_PCI_DRAM_OFFSET;
640 ISA_DMA_THRESHOLD = ~0L;
641 DMA_MODE_READ = 1;
642 DMA_MODE_WRITE = 2;
644 ppc_md.setup_arch = pmac_setup_arch;
645 ppc_md.setup_residual = NULL;
646 ppc_md.get_cpuinfo = pmac_get_cpuinfo;
647 ppc_md.irq_cannonicalize = NULL;
648 ppc_md.init_IRQ = pmac_pic_init;
649 ppc_md.get_irq = pmac_get_irq;
650 ppc_md.init = pmac_init2;
652 ppc_md.restart = pmac_restart;
653 ppc_md.power_off = pmac_power_off;
654 ppc_md.halt = pmac_halt;
656 ppc_md.time_init = pmac_time_init;
657 ppc_md.set_rtc_time = pmac_set_rtc_time;
658 ppc_md.get_rtc_time = pmac_get_rtc_time;
659 ppc_md.calibrate_decr = pmac_calibrate_decr;
661 ppc_md.pci_dev_io_base = pmac_pci_dev_io_base;
662 ppc_md.pci_dev_mem_base = pmac_pci_dev_mem_base;
663 ppc_md.pci_dev_root_bridge = pmac_pci_dev_root_bridge;
665 #ifdef CONFIG_VT
666 #ifdef CONFIG_INPUT_ADBHID
667 ppc_md.kbd_init_hw = mac_hid_init_hw;
668 ppc_md.kbd_translate = mac_hid_kbd_translate;
669 ppc_md.kbd_unexpected_up = mac_hid_kbd_unexpected_up;
670 ppc_md.kbd_setkeycode = 0;
671 ppc_md.kbd_getkeycode = 0;
672 #ifdef CONFIG_MAGIC_SYSRQ
673 #ifdef CONFIG_MAC_ADBKEYCODES
674 if (!keyboard_sends_linux_keycodes) {
675 ppc_md.ppc_kbd_sysrq_xlate = mac_hid_kbd_sysrq_xlate;
676 SYSRQ_KEY = 0x69;
677 } else
678 #endif /* CONFIG_MAC_ADBKEYCODES */
680 ppc_md.ppc_kbd_sysrq_xlate = pckbd_sysrq_xlate;
681 SYSRQ_KEY = 0x54;
683 #endif /* CONFIG_MAGIC_SYSRQ */
684 #elif defined(CONFIG_ADB_KEYBOARD)
685 ppc_md.kbd_setkeycode = mackbd_setkeycode;
686 ppc_md.kbd_getkeycode = mackbd_getkeycode;
687 ppc_md.kbd_translate = mackbd_translate;
688 ppc_md.kbd_unexpected_up = mackbd_unexpected_up;
689 ppc_md.kbd_leds = mackbd_leds;
690 ppc_md.kbd_init_hw = mackbd_init_hw;
691 #ifdef CONFIG_MAGIC_SYSRQ
692 ppc_md.ppc_kbd_sysrq_xlate = mackbd_sysrq_xlate;
693 SYSRQ_KEY = 0x69;
694 #endif /* CONFIG_MAGIC_SYSRQ */
695 #endif /* CONFIG_INPUT_ADBHID/CONFIG_ADB_KEYBOARD */
696 #endif /* CONFIG_VT */
698 #if defined(CONFIG_BLK_DEV_IDE) && defined(CONFIG_BLK_DEV_IDE_PMAC)
699 ppc_ide_md.insw = pmac_ide_insw;
700 ppc_ide_md.outsw = pmac_ide_outsw;
701 ppc_ide_md.default_irq = pmac_ide_default_irq;
702 ppc_ide_md.default_io_base = pmac_ide_default_io_base;
703 ppc_ide_md.ide_check_region = pmac_ide_check_region;
704 ppc_ide_md.ide_request_region = pmac_ide_request_region;
705 ppc_ide_md.ide_release_region = pmac_ide_release_region;
706 ppc_ide_md.fix_driveid = pmac_ide_fix_driveid;
707 ppc_ide_md.ide_init_hwif = pmac_ide_init_hwif_ports;
709 ppc_ide_md.io_base = _IO_BASE; /* actually too early for this :-( */
710 #endif
711 #ifdef CONFIG_BOOTX_TEXT
712 ppc_md.progress = pmac_progress;
713 #endif
714 if (ppc_md.progress) ppc_md.progress("pmac_init(): exit", 0);
718 #ifdef CONFIG_BOOTX_TEXT
719 extern void drawchar(char c);
720 extern void drawstring(const char *c);
721 extern boot_infos_t *disp_bi;
722 void
723 pmac_progress(char *s, unsigned short hex)
725 if (disp_bi == 0)
726 return;
727 prom_drawstring(s);
728 prom_drawchar('\n');
730 #endif CONFIG_BOOTX_TEXT