From: Iliyan Malchev <malchev@google.com> Date: Thu, 29 Jul 2010 20:57:45 +0000 (-0700) Subject: [ARM] tegra: add platform devices for i2s1 and i2s2 X-Git-Tag: firefly_0821_release~9833^2~304 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f8af4c4cf7c1574f8996936d22df9a273fecfd38;p=firefly-linux-kernel-4.4.55.git [ARM] tegra: add platform devices for i2s1 and i2s2 Signed-off-by: Iliyan Malchev <malchev@google.com> --- 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 <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), +}; 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