summaryrefslogtreecommitdiff
path: root/nuttx/arch
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-04-04 19:58:31 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-04-04 19:58:31 -0600
commitaed36df7b217172ad2a10ff75817e096a8d41ece (patch)
tree3cd9a845fe75a1ae746ec524f8864b26f4909074 /nuttx/arch
parent58438faa479281955d3292193ad2aca8e3fb67da (diff)
downloadpx4-nuttx-aed36df7b217172ad2a10ff75817e096a8d41ece.tar.gz
px4-nuttx-aed36df7b217172ad2a10ff75817e096a8d41ece.tar.bz2
px4-nuttx-aed36df7b217172ad2a10ff75817e096a8d41ece.zip
SAMV7: Fix SDRAM initialization instabiilties by changing the order of initialization
Diffstat (limited to 'nuttx/arch')
-rw-r--r--nuttx/arch/arm/src/samv7/sam_start.c40
1 files changed, 4 insertions, 36 deletions
diff --git a/nuttx/arch/arm/src/samv7/sam_start.c b/nuttx/arch/arm/src/samv7/sam_start.c
index 7649c9d46..82199b09d 100644
--- a/nuttx/arch/arm/src/samv7/sam_start.c
+++ b/nuttx/arch/arm/src/samv7/sam_start.c
@@ -118,20 +118,6 @@ void __start(void) __attribute__ ((no_instrument_function));
#endif
/****************************************************************************
- * Name: showprogress
- *
- * Description:
- * Print a character on the UART to show boot status.
- *
- ****************************************************************************/
-
-#ifdef CONFIG_DEBUG
-# define showprogress(c) up_lowputc(c)
-#else
-# define showprogress(c)
-#endif
-
-/****************************************************************************
* Name: sam_fpuconfig
*
* Description:
@@ -372,12 +358,15 @@ void __start(void)
sam_clockconfig();
sam_fpuconfig();
sam_lowsetup();
- showprogress('A');
/* Enable/disable tightly coupled memories */
sam_tcmenable();
+ /* Initialize onboard resources */
+
+ sam_boardinitialize();
+
/* Enable I- and D-Caches */
arch_dcache_writethrough();
@@ -389,7 +378,6 @@ void __start(void)
#ifdef USE_EARLYSERIALINIT
up_earlyserialinit();
#endif
- showprogress('B');
/* For the case of the separate user-/kernel-space build, perform whatever
* platform specific initialization of the user memory is required.
@@ -399,30 +387,10 @@ void __start(void)
#ifdef CONFIG_BUILD_PROTECTED
sam_userspace();
- showprogress('C');
-#endif
-
- /* Initialize onboard resources */
-
- sam_boardinitialize();
- showprogress('D');
-
-#ifdef CONFIG_SAMV7_CMCC
- /* Enable the Cortex-M Cache
- *
- * REVISIT: This logic is complete but I have not yet tried to enable it.
- * I have some questions about how the cache will effect memory mapped
- * register accesses.
- */
-
- sam_cmcc_enable();
#endif
/* Then start NuttX */
- showprogress('\r');
- showprogress('\n');
-
#ifdef CONFIG_STACK_COLORATION
/* Set the IDLE stack to the coloration value and jump into os_start() */