From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: cti: fix manipulation of debug lock registers
Date: Tue, 20 Nov 2012 13:55:10 +0000 [thread overview]
Message-ID: <20121120135510.GA26475@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <50AA78AE.5050609@ti.com>
On Mon, Nov 19, 2012 at 06:21:34PM +0000, Jon Hunter wrote:
> On 11/15/2012 03:40 PM, Will Deacon wrote:
> > diff --git a/arch/arm/include/asm/cti.h b/arch/arm/include/asm/cti.h
> > index a0ada3e..f2e5cad 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)
> > */
> > static inline void cti_unlock(struct cti *cti)
> > {
> > - void __iomem *base = cti->base;
> > - unsigned long val;
> > -
> > - val = __raw_readl(base + LOCKSTATUS);
> > -
> > - if (val & 1) {
> > - val = LOCKCODE;
> > - __raw_writel(val, base + LOCKACCESS);
> > - }
> > + __raw_writel(LOCKCODE, cti->base + LOCKACCESS);
> > }
> >
> > /**
> > @@ -166,14 +158,6 @@ static inline void cti_unlock(struct cti *cti)
> > */
> > static inline void cti_lock(struct cti *cti)
> > {
> > - void __iomem *base = cti->base;
> > - unsigned long val;
> > -
> > - val = __raw_readl(base + LOCKSTATUS);
> > -
> > - if (!(val & 1)) {
> > - val = ~LOCKCODE;
> > - __raw_writel(val, base + LOCKACCESS);
> > - }
> > + __raw_writel(~LOCKCODE, cti->base + LOCKACCESS);
> > }
> > #endif
>
> I gave this a whirl on omap4430 and PMU is working fine with this, so ...
>
> Tested-by: Jon Hunter <jon-hunter@ti.com>
Cheers Jon,
Will
prev parent reply other threads:[~2012-11-20 13:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-15 21:40 [PATCH] ARM: cti: fix manipulation of debug lock registers Will Deacon
2012-11-19 18:21 ` Jon Hunter
2012-11-20 13:55 ` Will Deacon [this message]
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=20121120135510.GA26475@mudshark.cambridge.arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).