From 7427caa1ae0fdbe1c71c947df401d998223c767f Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 21 Dec 2023 15:16:47 +0100 Subject: bsps/arm: Use shared empty bsp_start_hook_0() Update #4982. --- bsps/arm/beagle/start/bspstarthooks.c | 4 --- bsps/arm/lm3s69xx/start/bspstarthook.c | 5 ---- bsps/arm/shared/start/bspstarthook0-empty.c | 42 ++++++++++++++++++++++++++++ bsps/arm/stm32f4/start/bspstarthook.c | 5 ---- bsps/arm/tms570/start/bspstarthooks.c | 5 ---- bsps/arm/xen/start/bspstarthooks.c | 5 ---- bsps/arm/xilinx-zynqmp/start/bspstarthooks.c | 5 ---- 7 files changed, 42 insertions(+), 29 deletions(-) create mode 100644 bsps/arm/shared/start/bspstarthook0-empty.c (limited to 'bsps/arm') diff --git a/bsps/arm/beagle/start/bspstarthooks.c b/bsps/arm/beagle/start/bspstarthooks.c index e3c380cfb1..69d5256f52 100644 --- a/bsps/arm/beagle/start/bspstarthooks.c +++ b/bsps/arm/beagle/start/bspstarthooks.c @@ -29,10 +29,6 @@ #include #include -BSP_START_TEXT_SECTION void bsp_start_hook_0(void) -{ -} - BSP_START_TEXT_SECTION void bsp_start_hook_1(void) { bsp_start_copy_sections(); diff --git a/bsps/arm/lm3s69xx/start/bspstarthook.c b/bsps/arm/lm3s69xx/start/bspstarthook.c index af6a4c4e1e..14cd554117 100644 --- a/bsps/arm/lm3s69xx/start/bspstarthook.c +++ b/bsps/arm/lm3s69xx/start/bspstarthook.c @@ -9,11 +9,6 @@ #include #include -void BSP_START_TEXT_SECTION bsp_start_hook_0(void) -{ - /* Do nothing */ -} - void BSP_START_TEXT_SECTION bsp_start_hook_1(void) { bsp_start_copy_sections(); diff --git a/bsps/arm/shared/start/bspstarthook0-empty.c b/bsps/arm/shared/start/bspstarthook0-empty.c new file mode 100644 index 0000000000..65e2efcf03 --- /dev/null +++ b/bsps/arm/shared/start/bspstarthook0-empty.c @@ -0,0 +1,42 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSBSPsARMShared + * + * @brief This source file contains a bsp_start_hook_0() implentation which + * does nothing. + */ + +/* + * Copyright (C) 2023 embedded brains GmbH & Co. KG + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +void BSP_START_TEXT_SECTION bsp_start_hook_0( void ) +{ + /* Do nothing */ +} diff --git a/bsps/arm/stm32f4/start/bspstarthook.c b/bsps/arm/stm32f4/start/bspstarthook.c index bbfaed615e..21a9189f26 100644 --- a/bsps/arm/stm32f4/start/bspstarthook.c +++ b/bsps/arm/stm32f4/start/bspstarthook.c @@ -9,11 +9,6 @@ #include #include -void BSP_START_TEXT_SECTION bsp_start_hook_0(void) -{ - /* Do nothing */ -} - void BSP_START_TEXT_SECTION bsp_start_hook_1(void) { bsp_start_copy_sections(); diff --git a/bsps/arm/tms570/start/bspstarthooks.c b/bsps/arm/tms570/start/bspstarthooks.c index f6bf19c754..e7722ab698 100644 --- a/bsps/arm/tms570/start/bspstarthooks.c +++ b/bsps/arm/tms570/start/bspstarthooks.c @@ -27,11 +27,6 @@ #include #include -BSP_START_TEXT_SECTION void bsp_start_hook_0( void ) -{ - ; -} - BSP_START_TEXT_SECTION void bsp_start_hook_1( void ) { bsp_start_copy_sections(); diff --git a/bsps/arm/xen/start/bspstarthooks.c b/bsps/arm/xen/start/bspstarthooks.c index a9e1fbbfb1..6f0e4c3d0c 100644 --- a/bsps/arm/xen/start/bspstarthooks.c +++ b/bsps/arm/xen/start/bspstarthooks.c @@ -29,11 +29,6 @@ #include #include -BSP_START_TEXT_SECTION void bsp_start_hook_0(void) -{ - /* Do nothing */ -} - BSP_START_TEXT_SECTION void bsp_start_hook_1(void) { bsp_start_copy_sections(); diff --git a/bsps/arm/xilinx-zynqmp/start/bspstarthooks.c b/bsps/arm/xilinx-zynqmp/start/bspstarthooks.c index dc414ffb3a..fba23515f7 100644 --- a/bsps/arm/xilinx-zynqmp/start/bspstarthooks.c +++ b/bsps/arm/xilinx-zynqmp/start/bspstarthooks.c @@ -33,11 +33,6 @@ #include #include -BSP_START_TEXT_SECTION void bsp_start_hook_0(void) -{ - /* Nothing to do */ -} - BSP_START_TEXT_SECTION void bsp_start_hook_1(void) { bsp_start_copy_sections(); -- cgit v1.2.3