From 57ddaf916069aa377fad9975ad74d5b47643dedb Mon Sep 17 00:00:00 2001 From: Scott Williams Date: Fri, 22 Jul 2011 14:49:17 -0700 Subject: ARM: tegra: Add cpuidle.h Change-Id: I75ec091f9dcd0fa3fa56b1542f58a02006c1a314 Signed-off-by: Scott Williams DW: Split into logical changes Signed-off-by: Dan Willemsen Rebase-Id: Ree5fce2632aff6dc59879817ad7ad3f2b1538244 --- arch/arm/mach-tegra/cpuidle.c | 1 + arch/arm/mach-tegra/cpuidle.h | 28 ++++++++++++++++++++++++++++ arch/arm/mach-tegra/pm.c | 1 + arch/arm/mach-tegra/sleep.h | 2 -- 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 arch/arm/mach-tegra/cpuidle.h diff --git a/arch/arm/mach-tegra/cpuidle.c b/arch/arm/mach-tegra/cpuidle.c index 91f5fc236a04..90bb6287e4ef 100644 --- a/arch/arm/mach-tegra/cpuidle.c +++ b/arch/arm/mach-tegra/cpuidle.c @@ -40,6 +40,7 @@ #include #include +#include "cpuidle.h" #include "pm.h" #include "sleep.h" diff --git a/arch/arm/mach-tegra/cpuidle.h b/arch/arm/mach-tegra/cpuidle.h new file mode 100644 index 000000000000..2b57aefa6ff7 --- /dev/null +++ b/arch/arm/mach-tegra/cpuidle.h @@ -0,0 +1,28 @@ +/* + * arch/arm/mach-tegra/cpuidle.h + * + * Declarations for power state transition code + * + * Copyright (c) 2011, NVIDIA Corporation. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#ifndef __MACH_TEGRA_CPUIDLE_H +#define __MACH_TEGRA_CPUIDLE_H + +#ifdef CONFIG_CPU_IDLE +void tegra_lp2_in_idle(bool enable); +#else +static inline void tegra_lp2_in_idle(bool enable) {} +#endif + +#endif diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c index 332550ae6591..acf020764496 100644 --- a/arch/arm/mach-tegra/pm.c +++ b/arch/arm/mach-tegra/pm.c @@ -54,6 +54,7 @@ #include "board.h" #include "clock.h" +#include "cpuidle.h" #include "pm.h" #include "pm-irq.h" #include "sleep.h" diff --git a/arch/arm/mach-tegra/sleep.h b/arch/arm/mach-tegra/sleep.h index 31cdb153d112..d95763ea53d4 100644 --- a/arch/arm/mach-tegra/sleep.h +++ b/arch/arm/mach-tegra/sleep.h @@ -52,8 +52,6 @@ extern void tegra_lp1_reset; extern void tegra_iram_start; extern void tegra_iram_end; -void tegra_lp2_in_idle(bool enable); - void tegra_sleep_reset(void); void tegra_sleep_wfi(unsigned long v2p); void tegra_sleep_cpu(unsigned long v2p); -- cgit v1.2.3