diff --git a/configs/ea3131/src/ea3131_internal.h b/configs/ea3131/src/ea3131_internal.h
index 05a4f36f9df0f06e2acaa26a0add0e7a1bedf0bb..36b83ea140c301174ca8f10e42a01d033e3de8ed 100755
--- a/configs/ea3131/src/ea3131_internal.h
+++ b/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/configs/ea3131/src/up_boot.c b/configs/ea3131/src/up_boot.c
index f7e08f4cb23077c38379c4ae1169c66e3018e5d2..5e2e447519fb6e10ebb64a83a1e410bd0c989e6c 100755
--- a/configs/ea3131/src/up_boot.c
+++ b/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/configs/ea3131/src/up_sdram.c b/configs/ea3131/src/up_sdram.c
index cedfd1daf0977c03d3b8fd59f60c4d5e5e137e67..3206cf6c35b2355ab0d525f87445cd1ca7e76b8b 100755
--- a/configs/ea3131/src/up_sdram.c
+++ b/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 */