aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAlan Carvalho de Assis <acassis@gmail.com>2009-04-02 11:38:41 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2009-05-07 10:17:16 -0400
commit45001e92d0249a8c4b9f6c3695215652e8e8493d (patch)
tree5461b1aec6f78fd0524476d2421487329888d6e9 /arch
parent220bbcea278b4fef7ef0a45ce754222f8ed9d134 (diff)
i.MX31: Add hw-random for RNGA
This hw-random driver add support to RNGA hardware found on some i.MX processors. Signed-off-by: Alan Carvalho de Assis <acassis@gmail.com> Acked-by: Matt Mackall <mpm@selenic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-mx3/Kconfig1
-rw-r--r--arch/arm/mach-mx3/devices.c17
-rw-r--r--arch/arm/plat-mxc/Kconfig4
3 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
index 0e7de945ee60..32e45155089a 100644
--- a/arch/arm/mach-mx3/Kconfig
+++ b/arch/arm/mach-mx3/Kconfig
@@ -1,6 +1,7 @@
1if ARCH_MX3 1if ARCH_MX3
2 2
3config ARCH_MX31 3config ARCH_MX31
4 select ARCH_HAS_RNGA
4 bool 5 bool
5 6
6config ARCH_MX35 7config ARCH_MX35
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c
index 380be0c9b213..227a538bb941 100644
--- a/arch/arm/mach-mx3/devices.c
+++ b/arch/arm/mach-mx3/devices.c
@@ -23,6 +23,7 @@
23#include <linux/gpio.h> 23#include <linux/gpio.h>
24#include <mach/hardware.h> 24#include <mach/hardware.h>
25#include <mach/irqs.h> 25#include <mach/irqs.h>
26#include <mach/common.h>
26#include <mach/imx-uart.h> 27#include <mach/imx-uart.h>
27 28
28#include "devices.h" 29#include "devices.h"
@@ -283,6 +284,21 @@ struct platform_device mxcsdhc_device1 = {
283 .num_resources = ARRAY_SIZE(mxcsdhc1_resources), 284 .num_resources = ARRAY_SIZE(mxcsdhc1_resources),
284 .resource = mxcsdhc1_resources, 285 .resource = mxcsdhc1_resources,
285}; 286};
287
288static struct resource rnga_resources[] = {
289 {
290 .start = RNGA_BASE_ADDR,
291 .end = RNGA_BASE_ADDR + 0x28,
292 .flags = IORESOURCE_MEM,
293 },
294};
295
296struct platform_device mxc_rnga_device = {
297 .name = "mxc_rnga",
298 .id = -1,
299 .num_resources = 1,
300 .resource = rnga_resources,
301};
286#endif /* CONFIG_ARCH_MX31 */ 302#endif /* CONFIG_ARCH_MX31 */
287 303
288/* i.MX31 Image Processing Unit */ 304/* i.MX31 Image Processing Unit */
@@ -359,6 +375,7 @@ static int mx3_devices_init(void)
359 if (cpu_is_mx31()) { 375 if (cpu_is_mx31()) {
360 mxc_nand_resources[0].start = MX31_NFC_BASE_ADDR; 376 mxc_nand_resources[0].start = MX31_NFC_BASE_ADDR;
361 mxc_nand_resources[0].end = MX31_NFC_BASE_ADDR + 0xfff; 377 mxc_nand_resources[0].end = MX31_NFC_BASE_ADDR + 0xfff;
378 mxc_register_device(&mxc_rnga_device, NULL);
362 } 379 }
363 if (cpu_is_mx35()) { 380 if (cpu_is_mx35()) {
364 mxc_nand_resources[0].start = MX35_NFC_BASE_ADDR; 381 mxc_nand_resources[0].start = MX35_NFC_BASE_ADDR;
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig
index beeb01aa029c..8986b7412235 100644
--- a/arch/arm/plat-mxc/Kconfig
+++ b/arch/arm/plat-mxc/Kconfig
@@ -52,6 +52,10 @@ config MXC_PWM
52 help 52 help
53 Enable support for the i.MX PWM controller(s). 53 Enable support for the i.MX PWM controller(s).
54 54
55config ARCH_HAS_RNGA
56 bool
57 depends on ARCH_MXC
58
55config ARCH_MXC_IOMUX_V3 59config ARCH_MXC_IOMUX_V3
56 bool 60 bool
57endif 61endif