Subject: How to correctly reassign PCI BARs

From: "Gerhard Pircher" <[email-masked]>
Date: Tue, 07 Jul 2009 23:25:14 +0200

Hi,

I'm trying to implement some PCI quirks for the AmigaOne, as the
firmware puts PCI devices with 16 bit BARs too high in the PCI I/O
space (above 64k). Currently I'm just writing new values to the BARs
before the PCI layer actually probes and allocates them:

static void quirk_vt82c686_sound_iobases(struct pci_dev *dev)
{
	if (!machine_is(amigaone))
		return;

	pci_write_config_dword(dev, 0x10, 0x0000dc00);
	pci_write_config_dword(dev, 0x14, 0x0000e000);
	pci_write_config_dword(dev, 0x18, 0x00000330);
}
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_vt82c686_sound_iobases);

I wonder, if there is a better way to reassign PCI resources. Using
ppc_pci_set_flags(PPC_PCI_REASSIGN_ALL_RSRC) seems to be an alternative,
but it also relocates the BARs of the IDE controller, which operates
in compatible mode (I would like to keep it in this mode).
Is there a way to take out some PCI devices from the reassignment?

Gerhard

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01