summaryrefslogtreecommitdiff
path: root/drivers/timer/ast_timer.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-08-23 16:06:38 -0400
committerTom Rini <trini@konsulko.com>2020-08-23 16:06:38 -0400
commitd584648dad691caec3ecc7777dbfa3f1936878e5 (patch)
treeee787f8204c917526859da55840f6f159a00b8ba /drivers/timer/ast_timer.c
parentc84341f5acd6140f361300f02b354a7238f95b72 (diff)
parenta4020350289c520e896fd6180e510be557ed3bf9 (diff)
downloadu-boot-WIP/23Aug2020.tar.gz
Merge tag 'dm-pull-22aug20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dmWIP/23Aug2020
replace devfdt_get_addr_ptr() with dev_read_addr_ptr() binman fixes for portage various minor fixes 'bind' command improvements
Diffstat (limited to 'drivers/timer/ast_timer.c')
-rw-r--r--drivers/timer/ast_timer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/timer/ast_timer.c b/drivers/timer/ast_timer.c
index 3838601f54..e313249740 100644
--- a/drivers/timer/ast_timer.c
+++ b/drivers/timer/ast_timer.c
@@ -64,9 +64,9 @@ static int ast_timer_ofdata_to_platdata(struct udevice *dev)
{
struct ast_timer_priv *priv = dev_get_priv(dev);
- priv->regs = devfdt_get_addr_ptr(dev);
- if (IS_ERR(priv->regs))
- return PTR_ERR(priv->regs);
+ priv->regs = dev_read_addr_ptr(dev);
+ if (!priv->regs)
+ return -EINVAL;
priv->tmc = ast_get_timer_counter(priv->regs, AST_TICK_TIMER);