diff options
author | Michal Simek <michal.simek@xilinx.com> | 2018-05-16 10:57:27 +0200 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2018-05-31 13:50:39 +0200 |
commit | f01ef0ae63fa82ac1a73d5e3d70e7dbc38b18a7d (patch) | |
tree | 1e1fc1deb16b1cab6f3c3de9b8545455b3f60d2c /drivers/watchdog | |
parent | 458e8d8071f2db7addbfe1fa67951a95c05d28b6 (diff) | |
download | u-boot-f01ef0ae63fa82ac1a73d5e3d70e7dbc38b18a7d.zip u-boot-f01ef0ae63fa82ac1a73d5e3d70e7dbc38b18a7d.tar.gz u-boot-f01ef0ae63fa82ac1a73d5e3d70e7dbc38b18a7d.tar.bz2 |
watchdog: cadence: Use live-tree functions
Use live-tree functions.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/cdns_wdt.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/watchdog/cdns_wdt.c b/drivers/watchdog/cdns_wdt.c index 9a07fa1..f7618f8 100644 --- a/drivers/watchdog/cdns_wdt.c +++ b/drivers/watchdog/cdns_wdt.c @@ -231,17 +231,16 @@ static int cdns_wdt_probe(struct udevice *dev) static int cdns_wdt_ofdata_to_platdata(struct udevice *dev) { - int node = dev_of_offset(dev); struct cdns_wdt_priv *priv = dev_get_priv(dev); - priv->regs = devfdt_get_addr_ptr(dev); + priv->regs = (struct cdns_regs *)dev_read_addr(dev); if (IS_ERR(priv->regs)) return PTR_ERR(priv->regs); - priv->timeout = fdtdec_get_int(gd->fdt_blob, node, "timeout-sec", - CDNS_WDT_DEFAULT_TIMEOUT); + priv->timeout = dev_read_u32_default(dev, "timeout-sec", + CDNS_WDT_DEFAULT_TIMEOUT); - priv->rst = fdtdec_get_bool(gd->fdt_blob, node, "reset-on-timeout"); + priv->rst = dev_read_bool(dev, "reset-on-timeout"); debug("%s: timeout %d, reset %d\n", __func__, priv->timeout, priv->rst); |