diff options
author | Jonas Aaberg <jonas.aberg@stericsson.com> | 2011-09-13 13:32:39 +0200 |
---|---|---|
committer | Jonas ABERG <jonas.aberg@stericsson.com> | 2011-09-29 08:34:43 +0200 |
commit | 0cddfb2b35dbb6f054bfdbc486a4f84dfe8efd1a (patch) | |
tree | 92f5496786ff9c69b70863cab991792d81e0bfee /arch/arm/mach-ux500/pm/suspend_dbg.c | |
parent | 2c1d6edf73274e56e3194dac75c59e82e88688bd (diff) |
ARM: ux500: Remove powersave
Since we don't know really the status of powersave related
feature on this development track, let's remove everything,
except:
- prcmu driver: New location, which is the same as linux-next
- cpufreq: new location, same as linux-next
- regulator: keep as is for the moment, needed for the system to work.
- clocks: same as for regulator.
- pm-runtime: keep it as is.
Later patches will re-add powersave, based upon what exists on SI
u8500-android-2.3_v3.15
MTU from plat-nomadik is now used instead of own copy in mach.
Change-Id: I8ceaa65e5e0905fcd85bf8e793b4a5ab2d2df64c
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32048
Diffstat (limited to 'arch/arm/mach-ux500/pm/suspend_dbg.c')
-rw-r--r-- | arch/arm/mach-ux500/pm/suspend_dbg.c | 187 |
1 files changed, 0 insertions, 187 deletions
diff --git a/arch/arm/mach-ux500/pm/suspend_dbg.c b/arch/arm/mach-ux500/pm/suspend_dbg.c deleted file mode 100644 index d89e280c9dd..00000000000 --- a/arch/arm/mach-ux500/pm/suspend_dbg.c +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright (C) ST-Ericsson SA 2010 - * - * License Terms: GNU General Public License v2 - * - * Author: Rickard Andersson <rickard.andersson@stericsson.com>, - * Jonas Aaberg <jonas.aberg@stericsson.com> for ST-Ericsson - * - */ -#include <linux/kernel.h> -#include <linux/module.h> -#include <linux/irq.h> -#include <linux/interrupt.h> -#include <linux/io.h> -#include <linux/suspend.h> -#include <linux/debugfs.h> -#include <linux/seq_file.h> -#include <linux/uaccess.h> - -#include "pm.h" - -#ifdef CONFIG_UX500_SUSPEND_STANDBY -static u32 sleep_enabled = 1; -#else -static u32 sleep_enabled; -#endif - -#ifdef CONFIG_UX500_SUSPEND_MEM -static u32 deepsleep_enabled = 1; -#else -static u32 deepsleep_enabled; -#endif - -static u32 suspend_enabled = 1; - -static u32 deepsleeps_done; -static u32 deepsleeps_failed; -static u32 sleeps_done; -static u32 sleeps_failed; -static u32 suspend_count; - -#ifdef CONFIG_UX500_SUSPEND_DBG_WAKE_ON_UART -void ux500_suspend_dbg_add_wake_on_uart(void) -{ - irq_set_irq_wake(GPIO_TO_IRQ(CONFIG_UX500_CONSOLE_UART_GPIO_PIN), 1); - irq_set_irq_type(GPIO_TO_IRQ(CONFIG_UX500_CONSOLE_UART_GPIO_PIN), - IRQ_TYPE_EDGE_BOTH); -} - -void ux500_suspend_dbg_remove_wake_on_uart(void) -{ - irq_set_irq_wake(GPIO_TO_IRQ(CONFIG_UX500_CONSOLE_UART_GPIO_PIN), 0); -} -#endif - -bool ux500_suspend_enabled(void) -{ - return suspend_enabled != 0; -} - -bool ux500_suspend_sleep_enabled(void) -{ - return sleep_enabled != 0; -} - -bool ux500_suspend_deepsleep_enabled(void) -{ - return deepsleep_enabled != 0; -} - -void ux500_suspend_dbg_sleep_status(bool is_deepsleep) -{ - enum prcmu_idle_stat prcmu_status; - - prcmu_status = ux500_pm_prcmu_idle_stat(); - - if (is_deepsleep) { - pr_info("Returning from ApDeepSleep. PRCMU ret: 0x%x - %s\n", - prcmu_status, - prcmu_status == DEEP_SLEEP_OK ? "Success" : "Fail!"); - if (prcmu_status == DEEP_SLEEP_OK) - deepsleeps_done++; - else - deepsleeps_failed++; - } else { - pr_info("Returning from ApSleep. PRCMU ret: 0x%x - %s\n", - prcmu_status, - prcmu_status == SLEEP_OK ? "Success" : "Fail!"); - if (prcmu_status == SLEEP_OK) - sleeps_done++; - else - sleeps_failed++; - } -} - -int ux500_suspend_dbg_begin(suspend_state_t state) -{ - suspend_count++; - return 0; -} - -void ux500_suspend_dbg_init(void) -{ - struct dentry *suspend_dir = NULL; - struct dentry *sleep_file = NULL; - struct dentry *deepsleep_file = NULL; - struct dentry *enable_file = NULL; - struct dentry *suspend_count_file = NULL; - struct dentry *sleeps_done_file = NULL; - struct dentry *deepsleeps_done_file = NULL; - struct dentry *sleeps_failed_file = NULL; - struct dentry *deepsleeps_failed_file = NULL; - - suspend_dir = debugfs_create_dir("suspend", NULL); - if (IS_ERR_OR_NULL(suspend_dir)) - return; - - sleep_file = debugfs_create_bool("sleep", S_IWUGO | S_IRUGO, - suspend_dir, - &sleep_enabled); - if (IS_ERR_OR_NULL(sleep_file)) - goto error; - - deepsleep_file = debugfs_create_bool("deepsleep", S_IWUGO | S_IRUGO, - suspend_dir, - &deepsleep_enabled); - if (IS_ERR_OR_NULL(deepsleep_file)) - goto error; - - enable_file = debugfs_create_bool("enable", S_IWUGO | S_IRUGO, - suspend_dir, - &suspend_enabled); - if (IS_ERR_OR_NULL(enable_file)) - goto error; - - suspend_count_file = debugfs_create_u32("count", S_IRUGO, - suspend_dir, - &suspend_count); - if (IS_ERR_OR_NULL(suspend_count_file)) - goto error; - - sleeps_done_file = debugfs_create_u32("sleep_count", S_IRUGO, - suspend_dir, - &sleeps_done); - if (IS_ERR_OR_NULL(sleeps_done_file)) - goto error; - - deepsleeps_done_file = debugfs_create_u32("deepsleep_count", S_IRUGO, - suspend_dir, - &deepsleeps_done); - if (IS_ERR_OR_NULL(deepsleeps_done_file)) - goto error; - - - sleeps_failed_file = debugfs_create_u32("sleep_failed", S_IRUGO, - suspend_dir, - &sleeps_failed); - if (IS_ERR_OR_NULL(sleeps_failed_file)) - goto error; - - deepsleeps_failed_file = debugfs_create_u32("deepsleep_failed", S_IRUGO, - suspend_dir, - &deepsleeps_failed); - if (IS_ERR_OR_NULL(deepsleeps_failed_file)) - goto error; - - return; -error: - if (!IS_ERR_OR_NULL(deepsleeps_failed_file)) - debugfs_remove(deepsleeps_failed_file); - if (!IS_ERR_OR_NULL(sleeps_failed_file)) - debugfs_remove(sleeps_failed_file); - if (!IS_ERR_OR_NULL(deepsleeps_done_file)) - debugfs_remove(deepsleeps_done_file); - if (!IS_ERR_OR_NULL(sleeps_done_file)) - debugfs_remove(sleeps_done_file); - if (!IS_ERR_OR_NULL(suspend_count_file)) - debugfs_remove(suspend_count_file); - if (!IS_ERR_OR_NULL(enable_file)) - debugfs_remove(enable_file); - if (!IS_ERR_OR_NULL(deepsleep_file)) - debugfs_remove(deepsleep_file); - if (!IS_ERR_OR_NULL(sleep_file)) - debugfs_remove(sleep_file); - - debugfs_remove(suspend_dir); -} |