From 24d09194b7b9b13bbda2b21127d9dfe904e5d6a7 Mon Sep 17 00:00:00 2001 From: Szkocsovszki Zsolt Date: Sat, 14 Dec 2013 17:20:50 +0100 Subject: bsp: Move bspstart.c to sh/shared/startup/ --- c/src/lib/libbsp/sh/gensh1/Makefile.am | 2 +- c/src/lib/libbsp/sh/gensh2/Makefile.am | 2 +- c/src/lib/libbsp/sh/gensh4/Makefile.am | 2 +- c/src/lib/libbsp/sh/shared/bspstart.c | 62 --------------------------- c/src/lib/libbsp/sh/shared/startup/bspstart.c | 62 +++++++++++++++++++++++++++ c/src/lib/libbsp/sh/shsim/Makefile.am | 2 +- 6 files changed, 66 insertions(+), 66 deletions(-) delete mode 100644 c/src/lib/libbsp/sh/shared/bspstart.c create mode 100644 c/src/lib/libbsp/sh/shared/startup/bspstart.c diff --git a/c/src/lib/libbsp/sh/gensh1/Makefile.am b/c/src/lib/libbsp/sh/gensh1/Makefile.am index c6249edb11..200cfa07cd 100644 --- a/c/src/lib/libbsp/sh/gensh1/Makefile.am +++ b/c/src/lib/libbsp/sh/gensh1/Makefile.am @@ -33,7 +33,7 @@ CLEANFILES = scitab.c # startup libbsp_a_SOURCES += ../../shared/bsplibc.c ../../shared/bsppost.c \ - ../../shared/bsppredriverhook.c ../shared/bspstart.c \ + ../../shared/bsppredriverhook.c ../shared/startup/bspstart.c \ ../../shared/bspclean.c ../../shared/bspreset_loop.c \ ../../shared/bspgetworkarea.c ../../shared/bsppretaskinghook.c \ ../../shared/sbrk.c ../../shared/bootcard.c ../shared/bsphwinit.c \ diff --git a/c/src/lib/libbsp/sh/gensh2/Makefile.am b/c/src/lib/libbsp/sh/gensh2/Makefile.am index 6339206624..0b3aa01f71 100644 --- a/c/src/lib/libbsp/sh/gensh2/Makefile.am +++ b/c/src/lib/libbsp/sh/gensh2/Makefile.am @@ -36,7 +36,7 @@ CLEANFILES = scitab.c # startup libbsp_a_SOURCES += startup/hw_init.c ../../shared/bsplibc.c \ ../../shared/bsppost.c ../../shared/bsppredriverhook.c \ - ../shared/bspstart.c ../../shared/bsppretaskinghook.c \ + ../shared/startup/bspstart.c ../../shared/bsppretaskinghook.c \ ../../shared/bspgetworkarea.c ../../shared/sbrk.c ../../shared/bootcard.c \ ../../shared/gnatinstallhandler.c ../../shared/bspclean.c \ ../shared/bsphwinit.c diff --git a/c/src/lib/libbsp/sh/gensh4/Makefile.am b/c/src/lib/libbsp/sh/gensh4/Makefile.am index 70b667b2c7..cf34c08d2a 100644 --- a/c/src/lib/libbsp/sh/gensh4/Makefile.am +++ b/c/src/lib/libbsp/sh/gensh4/Makefile.am @@ -28,7 +28,7 @@ libbsp_a_SOURCES = # startup libbsp_a_SOURCES += ../../shared/bsplibc.c ../../shared/bsppost.c \ - ../../shared/bsppredriverhook.c ../shared/bspstart.c \ + ../../shared/bsppredriverhook.c ../shared/startup/bspstart.c \ ../../shared/bsppretaskinghook.c ../../shared/bspgetworkarea.c \ ../../shared/bspclean.c ../../shared/sbrk.c ../../shared/bootcard.c \ ../../shared/gnatinstallhandler.c ../shared/bsphwinit.c diff --git a/c/src/lib/libbsp/sh/shared/bspstart.c b/c/src/lib/libbsp/sh/shared/bspstart.c deleted file mode 100644 index c43c9cb5fd..0000000000 --- a/c/src/lib/libbsp/sh/shared/bspstart.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - * This routine starts the application. It includes application, - * board, and monitor specific initialization and configuration. - * The generic CPU dependent initialization has been performed - * before this routine is invoked. - * - * COPYRIGHT (c) 2001. - * Ralf Corsepius (corsepiu@faw.uni-ulm.de). - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * COPYRIGHT (c) 2001. - * 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. - */ - -#include - -uint32_t bsp_clicks_per_second; - -#ifndef START_HW_INIT - void bsp_hw_init(void); -#endif - -/* - * bsp_start - * - * This routine does the bulk of the system initialization. - */ -void bsp_start( void ) -{ - /* - * For real boards you need to setup the hardware - * and need to copy the vector table from rom to ram. - * - * Depending on the board this can either be done from inside the rom - * startup code, rtems startup code or here. - */ - - #ifndef START_HW_INIT - /* board hardware setup here, or from 'start.S' */ - bsp_hw_init(); - #endif - - /* - * initialize the interrupt stack for this BSP - */ - #if ( CPU_ALLOCATE_INTERRUPT_STACK == FALSE ) - _CPU_Interrupt_stack_low = &CPU_Interrupt_stack_low ; - _CPU_Interrupt_stack_high = &CPU_Interrupt_stack_high ; - #endif - - /* - * initialize the device driver parameters - */ - bsp_clicks_per_second = CPU_CLOCK_RATE_HZ; -} diff --git a/c/src/lib/libbsp/sh/shared/startup/bspstart.c b/c/src/lib/libbsp/sh/shared/startup/bspstart.c new file mode 100644 index 0000000000..c43c9cb5fd --- /dev/null +++ b/c/src/lib/libbsp/sh/shared/startup/bspstart.c @@ -0,0 +1,62 @@ +/* + * This routine starts the application. It includes application, + * board, and monitor specific initialization and configuration. + * The generic CPU dependent initialization has been performed + * before this routine is invoked. + * + * COPYRIGHT (c) 2001. + * Ralf Corsepius (corsepiu@faw.uni-ulm.de). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * COPYRIGHT (c) 2001. + * 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. + */ + +#include + +uint32_t bsp_clicks_per_second; + +#ifndef START_HW_INIT + void bsp_hw_init(void); +#endif + +/* + * bsp_start + * + * This routine does the bulk of the system initialization. + */ +void bsp_start( void ) +{ + /* + * For real boards you need to setup the hardware + * and need to copy the vector table from rom to ram. + * + * Depending on the board this can either be done from inside the rom + * startup code, rtems startup code or here. + */ + + #ifndef START_HW_INIT + /* board hardware setup here, or from 'start.S' */ + bsp_hw_init(); + #endif + + /* + * initialize the interrupt stack for this BSP + */ + #if ( CPU_ALLOCATE_INTERRUPT_STACK == FALSE ) + _CPU_Interrupt_stack_low = &CPU_Interrupt_stack_low ; + _CPU_Interrupt_stack_high = &CPU_Interrupt_stack_high ; + #endif + + /* + * initialize the device driver parameters + */ + bsp_clicks_per_second = CPU_CLOCK_RATE_HZ; +} diff --git a/c/src/lib/libbsp/sh/shsim/Makefile.am b/c/src/lib/libbsp/sh/shsim/Makefile.am index bc039bbeb5..aa4039619f 100644 --- a/c/src/lib/libbsp/sh/shsim/Makefile.am +++ b/c/src/lib/libbsp/sh/shsim/Makefile.am @@ -27,7 +27,7 @@ libbsp_a_SOURCES = # startup libbsp_a_SOURCES += ../../shared/bsplibc.c ../../shared/bsppost.c \ - ../../shared/bsppredriverhook.c ../shared/bspstart.c \ + ../../shared/bsppredriverhook.c ../shared/startup/bspstart.c \ ../../shared/bsppretaskinghook.c ../../shared/bspgetworkarea.c \ ../../shared/bspclean.c ../../shared/sbrk.c ../../shared/bootcard.c \ ../../shared/gnatinstallhandler.c ../shared/bsphwinit.c -- cgit v1.2.3