[LinuxBIOS] lpci_set_subsystem question

Marc Jones marc.jones at amd.com
Wed Aug 15 23:01:37 CEST 2007


I see a couple of different versions of lpci_set_subsystem function and 
I wonder why.

For example:
src\southbridge\broadcom\bcm5780\bcm5780_nic.c:
static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned 
device)
{
     pci_write_config32(dev, 0x40,
         ((device & 0xffff) << 16) | (vendor & 0xffff));
}

src\southbridge\amd\amd8111\amd8111_ide.c:
static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned 
device)
{
     pci_write_config32(dev, 0x70,
         ((device & 0xffff) << 16) | (vendor & 0xffff));
}

src\southbridge\broadcom\bcm5780\bcm5780_sb_pci_main.c:
static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned 
device)
{
         pci_write_config32(dev, 0x2c,
                 ((device & 0xffff) << 16) | (vendor & 0xffff));
}



Shouldn't the PCI config register always be 0x2c (subsystem ID register) 
like in the last example (bcm5780_sb_pci_main.c)? Should these functions 
even be there since there is a stock pci_dev_set_subsystem() that seems 
to be correct?
Am I mis-understanding this function?

Thanks,
Marc
-- 
Marc Jones
Senior Firmware Engineer
(970) 226-9684 Office
mailto:Marc.Jones at amd.com
http://www.amd.com/embeddedprocessors






More information about the coreboot mailing list