[PATCH 26/47] bsp/tms570: Add TMS570LC4357 power support

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


From: Tyler Miller <tyler.miller at airbusus.com>

---
 bsps/arm/tms570/include/bsp/tms570.h |  9 ++++++++-
 bsps/arm/tms570/start/init_system.c  | 21 +++++++++++++++++----
 2 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/bsps/arm/tms570/include/bsp/tms570.h b/bsps/arm/tms570/include/bsp/tms570.h
index c057664b9a..b5b8a176c1 100644
--- a/bsps/arm/tms570/include/bsp/tms570.h
+++ b/bsps/arm/tms570/include/bsp/tms570.h
@@ -13,6 +13,7 @@
 /* https://github.com/AoLaD/rtems-tms570-utils/tree/headers/headers/python */
 
 /*
+ * Copyright (C) 2022 Airbus U.S. Space & Defense, Inc
  * Copyright (c) 2014-2015, Premysl Houdek <kom541000 at gmail.com>
  *
  * Czech Technical University in Prague
@@ -164,5 +165,11 @@
 #define TMS570_STC (*(volatile tms570_stc_t*)0xFFFFE600)
 #define TMS570_SYS1 (*(volatile tms570_sys1_t*)0xFFFFFF00)
 #define TMS570_SYS2 (*(volatile tms570_sys2_t*)0xFFFFE100)
-#define TMS570_PCR (*(volatile tms570_pcr_t*)0xFFFFE000)
+#if TMS570_VARIANT == 4357
+#define TMS570_PCR1 (*(volatile tms570_pcr_t*)0xFFFF1000)
+#define TMS570_PCR2 (*(volatile tms570_pcr_t*)0xFCFF1000)
+#define TMS570_PCR3 (*(volatile tms570_pcr_t*)0xFFF78000)
+#else
+#define TMS570_PCR1 (*(volatile tms570_pcr_t*)0xFFFFE000)
+#endif
 #endif /* LIBBSP_ARM_TMS570 */
diff --git a/bsps/arm/tms570/start/init_system.c b/bsps/arm/tms570/start/init_system.c
index 07727ce9dd..a384959d4a 100644
--- a/bsps/arm/tms570/start/init_system.c
+++ b/bsps/arm/tms570/start/init_system.c
@@ -9,6 +9,7 @@
  */
 
 /*
+ * Copyright (C) 2022 Airbus U.S. Space & Defense, Inc
  * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com
  *
  *
@@ -187,10 +188,22 @@ void tms570_periph_init( void )
 
   /** - Release peripherals from reset and enable clocks to all peripherals */
   /** - Power-up all peripherals */
-  TMS570_PCR.PSPWRDWNCLR0 = 0xFFFFFFFFU;
-  TMS570_PCR.PSPWRDWNCLR1 = 0xFFFFFFFFU;
-  TMS570_PCR.PSPWRDWNCLR2 = 0xFFFFFFFFU;
-  TMS570_PCR.PSPWRDWNCLR3 = 0xFFFFFFFFU;
+  TMS570_PCR1.PSPWRDWNCLR0 = 0xFFFFFFFFU;
+  TMS570_PCR1.PSPWRDWNCLR1 = 0xFFFFFFFFU;
+  TMS570_PCR1.PSPWRDWNCLR2 = 0xFFFFFFFFU;
+  TMS570_PCR1.PSPWRDWNCLR3 = 0xFFFFFFFFU;
+
+#if TMS570_VARIANT == 4357
+  TMS570_PCR2.PSPWRDWNCLR0 = 0xFFFFFFFFU;
+  TMS570_PCR2.PSPWRDWNCLR1 = 0xFFFFFFFFU;
+  TMS570_PCR2.PSPWRDWNCLR2 = 0xFFFFFFFFU;
+  TMS570_PCR2.PSPWRDWNCLR3 = 0xFFFFFFFFU;
+
+  TMS570_PCR3.PSPWRDWNCLR0 = 0xFFFFFFFFU;
+  TMS570_PCR3.PSPWRDWNCLR1 = 0xFFFFFFFFU;
+  TMS570_PCR3.PSPWRDWNCLR2 = 0xFFFFFFFFU;
+  TMS570_PCR3.PSPWRDWNCLR3 = 0xFFFFFFFFU;
+#endif
 
   /** - Enable Peripherals */
   TMS570_SYS1.CLKCNTL |= TMS570_SYS1_CLKCNTL_PENA;
-- 
2.35.3



More information about the devel mailing list