soc: arm: nxp: ke1xf: enable MCUX SCG clock controller driver

Enable the MCUX SCG clock controller driver by default for the NXP
Kinetis KE1xF SoC series. Move the generic CLKOUT configuration from
SoC to the clock controller driver.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2019-06-16 22:25:44 +02:00 committed by Maureen Helm
commit b5e3be9e8a
4 changed files with 8 additions and 3 deletions

View file

@ -92,6 +92,10 @@ static int mcux_scg_get_rate(struct device *dev,
static int mcux_scg_init(struct device *dev)
{
#ifdef DT_INST_0_NXP_KINETIS_SCG_CLKOUT_SOURCE
CLOCK_SetClkOutSel(DT_INST_0_NXP_KINETIS_SCG_CLKOUT_SOURCE);
#endif
return 0;
}

View file

@ -17,6 +17,9 @@ config NUM_IRQS
if CLOCK_CONTROL
config CLOCK_CONTROL_MCUX_SCG
default y
config CLOCK_CONTROL_MCUX_SIM
default y

View file

@ -22,5 +22,6 @@ config SOC_SERIES_KINETIS_KE1XF
select HAS_MCUX_RTC
select HAS_MCUX_SIM
select HAS_MCUX_ADC12
select HAS_MCUX_SCG
help
Enable support for Kinetis KE1xF MCU series

View file

@ -223,9 +223,6 @@ static ALWAYS_INLINE void clk_init(void)
#ifdef CONFIG_ADC_2
CLOCK_SetIpSrc(kCLOCK_Adc2, kCLOCK_IpSrcFircAsync);
#endif
#ifdef DT_INST_0_NXP_KINETIS_SCG_CLKOUT_SOURCE
CLOCK_SetClkOutSel(DT_INST_0_NXP_KINETIS_SCG_CLKOUT_SOURCE);
#endif
}
static int ke1xf_init(struct device *arg)