arm: tegra: cardhu: Enabling Security Engine
Kasoju Mallikarjun [Tue, 24 May 2011 14:38:38 +0000 (19:38 +0530)]
bug 622025

Original-Change-Id: Ic01ad6e93a26b332e016fcef6dbc928918c25745
Reviewed-on: http://git-master/r/29952
Tested-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

Rebase-Id: R39ce4ae17284fb55c18a7c4a6eaf7fca0b856884

arch/arm/mach-tegra/board-cardhu.c

index 8091886..7254eab 100644 (file)
@@ -210,6 +210,7 @@ static __initdata struct tegra_clk_init_table cardhu_clk_init_table[] = {
        { "i2s2",       "pll_a_out0",   11289600,       true},
        { "audio",      "pll_a_out0",   11289600,       true},
        { "audio_2x",   "audio",        22579200,       true},
+       { "se", "pll_p",        216000000,      true},
        { NULL,         NULL,           0,              0},
 };
 
@@ -288,6 +289,36 @@ static struct platform_device tegra_rtc_device = {
 };
 #endif
 
+#if defined(CONFIG_CRYPTO_DEV_TEGRA_SE)
+
+static u64 tegra_se_dma_mask = DMA_BIT_MASK(32);
+
+static struct resource tegra_se_resources[] = {
+       [0] = {
+               .start = TEGRA_SE_BASE,
+               .end = TEGRA_SE_BASE + TEGRA_SE_SIZE - 1,
+               .flags = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start = INT_SE,
+               .end = INT_SE,
+               .flags = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device tegra_se_device = {
+       .name = "tegra-se",
+       .id = 0,
+       .dev = {
+               .coherent_dma_mask = DMA_BIT_MASK(32),
+               .dma_mask = &tegra_se_dma_mask,
+       },
+       .resource = tegra_se_resources,
+       .num_resources = ARRAY_SIZE(tegra_se_resources),
+};
+
+#endif
+
 static struct platform_device tegra_camera = {
        .name = "tegra_camera",
        .id = -1,
@@ -314,6 +345,10 @@ static struct platform_device *cardhu_devices[] __initdata = {
        &tegra_avp_device,
        &tegra_camera,
        &tegra_spi_device4,
+#if defined(CONFIG_CRYPTO_DEV_TEGRA_SE)
+       &tegra_se_device,
+#endif
+
 };
 
 static int __init cardhu_touch_init(void)