[PATCH 38/47] bsp/tms570: Use shared bsp_start_hook_1()

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Dec 21 14:38:11 UTC 2023


---
 bsps/arm/tms570/start/bspstarthooks-hwinit.c | 24 +++-----------------
 bsps/arm/tms570/start/bspstarthooks.c        |  2 +-
 spec/build/bsps/arm/tms570/objhwinit.yml     |  1 +
 3 files changed, 5 insertions(+), 22 deletions(-)

diff --git a/bsps/arm/tms570/start/bspstarthooks-hwinit.c b/bsps/arm/tms570/start/bspstarthooks-hwinit.c
index a0d80da2a9..67c3768a36 100644
--- a/bsps/arm/tms570/start/bspstarthooks-hwinit.c
+++ b/bsps/arm/tms570/start/bspstarthooks-hwinit.c
@@ -5,7 +5,7 @@
  *
  * @ingroup RTEMSBSPsARMTMS570
  *
- * @brief This source file contains the start hooks implementation.
+ * @brief This source file contains the bsp_start_hook_0() implementation.
  */
 
 /*
@@ -335,6 +335,8 @@ static RTEMS_USED void tms570_start_hook_0( void )
   /* Configure system response to error conditions signaled to the ESM group1 */
   tms570_esm_init();
 
+  tms570_emif_sdram_init();
+
 #if 1
   /*
    * Do not depend on link register to be restored to
@@ -345,26 +347,6 @@ static RTEMS_USED void tms570_start_hook_0( void )
 #endif
 }
 
-BSP_START_TEXT_SECTION void bsp_start_hook_1( void )
-{
-  /* At this point we can use objects outside the .start section  */
-#if 0
-  /* Do not run attempt to initialize MPU when code is running from SDRAM */
-  if ( !tms570_running_from_sdram() ) {
-    /*
-     * MPU background areas setting has to be overlaid
-     * if execution of code is required from external memory/SDRAM.
-     * This region is non executable by default.
-     */
-    _mpuInit_();
-  }
-#endif
-  tms570_emif_sdram_init();
-
-  bsp_start_copy_sections();
-  bsp_start_clear_bss();
-}
-
 /*
  * Chip specific list of peripherals which should be tested
  * for functional RAM parity reporting
diff --git a/bsps/arm/tms570/start/bspstarthooks.c b/bsps/arm/tms570/start/bspstarthooks.c
index 3e4011ce1c..71ebf9f32d 100644
--- a/bsps/arm/tms570/start/bspstarthooks.c
+++ b/bsps/arm/tms570/start/bspstarthooks.c
@@ -5,7 +5,7 @@
  *
  * @ingroup RTEMSBSPsARMTMS570
  *
- * @brief This source file contains the start hooks implementation.
+ * @brief This source file contains the bsp_start_hook_1(0 implementation.
  */
 
 /*
diff --git a/spec/build/bsps/arm/tms570/objhwinit.yml b/spec/build/bsps/arm/tms570/objhwinit.yml
index 436b3e3b53..8cd5d0d393 100644
--- a/spec/build/bsps/arm/tms570/objhwinit.yml
+++ b/spec/build/bsps/arm/tms570/objhwinit.yml
@@ -14,6 +14,7 @@ install:
   - bsps/arm/tms570/include/bsp/ti_herc/errata_SSWF021_45.h
 links: []
 source:
+- bsps/arm/tms570/start/bspstarthooks.c
 - bsps/arm/tms570/start/bspstarthooks-hwinit.c
 - bsps/arm/tms570/start/errata_SSWF021_45.c
 - bsps/arm/tms570/start/fail_notification.c
-- 
2.35.3



More information about the devel mailing list