From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 07/15] ARM: mxs: Add gpio support
Date: Mon, 13 Dec 2010 08:57:38 +0100 [thread overview]
Message-ID: <20101213075738.GA26210@pengutronix.de> (raw)
In-Reply-To: <20101213072743.GA23558@ubuntu.localdomain>
Hi Shawn,
On Mon, Dec 13, 2010 at 03:28:14PM +0800, Shawn Guo wrote:
> On Fri, Dec 10, 2010 at 03:24:16AM -0700, Uwe Kleine-K?nig wrote:
> > On Fri, Dec 10, 2010 at 04:06:40PM +0800, Shawn Guo wrote:
> > > + __raw_writel(~0, port[i].base +
> > > + PINCTRL_IRQSTAT(i) + MXS_CLR_ADDR);
> > Why not __raw_writel(0, port[i].base + PINCTRL_IRQSTAT(i)) ?
> > (And note that applying ~ on a signed integer isn't portable in
> > general. For all sane archs this is the same as ~0U though and ARM is
> > sane (here), still I think it's good to be aware of such things and
> > avoid them if easily possible.)
> >
> The i.MX28 RM section 9.4.78 tells "Software may clear any bit in this
> register by writing a 1 to the bit at the SCT clear address".
I didn't say that __raw_writel(~0, ... + MXS_CLR_ADDR) didn't work.
It's just that I consider writing a 0 directly into the PINCTRL_IRQSTAT
register a bit more clear.
> What about writing 0xffffffff into clear address?
If you insist on doing that, at least write ~0U which is more portable.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2010-12-13 7:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-10 8:06 [PATCH v5 00/15] ARM: mxs: Add initial support for MX23 and MX28 Shawn Guo
2010-12-10 8:06 ` [PATCH v5 07/15] ARM: mxs: Add gpio support Shawn Guo
2010-12-10 10:24 ` Uwe Kleine-König
2010-12-10 15:42 ` Shawn Guo
2010-12-13 7:28 ` Shawn Guo
2010-12-13 7:54 ` Lothar Waßmann
2010-12-13 7:57 ` Uwe Kleine-König [this message]
2010-12-13 8:10 ` Shawn Guo
2010-12-13 8:19 ` Shawn Guo
2010-12-13 8:24 ` Uwe Kleine-König
2010-12-10 8:06 ` [PATCH v5 08/15] ARM: mxs: Add iomux support Shawn Guo
2010-12-10 8:06 ` [PATCH v5 09/15] ARM: mxs: Add clock support Shawn Guo
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=20101213075738.GA26210@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--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).