Wim Vervoorn has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38745 )
Change subject: soc/intel/common/block/lpc: Add function to return fixed io decode ranges ......................................................................
soc/intel/common/block/lpc: Add function to return fixed io decode ranges
Add function to return the fixed io decode ranges contained in register 0x80 of the LPC interface.
BUG=N/A TEST=build
Change-Id: Ie46d7c9d7a399a8489c030d906f75ba61db19cc4 Signed-off-by: Wim Vervoorn wvervoorn@eltan.com --- M src/soc/intel/common/block/include/intelblocks/lpc_lib.h M src/soc/intel/common/block/lpc/lpc_lib.c 2 files changed, 7 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/38745/1
diff --git a/src/soc/intel/common/block/include/intelblocks/lpc_lib.h b/src/soc/intel/common/block/include/intelblocks/lpc_lib.h index f77b8d5..cf6d8e9 100644 --- a/src/soc/intel/common/block/include/intelblocks/lpc_lib.h +++ b/src/soc/intel/common/block/include/intelblocks/lpc_lib.h @@ -70,6 +70,8 @@ * Output:I/O Enable Bits */ uint16_t lpc_enable_fixed_io_ranges(uint16_t io_enables); +/* Return the current decode settings */ +uint16_t lpc_get_fixed_io_decode(void); /* Open a generic IO window to the LPC bus. Four windows are available. */ void lpc_open_pmio_window(uint16_t base, uint16_t size); /* Close all generic IO windows to the LPC bus. */ diff --git a/src/soc/intel/common/block/lpc/lpc_lib.c b/src/soc/intel/common/block/lpc/lpc_lib.c index bc89e4c..3ad2176 100644 --- a/src/soc/intel/common/block/lpc/lpc_lib.c +++ b/src/soc/intel/common/block/lpc/lpc_lib.c @@ -37,6 +37,11 @@ return io_enables; }
+uint16_t lpc_get_fixed_io_decode(void) +{ + return pci_read_config16(PCH_DEV_LPC, LPC_IO_DECODE); +} + /* * Find the first unused IO window. * Returns -1 if not found, 0 for reg 0x84, 1 for reg 0x88 ...