summaryrefslogtreecommitdiff
path: root/drivers/timer/atcpit100_timer.c
diff options
context:
space:
mode:
authorSean Anderson <seanga2@gmail.com>2020-10-07 21:37:44 +0300
committerTom Rini <trini@konsulko.com>2020-10-22 16:54:53 +0300
commit8af7bb914f8b2238ea37faa8e59277ba4cb26d37 (patch)
tree8bb80517f8d547e0b845354e99375938f0f3fcbc /drivers/timer/atcpit100_timer.c
parentaff60aba6c44770fab8f2694ae81bafde6d22998 (diff)
downloadu-boot-8af7bb914f8b2238ea37faa8e59277ba4cb26d37.tar.xz
timer: Return count from timer_ops.get_count
No timer drivers return an error from get_count. Instead of possibly returning an error, just return the count directly. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/timer/atcpit100_timer.c')
-rw-r--r--drivers/timer/atcpit100_timer.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/timer/atcpit100_timer.c b/drivers/timer/atcpit100_timer.c
index 5d4ae68509..fcb8a45358 100644
--- a/drivers/timer/atcpit100_timer.c
+++ b/drivers/timer/atcpit100_timer.c
@@ -68,13 +68,12 @@ struct atcpit_timer_platdata {
u32 *regs;
};
-static int atcpit_timer_get_count(struct udevice *dev, u64 *count)
+static u64 atcpit_timer_get_count(struct udevice *dev)
{
struct atcpit_timer_platdata *plat = dev_get_platdata(dev);
u32 val;
val = ~(REG32_TMR(CH_CNT(1))+0xffffffff);
- *count = timer_conv_64(val);
- return 0;
+ return timer_conv_64(val);
}
static int atcpit_timer_probe(struct udevice *dev)