clock/usdhc: Enable clock of USDHC of i.MXRT
Enable clock of USDHC of i.MXRT. Add clock interface for USDHC in ccm. Signed-off-by: Jun Yang <jun.yang@nxp.com>
This commit is contained in:
parent
6ff5ac05e4
commit
27d8329fc9
3 changed files with 32 additions and 0 deletions
|
@ -185,6 +185,22 @@ static ALWAYS_INLINE void clkInit(void)
|
|||
USB_EhciPhyInit(kUSB_ControllerEhci0, CPU_XTAL_CLK_HZ, &usbPhyConfig);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_DISK_ACCESS_USDHC1) || \
|
||||
defined(CONFIG_DISK_ACCESS_USDHC2)
|
||||
CLOCK_InitSysPfd(kCLOCK_Pfd0, 0x12U);
|
||||
/* Configure USDHC clock source and divider */
|
||||
#ifdef CONFIG_DISK_ACCESS_USDHC1
|
||||
CLOCK_SetDiv(kCLOCK_Usdhc1Div, 0U);
|
||||
CLOCK_SetMux(kCLOCK_Usdhc1Mux, 1U);
|
||||
CLOCK_EnableClock(kCLOCK_Usdhc1);
|
||||
#endif
|
||||
#ifdef CONFIG_DISK_ACCESS_USDHC2
|
||||
CLOCK_SetDiv(kCLOCK_Usdhc2Div, 0U);
|
||||
CLOCK_SetMux(kCLOCK_Usdhc2Mux, 1U);
|
||||
CLOCK_EnableClock(kCLOCK_Usdhc2);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Keep the system clock running so SYSTICK can wake up the system from
|
||||
* wfi.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue