summaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block/lpc
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/common/block/lpc')
-rw-r--r--src/soc/intel/common/block/lpc/lpc_lib.c3
1 files changed, 3 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 b383637736..c67c43532c 100644
--- a/src/soc/intel/common/block/lpc/lpc_lib.c
+++ b/src/soc/intel/common/block/lpc/lpc_lib.c
@@ -80,6 +80,9 @@ void lpc_open_pmio_window(uint16_t base, uint16_t size)
/* Each IO range register can only open a 256-byte window. */
window_size = MIN(size, LPC_LGIR_MAX_WINDOW_SIZE);
+ if (!window_size)
+ return;
+
/* Window size must be a power of two for the AMASK to work. */
alignment = 1UL << (log2_ceil(window_size));
window_size = ALIGN_UP(window_size, alignment);