clock_control: Add support for getting LPO frequency in mcux sim driver

The mcux sim clock control driver was originally designed to pass
through the clock subsystem value from dts to the mcux CLOCK_GetFreq()
function. This assumed that the values in
include/dt-bindings/clock/kinetis_sim.h matched the enumeration in
fsl_clock.h, which is true for the coresys, platform, and bus clocks.
However, the low-power oscillator (LPO) clock has a different values in
k64 vs. kw2xd, therefore we must update the clock_control driver to
parse the value from dts and convert it to the fsl_clock.h enumeration.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
Maureen Helm 2018-04-23 14:27:43 -05:00
commit 39d63d316b
2 changed files with 12 additions and 1 deletions

View file

@ -10,5 +10,6 @@
#define KINETIS_SIM_CORESYS_CLK 0
#define KINETIS_SIM_PLATFORM_CLK 1
#define KINETIS_SIM_BUS_CLK 2
#define KINETIS_SIM_LPO_CLK 19
#endif /* __KINETIS_SIM_H */