From 44350061905b2a502579d3827eacaf8efa393aad Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sun, 15 May 2011 13:32:51 +0200 Subject: ARM: orion: Consolidate setup of the crypto engine. Signed-off-by: Andrew Lunn Signed-off-by: Nicolas Pitre --- arch/arm/plat-orion/common.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'arch/arm/plat-orion/common.c') 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); +} -- cgit v1.2.1