From 65f3cd8afd4803654736df00601d7d951d62cfc2 Mon Sep 17 00:00:00 2001 From: Anish Trivedi Date: Tue, 23 Feb 2010 15:13:11 -0600 Subject: ENGR00117755 MX28: DCP Driver for DCP operations: AES, SHA1, and SHA256 Signed-off-by: Anish Trivedi Signed-off-by: Alejandro Gonzalez --- arch/arm/mach-mx28/device.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'arch/arm/mach-mx28') 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; } -- cgit v1.2.3