summaryrefslogtreecommitdiff
path: root/fw/fe310/bsp/drivers
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2022-03-30 13:22:19 +0200
committerUros Majstorovic <majstor@majstor.org>2022-03-30 13:22:19 +0200
commitc6962c5700f99441538dafa346626bb7e6d12488 (patch)
treef463808368735c290312b7bff906f2599293d0ac /fw/fe310/bsp/drivers
parent0a5f8363fe4e6b3c7d4f17fde61e00ab63e43bcb (diff)
sock api fixed; net reply messages fixed
Diffstat (limited to 'fw/fe310/bsp/drivers')
-rw-r--r--fw/fe310/bsp/drivers/prci_driver.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fw/fe310/bsp/drivers/prci_driver.c b/fw/fe310/bsp/drivers/prci_driver.c
index c2df2c9..29118a2 100644
--- a/fw/fe310/bsp/drivers/prci_driver.c
+++ b/fw/fe310/bsp/drivers/prci_driver.c
@@ -51,16 +51,16 @@ uint32_t PRCI_measure_mcycle_freq(uint32_t mtime_ticks, uint32_t mtime_freq)
unsigned long PRCI_get_cpu_freq()
{
- static uint32_t cpu_freq;
+ static uint32_t cpu_freq;
- if (!cpu_freq) {
- // warm up I$
- PRCI_measure_mcycle_freq(3000, RTC_FREQ);
- // measure for real
- cpu_freq = PRCI_measure_mcycle_freq(3000, RTC_FREQ);
- }
+ if (!cpu_freq) {
+ // warm up I$
+ PRCI_measure_mcycle_freq(3000, RTC_FREQ);
+ // measure for real
+ cpu_freq = PRCI_measure_mcycle_freq(3000, RTC_FREQ);
+ }
- return cpu_freq;
+ return cpu_freq;
}
void PRCI_use_hfrosc(int div, int trim)