From patchwork Fri Sep 4 23:05:16 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vikram pandita X-Patchwork-Id: 45807 X-Patchwork-Delegate: me@felipebalbi.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n84NBGXq017613 for ; Fri, 4 Sep 2009 23:11:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934479AbZIDXLJ (ORCPT ); Fri, 4 Sep 2009 19:11:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934475AbZIDXLJ (ORCPT ); Fri, 4 Sep 2009 19:11:09 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:50666 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934470AbZIDXLH (ORCPT ); Fri, 4 Sep 2009 19:11:07 -0400 Received: from dlep33.itg.ti.com ([157.170.170.112]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id n84NB28Z012438; Fri, 4 Sep 2009 18:11:07 -0500 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id n84NB01t027169; Fri, 4 Sep 2009 18:11:00 -0500 (CDT) Received: from vip-tid (lta0307903-128247075087.am.dhcp.ti.com [128.247.75.87]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id n84NB0Z11793; Fri, 4 Sep 2009 18:11:00 -0500 (CDT) Received: from vip-tid (localhost.localdomain [127.0.0.1]) by vip-tid (Postfix) with ESMTP id 912BF29A4FD; Fri, 4 Sep 2009 18:05:17 -0500 (CDT) Received: (from vikram@localhost) by vip-tid (8.14.3/8.14.3/Submit) id n84N5H7f019072; Fri, 4 Sep 2009 18:05:17 -0500 X-Authentication-Warning: vip-tid: vikram set sender to vikram.pandita@ti.com using -f From: Vikram Pandita To: linux-usb@vger.kernel.org Cc: linux-omap@vger.kernel.org, david-b@pacbell.net, ajay.gupta@ti.com, gadiyar@ti.com, felipe.balbi@nokia.com, Vikram Pandita Subject: [PATCH 3/3] USB: musb: omap: Enable MUSB clocks before xceiver resume Date: Fri, 4 Sep 2009 18:05:16 -0500 Message-Id: <1252105516-19040-1-git-send-email-vikram.pandita@ti.com> X-Mailer: git-send-email 1.6.3.3.334.g916e1 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Enable MUSB clocks before the xceiver resume is called. As soon as xceiver resume is called, xceiver communicates an interrupt to MUSB over ULPI bus and the interrupt handler crashes as the clocks are not enabled on going to resume. So enable the MUSB clocks so that its ready to handle interrupts from the xceiver Signed-off-by: Vikram Pandita --- drivers/usb/musb/omap2430.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index ea7a798..67dabe1 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -286,13 +286,18 @@ int musb_platform_resume(struct musb *musb) if (!musb->clock) return 0; - otg_set_suspend(otg_get_transceiver(), 0); - + /* Keep MUSB clock enabled + * this is needed when phy xvr is enabled, MUSB gets + * an interrupt and system crashes. + * So enable clock before calling phy resume + */ if (musb->set_clock) musb->set_clock(musb->clock, 1); else clk_enable(musb->clock); + otg_set_suspend(otg_get_transceiver(), 0); + l = omap_readl(OTG_SYSCONFIG); l &= ~ENABLEWAKEUP; /* disable wakeup */ omap_writel(l, OTG_SYSCONFIG);