RFC MXS: Add i.MX28 USB Host driver
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest0 of 8 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 8 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/8] MXS: Add i.MX28 USB Host driver
Quoted 4 lines · Marek Vasut
Quoted 4 lines
Quoted 3 lines
So the PHY actually registers the EHCI driver (
plat_bus->phy->ehci)? That's slightly weird, don't you think?
Quoted 8 lines
Quoted 4 lines
Your hardware device is a device consisting of a ehci core and a USB device core. Currently we register the child devices independently which leads to the mentioned problems. Instead we should register the USB core as a whole and pass the resources to either the client or the host driver.
Ok, giving it a second thought -- you mean to create "stub" driver, which claims and toggles the clock _and_ registers both the EHCI host driver and PHY driver under itself in the hierarchy. Is that correct?
No, the registration of the phy is fine the way it is. The stub driver should only register the ehci and the usb device. Maybe some pseudo code helps describing what I mean:
arch/arm/mach-mxs:
mx28_register_usbphy0(); mx28_register_usb0();
drivers/usb/otg/mxs-otg.c:
probe() {
clk_get();
clk_prepare_enable();
usb_get_phy(&pdev->dev);
if (pdata->mode == USB_OTG_MODE_HOST)
usb_add_hcd(priv->host);
else
usb_gadget_vbus_connect(priv->gadget);
}
module_platform_driver(mxs_otg_driver);drivers/usb/otg/mxs-otg-phy.c:
probe() {
clk_get();
clk_prepare_enable();
usb_register_phy(phy, "mxs-otg.0");
}
module_platform_driver(mxs_otg_phy_driver);The mxs-otg part can be reused on i.MX aswell, whereas mxs-otg-phy is mxs (and i.MX6 how we just learned) specific.
What currently is missing is a usb_get_phy() with a device argument to get the phy specific to a device. That's a problem, but you currently have it aswell with your current approach
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |