summaryrefslogtreecommitdiff
path: root/drivers/timer/dw-apb-timer.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-10-22 14:36:47 -0400
committerTom Rini <trini@konsulko.com>2020-10-22 14:36:47 -0400
commitae4fdd7b0432bcb0bc2fe7d90b6d3e92001ab478 (patch)
treee933e67609989d0e4960f1464384e9ff40732b30 /drivers/timer/dw-apb-timer.c
parentb90daf2743b38022bea8727ede867ad63e971db2 (diff)
parentdddfde5401ed5ad82c996b35b61dc4a45bb4e2b3 (diff)
Merge branch '2020-10-22-misc-changes'
- Assorted updates for Xen, IPQ40xx, ASpeed, Keymile - Assorted typo / documentation fixes - Fix default preboot cmd to act like before with USB_STORAGE set - A number of other bugfixes throughout the code
Diffstat (limited to 'drivers/timer/dw-apb-timer.c')
-rw-r--r--drivers/timer/dw-apb-timer.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/timer/dw-apb-timer.c b/drivers/timer/dw-apb-timer.c
index 35271b20c89..68bc258131b 100644
--- a/drivers/timer/dw-apb-timer.c
+++ b/drivers/timer/dw-apb-timer.c
@@ -25,7 +25,7 @@ struct dw_apb_timer_priv {
struct reset_ctl_bulk resets;
};
-static int dw_apb_timer_get_count(struct udevice *dev, u64 *count)
+static u64 dw_apb_timer_get_count(struct udevice *dev)
{
struct dw_apb_timer_priv *priv = dev_get_priv(dev);
@@ -34,9 +34,7 @@ static int dw_apb_timer_get_count(struct udevice *dev, u64 *count)
* requires the count to be incrementing. Invert the
* result.
*/
- *count = timer_conv_64(~readl(priv->regs + DW_APB_CURR_VAL));
-
- return 0;
+ return timer_conv_64(~readl(priv->regs + DW_APB_CURR_VAL));
}
static int dw_apb_timer_probe(struct udevice *dev)