Revamp the way external memory regions are configured; Add logic to add SAMA5 external memory regions to the heap

This commit is contained in:
Gregory Nutt 2013-07-24 10:08:32 -06:00
parent d822f4193f
commit 23fd5e4626
39 changed files with 184 additions and 180 deletions

View File

@ -187,10 +187,10 @@ CONFIG_ARCH_HAVE_EXTNAND=y
CONFIG_ARCH_HAVE_EXTNOR=y
CONFIG_ARCH_HAVE_EXTSRAM0=y
CONFIG_ARCH_HAVE_EXTSRAM1=y
# CONFIG_ARCH_EXTNAND is not set
# CONFIG_ARCH_EXTNOR is not set
# CONFIG_ARCH_EXTSRAM0 is not set
# CONFIG_ARCH_EXTSRAM1 is not set
# CONFIG_SAM34_EXTNAND is not set
# CONFIG_SAM34_EXTNOR is not set
# CONFIG_SAM34_EXTSRAM0 is not set
# CONFIG_SAM34_EXTSRAM1 is not set
#
# Architecture Options

View File

@ -187,10 +187,10 @@ CONFIG_ARCH_HAVE_EXTNAND=y
CONFIG_ARCH_HAVE_EXTNOR=y
CONFIG_ARCH_HAVE_EXTSRAM0=y
CONFIG_ARCH_HAVE_EXTSRAM1=y
# CONFIG_ARCH_EXTNAND is not set
# CONFIG_ARCH_EXTNOR is not set
# CONFIG_ARCH_EXTSRAM0 is not set
# CONFIG_ARCH_EXTSRAM1 is not set
# CONFIG_SAM34_EXTNAND is not set
# CONFIG_SAM34_EXTNOR is not set
# CONFIG_SAM34_EXTSRAM0 is not set
# CONFIG_SAM34_EXTSRAM1 is not set
#
# Architecture Options

View File

@ -316,7 +316,7 @@
*
************************************************************************************/
#ifdef CONFIG_ARCH_EXTSRAM0
#ifdef CONFIG_SAM34_EXTSRAM0
void sam_sram_initialize(void);
#endif

View File

@ -570,23 +570,23 @@ ARM/EA3131-specific Configuration Options
External memory available on the board (see also CONFIG_MM_REGIONS)
CONFIG_ARCH_EXTSRAM0 - Select if external SRAM0 is present
CONFIG_ARCH_EXTSRAM0HEAP - Select if external SRAM0 should be
CONFIG_LPC31_EXTSRAM0 - Select if external SRAM0 is present
CONFIG_LPC31_EXTSRAM0HEAP - Select if external SRAM0 should be
configured as part of the NuttX heap.
CONFIG_ARCH_EXTSRAM0SIZE - Size (in bytes) of the installed
CONFIG_LPC31_EXTSRAM0SIZE - Size (in bytes) of the installed
external SRAM0 memory
CONFIG_ARCH_EXTSRAM1 - Select if external SRAM1 is present
CONFIG_ARCH_EXTSRAM1HEAP - Select if external SRAM1 should be
CONFIG_LPC31_EXTSRAM1 - Select if external SRAM1 is present
CONFIG_LPC31_EXTSRAM1HEAP - Select if external SRAM1 should be
configured as part of the NuttX heap.
CONFIG_ARCH_EXTSRAM1SIZE - Size (in bytes) of the installed
CONFIG_LPC31_EXTSRAM1SIZE - Size (in bytes) of the installed
external SRAM1 memory
CONFIG_ARCH_EXTDRAM - Select if external SDRAM is present
CONFIG_ARCH_EXTDRAMHEAP - Select if external SDRAM should be
CONFIG_LPC31_EXTDRAM - Select if external SDRAM is present
CONFIG_LPC31_EXTDRAMHEAP - Select if external SDRAM should be
configured as part of the NuttX heap.
CONFIG_ARCH_EXTDRAMSIZE - Size (in bytes) of the installed
CONFIG_LPC31_EXTDRAMSIZE - Size (in bytes) of the installed
external SDRAM memory
CONFIG_ARCH_EXTNAND - Select if external NAND is present
CONFIG_ARCH_EXTNANDSIZE - Size (in bytes) of the installed
CONFIG_LPC31_EXTNAND - Select if external NAND is present
CONFIG_LPC31_EXTNANDSIZE - Size (in bytes) of the installed
external NAND memory
LPC313X specific device driver settings

View File

