soc: arm: atmel: samv71: enable the UPLL clock
Enable the UTMI PLL (UPLL) clock and add a static definition of its clock frequency. Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk> Co-authored-by: Gerson Fernando Budke <nandojve@gmail.com>
This commit is contained in:
parent
f0fc59f0a2
commit
03bece0b70
|
@ -178,6 +178,14 @@ static ALWAYS_INLINE void clock_init(void)
|
|||
;
|
||||
}
|
||||
|
||||
/* Setup UPLL */
|
||||
PMC->CKGR_UCKR = CKGR_UCKR_UPLLCOUNT(0x3Fu) | CKGR_UCKR_UPLLEN;
|
||||
|
||||
/* Wait for PLL lock */
|
||||
while (!(PMC->PMC_SR & PMC_SR_LOCKU)) {
|
||||
;
|
||||
}
|
||||
|
||||
/*
|
||||
* Final setup of the Master Clock
|
||||
*/
|
||||
|
|
|
@ -74,6 +74,9 @@
|
|||
#define SOC_ATMEL_SAM_MCK_FREQ_HZ \
|
||||
(SOC_ATMEL_SAM_HCLK_FREQ_HZ / CONFIG_SOC_ATMEL_SAMV71_MDIV)
|
||||
|
||||
/** UTMI PLL clock (UPLLCK) Frequency */
|
||||
#define SOC_ATMEL_SAM_UPLLCK_FREQ_HZ MHZ(480)
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#include "pwm_fixup.h"
|
||||
|
|
Loading…
Reference in a new issue