linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] DaVinci: only poll EPCPR on DM644x and DM355
@ 2011-09-15 14:29 Sergei Shtylyov
  2011-09-15 19:27 ` Karicheri, Muralidharan
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Sergei Shtylyov @ 2011-09-15 14:29 UTC (permalink / raw)
  To: linux-arm-kernel

EPCPR register and PDCTL.EPCGOOD bit exist only on DaVinci DM644x and DM35x,
so do not try to poll EPCPR and set PDCTL.EPCGOOD on the other SoCs -- it would
lead to lock up if some power domain hasn't been powered up by this time (which
hasn't happened yet on any board, it seems).

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

---
The patch is against the recent DaVinci tree plus this patch:

http://linux.davincidsp.com/pipermail/davinci-linux-open-source/2011-September/023308.html

Index: linux-davinci/arch/arm/mach-davinci/psc.c
===================================================================
--- linux-davinci.orig/arch/arm/mach-davinci/psc.c
+++ linux-davinci/arch/arm/mach-davinci/psc.c
@@ -88,14 +88,19 @@ void davinci_psc_config(unsigned int dom
 		ptcmd = 1 << domain;
 		__raw_writel(ptcmd, psc_base + PTCMD);
 
-		do {
-			epcpr = __raw_readl(psc_base + EPCPR);
-		} while ((((epcpr >> domain) & 1) == 0));
-
-		pdctl = __raw_readl(psc_base + PDCTL + 4 * domain);
-		pdctl |= 0x100;
-		__raw_writel(pdctl, psc_base + PDCTL + 4 * domain);
-
+		/*
+		 * EPCPR register and PDCTL.EPCGOOD bit exist only on DaVinci
+		 * DM644x and DM35x...
+		 */
+		if (cpu_is_davinci_dm644x() || cpu_is_davinci_dm355()) {
+			do {
+				epcpr = __raw_readl(psc_base + EPCPR);
+			} while (((epcpr >> domain) & 1) == 0);
+
+			pdctl = __raw_readl(psc_base + PDCTL + 4 * domain);
+			pdctl |= 0x100;
+			__raw_writel(pdctl, psc_base + PDCTL + 4 * domain);
+		}
 	} else {
 		ptcmd = 1 << domain;
 		__raw_writel(ptcmd, psc_base + PTCMD);

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

end of thread, other threads:[~2012-01-20 18:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-15 14:29 [PATCH] DaVinci: only poll EPCPR on DM644x and DM355 Sergei Shtylyov
2011-09-15 19:27 ` Karicheri, Muralidharan
2011-10-23 11:10 ` Nori, Sekhar
2011-10-23 12:43   ` Sergei Shtylyov
2011-10-23 16:18     ` Nori, Sekhar
2011-10-28 20:44       ` Sergei Shtylyov
2012-01-06 18:40 ` [PATCH] DaVinci: can only power up domains on DM644x Sergei Shtylyov
2012-01-06 18:48   ` [PATCH v2] " Sergei Shtylyov
2012-01-12 12:00     ` Karicheri, Muralidharan
2012-01-17 19:56       ` Nori, Sekhar
2012-01-20 18:45       ` Sergei Shtylyov

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).