Clean up the RAM/FLASH sizes/locations are specified.

This commit is contained in:
Eric Norum
2005-02-05 19:58:45 +00:00
parent dbcb60a203
commit 0eff7b8ca9
2 changed files with 12 additions and 18 deletions

View File

@@ -43,14 +43,6 @@ char *rtems_progname;
#define VME_ONE_BASE 0x30000000
#define VME_TWO_BASE 0x31000000
/*
* Cacheable areas
*/
#define SDRAM_BASE 0
#define SDRAM_SIZE (16*1024*1024)
#define FLASH_BASE 0x10000000
#define FLASH_SIZE (4*1024*1024)
/*
* CPU-space access
*/
@@ -167,7 +159,8 @@ void bsp_pretasking_hook(void); /* m68k version */
void bsp_start( void )
{
extern char _WorkspaceBase[];
extern char _RamSize[];
extern char _RamBase[], _RamSize[];
extern char _FlashBase[], _FlashSize[];
extern unsigned long _M68k_Ramsize;
_M68k_Ramsize = (unsigned long)_RamSize; /* RAM size set in linker script */
@@ -208,15 +201,14 @@ void bsp_start( void )
/*
* Cache SDRAM and FLASH
*/
m68k_set_acr0(MCF5XXX_ACR_AB(SDRAM_BASE) |
MCF5XXX_ACR_AM(SDRAM_SIZE-1) |
MCF5XXX_ACR_EN |
MCF5XXX_ACR_BWE |
m68k_set_acr0(MCF5XXX_ACR_AB((uint32_t)_RamBase) |
MCF5XXX_ACR_AM((uint32_t)_RamSize-1) |
MCF5XXX_ACR_EN |
MCF5XXX_ACR_BWE |
MCF5XXX_ACR_SM_IGNORE);
m68k_set_acr1(MCF5XXX_ACR_AB(FLASH_BASE) |
MCF5XXX_ACR_AM(FLASH_SIZE-1) |
MCF5XXX_ACR_EN |
MCF5XXX_ACR_BWE |
m68k_set_acr1(MCF5XXX_ACR_AB((uint32_t)_FlashBase) |
MCF5XXX_ACR_AM((uint32_t)_FlashSize-1) |
MCF5XXX_ACR_EN |
MCF5XXX_ACR_SM_IGNORE);
/*

View File

@@ -13,11 +13,13 @@
*/
/*
* Declare some sizes.
* Declare some locations and sizes.
*/
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0 ;
_RamSize = DEFINED(_RamSize) ? _RamSize : 16M ;
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0 ;
_FlashBase = DEFINED(_FlashBase) ? _FlashBase : 0x10000000 ;
_RamSize = DEFINED(_RamSize) ? _RamSize : 4M ;
/*
* Location of downloaded (from TFTP or flash) file