Skip to content

Commit 6bef297

Browse files
parthitcenashif
authored andcommitted
drivers: clock: conditional compile ulpclk udiv divider
although udiv is represented in clock tree of L series, this is not really present or controllable from SYSCTL registers. Enable udiv only if present in dts. Signed-off-by: Parthiban Nallathambi <[email protected]>
1 parent 2dc6307 commit 6bef297

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/clock_control/clock_control_mspm0.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ static int clock_mspm0_init(const struct device *dev)
152152
DL_SYSCTL_setSYSOSCFreq(DL_SYSCTL_SYSOSC_FREQ_BASE);
153153

154154
DL_SYSCTL_setMCLKDivider(mspm0_mclk_cfg.clk_div);
155+
#if DT_NODE_HAS_PROP(DT_NODELABEL(ulpclk), clk_div)
155156
DL_SYSCTL_setULPCLKDivider(mspm0_ulpclk_cfg.clk_div);
157+
#endif
156158

157159
#if MSPM0_PLL_ENABLED
158160
#if DT_SAME_NODE(DT_HSCLK_CLOCKS_CTRL, DT_NODELABEL(syspll0))

0 commit comments

Comments
 (0)