aboutsummaryrefslogtreecommitdiff
path: root/src/devices/pci_device.c
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2012-11-29 16:28:21 -0800
committerRonald G. Minnich <rminnich@gmail.com>2012-11-30 19:02:58 +0100
commit78a1667cbc0a26c09079c81aa7b8f4387c5f3774 (patch)
tree4af041c0cae57bd09eb6d03906a282fc440a2992 /src/devices/pci_device.c
parent3665ace13de68e798de31499197cc600d2426967 (diff)
Create a a new configuration variable for PCI
Not all architectures have PCI. This new config variable allows control of whether PCI support is configued in. It is selected for ARCH_X86. Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Change-Id: Ic5fe777b14fd6a16ba605ada1e22acf3e8a2c783 Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: http://review.coreboot.org/1947 Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/devices/pci_device.c')
-rw-r--r--src/devices/pci_device.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/devices/pci_device.c b/src/devices/pci_device.c
index d9e6b27738..ff334fee0e 100644
--- a/src/devices/pci_device.c
+++ b/src/devices/pci_device.c
@@ -756,11 +756,10 @@ struct device_operations default_pci_ops_bus = {
*/
static struct device_operations *get_pci_bridge_ops(device_t dev)
{
- unsigned int pos;
-
#if CONFIG_PCIX_PLUGIN_SUPPORT
- pos = pci_find_capability(dev, PCI_CAP_ID_PCIX);
- if (pos) {
+ unsigned int pcixpos;
+ pcixpos = pci_find_capability(dev, PCI_CAP_ID_PCIX);
+ if (pcixpos) {
printk(BIOS_DEBUG, "%s subordinate bus PCI-X\n", dev_path(dev));
return &default_pcix_ops_bus;
}
@@ -769,10 +768,10 @@ static struct device_operations *get_pci_bridge_ops(device_t dev)
/* How do I detect a PCI to AGP bridge? */
#endif
#if CONFIG_HYPERTRANSPORT_PLUGIN_SUPPORT
- pos = 0;
- while ((pos = pci_find_next_capability(dev, PCI_CAP_ID_HT, pos))) {
+ unsigned int htpos = 0;
+ while ((htpos = pci_find_next_capability(dev, PCI_CAP_ID_HT, htpos))) {
u16 flags;
- flags = pci_read_config16(dev, pos + PCI_CAP_FLAGS);
+ flags = pci_read_config16(dev, htpos + PCI_CAP_FLAGS);
if ((flags >> 13) == 1) {
/* Host or Secondary Interface */
printk(BIOS_DEBUG, "%s subordinate bus HT\n",
@@ -782,10 +781,11 @@ static struct device_operations *get_pci_bridge_ops(device_t dev)
}
#endif
#if CONFIG_PCIEXP_PLUGIN_SUPPORT
- pos = pci_find_capability(dev, PCI_CAP_ID_PCIE);
- if (pos) {
+ unsigned int pciexpos;
+ pciexpos = pci_find_capability(dev, PCI_CAP_ID_PCIE);
+ if (pciexpos) {
u16 flags;
- flags = pci_read_config16(dev, pos + PCI_EXP_FLAGS);
+ flags = pci_read_config16(dev, pciexpos + PCI_EXP_FLAGS);
switch ((flags & PCI_EXP_FLAGS_TYPE) >> 4) {
case PCI_EXP_TYPE_ROOT_PORT:
case PCI_EXP_TYPE_UPSTREAM: