From patchwork Wed Oct 31 20:58:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 1681681 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 3AE3ADFB80 for ; Wed, 31 Oct 2012 21:01:03 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TTfNK-0007CF-NI; Wed, 31 Oct 2012 20:58:58 +0000 Received: from mho-03-ewr.mailhop.org ([204.13.248.66] helo=mho-01-ewr.mailhop.org) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TTfNH-0007Bw-9J for linux-arm-kernel@lists.infradead.org; Wed, 31 Oct 2012 20:58:56 +0000 Received: from c-98-234-237-12.hsd1.ca.comcast.net ([98.234.237.12] helo=localhost.localdomain) by mho-01-ewr.mailhop.org with esmtpa (Exim 4.72) (envelope-from ) id 1TTfNE-000BEK-UN; Wed, 31 Oct 2012 20:58:53 +0000 Received: from Mutt by mutt-smtp-wrapper.pl 1.2 (www.zdo.com/articles/mutt-smtp-wrapper.shtml) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 98.234.237.12 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+863wemygawYaigQfHk7+5 Date: Wed, 31 Oct 2012 13:58:50 -0700 From: Tony Lindgren To: linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 07/11] ARM: OMAP: Move omap-pm-noop.c local to mach-omap2 Message-ID: <20121031205850.GO12739@atomide.com> References: <20121030234852.25936.12482.stgit@muffinssi.local> <20121030235255.25936.36727.stgit@muffinssi.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20121030235255.25936.36727.stgit@muffinssi.local> User-Agent: Mutt/1.5.20 (2009-06-14) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121031_165855_414852_17FC687A X-CRM114-Status: GOOD ( 25.69 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [204.13.248.66 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines Cc: Kevin Hilman , linux-omap@vger.kernel.org, Jon Hunter , Mauro Carvalho Chehab , Laurent Pinchart X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org * Tony Lindgren [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. I'll fold that into this patch. Regards, Tony > Cc: Jon Hunter > Cc: Kevin Hilman > Signed-off-by: Tony Lindgren > --- > arch/arm/mach-omap2/Makefile | 1 + > arch/arm/mach-omap2/omap-pm-noop.c | 4 ++-- > arch/arm/mach-omap2/timer.c | 2 ++ > arch/arm/plat-omap/Makefile | 1 - > arch/arm/plat-omap/dmtimer.c | 17 ++++++++++------- > arch/arm/plat-omap/include/plat/dmtimer.h | 2 ++ > 6 files changed, 17 insertions(+), 10 deletions(-) > rename arch/arm/{plat-omap/omap-pm-noop.c => mach-omap2/omap-pm-noop.c} (99%) > > diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile > index e3de5d4..b118ed5 100644 > --- a/arch/arm/mach-omap2/Makefile > +++ b/arch/arm/mach-omap2/Makefile > @@ -70,6 +70,7 @@ obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o omap-mpuss-lowpower.o > obj-$(CONFIG_ARCH_OMAP4) += sleep44xx.o > obj-$(CONFIG_SOC_OMAP5) += omap-mpuss-lowpower.o sleep44xx.o > obj-$(CONFIG_PM_DEBUG) += pm-debug.o > +obj-$(CONFIG_OMAP_PM_NOOP) += omap-pm-noop.o > > obj-$(CONFIG_POWER_AVS_OMAP) += sr_device.o > obj-$(CONFIG_POWER_AVS_OMAP_CLASS3) += smartreflex-class3.o > diff --git a/arch/arm/plat-omap/omap-pm-noop.c b/arch/arm/mach-omap2/omap-pm-noop.c > similarity index 99% > rename from arch/arm/plat-omap/omap-pm-noop.c > rename to arch/arm/mach-omap2/omap-pm-noop.c > index 198685b..6a3be2b 100644 > --- a/arch/arm/plat-omap/omap-pm-noop.c > +++ b/arch/arm/mach-omap2/omap-pm-noop.c > @@ -22,8 +22,8 @@ > #include > #include > > -#include "../mach-omap2/omap_device.h" > -#include "../mach-omap2/omap-pm.h" > +#include "omap_device.h" > +#include "omap-pm.h" > > static bool off_mode_enabled; > static int dummy_context_loss_counter; > diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c > index 565e575..95e4478 100644 > --- a/arch/arm/mach-omap2/timer.c > +++ b/arch/arm/mach-omap2/timer.c > @@ -559,6 +559,8 @@ static int __init omap_timer_init(struct omap_hwmod *oh, void *unused) > if (timer_dev_attr) > pdata->timer_capability = timer_dev_attr->timer_capability; > > + pdata->get_context_loss_count = omap_pm_get_dev_context_loss_count; > + > pdev = omap_device_build(name, id, oh, pdata, sizeof(*pdata), > NULL, 0, 0); > > diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile > index 4bd0ace..50da9bf 100644 > --- a/arch/arm/plat-omap/Makefile > +++ b/arch/arm/plat-omap/Makefile > @@ -19,4 +19,3 @@ obj-y += $(i2c-omap-m) $(i2c-omap-y) > # OMAP mailbox framework > obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o > > -obj-$(CONFIG_OMAP_PM_NOOP) += omap-pm-noop.o > diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c > index 4a0b30a..9a0bbc4 100644 > --- a/arch/arm/plat-omap/dmtimer.c > +++ b/arch/arm/plat-omap/dmtimer.c > @@ -45,8 +45,6 @@ > > #include > > -#include "../mach-omap2/omap-pm.h" > - > static u32 omap_reserved_systimers; > static LIST_HEAD(omap_timer_list); > static DEFINE_SPINLOCK(dm_timer_lock); > @@ -349,7 +347,8 @@ int omap_dm_timer_start(struct omap_dm_timer *timer) > omap_dm_timer_enable(timer); > > if (!(timer->capability & OMAP_TIMER_ALWON)) { > - if (omap_pm_get_dev_context_loss_count(&timer->pdev->dev) != > + if (timer->get_context_loss_count && > + timer->get_context_loss_count(&timer->pdev->dev) != > timer->ctx_loss_count) > omap_timer_restore_context(timer); > } > @@ -378,9 +377,11 @@ int omap_dm_timer_stop(struct omap_dm_timer *timer) > > __omap_dm_timer_stop(timer, timer->posted, rate); > > - if (!(timer->capability & OMAP_TIMER_ALWON)) > - timer->ctx_loss_count = > - omap_pm_get_dev_context_loss_count(&timer->pdev->dev); > + if (!(timer->capability & OMAP_TIMER_ALWON)) { > + if (timer->get_context_loss_count) > + timer->ctx_loss_count = > + timer->get_context_loss_count(&timer->pdev->dev); > + } > > /* > * Since the register values are computed and written within > @@ -496,7 +497,8 @@ int omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload, > omap_dm_timer_enable(timer); > > if (!(timer->capability & OMAP_TIMER_ALWON)) { > - if (omap_pm_get_dev_context_loss_count(&timer->pdev->dev) != > + if (timer->get_context_loss_count && > + timer->get_context_loss_count(&timer->pdev->dev) != > timer->ctx_loss_count) > omap_timer_restore_context(timer); > } > @@ -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 *); > }; > > int omap_dm_timer_reserve_systimer(int id); > @@ -263,6 +264,7 @@ struct omap_dm_timer { > unsigned reserved:1; > unsigned posted:1; > struct timer_regs context; > + int (*get_context_loss_count)(struct device *); > int ctx_loss_count; > int revision; > u32 capability; > > -- > To unsubscribe from this list: send the line "unsubscribe linux-omap" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/media/platform/omap3isp/ispvideo.c +++ b/drivers/media/platform/omap3isp/ispvideo.c @@ -36,7 +36,6 @@ #include #include #include -#include #include "ispvideo.h" #include "isp.h"