diff -uNr linux-2.4.18.orig/arch/ppc/kernel/open_pic.c linux-2.4.18-p3.cur/arch/ppc/kernel/open_pic.c --- linux-2.4.18.orig/arch/ppc/kernel/open_pic.c Tue Jan 15 15:11:17 2002 +++ linux-2.4.18-p3.cur/arch/ppc/kernel/open_pic.c Wed Jan 23 17:10:38 2002 @@ -819,6 +819,19 @@ #endif /* CONFIG_SMP */ +int +poppic_get_irq(struct pt_regs *regs) +{ + int irq; + + if ( (irq = i8259_poll()) < 0 ) { + printk(KERN_DEBUG "Bogus interrupt from PC = %lx\n", regs->nip); + return -1; + } + + return irq; +} + /* This one may be merged with PReP and CHRP */ int openpic_get_irq(struct pt_regs *regs) diff -uNr linux-2.4.18.orig/arch/ppc/kernel/prom.c linux-2.4.18-p3.cur/arch/ppc/kernel/prom.c --- linux-2.4.18.orig/arch/ppc/kernel/prom.c Tue Jan 15 15:11:17 2002 +++ linux-2.4.18-p3.cur/arch/ppc/kernel/prom.c Wed Jan 23 17:10:38 2002 @@ -141,6 +141,7 @@ break; } } + use_of_interrupt_tree=0; if (_machine == _MACH_Pmac && use_of_interrupt_tree) pmac_newworld = 1; @@ -163,6 +164,7 @@ char *name, *ic; int iclen; +#if 0 /* POP POOP */ for (np = allnodes; np != NULL; np = np->allnext) { ic = get_property(np, "interrupt-controller", &iclen); name = get_property(np, "name", NULL); @@ -176,6 +178,8 @@ ++n; } } +#endif + dflt_interrupt_controller=NULL; num_interrupt_controllers = n; } @@ -191,6 +195,9 @@ struct device_node *child; int *ip; + if (np==NULL) { + return mem_start; + } np->name = get_property(np, "name", 0); np->type = get_property(np, "device_type", 0); @@ -936,10 +943,13 @@ { struct property *pp; + if (np!=NULL) for (pp = np->properties; pp != 0; pp = pp->next) if (pp->name != NULL && strcmp(pp->name, name) == 0) { if (lenp != 0) *lenp = pp->length; + if (!(pp->length)) + return NULL; return pp->value; } return 0; diff -uNr linux-2.4.18.orig/arch/ppc/kernel/prom_init.c linux-2.4.18-p3.cur/arch/ppc/kernel/prom_init.c --- linux-2.4.18.orig/arch/ppc/kernel/prom_init.c Tue Jan 15 15:11:16 2002 +++ linux-2.4.18-p3.cur/arch/ppc/kernel/prom_init.c Wed Jan 23 17:10:38 2002 @@ -359,6 +359,7 @@ * method is available. * Should update this to use set-colors. */ +#if 0 for (i = 0; i < 32; i++) if (prom_set_color(ih, i, default_colors[i*3], default_colors[i*3+1], @@ -373,6 +374,7 @@ linux_logo_blue[i]) != 0) break; #endif /* CONFIG_FB */ +#endif } } @@ -774,8 +776,11 @@ #endif /* Use quiesce call to get OF to shut down any devices it's using */ +/* prom_print("Calling quiesce ...\n"); call_prom("quiesce", 0, 0); +*/ +prom_print("Skipping quiesce ...\n"); #ifdef CONFIG_BOOTX_TEXT if (prom_disp_node != 0) diff -uNr linux-2.4.18.orig/arch/ppc/kernel/setup.c linux-2.4.18-p3.cur/arch/ppc/kernel/setup.c --- linux-2.4.18.orig/arch/ppc/kernel/setup.c Tue Jan 15 15:11:17 2002 +++ linux-2.4.18-p3.cur/arch/ppc/kernel/setup.c Wed Jan 23 17:10:38 2002 @@ -438,6 +438,9 @@ case _MACH_chrp: chrp_init(r3, r4, r5, r6, r7); break; + default: + chrp_init(r3, r4, r5, r6, r7); + break; } } #endif /* CONFIG_ALL_PPC */ diff -uNr linux-2.4.18.orig/arch/ppc/platforms/chrp_pci.c linux-2.4.18-p3.cur/arch/ppc/platforms/chrp_pci.c --- linux-2.4.18.orig/arch/ppc/platforms/chrp_pci.c Tue Jan 15 15:11:16 2002 +++ linux-2.4.18-p3.cur/arch/ppc/platforms/chrp_pci.c Wed Jan 23 17:10:36 2002 @@ -212,12 +212,14 @@ struct device_node *np; /* PCI interrupts are controlled by the OpenPIC */ +#if 0 pci_for_each_dev(dev) { np = pci_device_to_OF_node(dev); if ((np != 0) && (np->n_intrs > 0) && (np->intrs[0].line != 0)) dev->irq = np->intrs[0].line; pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); } +#endif } void __init @@ -300,9 +302,15 @@ gg2_pci_config_base = (unsigned long) ioremap(GG2_PCI_CONFIG_BASE, 0x80000); } else { - printk("No methods for %s (model %s), using RTAS\n", +/* printk("No methods for %s (model %s), using RTAS\n", dev->full_name, model); hose->ops = &rtas_pci_ops; +*/ + + setup_grackle(hose); + hose->cfg_addr += 0x0cf8; + hose->cfg_data += 0x0cfc; + setup_indirect_pci(hose, (u32) hose->cfg_addr, (u32) hose->cfg_data); } pci_process_bridge_OF_ranges(hose, dev, index == 0); diff -uNr linux-2.4.18.orig/arch/ppc/platforms/chrp_setup.c linux-2.4.18-p3.cur/arch/ppc/platforms/chrp_setup.c --- linux-2.4.18.orig/arch/ppc/platforms/chrp_setup.c Tue Jan 15 15:11:16 2002 +++ linux-2.4.18-p3.cur/arch/ppc/platforms/chrp_setup.c Wed Jan 23 17:10:36 2002 @@ -78,6 +78,7 @@ extern unsigned char pckbd_sysrq_xlate[128]; extern void select_adb_keyboard(void); extern int of_show_percpuinfo(struct seq_file *, int); +extern int poppic_get_irq(struct pt_regs *regs); extern kdev_t boot_dev; @@ -463,6 +464,7 @@ * -- Cort */ name = get_property(find_path_device("/"), "name", NULL); +#if 0 if (name && strncmp(name, "IBM-70", 6) == 0 && strstr(name, "-F50")) { io_block_mapping(0x80000000, 0x80000000, 0x10000000, _PAGE_IO); @@ -471,6 +473,9 @@ } else { io_block_mapping(0xf8000000, 0xf8000000, 0x04000000, _PAGE_IO); } +#endif +io_block_mapping(0x80000000, 0x80000000, 0x10000000, _PAGE_IO); +io_block_mapping(0xf8000000, 0xf8000000, 0x08000000, _PAGE_IO); } void __init @@ -496,7 +501,8 @@ ppc_md.show_cpuinfo = chrp_show_cpuinfo; ppc_md.irq_cannonicalize = chrp_irq_cannonicalize; ppc_md.init_IRQ = chrp_init_IRQ; - ppc_md.get_irq = openpic_get_irq; +/* ppc_md.get_irq = openpic_get_irq; */ + ppc_md.get_irq = poppic_get_irq; ppc_md.init = chrp_init2; diff -uNr linux-2.4.18.orig/arch/ppc/platforms/chrp_time.c linux-2.4.18-p3.cur/arch/ppc/platforms/chrp_time.c --- linux-2.4.18.orig/arch/ppc/platforms/chrp_time.c Tue Jan 15 15:11:16 2002 +++ linux-2.4.18-p3.cur/arch/ppc/platforms/chrp_time.c Wed Jan 23 17:10:36 2002 @@ -188,6 +188,8 @@ if (fp != 0) freq = *fp; } + freq = 25000000; /* POP hardcoded default + the OF value isn't better */ printk("time_init: decrementer frequency = %u.%.6u MHz\n", freq/1000000, freq%1000000); tb_ticks_per_jiffy = freq / HZ; diff -uNr linux-2.4.18.orig/init/main.c linux-2.4.18-p3.cur/init/main.c --- linux-2.4.18.orig/init/main.c Tue Jan 15 15:13:22 2002 +++ linux-2.4.18-p3.cur/init/main.c Wed Jan 23 17:11:45 2002 @@ -757,6 +757,7 @@ real_root_dev = ROOT_DEV; #endif +#if 0 #ifdef CONFIG_BLK_DEV_RAM #ifdef CONFIG_BLK_DEV_INITRD if (mount_initrd) @@ -764,6 +765,7 @@ else #endif rd_load(); +#endif #endif /* Mount the root filesystem.. */