summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorThomas Abraham <thomas.ab@samsung.com>2016-04-23 22:18:10 +0530
committerMinkyu Kang <mk7.kang@samsung.com>2016-05-25 10:00:19 +0900
commit5ab6c4df27c9188251ff43a536c90ede57ba48fe (patch)
tree3c0b180d10114956584d45ee7c9db1f50774ea16 /drivers
parent166097e8775343898cab84f1f23b4aacb35783db (diff)
downloadu-boot-imx-5ab6c4df27c9188251ff43a536c90ede57ba48fe.zip
u-boot-imx-5ab6c4df27c9188251ff43a536c90ede57ba48fe.tar.gz
u-boot-imx-5ab6c4df27c9188251ff43a536c90ede57ba48fe.tar.bz2
serial: s5p: get the port id number from the alias of the device node
The port id, if not specified in the device node, can be obtained from the alias of the device node listed in the aliases node. Cc: Minkyu Kang <mk7.kang@samsung.com> Signed-off-by: Thomas Abraham <thomas.ab@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/serial/serial_s5p.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c
index feba467..8590dfd 100644
--- a/drivers/serial/serial_s5p.c
+++ b/drivers/serial/serial_s5p.c
@@ -174,8 +174,8 @@ static int s5p_serial_ofdata_to_platdata(struct udevice *dev)
return -EINVAL;
plat->reg = (struct s5p_uart *)addr;
- plat->port_id = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "id", -1);
-
+ plat->port_id = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
+ "id", dev->seq);
return 0;
}