summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mx28
diff options
context:
space:
mode:
authorAnish Trivedi <anish@freescale.com>2010-02-23 15:13:11 -0600
committerAlejandro Gonzalez <alex.gonzalez@digi.com>2010-05-25 11:17:15 +0200
commit65f3cd8afd4803654736df00601d7d951d62cfc2 (patch)
tree35fe4c270ac3741a08a3f2fb30e4ea3ef576ce12 /arch/arm/mach-mx28
parent4d658511fd473c68173b27ea016a7003f0ff2312 (diff)
ENGR00117755 MX28: DCP
Driver for DCP operations: AES, SHA1, and SHA256 Signed-off-by: Anish Trivedi <anish@freescale.com> Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'arch/arm/mach-mx28')
-rw-r--r--arch/arm/mach-mx28/device.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm/mach-mx28/device.c b/arch/arm/mach-mx28/device.c
index 9b2e98c3e656..e618bc5b0503 100644
--- a/arch/arm/mach-mx28/device.c
+++ b/arch/arm/mach-mx28/device.c
@@ -855,6 +855,43 @@ static inline void mx28_init_flexcan(void)
}
#endif
+#if defined(CONFIG_CRYPTO_DEV_DCP)
+
+static struct resource dcp_resources[] = {
+
+ {
+ .flags = IORESOURCE_MEM,
+ .start = DCP_PHYS_ADDR,
+ .end = DCP_PHYS_ADDR + 0x2000 - 1,
+ }, {
+ .flags = IORESOURCE_IRQ,
+ .start = IRQ_DCP_VMI,
+ .end = IRQ_DCP_VMI,
+ }, {
+ .flags = IORESOURCE_IRQ,
+ .start = IRQ_DCP,
+ .end = IRQ_DCP,
+ },
+};
+
+static void __init mx28_init_dcp(void)
+{
+ struct platform_device *pdev;
+
+ pdev = mxs_get_device("dcp", 0);
+ if (pdev == NULL || IS_ERR(pdev))
+ return;
+ pdev->resource = dcp_resources;
+ pdev->num_resources = ARRAY_SIZE(dcp_resources);
+ mxs_add_device(pdev, 3);
+}
+#else
+static void __init mx28_init_dcp(void)
+{
+ ;
+}
+#endif
+
int __init mx28_device_init(void)
{
mx28_init_dma();
@@ -870,6 +907,7 @@ int __init mx28_device_init(void)
mx28_init_kbd();
mx28_init_ts();
mx28_init_lcdif();
+ mx28_init_dcp();
return 0;
}