From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Subject: Re: [PATCH V2 6/8] usb: musb: Offmode fix for idle path Date: Tue, 10 Aug 2010 17:53:13 +0400 Message-ID: <4C6159C9.6090204@ru.mvista.com> References: <1281115624-1174-1-git-send-email-hemahk@ti.com> <5A47E75E594F054BAF48C5E4FC4B92AB032401D637@dbde02.ent.ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mail-bw0-f46.google.com ([209.85.214.46]:37178 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757505Ab0HJNyH (ORCPT ); Tue, 10 Aug 2010 09:54:07 -0400 In-Reply-To: Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: "Kalliguddi, Hema" Cc: "DebBarma, Tarun Kanti" , "linux-usb@vger.kernel.org" , "linux-omap@vger.kernel.org" , "Mankad, Maulik Ojas" , Felipe Balbi , Tony Lindgren , Kevin Hilman Hello. Kalliguddi, Hema wrote: >> Hema, >>> -----Original Message----- >>> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap- >>> owner@vger.kernel.org] On Behalf Of Hema HK >>> Sent: Friday, August 06, 2010 10:57 PM >>> To: linux-usb@vger.kernel.org; linux-omap@vger.kernel.org >>> Cc: Kalliguddi, Hema; Mankad, Maulik Ojas; Felipe Balbi; Tony Lindgren; >>> Kevin Hilman >>> Subject: [PATCH V2 6/8] usb: musb: Offmode fix for idle path >>> From: Hema HK >>> With OMAP core-off support musb was not functional as context was getting >>> lost after wakeup from core-off. And also musb was blocking the core-off >>> after loading the gadget driver even with no cable connected sometimes. >>> Added the conext save/restore api in the platform layer which will >>> be called in the idle and wakeup path. >>> Changed the usb sysconfig settings as per the usbotg functional spec. >>> When the device is not active, configure to force idle and force standby >>> mode. >>> When it is being used, configure in smart standby and smart idle mode. >>> So while attempting to coreoff the usb is configured to force standby and >>> force idle mode, after wakeup configured in smart idle and smart standby. >>> Signed-off-by: Hema HK >>> Signed-off-by: Maulik Mankad >>> Cc: Felipe Balbi >>> Cc: Tony Lindgren >>> Cc: Kevin Hilman >>> Index: linux-omap-pm/drivers/usb/musb/omap2430.c >>> =================================================================== >>> --- linux-omap-pm.orig/drivers/usb/musb/omap2430.c 2010-08-06 >>> 09:24:21.069863329 -0400 >>> +++ linux-omap-pm/drivers/usb/musb/omap2430.c 2010-08-06 >>> 10:44:30.093914217 -0400 [...] >>> @@ -259,15 +273,42 @@ >>> void musb_platform_save_context(struct musb *musb, >>> struct musb_context_registers *musb_context) >>> { >>> - musb_context->otg_sysconfig = musb_readl(musb->mregs, OTG_SYSCONFIG); >>> - musb_context->otg_forcestandby = musb_readl(musb->mregs, OTG_FORCESTDBY); >>> + /* >>> + * As per the omap-usbotg specification, configure it to forced standby >>> + * and force idle mode when no activity on usb. >>> + */ >>> + void __iomem *musb_base = musb->mregs; >>> + >> Just to clarify, have you already taken care of ioremap() / >> request_mem_region() for musb_base? > This is already done. Not quite. MUSB driver doesn't call request_mem_region(). WBR, Sergei