RE: [PATCH 2/3 v3] musb: Add context save and restore support

2009-12-17 Thread Gupta, Ajay Kumar
snip #ifdef CONFIG_PM +static struct musb_context_registers musb_context; + +void musb_save_context(struct musb *musb) +{ Could you add one more parameter to this function call, which would select either if we want to save the musb_platform context or not? I m working at the

Re: [PATCH 2/3 v3] musb: Add context save and restore support

2009-12-17 Thread Arnaud Mandy
ext Gupta, Ajay Kumar wrote: snip #ifdef CONFIG_PM +static struct musb_context_registers musb_context; + +void musb_save_context(struct musb *musb) +{ Could you add one more parameter to this function call, which would select either if we want to save the musb_platform context or

RE: [PATCH 2/3 v3] musb: Add context save and restore support

2009-12-17 Thread Gupta, Ajay Kumar
: [PATCH 2/3 v3] musb: Add context save and restore support ext Gupta, Ajay Kumar wrote: snip #ifdef CONFIG_PM +static struct musb_context_registers musb_context; + +void musb_save_context(struct musb *musb) +{ Could you add one more parameter to this function call, which would

Re: [PATCH 2/3 v3] musb: Add context save and restore support

2009-12-17 Thread Arnaud Mandy
; Gadiyar, Anand Subject: Re: [PATCH 2/3 v3] musb: Add context save and restore support ext Gupta, Ajay Kumar wrote: snip #ifdef CONFIG_PM +static struct musb_context_registers musb_context; + +void musb_save_context(struct musb *musb) +{ Could you add one more parameter

RE: [PATCH 2/3 v3] musb: Add context save and restore support

2009-12-17 Thread Gupta, Ajay Kumar
In order to support off-mode, we need the transceiver driver to wake-up the controller. I m working on a hook which would allow that. I want to take advantage of your implementation for saving/restoring musb context, but saving the platform data is not necessary in my case. Then

RE: [PATCH 2/3 v3] musb: Add context save and restore support

2009-12-15 Thread Gupta, Ajay Kumar
snip.. @@ -2179,15 +2322,23 @@ static int musb_suspend(struct device *dev) spin_lock_irqsave(musb-lock, flags); if (is_peripheral_active(musb)) { - /* FIXME force disconnect unless we know USB will wake -* the system up quickly enough to

RE: [PATCH 2/3 v3] musb: Add context save and restore support

2009-12-15 Thread Gadiyar, Anand
I think we should only allow suspend if cable isn't connected. What would happend if you have mounted fs (using mass storage), user is transferring files and you force a disconnect ? We force a disconnect during suspend which is actually triggered by user Only. So do we need to consider

Re: [PATCH 2/3 v3] musb: Add context save and restore support

2009-12-15 Thread Felipe Balbi
Hi, On Tue, Dec 15, 2009 at 01:04:01PM +0100, ext Gadiyar, Anand wrote: I think we should only allow suspend if cable isn't connected. What would happend if you have mounted fs (using mass storage), user is transferring files and you force a disconnect ? We force a disconnect during suspend

RE: [PATCH 2/3 v3] musb: Add context save and restore support

2009-12-15 Thread Gupta, Ajay Kumar
2/3 v3] musb: Add context save and restore support Hi, On Tue, Dec 15, 2009 at 01:04:01PM +0100, ext Gadiyar, Anand wrote: I think we should only allow suspend if cable isn't connected. What would happend if you have mounted fs (using mass storage), user is transferring files and you

RE: [PATCH 2/3 v3] musb: Add context save and restore support

2009-12-15 Thread Gupta, Ajay Kumar
It should be system's responsibility for not entering into suspend mode when there is an ongoing active transfer. If this is reliable then there is no need for any force disconnect. On OMAP3EVM, I can see that system doesn't enter into suspend mode when cable is connected so should be fine

Re: [PATCH 2/3 v3] musb: Add context save and restore support

2009-12-15 Thread Felipe Balbi
...@vger.kernel.org; linux-omap@vger.kernel.org; davi...@pacbell.net Subject: Re: [PATCH 2/3 v3] musb: Add context save and restore support Hi, On Tue, Dec 15, 2009 at 01:04:01PM +0100, ext Gadiyar, Anand wrote: I think we should only allow suspend if cable isn't connected. What would happend if you have

[PATCH 2/3 v3] musb: Add context save and restore support

2009-12-14 Thread Ajay Kumar Gupta
Adding support for MUSB register save and restore during system suspend and resume. Changes: - Added musb_save/restore_context() functions - Added platform specific musb_platform_save/restore_context() to handle platform specific jobs. - Maintaining BlackFin

Re: [PATCH 2/3 v3] musb: Add context save and restore support

2009-12-14 Thread Felipe Balbi
Hi, On Mon, Dec 14, 2009 at 02:39:41PM +0100, ext Ajay Kumar Gupta wrote: +void musb_restore_context(struct musb *musb) +{ + int i; + void __iomem *musb_base = musb-mregs; + void __iomem *ep_target_regs; + + musb_platform_restore_context(musb_context); + + if

Re: [PATCH 2/3 v3] musb: Add context save and restore support

2009-12-14 Thread Felipe Balbi
Hi, On Mon, Dec 14, 2009 at 05:33:24PM +0100, Balbi Felipe (Nokia-D/Helsinki) wrote: waaay too many exported functions already. Let's add some structure to pass functions pointers. I'll cook a patch adding suspend(), resume(), init() and friends and send tomorrow. Then your patch would add