ARM: 6294/1: etm: do a dummy read from OSSRR during initialization

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>
This commit is contained in:
Alexander Shishkin 2010-08-04 11:27:33 +01:00 committed by Russell King
parent 9e354ea8e0
commit 988257cfcb
1 changed files with 3 additions and 1 deletions

View 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);