[PATCH] advertise correct IDE mode on Pegasos2
Olaf Hering
olaf at aepfle.de
Sat Aug 18 00:33:11 EST 2007
On Fri, Aug 17, Olaf Hering wrote:
Still not 100% perfect.
> + prom_printf("Fixing up IDE class-code on Pegasos...\n");
> + rc = prom_getprop(ph, "class-code", prop, sizeof(u32));
> + if (rc == sizeof(u32)) {
> + prop[0] &= ~0x5;
> + prom_setprop(ph, name, "class-code", prop, sizeof(u32));
> + }
This updates the class code in the device-tree, but sysfs still shows
the old value.
> + pci_read_config_byte(viaide, PCI_CLASS_PROG, &progif);
> + pci_write_config_byte(viaide, PCI_CLASS_PROG, progif & ~0x5);
Is this a readonly register by any chance?
Appending a 'viaide->class &= ~0x5;' changes the code paths in
do_ide_setup_pci_device(), now IDE prints 'not 100%% native mode,
will probe irqs later'. Where are the irqs supposed to come from?
> -#ifdef CONFIG_PPC_CHRP
> - if(machine_is(chrp) && _chrp_type == _CHRP_Pegasos) {
> - hwif->irq = hwif->channel ? 15 : 14;
> - }
> -#endif
Maybe we should just leave this in and dont bother about the arch
specific tweak?
More information about the Linuxppc-dev
mailing list