linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] OMAP2: PM: check UART status before trying to idle
@ 2010-10-06 15:52 Kevin Hilman
  2010-10-06 17:48 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Hilman @ 2010-10-06 15:52 UTC (permalink / raw)
  To: linux-arm-kernel

As is done on OMAP3, check omap_uart_can_sleep() as one of the
pre-conditions for entering the idle loop.  Without this check,
entering idle introduces large latencies on active UARTs, and is
especially noticable on serial console.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
Tony, this fixes the UART lag when using the serial console on n8x0.
With this, the UARTs will not idle until their sleep timeouts are
activated, and they're disabled by default.

There's an additional bug I'm still looking into as to why UART3
does not trigger wakeup from idle on 2420, but that is only triggered
after enabling UART timeouts.

 arch/arm/mach-omap2/pm24xx.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index c1bceec..a40457d 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -245,6 +245,8 @@ static int omap2_can_sleep(void)
 {
 	if (omap2_fclks_active())
 		return 0;
+	if (!omap_uart_can_sleep())
+		return 0;
 	if (osc_ck->usecount > 1)
 		return 0;
 	if (omap_dma_running())
-- 
1.7.2.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] OMAP2: PM: check UART status before trying to idle
  2010-10-06 15:52 [PATCH] OMAP2: PM: check UART status before trying to idle Kevin Hilman
@ 2010-10-06 17:48 ` Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2010-10-06 17:48 UTC (permalink / raw)
  To: linux-arm-kernel

* Kevin Hilman <khilman@deeprootsystems.com> [101006 08:43]:
> As is done on OMAP3, check omap_uart_can_sleep() as one of the
> pre-conditions for entering the idle loop.  Without this check,
> entering idle introduces large latencies on active UARTs, and is
> especially noticable on serial console.
> 
> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
> ---
> Tony, this fixes the UART lag when using the serial console on n8x0.
> With this, the UARTs will not idle until their sleep timeouts are
> activated, and they're disabled by default.
> 
> There's an additional bug I'm still looking into as to why UART3
> does not trigger wakeup from idle on 2420, but that is only triggered
> after enabling UART timeouts.
> 
>  arch/arm/mach-omap2/pm24xx.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
> index c1bceec..a40457d 100644
> --- a/arch/arm/mach-omap2/pm24xx.c
> +++ b/arch/arm/mach-omap2/pm24xx.c
> @@ -245,6 +245,8 @@ static int omap2_can_sleep(void)
>  {
>  	if (omap2_fclks_active())
>  		return 0;
> +	if (!omap_uart_can_sleep())
> +		return 0;
>  	if (osc_ck->usecount > 1)
>  		return 0;
>  	if (omap_dma_running())

Thanks, I'll add that to omap-for-linus. Also the following change
is needed for the n8x0 boards that use the kernel cmdline only.

Regards,

Tony

From: Tony Lindgren <tony@atomide.com>
Date: Tue, 5 Oct 2010 10:09:03 -0700
Subject: [PATCH] omap: Update omap2plus_defconfig to use ttyO instead ttyS

With the omap-serial the device has changed from ttyS to ttyO as
the system may have both omap-serial and 8250 ports.

Note that systems using omap-serial need to be updated to use ttyO[012]
instead of ttyS[012] in the bootloader, CONFIG_CMDLINE, /etc/inittab,
and the root file system with mknod. Also you may need to add ttyO[012]
to /etc/securetty.

Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index 7deec89..ccedde1 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -63,7 +63,7 @@ CONFIG_AEABI=y
 CONFIG_LEDS=y
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyS2,115200"
+CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200"
 CONFIG_KEXEC=y
 CONFIG_FPE_NWFPE=y
 CONFIG_VFP=y

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-06 17:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-06 15:52 [PATCH] OMAP2: PM: check UART status before trying to idle Kevin Hilman
2010-10-06 17:48 ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).