aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2009-06-03 15:24:36 -0400
committerNicolas Pitre <nico@cam.org>2009-06-08 13:05:03 -0400
commitae5c8c83735f5fcb09b380944e4854a383006998 (patch)
tree33a54922e45c3070961c96f6514b55bcf2634e24
parentc1191b0e3b5fc080e0b09859024f39c4a8c5d4d5 (diff)
[ARM] Kirkwood: platform device registration for the crypto engine
Signed-off-by: Nicolas Pitre <nico@marvell.com>
-rw-r--r--arch/arm/mach-kirkwood/common.c38
-rw-r--r--arch/arm/mach-kirkwood/include/mach/kirkwood.h2
2 files changed, 40 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
567static 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
586static 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
593void __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 ****************************************************************************/
566static struct mv_xor_platform_shared_data kirkwood_xor_shared_data = { 603static 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
891static int __init kirkwood_clock_gate(void) 929static int __init kirkwood_clock_gate(void)
diff --git a/arch/arm/mach-kirkwood/include/mach/kirkwood.h b/arch/arm/mach-kirkwood/include/mach/kirkwood.h
index 2172224d7e2d..07af858814a0 100644
--- a/arch/arm/mach-kirkwood/include/mach/kirkwood.h
+++ b/arch/arm/mach-kirkwood/include/mach/kirkwood.h
@@ -66,6 +66,8 @@
66 66
67#define BRIDGE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x20000) 67#define BRIDGE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x20000)
68 68
69#define CRYPTO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x30000)
70
69#define PCIE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x40000) 71#define PCIE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x40000)
70#define PCIE_LINK_CTRL (PCIE_VIRT_BASE | 0x70) 72#define PCIE_LINK_CTRL (PCIE_VIRT_BASE | 0x70)
71#define PCIE_STATUS (PCIE_VIRT_BASE | 0x1a04) 73#define PCIE_STATUS (PCIE_VIRT_BASE | 0x1a04)