linkb_to_host
Stefan Reinauer
stepan at openbios.org
Wed Jan 19 04:24:01 CET 2005
* YhLu <YhLu at tyan.com> [050119 02:35]:
> i wonder what the different between
> offs = ( pci_read_config16(dev, pos + PCI_CAP_FLAGS) & (1<<10)) ?
> PCI_HT_SLAVE1_OFFS : PCI_HT_SLAVE0_OFFS;
>
> and
>
> offs = ( (pci_read_config16(dev, pos + PCI_CAP_FLAGS) >> 10) & 1) ?
> PCI_HT_SLAVE1_OFFS : PCI_HT_SLAVE0_OFFS;
It won't configure the second 8131 correctly, still.
It boots fine though if I put my swap_links macro back in and call it
for the second 8131
#define swap_links(bus,dev,fn) \
do { \
unsigned reg1,reg2; \
device_t b=PCI_DEV(bus,dev,fn); \
reg1=pci_read_config32(b, 0xCC); \
reg2=pci_read_config32(b, 0xD0); \
pci_write_config32(b, 0xCC, (reg1 & 0xffff00ff)|(reg2&0x0000ff00)); \
pci_write_config32(b, 0xD0, (reg2 & 0xffff00ff)|(reg1&0x0000ff00)); \
} while(0)
Stefan
More information about the coreboot
mailing list