brcm2708: update to v3.18
[openwrt/svn-archive/archive.git] / target / linux / brcm2708 / patches-3.18 / 0032-BCM2708-Add-I2S-support-to-board-file.patch
1 From 92f48ad219db73d6fb34f909965622ca4067da4f Mon Sep 17 00:00:00 2001
2 From: Florian Meier <florian.meier@koalo.de>
3 Date: Fri, 22 Nov 2013 19:04:54 +0100
4 Subject: [PATCH 032/114] BCM2708: Add I2S support to board file
5
6 Adds the required initializations for I2S
7 to the board file of mach-bcm2708.
8
9 Signed-off-by: Florian Meier <florian.meier@koalo.de>
10 ---
11 arch/arm/mach-bcm2708/bcm2708.c | 26 ++++++++++++++++++++++++++
12 1 file changed, 26 insertions(+)
13
14 diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c
15 index a740344..dca28ad 100644
16 --- a/arch/arm/mach-bcm2708/bcm2708.c
17 +++ b/arch/arm/mach-bcm2708/bcm2708.c
18 @@ -587,6 +587,28 @@ static struct platform_device bcm2835_thermal_device = {
19 .name = "bcm2835_thermal",
20 };
21
22 +#ifdef CONFIG_SND_BCM2708_SOC_I2S_MODULE
23 +static struct resource bcm2708_i2s_resources[] = {
24 + {
25 + .start = I2S_BASE,
26 + .end = I2S_BASE + 0x20,
27 + .flags = IORESOURCE_MEM,
28 + },
29 + {
30 + .start = PCM_CLOCK_BASE,
31 + .end = PCM_CLOCK_BASE + 0x02,
32 + .flags = IORESOURCE_MEM,
33 + }
34 +};
35 +
36 +static struct platform_device bcm2708_i2s_device = {
37 + .name = "bcm2708-i2s",
38 + .id = 0,
39 + .num_resources = ARRAY_SIZE(bcm2708_i2s_resources),
40 + .resource = bcm2708_i2s_resources,
41 +};
42 +#endif
43 +
44 int __init bcm_register_device(struct platform_device *pdev)
45 {
46 int ret;
47 @@ -707,6 +729,10 @@ void __init bcm2708_init(void)
48 bcm_register_device(&bcm2835_hwmon_device);
49 bcm_register_device(&bcm2835_thermal_device);
50
51 +#ifdef CONFIG_SND_BCM2708_SOC_I2S_MODULE
52 + bcm_register_device(&bcm2708_i2s_device);
53 +#endif
54 +
55 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
56 struct amba_device *d = amba_devs[i];
57 amba_device_register(d, &iomem_resource);
58 --
59 1.8.3.2
60