ARM: tegra: Add support for SPI revision 2 controller
Amit Kamath [Wed, 18 Jan 2012 10:29:20 +0000 (15:29 +0530)]
Bug 815557

Change-Id: I5700f610e41a4ed32025a890e238b1bbcac128e9
Signed-off-by: Amit Kamath <akamath@nvidia.com>
Reviewed-on: http://git-master/r/75906
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Signed-off-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-on: http://git-master/r/78273
Reviewed-by: Automatic_Commit_Validation_User

arch/arm/mach-tegra/devices.c
arch/arm/mach-tegra/devices.h

index 15297c8..cd174b5 100644 (file)
@@ -473,6 +473,68 @@ struct platform_device tegra_spi_device6 = {
 };
 #endif
 
+struct platform_device tegra_spi_r2_device1 = {
+       .name           = "spi_tegra_r2",
+       .id             = 0,
+       .resource       = spi_resource1,
+       .num_resources  = ARRAY_SIZE(spi_resource1),
+       .dev            = {
+               .coherent_dma_mask      = 0xffffffff,
+       },
+};
+
+struct platform_device tegra_spi_r2_device2 = {
+       .name           = "spi_tegra_r2",
+       .id             = 1,
+       .resource       = spi_resource2,
+       .num_resources  = ARRAY_SIZE(spi_resource2),
+       .dev            = {
+               .coherent_dma_mask      = 0xffffffff,
+       },
+};
+
+struct platform_device tegra_spi_r2_device3 = {
+       .name           = "spi_tegra_r2",
+       .id             = 2,
+       .resource       = spi_resource3,
+       .num_resources  = ARRAY_SIZE(spi_resource3),
+       .dev            = {
+               .coherent_dma_mask      = 0xffffffff,
+       },
+};
+
+struct platform_device tegra_spi_r2_device4 = {
+       .name           = "spi_tegra_r2",
+       .id             = 3,
+       .resource       = spi_resource4,
+       .num_resources  = ARRAY_SIZE(spi_resource4),
+       .dev            = {
+               .coherent_dma_mask      = 0xffffffff,
+       },
+};
+
+#ifndef CONFIG_ARCH_TEGRA_2x_SOC
+struct platform_device tegra_spi_r2_device5 = {
+       .name           = "spi_tegra_r2",
+       .id             = 4,
+       .resource       = spi_resource5,
+       .num_resources  = ARRAY_SIZE(spi_resource5),
+       .dev  = {
+               .coherent_dma_mask      = 0xffffffff,
+       },
+};
+
+struct platform_device tegra_spi_r2_device6 = {
+       .name           = "spi_tegra_r2",
+       .id             = 5,
+       .resource       = spi_resource6,
+       .num_resources  = ARRAY_SIZE(spi_resource6),
+       .dev  = {
+               .coherent_dma_mask      = 0xffffffff,
+       },
+};
+#endif
+
 struct platform_device tegra_spi_slave_device1 = {
        .name           = "spi_slave_tegra",
        .id             = 0,
@@ -534,6 +596,68 @@ struct platform_device tegra_spi_slave_device6 = {
 };
 #endif
 
+struct platform_device tegra_spi_r2_slave_device1 = {
+       .name           = "spi_slave_tegra_r2",
+       .id             = 0,
+       .resource       = spi_resource1,
+       .num_resources  = ARRAY_SIZE(spi_resource1),
+       .dev  = {
+               .coherent_dma_mask      = 0xffffffff,
+       },
+};
+
+struct platform_device tegra_spi_slave_r2_device2 = {
+       .name           = "spi_slave_tegra_r2",
+       .id             = 1,
+       .resource       = spi_resource2,
+       .num_resources  = ARRAY_SIZE(spi_resource2),
+       .dev  = {
+               .coherent_dma_mask      = 0xffffffff,
+       },
+};
+
+struct platform_device tegra_spi_slave_r2_device3 = {
+       .name           = "spi_slave_tegra_r2",
+       .id             = 2,
+       .resource       = spi_resource3,
+       .num_resources  = ARRAY_SIZE(spi_resource3),
+       .dev  = {
+               .coherent_dma_mask      = 0xffffffff,
+       },
+};
+
+struct platform_device tegra_spi_slave_r2_device4 = {
+       .name           = "spi_slave_tegra_r2",
+       .id             = 3,
+       .resource       = spi_resource4,
+       .num_resources  = ARRAY_SIZE(spi_resource4),
+       .dev  = {
+               .coherent_dma_mask      = 0xffffffff,
+       },
+};
+
+#ifndef CONFIG_ARCH_TEGRA_2x_SOC
+struct platform_device tegra_spi_slave_r2_device5 = {
+       .name           = "spi_slave_tegra_r2",
+       .id             = 4,
+       .resource       = spi_resource5,
+       .num_resources  = ARRAY_SIZE(spi_resource5),
+       .dev  = {
+               .coherent_dma_mask      = 0xffffffff,
+       },
+};
+
+struct platform_device tegra_spi_r2_slave_device6 = {
+       .name           = "spi_slave_tegra_r2",
+       .id             = 5,
+       .resource       = spi_resource6,
+       .num_resources  = ARRAY_SIZE(spi_resource6),
+       .dev  = {
+               .coherent_dma_mask      = 0xffffffff,
+       },
+};
+#endif
+
 static struct resource resources_nor[] = {
        [0] = {
                .start = INT_SNOR,
index 02b8e1a..2f6f6c0 100644 (file)
@@ -45,10 +45,22 @@ extern struct platform_device tegra_spi_device1;
 extern struct platform_device tegra_spi_device2;
 extern struct platform_device tegra_spi_device3;
 extern struct platform_device tegra_spi_device4;
+extern struct platform_device tegra_spi_r2_device1;
+extern struct platform_device tegra_spi_r2_device2;
+extern struct platform_device tegra_spi_r2_device3;
+extern struct platform_device tegra_spi_r2_device4;
+extern struct platform_device tegra_spi_r2_device5;
+extern struct platform_device tegra_spi_r2_device6;
 extern struct platform_device tegra_spi_slave_device1;
 extern struct platform_device tegra_spi_slave_device2;
 extern struct platform_device tegra_spi_slave_device3;
 extern struct platform_device tegra_spi_slave_device4;
+extern struct platform_device tegra_spi_r2_slave_device1;
+extern struct platform_device tegra_spi_r2_slave_device2;
+extern struct platform_device tegra_spi_r2_slave_device3;
+extern struct platform_device tegra_spi_r2_slave_device4;
+extern struct platform_device tegra_spi_r2_slave_device5;
+extern struct platform_device tegra_spi_r2_slave_device6;
 #ifndef CONFIG_ARCH_TEGRA_2x_SOC
 extern struct platform_device tegra_spi_device5;
 extern struct platform_device tegra_spi_device6;