diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-12-29 16:07:53 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-12-29 16:07:53 +0000 |
commit | 0949253dfb5092f346e1af23617869f5b554fd0e (patch) | |
tree | 7445a2d49482786d343c2c3fa5de980ff71b6ff9 | |
parent | 8011552bd03acb1cebd794617478775a88dc46d3 (diff) | |
download | px4-nuttx-0949253dfb5092f346e1af23617869f5b554fd0e.tar.gz px4-nuttx-0949253dfb5092f346e1af23617869f5b554fd0e.tar.bz2 px4-nuttx-0949253dfb5092f346e1af23617869f5b554fd0e.zip |
Don't initialize SDRAM if it is not being used
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2456 42af7a65-404d-4744-a932-0658087f49c3
-rwxr-xr-x | nuttx/configs/ea3131/src/ea3131_internal.h | 2 | ||||
-rwxr-xr-x | nuttx/configs/ea3131/src/up_boot.c | 2 | ||||
-rwxr-xr-x | nuttx/configs/ea3131/src/up_sdram.c | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/nuttx/configs/ea3131/src/ea3131_internal.h b/nuttx/configs/ea3131/src/ea3131_internal.h index 05a4f36f9..36b83ea14 100755 --- a/nuttx/configs/ea3131/src/ea3131_internal.h +++ b/nuttx/configs/ea3131/src/ea3131_internal.h @@ -82,7 +82,9 @@ *
****************************************************************************/
+#ifdef CONFIG_LPC313X_EXTSDRAM
extern void lpc313x_sdraminitialize(void);
+#endif
/************************************************************************************
* Name: lpc313x_spiinitialize
diff --git a/nuttx/configs/ea3131/src/up_boot.c b/nuttx/configs/ea3131/src/up_boot.c index f7e08f4cb..5e2e44751 100755 --- a/nuttx/configs/ea3131/src/up_boot.c +++ b/nuttx/configs/ea3131/src/up_boot.c @@ -75,7 +75,9 @@ void lpc313x_boardinitialize(void) {
/* Configure Micron MT48LC32M16A2 SDRAM on the EA3131 board */
+#ifdef CONFIG_LPC313X_EXTSDRAM
lpc313x_sdraminitialize();
+#endif
/* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak function
* lpc313x_spiinitialize() has been brought into the link.
diff --git a/nuttx/configs/ea3131/src/up_sdram.c b/nuttx/configs/ea3131/src/up_sdram.c index cedfd1daf..3206cf6c3 100755 --- a/nuttx/configs/ea3131/src/up_sdram.c +++ b/nuttx/configs/ea3131/src/up_sdram.c @@ -55,6 +55,8 @@ #include "lpc313x_cgudrvr.h" #include "ea3131_internal.h" +#ifdef CONFIG_LPC313X_EXTSDRAM + /**************************************************************************** * Definitions ****************************************************************************/ @@ -265,3 +267,4 @@ void lpc313x_sdraminitialize(void) putreg32((MPMC_DYNCONTROL_INORMAL|MPMC_DYNCONTROL_CS), LPC313X_MPMC_DYNCONTROL); } +#endif /* CONFIG_LPC313X_EXTSDRAM */ |