aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/cpuidle34xx.c6
-rw-r--r--arch/arm/mach-omap2/pm24xx.c2
-rw-r--r--arch/arm/mach-omap2/pm34xx.c11
-rw-r--r--arch/arm/mach-omap2/serial.c22
-rw-r--r--arch/arm/plat-omap/include/plat/omap-serial.h6
5 files changed, 6 insertions, 41 deletions
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index e20332f4abdc..3a9d2b883b34 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -30,7 +30,6 @@
30#include <plat/irqs.h> 30#include <plat/irqs.h>
31#include "powerdomain.h" 31#include "powerdomain.h"
32#include "clockdomain.h" 32#include "clockdomain.h"
33#include <plat/serial.h>
34 33
35#include "pm.h" 34#include "pm.h"
36#include "control.h" 35#include "control.h"
@@ -245,11 +244,6 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev,
245 struct omap3_idle_statedata *cx; 244 struct omap3_idle_statedata *cx;
246 int ret; 245 int ret;
247 246
248 if (!omap3_can_sleep()) {
249 new_state_idx = drv->safe_state_index;
250 goto select_state;
251 }
252
253 /* 247 /*
254 * Prevent idle completely if CAM is active. 248 * Prevent idle completely if CAM is active.
255 * CAM does not have wakeup capability in OMAP3. 249 * CAM does not have wakeup capability in OMAP3.
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index 22af2f2fdbf9..b8822f8b2891 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -222,8 +222,6 @@ static int omap2_can_sleep(void)
222{ 222{
223 if (omap2_fclks_active()) 223 if (omap2_fclks_active())
224 return 0; 224 return 0;
225 if (!omap_uart_can_sleep())
226 return 0;
227 if (osc_ck->usecount > 1) 225 if (osc_ck->usecount > 1)
228 return 0; 226 return 0;
229 if (omap_dma_running()) 227 if (omap_dma_running())
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 4feee45ef069..4ee5f4eb04e4 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -35,7 +35,6 @@
35#include <plat/sram.h> 35#include <plat/sram.h>
36#include "clockdomain.h" 36#include "clockdomain.h"
37#include "powerdomain.h" 37#include "powerdomain.h"
38#include <plat/serial.h>
39#include <plat/sdrc.h> 38#include <plat/sdrc.h>
40#include <plat/prcm.h> 39#include <plat/prcm.h>
41#include <plat/gpmc.h> 40#include <plat/gpmc.h>
@@ -456,21 +455,11 @@ void omap_sram_idle(void)
456 clkdm_allow_idle(mpu_pwrdm->pwrdm_clkdms[0]); 455 clkdm_allow_idle(mpu_pwrdm->pwrdm_clkdms[0]);
457} 456}
458 457
459int omap3_can_sleep(void)
460{
461 if (!omap_uart_can_sleep())
462 return 0;
463 return 1;
464}
465
466static void omap3_pm_idle(void) 458static void omap3_pm_idle(void)
467{ 459{
468 local_irq_disable(); 460 local_irq_disable();
469 local_fiq_disable(); 461 local_fiq_disable();
470 462
471 if (!omap3_can_sleep())
472 goto out;
473
474 if (omap_irq_pending() || need_resched()) 463 if (omap_irq_pending() || need_resched())
475 goto out; 464 goto out;
476 465
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index c909770eacd1..247d89478f24 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -82,28 +82,6 @@ static struct omap_uart_port_info omap_serial_default_info[] __initdata = {
82}; 82};
83 83
84#ifdef CONFIG_PM 84#ifdef CONFIG_PM
85
86int omap_uart_can_sleep(void)
87{
88 struct omap_uart_state *uart;
89 int can_sleep = 1;
90
91 list_for_each_entry(uart, &uart_list, node) {
92 if (!uart->clocked)
93 continue;
94
95 if (!uart->can_sleep) {
96 can_sleep = 0;
97 continue;
98 }
99
100 /* This UART can now safely sleep. */
101 omap_uart_allow_sleep(uart);
102 }
103
104 return can_sleep;
105}
106
107static void omap_uart_enable_wakeup(struct platform_device *pdev, bool enable) 85static void omap_uart_enable_wakeup(struct platform_device *pdev, bool enable)
108{ 86{
109 struct omap_device *od = to_omap_device(pdev); 87 struct omap_device *od = to_omap_device(pdev);
diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
index ea63b2bc761c..9ff444469f3d 100644
--- a/arch/arm/plat-omap/include/plat/omap-serial.h
+++ b/arch/arm/plat-omap/include/plat/omap-serial.h
@@ -19,6 +19,7 @@
19 19
20#include <linux/serial_core.h> 20#include <linux/serial_core.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/pm_qos.h>
22 23
23#include <plat/mux.h> 24#include <plat/mux.h>
24 25
@@ -130,6 +131,11 @@ struct uart_omap_port {
130 u32 context_loss_cnt; 131 u32 context_loss_cnt;
131 u32 errata; 132 u32 errata;
132 u8 wakeups_enabled; 133 u8 wakeups_enabled;
134
135 struct pm_qos_request pm_qos_request;
136 u32 latency;
137 u32 calc_latency;
138 struct work_struct qos_work;
133}; 139};
134 140
135#endif /* __OMAP_SERIAL_H__ */ 141#endif /* __OMAP_SERIAL_H__ */