summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-orion
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
parent9e613f8a7904f2b7516eed08f413463c579325bd (diff)
downloadop-kernel-dev-44350061905b2a502579d3827eacaf8efa393aad.zip
op-kernel-dev-44350061905b2a502579d3827eacaf8efa393aad.tar.gz
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')
-rw-r--r--arch/arm/plat-orion/common.c31
-rw-r--r--arch/arm/plat-orion/include/plat/common.h5
2 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c
index d1cf7c3..9e5451b 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);
+}
diff --git a/arch/arm/plat-orion/include/plat/common.h b/arch/arm/plat-orion/include/plat/common.h
index 0ec6b66..a63c357 100644
--- a/arch/arm/plat-orion/include/plat/common.h
+++ b/arch/arm/plat-orion/include/plat/common.h
@@ -109,4 +109,9 @@ void __init orion_sata_init(struct mv_sata_platform_data *sata_data,
struct mbus_dram_target_info *mbus_dram_info,
unsigned long mapbase,
unsigned long irq);
+
+void __init orion_crypto_init(unsigned long mapbase,
+ unsigned long srambase,
+ unsigned long sram_size,
+ unsigned long irq);
#endif
OpenPOWER on IntegriCloud