summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/bfin/bf537Stamp/startup
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-10 20:32:27 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-10 20:32:27 +0000
commit018e3821cc0c85913d68855f8770231be760cb9a (patch)
tree479c8eab826bda441380411f04198cf11941a091 /c/src/lib/libbsp/bfin/bf537Stamp/startup
parentRemove. (diff)
downloadrtems-018e3821cc0c85913d68855f8770231be760cb9a.tar.bz2
2008-09-10 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, startup/bspstart.c, startup/linkcmds: Split out bsp_get_work_area() into its own file and user BSP Framework to perform more initialization.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/bfin/bf537Stamp/startup/bspstart.c60
-rw-r--r--c/src/lib/libbsp/bfin/bf537Stamp/startup/linkcmds10
2 files changed, 7 insertions, 63 deletions
diff --git a/c/src/lib/libbsp/bfin/bf537Stamp/startup/bspstart.c b/c/src/lib/libbsp/bfin/bf537Stamp/startup/bspstart.c
index 46c3ecb241..489d4d405a 100644
--- a/c/src/lib/libbsp/bfin/bf537Stamp/startup/bspstart.c
+++ b/c/src/lib/libbsp/bfin/bf537Stamp/startup/bspstart.c
@@ -33,11 +33,6 @@ static bfin_mmu_region_t mmuRegions[] = {
};
#endif
-/*
- * Use the shared implementations of the following routines
- */
-
-void bsp_postdriver_hook(void);
void bsp_libc_init(void *, uint32_t, int);
void Init_RTC(void);
@@ -47,46 +42,20 @@ static void initEBIU(void);
static void initGPIO(void);
/*
- * Function: bsp_pretasking_hook
- * Created: 95/03/10
- *
- * Description:
- * BSP pretasking hook. Called just before drivers are initialized.
- * Used to setup libc and install any BSP extensions.
- *
- * NOTES:
- * Must not use libc (to do io) from here, since drivers are
- * not yet initialized.
- *
+ * BSP pretasking hook.
*/
-
-void bsp_pretasking_hook(void) {
- extern int HeapBase;
- extern int RamBase;
- extern int RamSize;
- unsigned long heapSize;
- void *heapStart;
-
+void bsp_pretasking_hook(void)
+{
bfin_interrupt_init();
-
- heapStart = &HeapBase;
- heapSize = (unsigned long) &RamBase;
- heapSize += (unsigned long) &RamSize;
- heapSize -= (unsigned long) &HeapBase;
-
- bsp_libc_init(heapStart, heapSize, 0);
-
}
/*
* bsp_start
*
- * This routine does the bulk of the system initialization.
+ * This routine does the bulk of the BSP initialization.
*/
-void bsp_start(void) {
-
- extern void *_WorkspaceBase;
-
+void bsp_start(void)
+{
/* BSP Hardware Initialization*/
/*bfin_mmu_init(sizeof(mmuRegions) / sizeof(mmuRegions[0]), mmuRegions);*/
@@ -96,23 +65,6 @@ void bsp_start(void) {
initPLL(); /* PLL initialization */
initEBIU(); /* EBIU initialization */
initGPIO(); /* GPIO initialization */
-
- /*
- * Allocate the memory for the RTEMS Work Space. This can come from
- * a variety of places: hard coded address, malloc'ed from outside
- * RTEMS world (e.g. simulator or primitive memory manager), or (as
- * typically done by stock BSPs) by subtracting the required amount
- * of work space from the last physical address on the CPU board.
- */
-
- /*
- * Need to "allocate" the memory for the RTEMS Workspace and
- * tell the RTEMS configuration where it is. This memory is
- * not malloc'ed. It is just "pulled from the air".
- */
-
- Configuration.work_space_start = (void *) &_WorkspaceBase;
-
}
/*
diff --git a/c/src/lib/libbsp/bfin/bf537Stamp/startup/linkcmds b/c/src/lib/libbsp/bfin/bf537Stamp/startup/linkcmds
index 3902df4c64..efec1bcbd5 100644
--- a/c/src/lib/libbsp/bfin/bf537Stamp/startup/linkcmds
+++ b/c/src/lib/libbsp/bfin/bf537Stamp/startup/linkcmds
@@ -13,7 +13,6 @@ ENTRY(__start)
*/
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
_RamSize = DEFINED(_RamSize) ? _RamSize : 0x04000000;
-/*_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0200000;*/
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
MEMORY
@@ -112,12 +111,7 @@ SECTIONS
_stack_init = .;
. += _StackSize;
_clear_end = .;
- _WorkspaceBase = .;
- . += 512K; /* reserve some memory for workspace */
- _HeapBase = .;
-/*
- . += _HeapSize;
-*/
+ _WorkArea = .;
_end = .;
__end = .;
} > sdram
@@ -164,7 +158,5 @@ SECTIONS
__RamBase = _RamBase;
__RamSize = _RamSize;
__HeapBase = _HeapBase;
-/*__HeapSize = _HeapSize;*/
-__WorkspaceBase = _WorkspaceBase;
__edata = _edata;
__etext = _etext;