From: Mark Brown <broonie@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linaro-kernel@lists.linaro.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.cz>,
linux-serial@vger.kernel.org,
Victor Kamensky <victor.kamensky@linaro.org>
Subject: Re: [PATCH] exynos: serial clear and set big endian fix
Date: Mon, 21 Jul 2014 17:10:29 +0100 [thread overview]
Message-ID: <20140721161029.GC17528@sirena.org.uk> (raw)
In-Reply-To: <5011135.PCJ33lEv6t@wuerfel>
[-- Attachment #1: Type: text/plain, Size: 579 bytes --]
On Mon, Jul 21, 2014 at 06:01:51PM +0200, Arnd Bergmann wrote:
> The correct way to do it is to use the readl()/writel() functions, or
> readl_relaxed()/writel_relaxed() in case of drivers that don't need
> to synchronize with DMA transfers.
And don't need to build on minority platforms like x86 either!
> I think what you want is something like
> static inline void __hw_set_bit(int nr, unsigned long __iomem *addr)
> {
> addr += BIT_WORD(nr);
> writel_relaxed(readl_relaxed(addr) | BIT_MASK(nr), addr);
> }
> which is also endian-safe.
Indeed, good point.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2014-07-21 16:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-21 15:50 [PATCH] exynos: serial clear and set big endian fix Mark Brown
2014-07-21 16:01 ` Arnd Bergmann
2014-07-21 16:10 ` Mark Brown [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=20140721161029.GC17528@sirena.org.uk \
--to=broonie@kernel.org \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-serial@vger.kernel.org \
--cc=victor.kamensky@linaro.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