From: Florian Fainelli <f.fainelli@gmail.com>
To: linux-mips@linux-mips.org
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
mpm@selenic.com, herbert@gondor.apana.org.au, wsa@the-dreams.de,
cernekee@gmail.com, Florian Fainelli <f.fainelli@gmail.com>
Subject: [PATCH 1/4] hw_random: bcm63xx-rng: drop bcm_{readl,writel} macros
Date: Mon, 16 Feb 2015 18:09:13 -0800 [thread overview]
Message-ID: <1424138956-11563-2-git-send-email-f.fainelli@gmail.com> (raw)
In-Reply-To: <1424138956-11563-1-git-send-email-f.fainelli@gmail.com>
bcm_{readl,writel} macros expand to __raw_{readl,writel}, use these
directly such that we do not rely on the platform to provide these for
us. As a result, we no longer use bcm63xx_io.h, so remove that inclusion
too.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/char/hw_random/bcm63xx-rng.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/char/hw_random/bcm63xx-rng.c b/drivers/char/hw_random/bcm63xx-rng.c
index ba6a65ac023b..ed9b28b35a39 100644
--- a/drivers/char/hw_random/bcm63xx-rng.c
+++ b/drivers/char/hw_random/bcm63xx-rng.c
@@ -13,7 +13,6 @@
#include <linux/platform_device.h>
#include <linux/hw_random.h>
-#include <bcm63xx_io.h>
#include <bcm63xx_regs.h>
struct bcm63xx_rng_priv {
@@ -28,9 +27,9 @@ static int bcm63xx_rng_init(struct hwrng *rng)
struct bcm63xx_rng_priv *priv = to_rng_priv(rng);
u32 val;
- val = bcm_readl(priv->regs + RNG_CTRL);
+ val = __raw_readl(priv->regs + RNG_CTRL);
val |= RNG_EN;
- bcm_writel(val, priv->regs + RNG_CTRL);
+ __raw_writel(val, priv->regs + RNG_CTRL);
return 0;
}
@@ -40,23 +39,23 @@ static void bcm63xx_rng_cleanup(struct hwrng *rng)
struct bcm63xx_rng_priv *priv = to_rng_priv(rng);
u32 val;
- val = bcm_readl(priv->regs + RNG_CTRL);
+ val = __raw_readl(priv->regs + RNG_CTRL);
val &= ~RNG_EN;
- bcm_writel(val, priv->regs + RNG_CTRL);
+ __raw_writel(val, priv->regs + RNG_CTRL);
}
static int bcm63xx_rng_data_present(struct hwrng *rng, int wait)
{
struct bcm63xx_rng_priv *priv = to_rng_priv(rng);
- return bcm_readl(priv->regs + RNG_STAT) & RNG_AVAIL_MASK;
+ return __raw_readl(priv->regs + RNG_STAT) & RNG_AVAIL_MASK;
}
static int bcm63xx_rng_data_read(struct hwrng *rng, u32 *data)
{
struct bcm63xx_rng_priv *priv = to_rng_priv(rng);
- *data = bcm_readl(priv->regs + RNG_DATA);
+ *data = __raw_readl(priv->regs + RNG_DATA);
return 4;
}
--
2.1.0
next prev parent reply other threads:[~2015-02-17 2:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-17 2:09 [PATCH 0/4] hw_random: bcm63xx-rng: misc cleanups and reorg Florian Fainelli
2015-02-17 2:09 ` Florian Fainelli [this message]
2015-02-17 2:09 ` [PATCH 2/4] hw_random: bcm63xx-rng: move register definitions to driver Florian Fainelli
2015-02-17 11:35 ` Sergei Shtylyov
2015-02-17 2:09 ` [PATCH 3/4] MIPS: BCM63xx: remove RSET_RNG register definitions Florian Fainelli
2015-02-17 2:09 ` [PATCH 4/4] hw_random: bcm63xx-rng: use devm_* helpers Florian Fainelli
2015-03-01 10:03 ` [PATCH 0/4] hw_random: bcm63xx-rng: misc cleanups and reorg Herbert Xu
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=1424138956-11563-2-git-send-email-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=cernekee@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=mpm@selenic.com \
--cc=wsa@the-dreams.de \
/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
Powered by JetHome