mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
usb: mx6: add fuse check
Add fuse check for USB. If the fuse indicates the module will not work in the SoC, let's fail the initialization. Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
@@ -380,6 +380,14 @@ int ehci_hcd_init(int index, enum usb_init_type init,
|
|||||||
if (index > 3)
|
if (index > 3)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (CONFIG_IS_ENABLED(IMX_MODULE_FUSE)) {
|
||||||
|
if (usb_fused((ulong)ehci)) {
|
||||||
|
printf("SoC fuse indicates USB@0x%lx is unavailable.\n",
|
||||||
|
(ulong)ehci);
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ret = ehci_mx6_common_init(ehci, index);
|
ret = ehci_mx6_common_init(ehci, index);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
@@ -577,6 +585,14 @@ static int ehci_usb_probe(struct udevice *dev)
|
|||||||
struct ehci_hcor *hcor;
|
struct ehci_hcor *hcor;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (CONFIG_IS_ENABLED(IMX_MODULE_FUSE)) {
|
||||||
|
if (usb_fused((ulong)ehci)) {
|
||||||
|
printf("SoC fuse indicates USB@0x%lx is unavailable.\n",
|
||||||
|
(ulong)ehci);
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
priv->ehci = ehci;
|
priv->ehci = ehci;
|
||||||
priv->portnr = dev->seq;
|
priv->portnr = dev->seq;
|
||||||
priv->init_type = type;
|
priv->init_type = type;
|
||||||
|
Reference in New Issue
Block a user