linkb_to_host
authorYinghai Lu <yinghailu@gmail.com>
Wed, 19 Jan 2005 01:21:05 +0000 (01:21 +0000)
committerYinghai Lu <yinghailu@gmail.com>
Wed, 19 Jan 2005 01:21:05 +0000 (01:21 +0000)
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1885 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

src/devices/hypertransport.c
src/northbridge/amd/amdk8/incoherent_ht.c

index a75550cdae80bf309f632954f658cb4781b1b85a..411e7542c0680e82f341e82c886312f5e9a94b82 100644 (file)
@@ -71,7 +71,7 @@ static int ht_setup_link(struct prev_link *prev, device_t dev, unsigned pos)
 
        /* Set the hypertransport link width and frequency */
        reset_needed = 0;
-       linkb_to_host = pci_read_config16(dev, pos + PCI_CAP_FLAGS) & (1<<10);
+       linkb_to_host = (pci_read_config16(dev, pos + PCI_CAP_FLAGS) >> 10) & 1;
 
        /* Read the capabilities */
        present_freq_cap   = ht_read_freq_cap(dev, pos + (linkb_to_host ? PCI_HT_CAP_SLAVE_FREQ_CAP1: PCI_HT_CAP_SLAVE_FREQ_CAP0));
index e348b67286098d7514944847f5a917edf06e3865..f5cd5aa70f92fbad24be8477dd33324201a3dc45 100644 (file)
@@ -242,7 +242,7 @@ static int ht_setup_chain(device_t udev, uint8_t upos)
                }
 
                /* get ht direction */
-                offs = (pci_read_config16(dev, pos + PCI_CAP_FLAGS) & (1<<10)) ? PCI_HT_SLAVE1_OFFS : PCI_HT_SLAVE0_OFFS;
+                offs = ( (pci_read_config16(dev, pos + PCI_CAP_FLAGS) >> 10) & 1) ? PCI_HT_SLAVE1_OFFS : PCI_HT_SLAVE0_OFFS;
 
                /* Setup the Hypertransport link */
                reset_needed |= ht_optimize_link(udev, upos, uoffs, dev, pos, offs);