From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: Re: USB PM suspend/resume problems with Marvell Orion SoC Date: Sun, 6 Jan 2008 19:50:52 +0100 Message-ID: <200801061950.53317.rjw@sisk.pl> References: <4780F8FC.4070309@marvell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4780F8FC.4070309@marvell.com> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: Tawfik Bayyouk Cc: linux-pm@lists.linux-foundation.org, Tzachi Perelstein List-Id: linux-pm@vger.kernel.org Added some relevant CCs. On Sunday, 6 of January 2008, Tawfik Bayyouk wrote: > Hi, > > I am working with Linux version 2.6.24-rc4 for adding the power > management capabilities to the USB ehci driver for Orion SoC > device of Marvell. > > I need help in 2 issues: > > 1- The SoC device supports 2 levels of power management and I'd > like to reflect this at the driver level. > The first is "standby" where only clocks are halted while > preserving the registers values. The second is "mem" where the > whole SoC (including the USB HC) are powered off. > What is the correct way to distinguish between the 2 modes in > the .suspend and .resume routines of the platform_driver? > I believe that the parameter I am looking for is the PM target > state which is usually passed in the .set_target of the > platform_suspend_ops routine. That is correct. Note, however, that (most probably) .set_target() is going to be changed to .open() and a complementary callback .close() is to be added. > 2- After resuming from "mem" suspend, the USB can no longer > detect plugging in and out of USB devices. > I have investigate the problem and found that 4 registers where > not configured correctly. Saving the values of these registers > in the .suspend routine and loading them back in the .resume > routine resolves the problem. > The following are the 4 problematic registers: > USBCMD (0x140) > USBINTR (0x148) > PORTSC1 (0x184) > USBMODE (0x1A8) > > I would be very thankful for any clue in either of the 2 problems. Greetings, Rafael