mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
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>
This commit is contained in:
parent
e87015ff05
commit
f444f8986b
1 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue