diff src/cs/layer1/cfile/l1_init.c @ 699:f12872b7eb21

l1_init.c: sync with Tourmaline: L1 recovery ABB init fix
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 09 Jun 2021 18:04:26 +0000
parents 11e279107681
children
line wrap: on
line diff
--- a/src/cs/layer1/cfile/l1_init.c	Wed Jun 09 18:00:44 2021 +0000
+++ b/src/cs/layer1/cfile/l1_init.c	Wed Jun 09 18:04:26 2021 +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   */