@ -79,17 +79,17 @@ CONFIG_LPC31_UART=y
#
# Exernal memory available on the board (see also CONFIG_MM_REGIONS)
#
CONFIG_ARCH_EXTSRAM0=n
CONFIG_ARCH_EXTSRAM0HEAP=n
CONFIG_ARCH_EXTSRAM0SIZE=131072
CONFIG_ARCH_EXTSRAM1=n
CONFIG_ARCH_EXTSRAM1HEAP=n
CONFIG_ARCH_EXTSRAM1SIZE=131072
CONFIG_ARCH_EXTDRAM=n
CONFIG_ARCH_EXTDRAMHEAP=n
CONFIG_ARCH_EXTDRAMSIZE=67108864
CONFIG_ARCH_EXTNAND=n
CONFIG_ARCH_EXTNANDSIZE=67108864
CONFIG_LPC31_EXTSRAM0=n
CONFIG_LPC31_EXTSRAM0HEAP=n
CONFIG_LPC31_EXTSRAM0SIZE=131072
CONFIG_LPC31_EXTSRAM1=n
CONFIG_LPC31_EXTSRAM1HEAP=n
CONFIG_LPC31_EXTSRAM1SIZE=131072
CONFIG_LPC31_EXTDRAM=n
CONFIG_LPC31_EXTDRAMHEAP=n
CONFIG_LPC31_EXTDRAMSIZE=67108864
CONFIG_LPC31_EXTNAND=n
CONFIG_LPC31_EXTNANDSIZE=67108864
#
# LPC31XX specific device driver settings

View File

@ -79,17 +79,17 @@ CONFIG_LPC31_UART=y
#
# Exernal memory available on the board (see also CONFIG_MM_REGIONS)
#
CONFIG_ARCH_EXTSRAM0=n
CONFIG_ARCH_EXTSRAM0HEAP=n
CONFIG_ARCH_EXTSRAM0SIZE=131072
CONFIG_ARCH_EXTSRAM1=n
CONFIG_ARCH_EXTSRAM1HEAP=n
CONFIG_ARCH_EXTSRAM1SIZE=131072
CONFIG_ARCH_EXTDRAM=n
CONFIG_ARCH_EXTDRAMHEAP=n
CONFIG_ARCH_EXTDRAMSIZE=67108864
CONFIG_ARCH_EXTNAND=n
CONFIG_ARCH_EXTNANDSIZE=67108864
CONFIG_LPC31_EXTSRAM0=n
CONFIG_LPC31_EXTSRAM0HEAP=n
CONFIG_LPC31_EXTSRAM0SIZE=131072
CONFIG_LPC31_EXTSRAM1=n
CONFIG_LPC31_EXTSRAM1HEAP=n
CONFIG_LPC31_EXTSRAM1SIZE=131072
CONFIG_LPC31_EXTDRAM=n
CONFIG_LPC31_EXTDRAMHEAP=n
CONFIG_LPC31_EXTDRAMSIZE=67108864
CONFIG_LPC31_EXTNAND=n
CONFIG_LPC31_EXTNANDSIZE=67108864
#
# LPC31XX specific device driver settings

View File

@ -79,17 +79,17 @@ CONFIG_LPC31_UART=y
#
# Exernal memory available on the board (see also CONFIG_MM_REGIONS)
#
CONFIG_ARCH_EXTSRAM0=n
CONFIG_ARCH_EXTSRAM0HEAP=n
CONFIG_ARCH_EXTSRAM0SIZE=131072
CONFIG_ARCH_EXTSRAM1=n
CONFIG_ARCH_EXTSRAM1HEAP=n
CONFIG_ARCH_EXTSRAM1SIZE=131072
CONFIG_ARCH_EXTDRAM=n
CONFIG_ARCH_EXTDRAMHEAP=n
CONFIG_ARCH_EXTDRAMSIZE=67108864
CONFIG_ARCH_EXTNAND=n
CONFIG_ARCH_EXTNANDSIZE=67108864
CONFIG_LPC31_EXTSRAM0=n
CONFIG_LPC31_EXTSRAM0HEAP=n
CONFIG_LPC31_EXTSRAM0SIZE=131072
CONFIG_LPC31_EXTSRAM1=n
CONFIG_LPC31_EXTSRAM1HEAP=n
CONFIG_LPC31_EXTSRAM1SIZE=131072
CONFIG_LPC31_EXTDRAM=n
CONFIG_LPC31_EXTDRAMHEAP=n
CONFIG_LPC31_EXTDRAMSIZE=67108864
CONFIG_LPC31_EXTNAND=n
CONFIG_LPC31_EXTNANDSIZE=67108864
#
# LPC31XX specific device driver settings

View File

@ -44,7 +44,7 @@ CSRCS = up_boot.c up_clkinit.c
ifeq ($(CONFIG_ARCH_BUTTONS),y)
CSRCS += up_buttons.c
endif
ifeq ($(CONFIG_ARCH_EXTDRAM),y)
ifeq ($(CONFIG_LPC31_EXTDRAM),y)
CSRCS += up_mem.c
endif
ifeq ($(CONFIG_ARCH_LEDS),y)

