Skip to content
Permalink
Browse files

soc: sam4s: 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>
  • Loading branch information...
pizi-nordic authored and carlescufi committed Apr 11, 2019
1 parent 3b4ca2c commit 7094193f2361bd652d4e292a82ec9d18c8c2203c
Showing with 1 addition and 1 deletion.
  1. +1 −1 soc/arm/atmel_sam/sam4s/soc.h
@@ -52,7 +52,7 @@
#endif /* !_ASMLANGUAGE */

/** Processor Clock (HCLK) Frequency */
#define SOC_ATMEL_SAM_HCLK_FREQ_HZ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC
#define SOC_ATMEL_SAM_HCLK_FREQ_HZ DT_ARM_CORTEX_M4_0_CLOCK_FREQUENCY

/** Master Clock (MCK) Frequency */
#define SOC_ATMEL_SAM_MCK_FREQ_HZ SOC_ATMEL_SAM_HCLK_FREQ_HZ

0 comments on commit 7094193

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