All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sourav Poddar <sourav.poddar@ti.com>
To: Kevin Hilman <khilman@linaro.org>, vaibhav.bedia@ti.com
Cc: gregkh@linuxfoundation.org, tony@atomide.com,
	rmk+kernel@arm.linux.org.uk, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
	Santosh Shilimkar <santosh.shilimkar@ti.com>,
	Felipe Balbi <balbi@ti.com>, Rajendra nayak <rnayak@ti.com>
Subject: Re: [PATCHv3] driver: serial: prevent UART console idle on suspend while using "no_console_suspend"
Date: Wed, 10 Apr 2013 11:37:28 +0530	[thread overview]
Message-ID: <516501A0.4000004@ti.com> (raw)
In-Reply-To: <87obdnh6au.fsf@linaro.org>

Hi,
On Wednesday 10 April 2013 12:37 AM, Kevin Hilman wrote:
> Sourav Poddar<sourav.poddar@ti.com>  writes:
>
>> Hi Kevin,
>> On Friday 05 April 2013 11:10 PM, Kevin Hilman wrote:
>>> Sourav Poddar<sourav.poddar@ti.com>   writes:
>>>
>>>> With dt boot, uart wakeup after suspend is non functional while using
>>>> "no_console_suspend" in the bootargs. With "no_console_suspend" used, we
>>>> should prevent the runtime suspend of the uart port which is getting used
>>>> as an console.
>>>>
>>>> Cc: Santosh Shilimkar<santosh.shilimkar@ti.com>
>>>> Cc: Felipe Balbi<balbi@ti.com>
>>>> Cc: Rajendra nayak<rnayak@ti.com>
>>>> Tested on omap5430evm, omap4430sdp.
>>>>
>>>> Signed-off-by: Sourav Poddar<sourav.poddar@ti.com>
>>> Rather than make these special checks inside the driver's runtime PM
>>> callbacks, you should just disable runtime PM (pm_runtime_disable())
>>>
>>> Then, this should be broken into 2 patches.
>>>
>>> 1) serial core: add the '->is_console' flag.  (nit on naming: don't call
>>>      it port_is_console, since the struct is already a uart_port)
>>>
>>> 2) In the OMAP UART driver's ->prepare callback, check the is_console flag
>>>      and pm_runtime_disable() accordingly  (then pm_runtime_enable() in
>>>      the drivers's ->complete callback.
>>>
>>> Kevin
>> I was working on your above suggestions, but realised there is not
>> only console
>> uart which has the requirement of keeping the clocks enabled while going on
>> suspend.
>>
>> If you see arch/arm/boot/dts/am33xx.dtsi, there is a ocmcram which has
>> "no_idle_on_suspend" property used.
> Can you please ask the AM33xx folks how (and why) this is being used?
>
> I don't see/find a driver for this device in mainline, so without a
> driver this flag will not be used.
>
Looping in Vaibhav Bedia for ocmcram..

[Vaibhav]:
   There is a discussion going on about a cleaner way of handling
   ti, no_idle_on_suspend" part (as this is a sort of hack). We got a way
   around for UART ($subject) by making serial core/driver handle this 
for us.
   But with this, we will delete codes around "no_idle_on_suspend" flag in
   omap_device file.

   But, we realised that its not only UART which requires the clocks to 
be active
   whie going for suspend. There is a dts entry for ocmcram also.

   As Kevin also pointed out, we don't see a driver for this device in 
mainline, It would be
   great if you can explain how its getting used?

   You can find the complete discussion on v3 here:
      https://lkml.org/lkml/2013/4/5/239

>>      ocmcram: ocmcram@40300000 {
>>                          compatible = "ti,am3352-ocmcram";
>>                          reg =<0x40300000 0x10000>;
>>                          ti,hwmods = "ocmcram";
>>                          ti,no_idle_on_suspend;
>>          };
>> This property gets checked in omap_device file and correspondingly
>> od->flags is set.
>>
>> Based on your above inputs, the patches which I cooked up is
>> inlined[1]. Though, the below
>> patches works fine for uart case. The patches will effect ocmcram case
>> and I am inling them
>> "just for discussion".
> Could you also have a look at Russell's suggestion for getting rid of
> the 'is_console' flag.
>
[Kevin]: Yes, will do that.
> Thanks,
>
> Kevin
~Sourav

WARNING: multiple messages have this Message-ID (diff)
From: Sourav Poddar <sourav.poddar@ti.com>
To: Kevin Hilman <khilman@linaro.org>, <vaibhav.bedia@ti.com>
Cc: <gregkh@linuxfoundation.org>, <tony@atomide.com>,
	<rmk+kernel@arm.linux.org.uk>, <linux-omap@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-serial@vger.kernel.org>,
	Santosh Shilimkar <santosh.shilimkar@ti.com>,
	Felipe Balbi <balbi@ti.com>, Rajendra nayak <rnayak@ti.com>
Subject: Re: [PATCHv3] driver: serial: prevent UART console idle on suspend while using "no_console_suspend"
Date: Wed, 10 Apr 2013 11:37:28 +0530	[thread overview]
Message-ID: <516501A0.4000004@ti.com> (raw)
In-Reply-To: <87obdnh6au.fsf@linaro.org>

Hi,
On Wednesday 10 April 2013 12:37 AM, Kevin Hilman wrote:
> Sourav Poddar<sourav.poddar@ti.com>  writes:
>
>> Hi Kevin,
>> On Friday 05 April 2013 11:10 PM, Kevin Hilman wrote:
>>> Sourav Poddar<sourav.poddar@ti.com>   writes:
>>>
>>>> With dt boot, uart wakeup after suspend is non functional while using
>>>> "no_console_suspend" in the bootargs. With "no_console_suspend" used, we
>>>> should prevent the runtime suspend of the uart port which is getting used
>>>> as an console.
>>>>
>>>> Cc: Santosh Shilimkar<santosh.shilimkar@ti.com>
>>>> Cc: Felipe Balbi<balbi@ti.com>
>>>> Cc: Rajendra nayak<rnayak@ti.com>
>>>> Tested on omap5430evm, omap4430sdp.
>>>>
>>>> Signed-off-by: Sourav Poddar<sourav.poddar@ti.com>
>>> Rather than make these special checks inside the driver's runtime PM
>>> callbacks, you should just disable runtime PM (pm_runtime_disable())
>>>
>>> Then, this should be broken into 2 patches.
>>>
>>> 1) serial core: add the '->is_console' flag.  (nit on naming: don't call
>>>      it port_is_console, since the struct is already a uart_port)
>>>
>>> 2) In the OMAP UART driver's ->prepare callback, check the is_console flag
>>>      and pm_runtime_disable() accordingly  (then pm_runtime_enable() in
>>>      the drivers's ->complete callback.
>>>
>>> Kevin
>> I was working on your above suggestions, but realised there is not
>> only console
>> uart which has the requirement of keeping the clocks enabled while going on
>> suspend.
>>
>> If you see arch/arm/boot/dts/am33xx.dtsi, there is a ocmcram which has
>> "no_idle_on_suspend" property used.
> Can you please ask the AM33xx folks how (and why) this is being used?
>
> I don't see/find a driver for this device in mainline, so without a
> driver this flag will not be used.
>
Looping in Vaibhav Bedia for ocmcram..

[Vaibhav]:
   There is a discussion going on about a cleaner way of handling
   ti, no_idle_on_suspend" part (as this is a sort of hack). We got a way
   around for UART ($subject) by making serial core/driver handle this 
for us.
   But with this, we will delete codes around "no_idle_on_suspend" flag in
   omap_device file.

   But, we realised that its not only UART which requires the clocks to 
be active
   whie going for suspend. There is a dts entry for ocmcram also.

   As Kevin also pointed out, we don't see a driver for this device in 
mainline, It would be
   great if you can explain how its getting used?

   You can find the complete discussion on v3 here:
      https://lkml.org/lkml/2013/4/5/239

>>      ocmcram: ocmcram@40300000 {
>>                          compatible = "ti,am3352-ocmcram";
>>                          reg =<0x40300000 0x10000>;
>>                          ti,hwmods = "ocmcram";
>>                          ti,no_idle_on_suspend;
>>          };
>> This property gets checked in omap_device file and correspondingly
>> od->flags is set.
>>
>> Based on your above inputs, the patches which I cooked up is
>> inlined[1]. Though, the below
>> patches works fine for uart case. The patches will effect ocmcram case
>> and I am inling them
>> "just for discussion".
> Could you also have a look at Russell's suggestion for getting rid of
> the 'is_console' flag.
>
[Kevin]: Yes, will do that.
> Thanks,
>
> Kevin
~Sourav

  reply	other threads:[~2013-04-10  6:07 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-05 13:15 [PATCHv3] driver: serial: prevent UART console idle on suspend while using "no_console_suspend" Sourav Poddar
2013-04-05 13:15 ` Sourav Poddar
2013-04-05 17:40 ` Kevin Hilman
2013-04-05 17:40   ` Kevin Hilman
2013-04-09 18:54   ` Sourav Poddar
2013-04-09 18:54     ` Sourav Poddar
2013-04-09 19:07     ` Kevin Hilman
2013-04-09 19:07       ` Kevin Hilman
2013-04-10  6:07       ` Sourav Poddar [this message]
2013-04-10  6:07         ` Sourav Poddar
2013-04-10  6:19         ` Bedia, Vaibhav
2013-04-10  9:43           ` Sourav Poddar
2013-04-10 11:26             ` Bedia, Vaibhav
2013-04-10 21:26               ` Kevin Hilman
2013-04-10 21:26                 ` Kevin Hilman
2013-04-11 14:15                 ` Kevin Hilman
2013-04-11 14:15                   ` Kevin Hilman
2013-04-15 11:50                   ` Bedia, Vaibhav
2013-04-15 21:33                     ` Kevin Hilman
2013-04-15 21:33                       ` Kevin Hilman
2013-04-15 11:55                   ` Sourav Poddar
2013-04-08 17:14 ` Russell King - ARM Linux
2013-04-10  5:27   ` Sourav Poddar
2013-04-10  5:27     ` Sourav Poddar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=516501A0.4000004@ti.com \
    --to=sourav.poddar@ti.com \
    --cc=balbi@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=khilman@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=rnayak@ti.com \
    --cc=santosh.shilimkar@ti.com \
    --cc=tony@atomide.com \
    --cc=vaibhav.bedia@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.