Skip to content
Permalink
Browse files

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>
  • Loading branch information...
henrikbrixandersen authored and MaureenHelm committed Jun 16, 2019
1 parent 13847a3 commit b5e3be9e8ae644a20efd44ad4f5e298cd8d3c580
@@ -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;
}

@@ -17,6 +17,9 @@ config NUM_IRQS

if CLOCK_CONTROL

config CLOCK_CONTROL_MCUX_SCG
default y

config CLOCK_CONTROL_MCUX_SIM
default y

@@ -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
@@ -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)

0 comments on commit b5e3be9

Please sign in to comment.
You can’t perform that action at this time.