From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Scott Wood <scottwood@freescale.com>,
devicetree@vger.kernel.org, R58472@freescale.com,
b07421@freescale.com, Shaveta Leekha <shaveta@freescale.com>,
linus.walleij@linaro.org, bhupesh.sharma@freescale.com,
Liu Gang <Gang.Liu@freescale.com>,
robh+dt@kernel.org, linux-gpio@vger.kernel.org,
shawnguo@kernel.org
Subject: Re: [PATCH 2/2] drivers/gpio: Port gpio driver to layerscape platform
Date: Wed, 04 Nov 2015 11:09:58 +0100 [thread overview]
Message-ID: <20116723.9FINQ9c1Gk@wuerfel> (raw)
In-Reply-To: <1446628658.12676.14.camel@freescale.com>
On Wednesday 04 November 2015 03:17:38 Scott Wood wrote:
> > I guess this is fixed per architecture, so you could also do this as
> >
> > static inline void gpio_out32(u32 val, void __iomem *addr)
> > {
> > if (IS_ENABLED(CONFIG_ARM))
> > iowrite32(val, addr);
> > else if (IS_ENABLED(CONFIG_PPC))
> > iowrite32be(val, addr);
> > else
> > BUG();
> > }
>
> Unfortunately that guess is wrong. Some of our ARM chips have big-endian I/O
> and some have little-endian I/O.
Ok, I see. In that case, using run-time detection everywhere is
probably best.
Arnd
next prev parent reply other threads:[~2015-11-04 10:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 6:48 [PATCH 1/2] ls2080a/dts: Add little endian property for GPIO IP block Liu Gang
2015-11-04 6:48 ` [PATCH 2/2] drivers/gpio: Port gpio driver to layerscape platform Liu Gang
2015-11-04 8:53 ` Arnd Bergmann
2015-11-04 9:17 ` Scott Wood
2015-11-04 10:09 ` Arnd Bergmann [this message]
2015-11-05 13:27 ` [PATCH 1/2] ls2080a/dts: Add little endian property for GPIO IP block Rob Herring
2015-11-24 6:57 ` Shawn Guo
[not found] <1446549552-40675-1-git-send-email-Gang.Liu@freescale.com>
[not found] ` <1446549552-40675-2-git-send-email-Gang.Liu@freescale.com>
2015-11-16 15:09 ` [PATCH 2/2] drivers/gpio: Port gpio driver to layerscape platform Linus Walleij
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=20116723.9FINQ9c1Gk@wuerfel \
--to=arnd@arndb.de \
--cc=Gang.Liu@freescale.com \
--cc=R58472@freescale.com \
--cc=b07421@freescale.com \
--cc=bhupesh.sharma@freescale.com \
--cc=devicetree@vger.kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=scottwood@freescale.com \
--cc=shaveta@freescale.com \
--cc=shawnguo@kernel.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).