Skip to content

Commit

Permalink
driver: host_sub: npcx: remove self-assignment for clearing status.
Browse files Browse the repository at this point in the history
This CL removes self-assignment of SMC_STS register for clearing its
status.

Fixes zephyrproject-rtos#33089.

Signed-off-by: Mulin Chao <[email protected]>
  • Loading branch information
MulinChao committed Mar 9, 2021
1 parent 7b8bce8 commit 7c33bb8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/espi/host_subs_npcx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit 7c33bb8

Please sign in to comment.