diff options
author | Michal Simek <michal.simek@xilinx.com> | 2016-01-12 14:45:49 +0100 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2016-01-27 15:55:54 +0100 |
commit | 842efb3a930aac48b471573dfe380d7bffbbc3f0 (patch) | |
tree | 75e4ed85961b7e59382a5d9860c1778e8b9d2cf1 | |
parent | a2533183c0fb41c10682a8d516a7434ebc4b9f39 (diff) |
serial: zynq: Fix address reading from DM
Use dev_get_addr() instead of reading reg base directly in the driver.
Core function is also more robust.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
-rw-r--r-- | drivers/serial/serial_zynq.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/serial/serial_zynq.c b/drivers/serial/serial_zynq.c index 112a7a27b8..e79d997cba 100644 --- a/drivers/serial/serial_zynq.c +++ b/drivers/serial/serial_zynq.c @@ -156,13 +156,8 @@ static int zynq_serial_pending(struct udevice *dev, bool input) static int zynq_serial_ofdata_to_platdata(struct udevice *dev) { struct zynq_uart_priv *priv = dev_get_priv(dev); - fdt_addr_t addr; - addr = fdtdec_get_addr(gd->fdt_blob, dev->of_offset, "reg"); - if (addr == FDT_ADDR_T_NONE) - return -EINVAL; - - priv->regs = (struct uart_zynq *)addr; + priv->regs = (struct uart_zynq *)dev_get_addr(dev); return 0; } |