linux-mips
[Top] [All Lists]

[PATCH 2/4] hw_random: bcm63xx-rng: move register definitions to driver

To: linux-mips@linux-mips.org
Subject: [PATCH 2/4] hw_random: bcm63xx-rng: move register definitions to driver
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Mon, 16 Feb 2015 18:09:14 -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=3B3u0v+smChWPGM9qthaXd3y4+xutFuwc84mxCfqCJk=; b=EMoPNkuivXrgLJcYeSPMoJdFliZY1OtD51m9j4Ko8CPfmzxviyd6xwclIUmER4NPLC DwTD/J8XBoGAlWWV3WiA9fKMs4UQZ8YmF9SUUWDPWDK570yxu/P53nwnTKITxuvSbfUz J3kmS+Q4q/ol2utqOQFyPSTZOXOAX4inDiXF5Ul9I9c4LcVjQM/HLRvTd85l+pF5gArb Ui6yikrTHAsmyQMwTyIhCTwzD2NZC6N68CSsGfDyFWjGFG3N/9kAHehAcpmj8Jn0mtJ6 skJw0xiNhWoboOQuQZl47BC4RhxNbmklQZ5hDtXOe8qtli+1PFH9F4AcWykX+Q1vpyC4 ewiQ==
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
arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h contains the register
definitions for this random number generator block, incorporate these
register definitions directly into the bcm63xx-rng driver so we do not
rely on this header to be provided.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/char/hw_random/bcm63xx-rng.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/char/hw_random/bcm63xx-rng.c 
b/drivers/char/hw_random/bcm63xx-rng.c
index ed9b28b35a39..c7f3af852599 100644
--- a/drivers/char/hw_random/bcm63xx-rng.c
+++ b/drivers/char/hw_random/bcm63xx-rng.c
@@ -13,7 +13,15 @@
 #include <linux/platform_device.h>
 #include <linux/hw_random.h>
 
-#include <bcm63xx_regs.h>
+#define RNG_CTRL                       0x00
+#define RNG_EN                         (1 << 0)
+
+#define RNG_STAT                       0x04
+#define RNG_AVAIL_MASK                 (0xff000000)
+
+#define RNG_DATA                       0x08
+#define RNG_THRES                      0x0c
+#define RNG_MASK                       0x10
 
 struct bcm63xx_rng_priv {
        struct clk *clk;
-- 
2.1.0


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