summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/pm-t3.c
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2012-02-04 22:32:44 -0800
committerLokesh Pathak <lpathak@nvidia.com>2012-02-23 22:24:52 -0800
commit88f88b1dd1427f5ed387b346956a6e6e46008926 (patch)
treef8e4515f15b2984d84ed98b8ad0549943898cf41 /arch/arm/mach-tegra/pm-t3.c
parent5faefcffab009466e2f3c426e38dedc32537b491 (diff)
ARM: tegra: power: Notify clock event in CPU mode switch
Add clock event notification to switch timekeeping to broadcast timer during Tegra3 CPU mode switch. Skip notifications if mode switch happens on entry/exit to/from suspend state when timekeeping is already suspended. Signed-off-by: Alex Frid <afrid@nvidia.com> (cherry picked from commit 236fd35c40a748d8373d7f34b53c320045fa4d3a) Change-Id: I38386dfe3d4ffb89f35828cd911d254b976f0063 Reviewed-on: http://git-master/r/84713 Tested-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/pm-t3.c')
-rw-r--r--arch/arm/mach-tegra/pm-t3.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/pm-t3.c b/arch/arm/mach-tegra/pm-t3.c
index 48f27cf01a0a..49a4c8951119 100644
--- a/arch/arm/mach-tegra/pm-t3.c
+++ b/arch/arm/mach-tegra/pm-t3.c
@@ -3,7 +3,7 @@
*
* Tegra3 SOC-specific power and cluster management
*
- * Copyright (c) 2009-2011, NVIDIA Corporation.
+ * Copyright (c) 2009-2012, NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -26,6 +26,7 @@
#include <linux/irq.h>
#include <linux/device.h>
#include <linux/module.h>
+#include <linux/clockchips.h>
#include <mach/gpio.h>
#include <mach/iomap.h>
@@ -380,9 +381,17 @@ int tegra_cluster_control(unsigned int us, unsigned int flags)
if (us)
tegra_lp2_set_trigger(0);
} else {
+ int cpu = 0;
+
tegra_set_cpu_in_lp2(0);
cpu_pm_enter();
+ if (!timekeeping_suspended)
+ clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER,
+ &cpu);
tegra_idle_lp2_last(0, flags);
+ if (!timekeeping_suspended)
+ clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT,
+ &cpu);
cpu_pm_exit();
tegra_clear_cpu_in_lp2(0);
}