diff -ur 2422.ppc/arch/ppc/kernel/prom_init.c 2422.pegasos-20030901/arch/ppc/kernel/prom_init.c --- 2422.ppc/arch/ppc/kernel/prom_init.c 2003-08-26 15:15:41.000000000 +0200 +++ 2422.pegasos-20030901/arch/ppc/kernel/prom_init.c 2003-08-27 11:47:44.000000000 +0200 @@ -699,6 +699,9 @@ char *p, *d; unsigned long phys; void *result[3]; + char model[32]; + phandle node; + int rc; /* Default */ phys = (unsigned long) &_stext; @@ -783,6 +786,10 @@ prom_print("from prom_init\n"); prom_stdout = 0; + node = call_prom("finddevice", 1, 1, "/"); + rc = call_prom("getprop", 4, 1, node, "model",model, sizeof(model)); + if (rc > 0 && !strncmp(model, "Pegasos", 7)) phys = 0x00010000; + return phys; } diff -ur 2422.ppc/arch/ppc/platforms/chrp_pci.c 2422.pegasos-20030901/arch/ppc/platforms/chrp_pci.c --- 2422.ppc/arch/ppc/platforms/chrp_pci.c 2003-08-26 15:17:25.000000000 +0200 +++ 2422.pegasos-20030901/arch/ppc/platforms/chrp_pci.c 2003-08-26 17:47:28.000000000 +0200 @@ -291,7 +291,7 @@ struct pci_controller *hose; unsigned int *dma; char *model, *machine; - int is_longtrail = 0, is_mot = 0; + int is_longtrail = 0, is_mot = 0, is_pegasos = 0; struct device_node *root = find_path_device("/"); /* @@ -303,6 +303,7 @@ if (machine != NULL) { is_longtrail = strncmp(machine, "IBM,LongTrail", 13) == 0; is_mot = strncmp(machine, "MOT", 3) == 0; + is_pegasos = strncmp(machine, "Pegasos", 7) == 0; } for (dev = root->child; dev != NULL; dev = dev->sibling) { if (dev->type == NULL || strcmp(dev->type, "pci") != 0) @@ -365,6 +366,8 @@ pci_dram_offset = *dma; } } + } else if (is_pegasos) { + setup_indirect_pci(hose, 0xfec00cf8, 0xfee00cfc); } else { printk("No methods for %s (model %s), using RTAS\n", dev->full_name, model); @@ -387,6 +390,8 @@ ppc_md.pcibios_fixup = longtrail_pcibios_fixup; else if (chrp_is_briq) ppc_md.pcibios_fixup = briq_pcibios_fixup; + else if (is_pegasos) + ppc_md.pcibios_fixup = NULL; else ppc_md.pcibios_fixup = chrp_pcibios_fixup; } diff -ur 2422.ppc/arch/ppc/platforms/chrp_setup.c 2422.pegasos-20030901/arch/ppc/platforms/chrp_setup.c --- 2422.ppc/arch/ppc/platforms/chrp_setup.c 2003-08-26 15:18:13.000000000 +0200 +++ 2422.pegasos-20030901/arch/ppc/platforms/chrp_setup.c 2003-08-26 17:47:28.000000000 +0200 @@ -440,8 +440,28 @@ i8259_init(intack); } +static void __init +pegasos_init_irq_8259(unsigned long intack) +{ + int i; + + ppc_md.get_irq = i8259_irq; + for (i = 0; i < NUM_8259_INTERRUPTS; i++) { + if (i<16) { + /* byte access */ + unsigned int port = 0x4d0 + (i >> 3); + /* ask HW directly */ + irq_desc[i].status |= (((inb(port) >> (i & 7)) & 1) ? IRQ_LEVEL : 0 ); + } + irq_desc[i].handler = &i8259_pic; + } + i8259_init(intack); +} + void __init chrp_init_IRQ(void) { + struct device_node *root = find_path_device("/"); + char *machine; struct device_node *np; unsigned long intack = 0; struct device_node *main_irq_ctrler = NULL; @@ -471,6 +491,10 @@ main_irq_ctrler = find_phandle(*irq_ctrler_ph); } + machine = get_property(root, "model", NULL); + if (main_irq_ctrler == NULL && (strncmp(machine, "Pegasos", 7) == 0)) + pegasos_init_irq_8259(intack); + else if (main_irq_ctrler && device_is_compatible(main_irq_ctrler, "8259")) chrp_init_irq_8259(intack); else @@ -570,7 +594,10 @@ 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; + if (strncmp(machine, "Pegasos", 7) == 0) + ppc_md.get_irq = i8259_irq; + else + ppc_md.get_irq = openpic_get_irq; ppc_md.init = chrp_init2; diff -ur 2422.ppc/drivers/ide/pci/via82cxxx.c 2422.pegasos-20030901/drivers/ide/pci/via82cxxx.c --- 2422.ppc/drivers/ide/pci/via82cxxx.c 2003-08-26 15:16:28.000000000 +0200 +++ 2422.pegasos-20030901/drivers/ide/pci/via82cxxx.c 2003-08-26 17:47:28.000000000 +0200 @@ -90,6 +90,7 @@ { "vt82c586b", PCI_DEVICE_ID_VIA_82C586_0, 0x30, 0x3f, VIA_UDMA_33 | VIA_SET_FIFO }, { "vt82c586a", PCI_DEVICE_ID_VIA_82C586_0, 0x20, 0x2f, VIA_UDMA_33 | VIA_SET_FIFO }, { "vt82c586", PCI_DEVICE_ID_VIA_82C586_0, 0x00, 0x0f, VIA_UDMA_NONE | VIA_SET_FIFO }, + { "vt82c586c", PCI_DEVICE_ID_VIA_82C586_1, 0x00, 0xff, VIA_UDMA_33 | VIA_SET_FIFO }, { "vt82c576", PCI_DEVICE_ID_VIA_82C576, 0x00, 0x2f, VIA_UDMA_NONE | VIA_SET_FIFO | VIA_NO_UNMASK }, { "vt82c576", PCI_DEVICE_ID_VIA_82C576, 0x00, 0x2f, VIA_UDMA_NONE | VIA_SET_FIFO | VIA_NO_UNMASK | VIA_BAD_ID }, { NULL } @@ -588,6 +589,8 @@ hwif->tuneproc = &via82cxxx_tune_drive; hwif->speedproc = &via_set_drive; + hwif->irq = hwif->channel ? 15 : 14; + for (i = 0; i < 2; i++) { hwif->drives[i].io_32bit = 1; hwif->drives[i].unmask = (via_config->flags & VIA_NO_UNMASK) ? 0 : 1; diff -ur 2422.ppc/drivers/net/via-rhine.c 2422.pegasos-20030901/drivers/net/via-rhine.c --- 2422.ppc/drivers/net/via-rhine.c 2003-08-26 15:18:07.000000000 +0200 +++ 2422.pegasos-20030901/drivers/net/via-rhine.c 2003-08-26 15:54:08.000000000 +0200 @@ -739,7 +739,7 @@ if (!is_valid_ether_addr(dev->dev_addr)) { printk(KERN_ERR "Invalid MAC address for card #%d\n", card_idx); - goto err_out_unmap; + /*goto err_out_unmap;*/ } if (chip_id == VT6102) { diff -ur 2422.ppc/drivers/video/tdfxfb.c 2422.pegasos-20030901/drivers/video/tdfxfb.c --- 2422.ppc/drivers/video/tdfxfb.c 2003-08-26 15:17:56.000000000 +0200 +++ 2422.pegasos-20030901/drivers/video/tdfxfb.c 2003-09-02 12:54:05.000000000 +0200 @@ -764,7 +764,11 @@ tdfx_outl(SRCXY, 0); tdfx_outl(DSTXY, xx | (yy << 16)); tdfx_outl(COMMAND_2D, COMMAND_2D_H2S_BITBLT | (ROP_COPY << 24)); +#if defined(__BIG_ENDIAN) + tdfx_outl(SRCFORMAT, 0x500000); +#else tdfx_outl(SRCFORMAT, 0x400000); +#endif tdfx_outl(DSTFORMAT, fmt); tdfx_outl(DSTSIZE, fontwidth(p) | (fontheight(p) << 16)); i=fontheight(p); @@ -822,7 +826,11 @@ tdfx_outl(COMMAND_3D, COMMAND_3D_NOP); tdfx_outl(COLORFORE, fgx); tdfx_outl(COLORBACK, bgx); +#if defined(__BIG_ENDIAN) + tdfx_outl(SRCFORMAT, 0x500000); +#else tdfx_outl(SRCFORMAT, 0x400000); +#endif tdfx_outl(DSTFORMAT, fmt); tdfx_outl(DSTSIZE, w | (h << 16)); tdfx_outl(SRCXY, 0); @@ -2365,9 +2373,7 @@ tdfxfb_createcursorshape(p); xline = ~((1 << (32 - fb_info.cursor.w)) - 1); -#ifdef __LITTLE_ENDIAN xline = swab32(xline); -#endif cursorbase=(u8*)fb_info.bufbase_virt; h=fb_info.cursor.cursorimage;