From: Jon Hunter <jon-hunter@ti.com>
To: Tony Lindgren <tony@atomide.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
linux-arm-kernel@lists.infradead.org,
Kevin Hilman <khilman@deeprootsystems.com>,
linux-omap@vger.kernel.org,
Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: Re: [PATCH 07/11] ARM: OMAP: Move omap-pm-noop.c local to mach-omap2
Date: Wed, 7 Nov 2012 16:04:51 -0600 [thread overview]
Message-ID: <509ADB03.2050909@ti.com> (raw)
In-Reply-To: <20121031231115.GG15766@atomide.com>
On 10/31/2012 06:11 PM, Tony Lindgren wrote:
> * Laurent Pinchart <laurent.pinchart@ideasonboard.com> [121031 16:03]:
>> Hi Tony,
>>
>> On Wednesday 31 October 2012 13:58:50 Tony Lindgren wrote:
>>> * Tony Lindgren <tony@atomide.com> [121030 16:55]:
>>>> This code should be private to mach-omap2.
>>>>
>>>> The only use for it in for omap1 has been in dmtimer.c
>>>> to check for context loss. However, omap1 does not
>>>> lose context during idle, so the code is not needed.
>>>> Further, omap1 timer has OMAP_TIMER_ALWON set, so omap1
>>>> was not hitting omap_pm_get_dev_context_loss_count()
>>>> test.
>>>
>>> Noticed one issue with my test compiles in the
>>> omap-for-v3.8/cleanup-headers branch that can be
>>> fixed along with this patch.
>>>
>>> --- a/drivers/media/platform/omap3isp/ispvideo.c
>>> +++ b/drivers/media/platform/omap3isp/ispvideo.c
>>> @@ -36,7 +36,6 @@
>>> #include <media/v4l2-ioctl.h>
>>> #include <plat/iommu.h>
>>> #include <plat/iovmm.h>
>>> -#include <plat/omap-pm.h>
>>
>> The reason this was included was to call omap_pm_set_min_bus_tput() in earlier
>> versions of the driver. We'll have to discuss what to replace that with, but
>> that's another topic.
>
> OK thanks.
>
>>>> @@ -730,6 +732,7 @@ static int __devinit omap_dm_timer_probe(struct
>>>> platform_device *pdev)>
>>>> timer->reserved = omap_dm_timer_reserved_systimer(timer->id);
>>>> timer->pdev = pdev;
>>>> timer->capability = pdata->timer_capability;
>>>>
>>>> + timer->get_context_loss_count = pdata->get_context_loss_count;
>>>>
>>>> /* Skip pm_runtime_enable for OMAP1 */
>>>> if (!(timer->capability & OMAP_TIMER_NEEDS_RESET)) {
>>>>
>>>> diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h
>>>> b/arch/arm/plat-omap/include/plat/dmtimer.h index 85868e9..3f5b9cf 100644
>>>> --- a/arch/arm/plat-omap/include/plat/dmtimer.h
>>>> +++ b/arch/arm/plat-omap/include/plat/dmtimer.h
>>>> @@ -94,6 +94,7 @@ struct dmtimer_platform_data {
>>>>
>>>> /* set_timer_src - Only used for OMAP1 devices */
>>>> int (*set_timer_src)(struct platform_device *pdev, int source);
>>>> u32 timer_capability;
>>>>
>>>> + int (*get_context_loss_count)(struct device *);
>>
>> That's a step forward for the common zImage, but one step backward for DT
>> support :-) I'm fine with this for now, but do you already have an idea on how
>> to solve that ?
>
> When it's converted to be a device driver, it can do it
> using runtime PM calls.
I am not sure if you are referring to runtime pm callbacks here, but if
so I am not sure I follow. Drivers such as dmtimer and gpio that are
using runtime pm are still dependent on OMAP specific APIs (such as
omap_pm_get_dev_context_loss_count()) for determining if the context was
lost between suspending and resuming the device. So I am not sure how
runtime pm solves this.
Speaking with Rob Herring, one solution for DT would be using bus
notifiers to populate such function pointers when a device is added.
Given that there are a few devices using this architecture specific API
for context loss I am wondering if we can do something generic in
omap_device.c for DT.
Cheers
Jon
WARNING: multiple messages have this Message-ID (diff)
From: jon-hunter@ti.com (Jon Hunter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 07/11] ARM: OMAP: Move omap-pm-noop.c local to mach-omap2
Date: Wed, 7 Nov 2012 16:04:51 -0600 [thread overview]
Message-ID: <509ADB03.2050909@ti.com> (raw)
In-Reply-To: <20121031231115.GG15766@atomide.com>
On 10/31/2012 06:11 PM, Tony Lindgren wrote:
> * Laurent Pinchart <laurent.pinchart@ideasonboard.com> [121031 16:03]:
>> Hi Tony,
>>
>> On Wednesday 31 October 2012 13:58:50 Tony Lindgren wrote:
>>> * Tony Lindgren <tony@atomide.com> [121030 16:55]:
>>>> This code should be private to mach-omap2.
>>>>
>>>> The only use for it in for omap1 has been in dmtimer.c
>>>> to check for context loss. However, omap1 does not
>>>> lose context during idle, so the code is not needed.
>>>> Further, omap1 timer has OMAP_TIMER_ALWON set, so omap1
>>>> was not hitting omap_pm_get_dev_context_loss_count()
>>>> test.
>>>
>>> Noticed one issue with my test compiles in the
>>> omap-for-v3.8/cleanup-headers branch that can be
>>> fixed along with this patch.
>>>
>>> --- a/drivers/media/platform/omap3isp/ispvideo.c
>>> +++ b/drivers/media/platform/omap3isp/ispvideo.c
>>> @@ -36,7 +36,6 @@
>>> #include <media/v4l2-ioctl.h>
>>> #include <plat/iommu.h>
>>> #include <plat/iovmm.h>
>>> -#include <plat/omap-pm.h>
>>
>> The reason this was included was to call omap_pm_set_min_bus_tput() in earlier
>> versions of the driver. We'll have to discuss what to replace that with, but
>> that's another topic.
>
> OK thanks.
>
>>>> @@ -730,6 +732,7 @@ static int __devinit omap_dm_timer_probe(struct
>>>> platform_device *pdev)>
>>>> timer->reserved = omap_dm_timer_reserved_systimer(timer->id);
>>>> timer->pdev = pdev;
>>>> timer->capability = pdata->timer_capability;
>>>>
>>>> + timer->get_context_loss_count = pdata->get_context_loss_count;
>>>>
>>>> /* Skip pm_runtime_enable for OMAP1 */
>>>> if (!(timer->capability & OMAP_TIMER_NEEDS_RESET)) {
>>>>
>>>> diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h
>>>> b/arch/arm/plat-omap/include/plat/dmtimer.h index 85868e9..3f5b9cf 100644
>>>> --- a/arch/arm/plat-omap/include/plat/dmtimer.h
>>>> +++ b/arch/arm/plat-omap/include/plat/dmtimer.h
>>>> @@ -94,6 +94,7 @@ struct dmtimer_platform_data {
>>>>
>>>> /* set_timer_src - Only used for OMAP1 devices */
>>>> int (*set_timer_src)(struct platform_device *pdev, int source);
>>>> u32 timer_capability;
>>>>
>>>> + int (*get_context_loss_count)(struct device *);
>>
>> That's a step forward for the common zImage, but one step backward for DT
>> support :-) I'm fine with this for now, but do you already have an idea on how
>> to solve that ?
>
> When it's converted to be a device driver, it can do it
> using runtime PM calls.
I am not sure if you are referring to runtime pm callbacks here, but if
so I am not sure I follow. Drivers such as dmtimer and gpio that are
using runtime pm are still dependent on OMAP specific APIs (such as
omap_pm_get_dev_context_loss_count()) for determining if the context was
lost between suspending and resuming the device. So I am not sure how
runtime pm solves this.
Speaking with Rob Herring, one solution for DT would be using bus
notifiers to populate such function pointers when a device is added.
Given that there are a few devices using this architecture specific API
for context loss I am wondering if we can do something generic in
omap_device.c for DT.
Cheers
Jon
next prev parent reply other threads:[~2012-11-07 22:05 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-30 23:52 [PATCH 00/11] Fix relative includes for omaps introduced by recent clean-up Tony Lindgren
2012-10-30 23:52 ` Tony Lindgren
2012-10-30 23:52 ` [PATCH 01/11] ARM: OMAP: Split sram.h to local headers and minimal shared header Tony Lindgren
2012-10-30 23:52 ` Tony Lindgren
2012-10-30 23:52 ` [PATCH 02/11] ARM: OMAP: Introduce common omap_map_sram() and omap_sram_reset() Tony Lindgren
2012-10-30 23:52 ` Tony Lindgren
2012-10-30 23:52 ` [PATCH 03/11] ARM: OMAP: Move omap1 specific code to local sram.c Tony Lindgren
2012-10-30 23:52 ` Tony Lindgren
2012-10-30 23:52 ` [PATCH 04/11] ARM: OMAP: Move omap2+ specific parts of sram.c to mach-omap2 Tony Lindgren
2012-10-30 23:52 ` Tony Lindgren
2012-10-31 22:40 ` Tony Lindgren
2012-10-31 22:40 ` Tony Lindgren
2012-10-30 23:52 ` [PATCH 05/11] ARM: OMAP: Make plat-omap/i2c.c port checks local Tony Lindgren
2012-10-30 23:52 ` Tony Lindgren
2012-10-30 23:52 ` [PATCH 06/11] ARM: OMAP: Fix relative includes for shared i2c.h file Tony Lindgren
2012-10-30 23:52 ` Tony Lindgren
2012-10-30 23:52 ` [PATCH 07/11] ARM: OMAP: Move omap-pm-noop.c local to mach-omap2 Tony Lindgren
2012-10-30 23:52 ` Tony Lindgren
2012-10-31 20:58 ` Tony Lindgren
2012-10-31 20:58 ` Tony Lindgren
2012-10-31 23:02 ` Laurent Pinchart
2012-10-31 23:02 ` Laurent Pinchart
2012-10-31 23:11 ` Tony Lindgren
2012-10-31 23:11 ` Tony Lindgren
2012-11-07 22:04 ` Jon Hunter [this message]
2012-11-07 22:04 ` Jon Hunter
2012-11-07 22:18 ` Tony Lindgren
2012-11-07 22:18 ` Tony Lindgren
2012-10-30 23:52 ` [PATCH 08/11] ARM: OMAP: Remove plat-omap/common.h Tony Lindgren
2012-10-30 23:52 ` Tony Lindgren
2012-10-30 23:53 ` [PATCH 09/11] ARM: OMAP: Fix relative includes for debug-devices.h Tony Lindgren
2012-10-30 23:53 ` Tony Lindgren
2012-10-31 0:05 ` Paul Walmsley
2012-10-31 0:05 ` Paul Walmsley
2012-10-30 23:53 ` [PATCH 10/11] ARM: OMAP: Remove cpu_is_omap usage from plat-omap/dma.c Tony Lindgren
2012-10-30 23:53 ` Tony Lindgren
2012-10-30 23:53 ` [PATCH 11/11] ARM: OMAP1: Remove relative includes Tony Lindgren
2012-10-30 23:53 ` Tony Lindgren
2012-10-31 21:11 ` Tony Lindgren
2012-10-31 21:11 ` Tony Lindgren
2012-10-31 21:52 ` [PATCH 12/11] ARM: OMAP: Fix relative includes for fpga.h Tony Lindgren
2012-10-31 21:52 ` Tony Lindgren
2012-11-12 10:47 ` Benoit Cousson
2012-11-12 10:47 ` Benoit Cousson
2012-11-12 21:34 ` Tony Lindgren
2012-11-12 21:34 ` Tony Lindgren
2012-10-31 22:08 ` [PATCH 13/11] ARM: OMAP2+: Fix relative includes for serial.h Tony Lindgren
2012-10-31 22:08 ` Tony Lindgren
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=509ADB03.2050909@ti.com \
--to=jon-hunter@ti.com \
--cc=khilman@deeprootsystems.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=tony@atomide.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.