summaryrefslogtreecommitdiff
path: root/drivers/net/designware.c
diff options
context:
space:
mode:
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-06-07 16:46:01 (GMT)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-07-11 10:13:43 (GMT)
commit7ad326a905dac36939f9ea725835f809e1b7f432 (patch)
treec257aef8ef23c75090c6c47427dac89de67c45ca /drivers/net/designware.c
parentfd1bf8df2507fb488febe4b5e4498adbef0fb43e (diff)
downloadu-boot-7ad326a905dac36939f9ea725835f809e1b7f432.tar.xz
rockchip: net: dm: convert fdt_get to dev_read
With the new dev_read functions available, we can convert the rockchip architecture-specific drivers and common drivers used by these devices over to the dev_read family of calls. This covers the Gigabit Ethernet MAC (i.e. common designware driver and rockchip-specific wrapper). Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/net/designware.c')
-rw-r--r--drivers/net/designware.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index e8569e6..521e4dd 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -760,15 +760,14 @@ int designware_eth_ofdata_to_platdata(struct udevice *dev)
pdata->max_speed = fdt32_to_cpu(*cell);
#ifdef CONFIG_DM_GPIO
- if (fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev),
- "snps,reset-active-low"))
+ if (dev_read_bool(dev, "snps,reset-active-low"))
reset_flags |= GPIOD_ACTIVE_LOW;
ret = gpio_request_by_name(dev, "snps,reset-gpio", 0,
&priv->reset_gpio, reset_flags);
if (ret == 0) {
- ret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(dev),
- "snps,reset-delays-us", dw_pdata->reset_delays, 3);
+ ret = dev_read_u32_array(dev, "snps,reset-delays-us",
+ dw_pdata->reset_delays, 3);
} else if (ret == -ENOENT) {
ret = 0;
}