diff --git a/projects/RPi/patches/linux/linux-01-RPi_support.patch b/projects/RPi/patches/linux/linux-01-RPi_support.patch index 0aaf8b0754..e772d6d83d 100644 --- a/projects/RPi/patches/linux/linux-01-RPi_support.patch +++ b/projects/RPi/patches/linux/linux-01-RPi_support.patch @@ -1,7 +1,7 @@ -From 4fe53f9ca5b713d51f041b15feded0457ee9558c Mon Sep 17 00:00:00 2001 +From 3f9d0e25e0126c5a3ea2f0b85fd2aa61bb9886ac Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 01/75] Main bcm2708 linux port +Subject: [PATCH 01/85] Main bcm2708 linux port Signed-off-by: popcornmix --- @@ -5117,10 +5117,10 @@ index 09ebe57..582ce64 100644 unsigned int version; /* SDHCI spec. version */ -From 0d851420004cde4e4c8ccc87114430039c045b5b Mon Sep 17 00:00:00 2001 +From 4d7d7302e9333650bd4ac59692f361067c10e13c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 Oct 2014 18:50:05 +0100 -Subject: [PATCH 02/75] Add bcm2708_gpio driver +Subject: [PATCH 02/85] Add bcm2708_gpio driver Signed-off-by: popcornmix @@ -5679,10 +5679,10 @@ index 0000000..fb69624 + +#endif -From 7038959090d687675693f26f689b26dffc5a6407 Mon Sep 17 00:00:00 2001 +From f50f6699ab27d5ebc8eb43157b865724a959738e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 7 May 2013 22:20:24 +0100 -Subject: [PATCH 03/75] Add quick config. +Subject: [PATCH 03/85] Add quick config. This is designed for quick compiling when developing. No modules are needed and it includes all Pi specific drivers @@ -5895,10 +5895,10 @@ index 0000000..e5efe75 +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -From dcd393b7cb7507b582760279cfae114c1a5e9753 Mon Sep 17 00:00:00 2001 +From 1dfc4e8ed08d3640d33e19bb0c81e53592e5ed0b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 04/75] Add dwc_otg driver +Subject: [PATCH 04/85] Add dwc_otg driver Signed-off-by: popcornmix @@ -63008,10 +63008,10 @@ index 0000000..cdc9963 +test_main(); +0; -From ce5cf212d83ac13d764310d1e72fbcdc52cc1648 Mon Sep 17 00:00:00 2001 +From 4cff0d469419dac3318e9255fb0a004be146b59d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:54:32 +0100 -Subject: [PATCH 05/75] bcm2708 watchdog driver +Subject: [PATCH 05/85] bcm2708 watchdog driver Signed-off-by: popcornmix --- @@ -63439,10 +63439,10 @@ index 0000000..8a27d68 +MODULE_ALIAS_MISCDEV(TEMP_MINOR); +MODULE_LICENSE("GPL"); -From 1e9cee67cdb41ebeaf4a9008d446fbe3d71da51e Mon Sep 17 00:00:00 2001 +From 3a1e67ec12ad0ae855b911ae46ed894ec818c965 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:55:09 +0100 -Subject: [PATCH 06/75] bcm2708 framebuffer driver +Subject: [PATCH 06/85] bcm2708 framebuffer driver Signed-off-by: popcornmix --- @@ -66486,10 +66486,10 @@ index 3c14e43..7626beb 100644 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 -From d7a279e886a179a9fee83482b77865d5e851e893 Mon Sep 17 00:00:00 2001 +From 8b4a05fc4e5f8ce68ce54d761fbde07f6f70060b Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 07/75] Speed up console framebuffer imageblit function +Subject: [PATCH 07/85] Speed up console framebuffer imageblit function Especially on platforms with a slower CPU but a relatively high framebuffer fill bandwidth, like current ARM devices, the existing @@ -66698,10 +66698,10 @@ index a2bb276..436494f 100644 start_index, pitch_index); } else -From c8b71dd3fb34c2816ea8cd6eac96c90b01eb722b Mon Sep 17 00:00:00 2001 +From 2b79bb11ffa770774c70bd97bbb585fd9d9d367b Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 08/75] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 08/85] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -66794,10 +66794,10 @@ index fb795c3..fa72af0 100644 #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ #define FB_TYPE_PLANES 1 /* Non interleaved planes */ -From 8506b03e6d194b946463a376d055aa7b824babfa Mon Sep 17 00:00:00 2001 +From 18ec38a6f68a4d6a64d904b9230213da3d0412cb Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 16:00:25 +0300 -Subject: [PATCH 09/75] bcm2708_fb: DMA acceleration for fb_copyarea +Subject: [PATCH 09/85] bcm2708_fb: DMA acceleration for fb_copyarea Based on http://www.raspberrypi.org/phpBB3/viewtopic.php?p=62425#p62425 Also used Simon's dmaer_master module as a reference for tweaking DMA @@ -67281,10 +67281,10 @@ index 54cd760..b3b1e04 100644 return 0; -From 369c50110e123ed09ebd0e8ef4ea03ef53e4547b Mon Sep 17 00:00:00 2001 +From 2301368817e7f73dea8d70d554f6d4e8cb4af444 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 2 Jul 2013 23:42:01 +0100 -Subject: [PATCH 10/75] bcm2708 vchiq driver +Subject: [PATCH 10/85] bcm2708 vchiq driver Signed-off-by: popcornmix @@ -80233,10 +80233,10 @@ index 0000000..b6bfa21 + return vchiq_build_time; +} -From 428639192dc1d834759b2dbe83f49d239e0809d1 Mon Sep 17 00:00:00 2001 +From e077fadaca28a7721f64b960417188ef18d661cb Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 12 May 2014 15:12:02 +0100 -Subject: [PATCH 11/75] vchiq: Avoid high load when blocked and unkillable +Subject: [PATCH 11/85] vchiq: Avoid high load when blocked and unkillable vchiq: Include SIGSTOP and SIGCONT in list of signals not-masked by vchiq to allow gdb to work --- @@ -80398,10 +80398,10 @@ index c2eefef..05e7979 100644 static inline int is_pow2(int i) { -From 6acbf92bed748699e796c3b48853c1a09bd6b24e Mon Sep 17 00:00:00 2001 +From 72104bc86e66984eb92bd869c416f261178dff42 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:31:47 +0100 -Subject: [PATCH 12/75] cma: Add vc_cma driver to enable use of CMA +Subject: [PATCH 12/85] cma: Add vc_cma driver to enable use of CMA Signed-off-by: popcornmix --- @@ -81690,10 +81690,10 @@ index 0000000..5325832 + +#endif /* VC_CMA_H */ -From dbf847fa1f99bff29472ab94808664d61493a719 Mon Sep 17 00:00:00 2001 +From 7b018b9c0d1ee9a723ab35b43686f52244159e8a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 26 Mar 2012 22:15:50 +0100 -Subject: [PATCH 13/75] bcm2708: alsa sound driver +Subject: [PATCH 13/85] bcm2708: alsa sound driver Signed-off-by: popcornmix @@ -84456,10 +84456,10 @@ index 0000000..af3e6eb + +#endif // _VC_AUDIO_DEFS_H_ -From 52dffac914a2f0997a043c3237d05e29cb67c6ac Mon Sep 17 00:00:00 2001 +From e1910d2b2eccadb15f87a9be2fe4f563cb019807 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:51:55 +0100 -Subject: [PATCH 14/75] Add hwrng (hardware random number generator) driver +Subject: [PATCH 14/85] Add hwrng (hardware random number generator) driver --- drivers/char/hw_random/Kconfig | 11 ++++ @@ -84625,10 +84625,10 @@ index 0000000..340f004 +MODULE_DESCRIPTION("BCM2708 H/W Random Number Generator (RNG) driver"); +MODULE_LICENSE("GPL and additional rights"); -From f4b24bd19aba7302123f39e6cc5248dc510df837 Mon Sep 17 00:00:00 2001 +From 267c8aac187046e859fd3be6310cf736d65998ba Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 15/75] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 15/85] lirc: added support for RaspberryPi GPIO lirc_rpi: Use read_current_timer to determine transmitter delay. Thanks to jjmz and others See: https://github.com/raspberrypi/linux/issues/525 @@ -85376,10 +85376,10 @@ index 0000000..887c36b +module_param(debug, bool, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(debug, "Enable debugging messages"); -From 9465de12c0d9d48c5a3d8c53eb576241531172ca Mon Sep 17 00:00:00 2001 +From ce4bb1169a4f9595f62419909db35bbbecbae6cc Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 16/75] Add cpufreq driver +Subject: [PATCH 16/85] Add cpufreq driver --- arch/arm/Kconfig | 1 + @@ -85663,10 +85663,10 @@ index 0000000..447ca09 +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); -From 29cfbd9b562af9acaa68e204f6fc18252739f0a3 Mon Sep 17 00:00:00 2001 +From 76818e22a335924537255aeecf2086380409ca6f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 19:24:24 +0000 -Subject: [PATCH 17/75] Added hwmon/thermal driver for reporting core +Subject: [PATCH 17/85] Added hwmon/thermal driver for reporting core temperature. Thanks Dorian --- @@ -86188,10 +86188,10 @@ index 0000000..85fceb5 + +module_platform_driver(bcm2835_thermal_driver); -From 7a97f41653100174617e830e221a7aa9a0d187bb Mon Sep 17 00:00:00 2001 +From 4ef49180615c2586ebc76944c241b213be7fea3d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 18/75] Allow mac address to be set in smsc95xx +Subject: [PATCH 18/85] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -86282,10 +86282,10 @@ index d07bf4c..5ae60ab 100644 if (smsc95xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN, dev->net->dev_addr) == 0) { -From fe8743f06f96ec0033ad4c7190bf49bbbaa83eab Mon Sep 17 00:00:00 2001 +From 226412aa56c7e3fadf70b7fd574b34c1dbae992d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 4 Nov 2013 18:56:10 +0000 -Subject: [PATCH 19/75] Add Chris Boot's i2c and spi drivers. +Subject: [PATCH 19/85] Add Chris Boot's i2c and spi drivers. i2c-bcm2708: fixed baudrate @@ -87631,10 +87631,10 @@ index 0000000..b04a57d +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); -From 83242b9532f32e25d905e4b7b61843c4990932e1 Mon Sep 17 00:00:00 2001 +From f2fd6383f6e7d865d7389b0ce9bc128c42e2ea3f Mon Sep 17 00:00:00 2001 From: cbeytas Date: Mon, 24 Jun 2013 00:05:40 -0400 -Subject: [PATCH 20/75] Perform I2C combined transactions when possible +Subject: [PATCH 20/85] Perform I2C combined transactions when possible Perform I2C combined transactions whenever possible, within the restrictions of the Broadcomm Serial Controller. @@ -87706,10 +87706,10 @@ index f266f10..8750634 100644 } -From 4c2fee5cea0357eef0056cd0437f4e272ae34a7b Mon Sep 17 00:00:00 2001 +From c87252c0008afd21485fffadd424c6d8996e9982 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 21/75] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 21/85] enabling the realtime clock 1-wire chip DS1307 and 1-wire on GPIO4 (as a module) 1-wire: Add support for configuring pin for w1-gpio kernel module @@ -87981,10 +87981,10 @@ index 2820924..fd0550f 100644 } } -From 7571405e18f8e009a38d69ba35f9a411ba639177 Mon Sep 17 00:00:00 2001 +From aae454d664b51f8236558bf366f8d768cb0e5378 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 12 Apr 2013 23:58:47 +0100 -Subject: [PATCH 23/75] config: add missing options from 3.6.y kernel +Subject: [PATCH 23/85] config: add missing options from 3.6.y kernel --- arch/arm/configs/bcmrpi_defconfig | 652 ++++++++++++++++++++++++++++++++++++-- @@ -88913,10 +88913,10 @@ index 6d2eae1..466f627 100644 # CONFIG_CRYPTO_HW is not set CONFIG_CRC_ITU_T=y -From 2b35f09e473e5c52b65998e851dad098dc6a4eb9 Mon Sep 17 00:00:00 2001 +From 14578c4748ce15200ab3753e8d1561c281e24150 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Dec 2013 22:16:19 +0000 -Subject: [PATCH 24/75] config: Enable CONFIG_MEMCG, but leave it disabled (due +Subject: [PATCH 24/85] config: Enable CONFIG_MEMCG, but leave it disabled (due to memory cost). Enable with cgroup_enable=memory. --- @@ -88984,10 +88984,10 @@ index 48914e1..a08d374 100644 #ifdef CONFIG_MEMCG_SWAP -From 6316c216f9852f64f8e98cb9287c506364136756 Mon Sep 17 00:00:00 2001 +From c714150df574bae70439ead28fc85cc4e18b3989 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:46:42 +0100 -Subject: [PATCH 25/75] Add FIQ patch to dwc_otg driver. Enable with +Subject: [PATCH 25/85] Add FIQ patch to dwc_otg driver. Enable with dwc_otg.fiq_fix_enable=1. Should give about 10% more ARM performance. Thanks to Gordon and Costas @@ -92283,10 +92283,10 @@ index 1b1f83c..c8590b5 100644 if (status.b.sr) { -From d89ac95cee70b8719d60c2be11a0026ccd30fd02 Mon Sep 17 00:00:00 2001 +From 603ee522844ec5629f6521661f1cc1732cbfcfc9 Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 19 Mar 2014 12:58:23 +0000 -Subject: [PATCH 26/75] dwc_otg: fiq_fsm: Base commit for driver rewrite +Subject: [PATCH 26/85] dwc_otg: fiq_fsm: Base commit for driver rewrite This commit removes the previous FIQ fixes entirely and adds fiq_fsm. @@ -97182,10 +97182,10 @@ index 5d310df..4b32941 100644 return -EBUSY; } -From 347223c963085f3d4455f909419ccc6bd051a64d Mon Sep 17 00:00:00 2001 +From 30a38190160af1f8bf6ef53c49a14c62f1cb6da2 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 30 Jan 2013 12:45:18 +0000 -Subject: [PATCH 27/75] bcm2835: add v4l2 camera device +Subject: [PATCH 27/85] bcm2835: add v4l2 camera device - Supports raw YUV capture, preview, JPEG and H264. - Uses videobuf2 for data transfer, using dma_buf. @@ -103168,10 +103168,10 @@ index 0000000..9d1d11e + +#endif /* MMAL_VCHIQ_H */ -From 1de67d38506b477f164743842f7927c128500c7b Mon Sep 17 00:00:00 2001 +From 0325980b281b917f4b32120f1e4adaa48f419d72 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 10:58:01 +0000 -Subject: [PATCH 28/75] V4L2: Fixes from 6by9 +Subject: [PATCH 28/85] V4L2: Fixes from 6by9 V4L2: Fix EV values. Add manual shutter speed control @@ -105543,10 +105543,10 @@ index a06fb44..76f249e 100644 release_msg: -From 5c2b1340075b74bcb86d6796d8aa9a3d5896a839 Mon Sep 17 00:00:00 2001 +From f528dc1943dbcec6f0b94f7fcc0de8b1a4a29e46 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 29/75] dmaengine: Add support for BCM2708 +Subject: [PATCH 29/85] dmaengine: Add support for BCM2708 Add support for DMA controller of BCM2708 as used in the Raspberry Pi. Currently it only supports cyclic DMA. @@ -106672,10 +106672,10 @@ index 0000000..6766799 +MODULE_AUTHOR("Gellert Weisz "); +MODULE_LICENSE("GPL v2"); -From f5c2e20a19be6da6e3e0fb04b2fb97df9f4735ff Mon Sep 17 00:00:00 2001 +From f2ab97a3caa7ff4e2f1ce7772ff8cbddf0156cec Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:33:38 +0100 -Subject: [PATCH 30/75] ASoC: Add support for BCM2708 +Subject: [PATCH 30/85] ASoC: Add support for BCM2708 This driver adds support for digital audio (I2S) for the BCM2708 SoC that is used by the @@ -107670,10 +107670,10 @@ index 0000000..ebaf3d6 +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From 446c9a10ec6535bc974e857b303894d12c050ac6 Mon Sep 17 00:00:00 2001 +From 2b0172e7a1a7730514a556e7e116fae965c251cc Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:59:51 +0100 -Subject: [PATCH 31/75] ASoC: Add support for PCM5102A codec +Subject: [PATCH 31/85] ASoC: Add support for PCM5102A codec Some definitions to support the PCM5102A codec by Texas Instruments. @@ -107798,10 +107798,10 @@ index 0000000..126f1e9 +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From 101d28313886131efab6aa5d11092d36138ef268 Mon Sep 17 00:00:00 2001 +From 2a656e16608034df4967d2ff1c9102f59a95a501 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:04:54 +0100 -Subject: [PATCH 32/75] BCM2708: Add I2S support to board file +Subject: [PATCH 32/85] BCM2708: Add I2S support to board file Adds the required initializations for I2S to the board file of mach-bcm2708. @@ -107856,10 +107856,10 @@ index a740344..dca28ad 100644 struct amba_device *d = amba_devs[i]; amba_device_register(d, &iomem_resource); -From 0f7e23c04d61f895a20a57dcb85ccf0be0c0de33 Mon Sep 17 00:00:00 2001 +From ae7d450463f95ac738091c8e17058c6ed49e9183 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 -Subject: [PATCH 33/75] ASoC: Add support for HifiBerry DAC +Subject: [PATCH 33/85] ASoC: Add support for HifiBerry DAC This adds a machine driver for the HifiBerry DAC. It is a sound card that can @@ -108008,10 +108008,10 @@ index 0000000..4b70b45 +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); -From 55b28e5834b0d34bb1306d1523a6ccd5b08dccfa Mon Sep 17 00:00:00 2001 +From 5ead861fe0d6aaa7b623135984832c440a5449d6 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:21:34 +0100 -Subject: [PATCH 34/75] BCM2708: Add HifiBerry DAC to board file +Subject: [PATCH 34/85] BCM2708: Add HifiBerry DAC to board file This adds the initalization of the HifiBerry DAC to the mach-bcm2708 board file. @@ -108059,10 +108059,10 @@ index dca28ad..50d4991 100644 struct amba_device *d = amba_devs[i]; amba_device_register(d, &iomem_resource); -From 2661276b8e854d7726b27dbb947354f27644a5c7 Mon Sep 17 00:00:00 2001 +From 912d59f23a050a66c56f28b621b91ff8a48a5071 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 6 Dec 2013 18:55:53 +0100 -Subject: [PATCH 35/75] ASoC: BCM2708: Add 24 bit support +Subject: [PATCH 35/85] ASoC: BCM2708: Add 24 bit support This adds 24 bit support to the I2S driver of the BCM2708. Besides enabling the 24 bit flags, it includes two bug fixes: @@ -108134,10 +108134,10 @@ index ebaf3d6..a179216 100644 .period_bytes_min = 32, .period_bytes_max = 64 * PAGE_SIZE, -From 79d9fbe91601ac7bc3d74d765abadfd09ec71f60 Mon Sep 17 00:00:00 2001 +From 260917b5b5b1d0081265da5fa3cb20d01299ba20 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 13 Sep 2014 10:52:04 +0100 -Subject: [PATCH 36/75] bcm2708-i2s: Update bclk_ratio to more correct values +Subject: [PATCH 36/85] bcm2708-i2s: Update bclk_ratio to more correct values --- sound/soc/bcm/bcm2708-i2s.c | 6 +++--- @@ -108167,10 +108167,10 @@ index a179216..fd50e2d 100644 default: return -EINVAL; -From eb72335bc036d051d4a5ed8fb08b1107c97a7cfe Mon Sep 17 00:00:00 2001 +From 6cf4b38303e0a8ad72ca2ff7b33ae928b8a87ead Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 2 Dec 2013 20:28:22 +0100 -Subject: [PATCH 37/75] BCM2708: Add I2S and DMA support to default config +Subject: [PATCH 37/85] BCM2708: Add I2S and DMA support to default config This commit adds several modules that are needed for I2S support for the Raspberry Pi to the defconfig. @@ -108205,10 +108205,10 @@ index 1f14e0c..e0e624a 100644 CONFIG_UIO_PDRV_GENIRQ=m CONFIG_STAGING=y -From 11818c82e427212641659cd58f4d07591aae3d68 Mon Sep 17 00:00:00 2001 +From 3944c2c0a139ec22f106857f00b063395f5f2983 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 6 Dec 2013 20:50:28 +0100 -Subject: [PATCH 38/75] ASoC: BCM2708: Add support for RPi-DAC +Subject: [PATCH 38/85] ASoC: BCM2708: Add support for RPi-DAC This adds a machine driver for the RPi-DAC. @@ -108516,10 +108516,10 @@ index 0000000..b4eaa44 +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From 4fc0e149a671e72731d2eab61cd48a7b4d175afb Mon Sep 17 00:00:00 2001 +From 7399d181c1fc80766b52569c754807f23da3e879 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 -Subject: [PATCH 39/75] ASoC: wm8804: Implement MCLK configuration options, add +Subject: [PATCH 39/85] ASoC: wm8804: Implement MCLK configuration options, add 32bit support WM8804 can run with PLL frequencies of 256xfs and 128xfs for most sample rates. At 192kHz only 128xfs is supported. The existing driver selects 128xfs automatically for some lower samples rates. By using an @@ -108559,10 +108559,10 @@ index 0ea01df..4724553 100644 #define WM8804_RATES (SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \ SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_64000 | \ -From e2d3aeedd98bb9f5fc3506dc1225096aec6ef5c0 Mon Sep 17 00:00:00 2001 +From d8c46fb50046c4c2b372c7f5f8a7192bd4e0cfdf Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 -Subject: [PATCH 40/75] ASoC: BCM:Add support for HiFiBerry Digi. Driver is +Subject: [PATCH 40/85] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patched WM8804 driver. Signed-off-by: Daniel Matuschek @@ -108765,10 +108765,10 @@ index 0000000..e4f769d +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); -From cffec0d9d86c3a8a7940ca11ffcc9898b003007e Mon Sep 17 00:00:00 2001 +From 17e1d65f5031e992500e8709a0ebfe02fdbb7315 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:26:08 +0100 -Subject: [PATCH 41/75] BCM2708: Added support for HiFiBerry Digi board Board +Subject: [PATCH 41/85] BCM2708: Added support for HiFiBerry Digi board Board initalization by I2C Signed-off-by: Daniel Matuschek @@ -108815,10 +108815,10 @@ index 100c223..a57cb85 100644 bcm_register_device(&snd_rpi_dac_device); bcm_register_device(&snd_pcm1794a_codec_device); -From fc829d16ed5df5d58d604b5b04159c05022f1119 Mon Sep 17 00:00:00 2001 +From 703325995418f6f96f89920920454339b11e0871 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:27:28 +0100 -Subject: [PATCH 42/75] BCM2708: Added HiFiBerry Digi configuration option It +Subject: [PATCH 42/85] BCM2708: Added HiFiBerry Digi configuration option It will be compiled as a module by default. This also includes the WM8804 driver. @@ -108840,10 +108840,10 @@ index 063a443..8eda3b4 100644 CONFIG_SND_SIMPLE_CARD=m CONFIG_SOUND_PRIME=m -From 291a5f19be7bf84557bee5273f94045e30ac5f95 Mon Sep 17 00:00:00 2001 +From 15b3981599b5f5f14d8c2e6052612a71b64f9507 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:36:35 +0100 -Subject: [PATCH 43/75] ASoC: wm8804: Set idle_bias_off to false Idle bias has +Subject: [PATCH 43/85] ASoC: wm8804: Set idle_bias_off to false Idle bias has been change to remove warning on driver startup Signed-off-by: Daniel Matuschek @@ -108865,10 +108865,10 @@ index 4724553..5d4140e 100644 .controls = wm8804_snd_controls, .num_controls = ARRAY_SIZE(wm8804_snd_controls), -From b9c673b343064ff8f627f60c35a21d1e3a59fa45 Mon Sep 17 00:00:00 2001 +From 4a086facd159ef13d6a3ee6d0fe1440a6e9d8616 Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 -Subject: [PATCH 44/75] Add IQaudIO Sound Card support for Raspberry Pi +Subject: [PATCH 44/85] Add IQaudIO Sound Card support for Raspberry Pi --- arch/arm/configs/bcmrpi_defconfig | 1 + @@ -109078,10 +109078,10 @@ index 0000000..8d0e2ae +MODULE_DESCRIPTION("ASoC Driver for IQAudio DAC"); +MODULE_LICENSE("GPL v2"); -From 4c16f2bd97e410e29cb56c06a84c199eccb3702c Mon Sep 17 00:00:00 2001 +From 7bab98bf08eeee4e3e01e1485cef096525397b7a Mon Sep 17 00:00:00 2001 From: Howard Mitchell Date: Wed, 30 Jul 2014 21:43:37 +0100 -Subject: [PATCH 45/75] soc-core: Fix volsw_range funcs so +Subject: [PATCH 45/85] soc-core: Fix volsw_range funcs so SOC_DOUBLE_R_RANGE_TLV works. This is so that the correct range of values as specified @@ -109155,10 +109155,10 @@ index a3e0a0d..ca4aa5a 100644 return 0; -From e3cb8a508ff16cfc2abda9d8723b1066323ee36b Mon Sep 17 00:00:00 2001 +From 3d7bdfb72a894940cf3d03ae5212446df73e4aa9 Mon Sep 17 00:00:00 2001 From: Howard Mitchell Date: Fri, 28 Mar 2014 16:40:31 +0000 -Subject: [PATCH 46/75] pcm512x: Use a range macro for Volume and rename to +Subject: [PATCH 46/85] pcm512x: Use a range macro for Volume and rename to PCM. This allows limiting the output gain to avoid clipping in the @@ -109183,10 +109183,10 @@ index 0c8aefa..8252e6d 100644 PCM512x_LAGN_SHIFT, PCM512x_RAGN_SHIFT, 1, 1, analog_tlv), SOC_DOUBLE_TLV("Playback Boost Volume", PCM512x_ANALOG_GAIN_BOOST, -From c7b0ef5fce7e4ca77bb661a041d63c417704f045 Mon Sep 17 00:00:00 2001 +From 29b46fbb7c322c09e2c7673fd79e84dde733e487 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Fri, 2 May 2014 16:13:59 +0100 -Subject: [PATCH 47/75] Move GPIO setup to hw_params. +Subject: [PATCH 47/85] Move GPIO setup to hw_params. This is used to stop the I2S driver from breaking the GPIO setup for other uses of the PCM interface @@ -109282,10 +109282,10 @@ index fd50e2d..0c20d4d 100644 dev->clk_regmap = regmap[1]; -From 52e30e64e8201d603161fba86f31e65d8cc71de2 Mon Sep 17 00:00:00 2001 +From b61fb2d19eececf7ef2e6abe1b79e803d4231cb5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Jun 2014 13:42:01 +0100 -Subject: [PATCH 48/75] vmstat: Workaround for issue where dirty page count +Subject: [PATCH 48/85] vmstat: Workaround for issue where dirty page count goes negative See: @@ -109312,10 +109312,10 @@ index 82e7db7..f87d16d 100644 static inline void __inc_zone_page_state(struct page *page, -From 6d952d23b41b90cd66358af0f2c4c0bbcb7d57bb Mon Sep 17 00:00:00 2001 +From c9cdaae8baeb54e81f5e9bff701bd4f6e1288417 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 20 Jun 2014 16:03:12 +0100 -Subject: [PATCH 49/75] dwc_otg: Fix various issues with root port and +Subject: [PATCH 49/85] dwc_otg: Fix various issues with root port and transaction errors Process the host port interrupts correctly (and don't trample them). @@ -109385,10 +109385,10 @@ index d3e2035..6182d3e 100644 fiq_print(FIQDBG_ERR, dwc_otg_hcd->fiq_state, "RESET "); } -From a11f3b2aefbe9dc73115ec0ebd8607daa97e8e34 Mon Sep 17 00:00:00 2001 +From ea6bdb2639b8792cd8f1ba0181346505687f1f4a Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 20 Jun 2014 17:23:20 +0100 -Subject: [PATCH 50/75] fiq_fsm: Implement hack for Split Interrupt +Subject: [PATCH 50/85] fiq_fsm: Implement hack for Split Interrupt transactions Hubs aren't too picky about which endpoint we send Control type split @@ -109474,10 +109474,10 @@ index ebc3553..c39ef31 100644 break; } -From d60e93b9fb24905801d8f13715121fc42cd00f4a Mon Sep 17 00:00:00 2001 +From 42b73143eab53b295ed1609687f826fcba1956f8 Mon Sep 17 00:00:00 2001 From: notro Date: Sun, 6 Jul 2014 12:07:25 +0200 -Subject: [PATCH 51/75] spi-bcm2708: Prepare for Common Clock Framework +Subject: [PATCH 51/85] spi-bcm2708: Prepare for Common Clock Framework migration As part of migrating to use the Common Clock Framework, replace clk_enable() @@ -109522,10 +109522,10 @@ index b04a57d..349d21f 100644 free_irq(bs->irq, master); iounmap(bs->base); -From 610438da84b924a4d122f2b1055410c5409d6fb3 Mon Sep 17 00:00:00 2001 +From 8bd2f4021ea5668ccd7938dfc2dfc277edd4d178 Mon Sep 17 00:00:00 2001 From: notro Date: Sun, 6 Jul 2014 12:09:30 +0200 -Subject: [PATCH 52/75] BCM2708: Migrate to the Common Clock Framework +Subject: [PATCH 52/85] BCM2708: Migrate to the Common Clock Framework As part of moving towards using Device Tree, the Common Clock Framework has to be used instead of the BCM2708 clock implementation. @@ -109795,10 +109795,10 @@ index 5f9d725..0000000 - unsigned long rate; -}; -From 208dc05f8086d3cc9fe4a8db49d29e035f0b20ff Mon Sep 17 00:00:00 2001 +From eeaebcf0a3463b0eb2daceb76e8e20481f94778c Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:46:08 +0200 -Subject: [PATCH 53/75] BCM2708: Add core Device Tree support +Subject: [PATCH 53/85] BCM2708: Add core Device Tree support Add the bare minimum needed to boot BCM2708 from a Device Tree. @@ -109955,10 +109955,10 @@ index ef12cb8..747e27a 100644 module_param(boardrev, uint, 0644); -From e2246f08fa46cf56a6e64e360788d9d3b5fb01d4 Mon Sep 17 00:00:00 2001 +From a2c9e0f2e0dabdf977824849d125af42f2afc9f4 Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:47:48 +0200 -Subject: [PATCH 54/75] BCM2708: armctrl: Add IRQ Device Tree support +Subject: [PATCH 54/85] BCM2708: armctrl: Add IRQ Device Tree support Add Device Tree IRQ support for BCM2708. Usage is the same as for irq-bcm2835. @@ -110122,10 +110122,10 @@ index d4c5333..42f5e1c 100644 return 0; } -From 13b4e3f5032fb1250b3e4409805664a6d3d10c99 Mon Sep 17 00:00:00 2001 +From 912a2f5ef4fbb8e19dcf64c8d3c6370bc81ebfb1 Mon Sep 17 00:00:00 2001 From: notro Date: Thu, 10 Jul 2014 13:59:47 +0200 -Subject: [PATCH 55/75] pinctrl: add bcm2708 driver +Subject: [PATCH 55/85] pinctrl: add bcm2708 driver This driver is a verbatim copy of the pinctrl-bcm2835 driver, except for: * changed 2835 to 2708 @@ -110988,10 +110988,10 @@ index 0000000..40d9c86 +MODULE_DESCRIPTION("BCM2708 Pin control driver"); +MODULE_LICENSE("GPL"); -From e12f2ee5973af39a6a1cbfda304259594b8f0d71 Mon Sep 17 00:00:00 2001 +From fc54f7e8bfce1b9ef4510bf36cde6dd92444707e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 14 Jul 2014 22:02:09 +0100 -Subject: [PATCH 56/75] hid: Reduce default mouse polling interval to 60Hz +Subject: [PATCH 56/85] hid: Reduce default mouse polling interval to 60Hz Reduces overhead when using X --- @@ -111027,10 +111027,10 @@ index ddd547a..520d3cd 100644 ret = -ENOMEM; if (usb_endpoint_dir_in(endpoint)) { -From 5df0b672a5af05e05c9ab6e5b12576b8267b7af9 Mon Sep 17 00:00:00 2001 +From 376fe2d101db7f495a0d323babb1a618dca74e49 Mon Sep 17 00:00:00 2001 From: notro Date: Fri, 18 Jul 2014 18:15:57 +0200 -Subject: [PATCH 57/75] BCM2708: DT: change 'axi' nodename to 'soc' +Subject: [PATCH 57/85] BCM2708: DT: change 'axi' nodename to 'soc' Change DT node named 'axi' to 'soc' so it matches ARCH_BCM2835. The VC4 bootloader fills in certain properties in the 'axi' subtree, @@ -111055,10 +111055,10 @@ index 3f884b3..e02e67b 100644 #address-cells = <1>; #size-cells = <1>; -From 17196df38363705e01e710c51fb802cc552723d2 Mon Sep 17 00:00:00 2001 +From 775484a701f6a13dae3a59457ae629590bc5931d Mon Sep 17 00:00:00 2001 From: notro Date: Sun, 27 Jul 2014 20:12:58 +0200 -Subject: [PATCH 58/75] spi: bcm2708: add device tree support +Subject: [PATCH 58/85] spi: bcm2708: add device tree support Add DT support to driver and add to .dtsi file. Setup pins and spidev in .dts file. @@ -111177,10 +111177,10 @@ index 349d21f..041b5e2 100644 .probe = bcm2708_spi_probe, .remove = bcm2708_spi_remove, -From 5e5aa944c8f9270a4f155485c2be4b456e83036b Mon Sep 17 00:00:00 2001 +From 8f69a3e8043d531ebd88c4277ed271ae91346a86 Mon Sep 17 00:00:00 2001 From: notro Date: Sun, 27 Jul 2014 20:13:44 +0200 -Subject: [PATCH 59/75] BCM2708: don't register SPI controller when using DT +Subject: [PATCH 59/85] BCM2708: don't register SPI controller when using DT The device for the SPI controller is in the Device Tree. Only register the device when not using DT. @@ -111251,10 +111251,10 @@ index 747e27a..0434cbf 100644 bcm_register_device(&bcm2708_bsc1_device); -From e7fde6afce8b8d504af6868ccbb05df254f56e15 Mon Sep 17 00:00:00 2001 +From d4ddab7cf30cac949419cc3c069f88687d9f563c Mon Sep 17 00:00:00 2001 From: notro Date: Sun, 27 Jul 2014 20:14:05 +0200 -Subject: [PATCH 60/75] spi: bcm2835: make driver available on ARCH_BCM2708 +Subject: [PATCH 60/85] spi: bcm2835: make driver available on ARCH_BCM2708 Make this driver available on ARCH_BCM2708 @@ -111277,10 +111277,10 @@ index 6a7943c..6600723 100644 This selects a driver for the Broadcom BCM2835 SPI master. -From 16403bdf7afe8459faec471b08dfcca8ab228fa3 Mon Sep 17 00:00:00 2001 +From f32dc90cc3844d88d1401b633cdf5f4eea1baeda Mon Sep 17 00:00:00 2001 From: notro Date: Tue, 29 Jul 2014 11:04:49 +0200 -Subject: [PATCH 61/75] i2c: bcm2708: add device tree support +Subject: [PATCH 61/85] i2c: bcm2708: add device tree support Add DT support to driver and add to .dtsi file. Setup pins in .dts file. @@ -111445,10 +111445,10 @@ index 8750634..728cb69 100644 .probe = bcm2708_i2c_probe, .remove = bcm2708_i2c_remove, -From c1d1b97b7270b03db96048121b6f989afe78c268 Mon Sep 17 00:00:00 2001 +From c6d157232cd293f4a4c7abe537abd08db19e2a06 Mon Sep 17 00:00:00 2001 From: notro Date: Tue, 29 Jul 2014 11:05:18 +0200 -Subject: [PATCH 62/75] bcm2708: don't register i2c controllers when using DT +Subject: [PATCH 62/85] bcm2708: don't register i2c controllers when using DT The devices for the i2c controllers are in the Device Tree. Only register devices when not using DT. @@ -111490,10 +111490,10 @@ index 0434cbf..902f8c7 100644 bcm_register_device(&bcm2835_hwmon_device); bcm_register_device(&bcm2835_thermal_device); -From ffc6031184bbe108b836d9b9bead75b46dfa7058 Mon Sep 17 00:00:00 2001 +From 0ba503da79da1409e14be79fbe82f15f7df65c0d Mon Sep 17 00:00:00 2001 From: notro Date: Tue, 29 Jul 2014 11:05:39 +0200 -Subject: [PATCH 63/75] i2c: bcm2835: make driver available on ARCH_BCM2708 +Subject: [PATCH 63/85] i2c: bcm2835: make driver available on ARCH_BCM2708 Make this driver available on ARCH_BCM2708 @@ -111516,10 +111516,10 @@ index d8f8e2a..5f62d88 100644 If you say yes to this option, support will be included for the BCM2835 I2C controller. -From 8db9979410fee163e87848beeb7a5a33654d0f9d Mon Sep 17 00:00:00 2001 +From d3f307319327721fd728d2c821362188d11fbd3a Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Fri, 25 Jul 2014 07:08:09 +0200 -Subject: [PATCH 64/75] Configure GPIOs for I2S based on revision/card settings +Subject: [PATCH 64/85] Configure GPIOs for I2S based on revision/card settings With RPi model B+, assignment of the I2S GPIO pins has changed. This patch uses the board revision to auto-detect the GPIOs used @@ -111704,10 +111704,10 @@ index 0000000..94fed6a + +#endif -From 28a03922a09d2a49d731c9db1125a4f893a06af0 Mon Sep 17 00:00:00 2001 +From 80d70c48c0727b15a60fbc92aa90ce4bbf8bfefb Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 24 Jul 2014 21:24:03 +0100 -Subject: [PATCH 65/75] usb: core: make overcurrent messages more prominent +Subject: [PATCH 65/85] usb: core: make overcurrent messages more prominent Hub overcurrent messages are more serious than "debug". Increase loglevel. --- @@ -111728,10 +111728,10 @@ index 674c262..b1ac9e0 100644 USB_PORT_FEAT_C_OVER_CURRENT); msleep(100); /* Cool down */ -From 5a7ca6112aff23d56ffa7ed0e9bc5c46a4516516 Mon Sep 17 00:00:00 2001 +From e5eb2b3e634fecc8da084770ee39e846227dd25b Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Tue, 22 Jul 2014 15:41:04 +0100 -Subject: [PATCH 66/75] vcsm: VideoCore shared memory service for BCM2835 +Subject: [PATCH 66/85] vcsm: VideoCore shared memory service for BCM2835 Add experimental support for the VideoCore shared memory service. This allows user processes to allocate memory from VideoCore's @@ -116064,10 +116064,10 @@ index 0000000..da1c523 +MODULE_DESCRIPTION("VideoCore SharedMemory Driver"); +MODULE_LICENSE("GPL v2"); -From c75ced6a4e7ffdb68d8b8d8c4ec41e032aa28429 Mon Sep 17 00:00:00 2001 +From 610a45dd3d133229c9ebfd919a76c205d97cfae4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 7 Aug 2014 02:03:50 +0100 -Subject: [PATCH 67/75] Revert "ARM: dma: Use dma_pfn_offset for dma address +Subject: [PATCH 67/85] Revert "ARM: dma: Use dma_pfn_offset for dma address translation" This reverts commit 6ce0d20016925d031f1e24d64302e4c976d7cec6. @@ -116119,10 +116119,10 @@ index c45b61a..0af6bd0 100644 } -From 02e494ae8855d03b1713692f89b0920be4c7d501 Mon Sep 17 00:00:00 2001 +From b24fa4c8525468be12d4a330f0358f1d625aa17b Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:06 +0100 -Subject: [PATCH 68/75] MMC: added alternative MMC driver +Subject: [PATCH 68/85] MMC: added alternative MMC driver --- arch/arm/configs/bcmrpi_defconfig | 2 + @@ -117819,10 +117819,10 @@ index 0000000..123ff94 +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Gellert Weisz"); -From caffa4d8520f0457e7d5775523173f6fcd2781d2 Mon Sep 17 00:00:00 2001 +From 637af20b7c6fe4637199e4d82a069d525e016bc9 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 10:06:56 +0200 -Subject: [PATCH 69/75] Added support for HiFiBerry DAC+ +Subject: [PATCH 69/85] Added support for HiFiBerry DAC+ The driver is based on the HiFiBerry DAC driver. However HiFiBerry DAC+ uses a different codec chip (PCM5122), therefore a new driver is necessary. @@ -118046,10 +118046,10 @@ index 0000000..c63387b +MODULE_DESCRIPTION("ASoC Driver for HiFiBerry DAC+"); +MODULE_LICENSE("GPL v2"); -From 634f7c0a6afbedd2164fc68f96b8b341cb85a7a3 Mon Sep 17 00:00:00 2001 +From 650940040fba7437a51a934e08c43ad834893f0e Mon Sep 17 00:00:00 2001 From: android Date: Mon, 25 Aug 2014 06:54:19 +0100 -Subject: [PATCH 70/75] bcm2708_fb : Implement blanking support using the +Subject: [PATCH 70/85] bcm2708_fb : Implement blanking support using the mailbox property interface This implementation uses the userspace request style of an array of unsigned @@ -118109,10 +118109,10 @@ index b3b1e04..b25dd5b 100644 const struct fb_fillrect *rect) { -From 30f6ec1de2becb167f4e357343119f4a60943aec Mon Sep 17 00:00:00 2001 +From c2b4ea70177e62965638584c3f1d9479b029ddd3 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 11:09:58 +0200 -Subject: [PATCH 71/75] Added driver for HiFiBerry Amp amplifier add-on board +Subject: [PATCH 71/85] Added driver for HiFiBerry Amp amplifier add-on board The driver contains a low-level hardware driver for the TAS5713 and the drivers for the Raspberry Pi I2S subsystem. @@ -118956,10 +118956,10 @@ index 0000000..8f019e0 + +#endif /* _TAS5713_H */ -From d28d994bd8a6ef4737d4e24c2fd9cfb39606534f Mon Sep 17 00:00:00 2001 +From 9fa3b1276d69fef0d1c398e8a7e538eaa581ec77 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Sep 2014 23:35:44 +0100 -Subject: [PATCH 72/75] bcm2708_fb: Add pan and vsync controls +Subject: [PATCH 72/85] bcm2708_fb: Add pan and vsync controls --- drivers/video/fbdev/bcm2708_fb.c | 56 ++++++++++++++++++++++++++++++++-------- @@ -119071,10 +119071,10 @@ index b25dd5b..32aaaf5 100644 fb->fb.fix.accel = FB_ACCEL_NONE; -From b7c4e811cba742cbb68e0972d98db7d193dd620c Mon Sep 17 00:00:00 2001 +From 426944fa3181a1cb744a7d5b21ba93ca04fc0bbd Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Oct 2014 11:47:53 +0100 -Subject: [PATCH 73/75] Improve __copy_to_user and __copy_from_user performance +Subject: [PATCH 73/85] Improve __copy_to_user and __copy_from_user performance Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. @@ -120597,10 +120597,10 @@ index 3e58d71..0622891 100644 static unsigned long noinline __clear_user_memset(void __user *addr, unsigned long n) -From 27a7bb6e327e5a1e6f6acc802d7d4707df9fe3c5 Mon Sep 17 00:00:00 2001 +From 5e1a1f4fab8fd5a112bd80d0b902034ec00de447 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 15 Oct 2014 11:34:37 +0100 -Subject: [PATCH 74/75] bcm2708: Eliminate i2s debugfs directory error +Subject: [PATCH 74/85] bcm2708: Eliminate i2s debugfs directory error Qualify the two regmap ranges uses by bcm2708-i2s ('-i2s' and '-clk') to avoid the name clash when registering debugfs entries. @@ -120629,10 +120629,10 @@ index 9023984..3fcb740 100644 }; -From 8c9b93e89533f9dceb0284441540e2c8d666d9f1 Mon Sep 17 00:00:00 2001 +From 31c2b855fef5a5a7b5517a8085e8999ef0da2472 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 14 Nov 2014 16:02:26 +0000 -Subject: [PATCH 75/75] config: Remove CONFIG_REGULATOR - we don't have a +Subject: [PATCH 75/85] config: Remove CONFIG_REGULATOR - we don't have a regulator driver --- @@ -120653,3 +120653,1365 @@ index 4a14387..baf7783 100644 CONFIG_MEDIA_SUPPORT=m CONFIG_MEDIA_CAMERA_SUPPORT=y CONFIG_MEDIA_ANALOG_TV_SUPPORT=y + +From bc1b3e1e3cf2223f985779bed7b5b06bb463c0a7 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 22 Oct 2014 09:33:15 +0100 +Subject: [PATCH 76/85] bcm2835-camera: stop_streaming now has a void return + +--- + drivers/media/platform/bcm2835/bcm2835-camera.c | 19 +++++++++---------- + 1 file changed, 9 insertions(+), 10 deletions(-) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 33fa37c..e5a0010 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.c ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.c +@@ -539,7 +539,7 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count) + vchiq_mmal_port_disable(dev->instance, + dev->capture.camera_port); + if (disable_camera(dev) < 0) { +- v4l2_err(&dev->v4l2_dev, "Failed to disable camera"); ++ v4l2_err(&dev->v4l2_dev, "Failed to disable camera\n"); + return -EINVAL; + } + return -1; +@@ -555,7 +555,7 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count) + } + + /* abort streaming and wait for last buffer */ +-static int stop_streaming(struct vb2_queue *vq) ++static void stop_streaming(struct vb2_queue *vq) + { + int ret; + struct bm2835_mmal_dev *dev = vb2_get_drv_priv(vq); +@@ -567,8 +567,11 @@ static int stop_streaming(struct vb2_queue *vq) + dev->capture.frame_count = 0; + + /* ensure a format has actually been set */ +- if (dev->capture.port == NULL) +- return -EINVAL; ++ if (dev->capture.port == NULL) { ++ v4l2_err(&dev->v4l2_dev, ++ "no capture port - stream not started?\n"); ++ return; ++ } + + v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev, "stopping capturing\n"); + +@@ -599,12 +602,8 @@ static int stop_streaming(struct vb2_queue *vq) + ret); + } + +- if (disable_camera(dev) < 0) { +- v4l2_err(&dev->v4l2_dev, "Failed to disable camera"); +- return -EINVAL; +- } +- +- return ret; ++ if (disable_camera(dev) < 0) ++ v4l2_err(&dev->v4l2_dev, "Failed to disable camera\n"); + } + + static void bm2835_mmal_lock(struct vb2_queue *vq) + +From c3c8f67be7554be9dc1e8a49ed2920a2cfbc1242 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 22 Oct 2014 09:39:17 +0100 +Subject: [PATCH 77/85] pinctrl-bcm2708: pinmux_ops no longer includes disable + +--- + drivers/pinctrl/pinctrl-bcm2708.c | 11 ----------- + 1 file changed, 11 deletions(-) + +diff --git a/drivers/pinctrl/pinctrl-bcm2708.c b/drivers/pinctrl/pinctrl-bcm2708.c +index 40d9c86..b0995fd 100644 +--- a/drivers/pinctrl/pinctrl-bcm2708.c ++++ b/drivers/pinctrl/pinctrl-bcm2708.c +@@ -577,16 +577,6 @@ static int bcm2708_pmx_enable(struct pinctrl_dev *pctldev, + return 0; + } + +-static void bcm2708_pmx_disable(struct pinctrl_dev *pctldev, +- unsigned func_selector, +- unsigned group_selector) +-{ +- struct bcm2708_pinctrl *pc = pinctrl_dev_get_drvdata(pctldev); +- +- /* disable by setting to GPIO_IN */ +- bcm2708_pinctrl_fsel_set(pc, group_selector, BCM2708_FSEL_GPIO_IN); +-} +- + static void bcm2708_pmx_gpio_disable_free(struct pinctrl_dev *pctldev, + struct pinctrl_gpio_range *range, + unsigned offset) +@@ -616,7 +606,6 @@ static const struct pinmux_ops bcm2708_pmx_ops = { + .get_function_name = bcm2708_pmx_get_function_name, + .get_function_groups = bcm2708_pmx_get_function_groups, + .enable = bcm2708_pmx_enable, +- .disable = bcm2708_pmx_disable, + .gpio_disable_free = bcm2708_pmx_gpio_disable_free, + .gpio_set_direction = bcm2708_pmx_gpio_set_direction, + }; + +From 7b3bd4ac452b7b7d921291691b2c572aa49acd90 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 1 Sep 2014 16:35:56 +0100 +Subject: [PATCH 78/85] bcm2708: Allow option card devices to be configured via + DT + +If the kernel is built with Device Tree support, and if a DT blob +is provided for the kernel at boot time, then the platform devices +for option cards are not created. This avoids both the need to +blacklist unwanted devices, and the need to update the board +support code with each new device. +--- + arch/arm/mach-bcm2708/bcm2708.c | 70 ++++++++++++++++++++--------------------- + drivers/dma/bcm2708-dmaengine.c | 14 ++++----- + drivers/mmc/host/bcm2835-mmc.c | 24 +++++++------- + drivers/of/fdt.c | 6 +++- + sound/soc/bcm/bcm2708-i2s.c | 29 +++++++++++------ + sound/soc/bcm/bcm2835-i2s.c | 1 + + 6 files changed, 80 insertions(+), 64 deletions(-) + +diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c +index 2f2e11f..c6d4ff6 100644 +--- a/arch/arm/mach-bcm2708/bcm2708.c ++++ b/arch/arm/mach-bcm2708/bcm2708.c +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + #include + + #include +@@ -93,6 +94,8 @@ static unsigned reboot_part = 0; + static unsigned w1_gpio_pin = W1_GPIO; + static unsigned w1_gpio_pullup = W1_PULLUP; + ++static unsigned use_dt = 0; ++ + static void __init bcm2708_init_led(void); + + void __init bcm2708_init_irq(void) +@@ -514,7 +517,6 @@ static struct platform_device bcm2708_alsa_devices[] = { + }, + }; + +-#ifndef CONFIG_OF + static struct resource bcm2708_spi_resources[] = { + { + .start = SPI0_BASE, +@@ -538,7 +540,6 @@ static struct platform_device bcm2708_spi_device = { + .dma_mask = &bcm2708_spi_dmamask, + .coherent_dma_mask = DMA_BIT_MASK(DMA_MASK_BITS_COMMON)}, + }; +-#endif + + #ifdef CONFIG_BCM2708_SPIDEV + static struct spi_board_info bcm2708_spi_devices[] = { +@@ -560,7 +561,6 @@ static struct spi_board_info bcm2708_spi_devices[] = { + }; + #endif + +-#ifndef CONFIG_OF + static struct resource bcm2708_bsc0_resources[] = { + { + .start = BSC0_BASE, +@@ -599,7 +599,6 @@ static struct platform_device bcm2708_bsc1_device = { + .num_resources = ARRAY_SIZE(bcm2708_bsc1_resources), + .resource = bcm2708_bsc1_resources, + }; +-#endif + + static struct platform_device bcm2835_hwmon_device = { + .name = "bcm2835_hwmon", +@@ -609,7 +608,7 @@ static struct platform_device bcm2835_thermal_device = { + .name = "bcm2835_thermal", + }; + +-#ifdef CONFIG_SND_BCM2708_SOC_I2S_MODULE ++#if defined(CONFIG_SND_BCM2708_SOC_I2S) || defined(CONFIG_SND_BCM2708_SOC_I2S_MODULE) + static struct resource bcm2708_i2s_resources[] = { + { + .start = I2S_BASE, +@@ -731,14 +730,14 @@ int __init bcm_register_device(struct platform_device *pdev) + } + + /* +- * Use this macro for platform devices that are present in the Device Tree. +- * This way the device is only added on non-DT builds. ++ * Use these macros for platform and i2c devices that are present in the ++ * Device Tree. This way the devices are only added on non-DT systems. + */ +-#ifdef CONFIG_OF +-#define bcm_register_device_dt(pdev) +-#else +-#define bcm_register_device_dt(pdev) bcm_register_device(pdev) +-#endif ++#define bcm_register_device_dt(pdev) \ ++ if (!use_dt) bcm_register_device(pdev) ++ ++#define i2c_register_board_info_dt(busnum, info, n) \ ++ if (!use_dt) i2c_register_board_info(busnum, info, n) + + int calc_rsts(int partition) + { +@@ -814,7 +813,9 @@ static void __init bcm2708_dt_init(void) + ret = of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + if (ret) { + pr_err("of_platform_populate failed: %d\n", ret); +- BUG(); ++ /* Proceed as if CONFIG_OF was not defined */ ++ } else { ++ use_dt = 1; + } + } + #else +@@ -842,7 +843,7 @@ void __init bcm2708_init(void) + #if defined(CONFIG_W1_MASTER_GPIO) || defined(CONFIG_W1_MASTER_GPIO_MODULE) + w1_gpio_pdata.pin = w1_gpio_pin; + w1_gpio_pdata.ext_pullup_enable_pin = w1_gpio_pullup; +- platform_device_register(&w1_device); ++ bcm_register_device_dt(&w1_device); + #endif + bcm_register_device(&bcm2708_systemtimer_device); + bcm_register_device(&bcm2708_fb_device); +@@ -857,46 +858,45 @@ void __init bcm2708_init(void) + for (i = 0; i < ARRAY_SIZE(bcm2708_alsa_devices); i++) + bcm_register_device(&bcm2708_alsa_devices[i]); + ++ bcm_register_device(&bcm2835_hwmon_device); ++ bcm_register_device(&bcm2835_thermal_device); ++ + bcm_register_device_dt(&bcm2708_spi_device); + bcm_register_device_dt(&bcm2708_bsc0_device); + bcm_register_device_dt(&bcm2708_bsc1_device); + +- bcm_register_device(&bcm2835_hwmon_device); +- bcm_register_device(&bcm2835_thermal_device); +- +-#ifdef CONFIG_SND_BCM2708_SOC_I2S_MODULE +- bcm_register_device(&bcm2708_i2s_device); ++#if defined(CONFIG_SND_BCM2708_SOC_I2S) || defined(CONFIG_SND_BCM2708_SOC_I2S_MODULE) ++ bcm_register_device_dt(&bcm2708_i2s_device); + #endif + + #if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC_MODULE) +- bcm_register_device(&snd_hifiberry_dac_device); +- bcm_register_device(&snd_pcm5102a_codec_device); ++ bcm_register_device_dt(&snd_hifiberry_dac_device); ++ bcm_register_device_dt(&snd_pcm5102a_codec_device); + #endif + + #if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS_MODULE) +- bcm_register_device(&snd_rpi_hifiberry_dacplus_device); +- i2c_register_board_info(1, snd_pcm512x_hbdacplus_i2c_devices, ARRAY_SIZE(snd_pcm512x_hbdacplus_i2c_devices)); ++ bcm_register_device_dt(&snd_rpi_hifiberry_dacplus_device); ++ i2c_register_board_info_dt(1, snd_pcm512x_hbdacplus_i2c_devices, ARRAY_SIZE(snd_pcm512x_hbdacplus_i2c_devices)); + #endif + + #if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI_MODULE) +- bcm_register_device(&snd_hifiberry_digi_device); +- i2c_register_board_info(1, snd_wm8804_i2c_devices, ARRAY_SIZE(snd_wm8804_i2c_devices)); ++ bcm_register_device_dt(&snd_hifiberry_digi_device); ++ i2c_register_board_info_dt(1, snd_wm8804_i2c_devices, ARRAY_SIZE(snd_wm8804_i2c_devices)); + #endif + + #if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP_MODULE) +- bcm_register_device(&snd_hifiberry_amp_device); +- i2c_register_board_info(1, snd_tas5713_i2c_devices, ARRAY_SIZE(snd_tas5713_i2c_devices)); ++ bcm_register_device_dt(&snd_hifiberry_amp_device); ++ i2c_register_board_info_dt(1, snd_tas5713_i2c_devices, ARRAY_SIZE(snd_tas5713_i2c_devices)); + #endif + +- + #if defined(CONFIG_SND_BCM2708_SOC_RPI_DAC) || defined(CONFIG_SND_BCM2708_SOC_RPI_DAC_MODULE) +- bcm_register_device(&snd_rpi_dac_device); +- bcm_register_device(&snd_pcm1794a_codec_device); ++ bcm_register_device_dt(&snd_rpi_dac_device); ++ bcm_register_device_dt(&snd_pcm1794a_codec_device); + #endif + + #if defined(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) || defined(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC_MODULE) +- bcm_register_device(&snd_rpi_iqaudio_dac_device); +- i2c_register_board_info(1, snd_pcm512x_i2c_devices, ARRAY_SIZE(snd_pcm512x_i2c_devices)); ++ bcm_register_device_dt(&snd_rpi_iqaudio_dac_device); ++ i2c_register_board_info_dt(1, snd_pcm512x_i2c_devices, ARRAY_SIZE(snd_pcm512x_i2c_devices)); + #endif + + +@@ -1040,9 +1040,9 @@ static struct platform_device bcm2708_led_device = { + + static void __init bcm2708_init_led(void) + { +- bcm2708_leds[0].gpio = disk_led_gpio; +- bcm2708_leds[0].active_low = disk_led_active_low; +- platform_device_register(&bcm2708_led_device); ++ bcm2708_leds[0].gpio = disk_led_gpio; ++ bcm2708_leds[0].active_low = disk_led_active_low; ++ bcm_register_device_dt(&bcm2708_led_device); + } + #else + static inline void bcm2708_init_led(void) +diff --git a/drivers/dma/bcm2708-dmaengine.c b/drivers/dma/bcm2708-dmaengine.c +index 6766799..27ee1c1 100644 +--- a/drivers/dma/bcm2708-dmaengine.c ++++ b/drivers/dma/bcm2708-dmaengine.c +@@ -42,7 +42,7 @@ + #include + #include + +-#ifndef CONFIG_OF ++#ifndef CONFIG_ARCH_BCM2835 + + /* dma manager */ + #include +@@ -710,7 +710,7 @@ static int bcm2835_dma_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd, + } + } + +-#ifdef CONFIG_OF ++#ifdef CONFIG_ARCH_BCM2835 + static int bcm2835_dma_chan_init(struct bcm2835_dmadev *d, int chan_id, int irq) + { + struct bcm2835_chan *c; +@@ -773,7 +773,7 @@ static const struct of_device_id bcm2835_dma_of_match[] = { + }; + MODULE_DEVICE_TABLE(of, bcm2835_dma_of_match); + +-#ifdef CONFIG_OF ++#ifdef CONFIG_ARCH_BCM2835 + static struct dma_chan *bcm2835_dma_xlate(struct of_phandle_args *spec, + struct of_dma *ofdma) + { +@@ -806,7 +806,7 @@ static int bcm2835_dma_device_slave_caps(struct dma_chan *dchan, + static int bcm2835_dma_probe(struct platform_device *pdev) + { + struct bcm2835_dmadev *od; +-#ifdef CONFIG_OF ++#ifdef CONFIG_ARCH_BCM2835 + struct resource *res; + void __iomem *base; + uint32_t chans_available; +@@ -819,10 +819,10 @@ static int bcm2835_dma_probe(struct platform_device *pdev) + if (!pdev->dev.dma_mask) + pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; + +- /* If CONFIG_OF is selected, device tree is used */ ++ /* If CONFIG_ARCH_BCM2835 is selected, device tree is used */ + /* hence the difference between probing */ + +-#ifndef CONFIG_OF ++#ifndef CONFIG_ARCH_BCM2835 + + rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); + if (rc) +@@ -976,7 +976,7 @@ static int bcm2835_dma_remove(struct platform_device *pdev) + return 0; + } + +-#ifndef CONFIG_OF ++#ifndef CONFIG_ARCH_BCM2835 + + + static struct platform_driver bcm2835_dma_driver = { +diff --git a/drivers/mmc/host/bcm2835-mmc.c b/drivers/mmc/host/bcm2835-mmc.c +index 123ff94..d8b034a 100644 +--- a/drivers/mmc/host/bcm2835-mmc.c ++++ b/drivers/mmc/host/bcm2835-mmc.c +@@ -42,7 +42,7 @@ + #include "sdhci.h" + + +-#ifndef CONFIG_OF ++#ifndef CONFIG_ARCH_BCM2835 + #define BCM2835_CLOCK_FREQ 250000000 + #endif + +@@ -662,7 +662,7 @@ void bcm2835_mmc_send_command(struct bcm2835_host *host, struct mmc_command *cmd + } + + timeout = jiffies; +-#ifdef CONFIG_OF ++#ifdef CONFIG_ARCH_BCM2835 + if (!cmd->data && cmd->busy_timeout > 9000) + timeout += DIV_ROUND_UP(cmd->busy_timeout, 1000) * HZ + HZ; + else +@@ -957,7 +957,7 @@ static irqreturn_t bcm2835_mmc_irq(int irq, void *dev_id) + struct bcm2835_host *host = dev_id; + u32 intmask, mask, unexpected = 0; + int max_loops = 16; +-#ifndef CONFIG_OF ++#ifndef CONFIG_ARCH_BCM2835 + int cardint = 0; + #endif + +@@ -988,7 +988,7 @@ static irqreturn_t bcm2835_mmc_irq(int irq, void *dev_id) + mmc_hostname(host->mmc)); + + if (intmask & SDHCI_INT_CARD_INT) { +-#ifndef CONFIG_OF ++#ifndef CONFIG_ARCH_BCM2835 + cardint = 1; + #else + bcm2835_mmc_enable_sdio_irq_nolock(host, false); +@@ -1021,7 +1021,7 @@ static irqreturn_t bcm2835_mmc_irq(int irq, void *dev_id) + bcm2835_mmc_dumpregs(host); + } + +-#ifndef CONFIG_OF ++#ifndef CONFIG_ARCH_BCM2835 + if (cardint) + mmc_signal_sdio_irq(host->mmc); + #endif +@@ -1029,7 +1029,7 @@ static irqreturn_t bcm2835_mmc_irq(int irq, void *dev_id) + return result; + } + +-#ifdef CONFIG_OF ++#ifdef CONFIG_ARCH_BCM2835 + static irqreturn_t bcm2835_mmc_thread_irq(int irq, void *dev_id) + { + struct bcm2835_host *host = dev_id; +@@ -1278,7 +1278,7 @@ int bcm2835_mmc_add_host(struct bcm2835_host *host) + + /* SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK */ + host->timeout_clk = mmc->f_max / 1000; +-#ifdef CONFIG_OF ++#ifdef CONFIG_ARCH_BCM2835 + mmc->max_busy_timeout = (1 << 27) / host->timeout_clk; + #endif + /* host controller capabilities */ +@@ -1335,7 +1335,7 @@ int bcm2835_mmc_add_host(struct bcm2835_host *host) + init_waitqueue_head(&host->buf_ready_int); + + bcm2835_mmc_init(host, 0); +-#ifndef CONFIG_OF ++#ifndef CONFIG_ARCH_BCM2835 + ret = request_irq(host->irq, bcm2835_mmc_irq, 0 /*IRQF_SHARED*/, + mmc_hostname(mmc), host); + #else +@@ -1364,7 +1364,7 @@ int bcm2835_mmc_add_host(struct bcm2835_host *host) + static int bcm2835_mmc_probe(struct platform_device *pdev) + { + struct device *dev = &pdev->dev; +-#ifdef CONFIG_OF ++#ifdef CONFIG_ARCH_BCM2835 + struct device_node *node = dev->of_node; + struct clk *clk; + #endif +@@ -1373,7 +1373,7 @@ static int bcm2835_mmc_probe(struct platform_device *pdev) + + int ret; + struct mmc_host *mmc; +-#if !defined(CONFIG_OF) && !defined(FORCE_PIO) ++#if !defined(CONFIG_ARCH_BCM2835) && !defined(FORCE_PIO) + dma_cap_mask_t mask; + #endif + +@@ -1398,7 +1398,7 @@ static int bcm2835_mmc_probe(struct platform_device *pdev) + + host->phys_addr = iomem->start + BCM2835_VCMMU_SHIFT; + +-#ifndef CONFIG_OF ++#ifndef CONFIG_ARCH_BCM2835 + #ifndef FORCE_PIO + dma_cap_zero(mask); + /* we don't care about the channel, any would work */ +@@ -1448,7 +1448,7 @@ static int bcm2835_mmc_probe(struct platform_device *pdev) + } + + +-#ifndef CONFIG_OF ++#ifndef CONFIG_ARCH_BCM2835 + mmc->caps |= MMC_CAP_4_BIT_DATA; + #else + mmc_of_parse(mmc); +diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c +index 30e97bc..143328a 100644 +--- a/drivers/of/fdt.c ++++ b/drivers/of/fdt.c +@@ -1085,8 +1085,12 @@ static struct debugfs_blob_wrapper flat_dt_blob; + + static int __init of_flat_dt_debugfs_export_fdt(void) + { +- struct dentry *d = debugfs_create_dir("device-tree", NULL); ++ struct dentry *d; + ++ if (!initial_boot_params) ++ return -ENOENT; ++ ++ d = debugfs_create_dir("device-tree", NULL); + if (!d) + return -ENOENT; + +diff --git a/sound/soc/bcm/bcm2708-i2s.c b/sound/soc/bcm/bcm2708-i2s.c +index 3fcb740..7570e50 100644 +--- a/sound/soc/bcm/bcm2708-i2s.c ++++ b/sound/soc/bcm/bcm2708-i2s.c +@@ -493,15 +493,19 @@ static int bcm2708_i2s_hw_params(struct snd_pcm_substream *substream, + divf = dividend & BCM2708_CLK_DIVF_MASK; + } + +- /* Set clock divider */ +- regmap_write(dev->clk_regmap, BCM2708_CLK_PCMDIV_REG, BCM2708_CLK_PASSWD +- | BCM2708_CLK_DIVI(divi) +- | BCM2708_CLK_DIVF(divf)); +- +- /* Setup clock, but don't start it yet */ +- regmap_write(dev->clk_regmap, BCM2708_CLK_PCMCTL_REG, BCM2708_CLK_PASSWD +- | BCM2708_CLK_MASH(mash) +- | BCM2708_CLK_SRC(clk_src)); ++ /* Clock should only be set up here if CPU is clock master */ ++ if (((dev->fmt & SND_SOC_DAIFMT_MASTER_MASK) == SND_SOC_DAIFMT_CBS_CFS) || ++ ((dev->fmt & SND_SOC_DAIFMT_MASTER_MASK) == SND_SOC_DAIFMT_CBS_CFM)) { ++ /* Set clock divider */ ++ regmap_write(dev->clk_regmap, BCM2708_CLK_PCMDIV_REG, BCM2708_CLK_PASSWD ++ | BCM2708_CLK_DIVI(divi) ++ | BCM2708_CLK_DIVF(divf)); ++ ++ /* Setup clock, but don't start it yet */ ++ regmap_write(dev->clk_regmap, BCM2708_CLK_PCMCTL_REG, BCM2708_CLK_PASSWD ++ | BCM2708_CLK_MASH(mash) ++ | BCM2708_CLK_SRC(clk_src)); ++ } + + /* Setup the frame format */ + format = BCM2708_I2S_CHEN; +@@ -981,12 +985,19 @@ static int bcm2708_i2s_remove(struct platform_device *pdev) + return 0; + } + ++static const struct of_device_id bcm2708_i2s_of_match[] = { ++ { .compatible = "brcm,bcm2708-i2s", }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, bcm2708_i2s_of_match); ++ + static struct platform_driver bcm2708_i2s_driver = { + .probe = bcm2708_i2s_probe, + .remove = bcm2708_i2s_remove, + .driver = { + .name = "bcm2708-i2s", + .owner = THIS_MODULE, ++ .of_match_table = bcm2708_i2s_of_match, + }, + }; + +diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c +index 2685fe4..e2c61d1 100644 +--- a/sound/soc/bcm/bcm2835-i2s.c ++++ b/sound/soc/bcm/bcm2835-i2s.c +@@ -861,6 +861,7 @@ static const struct of_device_id bcm2835_i2s_of_match[] = { + { .compatible = "brcm,bcm2835-i2s", }, + {}, + }; ++MODULE_DEVICE_TABLE(of, bcm2835_i2s_of_match); + + static struct platform_driver bcm2835_i2s_driver = { + .probe = bcm2835_i2s_probe, + +From 45a53458cf1bbf095c4092ec6cddb9e7a57d878e Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 12 Nov 2014 17:07:02 +0000 +Subject: [PATCH 79/85] Adding Device Tree support for some RPi audio cards + +--- + arch/arm/boot/dts/Makefile | 2 + + arch/arm/boot/dts/bcm2708-rpi-b-plus.dts | 81 +++++++++++++++++++++++++ + arch/arm/boot/dts/bcm2708-rpi-b.dts | 19 +++++- + arch/arm/boot/dts/bcm2708.dtsi | 18 ++++-- + arch/arm/boot/dts/hifiberry-dac-overlay.dts | 34 +++++++++++ + arch/arm/boot/dts/hifiberry-dacplus-overlay.dts | 39 ++++++++++++ + arch/arm/boot/dts/hifiberry-digi-overlay.dts | 39 ++++++++++++ + arch/arm/boot/dts/iqaudio-dac-overlay.dts | 39 ++++++++++++ + arch/arm/boot/dts/iqaudio-dacplus-overlay.dts | 39 ++++++++++++ + sound/soc/bcm/hifiberry_dac.c | 22 +++++++ + sound/soc/bcm/hifiberry_dacplus.c | 22 +++++++ + sound/soc/bcm/hifiberry_digi.c | 22 +++++++ + sound/soc/bcm/iqaudio-dac.c | 16 +++++ + sound/soc/codecs/pcm5102a.c | 7 +++ + 14 files changed, 393 insertions(+), 6 deletions(-) + create mode 100644 arch/arm/boot/dts/bcm2708-rpi-b-plus.dts + create mode 100644 arch/arm/boot/dts/hifiberry-dac-overlay.dts + create mode 100644 arch/arm/boot/dts/hifiberry-dacplus-overlay.dts + create mode 100644 arch/arm/boot/dts/hifiberry-digi-overlay.dts + create mode 100644 arch/arm/boot/dts/iqaudio-dac-overlay.dts + create mode 100644 arch/arm/boot/dts/iqaudio-dacplus-overlay.dts + +diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile +index a034d52..01a05f5 100644 +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -52,6 +52,7 @@ dtb-$(CONFIG_ARCH_AT91) += sama5d36ek.dtb + dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb + dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb + dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-b.dtb ++dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-b-plus.dtb + dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb + dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb + dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm28155-ap.dtb \ +@@ -495,6 +496,7 @@ dtb-$(CONFIG_MACH_DOVE) += dove-cm-a510.dtb \ + + targets += dtbs dtbs_install + targets += $(dtb-y) ++ + endif + + # *.dtb used to be generated in the directory above. Clean out the +diff --git a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +new file mode 100644 +index 0000000..983c23f +--- /dev/null ++++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +@@ -0,0 +1,81 @@ ++/dts-v1/; ++ ++/include/ "bcm2708.dtsi" ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ model = "Raspberry Pi Model B+"; ++ ++ aliases { ++ spi0 = &spi0; ++ i2c0 = &i2c0; ++ i2c1 = &i2c1; ++ i2s = &i2s; ++ gpio = &gpio; ++ sound = &sound; ++ }; ++ ++ sound: sound { ++ }; ++}; ++ ++&gpio { ++ spi0_pins: spi0_pins { ++ brcm,pins = <7 8 9 10 11>; ++ brcm,function = <4>; /* alt0 */ ++ }; ++ ++ i2c0_pins: i2c0 { ++ brcm,pins = <0 1>; ++ brcm,function = <4>; ++ }; ++ ++ i2c1_pins: i2c1 { ++ brcm,pins = <2 3>; ++ brcm,function = <4>; ++ }; ++ ++ i2s_pins: i2s { ++ brcm,pins = <18 19 20 21>; ++ brcm,function = <4>; /* alt0 */ ++ }; ++}; ++ ++&spi0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&spi0_pins>; ++ ++ spidev@0{ ++ compatible = "spidev"; ++ reg = <0>; /* CE0 */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ spi-max-frequency = <500000>; ++ }; ++ ++ spidev@1{ ++ compatible = "spidev"; ++ reg = <1>; /* CE1 */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ spi-max-frequency = <500000>; ++ }; ++}; ++ ++&i2c0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c0_pins>; ++ clock-frequency = <100000>; ++}; ++ ++&i2c1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c1_pins>; ++ clock-frequency = <100000>; ++}; ++ ++&i2s { ++ #sound-dai-cells = <0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2s_pins>; ++}; +diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts +index 5893122..d8c6d15 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-b.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts +@@ -4,12 +4,18 @@ + + / { + compatible = "brcm,bcm2708"; +- model = "Raspberry Pi"; ++ model = "Raspberry Pi Model B"; + + aliases { + spi0 = &spi0; + i2c0 = &i2c0; + i2c1 = &i2c1; ++ i2s = &i2s; ++ gpio = &gpio; ++ sound = &sound; ++ }; ++ ++ sound: sound { + }; + }; + +@@ -28,6 +34,11 @@ + brcm,pins = <2 3>; + brcm,function = <4>; + }; ++ ++ i2s_pins: i2s { ++ brcm,pins = <28 29 30 31>; ++ brcm,function = <4>; /* alt0 */ ++ }; + }; + + &spi0 { +@@ -62,3 +73,9 @@ + pinctrl-0 = <&i2c1_pins>; + clock-frequency = <100000>; + }; ++ ++&i2s { ++ #sound-dai-cells = <0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2s_pins>; ++}; +diff --git a/arch/arm/boot/dts/bcm2708.dtsi b/arch/arm/boot/dts/bcm2708.dtsi +index edf3619..3e035db 100644 +--- a/arch/arm/boot/dts/bcm2708.dtsi ++++ b/arch/arm/boot/dts/bcm2708.dtsi +@@ -7,11 +7,8 @@ + interrupt-parent = <&intc>; + + chosen { +- /* +- bootargs must be 1024 characters long because the +- VC bootloader can't expand it +- */ +- bootargs = "console=ttyAMA0 "; ++ /* No padding required - the boot loader can do that. */ ++ bootargs = "console=ttyAMA0"; + }; + + soc { +@@ -34,6 +31,17 @@ + #gpio-cells = <2>; + }; + ++ i2s: i2s@7e203000 { ++ compatible = "brcm,bcm2708-i2s"; ++ reg = <0x7e203000 0x20>, ++ <0x7e101098 0x02>; ++ ++ //dmas = <&dma 2>, ++ // <&dma 3>; ++ dma-names = "tx", "rx"; ++ status = "disabled"; ++ }; ++ + spi0: spi@7e204000 { + compatible = "brcm,bcm2708-spi"; + reg = <0x7e204000 0x1000>; +diff --git a/arch/arm/boot/dts/hifiberry-dac-overlay.dts b/arch/arm/boot/dts/hifiberry-dac-overlay.dts +new file mode 100644 +index 0000000..5e7633a +--- /dev/null ++++ b/arch/arm/boot/dts/hifiberry-dac-overlay.dts +@@ -0,0 +1,34 @@ ++// Definitions for HiFiBerry DAC ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "hifiberry,hifiberry-dac"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2s>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@2 { ++ target-path = "/"; ++ __overlay__ { ++ pcm5102a-codec { ++ #sound-dai-cells = <0>; ++ compatible = "ti,pcm5102a"; ++ status = "okay"; ++ }; ++ }; ++ }; ++}; +diff --git a/arch/arm/boot/dts/hifiberry-dacplus-overlay.dts b/arch/arm/boot/dts/hifiberry-dacplus-overlay.dts +new file mode 100644 +index 0000000..deb9c62 +--- /dev/null ++++ b/arch/arm/boot/dts/hifiberry-dacplus-overlay.dts +@@ -0,0 +1,39 @@ ++// Definitions for HiFiBerry DAC+ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "hifiberry,hifiberry-dacplus"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2s>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pcm5122@4d { ++ #sound-dai-cells = <0>; ++ compatible = "ti,pcm5122"; ++ reg = <0x4d>; ++ status = "okay"; ++ }; ++ }; ++ }; ++}; +diff --git a/arch/arm/boot/dts/hifiberry-digi-overlay.dts b/arch/arm/boot/dts/hifiberry-digi-overlay.dts +new file mode 100644 +index 0000000..d0e0d8a +--- /dev/null ++++ b/arch/arm/boot/dts/hifiberry-digi-overlay.dts +@@ -0,0 +1,39 @@ ++// Definitions for HiFiBerry Digi ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "hifiberry,hifiberry-digi"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2s>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ wm8804@3b { ++ #sound-dai-cells = <0>; ++ compatible = "wlf,wm8804"; ++ reg = <0x3b>; ++ status = "okay"; ++ }; ++ }; ++ }; ++}; +diff --git a/arch/arm/boot/dts/iqaudio-dac-overlay.dts b/arch/arm/boot/dts/iqaudio-dac-overlay.dts +new file mode 100644 +index 0000000..ea8173e +--- /dev/null ++++ b/arch/arm/boot/dts/iqaudio-dac-overlay.dts +@@ -0,0 +1,39 @@ ++// Definitions for IQaudIO DAC ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "iqaudio,iqaudio-dac"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2s>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pcm5122@4c { ++ #sound-dai-cells = <0>; ++ compatible = "ti,pcm5122"; ++ reg = <0x4c>; ++ status = "okay"; ++ }; ++ }; ++ }; ++}; +diff --git a/arch/arm/boot/dts/iqaudio-dacplus-overlay.dts b/arch/arm/boot/dts/iqaudio-dacplus-overlay.dts +new file mode 100644 +index 0000000..735d8ab +--- /dev/null ++++ b/arch/arm/boot/dts/iqaudio-dacplus-overlay.dts +@@ -0,0 +1,39 @@ ++// Definitions for IQaudIO DAC+ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "iqaudio,iqaudio-dac"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2s>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pcm5122@4c { ++ #sound-dai-cells = <0>; ++ compatible = "ti,pcm5122"; ++ reg = <0x4c>; ++ status = "okay"; ++ }; ++ }; ++ }; ++}; +diff --git a/sound/soc/bcm/hifiberry_dac.c b/sound/soc/bcm/hifiberry_dac.c +index 4b70b45..3ab0f47 100644 +--- a/sound/soc/bcm/hifiberry_dac.c ++++ b/sound/soc/bcm/hifiberry_dac.c +@@ -72,6 +72,21 @@ static int snd_rpi_hifiberry_dac_probe(struct platform_device *pdev) + int ret = 0; + + snd_rpi_hifiberry_dac.dev = &pdev->dev; ++ ++ if (pdev->dev.of_node) { ++ struct device_node *i2s_node; ++ struct snd_soc_dai_link *dai = &snd_rpi_hifiberry_dac_dai[0]; ++ i2s_node = of_parse_phandle(pdev->dev.of_node, ++ "i2s-controller", 0); ++ ++ if (i2s_node) { ++ dai->cpu_dai_name = NULL; ++ dai->cpu_of_node = i2s_node; ++ dai->platform_name = NULL; ++ dai->platform_of_node = i2s_node; ++ } ++ } ++ + ret = snd_soc_register_card(&snd_rpi_hifiberry_dac); + if (ret) + dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret); +@@ -84,10 +99,17 @@ static int snd_rpi_hifiberry_dac_remove(struct platform_device *pdev) + return snd_soc_unregister_card(&snd_rpi_hifiberry_dac); + } + ++static const struct of_device_id snd_rpi_hifiberry_dac_of_match[] = { ++ { .compatible = "hifiberry,hifiberry-dac", }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, snd_rpi_hifiberry_dac_of_match); ++ + static struct platform_driver snd_rpi_hifiberry_dac_driver = { + .driver = { + .name = "snd-hifiberry-dac", + .owner = THIS_MODULE, ++ .of_match_table = snd_rpi_hifiberry_dac_of_match, + }, + .probe = snd_rpi_hifiberry_dac_probe, + .remove = snd_rpi_hifiberry_dac_remove, +diff --git a/sound/soc/bcm/hifiberry_dacplus.c b/sound/soc/bcm/hifiberry_dacplus.c +index c63387b..11e4f39 100644 +--- a/sound/soc/bcm/hifiberry_dacplus.c ++++ b/sound/soc/bcm/hifiberry_dacplus.c +@@ -90,6 +90,21 @@ static int snd_rpi_hifiberry_dacplus_probe(struct platform_device *pdev) + int ret = 0; + + snd_rpi_hifiberry_dacplus.dev = &pdev->dev; ++ ++ if (pdev->dev.of_node) { ++ struct device_node *i2s_node; ++ struct snd_soc_dai_link *dai = &snd_rpi_hifiberry_dacplus_dai[0]; ++ i2s_node = of_parse_phandle(pdev->dev.of_node, ++ "i2s-controller", 0); ++ ++ if (i2s_node) { ++ dai->cpu_dai_name = NULL; ++ dai->cpu_of_node = i2s_node; ++ dai->platform_name = NULL; ++ dai->platform_of_node = i2s_node; ++ } ++ } ++ + ret = snd_soc_register_card(&snd_rpi_hifiberry_dacplus); + if (ret) + dev_err(&pdev->dev, +@@ -103,10 +118,17 @@ static int snd_rpi_hifiberry_dacplus_remove(struct platform_device *pdev) + return snd_soc_unregister_card(&snd_rpi_hifiberry_dacplus); + } + ++static const struct of_device_id snd_rpi_hifiberry_dacplus_of_match[] = { ++ { .compatible = "hifiberry,hifiberry-dacplus", }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, snd_rpi_hifiberry_dacplus_of_match); ++ + static struct platform_driver snd_rpi_hifiberry_dacplus_driver = { + .driver = { + .name = "snd-rpi-hifiberry-dacplus", + .owner = THIS_MODULE, ++ .of_match_table = snd_rpi_hifiberry_dacplus_of_match, + }, + .probe = snd_rpi_hifiberry_dacplus_probe, + .remove = snd_rpi_hifiberry_dacplus_remove, +diff --git a/sound/soc/bcm/hifiberry_digi.c b/sound/soc/bcm/hifiberry_digi.c +index e4f769d..76af8a6 100644 +--- a/sound/soc/bcm/hifiberry_digi.c ++++ b/sound/soc/bcm/hifiberry_digi.c +@@ -125,6 +125,21 @@ static int snd_rpi_hifiberry_digi_probe(struct platform_device *pdev) + int ret = 0; + + snd_rpi_hifiberry_digi.dev = &pdev->dev; ++ ++ if (pdev->dev.of_node) { ++ struct device_node *i2s_node; ++ struct snd_soc_dai_link *dai = &snd_rpi_hifiberry_digi_dai[0]; ++ i2s_node = of_parse_phandle(pdev->dev.of_node, ++ "i2s-controller", 0); ++ ++ if (i2s_node) { ++ dai->cpu_dai_name = NULL; ++ dai->cpu_of_node = i2s_node; ++ dai->platform_name = NULL; ++ dai->platform_of_node = i2s_node; ++ } ++ } ++ + ret = snd_soc_register_card(&snd_rpi_hifiberry_digi); + if (ret) + dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret); +@@ -137,10 +152,17 @@ static int snd_rpi_hifiberry_digi_remove(struct platform_device *pdev) + return snd_soc_unregister_card(&snd_rpi_hifiberry_digi); + } + ++static const struct of_device_id snd_rpi_hifiberry_digi_of_match[] = { ++ { .compatible = "hifiberry,hifiberry-digi", }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, snd_rpi_hifiberry_digi_of_match); ++ + static struct platform_driver snd_rpi_hifiberry_digi_driver = { + .driver = { + .name = "snd-hifiberry-digi", + .owner = THIS_MODULE, ++ .of_match_table = snd_rpi_hifiberry_digi_of_match, + }, + .probe = snd_rpi_hifiberry_digi_probe, + .remove = snd_rpi_hifiberry_digi_remove, +diff --git a/sound/soc/bcm/iqaudio-dac.c b/sound/soc/bcm/iqaudio-dac.c +index 8d0e2ae..ee8cd6e 100644 +--- a/sound/soc/bcm/iqaudio-dac.c ++++ b/sound/soc/bcm/iqaudio-dac.c +@@ -76,6 +76,21 @@ static int snd_rpi_iqaudio_dac_probe(struct platform_device *pdev) + int ret = 0; + + snd_rpi_iqaudio_dac.dev = &pdev->dev; ++ ++ if (pdev->dev.of_node) { ++ struct device_node *i2s_node; ++ struct snd_soc_dai_link *dai = &snd_rpi_iqaudio_dac_dai[0]; ++ i2s_node = of_parse_phandle(pdev->dev.of_node, ++ "i2s-controller", 0); ++ ++ if (i2s_node) { ++ dai->cpu_dai_name = NULL; ++ dai->cpu_of_node = i2s_node; ++ dai->platform_name = NULL; ++ dai->platform_of_node = i2s_node; ++ } ++ } ++ + ret = snd_soc_register_card(&snd_rpi_iqaudio_dac); + if (ret) + dev_err(&pdev->dev, +@@ -93,6 +108,7 @@ static const struct of_device_id iqaudio_of_match[] = { + { .compatible = "iqaudio,iqaudio-dac", }, + {}, + }; ++MODULE_DEVICE_TABLE(of, iqaudio_of_match); + + static struct platform_driver snd_rpi_iqaudio_dac_driver = { + .driver = { +diff --git a/sound/soc/codecs/pcm5102a.c b/sound/soc/codecs/pcm5102a.c +index 126f1e9..7c6598e 100644 +--- a/sound/soc/codecs/pcm5102a.c ++++ b/sound/soc/codecs/pcm5102a.c +@@ -47,12 +47,19 @@ static int pcm5102a_remove(struct platform_device *pdev) + return 0; + } + ++static const struct of_device_id pcm5102a_of_match[] = { ++ { .compatible = "ti,pcm5102a", }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, pcm5102a_of_match); ++ + static struct platform_driver pcm5102a_codec_driver = { + .probe = pcm5102a_probe, + .remove = pcm5102a_remove, + .driver = { + .name = "pcm5102a-codec", + .owner = THIS_MODULE, ++ .of_match_table = pcm5102a_of_match, + }, + }; + + +From 87761b9790a8ad756fd82fe2797975aef0a5ac9c Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Sat, 13 Sep 2014 10:52:04 +0100 +Subject: [PATCH 80/85] config: squash: remove stack usage + +--- + arch/arm/configs/bcmrpi_defconfig | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index baf7783..d1fabab 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -1079,7 +1079,6 @@ CONFIG_NLS_KOI8_U=m + CONFIG_DLM=m + CONFIG_PRINTK_TIME=y + CONFIG_BOOT_PRINTK_DELAY=y +-CONFIG_DEBUG_STACK_USAGE=y + CONFIG_DEBUG_MEMORY_INIT=y + CONFIG_DETECT_HUNG_TASK=y + CONFIG_TIMER_STATS=y + +From d223f288740e3614f7293d805988ca540cff1674 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Mon, 1 Dec 2014 15:23:44 +0000 +Subject: [PATCH 81/85] bcm2708_fb: Add fb_set_par call during init so fb is + usable without fbcon + +--- + drivers/video/fbdev/bcm2708_fb.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/video/fbdev/bcm2708_fb.c b/drivers/video/fbdev/bcm2708_fb.c +index 32aaaf5..9d7ecda 100644 +--- a/drivers/video/fbdev/bcm2708_fb.c ++++ b/drivers/video/fbdev/bcm2708_fb.c +@@ -682,6 +682,7 @@ static int bcm2708_fb_register(struct bcm2708_fb *fb) + */ + + fb_set_var(&fb->fb, &fb->fb.var); ++ bcm2708_fb_set_par(&fb->fb); + + print_debug("BCM2708FB: registering framebuffer (%dx%d@%d) (%d)\n", fbwidth + fbheight, fbdepth, fbswap); + +From 82ec92a4022ec3d4fa932380b71f2b7ae2371fe1 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 5 Dec 2014 12:21:53 +0000 +Subject: [PATCH 82/85] Remove "console=ttyAMA0" from the base device tree + files + +--- + arch/arm/boot/dts/bcm2708.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/bcm2708.dtsi b/arch/arm/boot/dts/bcm2708.dtsi +index 3e035db..4b86aaa 100644 +--- a/arch/arm/boot/dts/bcm2708.dtsi ++++ b/arch/arm/boot/dts/bcm2708.dtsi +@@ -8,7 +8,7 @@ + + chosen { + /* No padding required - the boot loader can do that. */ +- bootargs = "console=ttyAMA0"; ++ bootargs = ""; + }; + + soc { + +From 0471319816fe14029f067c37c8a6fbd8885675d1 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 5 Dec 2014 17:26:26 +0000 +Subject: [PATCH 83/85] fdt: Add support for the CONFIG_CMDLINE_EXTEND option + +--- + drivers/of/fdt.c | 26 +++++++++++++++++++++----- + 1 file changed, 21 insertions(+), 5 deletions(-) + +diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c +index 143328a..38091c1 100644 +--- a/drivers/of/fdt.c ++++ b/drivers/of/fdt.c +@@ -901,19 +901,35 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, + + /* Retrieve command line */ + p = of_get_flat_dt_prop(node, "bootargs", &l); +- if (p != NULL && l > 0) +- strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); + + /* + * CONFIG_CMDLINE is meant to be a default in case nothing else + * managed to set the command line, unless CONFIG_CMDLINE_FORCE + * is set in which case we override whatever was found earlier. ++ * ++ * However, it can be useful to be able to treat the default as ++ * a starting point to be extended using CONFIG_CMDLINE_EXTEND. + */ ++ ((char *)data)[0] = '\0'; ++ + #ifdef CONFIG_CMDLINE +-#ifndef CONFIG_CMDLINE_FORCE +- if (!((char *)data)[0]) ++ strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE); ++ ++ if (p != NULL && l > 0) { ++#if defined(CONFIG_CMDLINE_EXTEND) ++ if (((char *)data)[0]) ++ strlcat(data, " ", COMMAND_LINE_SIZE); ++ strlcat(data, p, min((int)l, COMMAND_LINE_SIZE)); ++#elif defined(CONFIG_CMDLINE_FORCE) ++ pr_warning("Ignoring bootargs property (using the default kernel command line)\n"); ++#else ++ /* Neither extend nor force - just override */ ++ strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); + #endif +- strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE); ++ } ++#else /* CONFIG_CMDLINE */ ++ if (p != NULL && l > 0) { ++ strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); + #endif /* CONFIG_CMDLINE */ + + pr_debug("Command line is: %s\n", (char*)data); + +From a09dd0888aeba1617c181fdad1aa1462e192ba70 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 5 Dec 2014 20:42:50 +0000 +Subject: [PATCH 84/85] fdt: Take more care with the CMDLINE_EXTEND option + +--- + drivers/of/fdt.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c +index 38091c1..9f92dda 100644 +--- a/drivers/of/fdt.c ++++ b/drivers/of/fdt.c +@@ -917,9 +917,12 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, + + if (p != NULL && l > 0) { + #if defined(CONFIG_CMDLINE_EXTEND) +- if (((char *)data)[0]) ++ int len = strlen(data); ++ if (len > 0) { + strlcat(data, " ", COMMAND_LINE_SIZE); +- strlcat(data, p, min((int)l, COMMAND_LINE_SIZE)); ++ len++; ++ } ++ strlcpy((char *)data + len, p, min((int)l, COMMAND_LINE_SIZE - len)); + #elif defined(CONFIG_CMDLINE_FORCE) + pr_warning("Ignoring bootargs property (using the default kernel command line)\n"); + #else + +From 513244c628b94aac666cd14aa04a21dfe030a633 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 25 Nov 2014 13:39:03 +0000 +Subject: [PATCH 85/85] config: Enable device tree + +--- + arch/arm/configs/bcmrpi_defconfig | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index d1fabab..6e5d8b6 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -39,6 +39,7 @@ CONFIG_PARTITION_ADVANCED=y + CONFIG_MAC_PARTITION=y + CONFIG_CFQ_GROUP_IOSCHED=y + CONFIG_ARCH_BCM2708=y ++CONFIG_BCM2708_DT=y + CONFIG_PREEMPT=y + CONFIG_AEABI=y + CONFIG_CLEANCACHE=y