From 30670121c32a7e99c24271216c6f9450d14e7d90 Mon Sep 17 00:00:00 2001 From: Philipp Deppenwiese Date: Wed, 1 Mar 2017 02:24:33 +0100 Subject: amd/pi: Add AMD fam16h TPM ACPI path support Change-Id: I5322d731a0dc655f2da14b87fa6cbc1e54b5abd5 Signed-off-by: Philipp Deppenwiese Reviewed-on: https://review.coreboot.org/18522 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/southbridge/amd/pi/hudson/lpc.c | 13 +++++++++++++ src/southbridge/amd/pi/hudson/pci_devs.h | 1 + 2 files changed, 14 insertions(+) (limited to 'src/southbridge/amd/pi/hudson') diff --git a/src/southbridge/amd/pi/hudson/lpc.c b/src/southbridge/amd/pi/hudson/lpc.c index c18a5590fa..7a3914a9bd 100644 --- a/src/southbridge/amd/pi/hudson/lpc.c +++ b/src/southbridge/amd/pi/hudson/lpc.c @@ -30,6 +30,7 @@ #include #include "hudson.h" #include +#include "pci_devs.h" static void lpc_init(device_t dev) { @@ -338,6 +339,17 @@ unsigned long acpi_fill_mcfg(unsigned long current) return current; } +static const char *lpc_acpi_name(struct device *dev) +{ + if (dev->path.type != DEVICE_PATH_PCI) + return NULL; + + if (dev->path.pci.devfn == LPC_DEVFN) + return "LIBR"; + + return NULL; +} + static struct pci_operations lops_pci = { .set_subsystem = pci_dev_set_subsystem, }; @@ -352,6 +364,7 @@ static struct device_operations lpc_ops = { .init = lpc_init, .scan_bus = scan_lpc_bus, .ops_pci = &lops_pci, + .acpi_name = lpc_acpi_name, }; static const unsigned short pci_device_ids[] = { diff --git a/src/southbridge/amd/pi/hudson/pci_devs.h b/src/southbridge/amd/pi/hudson/pci_devs.h index 76480e51ee..7d4dea2938 100644 --- a/src/southbridge/amd/pi/hudson/pci_devs.h +++ b/src/southbridge/amd/pi/hudson/pci_devs.h @@ -86,6 +86,7 @@ /* LPC BUS */ #define PCU_DEV 0x14 +#define LPC_DEV PCU_DEV #define LPC_FUNC 3 #define LPC_DEVID 0x780E #define LPC_DEVFN PCI_DEVFN(LPC_DEV,LPC_FUNC) -- cgit v1.2.3