From d35f2cfa5bf4b1fa6cb05614e53b4efc21095ec9 Mon Sep 17 00:00:00 2001 From: Vignesh Raghavendra Date: Mon, 9 Dec 2019 10:37:30 +0530 Subject: [PATCH] phy: omap-usb2-phy: Fix warnings when built for ARM64 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Below warning is seen when this driver is built for devices with 64 bit physical address space. drivers/phy/omap-usb2-phy.c: In function ‘omap_usb2_phy_probe’: drivers/phy/omap-usb2-phy.c:187:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] priv->phy_base = (void *)base; ^ Fix this by using dev_read_addr_ptr() instead of dev_read_addr(). Signed-off-by: Vignesh Raghavendra Reviewed-by: Marek Vasut Signed-off-by: Lokesh Vutla --- drivers/phy/omap-usb2-phy.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/phy/omap-usb2-phy.c b/drivers/phy/omap-usb2-phy.c index be3bb0d367..6e5958d1dc 100644 --- a/drivers/phy/omap-usb2-phy.c +++ b/drivers/phy/omap-usb2-phy.c @@ -179,11 +179,10 @@ int omap_usb2_phy_probe(struct udevice *dev) return -EINVAL; if (data->flags & OMAP_USB2_CALIBRATE_FALSE_DISCONNECT) { - u32 base = dev_read_addr(dev); + priv->phy_base = dev_read_addr_ptr(dev); - if (base == FDT_ADDR_T_NONE) + if (!priv->phy_base) return -EINVAL; - priv->phy_base = (void *)base; priv->flags |= OMAP_USB2_CALIBRATE_FALSE_DISCONNECT; } -- 2.25.1