mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-07-04 12:08:26 +00:00
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 <anup.patel@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Xiang W <wxjstz@126.com>
This commit is contained in:
parent
72154f4708
commit
12e7af9ab7
10 changed files with 25 additions and 1 deletions
|
@ -26,6 +26,7 @@
|
|||
#define ARIANE_PLIC_NUM_SOURCES 3
|
||||
#define ARIANE_HART_COUNT 1
|
||||
#define ARIANE_CLINT_ADDR 0x2000000
|
||||
#define ARIANE_ACLINT_MTIMER_FREQ 1000000
|
||||
#define ARIANE_ACLINT_MSWI_ADDR (ARIANE_CLINT_ADDR + \
|
||||
CLINT_MSWI_OFFSET)
|
||||
#define ARIANE_ACLINT_MTIMER_ADDR (ARIANE_CLINT_ADDR + \
|
||||
|
@ -44,6 +45,7 @@ static struct aclint_mswi_data mswi = {
|
|||
};
|
||||
|
||||
static struct aclint_mtimer_data mtimer = {
|
||||
.mtime_freq = ARIANE_ACLINT_MTIMER_FREQ,
|
||||
.mtime_addr = ARIANE_ACLINT_MTIMER_ADDR +
|
||||
ACLINT_DEFAULT_MTIME_OFFSET,
|
||||
.mtime_size = ACLINT_DEFAULT_MTIME_SIZE,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue