Skip to content

Commit 66eb61a

Browse files
DerekSnellkartben
authored andcommitted
drivers: clock_control_mcux_syscon: confine RTC code to SOC_SERIES_MCXN
Some RTC clock code introduced is specific to SOC_SERIES_MCXN, and causes build failures on other SOCs. Signed-off-by: Derek Snell <derek.snell@nxp.com>
1 parent d7f1c0a commit 66eb61a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

drivers/clock_control/clock_control_mcux_syscon.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,9 @@ static int mcux_lpc_syscon_clock_control_on(const struct device *dev,
122122
#endif
123123

124124
#if DT_NODE_HAS_STATUS(DT_NODELABEL(rtc), okay)
125-
#if CONFIG_SOC_SERIES_IMXRT5XX
125+
#if defined(CONFIG_SOC_SERIES_IMXRT5XX) || defined(CONFIG_SOC_SERIES_IMXRT6XX)
126126
CLOCK_EnableOsc32K(true);
127-
#elif CONFIG_SOC_SERIES_IMXRT6XX
128-
/* No configuration */
129-
#else /* !CONFIG_SOC_SERIES_IMXRT5XX | !CONFIG_SOC_SERIES_IMXRT6XX */
127+
#elif CONFIG_SOC_SERIES_MCXN
130128
/* 0x0 Clock Select Value Set IRTC to use FRO 16K Clk */
131129
#if DT_PROP(DT_NODELABEL(rtc), clock_select) == 0x0
132130
CLOCK_SetupClk16KClocking(kCLOCK_Clk16KToVbat | kCLOCK_Clk16KToMain);
@@ -135,7 +133,7 @@ static int mcux_lpc_syscon_clock_control_on(const struct device *dev,
135133
CLOCK_SetupOsc32KClocking(kCLOCK_Osc32kToVbat | kCLOCK_Osc32kToMain);
136134
#endif /* DT_PROP(DT_NODELABEL(rtc), clock_select) */
137135
CLOCK_EnableClock(kCLOCK_Rtc0);
138-
#endif /* CONFIG_SOC_SERIES_IMXRT5XX */
136+
#endif /* CONFIG_SOC_SERIES_MCXN */
139137
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(rtc), okay) */
140138

141139
return 0;

0 commit comments

Comments
 (0)