arch/arm/src/imxrt/imxrt_clockconfig.c: If SDRAM is actived it was only running at 40MHz. This was becaus imxrt_clockconfig.c changed the SEMC clock divider after the DCD was configured. This commit corrects that.

This commit is contained in:
Johannes 2019-03-10 07:18:55 -06:00 committed by Gregory Nutt
parent bd6b05f5bb
commit c56ea62f3c
3 changed files with 9 additions and 0 deletions

View File

@ -121,6 +121,10 @@ config IMXRT_HAVE_LCD
bool
default n
config IMXRT_SEMC_INIT_DONE
bool
default n
menu "i.MX RT Peripheral Selection"
config IMXRT_EDMA

View File

@ -324,10 +324,14 @@ void imxrt_clockconfig(void)
reg |= CCM_CSCMR1_PERCLK_PODF(CCM_PODF_FROM_DIVISOR(IMXRT_PERCLK_PODF_DIVIDER));
putreg32(reg, IMXRT_CCM_CSCMR1);
#ifndef CONFIG_IMXRT_SEMC_INIT_DONE
/* Configure SEMC Clock only if not already done by DCD SDRAM init. */
reg = getreg32(IMXRT_CCM_CBCDR);
reg &= ~CCM_CBCDR_SEMC_PODF_MASK;
reg |= CCM_CBCDR_SEMC_PODF(CCM_PODF_FROM_DIVISOR(IMXRT_SEMC_PODF_DIVIDER));
putreg32(reg, IMXRT_CCM_CBCDR);
#endif
/* Set PRE_PERIPH_CLK to Board Selection */

View File

@ -20,6 +20,7 @@ endchoice # Boot Flash
config IMXRT1050_EVK_SDRAM
bool "Enable SDRAM"
default n
select IMXRT_SEMC_INIT_DONE
---help---
Activate DCD configuration of SDRAM