]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/commitdiff
Board: Updated Board MMR unlock call sequence for j784s4 evm
authorReddy <x0257344@ti.com>
Thu, 23 Jun 2022 10:29:13 +0000 (05:29 -0500)
committerDon Dominic <dondmadappallil@ti.com>
Thu, 23 Jun 2022 10:53:10 +0000 (05:53 -0500)
 - Board MMR unlock function is called at the start of Board_init based
   on the flag passed by applications. Board functions like pinmux and
   eth config will also does the mmr unlock and lock which will
   overwrite the unlock done by Board init MMR unlock flag.
   Applications will face issues in MMR unlock when then combine the MMR
   unlock flag with other board init flags which does MMR writes.
   Moved the MMR unlock to end of Board_init to fix the issue.

packages/ti/board/src/j784s4_evm/board_init.c

index c9bdb159d6abc7adaa5b00712a62085e43dc7826..2f0976c1824a2f4f457f0f72a23b2a2096645865 100644 (file)
@@ -207,11 +207,6 @@ Board_STATUS Board_init(Board_initCfg cfg)
         Board_sysInit();
     }
 
-    if (cfg & BOARD_INIT_UNLOCK_MMR)
-        ret = Board_unlockMMR();
-    if (ret != BOARD_SOK)
-        return ret;
-
     if (cfg & BOARD_INIT_ENETCTRL_CPSW2G)
         ret = Board_ethConfigCpsw2g();
     if (ret != BOARD_SOK)
@@ -317,6 +312,11 @@ Board_STATUS Board_init(Board_initCfg cfg)
     if (ret != BOARD_SOK)
         return ret;
 
+    if (cfg & BOARD_INIT_UNLOCK_MMR)
+        ret = Board_unlockMMR();
+    if (ret != BOARD_SOK)
+        return ret;
+
     return ret;
 }