[ARM] tegra: add platform devices for i2s1 and i2s2
authorIliyan Malchev <malchev@google.com>
Thu, 29 Jul 2010 20:57:45 +0000 (13:57 -0700)
committerColin Cross <ccross@android.com>
Wed, 6 Oct 2010 23:27:21 +0000 (16:27 -0700)
Signed-off-by: Iliyan Malchev <malchev@google.com>
arch/arm/mach-tegra/devices.c
arch/arm/mach-tegra/devices.h

index 6ba36e14d544b4025d1f69ffb8fdaaf625654e99..26028ce3aeebafcd1047b2c940546b8d177a1073 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/fsl_devices.h>
 #include <mach/irqs.h>
 #include <mach/iomap.h>
+#include <mach/dma.h>
 
 static struct resource i2c_resource1[] = {
        [0] = {
@@ -419,3 +420,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 b16042ce2c65accd192432798f35cfb9f33ed58b..9ff12576ea72fe833d49e1b9af67e0fde3fb039b 100644 (file)
@@ -40,5 +40,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