diff options
author | Philipp Tomsich <philipp.tomsich@theobroma-systems.com> | 2017-09-11 22:04:17 +0200 |
---|---|---|
committer | Philipp Tomsich <philipp.tomsich@theobroma-systems.com> | 2017-09-18 20:40:34 +0200 |
commit | 6675c952f20b7b3cfedd57c9c49305289a89403c (patch) | |
tree | 6df94197a56194a0e225a699e3d75a2500ad5110 /drivers | |
parent | cc7ce94e02799c5caa6d9c89350152f00ba3eb90 (diff) |
rockchip: timer: Convert to livetree
Update the Rockchip timer driver to support a live device tree.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/timer/rockchip_timer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/timer/rockchip_timer.c b/drivers/timer/rockchip_timer.c index 3c0750697d..460eb82f6c 100644 --- a/drivers/timer/rockchip_timer.c +++ b/drivers/timer/rockchip_timer.c @@ -101,7 +101,9 @@ static int rockchip_clk_ofdata_to_platdata(struct udevice *dev) #if !CONFIG_IS_ENABLED(OF_PLATDATA) struct rockchip_timer_priv *priv = dev_get_priv(dev); - priv->timer = (struct rk_timer *)devfdt_get_addr(dev); + priv->timer = dev_read_addr_ptr(dev); + if (!priv->timer) + return -ENOENT; #endif return 0; |