summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRan Wang <ran.wang_1@nxp.com>2017-12-14 07:45:43 (GMT)
committerPrabhakar Kushwaha <prabhakar.kushwaha@nxp.com>2018-01-09 04:27:46 (GMT)
commit17598fd1760957ee62f50ba8ea80d74362a1afab (patch)
tree96232fa97422b83e853ef9cdbed169a48523e096
parentf474e7fad45e950b37aa5790ca259fd4943358e9 (diff)
downloadu-boot-17598fd1760957ee62f50ba8ea80d74362a1afab.tar.xz
usb: ehci: fsl: Fix some compile warnings.
When enable CONFIG_HAS_FSL_DR_USB, we might encounter below compile warning, apply this patch can fix it: drivers/usb/host/ehci-fsl.c:109:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ((u32)hccr + HC_LENGTH(ehci_readl(&hccr->cr_capbase))); ^ drivers/usb/host/ehci-fsl.c:108:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] hcor = (struct ehci_hcor *) ^ drivers/usb/host/ehci-fsl.c:115:8: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (u32)hccr, (u32)hcor, ^ include/log.h:131:26: note: in definition of macro 'debug_cond' printf(pr_fmt(fmt), ##args); \ ^~~~ drivers/usb/host/ehci-fsl.c:114:2: note: in expansion of macro 'debug' debug("ehci-fsl: init hccr %x and hcor %x hc_length %d\n", ^~~~~ drivers/usb/host/ehci-fsl.c:115:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (u32)hccr, (u32)hcor, ^ include/log.h:131:26: note: in definition of macro 'debug_cond' printf(pr_fmt(fmt), ##args); \ ^~~~ drivers/usb/host/ehci-fsl.c:114:2: note: in expansion of macro 'debug' debug("ehci-fsl: init hccr %x and hcor %x hc_length %d\n", ^~~~~ Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
-rw-r--r--drivers/usb/host/ehci-fsl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 62c431b..17d1fae 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -106,14 +106,14 @@ static int ehci_fsl_probe(struct udevice *dev)
ehci = (struct usb_ehci *)priv->hcd_base;
hccr = (struct ehci_hccr *)(&ehci->caplength);
hcor = (struct ehci_hcor *)
- ((u32)hccr + HC_LENGTH(ehci_readl(&hccr->cr_capbase)));
+ ((void *)hccr + HC_LENGTH(ehci_readl(&hccr->cr_capbase)));
if (ehci_fsl_init(priv, ehci, hccr, hcor) < 0)
return -ENXIO;
- debug("ehci-fsl: init hccr %x and hcor %x hc_length %d\n",
- (u32)hccr, (u32)hcor,
- (u32)HC_LENGTH(ehci_readl(&hccr->cr_capbase)));
+ debug("ehci-fsl: init hccr %p and hcor %p hc_length %d\n",
+ (void *)hccr, (void *)hcor,
+ HC_LENGTH(ehci_readl(&hccr->cr_capbase)));
return ehci_register(dev, hccr, hcor, &fsl_ehci_ops, 0, USB_INIT_HOST);
}