Fix MMCONF_SUPPORT_DEFAULT for ramstage

Define at one place whether to use IO 0xcf8/0xcfc or MMIO via
MMCONF_BASE_ADDRESS for PCI configuration access funtions in ramstage.

The implementation of pci_default_config() always returned with
pci_cf8_conf1. This means any PCI configuration access that did
not target bus 0 used PCI IO config operations, if PCI MMIO config
was not explicitly requested.

Change-Id: I3b04f570fe88d022cd60dde8bb98e76bd00fe612
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/3606
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Reviewed-by: Aaron Durbin <adurbin@google.com>
This commit is contained in:
Kyösti Mälkki
2013-07-03 09:44:28 +03:00
committed by Stefan Reinauer
parent 20b6d91fd3
commit 872c922296
12 changed files with 21 additions and 54 deletions

View File

@@ -7,9 +7,19 @@ extern const struct pci_bus_operations pci_cf8_conf1;
extern const struct pci_bus_operations pci_ops_mmconf;
#endif
#if CONFIG_MMCONF_SUPPORT_DEFAULT
#define pci_bus_default_ops &pci_ops_mmconf
#else
#define pci_bus_default_ops &pci_cf8_conf1
#endif
static inline const struct pci_bus_operations *pci_config_default(void)
{
#if CONFIG_MMCONF_SUPPORT_DEFAULT
return &pci_ops_mmconf;
#else
return &pci_cf8_conf1;
#endif
}
static inline void pci_set_method(device_t dev)