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 
15 extern void scfg_init(void);
soc_early_init_hook(void)16 void soc_early_init_hook(void)
17 {
18 	struct scfg_reg *inst_scfg = (struct scfg_reg *)
19 			DT_REG_ADDR_BY_NAME(DT_NODELABEL(scfg), scfg);
20 
21 	/*
22 	 * Set bit 7 of DEVCNT again for npcx7 series. Please see Errata
23 	 * for more information. It will be fixed in next chip.
24 	 */
25 	inst_scfg->DEVCNT |= BIT(7);
26 	scfg_init();
27 }
28