diff options
Diffstat (limited to 'arch/riscv/lib')
-rw-r--r-- | arch/riscv/lib/andes_plmt.c | 6 | ||||
-rw-r--r-- | arch/riscv/lib/sifive_clint.c | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/arch/riscv/lib/andes_plmt.c b/arch/riscv/lib/andes_plmt.c index a28c14c1ebf..cec86718c7f 100644 --- a/arch/riscv/lib/andes_plmt.c +++ b/arch/riscv/lib/andes_plmt.c @@ -17,11 +17,9 @@ /* mtime register */ #define MTIME_REG(base) ((ulong)(base)) -static int andes_plmt_get_count(struct udevice *dev, u64 *count) +static u64 andes_plmt_get_count(struct udevice *dev) { - *count = readq((void __iomem *)MTIME_REG(dev->priv)); - - return 0; + return readq((void __iomem *)MTIME_REG(dev->priv)); } static const struct timer_ops andes_plmt_ops = { diff --git a/arch/riscv/lib/sifive_clint.c b/arch/riscv/lib/sifive_clint.c index c9704c596fa..a5572cb8255 100644 --- a/arch/riscv/lib/sifive_clint.c +++ b/arch/riscv/lib/sifive_clint.c @@ -62,11 +62,9 @@ int riscv_get_ipi(int hart, int *pending) return 0; } -static int sifive_clint_get_count(struct udevice *dev, u64 *count) +static u64 sifive_clint_get_count(struct udevice *dev) { - *count = readq((void __iomem *)MTIME_REG(dev->priv)); - - return 0; + return readq((void __iomem *)MTIME_REG(dev->priv)); } static const struct timer_ops sifive_clint_ops = { |