diff options
author | Nicolas Pitre <nico@cam.org> | 2009-06-03 15:24:36 -0400 |
---|---|---|
committer | Nicolas Pitre <nico@cam.org> | 2009-06-08 13:05:03 -0400 |
commit | ae5c8c83735f5fcb09b380944e4854a383006998 (patch) | |
tree | 33a54922e45c3070961c96f6514b55bcf2634e24 /arch/arm/mach-kirkwood/common.c | |
parent | c1191b0e3b5fc080e0b09859024f39c4a8c5d4d5 (diff) |
[ARM] Kirkwood: platform device registration for the crypto engine
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Diffstat (limited to 'arch/arm/mach-kirkwood/common.c')
-rw-r--r-- | arch/arm/mach-kirkwood/common.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 3da32b1834dc..0f6919838011 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -561,6 +561,43 @@ void __init kirkwood_uart1_init(void) | |||
561 | 561 | ||
562 | 562 | ||
563 | /***************************************************************************** | 563 | /***************************************************************************** |
564 | * Cryptographic Engines and Security Accelerator (CESA) | ||
565 | ****************************************************************************/ | ||
566 | |||
567 | static struct resource kirkwood_crypto_res[] = { | ||
568 | { | ||
569 | .name = "regs", | ||
570 | .start = CRYPTO_PHYS_BASE, | ||
571 | .end = CRYPTO_PHYS_BASE + 0xffff, | ||
572 | .flags = IORESOURCE_MEM, | ||
573 | }, { | ||
574 | .name = "sram", | ||
575 | .start = KIRKWOOD_SRAM_PHYS_BASE, | ||
576 | .end = KIRKWOOD_SRAM_PHYS_BASE + KIRKWOOD_SRAM_SIZE - 1, | ||
577 | .flags = IORESOURCE_MEM, | ||
578 | }, { | ||
579 | .name = "crypto interrupt", | ||
580 | .start = IRQ_KIRKWOOD_CRYPTO, | ||
581 | .end = IRQ_KIRKWOOD_CRYPTO, | ||
582 | .flags = IORESOURCE_IRQ, | ||
583 | }, | ||
584 | }; | ||
585 | |||
586 | static struct platform_device kirkwood_crypto_device = { | ||
587 | .name = "mv_crypto", | ||
588 | .id = -1, | ||
589 | .num_resources = ARRAY_SIZE(kirkwood_crypto_res), | ||
590 | .resource = kirkwood_crypto_res, | ||
591 | }; | ||
592 | |||
593 | void __init kirkwood_crypto_init(void) | ||
594 | { | ||
595 | kirkwood_clk_ctrl |= CGC_CRYPTO; | ||
596 | platform_device_register(&kirkwood_crypto_device); | ||
597 | } | ||
598 | |||
599 | |||
600 | /***************************************************************************** | ||
564 | * XOR | 601 | * XOR |
565 | ****************************************************************************/ | 602 | ****************************************************************************/ |
566 | static struct mv_xor_platform_shared_data kirkwood_xor_shared_data = { | 603 | static struct mv_xor_platform_shared_data kirkwood_xor_shared_data = { |
@@ -886,6 +923,7 @@ void __init kirkwood_init(void) | |||
886 | kirkwood_wdt_init(); | 923 | kirkwood_wdt_init(); |
887 | kirkwood_xor0_init(); | 924 | kirkwood_xor0_init(); |
888 | kirkwood_xor1_init(); | 925 | kirkwood_xor1_init(); |
926 | kirkwood_crypto_init(); | ||
889 | } | 927 | } |
890 | 928 | ||
891 | static int __init kirkwood_clock_gate(void) | 929 | static int __init kirkwood_clock_gate(void) |