summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/devices.c
diff options
context:
space:
mode:
authorMark A. Greer <mgreer@animalcreek.com>2012-12-21 20:28:09 +0400
committerPaul Walmsley <paul@pwsan.com>2013-03-31 01:51:33 +0400
commit660ffd6ba2405ed7ff614ab73f282e056c47d8f6 (patch)
tree1077d8eec0a021161855a521fc6b93bf7b069010 /arch/arm/mach-omap2/devices.c
parentaec94bf5b62879c7ae18a212a2dc0c0823c780c9 (diff)
downloadlinux-660ffd6ba2405ed7ff614ab73f282e056c47d8f6.tar.xz
ARM: OMAP2xxx: hwmod: Convert AES crypto devcie data to hwmod
Convert the device data for the OMAP2 AES crypto IP from explicit platform_data to hwmod. CC: Paul Walmsley <paul@pwsan.com> Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> [paul@pwsan.com: fixed lines causing sparse warnings] Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/devices.c')
-rw-r--r--arch/arm/mach-omap2/devices.c35
1 files changed, 10 insertions, 25 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 6ff9907e3b54..c4c7d1d70158 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -519,28 +519,6 @@ static void __init omap_init_sham(void)
#if defined(CONFIG_CRYPTO_DEV_OMAP_AES) || defined(CONFIG_CRYPTO_DEV_OMAP_AES_MODULE)
-#ifdef CONFIG_ARCH_OMAP2
-static struct resource omap2_aes_resources[] = {
- {
- .start = OMAP24XX_SEC_AES_BASE,
- .end = OMAP24XX_SEC_AES_BASE + 0x4C,
- .flags = IORESOURCE_MEM,
- },
- {
- .start = OMAP24XX_DMA_AES_TX,
- .flags = IORESOURCE_DMA,
- },
- {
- .start = OMAP24XX_DMA_AES_RX,
- .flags = IORESOURCE_DMA,
- }
-};
-static int omap2_aes_resources_sz = ARRAY_SIZE(omap2_aes_resources);
-#else
-#define omap2_aes_resources NULL
-#define omap2_aes_resources_sz 0
-#endif
-
#ifdef CONFIG_ARCH_OMAP3
static struct resource omap3_aes_resources[] = {
{
@@ -571,16 +549,23 @@ static struct platform_device aes_device = {
static void omap_init_aes(void)
{
if (cpu_is_omap24xx()) {
- aes_device.resource = omap2_aes_resources;
- aes_device.num_resources = omap2_aes_resources_sz;
+ struct omap_hwmod *oh;
+ struct platform_device *pdev;
+
+ oh = omap_hwmod_lookup("aes");
+ if (!oh)
+ return;
+
+ pdev = omap_device_build("omap-aes", -1, oh, NULL, 0);
+ WARN(IS_ERR(pdev), "Can't build omap_device for omap-aes\n");
} else if (cpu_is_omap34xx()) {
aes_device.resource = omap3_aes_resources;
aes_device.num_resources = omap3_aes_resources_sz;
+ platform_device_register(&aes_device);
} else {
pr_err("%s: platform not supported\n", __func__);
return;
}
- platform_device_register(&aes_device);
}
#else