diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-14 20:04:36 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-14 20:04:36 +0000 |
commit | 12d853d54be8fd75a66a1e9582ce592ff35ed6e3 (patch) | |
tree | b98e1f05b99550a3e84de359c7629178c979db86 /c | |
parent | 2008-09-14 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-12d853d54be8fd75a66a1e9582ce592ff35ed6e3.tar.bz2 |
2008-09-14 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Split out bsp_cleanup() and
bsp_get_work_area() into their own files.
* startup/bspclean.c, startup/bspgetworkarea.c,
startup/bspstart.c: New files.
* startup/start.c: Removed.
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/arm/nds/ChangeLog | 8 | ||||
-rw-r--r-- | c/src/lib/libbsp/arm/nds/Makefile.am | 5 | ||||
-rw-r--r-- | c/src/lib/libbsp/arm/nds/configure.ac | 2 | ||||
-rw-r--r-- | c/src/lib/libbsp/arm/nds/startup/bspclean.c | 31 | ||||
-rw-r--r-- | c/src/lib/libbsp/arm/nds/startup/bspgetworkarea.c | 36 | ||||
-rw-r--r-- | c/src/lib/libbsp/arm/nds/startup/bspstart.c (renamed from c/src/lib/libbsp/arm/nds/startup/start.c) | 49 |
6 files changed, 81 insertions, 50 deletions
diff --git a/c/src/lib/libbsp/arm/nds/ChangeLog b/c/src/lib/libbsp/arm/nds/ChangeLog index e31621a236..d119cb77ad 100644 --- a/c/src/lib/libbsp/arm/nds/ChangeLog +++ b/c/src/lib/libbsp/arm/nds/ChangeLog @@ -1,3 +1,11 @@ +2008-09-14 Joel Sherrill <joel.sherrill@oarcorp.com> + + * Makefile.am, configure.ac: Split out bsp_cleanup() and + bsp_get_work_area() into their own files. + * startup/bspclean.c, startup/bspgetworkarea.c, + startup/bspstart.c: New files. + * startup/start.c: Removed. + 2008-09-10 Joel Sherrill <joel.sherrill@oarcorp.com> * include/bsp.h: Review of all bsp_cleanup() implementations. In this diff --git a/c/src/lib/libbsp/arm/nds/Makefile.am b/c/src/lib/libbsp/arm/nds/Makefile.am index 264cf14ef7..20282cc788 100644 --- a/c/src/lib/libbsp/arm/nds/Makefile.am +++ b/c/src/lib/libbsp/arm/nds/Makefile.am @@ -32,8 +32,9 @@ include_rtems_HEADERS = fb/fb.h touchscreen/touchscreen.h sound/sound.h noinst_PROGRAMS += startup.rel startup_rel_SOURCES = ../../shared/bsplibc.c ../../shared/bsppost.c \ - startup/start.c ../../shared/bsppredriverhook.c \ - ../../shared/bsppretaskinghook.c ../../shared/bootcard.c + startup/bspstart.c startup/bspclean.c startup/bspgetworkarea.c \ + ../../shared/bsppredriverhook.c ../../shared/bsppretaskinghook.c \ + ../../shared/bootcard.c startup_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include startup_rel_LDFLAGS = $(RTEMS_RELLDFLAGS) diff --git a/c/src/lib/libbsp/arm/nds/configure.ac b/c/src/lib/libbsp/arm/nds/configure.ac index 9923363b2e..785b24cde2 100644 --- a/c/src/lib/libbsp/arm/nds/configure.ac +++ b/c/src/lib/libbsp/arm/nds/configure.ac @@ -25,6 +25,8 @@ RTEMS_CONFIG_BUILD_SUBDIRS(tools) ## $srcdir/mk_libnds.sh $srcdir +RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION + # Explicitly list all Makefiles here AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/c/src/lib/libbsp/arm/nds/startup/bspclean.c b/c/src/lib/libbsp/arm/nds/startup/bspclean.c new file mode 100644 index 0000000000..bdfb9d746f --- /dev/null +++ b/c/src/lib/libbsp/arm/nds/startup/bspclean.c @@ -0,0 +1,31 @@ +/* + * This is a dummy bsp_cleanup routine. + * + * COPYRIGHT (c) 1989-1999. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#include <bsp.h> +#include <bsp/bootcard.h> +#include <nds.h> + +/* + * reset the platform using bios call. + */ +void bsp_reset (void) +{ + swiSoftReset (); +} + +void bsp_cleanup( void ) +{ + printk ("[!] executive ended, rebooting\n"); + + bsp_reset (); +} diff --git a/c/src/lib/libbsp/arm/nds/startup/bspgetworkarea.c b/c/src/lib/libbsp/arm/nds/startup/bspgetworkarea.c new file mode 100644 index 0000000000..f962a0fff6 --- /dev/null +++ b/c/src/lib/libbsp/arm/nds/startup/bspgetworkarea.c @@ -0,0 +1,36 @@ +/* + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#include <bsp.h> +#include <bsp/bootcard.h> +#include <stdint.h> + +/* + * These are from the linker script. + */ +extern void * _end; +extern void *__ewram_end; + +/* + * This method returns the base address and size of the area which + * is to be allocated between the RTEMS Workspace and the C Program + * Heap. + */ +void bsp_get_work_area( + void **work_area_start, + size_t *work_area_size, + void **heap_start, + size_t *heap_size +) +{ + *work_area_start = &_end; + *work_area_size = (void *)&__ewram_end - (void *)&_end; + *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA; + *heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT; +} + diff --git a/c/src/lib/libbsp/arm/nds/startup/start.c b/c/src/lib/libbsp/arm/nds/startup/bspstart.c index 2bfe0bab19..05cd9da1f8 100644 --- a/c/src/lib/libbsp/arm/nds/startup/start.c +++ b/c/src/lib/libbsp/arm/nds/startup/bspstart.c @@ -21,35 +21,10 @@ extern unsigned int arm_cpu_mode; /* - * These are from the linker script. - */ -extern uint8_t _end; -extern uint8_t __ewram_end; - -/* - * This method returns the base address and size of the area which - * is to be allocated between the RTEMS Workspace and the C Program - * Heap. - */ -void bsp_get_work_area( - void **work_area_start, - size_t *work_area_size, - void **heap_start, - size_t *heap_size -) -{ - *work_area_start = &_end; - *work_area_size = (void *)&__ewram_end - (void *)&_end; - *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA; - *heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT; -} - -/* * start the platform. */ -void -bsp_start (void) +void bsp_start (void) { /* initialize irq management */ BSP_rtems_irq_mngt_init (); @@ -89,28 +64,6 @@ bss_reset (void) } /* - * reset the platform using bios call. - */ - -void -bsp_reset (void) -{ - swiSoftReset (); -} - -/* - * clean up platform before reset. - */ - -void -bsp_cleanup (void) -{ - printk ("[!] executive ended, rebooting\n"); - - bsp_reset (); -} - -/* * A few symbols needed by libnds but not used. */ |