Author: oxygene Date: Thu Feb 3 10:29:57 2011 New Revision: 6330 URL: https://tracker.coreboot.org/trac/coreboot/changeset/6330
Log: Fix subvendor/subdevice programming on RS690
Some RS690 devices require subvendor/subdevice IDs to be programmed at locations other than default 0x2c.
Signed-off-by: Josef Kellermann seppk@arcor.de Acked-by: Patrick Georgi patrick.georgi@secunet.com
Modified: trunk/src/southbridge/amd/rs690/gfx.c trunk/src/southbridge/amd/rs690/ht.c
Modified: trunk/src/southbridge/amd/rs690/gfx.c ============================================================================== --- trunk/src/southbridge/amd/rs690/gfx.c Thu Feb 3 10:14:40 2011 (r6329) +++ trunk/src/southbridge/amd/rs690/gfx.c Thu Feb 3 10:29:57 2011 (r6330) @@ -193,8 +193,13 @@ /* TODO: the optimization of voltage and frequency */ }
+static void gfx_dev_set_subsystem(struct device *dev, unsigned vendor, unsigned device) +{ + pci_write_config32(dev, 0x4c, ((device & 0xffff) << 16) | (vendor & 0xffff)); +} + static struct pci_operations lops_pci = { - .set_subsystem = pci_dev_set_subsystem, + .set_subsystem = gfx_dev_set_subsystem, };
static struct device_operations pcie_ops = {
Modified: trunk/src/southbridge/amd/rs690/ht.c ============================================================================== --- trunk/src/southbridge/amd/rs690/ht.c Thu Feb 3 10:14:40 2011 (r6329) +++ trunk/src/southbridge/amd/rs690/ht.c Thu Feb 3 10:29:57 2011 (r6330) @@ -70,8 +70,13 @@ pci_write_config32(dev, 0x4C, dword); }
+static void ht_dev_set_subsystem(struct device *dev, unsigned vendor, unsigned device) +{ + pci_write_config32(dev, 0x50, ((device & 0xffff) << 16) | (vendor & 0xffff)); +} + static struct pci_operations lops_pci = { - .set_subsystem = pci_dev_set_subsystem, + .set_subsystem = ht_dev_set_subsystem, };
static struct device_operations ht_ops = {