PDK-6948: Board: Added mmr unlock after pinmux config in am64x evm board
authorM V Pratap Reddy <x0257344@ti.com>
Fri, 20 Nov 2020 03:49:17 +0000 (21:49 -0600)
committerReddy <x0257344@ti.com>
Fri, 20 Nov 2020 03:59:24 +0000 (09:29 +0530)
lib

packages/ti/board/src/am64x_evm/board_mmr.c
packages/ti/board/src/am64x_evm/board_pinmux.c
packages/ti/board/src/am64x_evm/include/board_internal.h

index b4c585edd2282683a866c5e4516368798818b54e..190db2d7d17d5e2db76ee2248f0ef74e8f155d5d 100644 (file)
@@ -295,3 +295,15 @@ Board_STATUS Board_unlockMMR(void)
     return BOARD_SOK;\r
 }\r
 \r
+/**\r
+ * \brief  Locks MMR registers\r
+ *\r
+ * \return  Board_STATUS\r
+ */\r
+Board_STATUS Board_lockMMR(void)\r
+{\r
+    MAIN_PADCONFIG_MMR_lock_all();\r
+    MCU_PADCONFIG_MMR_lock_all();\r
+    return BOARD_SOK;\r
+}\r
+\r
index 0e9c6f68e79a80707ebe1a5b8eba1f2d4975b7af..6a3466f9e66d2cb23af070e362a9d294ae2197cf 100644 (file)
@@ -58,9 +58,6 @@
 Board_STATUS Board_pinmuxConfig (void)\r
 {\r
 #ifndef BUILD_M4F\r
-    /* Board_unlockMMR */\r
-    HW_WR_REG32(BOARD_UART_TX_LOCK_KICK_ADDR, KICK0_UNLOCK_VAL);\r
-    HW_WR_REG32(BOARD_UART_TX_LOCK_KICK_ADDR + 4U, KICK1_UNLOCK_VAL);\r
 \r
     Board_unlockMMR();\r
 \r
@@ -101,6 +98,8 @@ Board_STATUS Board_pinmuxConfig (void)
             }\r
         }\r
     }\r
+\r
+    Board_lockMMR();\r
 #endif /* #ifndef BUILD_M4F */\r
     return BOARD_SOK;\r
 }\r
index 7776c604da5e811411b11fc18ee336f20a21c687..4971b06e2ccabca7c4cec2ff99a7c357ff5bb8e5 100644 (file)
@@ -251,6 +251,13 @@ I2C_Handle Board_getI2CHandle(uint8_t domainType,
  */\r
 Board_STATUS Board_unlockMMR(void);\r
 \r
+/**\r
+ * \brief  Locks MMR registers\r
+ *\r
+ * \return  Board_STATUS\r
+ */\r
+Board_STATUS Board_lockMMR(void);\r
+\r
 /**\r
  *  \brief Serdes configurations\r
  *\r