Skip to content

Commit

Permalink
soc: nuvoton: numaker: m2l31x: fix hirc48m typo
Browse files Browse the repository at this point in the history
Fix typo on HIRC48M. This clock source is required by:
- USB 1.1 OTG PHY
- USBD
- USBH
- OTG

Signed-off-by: Chun-Chieh Li <[email protected]>
  • Loading branch information
ccli8 authored and fabiobaltieri committed Sep 25, 2024
1 parent ac7d55b commit 68c11b2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions soc/nuvoton/numaker/m2l31x/soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ void soc_reset_hook(void)
/* Wait for LIRC clock ready */
CLK_WaitClockReady(CLK_STATUS_LIRCSTB_Msk);

#if DT_NODE_HAS_PROP(DT_NODELABEL(scc), hirc48)
/* Enable/disable 48 MHz high-speed internal RC oscillator (HIRC48) */
if (DT_ENUM_IDX(DT_NODELABEL(scc), hirc48) == NUMAKER_SCC_CLKSW_ENABLE) {
CLK_EnableXtalRC(CLK_PWRCTL_HIRC48EN_Msk);
/* Wait for HIRC48 clock ready */
CLK_WaitClockReady(CLK_STATUS_HIRC48STB_Msk);
} else if (DT_ENUM_IDX(DT_NODELABEL(scc), hirc48) == NUMAKER_SCC_CLKSW_DISABLE) {
CLK_DisableXtalRC(CLK_PWRCTL_HIRC48EN_Msk);
#if DT_NODE_HAS_PROP(DT_NODELABEL(scc), hirc48m)
/* Enable/disable 48 MHz high-speed internal RC oscillator (HIRC48M) */
if (DT_ENUM_IDX(DT_NODELABEL(scc), hirc48m) == NUMAKER_SCC_CLKSW_ENABLE) {
CLK_EnableXtalRC(CLK_PWRCTL_HIRC48MEN_Msk);
/* Wait for HIRC48M clock ready */
CLK_WaitClockReady(CLK_STATUS_HIRC48MSTB_Msk);
} else if (DT_ENUM_IDX(DT_NODELABEL(scc), hirc48m) == NUMAKER_SCC_CLKSW_DISABLE) {
CLK_DisableXtalRC(CLK_PWRCTL_HIRC48MEN_Msk);
}
#endif

Expand Down

0 comments on commit 68c11b2

Please sign in to comment.