aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pm34xx.c
diff options
context:
space:
mode:
authorGovindraj.R <govindraj.raja@ti.com>2011-11-09 07:11:21 -0500
committerKevin Hilman <khilman@ti.com>2011-12-14 19:05:26 -0500
commit2fd149645eb46d26130d7070c6de037dddf34880 (patch)
tree1b7030c0c6f65ebf7ae061ab082ea26f47453679 /arch/arm/mach-omap2/pm34xx.c
parent36fc2d15b120ef85be74c68b5ad74ac04fbefa8a (diff)
ARM: OMAP2+: UART: Remove omap_uart_can_sleep and add pm_qos
Omap_uart_can_sleep function blocks system wide low power state until uart is active remove this func and add qos requests to prevent MPU from transitioning. Keep qos request to default value which will allow MPU to transition and while uart baud rate is available calculate the latency value from the baudrate and use the same to hold constraint while uart clocks are enabled, and if uart is auto-idled the constraint is updated with default constraint value allowing MPU to transition. Qos requests are blocking notifier calls so put these requests to work queue, also the driver uses irq_safe version of runtime API's and callbacks can be called in interrupt disabled context. So to avoid warn on slow path warning while using qos update API's from runtime callbacks use the qos_work_queue. During bootup the runtime_resume call backs might not be called and runtime callback gets called only after uart is idled by setting the autosuspend timeout. So qos_request from runtime resume callback might not activated during boot if uart baudrate is calculated during bootup for console uart, so schedule the qos_work queue once we calc_latency while configuring the uart port. Flush and complete any pending qos jobs in work queue while suspending. Signed-off-by: Govindraj.R <govindraj.raja@ti.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> (for drivers/tty changes) Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/pm34xx.c')
-rw-r--r--arch/arm/mach-omap2/pm34xx.c11
1 files changed, 0 insertions, 11 deletions
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