diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-20 21:39:53 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-20 21:39:53 +0000 |
commit | f044f9c20ebf47b07d877ca8f7a11977e7f34dc9 (patch) | |
tree | ef02488299b57156b9beb03e81a2b306ad54d477 /c/src/lib/libbsp/powerpc/gen83xx/startup | |
parent | 2008-09-20 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-f044f9c20ebf47b07d877ca8f7a11977e7f34dc9.tar.bz2 |
2008-09-20 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, include/bsp.h, start/start.S, startup/bspstart.c,
startup/cpuinit.c: Use top level shared bsp_get_work_area()
implementation. Augment it to know about U-Boot.
* startup/bspgetworkarea.c: Removed.
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/powerpc/gen83xx/startup/bspgetworkarea.c | 55 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c | 8 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/gen83xx/startup/cpuinit.c | 18 |
3 files changed, 13 insertions, 68 deletions
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/startup/bspgetworkarea.c b/c/src/lib/libbsp/powerpc/gen83xx/startup/bspgetworkarea.c deleted file mode 100644 index 70062dcc84..0000000000 --- a/c/src/lib/libbsp/powerpc/gen83xx/startup/bspgetworkarea.c +++ /dev/null @@ -1,55 +0,0 @@ -/** - * @file - * - * @ingroup mpc83xx - * - * @brief Source for BSP startup code. - */ - -/* - * Copyright (c) 2008 - * Embedded Brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * rtems@embedded-brains.de - * - * 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> - -/* - * These are provided by the linkcmds for ALL of the BSPs which use this file. - */ -extern char RamBase[]; -extern char WorkAreaBase[]; -extern char HeapSize[]; -extern char RamSize[]; - -#ifdef HAS_UBOOT - extern bd_t mpc83xx_uboot_board_info; -#endif /* HAS_UBOOT */ - -void bsp_get_work_area( - void **work_area_start, - size_t *work_area_size, - void **heap_start, - size_t *heap_size) -{ - #ifdef HAS_UBOOT - char *ram_end = (char *) mpc83xx_uboot_board_info.bi_memstart + - mpc83xx_uboot_board_info.bi_memsize; - #else /* HAS_UBOOT */ - char *ram_end = RamBase + (uintptr_t)RamSize; - #endif /* HAS_UBOOT */ - - *work_area_start = bsp_work_area_start; - *work_area_size = ram_end - bsp_work_area_start; - *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA; - *heap_size = HeapSize; -} diff --git a/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c b/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c index 46ef22ac75..ae4564c6cc 100644 --- a/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c @@ -34,10 +34,10 @@ * We want this in the data section, because the startup code clears the BSS * section after the initialization of the board info. */ -bd_t mpc83xx_uboot_board_info = { .bi_baudrate = 123 }; +bd_t bsp_uboot_board_info = { .bi_baudrate = 123 }; /* Size in words */ -const size_t mpc83xx_uboot_board_info_size = (sizeof( bd_t) + 3) / 4; +const size_t bsp_uboot_board_info_size = (sizeof( bd_t) + 3) / 4; #endif /* HAS_UBOOT */ @@ -122,8 +122,8 @@ void bsp_start( void) /* Initialize some device driver parameters */ #ifdef HAS_UBOOT - BSP_bus_frequency = mpc83xx_uboot_board_info.bi_busfreq; - bsp_clicks_per_usec = mpc83xx_uboot_board_info.bi_busfreq / 4000000; + BSP_bus_frequency = bsp_uboot_board_info.bi_busfreq; + bsp_clicks_per_usec = bsp_uboot_board_info.bi_busfreq / 4000000; #else /* HAS_UBOOT */ BSP_bus_frequency = BSP_CLKIN_FRQ * BSP_SYSPLL_MF / BSP_SYSPLL_CKID; bsp_clicks_per_usec = BSP_bus_frequency / 1000000; diff --git a/c/src/lib/libbsp/powerpc/gen83xx/startup/cpuinit.c b/c/src/lib/libbsp/powerpc/gen83xx/startup/cpuinit.c index ff75a34adc..6cfa7fc02b 100644 --- a/c/src/lib/libbsp/powerpc/gen83xx/startup/cpuinit.c +++ b/c/src/lib/libbsp/powerpc/gen83xx/startup/cpuinit.c @@ -167,8 +167,8 @@ void cpu_init( void) calc_dbat_regvals( &ibat, #ifdef HAS_UBOOT - mpc83xx_uboot_board_info.bi_memstart, - mpc83xx_uboot_board_info.bi_memsize, + bsp_uboot_board_info.bi_memstart, + bsp_uboot_board_info.bi_memsize, #else /* HAS_UBOOT */ (uint32_t) bsp_ram_start, (uint32_t) bsp_ram_size, @@ -184,8 +184,8 @@ void cpu_init( void) calc_dbat_regvals( &ibat, #ifdef HAS_UBOOT - mpc83xx_uboot_board_info.bi_flashstart, - mpc83xx_uboot_board_info.bi_flashsize, + bsp_uboot_board_info.bi_flashstart, + bsp_uboot_board_info.bi_flashsize, #else /* HAS_UBOOT */ (uint32_t) bsp_rom_start, (uint32_t) bsp_rom_size, @@ -212,8 +212,8 @@ void cpu_init( void) calc_dbat_regvals( &dbat, #ifdef HAS_UBOOT - mpc83xx_uboot_board_info.bi_memstart, - mpc83xx_uboot_board_info.bi_memsize, + bsp_uboot_board_info.bi_memstart, + bsp_uboot_board_info.bi_memsize, #else /* HAS_UBOOT */ (uint32_t) bsp_ram_start, (uint32_t) bsp_ram_size, @@ -229,8 +229,8 @@ void cpu_init( void) calc_dbat_regvals( &dbat, #ifdef HAS_UBOOT - mpc83xx_uboot_board_info.bi_flashstart, - mpc83xx_uboot_board_info.bi_flashsize, + bsp_uboot_board_info.bi_flashstart, + bsp_uboot_board_info.bi_flashsize, #else /* HAS_UBOOT */ (uint32_t) bsp_rom_start, (uint32_t) bsp_rom_size, @@ -246,7 +246,7 @@ void cpu_init( void) calc_dbat_regvals( &dbat, #ifdef HAS_UBOOT - mpc83xx_uboot_board_info.bi_immrbar, + bsp_uboot_board_info.bi_immrbar, #else /* HAS_UBOOT */ (uint32_t) IMMRBAR, #endif /* HAS_UBOOT */ |