From 571216aceef5d59bec8022f119a0cecf97544f6f Mon Sep 17 00:00:00 2001 From: Chirayu Desai Date: Sat, 23 Nov 2013 19:51:03 +0530 Subject: powerpc/mpc55xxevb: Move bspworkareainit.c to bspgetworkarea.c * Move bsp_work_area_initialize() --- c/src/lib/libbsp/powerpc/mpc55xxevb/Makefile.am | 2 +- .../powerpc/mpc55xxevb/startup/bspworkarea.c | 53 ++++++++++++++++++++++ .../powerpc/mpc55xxevb/startup/bspworkareainit.c | 53 ---------------------- 3 files changed, 54 insertions(+), 54 deletions(-) create mode 100644 c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspworkarea.c delete mode 100644 c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspworkareainit.c diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/Makefile.am b/c/src/lib/libbsp/powerpc/mpc55xxevb/Makefile.am index 5412b4ca36..ed9b884642 100644 --- a/c/src/lib/libbsp/powerpc/mpc55xxevb/Makefile.am +++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/Makefile.am @@ -74,7 +74,7 @@ libbsp_a_SOURCES += ../shared/src/memcpy.c libbsp_a_SOURCES += ../shared/src/tictac.c libbsp_a_SOURCES += ../shared/src/ppc-exc-handler-table.c libbsp_a_SOURCES += startup/bspstart.c -libbsp_a_SOURCES += startup/bspworkareainit.c +libbsp_a_SOURCES += startup/bspworkarea.c libbsp_a_SOURCES += startup/exc-vector-base.S libbsp_a_SOURCES += startup/get-system-clock.c libbsp_a_SOURCES += startup/bspreset.c diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspworkarea.c b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspworkarea.c new file mode 100644 index 0000000000..2b42be9f98 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspworkarea.c @@ -0,0 +1,53 @@ +/** + * @file + * + * @ingroup mpc55xx + */ + +/* + * Copyright (c) 2012 embedded brains GmbH. All rights reserved. + * + * embedded brains GmbH + * Obere Lagerstr. 30 + * 82178 Puchheim + * Germany + * + * + * 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. + */ + +#include +#include +#include + +LINKER_SYMBOL(bsp_section_work_bonus_begin); +LINKER_SYMBOL(bsp_section_work_bonus_size); + +void bsp_work_area_initialize(void) +{ + Heap_Area areas [] = { + { + bsp_section_work_begin, + (uintptr_t) bsp_section_work_size + }, { + bsp_section_work_bonus_begin, + (uintptr_t) bsp_section_work_bonus_size + } + }; + + #ifdef BSP_INTERRUPT_STACK_AT_WORK_AREA_BEGIN + { + uint32_t stack_size = rtems_configuration_get_interrupt_stack_size(); + + areas [0].begin = (char *) areas [0].begin + stack_size; + areas [0].size -= stack_size; + } + #endif + + bsp_work_area_initialize_with_table( + areas, + sizeof(areas) / sizeof(areas [0]) + ); +} diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspworkareainit.c b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspworkareainit.c deleted file mode 100644 index 2b42be9f98..0000000000 --- a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspworkareainit.c +++ /dev/null @@ -1,53 +0,0 @@ -/** - * @file - * - * @ingroup mpc55xx - */ - -/* - * Copyright (c) 2012 embedded brains GmbH. All rights reserved. - * - * embedded brains GmbH - * Obere Lagerstr. 30 - * 82178 Puchheim - * Germany - * - * - * 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. - */ - -#include -#include -#include - -LINKER_SYMBOL(bsp_section_work_bonus_begin); -LINKER_SYMBOL(bsp_section_work_bonus_size); - -void bsp_work_area_initialize(void) -{ - Heap_Area areas [] = { - { - bsp_section_work_begin, - (uintptr_t) bsp_section_work_size - }, { - bsp_section_work_bonus_begin, - (uintptr_t) bsp_section_work_bonus_size - } - }; - - #ifdef BSP_INTERRUPT_STACK_AT_WORK_AREA_BEGIN - { - uint32_t stack_size = rtems_configuration_get_interrupt_stack_size(); - - areas [0].begin = (char *) areas [0].begin + stack_size; - areas [0].size -= stack_size; - } - #endif - - bsp_work_area_initialize_with_table( - areas, - sizeof(areas) / sizeof(areas [0]) - ); -} -- cgit v1.2.3