diff --git a/drivers/serial/serial_uniphier.c b/drivers/serial/serial_uniphier.c index edb9203..525f0a4 100644 --- a/drivers/serial/serial_uniphier.c +++ b/drivers/serial/serial_uniphier.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -91,12 +92,13 @@ static int uniphier_serial_probe(struct udevice *dev) struct uniphier_serial_private_data *priv = dev_get_priv(dev); struct uniphier_serial __iomem *port; fdt_addr_t base; - fdt_size_t size; u32 tmp; - base = fdtdec_get_addr_size(gd->fdt_blob, dev->of_offset, "reg", &size); + base = dev_get_addr(dev); + if (base == FDT_ADDR_T_NONE) + return -EINVAL; - port = map_sysmem(base, size); + port = map_sysmem(base, SZ_64); if (!port) return -ENOMEM;