summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b725782)
raw | patch | inline | side by side (parent: b725782)
author | M V Pratap Reddy <x0257344@ti.com> | |
Mon, 2 Nov 2020 03:32:35 +0000 (09:02 +0530) | ||
committer | Sivaraj R <sivaraj@ti.com> | |
Mon, 2 Nov 2020 04:59:31 +0000 (22:59 -0600) |
- This is for usage in the Radar applications which cannot integrate
drivers like uart due to memory constraints.
drivers like uart due to memory constraints.
packages/ti/board/board.h | patch | blob | history | |
packages/ti/board/src/tpr12_evm/board_init.c | patch | blob | history |
index b0abb86eea3af28945dd637d9070b30d292b74eb..c22ce59bbf952bf9b98ccaee72b874629744b06b 100755 (executable)
*/
Board_STATUS Board_init(Board_initCfg cfg);
+/**
+ * \brief Board library initialization function with limited module initializations
+ *
+ * This is ligher version of board init function which does not include the
+ * initialization of modules that depend on drivers. This can be used on
+ * platforms which are low on memory footprint.
+ *
+ * Please refer the board specific init code for list module init supported
+ * by this function.
+ *
+ * \param cfg [IN] Board configuration flags
+ *
+ * \return BOARD_SOK in case of success or appropriate error code
+ */
+Board_STATUS Board_initLite(Board_initCfg cfg);
+
/**
* @brief Board library deinitialization function
*
diff --git a/packages/ti/board/src/tpr12_evm/board_init.c b/packages/ti/board/src/tpr12_evm/board_init.c
index b9b35beda75ebe5e68a200ef65d601896eb5e7ca..7eec5626a76f3ee20e449987d6c95084962fd8cf 100755 (executable)
return ret;
}
+/**
+ * \brief Board library initialization function with limited module initializations
+ *
+ * Different board initialization routines are invoked by using configuration
+ * flags as described below
+ * BOARD_INIT_UNLOCK_MMR -
+ * Unlocks the MMR registers of the SoC. MMR registers should be
+ * enabled before any write access to MMR register address space.
+ *
+ * BOARD_INIT_PLL -
+ * Configures different PLL controller modules. This enables all the PLL
+ * controllers on the SoC with default configurations. Any custom values
+ * required for PLL output needs to be done separately
+ *
+ * BOARD_INIT_PINMUX_CONFIG -
+ * Enables pinmux for the board interfaces. Pin mux is done based on the
+ * default/primary functionality of the board. Any pins shared by multiple
+ * interfaces need to be reconfigured to access the secondary functionality.
+ *
+ * BOARD_INIT_MODULE_CLOCK -
+ * Enables different power domains and peripheral clocks of the SoC.
+ * Some of the power domains and peripherals will be off by default.
+ * Enabling the power domains is mandatory before accessing using
+ * board interfaces connected to those peripherals.
+ *
+ * \param cfg [IN] Board configuration flags
+ *
+ * \return BOARD_SOK in case of success or appropriate error code
+ */
+Board_STATUS Board_initLite(Board_initCfg cfg)
+{
+ Board_STATUS ret = BOARD_SOK;
+
+ if (cfg & BOARD_INIT_UNLOCK_MMR)
+ ret = Board_unlockMMR();
+ if (ret != BOARD_SOK)
+ return ret;
+
+ if (cfg & BOARD_INIT_MODULE_CLOCK)
+ ret = Board_moduleClockInit();
+ if (ret != BOARD_SOK)
+ return ret;
+
+ if (cfg & BOARD_INIT_PINMUX_CONFIG)
+ ret = Board_pinmuxConfig();
+ if (ret != BOARD_SOK)
+ return ret;
+
+ if (cfg & BOARD_INIT_PLL)
+ ret = Board_PLLInitAll();
+ if (ret != BOARD_SOK)
+ return ret;
+
+ return ret;
+}
+
/**
* \brief Board library deinitialization function
*