diff options
Diffstat (limited to 'src/soc/amd/common/block/lpc')
-rw-r--r-- | src/soc/amd/common/block/lpc/lpc_util.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/lpc/lpc_util.c b/src/soc/amd/common/block/lpc/lpc_util.c index 2c47a8549a..d2a65c8c96 100644 --- a/src/soc/amd/common/block/lpc/lpc_util.c +++ b/src/soc/amd/common/block/lpc/lpc_util.c @@ -5,6 +5,7 @@ #include <device/device.h> #include <device/pci_ops.h> #include <device/pci_def.h> +#include <amdblocks/acpimmio.h> #include <amdblocks/lpc.h> #include <soc/iomap.h> #include <soc/southbridge.h> @@ -349,3 +350,20 @@ void lpc_enable_spi_rom(uint32_t enable) pci_write_config32(_LPCB_DEV, SPIROM_BASE_ADDRESS_REGISTER, reg32); } + +static void lpc_enable_controller(void) +{ + u8 byte; + + /* Enable LPC controller */ + byte = pm_io_read8(PM_LPC_GATING); + byte |= PM_LPC_ENABLE; + pm_io_write8(PM_LPC_GATING, byte); +} + +void lpc_early_init(void) +{ + lpc_enable_controller(); + lpc_disable_decodes(); + lpc_set_spibase(SPI_BASE_ADDRESS); +} |