From 89fe2f34b48dfa053de4c82771f078a136ffff20 Mon Sep 17 00:00:00 2001 From: Michael Niewöhner Date: Sat, 23 Jan 2021 13:57:03 +0100 Subject: soc/intel/cnl: use Kconfig to determine PCH type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We already know the PCH type at build time, so there is no need to do runtime detection. Thus, use Kconfig and drop `get_pch_series()`. Change-Id: I470871af5f5954e91a8135fddf4a2297a514d740 Signed-off-by: Michael Niewöhner Reviewed-on: https://review.coreboot.org/c/coreboot/+/49874 Reviewed-by: Nico Huber Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/soc/intel/cannonlake/lpc.c | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'src/soc/intel/cannonlake/lpc.c') diff --git a/src/soc/intel/cannonlake/lpc.c b/src/soc/intel/cannonlake/lpc.c index 26bda70845..b03f21e2a2 100644 --- a/src/soc/intel/cannonlake/lpc.c +++ b/src/soc/intel/cannonlake/lpc.c @@ -37,31 +37,6 @@ void soc_setup_dmi_pcr_io_dec(uint32_t *gen_io_dec) pcr_write32(PID_DMI, PCR_DMI_LPCLGIR4, gen_io_dec[3]); } -uint8_t get_pch_series(void) -{ - uint16_t lpc_did_hi_byte; - uint8_t pch_series = PCH_UNKNOWN_SERIES; - /* - * Fetch upper 8 bits on LPC device ID to determine PCH type - * Adding 1 to the offset to fetch upper 8 bits - */ - lpc_did_hi_byte = pci_read_config8(PCH_DEV_LPC, PCI_DEVICE_ID + 1); - - switch (lpc_did_hi_byte) { - case 0x9D: /* CNL-LP */ - case 0x02: /* CML-LP */ - pch_series = PCH_LP; - break; - case 0xA3: /* CFL-H */ - case 0x06: /* CML-H */ - pch_series = PCH_H; - break; - default: - break; - } - return pch_series; -} - #if ENV_RAMSTAGE static void soc_mirror_dmi_pcr_io_dec(void) { -- cgit v1.2.3