changeset 216:2be687f4476c default tip

l1_init.c: sync with Tourmaline: L1 recovery ABB init fix
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 31 Oct 2022 01:23:14 +0000
parents ed876f98fdfd
children
files src/cs/layer1/cfile/l1_init.c
diffstat 1 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/cs/layer1/cfile/l1_init.c	Mon Oct 31 01:20:40 2022 +0000
+++ b/src/cs/layer1/cfile/l1_init.c	Mon Oct 31 01:23:14 2022 +0000
@@ -722,10 +722,18 @@
     Abb->TspEnLevel   = SPI_NTSPEN_NEG_LEV;
     Abb->TspEnForm    = SPI_NTSPEN_LEV_TRIG;
 
-    SPI_InitDev(Abb);                   /* Initialize the spi to work with ABB */
+    /*
+     * FreeCalypso change: skip the following two non-semaphore-protected
+     * steps in the case of L1/DSP recovery, and limit our ABB poking to
+     * semaphore-protected functions.
+     */
+    if (l1a_l1s_com.recovery_flag == FALSE)
+    {
+      SPI_InitDev(Abb);              /* Initialize the spi to work with ABB */
+      ABB_free_13M();                /* Set up Abb connection (CLK 13M free).*/
+    }
 
-    ABB_free_13M();                     /* Set up Abb connection (CLK 13M free).*/
-    Abb_Status = ABB_Read_Status();     /* Aknowledge the Abb status register.  */
+    Abb_Status = ABB_Read_Status();  /* Aknowledge the Abb status register.  */
 
     /*------------------------------------------------------------------*/
     /* Add here SW to manage Abb VRPCSTS status register informations   */