diff options
author | Will Deacon <will.deacon@arm.com> | 2012-11-15 16:28:43 -0500 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2012-11-15 16:39:34 -0500 |
commit | f600b9fcd2bcb8ee0adb235f54ccdd93c729c442 (patch) | |
tree | ece27e6ac0d2b7b27bf8f365990e5af39bd8eef1 | |
parent | f435ab79928e4d54082e2838c4562a165e37999c (diff) |
ARM: cti: fix manipulation of debug lock registers
The LOCKSTATUS register for memory-mapped coresight devices indicates
whether or not the device in question implements hardware locking. If
not, locking is not present (i.e. LSR.SLI == 0) and LAR is write-ignore,
so software doesn't actually need to check the status register at all.
This patch removes the broken LSR checks.
Cc: Ming Lei <ming.lei@canonical.com>
Reported-by: Mike Williams <michael.williams@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r-- | arch/arm/include/asm/cti.h | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/arch/arm/include/asm/cti.h b/arch/arm/include/asm/cti.h index a0ada3ea4358..f2e5cad3f306 100644 --- a/arch/arm/include/asm/cti.h +++ b/arch/arm/include/asm/cti.h | |||
@@ -146,15 +146,7 @@ static inline void cti_irq_ack(struct cti *cti) | |||
146 | */ | 146 | */ |
147 | static inline void cti_unlock(struct cti *cti) | 147 | static inline void cti_unlock(struct cti *cti) |
148 | { | 148 | { |
149 | void __iomem *base = cti->base; | 149 | __raw_writel(LOCKCODE, cti->base + LOCKACCESS); |
150 | unsigned long val; | ||
151 | |||
152 | val = __raw_readl(base + LOCKSTATUS); | ||
153 | |||
154 | if (val & 1) { | ||
155 | val = LOCKCODE; | ||
156 | __raw_writel(val, base + LOCKACCESS); | ||
157 | } | ||
158 | } | 150 | } |
159 | 151 | ||
160 | /** | 152 | /** |
@@ -166,14 +158,6 @@ static inline void cti_unlock(struct cti *cti) | |||
166 | */ | 158 | */ |
167 | static inline void cti_lock(struct cti *cti) | 159 | static inline void cti_lock(struct cti *cti) |
168 | { | 160 | { |
169 | void __iomem *base = cti->base; | 161 | __raw_writel(~LOCKCODE, cti->base + LOCKACCESS); |
170 | unsigned long val; | ||
171 | |||
172 | val = __raw_readl(base + LOCKSTATUS); | ||
173 | |||
174 | if (!(val & 1)) { | ||
175 | val = ~LOCKCODE; | ||
176 | __raw_writel(val, base + LOCKACCESS); | ||
177 | } | ||
178 | } | 162 | } |
179 | #endif | 163 | #endif |