+ add-ixp4xx-hw-rng-driver.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     Add ixp4xx HW RNG driver

has been added to the -mm tree.  Its filename is

     add-ixp4xx-hw-rng-driver.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this


From: Michael Buesch <mb@xxxxxxxxx>

Signed-off-by: Michael Buesch <mb@xxxxxxxxx>
Cc: Jeff Garzik <jeff@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/char/hw_random/Kconfig      |   13 ++++
 drivers/char/hw_random/Makefile     |    1 
 drivers/char/hw_random/ixp4xx-rng.c |   73 ++++++++++++++++++++++++++
 3 files changed, 87 insertions(+)

diff -puN /dev/null drivers/char/hw_random/ixp4xx-rng.c
--- /dev/null	Thu Apr 11 07:25:15 2002
+++ 25-akpm/drivers/char/hw_random/ixp4xx-rng.c	Mon May 15 15:07:39 2006
@@ -0,0 +1,73 @@
+/*
+ * drivers/char/rng/ixp4xx-rng.c
+ *
+ * RNG driver for Intel IXP4xx family of NPUs
+ *
+ * Author: Deepak Saxena <dsaxena@xxxxxxxxxxx>
+ *
+ * Copyright 2005 (c) MontaVista Software, Inc.
+ *
+ * Fixes by Michael Buesch
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#include <linux/kernel.h>
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/init.h>
+#include <linux/bitops.h>
+#include <linux/hw_random.h>
+
+#include <asm/io.h>
+#include <asm/hardware.h>
+
+
+static int ixp4xx_rng_data_read(struct hwrng *rng, u32 *buffer)
+{
+	void __iomem * rng_base = (void __iomem *)rng->priv;
+
+	*buffer = __raw_readl(rng_base);
+
+	return 4;
+}
+
+static struct hwrng ixp4xx_rng_ops = {
+	.name		= "ixp4xx",
+	.data_read	= ixp4xx_rng_data_read,
+};
+
+static int __init ixp4xx_rng_init(void)
+{
+	void __iomem * rng_base;
+	int err;
+
+	rng_base = ioremap(0x70002100, 4);
+	if (!rng_base)
+		return -ENOMEM;
+	ixp4xx_rng_ops.priv = (unsigned long)rng_base;
+	err = hwrng_register(&ixp4xx_rng_ops);
+	if (err)
+		iounmap(rng_base);
+
+	return err;
+}
+
+static void __exit ixp4xx_rng_exit(void)
+{
+	void __iomem * rng_base = (void __iomem *)ixp4xx_rng_ops.priv;
+
+	hwrng_unregister(&ixp4xx_rng_ops);
+	iounmap(rng_base);
+}
+
+subsys_initcall(ixp4xx_rng_init);
+module_exit(ixp4xx_rng_exit);
+
+MODULE_AUTHOR("Deepak Saxena <dsaxena@xxxxxxxxxxx>");
+MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver for IXP4xx");
+MODULE_LICENSE("GPL");
diff -puN drivers/char/hw_random/Kconfig~add-ixp4xx-hw-rng-driver drivers/char/hw_random/Kconfig
--- 25/drivers/char/hw_random/Kconfig~add-ixp4xx-hw-rng-driver	Mon May 15 15:07:39 2006
+++ 25-akpm/drivers/char/hw_random/Kconfig	Mon May 15 15:07:39 2006
@@ -61,3 +61,16 @@ config HW_RANDOM_VIA
 	  module will be called via-rng.
 
 	  If unsure, say Y.
+
+config HW_RANDOM_IXP4XX
+	tristate "Intel IXP4xx NPU HW Random Number Generator support"
+	depends on HW_RANDOM && ARCH_IXP4XX
+	default y
+	---help---
+	  This driver provides kernel-side support for the Random
+	  Number Generator hardware found on the Intel IXP4xx NPU.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called ixp4xx-rng.
+
+	  If unsure, say Y.
diff -puN drivers/char/hw_random/Makefile~add-ixp4xx-hw-rng-driver drivers/char/hw_random/Makefile
--- 25/drivers/char/hw_random/Makefile~add-ixp4xx-hw-rng-driver	Mon May 15 15:07:39 2006
+++ 25-akpm/drivers/char/hw_random/Makefile	Mon May 15 15:07:39 2006
@@ -7,3 +7,4 @@ obj-$(CONFIG_HW_RANDOM_INTEL) += intel-r
 obj-$(CONFIG_HW_RANDOM_AMD) += amd-rng.o
 obj-$(CONFIG_HW_RANDOM_GEODE) += geode-rng.o
 obj-$(CONFIG_HW_RANDOM_VIA) += via-rng.o
+obj-$(CONFIG_HW_RANDOM_IXP4XX) += ixp4xx-rng.o
_

Patches currently in -mm which might be from mb@xxxxxxxxx are

git-netdev-all.patch
remove-old-hw-rng-support.patch
add-new-generic-hw-rng-core.patch
add-intel-hw-rng-driver.patch
add-amd-hw-rng-driver.patch
add-geode-hw-rng-driver.patch
add-via-hw-rng-driver.patch
add-ixp4xx-hw-rng-driver.patch
add-ti-omap-cpu-family-hw-rng-driver.patch
add-bcm43xx-hw-rng-support.patch
capi-crash--race-condition.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux