Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/79145?usp=email )
Change subject: sb/intel/bd82x6x/pch: Add method to identify PCH ......................................................................
sb/intel/bd82x6x/pch: Add method to identify PCH
Identify PCH type by LPC device ID. This allows to identify the PCH without including northbridge headers.
Change-Id: Ic3e15c1d8d4b1d1012d6204cc65de92d91431fbe Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/southbridge/intel/bd82x6x/Makefile.inc M src/southbridge/intel/bd82x6x/pch.c M src/southbridge/intel/bd82x6x/pch.h 3 files changed, 15 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/79145/1
diff --git a/src/southbridge/intel/bd82x6x/Makefile.inc b/src/southbridge/intel/bd82x6x/Makefile.inc index 0a4cc83..eac05ab 100644 --- a/src/southbridge/intel/bd82x6x/Makefile.inc +++ b/src/southbridge/intel/bd82x6x/Makefile.inc @@ -29,6 +29,7 @@ romstage-y += me_status.c romstage-y += early_rcba.c romstage-y += early_pch.c +romstage-y += pch.c
ifeq ($(CONFIG_USE_NATIVE_RAMINIT),y) romstage-y += early_thermal.c early_me.c early_usb.c diff --git a/src/southbridge/intel/bd82x6x/pch.c b/src/southbridge/intel/bd82x6x/pch.c index a7ab83a..da7e585 100644 --- a/src/southbridge/intel/bd82x6x/pch.c +++ b/src/southbridge/intel/bd82x6x/pch.c @@ -4,10 +4,10 @@ #include <delay.h> #include <device/device.h> #include <device/pci.h> +#include <device/pci_def.h> #include <device/pci_ops.h> #include <string.h> #include <timer.h> - #include "chip.h" #include "pch.h"
@@ -41,6 +41,18 @@ return pch_type; }
+bool pch_is_mobile(void) +{ + const u16 devid = pci_s_read_config16(PCH_LPC_DEV, PCI_DEVICE_ID); + const u16 devids[] = {0x1C43, 0x1C47, 0x1C49, 0x1C4B, 0x1C4F, 0x1C41, + 0x1C4D, 0x1E42, 0x1E55, 0x1E5D, 0x1E57, 0x1E58, + 0x1E59, 0x1E43, 0x1E56}; + for (size_t i = 0; i < ARRAY_SIZE(devids); i++) + if (devid == devids[i]) + return 1; + return 0; +} + static int pch_silicon_supported(int type, int rev) { int cur_type = pch_silicon_type(); diff --git a/src/southbridge/intel/bd82x6x/pch.h b/src/southbridge/intel/bd82x6x/pch.h index 6d164ea..bfd0d73 100644 --- a/src/southbridge/intel/bd82x6x/pch.h +++ b/src/southbridge/intel/bd82x6x/pch.h @@ -34,6 +34,7 @@
int pch_silicon_revision(void); int pch_silicon_type(void); +bool pch_is_mobile(void); void pch_iobp_update(u32 address, u32 andvalue, u32 orvalue);
void enable_usb_bar(void);