drivers: clock_control: nxp: Fix building MCG on KW40Z/KW41Z
The KW40Z/KW41Z don't have a Fixed Freq MCG clock so the code associated with that in get_rate fails to build. ifdef around the code with enum kCLOCK_McgFixedFreqClk so things work correctly. Signed-off-by: Kumar Gala <galak@kernel.org>
This commit is contained in:
parent
8b101e236d
commit
83a2b590fe
|
@ -37,9 +37,11 @@ static int mcux_mcg_get_rate(const struct device *dev,
|
|||
clock_name_t clock_name;
|
||||
|
||||
switch ((uint32_t) sub_system) {
|
||||
#ifdef kCLOCK_McgFixedFreqClk
|
||||
case KINETIS_MCG_FIXED_FREQ_CLK:
|
||||
clock_name = kCLOCK_McgFixedFreqClk;
|
||||
break;
|
||||
#endif
|
||||
case KINETIS_MCG_OUT_CLK:
|
||||
*rate = CLOCK_GetOutClkFreq();
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue