From f8af4c4cf7c1574f8996936d22df9a273fecfd38 Mon Sep 17 00:00:00 2001 From: Iliyan Malchev Date: Thu, 29 Jul 2010 13:57:45 -0700 Subject: [PATCH] [ARM] tegra: add platform devices for i2s1 and i2s2 Signed-off-by: Iliyan Malchev --- arch/arm/mach-tegra/devices.c | 51 +++++++++++++++++++++++++++++++++++ arch/arm/mach-tegra/devices.h | 2 ++ 2 files changed, 53 insertions(+) diff --git a/arch/arm/mach-tegra/devices.c b/arch/arm/mach-tegra/devices.c index 6ba36e14d544..26028ce3aeeb 100644 --- a/arch/arm/mach-tegra/devices.c +++ b/arch/arm/mach-tegra/devices.c @@ -25,6 +25,7 @@ #include #include #include +#include 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), +}; diff --git a/arch/arm/mach-tegra/devices.h b/arch/arm/mach-tegra/devices.h index b16042ce2c65..9ff12576ea72 100644 --- a/arch/arm/mach-tegra/devices.h +++ b/arch/arm/mach-tegra/devices.h @@ -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 -- 2.34.1