From 0867062412dd4bfe5a556e5f3fd85ba5b682d79b Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 30 Jun 2009 15:17:49 +0000 Subject: This patch unifies the use of config options in v2 to all start with CONFIG_ It's basically done with the following script and some manual fixup: VARS=`grep ^define src/config/Options.lb | cut -f2 -d\ | grep -v ^CONFIG | grep -v ^COREBOOT |grep -v ^CC` for VAR in $VARS; do find . -name .svn -prune -o -type f -exec perl -pi -e "s/(^|[^0-9a-zA-Z_]+)$VAR($|[^0-9a-zA-Z_]+)/\1CONFIG_$VAR\2/g" {} \; done Signed-off-by: Stefan Reinauer Acked-by: Ronald G. Minnich git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4381 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/devices/device_util.c | 6 +++--- src/devices/hypertransport.c | 34 +++++++++++++++++----------------- src/devices/pci_device.c | 10 +++++----- src/devices/pci_ops.c | 2 +- 4 files changed, 26 insertions(+), 26 deletions(-) (limited to 'src/devices') diff --git a/src/devices/device_util.c b/src/devices/device_util.c index aa23a2b34c..c5a2f6406f 100644 --- a/src/devices/device_util.c +++ b/src/devices/device_util.c @@ -163,7 +163,7 @@ const char *dev_path(device_t dev) memcpy(buffer, "Root Device", 12); break; case DEVICE_PATH_PCI: -#if PCI_BUS_SEGN_BITS +#if CONFIG_PCI_BUS_SEGN_BITS sprintf(buffer, "PCI: %04x:%02x:%02x.%01x", dev->bus->secondary>>8, dev->bus->secondary & 0xff, PCI_SLOT(dev->path.pci.devfn), PCI_FUNC(dev->path.pci.devfn)); @@ -461,7 +461,7 @@ void report_resource_stored(device_t dev, struct resource *resource, const char end = resource_end(resource); buf[0] = '\0'; if (resource->flags & IORESOURCE_PCI_BRIDGE) { -#if PCI_BUS_SEGN_BITS +#if CONFIG_PCI_BUS_SEGN_BITS sprintf(buf, "bus %04x:%02x ", dev->bus->secondary>>8, dev->link[0].secondary & 0xff); #else sprintf(buf, "bus %02x ", dev->link[0].secondary); @@ -662,7 +662,7 @@ void show_one_resource(int debug_level, struct device *dev, buf[0] = '\0'; /* if (resource->flags & IORESOURCE_BRIDGE) { -#if PCI_BUS_SEGN_BITS +#if CONFIG_PCI_BUS_SEGN_BITS sprintf(buf, "bus %04x:%02x ", dev->bus->secondary >> 8, dev->link[0].secondary & 0xff); #else diff --git a/src/devices/hypertransport.c b/src/devices/hypertransport.c index 81706166aa..5fb35ce88f 100644 --- a/src/devices/hypertransport.c +++ b/src/devices/hypertransport.c @@ -103,8 +103,8 @@ static unsigned ht_read_freq_cap(device_t dev, unsigned pos) } /* AMD K8 Unsupported 1Ghz? */ if ((dev->vendor == PCI_VENDOR_ID_AMD) && (dev->device == 0x1100)) { -#if K8_HT_FREQ_1G_SUPPORT == 1 - #if K8_REV_F_SUPPORT == 0 +#if CONFIG_K8_HT_FREQ_1G_SUPPORT == 1 + #if CONFIG_K8_REV_F_SUPPORT == 0 if (is_cpu_pre_e0()) { // only e0 later suupport 1GHz HT freq_cap &= ~(1 << HT_FREQ_1000Mhz); } @@ -326,14 +326,14 @@ static void ht_collapse_early_enumeration(struct bus *bus, unsigned offset_uniti } while((ctrl & (1 << 5)) == 0); //actually, only for one HT device HT chain, and unitid is 0 -#if HT_CHAIN_UNITID_BASE == 0 +#if CONFIG_HT_CHAIN_UNITID_BASE == 0 if(offset_unitid) { return; } #endif /* Check if is already collapsed */ - if((!offset_unitid)|| (offset_unitid && (!((HT_CHAIN_END_UNITID_BASE == 0) && (HT_CHAIN_END_UNITID_BASE > 5) & 0x1f; /* get unit count */ -#if HT_CHAIN_END_UNITID_BASE != 0x20 +#if CONFIG_HT_CHAIN_END_UNITID_BASE != 0x20 if(offset_unitid) { if(next_unitid > (max_devfn>>3)) { // max_devfn will be (0x17<<3)|7 or (0x1f<<3)|7 if(!end_used) { - next_unitid = HT_CHAIN_END_UNITID_BASE; + next_unitid = CONFIG_HT_CHAIN_END_UNITID_BASE; end_used = 1; } else { goto end_of_chain; @@ -519,7 +519,7 @@ unsigned int hypertransport_scan_chain(struct bus *bus, ht_unitid_base[ht_dev_num] = next_unitid; ht_dev_num++; -#if HT_CHAIN_END_UNITID_BASE != 0x20 +#if CONFIG_HT_CHAIN_END_UNITID_BASE != 0x20 if (offset_unitid) { real_last_pos = pos; real_last_unitid = next_unitid; @@ -550,25 +550,25 @@ unsigned int hypertransport_scan_chain(struct bus *bus, } #endif -#if HT_CHAIN_END_UNITID_BASE != 0x20 - if(offset_unitid && (ht_dev_num>1) && (real_last_unitid != HT_CHAIN_END_UNITID_BASE) && !end_used) { +#if CONFIG_HT_CHAIN_END_UNITID_BASE != 0x20 + if(offset_unitid && (ht_dev_num>1) && (real_last_unitid != CONFIG_HT_CHAIN_END_UNITID_BASE) && !end_used) { uint16_t flags; int i; device_t last_func = 0; flags = pci_read_config16(real_last_dev, real_last_pos + PCI_CAP_FLAGS); flags &= ~0x1f; - flags |= HT_CHAIN_END_UNITID_BASE & 0x1f; + flags |= CONFIG_HT_CHAIN_END_UNITID_BASE & 0x1f; pci_write_config16(real_last_dev, real_last_pos + PCI_CAP_FLAGS, flags); for(func = real_last_dev; func; func = func->sibling) { - func->path.pci.devfn -= ((real_last_unitid - HT_CHAIN_END_UNITID_BASE) << 3); + func->path.pci.devfn -= ((real_last_unitid - CONFIG_HT_CHAIN_END_UNITID_BASE) << 3); last_func = func; } - ht_unitid_base[ht_dev_num-1] = HT_CHAIN_END_UNITID_BASE; // update last one + ht_unitid_base[ht_dev_num-1] = CONFIG_HT_CHAIN_END_UNITID_BASE; // update last one printk_debug(" unitid: %04x --> %04x\n", - real_last_unitid, HT_CHAIN_END_UNITID_BASE); + real_last_unitid, CONFIG_HT_CHAIN_END_UNITID_BASE); } #endif diff --git a/src/devices/pci_device.c b/src/devices/pci_device.c index 322463466d..2531bfdd5c 100644 --- a/src/devices/pci_device.c +++ b/src/devices/pci_device.c @@ -598,11 +598,11 @@ void pci_dev_enable_resources(struct device *dev) if (dev->on_mainboard && ops && ops->set_subsystem) { printk_debug("%s subsystem <- %02x/%02x\n", dev_path(dev), - MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID, - MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID); + CONFIG_MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID, + CONFIG_MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID); ops->set_subsystem(dev, - MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID, - MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID); + CONFIG_MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID, + CONFIG_MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID); } command = pci_read_config16(dev, PCI_COMMAND); command |= dev->command; @@ -1034,7 +1034,7 @@ unsigned int pci_scan_bus(struct bus *bus, device_t old_devices; device_t child; -#if PCI_BUS_SEGN_BITS +#if CONFIG_PCI_BUS_SEGN_BITS printk_debug("PCI: pci_scan_bus for bus %04x:%02x\n", bus->secondary >> 8, bus->secondary & 0xff); #else printk_debug("PCI: pci_scan_bus for bus %02x\n", bus->secondary); diff --git a/src/devices/pci_ops.c b/src/devices/pci_ops.c index ed984f89bd..ed07564f61 100644 --- a/src/devices/pci_ops.c +++ b/src/devices/pci_ops.c @@ -86,7 +86,7 @@ void pci_write_config32(device_t dev, unsigned where, uint32_t val) ops_pci_bus(pbus)->write32(pbus, dev->bus->secondary, dev->path.pci.devfn, where, val); } -#if MMCONF_SUPPORT +#if CONFIG_MMCONF_SUPPORT uint8_t pci_mmio_read_config8(device_t dev, unsigned where) { struct bus *pbus = get_pbus(dev); -- cgit v1.2.3