ARM: 6294/1: etm: do a dummy read from OSSRR during initialization
authorAlexander Shishkin <virtuoso@slind.org>
Wed, 4 Aug 2010 10:27:33 +0000 (11:27 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 10 Aug 2010 21:10:53 +0000 (22:10 +0100)
The first read from ETM OS save and restore register after the power
down bit deassertion returns garbage.

Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/etm.c

index 9e9db63..56418f9 100644 (file)
@@ -543,7 +543,9 @@ static int __init etm_probe(struct amba_device *dev, struct amba_id *id)
        t->etm_portsz = 1;
 
        etm_unlock(t);
-       ret = etm_readl(t, ETMMR_PDSR);
+       (void)etm_readl(t, ETMMR_PDSR);
+       /* dummy first read */
+       (void)etm_readl(&tracer, ETMMR_OSSRR);
 
        t->ncmppairs = etm_readl(t, ETMR_CONFCODE) & 0xf;
        etm_writel(t, 0x440, ETMR_CTRL);