1 /*
2  * Copyright (c) 2020 Nuvoton Technology Corporation.
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include <zephyr/kernel.h>
8 #include <zephyr/device.h>
9 #include <zephyr/init.h>
10 #include <soc.h>
11 #include <zephyr/logging/log.h>
12 
13 LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL);
14 
soc_npcx7_init(void)15 static int soc_npcx7_init(void)
16 {
17 	struct scfg_reg *inst_scfg = (struct scfg_reg *)
18 			DT_REG_ADDR_BY_NAME(DT_NODELABEL(scfg), scfg);
19 
20 	/*
21 	 * Set bit 7 of DEVCNT again for npcx7 series. Please see Errata
22 	 * for more information. It will be fixed in next chip.
23 	 */
24 	inst_scfg->DEVCNT |= BIT(7);
25 
26 	return 0;
27 }
28 
29 SYS_INIT(soc_npcx7_init, PRE_KERNEL_1, 0);
30