soc: riscv: openisa_rv32m1: Add helper to get clock_ip_name from dts
Add a helper macro that will go from a DT_DRV_INST number and return the clock_ip_name value for that instance. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
8c78fa85ad
commit
977cd7b588
1 changed files with 5 additions and 0 deletions
|
@ -108,4 +108,9 @@ void soc_interrupt_init(void);
|
|||
#define RISCV_RAM_SIZE KB(CONFIG_SRAM_SIZE)
|
||||
#define RISCV_RAM_BASE CONFIG_SRAM_BASE_ADDRESS
|
||||
|
||||
/* helper macro to convert from a DT_INST to HAL clock_ip_name */
|
||||
#define INST_DT_CLOCK_IP_NAME(n) \
|
||||
MAKE_PCC_REGADDR(DT_REG_ADDR(DT_INST_PHANDLE(n, clocks)), \
|
||||
DT_INST_CLOCKS_CELL(n, name))
|
||||
|
||||
#endif /* SOC_RISCV32_OPENISA_RV32M1_SOC_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue