mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
hw/riscv: clint: Avoid using hard-coded timebase frequency
At present the CLINT timestamp is using a hard-coded timebase frequency value SIFIVE_CLINT_TIMEBASE_FREQ. This might not be true for all boards. Add a new 'timebase-freq' property to the CLINT device, and update various functions to accept this as a parameter. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <1598924352-89526-16-git-send-email-bmeng.cn@gmail.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
ce908a2f6f
commit
a47ef6e93a
10 changed files with 40 additions and 22 deletions
|
@ -60,6 +60,9 @@
|
|||
#define BIOS_FILENAME "hss.bin"
|
||||
#define RESET_VECTOR 0x20220000
|
||||
|
||||
/* CLINT timebase frequency */
|
||||
#define CLINT_TIMEBASE_FREQ 1000000
|
||||
|
||||
/* GEM version */
|
||||
#define GEM_REVISION 0x0107010c
|
||||
|
||||
|
@ -187,7 +190,8 @@ static void microchip_pfsoc_soc_realize(DeviceState *dev, Error **errp)
|
|||
/* CLINT */
|
||||
sifive_clint_create(memmap[MICROCHIP_PFSOC_CLINT].base,
|
||||
memmap[MICROCHIP_PFSOC_CLINT].size, 0, ms->smp.cpus,
|
||||
SIFIVE_SIP_BASE, SIFIVE_TIMECMP_BASE, SIFIVE_TIME_BASE, false);
|
||||
SIFIVE_SIP_BASE, SIFIVE_TIMECMP_BASE, SIFIVE_TIME_BASE,
|
||||
CLINT_TIMEBASE_FREQ, false);
|
||||
|
||||
/* L2 cache controller */
|
||||
create_unimplemented_device("microchip.pfsoc.l2cc",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue