diff options
author | Sebastian Andrzej Siewior <sebastian@breakpoint.cc> | 2009-05-07 16:59:24 -0400 |
---|---|---|
committer | Nicolas Pitre <nico@cam.org> | 2009-06-08 13:05:01 -0400 |
commit | 3a8f744169ebcb0064c46a755d9e3e27233f048a (patch) | |
tree | 0ce761a9bfb2f450030de62b4dd8e14525a860d4 /arch/arm/mach-orion5x/common.c | |
parent | 9ffbe87370403d6d5c4010f5b0f692f9d0715776 (diff) |
[ARM] orion5x: add sram support for crypto
The security accelerator which can act as a puppet player for the crypto
engine requires its commands in the sram. This patch adds support for the
phys mapping and creates a platform device for the actual driver.
[ nico: renamed device name from "mv,orion5x-crypto" to "mv_crypto"
so to match the module name and be more generic for Kirkwood use ]
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Diffstat (limited to 'arch/arm/mach-orion5x/common.c')
-rw-r--r-- | arch/arm/mach-orion5x/common.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index c3e2bea2d054..eafcc49009ea 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -536,6 +536,42 @@ void __init orion5x_xor_init(void) | |||
536 | platform_device_register(&orion5x_xor1_channel); | 536 | platform_device_register(&orion5x_xor1_channel); |
537 | } | 537 | } |
538 | 538 | ||
539 | static struct resource orion5x_crypto_res[] = { | ||
540 | { | ||
541 | .name = "regs", | ||
542 | .start = ORION5X_CRYPTO_PHYS_BASE, | ||
543 | .end = ORION5X_CRYPTO_PHYS_BASE + 0xffff, | ||
544 | .flags = IORESOURCE_MEM, | ||
545 | }, { | ||
546 | .name = "sram", | ||
547 | .start = ORION5X_SRAM_PHYS_BASE, | ||
548 | .end = ORION5X_SRAM_PHYS_BASE + SZ_8K - 1, | ||
549 | .flags = IORESOURCE_MEM, | ||
550 | }, { | ||
551 | .name = "crypto interrupt", | ||
552 | .start = IRQ_ORION5X_CESA, | ||
553 | .end = IRQ_ORION5X_CESA, | ||
554 | .flags = IORESOURCE_IRQ, | ||
555 | }, | ||
556 | }; | ||
557 | |||
558 | static struct platform_device orion5x_crypto_device = { | ||
559 | .name = "mv_crypto", | ||
560 | .id = -1, | ||
561 | .num_resources = ARRAY_SIZE(orion5x_crypto_res), | ||
562 | .resource = orion5x_crypto_res, | ||
563 | }; | ||
564 | |||
565 | int __init orion5x_crypto_init(void) | ||
566 | { | ||
567 | int ret; | ||
568 | |||
569 | ret = orion5x_setup_sram_win(); | ||
570 | if (ret) | ||
571 | return ret; | ||
572 | |||
573 | return platform_device_register(&orion5x_crypto_device); | ||
574 | } | ||
539 | 575 | ||
540 | /***************************************************************************** | 576 | /***************************************************************************** |
541 | * Watchdog | 577 | * Watchdog |