summaryrefslogtreecommitdiff
path: root/include/sbi
diff options
context:
space:
mode:
authorAnup Patel <[email protected]>2021-09-14 21:51:48 +0530
committerAnup Patel <[email protected]>2021-09-26 19:52:10 +0530
commit12e7af9ab7ef9adf61b9138e2c38e3aeef3c140b (patch)
tree67d388a1d7a4435060beace5dbaba32679adef41 /include/sbi
parent72154f4708de79816f0178b16223afa352b20e30 (diff)
lib: sbi: Add timer frequency to struct sbi_timer_device
Generic mdelay() and udelay() functions can be provided by the sbi_timer framework if timer frequency is available in the timer instance provided by the platform support or timer driver. This patch adds timer frequency (timer_freq) member in the struct sbi_timer_device for above purpose. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Bin Meng <[email protected]> Reviewed-by: Xiang W <[email protected]>
Diffstat (limited to 'include/sbi')
-rw-r--r--include/sbi/sbi_timer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sbi/sbi_timer.h b/include/sbi/sbi_timer.h
index 1ba6da05..211e83d7 100644
--- a/include/sbi/sbi_timer.h
+++ b/include/sbi/sbi_timer.h
@@ -17,6 +17,9 @@ struct sbi_timer_device {
/** Name of the timer operations */
char name[32];
+ /** Frequency of timer in HZ */
+ unsigned long timer_freq;
+
/** Get free-running timer value */
u64 (*timer_value)(void);