public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: linux-arm-kernel@lists.infradead.org
Cc: Tobias Klauser <tklauser@distanz.ch>, linux-omap@vger.kernel.org
Subject: [PATCH 2.5/8] omap: Fix omapfb/lcdc on OMAP1510 broken when PM set
Date: Wed, 11 Nov 2009 11:06:33 -0800	[thread overview]
Message-ID: <20091111190633.GF24837@atomide.com> (raw)
In-Reply-To: <20091111030045.31793.89110.stgit@localhost>

Here

One more fix that I forgot about.

Tony

>From 8561a84f85eccddf46212622f1f18317a220891b Mon Sep 17 00:00:00 2001
From: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Date: Wed, 11 Nov 2009 11:00:03 -0800
Subject: [PATCH] omap: Fix omapfb/lcdc on OMAP1510 broken when PM set

With CONFIG_PM=y, the omapfb/lcdc device on Amstrad Delta, after initially
starting correctly, breaks with the following error messages:

omapfb omapfb: resetting (status 0xffffff96,reset count 1)
...
omapfb omapfb: resetting (status 0xffffff96,reset count 100)
omapfb omapfb: too many reset attempts, giving up.

Looking closer at this I have found that it had been broken almost 2 years ago
with commit 2418996e3b100114edb2ae110d5d4acb928909d2, PM fixes for OMAP1.

The definite reason for broken omapfb/lcdc behavoiur in PM mode
appeared to be ARM_IDLECT1:IDLIF_ARM (bit 6) put into idle regardless of LCD
DMA possibly running. The bit were set based on return value of the
omap_dma_running() function that did not check for dedicated LCD DMA
channel status. The patch below fixes this.

Note that the hardcoded register value will be fixed during the next merge
cycle to use OMAP_LCDC_ defines. Currently the OMAP_LCDC_ defines are local
to drivers/video/omap/lcdc.c, so let's not start moving those right now.

Created against linux-2.6.32-rc6

Tested on Amstrad Delta

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 02ed945..68eaae3 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -1114,6 +1114,14 @@ int omap_dma_running(void)
 {
 	int lch;
 
+	/*
+	 * On OMAP1510, internal LCD controller will start the transfer
+	 * when it gets enabled, so assume DMA running if LCD enabled.
+	 */
+	if (cpu_is_omap1510())
+		if (omap_readw(0xfffec000 + 0x00) & (1 << 0))
+			return 1;
+
 	/* Check if LCD DMA is running */
 	if (cpu_is_omap16xx())
 		if (omap_readw(OMAP1610_DMA_LCD_CCR) & OMAP_DMA_CCR_EN)

  reply	other threads:[~2009-11-11 19:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-11  3:00 [PATCH 0/8] Omap fixes for v2.6.32-rc6 Tony Lindgren
2009-11-11  3:00 ` [PATCH 1/8] omap: Fix race condition in omap dma driver Tony Lindgren
2009-11-11  3:00 ` [PATCH 2/8] omap: Use resource_size Tony Lindgren
2009-11-11 19:06   ` Tony Lindgren [this message]
2009-11-11  3:00 ` [PATCH 3/8] omap1: Amstrad Delta defconfig fixes Tony Lindgren
2009-11-11 17:24   ` Janusz Krzysztofik
2009-11-11 18:56     ` Tony Lindgren
2009-11-11  3:01 ` [PATCH 4/8] omap3: pandora: Fix keypad keymap Tony Lindgren
2009-11-11  3:01 ` [PATCH 5/8] omap3: beagle: Fix USB host port power control Tony Lindgren
2009-11-11  3:01 ` [PATCH 6/8] omap3: 3430sdp: Enable Linux Regulator framework Tony Lindgren
2009-11-11  3:01 ` [PATCH 7/8] omap: update Pandora defconfig Tony Lindgren
2009-11-11  3:01 ` [PATCH 8/8] omap3: Decrease cpufreq transition latency Tony Lindgren
2009-11-11  3:16 ` [PATCH 0/8] Omap fixes for v2.6.32-rc6 Sid Boyce
2009-11-11 19:08   ` Tony Lindgren
2009-11-11 23:20     ` Sid Boyce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091111190633.GF24837@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tklauser@distanz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox