X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=drivers%2Fusb%2Fhost%2Fehci-mx5.c;h=c11279867c7ca0d2412d9cea5105763419729df3;hb=dd11fdc31fb82f63258c1970a6d8d22b8ffd3173;hp=0af02ba27378ebd75d2b96805186a1e1138e5a2c;hpb=bc0b99bd8b19599f670f42401de655fa9b44cd94;p=platform%2Fkernel%2Fu-boot.git diff --git a/drivers/usb/host/ehci-mx5.c b/drivers/usb/host/ehci-mx5.c index 0af02ba..c112798 100644 --- a/drivers/usb/host/ehci-mx5.c +++ b/drivers/usb/host/ehci-mx5.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -227,52 +228,6 @@ __weak void mx5_ehci_powerup_fixup(struct ehci_ctrl *ctrl, uint32_t *status_reg, mdelay(50); } -#if !CONFIG_IS_ENABLED(DM_USB) -static const struct ehci_ops mx5_ehci_ops = { - .powerup_fixup = mx5_ehci_powerup_fixup, -}; - -int ehci_hcd_init(int index, enum usb_init_type init, - struct ehci_hccr **hccr, struct ehci_hcor **hcor) -{ - struct usb_ehci *ehci; - - /* The only user for this is efikamx-usb */ - ehci_set_controller_priv(index, NULL, &mx5_ehci_ops); - set_usboh3_clk(); - enable_usboh3_clk(true); - set_usb_phy_clk(); - enable_usb_phy1_clk(true); - enable_usb_phy2_clk(true); - mdelay(1); - - /* Do board specific initialization */ - board_ehci_hcd_init(CONFIG_MXC_USB_PORT); - - ehci = (struct usb_ehci *)(OTG_BASE_ADDR + - (0x200 * CONFIG_MXC_USB_PORT)); - *hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength); - *hcor = (struct ehci_hcor *)((uint32_t)*hccr + - HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase))); - setbits_le32(&ehci->usbmode, CM_HOST); - - __raw_writel(CONFIG_MXC_USB_PORTSC, &ehci->portsc); - setbits_le32(&ehci->portsc, USB_EN); - - mxc_set_usbcontrol(CONFIG_MXC_USB_PORT, CONFIG_MXC_USB_FLAGS); - mdelay(10); - - /* Do board specific post-initialization */ - board_ehci_hcd_postinit(ehci, CONFIG_MXC_USB_PORT); - - return 0; -} - -int ehci_hcd_stop(int index) -{ - return 0; -} -#else /* CONFIG_IS_ENABLED(DM_USB) */ struct ehci_mx5_priv_data { struct ehci_ctrl ctrl; struct usb_ehci *ehci; @@ -344,10 +299,10 @@ static int ehci_usb_probe(struct udevice *dev) HC_LENGTH(ehci_readl(&(hccr)->cr_capbase))); setbits_le32(&ehci->usbmode, CM_HOST); - __raw_writel(CONFIG_MXC_USB_PORTSC, &ehci->portsc); + __raw_writel(CFG_MXC_USB_PORTSC, &ehci->portsc); setbits_le32(&ehci->portsc, USB_EN); - mxc_set_usbcontrol(priv->portnr, CONFIG_MXC_USB_FLAGS); + mxc_set_usbcontrol(priv->portnr, CFG_MXC_USB_FLAGS); mdelay(10); return ehci_register(dev, hccr, hcor, &mx5_ehci_ops, 0, @@ -371,4 +326,3 @@ U_BOOT_DRIVER(usb_mx5) = { .priv_auto = sizeof(struct ehci_mx5_priv_data), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; -#endif /* !CONFIG_IS_ENABLED(DM_USB) */