projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'u-boot-imx-20200825' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
[platform/kernel/u-boot.git]
/
drivers
/
timer
/
ast_timer.c
diff --git
a/drivers/timer/ast_timer.c
b/drivers/timer/ast_timer.c
index
21ffdbf
..
e313249
100644
(file)
--- a/
drivers/timer/ast_timer.c
+++ b/
drivers/timer/ast_timer.c
@@
-9,6
+9,7
@@
#include <timer.h>
#include <asm/io.h>
#include <asm/arch/timer.h>
#include <timer.h>
#include <asm/io.h>
#include <asm/arch/timer.h>
+#include <linux/err.h>
#define AST_TICK_TIMER 1
#define AST_TMC_RELOAD_VAL 0xffffffff
#define AST_TICK_TIMER 1
#define AST_TMC_RELOAD_VAL 0xffffffff
@@
-63,9
+64,9
@@
static int ast_timer_ofdata_to_platdata(struct udevice *dev)
{
struct ast_timer_priv *priv = dev_get_priv(dev);
{
struct ast_timer_priv *priv = dev_get_priv(dev);
- priv->regs = dev
fdt_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);
priv->tmc = ast_get_timer_counter(priv->regs, AST_TICK_TIMER);