SAMA5D23 boards: When running out of SDRAM, need to query the PMC to determine operating frequency

This commit is contained in:
Gregory Nutt
2014-03-29 17:51:06 -06:00
parent 0d22850b30
commit c433c684fa
8 changed files with 364 additions and 6 deletions
+13 -1
View File
@@ -51,7 +51,19 @@
* definitions will configure operational clocking.
*/
#if 1 /* #if !defined(CONFIG_SAMA5_OHCI) || defined(CONFIG_SAMA5_EHCI) */
#if defined(CONFIG_SAMA5_BOOT_SDRAM)
/* When booting from SDRAM, NuttX is loaded in SDRAM by an intermediate bootloader.
* That bootloader had to have already configured the PLL and SDRAM for proper
* operation.
*
* In this case, we don not reconfigure the clocking. Rather, we need to query
* the register settings to determine the clock frequencies. We can only assume that
* the Main clock source in the on-board 12MHz crystal.
*/
# include <arch/board/board_sdram.h>
#elif 1 /* #elif !defined(CONFIG_SAMA5_OHCI) || defined(CONFIG_SAMA5_EHCI) */
/* This is the configuration provided in the Atmel example code. This setup results
* in a CPU clock of 396MHz.
*