Skip to content

Commit 68c11b2

Browse files
ccli8fabiobaltieri
authored andcommitted
soc: nuvoton: numaker: m2l31x: fix hirc48m typo
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]>
1 parent ac7d55b commit 68c11b2

File tree

1 file changed

+8
-8
lines changed
  • soc/nuvoton/numaker/m2l31x

1 file changed

+8
-8
lines changed

soc/nuvoton/numaker/m2l31x/soc.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ void soc_reset_hook(void)
5757
/* Wait for LIRC clock ready */
5858
CLK_WaitClockReady(CLK_STATUS_LIRCSTB_Msk);
5959

60-
#if DT_NODE_HAS_PROP(DT_NODELABEL(scc), hirc48)
61-
/* Enable/disable 48 MHz high-speed internal RC oscillator (HIRC48) */
62-
if (DT_ENUM_IDX(DT_NODELABEL(scc), hirc48) == NUMAKER_SCC_CLKSW_ENABLE) {
63-
CLK_EnableXtalRC(CLK_PWRCTL_HIRC48EN_Msk);
64-
/* Wait for HIRC48 clock ready */
65-
CLK_WaitClockReady(CLK_STATUS_HIRC48STB_Msk);
66-
} else if (DT_ENUM_IDX(DT_NODELABEL(scc), hirc48) == NUMAKER_SCC_CLKSW_DISABLE) {
67-
CLK_DisableXtalRC(CLK_PWRCTL_HIRC48EN_Msk);
60+
#if DT_NODE_HAS_PROP(DT_NODELABEL(scc), hirc48m)
61+
/* Enable/disable 48 MHz high-speed internal RC oscillator (HIRC48M) */
62+
if (DT_ENUM_IDX(DT_NODELABEL(scc), hirc48m) == NUMAKER_SCC_CLKSW_ENABLE) {
63+
CLK_EnableXtalRC(CLK_PWRCTL_HIRC48MEN_Msk);
64+
/* Wait for HIRC48M clock ready */
65+
CLK_WaitClockReady(CLK_STATUS_HIRC48MSTB_Msk);
66+
} else if (DT_ENUM_IDX(DT_NODELABEL(scc), hirc48m) == NUMAKER_SCC_CLKSW_DISABLE) {
67+
CLK_DisableXtalRC(CLK_PWRCTL_HIRC48MEN_Msk);
6868
}
6969
#endif
7070

0 commit comments

Comments
 (0)