View File

@ -86,7 +86,7 @@
*
************************************************************************************/
#ifdef CONFIG_ARCH_EXTDRAM
#ifdef CONFIG_LPC31_EXTDRAM
extern void lpc31_meminitialize(void);
#endif

View File

@ -75,7 +75,7 @@ void lpc31_boardinitialize(void)
{
/* Initialize configured, external memory resources */
#ifdef CONFIG_ARCH_EXTDRAM
#ifdef CONFIG_LPC31_EXTDRAM
lpc31_meminitialize();
#endif

View File

@ -59,7 +59,7 @@
#include "lpc31_mpmc.h"
#include "ea3131_internal.h"
#ifdef CONFIG_ARCH_EXTDRAM
#ifdef CONFIG_LPC31_EXTDRAM
/****************************************************************************
* Pre-processor Definitions
@ -356,4 +356,4 @@ void lpc31_meminitialize(void)
lpc31_sdraminitialize();
}
#endif /* CONFIG_ARCH_EXTDRAM */
#endif /* CONFIG_LPC31_EXTDRAM */

View File

@ -79,17 +79,17 @@ CONFIG_LPC31_UART=y
#
# Exernal memory available on the board (see also CONFIG_MM_REGIONS)
#
CONFIG_ARCH_EXTSRAM0=n
CONFIG_ARCH_EXTSRAM0HEAP=n
CONFIG_ARCH_EXTSRAM0SIZE=131072
CONFIG_ARCH_EXTSRAM1=n
CONFIG_ARCH_EXTSRAM1HEAP=n
CONFIG_ARCH_EXTSRAM1SIZE=131072
CONFIG_ARCH_EXTDRAM=n
CONFIG_ARCH_EXTDRAMHEAP=n
CONFIG_ARCH_EXTDRAMSIZE=67108864
CONFIG_ARCH_EXTNAND=n
CONFIG_ARCH_EXTNANDSIZE=67108864
CONFIG_LPC31_EXTSRAM0=n
CONFIG_LPC31_EXTSRAM0HEAP=n
CONFIG_LPC31_EXTSRAM0SIZE=131072
CONFIG_LPC31_EXTSRAM1=n
CONFIG_LPC31_EXTSRAM1HEAP=n
CONFIG_LPC31_EXTSRAM1SIZE=131072
CONFIG_LPC31_EXTDRAM=n
CONFIG_LPC31_EXTDRAMHEAP=n
CONFIG_LPC31_EXTDRAMSIZE=67108864
CONFIG_LPC31_EXTNAND=n
CONFIG_LPC31_EXTNANDSIZE=67108864
#
# LPC31XX specific device driver settings

View File

@ -79,17 +79,17 @@ CONFIG_LPC31_UART=y
#
# Exernal memory available on the board (see also CONFIG_MM_REGIONS)
#
CONFIG_ARCH_EXTSRAM0=n
CONFIG_ARCH_EXTSRAM0HEAP=n
CONFIG_ARCH_EXTSRAM0SIZE=131072
CONFIG_ARCH_EXTSRAM1=n
CONFIG_ARCH_EXTSRAM1HEAP=n
CONFIG_ARCH_EXTSRAM1SIZE=131072
CONFIG_ARCH_EXTDRAM=n
CONFIG_ARCH_EXTDRAMHEAP=n
CONFIG_ARCH_EXTDRAMSIZE=67108864
CONFIG_ARCH_EXTNAND=n
CONFIG_ARCH_EXTNANDSIZE=67108864
CONFIG_LPC31_EXTSRAM0=n
CONFIG_LPC31_EXTSRAM0HEAP=n
CONFIG_LPC31_EXTSRAM0SIZE=131072
CONFIG_LPC31_EXTSRAM1=n
CONFIG_LPC31_EXTSRAM1HEAP=n
CONFIG_LPC31_EXTSRAM1SIZE=131072
CONFIG_LPC31_EXTDRAM=n
CONFIG_LPC31_EXTDRAMHEAP=n
CONFIG_LPC31_EXTDRAMSIZE=67108864
CONFIG_LPC31_EXTNAND=n
CONFIG_LPC31_EXTNANDSIZE=67108864
#
# LPC31XX specific device driver settings

View File

@ -376,23 +376,23 @@ ARM/EA3152-specific Configuration Options
External memory available on the board (see also CONFIG_MM_REGIONS)
CONFIG_ARCH_EXTSRAM0 - Select if external SRAM0 is present
CONFIG_ARCH_EXTSRAM0HEAP - Select if external SRAM0 should be
CONFIG_LPC31_EXTSRAM0 - Select if external SRAM0 is present
CONFIG_LPC31_EXTSRAM0HEAP - Select if external SRAM0 should be
configured as part of the NuttX heap.
CONFIG_ARCH_EXTSRAM0SIZE - Size (in bytes) of the installed
CONFIG_LPC31_EXTSRAM0SIZE - Size (in bytes) of the installed
external SRAM0 memory
CONFIG_ARCH_EXTSRAM1 - Select if external SRAM1 is present
CONFIG_ARCH_EXTSRAM1HEAP - Select if external SRAM1 should be
CONFIG_LPC31_EXTSRAM1 - Select if external SRAM1 is present
CONFIG_LPC31_EXTSRAM1HEAP - Select if external SRAM1 should be
configured as part of the NuttX heap.
CONFIG_ARCH_EXTSRAM1SIZE - Size (in bytes) of the installed
CONFIG_LPC31_EXTSRAM1SIZE - Size (in bytes) of the installed
external SRAM1 memory
CONFIG_ARCH_EXTDRAM - Select if external SDRAM is present
CONFIG_ARCH_EXTDRAMHEAP - Select if external SDRAM should be
CONFIG_LPC31_EXTDRAM - Select if external SDRAM is present
CONFIG_LPC31_EXTDRAMHEAP - Select if external SDRAM should be
configured as part of the NuttX heap.
CONFIG_ARCH_EXTDRAMSIZE - Size (in bytes) of the installed
CONFIG_LPC31_EXTDRAMSIZE - Size (in bytes) of the installed
external SDRAM memory
CONFIG_ARCH_EXTNAND - Select if external NAND is present
CONFIG_ARCH_EXTNANDSIZE - Size (in bytes) of the installed
CONFIG_LPC31_EXTNAND - Select if external NAND is present
CONFIG_LPC31_EXTNANDSIZE - Size (in bytes) of the installed
external NAND memory
LPC315X specific device driver settings

View File

@ -79,17 +79,17 @@ CONFIG_LPC31_UART=y
#
# Exernal memory available on the board (see also CONFIG_MM_REGIONS)
#
CONFIG_ARCH_EXTSRAM0=n
CONFIG_ARCH_EXTSRAM0HEAP=n
CONFIG_ARCH_EXTSRAM0SIZE=131072
CONFIG_ARCH_EXTSRAM1=n
CONFIG_ARCH_EXTSRAM1HEAP=n
CONFIG_ARCH_EXTSRAM1SIZE=131072
CONFIG_ARCH_EXTDRAM=n
CONFIG_ARCH_EXTDRAMHEAP=n
CONFIG_ARCH_EXTDRAMSIZE=67108864
CONFIG_ARCH_EXTNAND=n
CONFIG_ARCH_EXTNANDSIZE=67108864
CONFIG_LPC31_EXTSRAM0=n
CONFIG_LPC31_EXTSRAM0HEAP=n
CONFIG_LPC31_EXTSRAM0SIZE=131072
CONFIG_LPC31_EXTSRAM1=n
CONFIG_LPC31_EXTSRAM1HEAP=n
CONFIG_LPC31_EXTSRAM1SIZE=131072
CONFIG_LPC31_EXTDRAM=n
CONFIG_LPC31_EXTDRAMHEAP=n
CONFIG_LPC31_EXTDRAMSIZE=67108864
CONFIG_LPC31_EXTNAND=n
CONFIG_LPC31_EXTNANDSIZE=67108864
#
# LPC31XX specific device driver settings

View File

@ -44,7 +44,7 @@ CSRCS = up_boot.c up_clkinit.c
ifeq ($(CONFIG_ARCH_BUTTONS),y)
CSRCS += up_buttons.c
endif
ifeq ($(CONFIG_ARCH_EXTDRAM),y)
ifeq ($(CONFIG_LPC31_EXTDRAM),y)
CSRCS += up_mem.c
endif
ifeq ($(CONFIG_ARCH_LEDS),y)

View File

@ -86,7 +86,7 @@
*
************************************************************************************/
#ifdef CONFIG_ARCH_EXTDRAM
#ifdef CONFIG_LPC31_EXTDRAM
extern void lpc31_meminitialize(void);
#endif

View File

@ -75,7 +75,7 @@ void lpc31_boardinitialize(void)
{
/* Initialize configured, external memory resources */
#ifdef CONFIG_ARCH_EXTDRAM
#ifdef CONFIG_LPC31_EXTDRAM
lpc31_meminitialize();
#endif

View File

@ -59,7 +59,7 @@
#include "lpc31_mpmc.h"
#include "ea3152_internal.h"
#ifdef CONFIG_ARCH_EXTDRAM
#ifdef CONFIG_LPC31_EXTDRAM
/****************************************************************************
* Pre-processor Definitions
@ -356,4 +356,4 @@ void lpc31_meminitialize(void)
lpc31_sdraminitialize();
}
#endif /* CONFIG_ARCH_EXTDRAM */
#endif /* CONFIG_LPC31_EXTDRAM */

View File

@ -508,8 +508,8 @@ CONFIGURATION
the configuration in the following ways:
CONFIG_LPC17_EMC=y : Enable the EMC
CONFIG_ARCH_EXTDRAM=y : Configure external DRAM
CONFIG_ARCH_EXTDRAMSIZE=67108864 : DRAM size 2x256/8 = 64MB
CONFIG_LPC17_EXTDRAM=y : Configure external DRAM
CONFIG_LPC17_EXTDRAMSIZE=67108864 : DRAM size 2x256/8 = 64MB
CONFIG_SYSTEM_RAMTEST=y : Enable the RAM test built-in
In this configuration, the SDRAM is not added to heap and so is

View File

@ -201,7 +201,7 @@
*/
#ifdef CONFIG_LPC17_EMC
#if defined(CONFIG_ARCH_EXTNAND) || defined(CONFIG_ARCH_EXTDRAM)
#if defined(CONFIG_LPC17_EXTNAND) || defined(CONFIG_LPC17_EXTDRAM)
# define BOARD_CMDDLY 17
# define BOARD_FBCLKDLY 17
# define BOARD_CLKOUT0DLY 1

View File

@ -214,16 +214,16 @@ CONFIG_ARCH_HAVE_EXTNAND=y
CONFIG_ARCH_HAVE_EXTNOR=y
CONFIG_ARCH_HAVE_EXTDRAM=y
CONFIG_ARCH_HAVE_EXTSRAM0=y
CONFIG_ARCH_EXTNAND=y
CONFIG_ARCH_EXTNANDSIZE=134217728
CONFIG_ARCH_EXTNOR=y
CONFIG_ARCH_EXTNORSIZE=4194304
CONFIG_ARCH_EXTDRAM=y
CONFIG_ARCH_EXTDRAMSIZE=67108864
CONFIG_ARCH_EXTDRAMHEAP=y
CONFIG_ARCH_EXTSRAM0=y
CONFIG_ARCH_EXTSRAM0SIZE=131072
CONFIG_ARCH_EXTSRAM0HEAP=y
CONFIG_LPC17_EXTNAND=y
CONFIG_LPC17_EXTNANDSIZE=134217728
CONFIG_LPC17_EXTNOR=y
CONFIG_LPC17_EXTNORSIZE=4194304
CONFIG_LPC17_EXTDRAM=y
CONFIG_LPC17_EXTDRAMSIZE=67108864
CONFIG_LPC17_EXTDRAMHEAP=y
CONFIG_LPC17_EXTSRAM0=y
CONFIG_LPC17_EXTSRAM0SIZE=131072
CONFIG_LPC17_EXTSRAM0HEAP=y
#
# Architecture Options

View File

@ -209,12 +209,12 @@ CONFIG_ARCH_HAVE_EXTNAND=y
CONFIG_ARCH_HAVE_EXTNOR=y
CONFIG_ARCH_HAVE_EXTDRAM=y
CONFIG_ARCH_HAVE_EXTSRAM0=y
# CONFIG_ARCH_EXTNAND is not set
# CONFIG_ARCH_EXTNOR is not set
CONFIG_ARCH_EXTDRAM=y
CONFIG_ARCH_EXTDRAMSIZE=67108864
CONFIG_ARCH_EXTDRAMHEAP=y
# CONFIG_ARCH_EXTSRAM0 is not set
# CONFIG_LPC17_EXTNAND is not set
# CONFIG_LPC17_EXTNOR is not set
CONFIG_LPC17_EXTDRAM=y
CONFIG_LPC17_EXTDRAMSIZE=67108864
CONFIG_LPC17_EXTDRAMHEAP=y
# CONFIG_LPC17_EXTSRAM0 is not set
#
# Architecture Options

View File

@ -41,15 +41,15 @@ ASRCS =
CSRCS = lpc17_boardinitialize.c lpc17_ssp.c
ifeq ($(CONFIG_LPC17_EMC),y)
ifeq ($(CONFIG_ARCH_EXTNOR),y)
ifeq ($(CONFIG_LPC17_EXTNOR),y)
CSRCS += lpc17_norinitialize.c
endif
ifeq ($(CONFIG_ARCH_EXTNAND),y)
ifeq ($(CONFIG_LPC17_EXTNAND),y)
CSRCS += lpc17_nandinitialize.c
endif
ifeq ($(CONFIG_ARCH_EXTDRAM),y)
ifeq ($(CONFIG_LPC17_EXTDRAM),y)
CSRCS += lpc17_sdraminitialize.c
endif
endif

View File

@ -79,13 +79,13 @@ void lpc17_boardinitialize(void)
#ifdef CONFIG_LPC17_EMC
lpc17_emcinitialize();
#ifdef CONFIG_ARCH_EXTDRAM
#ifdef CONFIG_LPC17_EXTDRAM
open1788_sdram_initialize();
#endif
#ifdef CONFIG_ARCH_EXTNOR
#ifdef CONFIG_LPC17_EXTNOR
open1788_nor_initialize();
#endif
#ifdef CONFIG_ARCH_EXTNAND
#ifdef CONFIG_LPC17_EXTNAND
open1788_nand_initialize();
#endif
#endif

View File

@ -49,7 +49,7 @@
#include "open1788.h"
#if defined(CONFIG_LPC17_EMC) && defined(CONFIG_ARCH_EXTNAND)
#if defined(CONFIG_LPC17_EMC) && defined(CONFIG_LPC17_EXTNAND)
/************************************************************************************
* Definitions
@ -98,4 +98,4 @@ void open1788_nand_initialize(void)
lpc17_gpioconfig(GPIO_NAND_RB);
}
#endif /* CONFIG_LPC17_EMC && CONFIG_ARCH_EXTNAND */
#endif /* CONFIG_LPC17_EMC && CONFIG_LPC17_EXTNAND */

View File

@ -49,7 +49,7 @@
#include "open1788.h"
#if defined(CONFIG_LPC17_EMC) && defined(CONFIG_ARCH_EXTNOR)
#if defined(CONFIG_LPC17_EMC) && defined(CONFIG_LPC17_EXTNOR)
/************************************************************************************
* Definitions
@ -94,4 +94,4 @@ void open1788_nor_initialize(void)
up_mdelay(10);
}
#endif /* CONFIG_LPC17_EMC && CONFIG_ARCH_EXTNOR */
#endif /* CONFIG_LPC17_EMC && CONFIG_LPC17_EXTNOR */

View File

@ -52,7 +52,7 @@
#include "open1788.h"
#if defined(CONFIG_LPC17_EMC) && defined(CONFIG_ARCH_EXTDRAM)
#if defined(CONFIG_LPC17_EMC) && defined(CONFIG_LPC17_EXTDRAM)
/************************************************************************************
* Definitions
@ -78,13 +78,13 @@
/* Set up for 32-bit SDRAM at CS0 */
#define CONFIG_ARCH_SDRAM_32BIT
#define CONFIG_LPC17_SDRAM_32BIT
#ifdef CONFIG_ARCH_SDRAM_16BIT
#ifdef CONFIG_LPC17_SDRAM_16BIT
# define SDRAM_SIZE 0x02000000 /* 256Mbit */
#else /* if defined(CONFIG_ARCH_SDRAM_32BIT) */
# undef CONFIG_ARCH_SDRAM_32BIT
# define CONFIG_ARCH_SDRAM_32BIT 1
#else /* if defined(CONFIG_LPC17_SDRAM_32BIT) */
# undef CONFIG_LPC17_SDRAM_32BIT
# define CONFIG_LPC17_SDRAM_32BIT 1
# define SDRAM_SIZE 0x04000000 /* 512Mbit */
#endif
@ -109,7 +109,7 @@
void open1788_sdram_initialize(void)
{
uint32_t regval;
#ifdef CONFIG_ARCH_SDRAM_16BIT
#ifdef CONFIG_LPC17_SDRAM_16BIT
volatile uint16_t dummy;
#else
volatile uint32_t dummy;
@ -159,7 +159,7 @@ void open1788_sdram_initialize(void)
putreg32(MDKCFG_RASCAS0VAL, LPC17_EMC_DYNAMICRASCAS0);
#ifdef CONFIG_ARCH_SDRAM_16BIT
#ifdef CONFIG_LPC17_SDRAM_16BIT
/* For Manley lpc1778 SDRAM: H57V2562GTR-75C, 256Mb, 16Mx16, 4 banks, row=13, column=9:
*
* 256Mb, 16Mx16, 4 banks, row=13, column=9, RBC
@ -168,7 +168,7 @@ void open1788_sdram_initialize(void)
putreg32(EMC_DYNAMICCONFIG_MD_SDRAM | EMC_DYNAMICCONFIG_AM0(13),
LPC17_EMC_DYNAMICCONFIG0);
#elif defined CONFIG_ARCH_SDRAM_32BIT
#elif defined CONFIG_LPC17_SDRAM_32BIT
/* 256Mb, 16Mx16, 4 banks, row=13, column=9, RBC */
putreg32(EMC_DYNAMICCONFIG_MD_SDRAM | EMC_DYNAMICCONFIG_AM0(13) | EMC_DYNAMICCONFIG_AM1,
@ -210,9 +210,9 @@ void open1788_sdram_initialize(void)
putreg32(EMC_DYNAMICCONTROL_CE | EMC_DYNAMICCONTROL_CS | EMC_DYNAMICCONTROL_I_MODE,
LPC17_EMC_DYNAMICCONTROL);
#ifdef CONFIG_ARCH_SDRAM_16BIT
#ifdef CONFIG_LPC17_SDRAM_16BIT
dummy = getreg16(SDRAM_BASE | (0x33 << 12)); /* 8 burst, 3 CAS latency */
#elif defined CONFIG_ARCH_SDRAM_32BIT
#elif defined CONFIG_LPC17_SDRAM_32BIT
dummy = getreg32(SDRAM_BASE | (0x32 << 13)); /* 4 burst, 3 CAS latency */
#endif
@ -233,4 +233,4 @@ void open1788_sdram_initialize(void)
putreg32(regval, LPC17_SYSCON_EMCDLYCTL);
}
#endif /* CONFIG_LPC17_EMC && CONFIG_ARCH_EXTDRAM */
#endif /* CONFIG_LPC17_EMC && CONFIG_LPC17_EXTDRAM */

View File

@ -184,7 +184,7 @@ void weak_function open1788_sspinitialize(void);
************************************************************************************/
#ifdef CONFIG_LPC17_EMC
#ifdef CONFIG_ARCH_EXTDRAM
#ifdef CONFIG_LPC17_EXTDRAM
void open1788_sdram_initialize(void);
#endif
@ -196,7 +196,7 @@ void open1788_sdram_initialize(void);
*
************************************************************************************/
#ifdef CONFIG_ARCH_EXTNOR
#ifdef CONFIG_LPC17_EXTNOR
void open1788_nor_initialize(void);
#endif
@ -208,7 +208,7 @@ void open1788_nor_initialize(void);
*
************************************************************************************/
#ifdef CONFIG_ARCH_EXTNAND
#ifdef CONFIG_LPC17_EXTNAND
void open1788_nand_initialize(void);
#endif
#endif /* CONFIG_LPC17_EMC */

View File

@ -177,10 +177,10 @@ CONFIG_ARCH_HAVE_EXTNAND=y
CONFIG_ARCH_HAVE_EXTNOR=y
CONFIG_ARCH_HAVE_EXTSRAM0=y
CONFIG_ARCH_HAVE_EXTSRAM1=y
# CONFIG_ARCH_EXTNAND is not set
# CONFIG_ARCH_EXTNOR is not set
# CONFIG_ARCH_EXTSRAM0 is not set
# CONFIG_ARCH_EXTSRAM1 is not set
# CONFIG_SAM34_EXTNAND is not set
# CONFIG_SAM34_EXTNOR is not set
# CONFIG_SAM34_EXTSRAM0 is not set
# CONFIG_SAM34_EXTSRAM1 is not set
#
# Architecture Options

View File

@ -180,10 +180,10 @@ CONFIG_ARCH_HAVE_EXTNAND=y
CONFIG_ARCH_HAVE_EXTNOR=y
CONFIG_ARCH_HAVE_EXTSRAM0=y
CONFIG_ARCH_HAVE_EXTSRAM1=y
# CONFIG_ARCH_EXTNAND is not set
# CONFIG_ARCH_EXTNOR is not set
# CONFIG_ARCH_EXTSRAM0 is not set
# CONFIG_ARCH_EXTSRAM1 is not set
# CONFIG_SAM34_EXTNAND is not set
# CONFIG_SAM34_EXTNOR is not set
# CONFIG_SAM34_EXTSRAM0 is not set
# CONFIG_SAM34_EXTSRAM1 is not set
#
# Architecture Options

View File

@ -594,8 +594,8 @@ Configuration sub-directories
for the on-board SRAM (1MB).
System Type -> External Memory Configuration
CONFIG_ARCH_EXTSRAM0=y : Select SRAM on CS0
CONFIG_ARCH_EXTSRAM0SIZE=1048576 : Size=1MB
CONFIG_SAM34_EXTSRAM0=y : Select SRAM on CS0
CONFIG_SAM34_EXTSRAM0SIZE=1048576 : Size=1MB
Now what are you going to do with the SRAM. There are two choices:
@ -603,7 +603,7 @@ Configuration sub-directories
external SRAM:
System Type -> External Memory Configuration
CONFIG_ARCH_EXTSRAM0HEAP=n : Don't add to heap
CONFIG_SAM34_EXTSRAM0HEAP=n : Don't add to heap
Application Configuration -> System NSH Add-Ons
CONFIG_SYSTEM_RAMTEST=y : Enable the RAM test built-in
@ -637,7 +637,7 @@ Configuration sub-directories
configuration as follows:
System Type -> External Memory Configuration
CONFIG_ARCH_EXTSRAM0HEAP=y : Add external RAM to heap
CONFIG_SAM34_EXTSRAM0HEAP=y : Add external RAM to heap
Memory Management
-CONFIG_MM_REGIONS=1 : Only the internal SRAM

View File

@ -179,10 +179,10 @@ CONFIG_ARCH_HAVE_EXTNAND=y
CONFIG_ARCH_HAVE_EXTNOR=y
CONFIG_ARCH_HAVE_EXTSRAM0=y
CONFIG_ARCH_HAVE_EXTSRAM1=y
# CONFIG_ARCH_EXTNAND is not set
# CONFIG_ARCH_EXTNOR is not set
# CONFIG_ARCH_EXTSRAM0 is not set
# CONFIG_ARCH_EXTSRAM1 is not set
# CONFIG_SAM34_EXTNAND is not set
# CONFIG_SAM34_EXTNOR is not set
# CONFIG_SAM34_EXTSRAM0 is not set
# CONFIG_SAM34_EXTSRAM1 is not set
#
# Architecture Options

View File

@ -42,7 +42,7 @@ AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS = sam_boot.c
ifeq ($(CONFIG_ARCH_EXTSRAM0),y)
ifeq ($(CONFIG_SAM34_EXTSRAM0),y)
CSRCS += sam_sram.c
endif

View File

@ -131,7 +131,7 @@
*
************************************************************************************/
#ifdef CONFIG_ARCH_EXTSRAM0
#ifdef CONFIG_SAM34_EXTSRAM0
void sam_sram_initialize(void);
#endif

View File

@ -67,7 +67,7 @@
void sam_boardinitialize(void)
{
#ifdef CONFIG_ARCH_EXTSRAM0
#ifdef CONFIG_SAM34_EXTSRAM0
/* Configure and enable SRAM on board the SAM4S Xplained */
sam_sram_initialize();

View File

@ -46,7 +46,7 @@
#include "chip/sam3u_smc.h"
#include "sam4s-xplained.h"
#ifdef CONFIG_ARCH_EXTSRAM0
#ifdef CONFIG_SAM34_EXTSRAM0
/************************************************************************************
* Pre-processor Definitions
@ -131,4 +131,4 @@ void sam_sram_initialize(void)
sam_gpiowrite(GPIO_EBI_NLB, false);
}
#endif /* CONFIG_ARCH_EXTSRAM0 */
#endif /* CONFIG_SAM34_EXTSRAM0 */

View File

@ -37,7 +37,7 @@ include ${TOPDIR}/.config
include ${TOPDIR}/tools/Config.mk
include ${TOPDIR}$(DELIM)arch$(DELIM)arm$(DELIM)src$(DELIM)armv7-a$(DELIM)Toolchain.defs
ifeq ($(CONFIG_SAMA5_BOOT_SRAM),y)
ifeq ($(CONFIG_SAMA5_BOOT_ISRAM),y)
LDSCRIPT = isram.ld
endif
ifeq ($(CONFIG_SAMA5_BOOT_SDRAM),y)

View File

@ -163,16 +163,20 @@ CONFIG_SAMA5_UART0=y
# CONFIG_SAMA5_FUSE is not set
# CONFIG_SAMA5_MPDDRC is not set
# CONFIG_PIO_IRQ is not set
CONFIG_SAMA5_BOOT_SRAM=y
# CONFIG_SAMA5_BOOT_SDRAM is not set
# CONFIG_SAMA5_BOOT_CS0FLASH is not set
# CONFIG_SAMA5_BOOT_CS1FLASH is not set
# CONFIG_SAMA5_BOOT_CS2FLASH is not set
# CONFIG_SAMA5_BOOT_CS3FLASH is not set
#
# External Memory Configuration
#
# CONFIG_SAMA5_DDRCS is not set
# CONFIG_SAMA5_EBICS0 is not set
# CONFIG_SAMA5_EBICS1 is not set
# CONFIG_SAMA5_EBICS2 is not set
# CONFIG_SAMA5_EBICS3 is not set
CONFIG_SAMA5_BOOT_ISRAM=y
#
# Heap Configuration
#
#
# Architecture Options
@ -383,7 +387,7 @@ CONFIG_DISABLE_MOUNTPOINT=y
#
# CONFIG_MM_MULTIHEAP is not set
# CONFIG_MM_SMALL is not set
CONFIG_MM_REGIONS=2
CONFIG_MM_REGIONS=1
# CONFIG_GRAN is not set
#