From a0b92b019f3a8712b8ffdc56a771d03def1fc08d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Thu, 18 Jun 2020 23:04:33 +0300 Subject: soc/amd/common: Drop ACPIMMIO bank for SMBus device PCI config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The PCI config space of the SMBus device has a secondary mapping as an ACPIMMIO bank. Since the PCI device is on bus 0, it's already available early in boot after the enable_pci_mmconf call, so there's no need to use the ACPIMMIO mapping instead of the PCI config space mapping. Verstage on PSP could theoretically access the PCI config space via the 0xcf8/0xcfc register pair, but since verstage on PSP doesn't have the ACPIMMIO mapping anyway, we won't loose any functionality here. Change-Id: I5c8ce8de0a6ab0ed41e7e8a5980d0f0510aaa993 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/42685 Tested-by: build bot (Jenkins) Reviewed-by: Karthik Ramasubramanian --- src/soc/amd/common/block/acpimmio/mmio_util.c | 1 - .../amd/common/block/include/amdblocks/acpimmio.h | 31 ---------------------- 2 files changed, 32 deletions(-) diff --git a/src/soc/amd/common/block/acpimmio/mmio_util.c b/src/soc/amd/common/block/acpimmio/mmio_util.c index 2b8304c1ae..efe3683b81 100644 --- a/src/soc/amd/common/block/acpimmio/mmio_util.c +++ b/src/soc/amd/common/block/acpimmio/mmio_util.c @@ -21,7 +21,6 @@ DECLARE_ACPIMMIO(acpimmio_gpio0, GPIO0); DECLARE_ACPIMMIO(acpimmio_misc, MISC); #if ENV_X86 -DECLARE_ACPIMMIO(acpimmio_sm_pci, SM_PCI); DECLARE_ACPIMMIO(acpimmio_gpio_100, GPIO_100); DECLARE_ACPIMMIO(acpimmio_smi, SMI); DECLARE_ACPIMMIO(acpimmio_pmio, PMIO); diff --git a/src/soc/amd/common/block/include/amdblocks/acpimmio.h b/src/soc/amd/common/block/include/amdblocks/acpimmio.h index 2d632f606a..9c8452b639 100644 --- a/src/soc/amd/common/block/include/amdblocks/acpimmio.h +++ b/src/soc/amd/common/block/include/amdblocks/acpimmio.h @@ -56,7 +56,6 @@ #endif extern uint8_t *MAYBE_CONST acpimmio_gpio_100; -extern uint8_t *MAYBE_CONST acpimmio_sm_pci; extern uint8_t *MAYBE_CONST acpimmio_smi; extern uint8_t *MAYBE_CONST acpimmio_pmio; extern uint8_t *MAYBE_CONST acpimmio_pmio2; @@ -103,36 +102,6 @@ void pm_io_write32(uint8_t reg, uint32_t value); /* Print source of last reset */ void fch_print_pmxc0_status(void); -static inline uint8_t sm_pci_read8(uint8_t reg) -{ - return read8(acpimmio_sm_pci + reg); -} - -static inline uint16_t sm_pci_read16(uint8_t reg) -{ - return read16(acpimmio_sm_pci + reg); -} - -static inline uint32_t sm_pci_read32(uint8_t reg) -{ - return read32(acpimmio_sm_pci + reg); -} - -static inline void sm_pci_write8(uint8_t reg, uint8_t value) -{ - write8(acpimmio_sm_pci + reg, value); -} - -static inline void sm_pci_write16(uint8_t reg, uint16_t value) -{ - write16(acpimmio_sm_pci + reg, value); -} - -static inline void sm_pci_write32(uint8_t reg, uint32_t value) -{ - write32(acpimmio_sm_pci + reg, value); -} - static inline uint8_t smi_read8(uint8_t reg) { return read8(acpimmio_smi + reg); -- cgit v1.2.3