diff options
author | Marshall Dawson <marshalldawson3rd@gmail.com> | 2019-08-16 12:46:45 -0600 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2019-10-20 16:29:38 +0000 |
commit | 06fd982030a9ec74c38a6a075e243ff9a931e0ed (patch) | |
tree | 6180892e281034f8fcdfc7cdd1f4a5fd7d2f91b3 /src/soc/amd/common/block/include/amdblocks | |
parent | f6dbf4a46a44e3cc63fa734d9a77e3bc6e622aa8 (diff) |
soc/amd/common: Add AcpiMmio access for SMBus PCI device
The standard PCI register space for D14F0 is accessible at 0xfed80000.
Add functions for use as helpers.
Change-Id: Icbf5bdc449322c3f5e59e6126d709cb2808591d5
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34914
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/soc/amd/common/block/include/amdblocks')
-rw-r--r-- | src/soc/amd/common/block/include/amdblocks/acpimmio.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/include/amdblocks/acpimmio.h b/src/soc/amd/common/block/include/amdblocks/acpimmio.h index 59ab9e5f4f..ca57cf5dcc 100644 --- a/src/soc/amd/common/block/include/amdblocks/acpimmio.h +++ b/src/soc/amd/common/block/include/amdblocks/acpimmio.h @@ -21,6 +21,9 @@ #include <stdint.h> /* iomap.h must indicate if the device uses a block, optional if unused. */ #include <soc/iomap.h> +#ifndef SUPPORTS_ACPIMMIO_SM_PCI_BASE + #define SUPPORTS_ACPIMMIO_SM_PCI_BASE 0 +#endif #ifndef SUPPORTS_ACPIMMIO_SMI_BASE #define SUPPORTS_ACPIMMIO_SMI_BASE 0 #endif @@ -162,6 +165,14 @@ /* Enable the AcpiMmio range at 0xfed80000 */ void enable_acpimmio_decode(void); +/* Access SMBus PCI registers at 0xfed80000 */ +uint8_t sm_pci_read8(uint8_t reg); +uint16_t sm_pci_read16(uint8_t reg); +uint32_t sm_pci_read32(uint8_t reg); +void sm_pci_write8(uint8_t reg, uint8_t value); +void sm_pci_write16(uint8_t reg, uint16_t value); +void sm_pci_write32(uint8_t reg, uint32_t value); + /* Access PM registers using IO cycles */ uint8_t pm_io_read8(uint8_t reg); uint16_t pm_io_read16(uint8_t reg); |