summaryrefslogtreecommitdiff
path: root/bsp/drivers/fe300prci/fe300prci_driver.h
diff options
context:
space:
mode:
authorMegan Wachs <megan@sifive.com>2017-02-01 18:03:37 -0800
committerMegan Wachs <megan@sifive.com>2017-02-01 18:03:37 -0800
commitb003c52b0f5460c6e0e15cb29171164530490e08 (patch)
treea9749852b36fed0e66fa663dcea16972dc75f6c5 /bsp/drivers/fe300prci/fe300prci_driver.h
parent08a72bb956a25fd94d965fb4474f3ddcca1ed1e6 (diff)
PRCI: add control for the target CPU frequency (to allow a minimum, maximum, or closest match)
Diffstat (limited to 'bsp/drivers/fe300prci/fe300prci_driver.h')
-rw-r--r--bsp/drivers/fe300prci/fe300prci_driver.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/bsp/drivers/fe300prci/fe300prci_driver.h b/bsp/drivers/fe300prci/fe300prci_driver.h
index 75dcf00..243e6de 100644
--- a/bsp/drivers/fe300prci/fe300prci_driver.h
+++ b/bsp/drivers/fe300prci/fe300prci_driver.h
@@ -7,6 +7,14 @@ __BEGIN_DECLS
#include <unistd.h>
+typedef enum prci_freq_target {
+
+ PRCI_FREQ_OVERSHOOT,
+ PRCI_FREQ_CLOSEST,
+ PRCI_FREQ_UNDERSHOOT
+
+} PRCI_freq_target;
+
/* Measure and return the approximate frequency of the
* CPU, as given by measuring the mcycle counter against
* the mtime ticks.
@@ -55,7 +63,7 @@ void PRCI_use_default_clocks();
* achievable with this function, and not all
* are guaranteed to actually work.
*/
-uint32_t PRCI_set_hfrosctrim_for_f_cpu(uint32_t f_cpu);
+uint32_t PRCI_set_hfrosctrim_for_f_cpu(uint32_t f_cpu, PRCI_freq_target target);
__END_DECLS