From: Deepak Saxena <dsaxena@plexity.net>
To: torvalds@osdl.org
Cc: linux-kernel@vger.kernel.org, jgarzik@pobox.com, tony@atomide.com
Subject: [patch 3/5] Intel IXP4xx driver
Date: Sat, 29 Oct 2005 12:12:32 -0700 [thread overview]
Message-ID: <20051029192434.030073000@omelas> (raw)
In-Reply-To: 20051029191229.562454000@omelas
[-- Attachment #1: rng/rng_ixp4xx_driver.patch --]
[-- Type: text/plain, Size: 2392 bytes --]
RNG driver for Intel IXP4xx NPU.
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Index: linux-2.6-rng/drivers/char/rng/ixp4xx-rng.c
===================================================================
--- /dev/null
+++ linux-2.6-rng/drivers/char/rng/ixp4xx-rng.c
@@ -0,0 +1,66 @@
+/*
+ * drivers/char/rng/ixp4xx-rng.c
+ *
+ * RNG driver for Intel IXP4xx family of NPUs
+ *
+ * Author: Deepak Saxena <dsaxena@plexity.net>
+ *
+ * Copyright 2005 (c) MontaVista Software, Inc.
+ *
+ * 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 <asm/io.h>
+#include <asm/hardware.h>
+
+#include "rng.h"
+
+static u32* __iomem rng_base;
+
+static int ixp4xx_rng_data_present(void)
+{
+ return 1;
+}
+
+static int ixp4xx_rng_data_read(u32 *buffer)
+{
+ *buffer = __raw_readl(rng_base);
+
+ return 4;
+}
+
+struct rng_operations ixp4xx_rng_ops = {
+ .data_present = ixp4xx_rng_data_present,
+ .data_read = ixp4xx_rng_data_read,
+};
+
+static int __init ixp4xx_rng_init(void)
+{
+ rng_base = (u32* __iomem) ioremap(0x70002100, 4);
+ if (!rng_base) return -ENOMEM;
+
+ return register_rng(&ixp4xx_rng_ops);
+}
+
+static void __exit ixp4xx_rng_exit(void)
+{
+ unregister_rng(&ixp4xx_rng_ops);
+ iounmap(rng_base);
+}
+
+subsys_initcall(ixp4xx_rng_init);
+module_exit(ixp4xx_rng_exit);
+
+MODULE_AUTHOR("Deepak Saxena <dsaxena@plexity.net>");
+MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver for IXP4xx");
+MODULE_LICENSE("GPL");
Index: linux-2.6-rng/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
===================================================================
--- linux-2.6-rng.orig/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
+++ linux-2.6-rng/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
@@ -36,6 +36,8 @@
*
* 0x6000000 0x00004000 ioremap'd QMgr
*
+ * 0x7000000 0x00004000 ioremap'd Public-Key Exchange Unit
+ *
* 0xC0000000 0x00001000 0xffbfe000 PCI CFG
*
* 0xC4000000 0x00001000 0xffbfd000 EXP CFG
--
Deepak Saxena - dsaxena@plexity.net - http://www.plexity.net
Even a stopped clock gives the right time twice a day.
next prev parent reply other threads:[~2005-10-29 19:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-29 19:12 [patch 0/5] HW RNG cleanup & new drivers Deepak Saxena
2005-10-29 19:12 ` [patch 1/5] Remove existing hw_random implementation Deepak Saxena
2005-10-29 19:12 ` [patch 2/5] Core HW RNG support Deepak Saxena
2002-01-01 5:46 ` Pavel Machek
2005-10-29 19:12 ` Deepak Saxena [this message]
2005-10-29 19:12 ` [patch 4/5] x86 driver Deepak Saxena
2005-10-29 19:12 ` [patch 5/5] TI OMAP driver Deepak Saxena
2005-10-29 22:09 ` [patch 0/5] HW RNG cleanup & new drivers Jeff Garzik
2005-10-29 22:25 ` Linus Torvalds
2005-10-29 22:33 ` Jeff Garzik
2005-10-30 19:58 ` Deepak Saxena
2005-10-30 0:23 ` Gene Heskett
2005-10-30 14:31 ` Alistair John Strachan
2005-10-30 18:08 ` Kalin KOZHUHAROV
2005-10-30 19:35 ` Folkert van Heusden
2005-10-30 20:02 ` Deepak Saxena
2005-10-30 22:35 ` Linus Torvalds
2005-10-30 23:04 ` H. Peter Anvin
-- strict thread matches above, loose matches on Subject: below --
2005-10-19 8:19 [patch 0/5] RNG cleanup & new drivers attempt #1 dsaxena
2005-10-19 8:19 ` [patch 3/5] Intel IXP4xx driver dsaxena
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=20051029192434.030073000@omelas \
--to=dsaxena@plexity.net \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tony@atomide.com \
--cc=torvalds@osdl.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.