summaryrefslogtreecommitdiff
path: root/src/soc/intel/tigerlake/bootblock/pch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/tigerlake/bootblock/pch.c')
-rw-r--r--src/soc/intel/tigerlake/bootblock/pch.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/soc/intel/tigerlake/bootblock/pch.c b/src/soc/intel/tigerlake/bootblock/pch.c
index f613a959e2..73514926ec 100644
--- a/src/soc/intel/tigerlake/bootblock/pch.c
+++ b/src/soc/intel/tigerlake/bootblock/pch.c
@@ -20,6 +20,7 @@
#include <intelblocks/pmclib.h>
#include <intelblocks/rtc.h>
#include <soc/bootblock.h>
+#include <soc/soc_chip.h>
#include <soc/espi.h>
#include <soc/iomap.h>
#include <soc/p2sb.h>
@@ -108,9 +109,21 @@ void pch_early_iorange_init(void)
uint16_t io_enables = LPC_IOE_SUPERIO_2E_2F | LPC_IOE_KBC_60_64 |
LPC_IOE_EC_62_66 | LPC_IOE_LGE_200;
- /* IO Decode Range */
- if (CONFIG(DRIVERS_UART_8250IO))
- lpc_io_setup_comm_a_b();
+ const uint16_t lpc_ioe_enable_mask = LPC_IOE_COMA_EN | LPC_IOE_COMB_EN |
+ LPC_IOE_LPT_EN | LPC_IOE_FDD_EN |
+ LPC_IOE_LGE_200 | LPC_IOE_HGE_208 |
+ LPC_IOE_KBC_60_64 | LPC_IOE_EC_62_66 |
+ LPC_IOE_SUPERIO_2E_2F | LPC_IOE_EC_4E_4F;
+
+ const config_t *config = config_of_soc();
+
+ if (config->lpc_ioe) {
+ io_enables = config->lpc_ioe & lpc_ioe_enable_mask;
+ } else {
+ /* IO Decode Range */
+ if (CONFIG(DRIVERS_UART_8250IO))
+ lpc_io_setup_comm_a_b();
+ }
/* IO Decode Enable */
lpc_enable_fixed_io_ranges(io_enables);