--- zzzz-none-000/linux-2.6.39.4/drivers/pci/probe.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/drivers/pci/probe.c 2021-11-10 13:23:10.000000000 +0000 @@ -163,15 +163,18 @@ struct resource *res, unsigned int pos) { u32 l, sz, mask; - u16 orig_cmd; - mask = type ? PCI_ROM_ADDRESS_MASK : ~0; +#ifndef CONFIG_ARCH_GEN3 + u16 orig_cmd; if (!dev->mmio_always_on) { pci_read_config_word(dev, PCI_COMMAND, &orig_cmd); pci_write_config_word(dev, PCI_COMMAND, orig_cmd & ~(PCI_COMMAND_MEMORY | PCI_COMMAND_IO)); } +#endif + + mask = type ? PCI_ROM_ADDRESS_MASK : ~0; res->name = pci_name(dev); @@ -180,9 +183,10 @@ pci_read_config_dword(dev, pos, &sz); pci_write_config_dword(dev, pos, l); +#ifndef CONFIG_ARCH_GEN3 if (!dev->mmio_always_on) pci_write_config_word(dev, PCI_COMMAND, orig_cmd); - +#endif /* * All bits set in sz means the device isn't working properly. * If the BAR isn't implemented, all bits must be 0. If it's a