summaryrefslogtreecommitdiff
path: root/src/soc/sifive/fu540
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/sifive/fu540')
-rw-r--r--src/soc/sifive/fu540/clock.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/soc/sifive/fu540/clock.c b/src/soc/sifive/fu540/clock.c
index eb7a8b5483..20dce23a64 100644
--- a/src/soc/sifive/fu540/clock.c
+++ b/src/soc/sifive/fu540/clock.c
@@ -121,8 +121,8 @@ static struct prci_ctlr *prci = (void *)FU540_PRCI;
// 33.33 Mhz after reset
#define FU540_BASE_FQY 33330
+/* Clock initialization should only be done in romstage. */
#if ENV_ROMSTAGE
-
static void init_coreclk(void)
{
// switch coreclk to input reference frequency before modifying PLL
@@ -240,8 +240,7 @@ void clock_init(void)
for (int i = 0; i < 256; i++)
asm volatile ("nop");
}
-
-#endif
+#endif /* ENV_ROMSTAGE */
int clock_get_coreclk_khz(void)
{