1 /*
2  * Copyright (c) 2023 Nuvoton Technology Corporation.
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include <stdint.h>
8 
9 #ifndef ZEPHYR_INCLUDE_DRIVERS_CLOCK_CONTROL_NUMAKER_H_
10 #define ZEPHYR_INCLUDE_DRIVERS_CLOCK_CONTROL_NUMAKER_H_
11 
12 /**
13  * @brief Enable/disable oscillators or other clocks
14  */
15 #define NUMAKER_SCC_CLKSW_UNTOUCHED 0
16 #define NUMAKER_SCC_CLKSW_ENABLE    1
17 #define NUMAKER_SCC_CLKSW_DISABLE   2
18 
19 /**
20  * @brief SCC subsystem ID
21  */
22 #define NUMAKER_SCC_SUBSYS_ID_PCC 1
23 
24 struct numaker_scc_subsys {
25 	uint32_t subsys_id; /* SCC sybsystem ID */
26 
27 	/* Peripheral clock control configuration structure
28 	 * clk_modidx is same as u32ModuleIdx in BSP CLK_SetModuleClock().
29 	 * clk_src is same as u32ClkSrc in BSP CLK_SetModuleClock().
30 	 * clk_div is same as u32ClkDiv in BSP CLK_SetModuleClock().
31 	 */
32 	union {
33 		struct {
34 			uint32_t clk_modidx;
35 			uint32_t clk_src;
36 			uint32_t clk_div;
37 		} pcc;
38 	};
39 };
40 
41 #endif /* ZEPHYR_INCLUDE_DRIVERS_CLOCK_CONTROL_NUMAKER_H_ */
42