[PDK-8824] Added pimux config to board init
authorAditya Wadhwa <a0485151@ti.com>
Fri, 4 Dec 2020 16:31:01 +0000 (22:01 +0530)
committerSivaraj R <sivaraj@ti.com>
Thu, 10 Dec 2020 05:19:47 +0000 (23:19 -0600)
- Added the necessary pinmux config in board init to enable probing from expansion board
- Minor bugfix in init function return statement

Signed-off-by: Aditya Wadhwa <a0485151@ti.com>
packages/ti/drv/gpmc/example/src/main_gpmc_probing_example.c

index 04a9132547ef0d2a013ba90628e9c272104b58f1..9beca671e6470b9331a1333f2b75a0df020c23db 100755 (executable)
@@ -218,14 +218,7 @@ uint32_t GPMC_configClk(uint32_t freq)
     GPMC_log("\n GPMC CLK running at %d Hz. \n", freq);
 
 clk_cfg_exit:
-    if (retVal == CSL_PASS)
-    {
-        return TRUE;
-    }
-    else
-    {
-        return FALSE;
-    }
+    return retVal;
 }
 #endif
 
@@ -234,6 +227,13 @@ int32_t Board_initGPMC(void)
     int32_t       status = GPMC_APP_STATUS_SUCCESS;
     Board_initCfg boardCfg;
     Board_STATUS  boardStatus;
+    Board_PinmuxConfig_t gpmcPinmux;
+
+    /* Pinmux configuration to enable probing from expansion board */
+    Board_pinmuxGetCfg(&gpmcPinmux);
+    gpmcPinmux.muxCfg = BOARD_PINMUX_CUSTOM;
+    gpmcPinmux.expBoardMux = BOARD_PINMUX_EXP_GPMC;
+    Board_pinmuxSetCfg(&gpmcPinmux);
 
     boardCfg = BOARD_INIT_MODULE_CLOCK  |
                BOARD_INIT_PINMUX_CONFIG |