summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-orion/common.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2011-05-15 13:32:51 +0200
committerNicolas Pitre <nico@fluxnic.net>2011-05-16 15:16:17 -0400
commit44350061905b2a502579d3827eacaf8efa393aad (patch)
tree33c66c67205e2fd48cae80dd29db1c755ddb94fb /arch/arm/plat-orion/common.c
parent9e613f8a7904f2b7516eed08f413463c579325bd (diff)
downloadlinux-44350061905b2a502579d3827eacaf8efa393aad.tar.gz
linux-44350061905b2a502579d3827eacaf8efa393aad.tar.bz2
linux-44350061905b2a502579d3827eacaf8efa393aad.zip
ARM: orion: Consolidate setup of the crypto engine.
Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Diffstat (limited to 'arch/arm/plat-orion/common.c')
-rw-r--r--arch/arm/plat-orion/common.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c
index d1cf7c3fb744..9e5451b3c8e3 100644
--- a/arch/arm/plat-orion/common.c
+++ b/arch/arm/plat-orion/common.c
@@ -923,4 +923,35 @@ void __init orion_sata_init(struct mv_sata_platform_data *sata_data,
platform_device_register(&orion_sata);
}
+/*****************************************************************************
+ * Cryptographic Engines and Security Accelerator (CESA)
+ ****************************************************************************/
+static struct resource orion_crypto_resources[] = {
+ {
+ .name = "regs",
+ }, {
+ .name = "crypto interrupt",
+ }, {
+ .name = "sram",
+ .flags = IORESOURCE_MEM,
+ },
+};
+static struct platform_device orion_crypto = {
+ .name = "mv_crypto",
+ .id = -1,
+};
+
+void __init orion_crypto_init(unsigned long mapbase,
+ unsigned long srambase,
+ unsigned long sram_size,
+ unsigned long irq)
+{
+ fill_resources(&orion_crypto, orion_crypto_resources,
+ mapbase, 0xffff, irq);
+ orion_crypto.num_resources = 3;
+ orion_crypto_resources[2].start = srambase;
+ orion_crypto_resources[2].end = srambase + sram_size - 1;
+
+ platform_device_register(&orion_crypto);
+}