diff options
| author | Megan Wachs <megan@sifive.com> | 2017-02-01 18:03:37 -0800 |
|---|---|---|
| committer | Megan Wachs <megan@sifive.com> | 2017-02-01 18:03:37 -0800 |
| commit | b003c52b0f5460c6e0e15cb29171164530490e08 (patch) | |
| tree | a9749852b36fed0e66fa663dcea16972dc75f6c5 /bsp/drivers/fe300prci/fe300prci_driver.h | |
| parent | 08a72bb956a25fd94d965fb4474f3ddcca1ed1e6 (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.h | 10 |
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 |
