aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion5x/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-orion5x/common.c')
-rw-r--r--arch/arm/mach-orion5x/common.c42
1 files changed, 39 insertions, 3 deletions
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index b1c7778d9f9..eafcc49009e 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -31,7 +31,7 @@
31#include <plat/ehci-orion.h> 31#include <plat/ehci-orion.h>
32#include <plat/mv_xor.h> 32#include <plat/mv_xor.h>
33#include <plat/orion_nand.h> 33#include <plat/orion_nand.h>
34#include <plat/orion5x_wdt.h> 34#include <plat/orion_wdt.h>
35#include <plat/time.h> 35#include <plat/time.h>
36#include "common.h" 36#include "common.h"
37 37
@@ -536,16 +536,52 @@ void __init orion5x_xor_init(void)
536 platform_device_register(&orion5x_xor1_channel); 536 platform_device_register(&orion5x_xor1_channel);
537} 537}
538 538
539static 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
558static 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
565int __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
542 ****************************************************************************/ 578 ****************************************************************************/
543static struct orion5x_wdt_platform_data orion5x_wdt_data = { 579static struct orion_wdt_platform_data orion5x_wdt_data = {
544 .tclk = 0, 580 .tclk = 0,
545}; 581};
546 582
547static struct platform_device orion5x_wdt_device = { 583static struct platform_device orion5x_wdt_device = {
548 .name = "orion5x_wdt", 584 .name = "orion_wdt",
549 .id = -1, 585 .id = -1,
550 .dev = { 586 .dev = {
551 .platform_data = &orion5x_wdt_data, 587 .platform_data = &orion5x_wdt_data,