summaryrefslogtreecommitdiff
path: root/bsp/env/freedom-e300-hifive1/init.c
diff options
context:
space:
mode:
authormwachs5 <megan@sifive.com>2017-01-11 14:25:45 -0800
committermwachs5 <megan@sifive.com>2017-01-11 14:25:45 -0800
commitc7f7bec992d3d6787cf001892a24d0660ce192b1 (patch)
treeb65372a7a157ae0ce68c8740754ba9e33be53478 /bsp/env/freedom-e300-hifive1/init.c
parentf9271b91257e0a8a989faf3eff0757ee46694fe0 (diff)
reduce code duplication and apply the same flags to Arty board
Diffstat (limited to 'bsp/env/freedom-e300-hifive1/init.c')
-rw-r--r--bsp/env/freedom-e300-hifive1/init.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/bsp/env/freedom-e300-hifive1/init.c b/bsp/env/freedom-e300-hifive1/init.c
index fff1f2e..de046cc 100644
--- a/bsp/env/freedom-e300-hifive1/init.c
+++ b/bsp/env/freedom-e300-hifive1/init.c
@@ -214,13 +214,10 @@ uintptr_t handle_trap(uintptr_t mcause, uintptr_t epc)
return epc;
}
-
-#ifdef NO_INIT
-void _init() {
-}
-#else
void _init()
{
+
+ #ifndef NO_INIT
use_default_clocks();
use_pll(0, 0, 1, 31, 1);
uart_init(115200);
@@ -232,8 +229,9 @@ void _init()
write_csr(mstatus, MSTATUS_FS); // allow FPU instructions without trapping
write_csr(fcsr, 0); // initialize rounding mode, undefined at reset
}
+ #endif
+
}
-#endif
void _fini()
{