linux-mips
[Top] [All Lists]

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

To: Florian Fainelli <f.fainelli@gmail.com>, linux-mips@linux-mips.org
Subject: Re: [PATCH 2/4] hw_random: bcm63xx-rng: move register definitions to driver
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Tue, 17 Feb 2015 14:35:20 +0300
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
In-reply-to: <1424138956-11563-3-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> <1424138956-11563-3-git-send-email-f.fainelli@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
Hello.

On 2/17/2015 5:09 AM, Florian Fainelli wrote:

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)

   Parens not needed here.

WBR, Sergei


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