[ARM] tegra: add platform devices for i2s1 and i2s2
Iliyan Malchev [Thu, 29 Jul 2010 20:57:45 +0000 (13:57 -0700)]
Signed-off-by: Iliyan Malchev <malchev@google.com>

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

index d59e964..d518f49 100644 (file)
@@ -744,3 +744,53 @@ struct platform_device tegra_ehci3_device = {
        .resource = tegra_usb3_resources,
        .num_resources = ARRAY_SIZE(tegra_usb3_resources),
 };
+
+static struct resource i2s_resource1[] = {
+       [0] = {
+               .start  = INT_I2S1,
+               .end    = INT_I2S1,
+               .flags  = IORESOURCE_IRQ
+       },
+       [1] = {
+               .start  = TEGRA_DMA_REQ_SEL_I2S_1,
+               .end    = TEGRA_DMA_REQ_SEL_I2S_1,
+               .flags  = IORESOURCE_DMA
+       },
+       [2] = {
+               .start  = TEGRA_I2S1_BASE,
+               .end    = TEGRA_I2S1_BASE + TEGRA_I2S1_SIZE - 1,
+               .flags  = IORESOURCE_MEM
+       }
+};
+
+static struct resource i2s_resource2[] = {
+       [0] = {
+               .start  = INT_I2S2,
+               .end    = INT_I2S2,
+               .flags  = IORESOURCE_IRQ
+       },
+       [1] = {
+               .start  = TEGRA_DMA_REQ_SEL_I2S_2,
+               .end    = TEGRA_DMA_REQ_SEL_I2S_2,
+               .flags  = IORESOURCE_DMA
+       },
+       [2] = {
+               .start  = TEGRA_I2S2_BASE,
+               .end    = TEGRA_I2S2_BASE + TEGRA_I2S2_SIZE - 1,
+               .flags  = IORESOURCE_MEM
+       }
+};
+
+struct platform_device tegra_i2s_device1 = {
+       .name           = "i2s",
+       .id             = 0,
+       .resource       = i2s_resource1,
+       .num_resources  = ARRAY_SIZE(i2s_resource1),
+};
+
+struct platform_device tegra_i2s_device2 = {
+       .name           = "i2s",
+       .id             = 1,
+       .resource       = i2s_resource2,
+       .num_resources  = ARRAY_SIZE(i2s_resource2),
+};
index 6138bec..cc91378 100644 (file)
@@ -57,5 +57,7 @@ extern struct platform_device tegra_udc_device;
 extern struct platform_device tegra_ehci1_device;
 extern struct platform_device tegra_ehci2_device;
 extern struct platform_device tegra_ehci3_device;
+extern struct platform_device tegra_i2s_device1;
+extern struct platform_device tegra_i2s_device2;
 
 #endif