summaryrefslogtreecommitdiff
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2021-04-06 20:37:16 +0200
committerMarek Vasut <marex@denx.de>2021-04-18 04:29:36 +0200
commitf444f8986b4c74b63cbf421635387df120d3cb4f (patch)
tree82a21f0ea89c6bf349d8d2261cc8ebe0e83ca228 /drivers/usb/host
parente87015ff05d49b8e18367d05658cc092b5f94cc8 (diff)
downloadu-boot-f444f8986b4c74b63cbf421635387df120d3cb4f.tar.gz
u-boot-f444f8986b4c74b63cbf421635387df120d3cb4f.tar.bz2
u-boot-f444f8986b4c74b63cbf421635387df120d3cb4f.zip
usb: ehci-mx6: Fix aarch64 build warnings
Fix cast from pointer to integer of different size by casting the pointer to uintptr_t instead of uint32_t, the former has correct size on both 32bit and 64bit architectures. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Ye Li <ye.li@nxp.com> Cc: uboot-imx <uboot-imx@nxp.com>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ehci-mx6.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index 28db593b7e..7642a31b65 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -399,8 +399,8 @@ int ehci_hcd_init(int index, enum usb_init_type init,
type = board_usb_phy_mode(index);
if (hccr && hcor) {
- *hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength);
- *hcor = (struct ehci_hcor *)((uint32_t)*hccr +
+ *hccr = (struct ehci_hccr *)((uintptr_t)&ehci->caplength);
+ *hcor = (struct ehci_hcor *)((uintptr_t)*hccr +
HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
}
@@ -696,8 +696,8 @@ static int ehci_usb_probe(struct udevice *dev)
goto err_regulator;
#endif
- hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength);
- hcor = (struct ehci_hcor *)((uint32_t)hccr +
+ hccr = (struct ehci_hccr *)((uintptr_t)&ehci->caplength);
+ hcor = (struct ehci_hcor *)((uintptr_t)hccr +
HC_LENGTH(ehci_readl(&(hccr)->cr_capbase)));
ret = ehci_register(dev, hccr, hcor, &mx6_ehci_ops, 0, priv->init_type);