0032-BCM2708-Add-I2S-support-to-board-file.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. Adds the required initializations for I2S
  6. to the board file of mach-bcm2708.
  7. Signed-off-by: Florian Meier <florian.meier@koalo.de>
  8. ---
  9. arch/arm/mach-bcm2708/bcm2708.c | 26 ++++++++++++++++++++++++++
  10. 1 file changed, 26 insertions(+)
  11. --- a/arch/arm/mach-bcm2708/bcm2708.c
  12. +++ b/arch/arm/mach-bcm2708/bcm2708.c
  13. @@ -587,6 +587,28 @@ static struct platform_device bcm2835_th
  14. .name = "bcm2835_thermal",
  15. };
  16. +#ifdef CONFIG_SND_BCM2708_SOC_I2S_MODULE
  17. +static struct resource bcm2708_i2s_resources[] = {
  18. + {
  19. + .start = I2S_BASE,
  20. + .end = I2S_BASE + 0x20,
  21. + .flags = IORESOURCE_MEM,
  22. + },
  23. + {
  24. + .start = PCM_CLOCK_BASE,
  25. + .end = PCM_CLOCK_BASE + 0x02,
  26. + .flags = IORESOURCE_MEM,
  27. + }
  28. +};
  29. +
  30. +static struct platform_device bcm2708_i2s_device = {
  31. + .name = "bcm2708-i2s",
  32. + .id = 0,
  33. + .num_resources = ARRAY_SIZE(bcm2708_i2s_resources),
  34. + .resource = bcm2708_i2s_resources,
  35. +};
  36. +#endif
  37. +
  38. int __init bcm_register_device(struct platform_device *pdev)
  39. {
  40. int ret;
  41. @@ -707,6 +729,10 @@ void __init bcm2708_init(void)
  42. bcm_register_device(&bcm2835_hwmon_device);
  43. bcm_register_device(&bcm2835_thermal_device);
  44. +#ifdef CONFIG_SND_BCM2708_SOC_I2S_MODULE
  45. + bcm_register_device(&bcm2708_i2s_device);
  46. +#endif
  47. +
  48. for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
  49. struct amba_device *d = amba_devs[i];
  50. amba_device_register(d, &iomem_resource);