Author: stuge Date: Sun May 23 06:50:41 2010 New Revision: 5581 URL: https://tracker.coreboot.org/trac/coreboot/changeset/5581
Log: Fix bug from r5476 re CS5536 device search during GeodeLX PCI domain enable
cs5536.c:chipsetinit() is called during northbridge pci_domain_enable() which happens before scan_bus() so the device tree does not have PCI vendor/device ids yet. Let's use dev_find_slot() for now. This works only as long as the CS5536 has PCI device id 0xf in all mainboards, and a better solution is needed in case that ever changes!
Signed-off-by: Peter Stuge peter@stuge.se Acked-by: Nathan Williams nathan@traverse.com.au
Modified: trunk/src/southbridge/amd/cs5536/cs5536.c
Modified: trunk/src/southbridge/amd/cs5536/cs5536.c ============================================================================== --- trunk/src/southbridge/amd/cs5536/cs5536.c Sat May 22 17:07:15 2010 (r5580) +++ trunk/src/southbridge/amd/cs5536/cs5536.c Sun May 23 06:50:41 2010 (r5581) @@ -530,8 +530,7 @@ struct southbridge_amd_cs5536_config *sb; struct msrinit *csi;
- dev = dev_find_device(PCI_VENDOR_ID_AMD, - PCI_DEVICE_ID_AMD_CS5536_ISA, 0); + dev = dev_find_slot(0, PCI_DEVFN(0xf, 0));
if (!dev) { printk(BIOS_ERR, "CS5536 not found.\n");
-----Original Message----- From: coreboot-bounces@coreboot.org [mailto:coreboot-bounces@coreboot.org] On Behalf Of repository service Sent: Saturday, May 22, 2010 10:51 PM To: coreboot@coreboot.org Subject: [coreboot] [commit] r5581 - trunk/src/southbridge/amd/cs5536
Author: stuge Date: Sun May 23 06:50:41 2010 New Revision: 5581 URL: https://tracker.coreboot.org/trac/coreboot/changeset/5581
Log: Fix bug from r5476 re CS5536 device search during GeodeLX PCI domain enable
cs5536.c:chipsetinit() is called during northbridge pci_domain_enable() which happens before scan_bus() so the device tree does not have PCI vendor/device ids yet. Let's use dev_find_slot() for now. This works only as long as the CS5536 has PCI device id 0xf in all mainboards, and a better solution is needed in case that ever changes!
It seems like you could check the device ID of 0xf once you get it, so that someone with a board like that would know why it's failing.
- dev = dev_find_device(PCI_VENDOR_ID_AMD,
PCI_DEVICE_ID_AMD_CS5536_ISA, 0);
- dev = dev_find_slot(0, PCI_DEVFN(0xf, 0));
if (pci_read_32(PCI_DEV(0,0xf,0), PCI_VENDOR_ID != ((PCI_DEVICE_ID_AMD_CS5536_ISA << 16) | (PCI_VENDOR_ID_AMD))) { printk(BIOS_ERR, "CS5536 not at 0xf.\n"); ...
Thanks, Myles