diff options
Diffstat (limited to 'src/soc/intel/common/block/lpc')
-rw-r--r-- | src/soc/intel/common/block/lpc/lpc_lib.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/lpc/lpc_lib.c b/src/soc/intel/common/block/lpc/lpc_lib.c index 5b30a8121b..8edbd2ed7c 100644 --- a/src/soc/intel/common/block/lpc/lpc_lib.c +++ b/src/soc/intel/common/block/lpc/lpc_lib.c @@ -42,6 +42,17 @@ uint16_t lpc_get_fixed_io_decode(void) return pci_read_config16(PCH_DEV_LPC, LPC_IO_DECODE); } +uint16_t lpc_set_fixed_io_ranges(uint16_t io_ranges, uint16_t mask) +{ + uint16_t reg_io_ranges; + + reg_io_ranges = lpc_get_fixed_io_decode() & ~mask; + io_ranges |= reg_io_ranges & mask; + pci_write_config16(PCH_DEV_LPC, LPC_IO_DECODE, io_ranges); + + return io_ranges; +} + /* * Find the first unused IO window. * Returns -1 if not found, 0 for reg 0x84, 1 for reg 0x88 ... |