RE: [PATCH 1/3 v5] usb: musb: Add support for ti81xx platform
From: Gupta, Ajay Kumar <hidden>
Date: 2012-02-13 07:05:16
Hi,
quoted
On Wed, Feb 08, 2012 at 11:46:00AM +0530, Shubhrajyoti wrote:quoted
On Wednesday 08 February 2012 09:56 AM, Ajay Kumar Gupta wrote:quoted
+static int dsps_musb_init(struct musb *musb) { + struct device *dev = musb->controller; + struct musb_hdrc_platform_data *plat = dev->platform_data; + struct platform_device *pdev = to_platform_device(dev-parent);quoted
quoted
+ struct dsps_glue *glue = platform_get_drvdata(pdev); + const struct dsps_musb_wrapper *wrp = glue->wrp; + struct omap_musb_board_data *data = plat->board_data; + void __iomem *reg_base = musb->ctrl_base; + u32 rev, val; + int status; + + /* mentor core register starts at offset of 0x400 from musbbasequoted
*/quoted
quoted
+ musb->mregs += wrp->musb_core_offset; + + /* NOP driver needs change if supporting dual instance */ + usb_nop_xceiv_register(); + musb->xceiv = otg_get_transceiver(); + if (!musb->xceiv) + return -ENODEV; + + status = pm_runtime_get_sync(dev); + if (status < 0) { + dev_err(dev, "pm_runtime_get_sync FAILED"); + goto err0; + }So you are doing a get_sync at init and you cut the clocks at exitonly.quoted
Any particular reason for that.This is a platform glue layer and main io paths are in musb_core.c/musb_host.c and musb_gadget.c. Host controller driver's bus_suspend/resume are in musb_host.c. What specific pm implementation are you looking for?
The current patch calls pm_runtime_get_sync() for musb "device" and that is anyway getting done in common core file musb_core.c. Glue layer file need to call pm_runtime_get_sync() and x_put() for glue "device" during init and exit. I will resubmit this patch with above change. Ajay
Ajayquoted
that's a very good question. We're just adding a brand new file, which is clean and stuff... so we might as well start with good PM capabilities. -- balbi-- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html
-- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html