summaryrefslogtreecommitdiff
path: root/arch/arm/mach-bcm2708
diff options
context:
space:
mode:
authorFlorian Meier <florian.meier@koalo.de>2013-11-22 19:04:54 +0100
committerpopcornmix <popcornmix@gmail.com>2015-05-18 14:10:53 +0100
commit54acb0b34f76382d2abc725b88fe04c156a2366e (patch)
tree0af79641bcdf66ec4a576a543d5ea0799bbdef9e /arch/arm/mach-bcm2708
parent0c7edf491888b37fc9c86738f6bb0f6b1aff2ae8 (diff)
downloadlinux-54acb0b34f76382d2abc725b88fe04c156a2366e.tar.gz
BCM2708: Add I2S support to board file
Adds the required initializations for I2S to the board file of mach-bcm2708. Signed-off-by: Florian Meier <florian.meier@koalo.de>
Diffstat (limited to 'arch/arm/mach-bcm2708')
-rw-r--r--arch/arm/mach-bcm2708/bcm2708.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c
index 5873f8b1a666..7f4ebf48d65d 100644
--- a/arch/arm/mach-bcm2708/bcm2708.c
+++ b/arch/arm/mach-bcm2708/bcm2708.c
@@ -613,6 +613,28 @@ static struct platform_device bcm2835_thermal_device = {
.name = "bcm2835_thermal",
};
+#if defined(CONFIG_SND_BCM2708_SOC_I2S) || defined(CONFIG_SND_BCM2708_SOC_I2S_MODULE)
+static struct resource bcm2708_i2s_resources[] = {
+ {
+ .start = I2S_BASE,
+ .end = I2S_BASE + 0x20,
+ .flags = IORESOURCE_MEM,
+ },
+ {
+ .start = PCM_CLOCK_BASE,
+ .end = PCM_CLOCK_BASE + 0x02,
+ .flags = IORESOURCE_MEM,
+ }
+};
+
+static struct platform_device bcm2708_i2s_device = {
+ .name = "bcm2708-i2s",
+ .id = 0,
+ .num_resources = ARRAY_SIZE(bcm2708_i2s_resources),
+ .resource = bcm2708_i2s_resources,
+};
+#endif
+
int __init bcm_register_device(struct platform_device *pdev)
{
int ret;
@@ -762,6 +784,10 @@ void __init bcm2708_init(void)
bcm_register_device(&bcm2835_hwmon_device);
bcm_register_device(&bcm2835_thermal_device);
+#if defined(CONFIG_SND_BCM2708_SOC_I2S) || defined(CONFIG_SND_BCM2708_SOC_I2S_MODULE)
+ bcm_register_device_dt(&bcm2708_i2s_device);
+#endif
+
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
struct amba_device *d = amba_devs[i];
amba_device_register(d, &iomem_resource);