diff options
author | Andrew Lunn <andrew@lunn.ch> | 2011-05-15 07:32:51 -0400 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2011-05-16 15:16:17 -0400 |
commit | 44350061905b2a502579d3827eacaf8efa393aad (patch) | |
tree | 33c66c67205e2fd48cae80dd29db1c755ddb94fb /arch/arm/mach-orion5x | |
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/mach-orion5x')
-rw-r--r-- | arch/arm/mach-orion5x/common.c | 36 |
1 files changed, 7 insertions, 29 deletions
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 8bbf497cc5f1..0ab531d047fc 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -164,41 +164,19 @@ void __init orion5x_xor_init(void) | |||
164 | IRQ_ORION5X_XOR0, IRQ_ORION5X_XOR1); | 164 | IRQ_ORION5X_XOR0, IRQ_ORION5X_XOR1); |
165 | } | 165 | } |
166 | 166 | ||
167 | static struct resource orion5x_crypto_res[] = { | 167 | /***************************************************************************** |
168 | { | 168 | * Cryptographic Engines and Security Accelerator (CESA) |
169 | .name = "regs", | 169 | ****************************************************************************/ |
170 | .start = ORION5X_CRYPTO_PHYS_BASE, | 170 | static void __init orion5x_crypto_init(void) |
171 | .end = ORION5X_CRYPTO_PHYS_BASE + 0xffff, | ||
172 | .flags = IORESOURCE_MEM, | ||
173 | }, { | ||
174 | .name = "sram", | ||
175 | .start = ORION5X_SRAM_PHYS_BASE, | ||
176 | .end = ORION5X_SRAM_PHYS_BASE + SZ_8K - 1, | ||
177 | .flags = IORESOURCE_MEM, | ||
178 | }, { | ||
179 | .name = "crypto interrupt", | ||
180 | .start = IRQ_ORION5X_CESA, | ||
181 | .end = IRQ_ORION5X_CESA, | ||
182 | .flags = IORESOURCE_IRQ, | ||
183 | }, | ||
184 | }; | ||
185 | |||
186 | static struct platform_device orion5x_crypto_device = { | ||
187 | .name = "mv_crypto", | ||
188 | .id = -1, | ||
189 | .num_resources = ARRAY_SIZE(orion5x_crypto_res), | ||
190 | .resource = orion5x_crypto_res, | ||
191 | }; | ||
192 | |||
193 | static int __init orion5x_crypto_init(void) | ||
194 | { | 171 | { |
195 | int ret; | 172 | int ret; |
196 | 173 | ||
197 | ret = orion5x_setup_sram_win(); | 174 | ret = orion5x_setup_sram_win(); |
198 | if (ret) | 175 | if (ret) |
199 | return ret; | 176 | return; |
200 | 177 | ||
201 | return platform_device_register(&orion5x_crypto_device); | 178 | orion_crypto_init(ORION5X_CRYPTO_PHYS_BASE, ORION5X_SRAM_PHYS_BASE, |
179 | SZ_8K, IRQ_ORION5X_CESA); | ||
202 | } | 180 | } |
203 | 181 | ||
204 | /***************************************************************************** | 182 | /***************************************************************************** |