soc: lpc54xxx: Get CPU clock frequency from DTS
The SoC initialization code used system clock frequency as a CPU clock frequency. This commit corrects that by obtaining the needed value from DTS. Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
This commit is contained in:
parent
8ceb0d2911
commit
1161fdf239
1 changed files with 2 additions and 2 deletions
|
@ -49,10 +49,10 @@ static ALWAYS_INLINE void clkInit(void)
|
|||
CLOCK_AttachClk(kFRO12M_to_MAIN_CLK);
|
||||
|
||||
/* Set FLASH wait states for core */
|
||||
CLOCK_SetFLASHAccessCyclesForFreq(CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC);
|
||||
CLOCK_SetFLASHAccessCyclesForFreq(DT_ARM_CORTEX_M4F_0_CLOCK_FREQUENCY);
|
||||
|
||||
/* Set up high frequency FRO output to selected frequency */
|
||||
CLOCK_SetupFROClocking(CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC);
|
||||
CLOCK_SetupFROClocking(DT_ARM_CORTEX_M4F_0_CLOCK_FREQUENCY);
|
||||
|
||||
/* Set up dividers */
|
||||
/* Set AHBCLKDIV divider to value 1 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue