From b6ad85cdd97e32dca8870151eeb0d8712a2398b6 Mon Sep 17 00:00:00 2001 From: Mulin Chao Date: Mon, 8 Mar 2021 21:44:43 -0800 Subject: [PATCH] driver: host_sub: npcx: remove self-assignment for clearing status. This CL removes self-assignment of SMC_STS register for clearing its status. Fixes #33089. Signed-off-by: Mulin Chao --- drivers/espi/host_subs_npcx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/espi/host_subs_npcx.c b/drivers/espi/host_subs_npcx.c index d1ad4629e16..295e584d621 100644 --- a/drivers/espi/host_subs_npcx.c +++ b/drivers/espi/host_subs_npcx.c @@ -972,6 +972,7 @@ int npcx_host_init_subs_core_domain(const struct device *host_bus_dev, const struct device *const clk_dev = device_get_binding(NPCX_CLK_CTRL_NAME); int i; + uint8_t shm_sts; host_sub_data.callbacks = callbacks; host_sub_data.host_bus_dev = host_bus_dev; @@ -998,7 +999,8 @@ int npcx_host_init_subs_core_domain(const struct device *host_bus_dev, */ inst_shm->SMC_CTL &= BIT(NPCX_SMC_CTL_HOSTWAIT); /* Clear shared memory status */ - inst_shm->SMC_STS = inst_shm->SMC_STS; + shm_sts = inst_shm->SMC_STS; + inst_shm->SMC_STS = shm_sts; /* host sub-module initialization in core domain */ #if defined(CONFIG_ESPI_PERIPHERAL_8042_KBC)