diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2009-06-30 15:17:49 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2009-06-30 15:17:49 +0000 |
commit | 0867062412dd4bfe5a556e5f3fd85ba5b682d79b (patch) | |
tree | 81ca5db12b8567b48daaa23a541bfb8a5dc011f8 /src/devices/hypertransport.c | |
parent | 9702b6bf7ec5a4fb16934f1cf2724480e2460c89 (diff) |
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 <stepan@coresystems.de>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4381 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices/hypertransport.c')
-rw-r--r-- | src/devices/hypertransport.c | 34 |
1 files changed, 17 insertions, 17 deletions
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 <HT_CHAIN_UNITID_BASE))))) { + if((!offset_unitid)|| (offset_unitid && (!((CONFIG_HT_CHAIN_END_UNITID_BASE == 0) && (CONFIG_HT_CHAIN_END_UNITID_BASE <CONFIG_HT_CHAIN_UNITID_BASE))))) { struct device dummy; uint32_t id; dummy.bus = bus; @@ -381,17 +381,17 @@ static void ht_collapse_early_enumeration(struct bus *bus, unsigned offset_uniti unsigned int hypertransport_scan_chain(struct bus *bus, unsigned min_devfn, unsigned max_devfn, unsigned int max, unsigned *ht_unitid_base, unsigned offset_unitid) { - //even HT_CHAIN_UNITID_BASE == 0, we still can go through this function, because of end_of_chain check, also We need it to optimize link + //even CONFIG_HT_CHAIN_UNITID_BASE == 0, we still can go through this function, because of end_of_chain check, also We need it to optimize link unsigned next_unitid, last_unitid; device_t old_devices, dev, func; - unsigned min_unitid = (offset_unitid) ? HT_CHAIN_UNITID_BASE:1; + unsigned min_unitid = (offset_unitid) ? CONFIG_HT_CHAIN_UNITID_BASE:1; struct ht_link prev; device_t last_func = 0; int ht_dev_num = 0; unsigned max_unitid; -#if HT_CHAIN_END_UNITID_BASE != 0x20 - //let't record the device of last ht device, So we can set the Unitid to HT_CHAIN_END_UNITID_BASE +#if CONFIG_HT_CHAIN_END_UNITID_BASE != 0x20 + //let't record the device of last ht device, So we can set the Unitid to CONFIG_HT_CHAIN_END_UNITID_BASE unsigned real_last_unitid; uint8_t real_last_pos; device_t real_last_dev; @@ -483,11 +483,11 @@ unsigned int hypertransport_scan_chain(struct bus *bus, flags &= ~0x1f; /* mask out base Unit ID */ count = (flags >> 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 |