Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e740f9a authored by Tony Lindgren's avatar Tony Lindgren
Browse files

ARM: OMAP: Move omap-pm-noop.c local to mach-omap2



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.

Cc: Jon Hunter <jon-hunter@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 01480bad
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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
+2 −2
Original line number Diff line number Diff line
@@ -22,8 +22,8 @@
#include <linux/device.h>
#include <linux/platform_device.h>

#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;
+2 −0
Original line number Diff line number Diff line
@@ -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);

+0 −1
Original line number Diff line number Diff line
@@ -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
+10 −7
Original line number Diff line number Diff line
@@ -45,8 +45,6 @@

#include <mach/hardware.h>

#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))
	if (!(timer->capability & OMAP_TIMER_ALWON)) {
		if (timer->get_context_loss_count)
			timer->ctx_loss_count =
			omap_pm_get_dev_context_loss_count(&timer->pdev->dev);
				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)) {
Loading