From 30c34c07510887121c0f828e724eb04ee36cfddf Mon Sep 17 00:00:00 2001 From: "Jonathan A. Kollasch" Date: Sun, 25 Jan 2015 12:57:43 -0600 Subject: [PATCH] nvidia/ck804: make Message Signaled Interrupts work Use HT MSI Mapping capability register at 0xe0 in CK804 HT device to enable HT MSI Mapping so that MSIs work. Prior to this change PCIe devices downstream of the CK804 with MSI enabled would fail to actually assert their interrupt. Tested on msi/ms7135 and winent/mb6047 running Debian GNU/Linux 7.0 (wheezy). Change-Id: I5e0dc8b352f3d04e3b16b899af11d2b908a82850 Signed-off-by: Jonathan A. Kollasch Reviewed-on: http://review.coreboot.org/8276 Tested-by: build bot (Jenkins) Reviewed-by: Timothy Pearson Reviewed-by: Alexandru Gagniuc --- src/southbridge/nvidia/ck804/ht.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/southbridge/nvidia/ck804/ht.c b/src/southbridge/nvidia/ck804/ht.c index 41e29989bb..f5ea2498c7 100644 --- a/src/southbridge/nvidia/ck804/ht.c +++ b/src/southbridge/nvidia/ck804/ht.c @@ -52,11 +52,21 @@ unsigned long acpi_fill_mcfg(unsigned long current) #endif +static void ht_init(struct device *dev) +{ + u32 htmsi; + + /* Enable HT MSI Mapping in capability register */ + htmsi = pci_read_config32(dev, 0xe0); + htmsi |= (1 << 16); + pci_write_config32(dev, 0xe0, htmsi); +} + static struct device_operations ht_ops = { .read_resources = pci_dev_read_resources, .set_resources = pci_dev_set_resources, .enable_resources = pci_dev_enable_resources, - .init = 0, + .init = ht_init, .scan_bus = 0, .ops_pci = &ck804_pci_ops, };