@@ -54,6 +54,29 @@ static struct usbmisc_usb_device *get_usbdev(struct device *dev)
return &usbmisc->usbdev[i];
}
+static int usbmisc_imx53_init(struct device *dev)
+{
+ struct usbmisc_usb_device *usbdev;
+ void __iomem *reg;
+ unsigned long flags;
+ u32 val;
+
+ usbdev = get_usbdev(dev);
+ if (IS_ERR(usbdev))
+ return PTR_ERR(usbdev);
+
+ reg = usbmisc->base + usbdev->index * 8;
+
+ if (usbdev->disable_oc) {
+ spin_lock_irqsave(&usbmisc->lock, flags);
+ val = readl(reg);
+ writel(val | (1 << 5), reg);
+ spin_unlock_irqrestore(&usbmisc->lock, flags);
+ }
+
+ return 0;
+}
+
static int usbmisc_imx6q_init(struct device *dev)
{
@@ -76,11 +99,16 @@ static int usbmisc_imx6q_init(struct device *dev)
return 0;
}
+static const struct usbmisc_ops imx53_usbmisc_ops = {
+ .init = usbmisc_imx53_init,
+};
+
static const struct usbmisc_ops imx6q_usbmisc_ops = {
.init = usbmisc_imx6q_init,
};
static const struct of_device_id usbmisc_imx_dt_ids[] = {
+ { .compatible = "fsl,imx53-usbmisc", .data = (void *)&imx53_usbmisc_ops },
{ .compatible = "fsl,imx6q-usbmisc", .data = (void *)&imx6q_usbmisc_ops },
{ /* sentinel */ }
};