diff options
author | Andrew Lunn <andrew@lunn.ch> | 2011-05-15 13:32:51 +0200 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2011-05-16 15:16:17 -0400 |
commit | 44350061905b2a502579d3827eacaf8efa393aad (patch) | |
tree | 33c66c67205e2fd48cae80dd29db1c755ddb94fb /arch/arm/plat-orion | |
parent | 9e613f8a7904f2b7516eed08f413463c579325bd (diff) |
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.c | 31 | ||||
-rw-r--r-- | arch/arm/plat-orion/include/plat/common.h | 5 |
2 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index d1cf7c3fb74..9e5451b3c8e 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 0ec6b663a83..a63c357e2ab 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 |