linux-mips
[Top] [All Lists]

[PATCH 1/4] hw_random: bcm63xx-rng: drop bcm_{readl,writel} macros

To: linux-mips@linux-mips.org
Subject: [PATCH 1/4] hw_random: bcm63xx-rng: drop bcm_{readl,writel} macros
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Mon, 16 Feb 2015 18:09:13 -0800
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>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rciiJHq8mzvgtVrs8t1A6i7OfFpsBZwZCeqkLQdLACA=; b=iTlyK08L2386IhDVIR9e5MH7NsytigBbkkXoizqa7VtntsdkORqxI/cjFl6LSP5ic7 Qk24wLw5VaxJZFtDBUyK1H0xZXHsjWJmJYaAMWqaJbkSiijOSCjQgvlhJHSsGDegNtSC LSLLp8U1dFWISeNLNSbj+x4zN6rEHmUYgqHgbjIOrds6kFkOQ0zsuLaBvRPfNINA+cMV UC622DxoubWWkeFAwMEGgR3bBIDRVvoypcBXctl14cuCsfKE0b6sL6D/TIanF4iqjeoQ jt8H4yptNwLghHhull+dEpWRjjX1gstqKrwNfe948AfnDrAisrDvY62nagJ3+BXyM9f7 hTGQ==
In-reply-to: <1424138956-11563-1-git-send-email-f.fainelli@gmail.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1424138956-11563-1-git-send-email-f.fainelli@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
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


<Prev in Thread] Current Thread [Next in Thread>