summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0003-am33x-Add-crypto-device-and-resource-structure-for-T.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0003-am33x-Add-crypto-device-and-resource-structure-for-T.patch')
-rw-r--r--recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0003-am33x-Add-crypto-device-and-resource-structure-for-T.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0003-am33x-Add-crypto-device-and-resource-structure-for-T.patch b/recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0003-am33x-Add-crypto-device-and-resource-structure-for-T.patch
new file mode 100644
index 00000000..def61d56
--- /dev/null
+++ b/recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0003-am33x-Add-crypto-device-and-resource-structure-for-T.patch
@@ -0,0 +1,60 @@
1From b7477dd40221a91af286bffa110879075a498943 Mon Sep 17 00:00:00 2001
2From: Greg Turner <gregturner@ti.com>
3Date: Thu, 17 May 2012 14:49:39 -0500
4Subject: [PATCH 3/8] am33x: Add crypto device and resource structure for TRNG
5
6* Add platform device and resource structure to devices.c
7* Structures are for the TRNG crypto module
8* Used in the OMAP4 crypto driver
9
10Signed-off-by: Greg Turner <gregturner@ti.com>
11---
12 arch/arm/plat-omap/devices.c | 23 +++++++++++++++++++++++
13 1 files changed, 23 insertions(+), 0 deletions(-)
14 mode change 100644 => 100755 arch/arm/plat-omap/devices.c
15
16diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
17old mode 100644
18new mode 100755
19index 1971932..52720b4
20--- a/arch/arm/plat-omap/devices.c
21+++ b/arch/arm/plat-omap/devices.c
22@@ -26,6 +26,7 @@
23 #include <plat/mmc.h>
24 #include <plat/menelaus.h>
25 #include <plat/omap44xx.h>
26+#include <plat/am33xx.h>
27
28 #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \
29 defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
30@@ -104,6 +105,28 @@ static void omap_init_rng(void)
31 {
32 (void) platform_device_register(&omap_rng_device);
33 }
34+#elif defined(CONFIG_HW_RANDOM_OMAP4) || defined(CONFIG_HW_RANDOM_OMAP4_MODULE)
35+
36+static struct resource rng_resources[] = {
37+ {
38+ .start = AM33XX_RNG_BASE,
39+ .end = AM33XX_RNG_BASE + 0x1FFC,
40+ .flags = IORESOURCE_MEM,
41+ },
42+};
43+
44+static struct platform_device omap4_rng_device = {
45+ .name = "omap4_rng",
46+ .id = -1,
47+ .num_resources = ARRAY_SIZE(rng_resources),
48+ .resource = rng_resources,
49+};
50+
51+static void omap_init_rng(void)
52+{
53+ (void) platform_device_register(&omap4_rng_device);
54+}
55+
56 #else
57 static inline void omap_init_rng(void) {}
58 #endif
59--
601.7.0.4