From 315a90d622701036043b7bde106f563b7e466ec7 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sun, 21 Sep 2014 00:39:24 +0200 Subject: [PATCH] projects/RPi/patches/linux: update RPi support patch Signed-off-by: Stephan Raue --- .../patches/linux/linux-01-RPi_support.patch | 1853 +++++++++++++++-- 1 file changed, 1686 insertions(+), 167 deletions(-) diff --git a/projects/RPi/patches/linux/linux-01-RPi_support.patch b/projects/RPi/patches/linux/linux-01-RPi_support.patch index ef27fb2fb1..38be2f1356 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 839892fb323f851df87d53988607afedf3dd830b Mon Sep 17 00:00:00 2001 +From 142ed93e9354132b254ab0a3e183a0f89dbed292 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 01/79] Main bcm2708 linux port +Subject: [PATCH 01/92] Main bcm2708 linux port Signed-off-by: popcornmix --- @@ -8673,10 +8673,10 @@ index 08abe99..544da76 100644 unsigned int version; /* SDHCI spec. version */ -From da440b37d0d7441018381f8444219096b7b0bb1b Mon Sep 17 00:00:00 2001 +From 4cba41b92db49cf41fbc274e92684230d0c4df34 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 7 May 2013 22:20:24 +0100 -Subject: [PATCH 02/79] Add quick config. +Subject: [PATCH 02/92] Add quick config. This is designed for quick compiling when developing. No modules are needed and it includes all Pi specific drivers @@ -8889,10 +8889,10 @@ index 0000000..e5efe75 +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -From 902e25dd4eaa08f290dbe28741cfa19f135e9574 Mon Sep 17 00:00:00 2001 +From a21b1e9ada71dcdfb8bb069fd7ef6691b75b4b3a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 03/79] Add dwc_otg driver +Subject: [PATCH 03/92] Add dwc_otg driver Signed-off-by: popcornmix --- @@ -65961,10 +65961,10 @@ index 0000000..cdc9963 +test_main(); +0; -From 6b87ca694e19511ee495315977066f3df32cbadc Mon Sep 17 00:00:00 2001 +From 60fec707423c59edf2d774f667c57f07e8ef8e92 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:54:32 +0100 -Subject: [PATCH 04/79] bcm2708 watchdog driver +Subject: [PATCH 04/92] bcm2708 watchdog driver Signed-off-by: popcornmix --- @@ -66392,10 +66392,10 @@ index 0000000..8a27d68 +MODULE_ALIAS_MISCDEV(TEMP_MINOR); +MODULE_LICENSE("GPL"); -From 75f85908f5c7346bcfae244d2de54469e7a34b98 Mon Sep 17 00:00:00 2001 +From 669ccd96ae050d4b9dac0b7fc06cd73bb2591b9d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:55:09 +0100 -Subject: [PATCH 05/79] bcm2708 framebuffer driver +Subject: [PATCH 05/92] bcm2708 framebuffer driver Signed-off-by: popcornmix --- @@ -69439,10 +69439,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 39f45149b0b1b89e9c6e87d79de37b754008c3d3 Mon Sep 17 00:00:00 2001 +From 00039394d686f6b185294f2767ad5f94c0a936b1 Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 06/79] Speed up console framebuffer imageblit function +Subject: [PATCH 06/92] 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 @@ -69651,10 +69651,10 @@ index a2bb276..436494f 100644 start_index, pitch_index); } else -From dab41a03d19951dcf0af36647b7bcfc716fa46ce Mon Sep 17 00:00:00 2001 +From b84be90e342ab3f83163a862f92a604e33afd5c9 Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 07/79] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 07/92] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -69747,10 +69747,10 @@ index fb795c3..fa72af0 100644 #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ #define FB_TYPE_PLANES 1 /* Non interleaved planes */ -From 5ca156864b2ac966e3d20aa29a3eabab4b559295 Mon Sep 17 00:00:00 2001 +From 1c026d22590b4cd639158bb5dc522b4ff724a7e8 Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 16:00:25 +0300 -Subject: [PATCH 08/79] bcm2708_fb: DMA acceleration for fb_copyarea +Subject: [PATCH 08/92] 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 @@ -70234,10 +70234,10 @@ index 54cd760..b3b1e04 100644 return 0; -From 9e7cf5f765bfaf0412918f84f87f507404928531 Mon Sep 17 00:00:00 2001 +From 6862cfc59ee9a58cbe2c4d0858b9f581d5e5b4d5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 2 Jul 2013 23:42:01 +0100 -Subject: [PATCH 09/79] bcm2708 vchiq driver +Subject: [PATCH 09/92] bcm2708 vchiq driver Signed-off-by: popcornmix @@ -82786,10 +82786,10 @@ index 0000000..b6bfa21 + return vchiq_build_time; +} -From 07e18ad78953ccfa168920bd0cfa95d20d853a0a Mon Sep 17 00:00:00 2001 +From 56cf9d835d83750c3451c4ba4db78cb9c6391a67 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 12 May 2014 15:12:02 +0100 -Subject: [PATCH 10/79] vchiq: Avoid high load when blocked and unkillable +Subject: [PATCH 10/92] 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 --- @@ -82951,10 +82951,10 @@ index c2eefef..05e7979 100644 static inline int is_pow2(int i) { -From c156c499b73a549d7bff0d3c991494d11108cd6f Mon Sep 17 00:00:00 2001 +From 7d423949a4dd497f206002e4cd7f5c70a16b0bf8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:31:47 +0100 -Subject: [PATCH 11/79] cma: Add vc_cma driver to enable use of CMA +Subject: [PATCH 11/92] cma: Add vc_cma driver to enable use of CMA Signed-off-by: popcornmix --- @@ -84243,10 +84243,10 @@ index 0000000..5325832 + +#endif /* VC_CMA_H */ -From bcd05a294b17945c1992560a04e60d5a75ecd347 Mon Sep 17 00:00:00 2001 +From d65c5ba4eca012f2e803ddc47eb45fd5ec44738a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 26 Mar 2012 22:15:50 +0100 -Subject: [PATCH 12/79] bcm2708: alsa sound driver +Subject: [PATCH 12/92] bcm2708: alsa sound driver Signed-off-by: popcornmix @@ -87034,10 +87034,10 @@ index 0000000..af3e6eb + +#endif // _VC_AUDIO_DEFS_H_ -From afcf0a46aa2ca83398e4be2a0b444dfe82915681 Mon Sep 17 00:00:00 2001 +From 68a4967c1eca9b0ce44c2319eaef468dfdfadd9e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:51:55 +0100 -Subject: [PATCH 13/79] Add hwrng (hardware random number generator) driver +Subject: [PATCH 13/92] Add hwrng (hardware random number generator) driver --- arch/arm/mach-bcm2708/include/mach/platform.h | 1 + @@ -87216,10 +87216,10 @@ index 0000000..340f004 +MODULE_DESCRIPTION("BCM2708 H/W Random Number Generator (RNG) driver"); +MODULE_LICENSE("GPL and additional rights"); -From e331619637903fb87cf857a2eca13db59c3fb26e Mon Sep 17 00:00:00 2001 +From 3bd26bded4ce506f3f4b52c40331c3ffa82ed2f7 Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 14/79] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 14/92] 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 @@ -87961,10 +87961,10 @@ index 0000000..57ffacf +module_param(debug, bool, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(debug, "Enable debugging messages"); -From 792da119ecc4c626a203766aaec1e52b2e3a7fab Mon Sep 17 00:00:00 2001 +From 360423b2167a280bc8ca38063dd7c50f10d8fab1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 15/79] Add cpufreq driver +Subject: [PATCH 15/92] Add cpufreq driver --- arch/arm/Kconfig | 1 + @@ -88263,10 +88263,10 @@ index 0000000..7bc55bd +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); -From 3e47e00f837107aeb880b4ea1712f1a08c27d970 Mon Sep 17 00:00:00 2001 +From db98f80199c117cb9c04acae917936a1a06ed956 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 19:24:24 +0000 -Subject: [PATCH 16/79] Added hwmon/thermal driver for reporting core +Subject: [PATCH 16/92] Added hwmon/thermal driver for reporting core temperature. Thanks Dorian --- @@ -88788,10 +88788,10 @@ index 0000000..85fceb5 + +module_platform_driver(bcm2835_thermal_driver); -From e611450aaf310a866b42c52a34fc5307d4231046 Mon Sep 17 00:00:00 2001 +From afb0616a3fda709d0e2b1dbae2ea77b8e170eebe Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 17/79] Allow mac address to be set in smsc95xx +Subject: [PATCH 17/92] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -88882,10 +88882,10 @@ index d07bf4c..5ae60ab 100644 if (smsc95xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN, dev->net->dev_addr) == 0) { -From cb77c7822b8734fb85c2e0d5fce466b47199969f Mon Sep 17 00:00:00 2001 +From 977e8f91bf1d77cf7a6165608cfae630864343bb Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 4 Nov 2013 18:56:10 +0000 -Subject: [PATCH 18/79] Add Chris Boot's i2c and spi drivers. +Subject: [PATCH 18/92] Add Chris Boot's i2c and spi drivers. i2c-bcm2708: fixed baudrate @@ -90266,10 +90266,10 @@ index 0000000..b04a57d +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); -From b48352e617873908e9eed7c7a0a0274c3154d443 Mon Sep 17 00:00:00 2001 +From 732163f2565eeb4e2cc8a9e75af77163a4c3ac61 Mon Sep 17 00:00:00 2001 From: cbeytas Date: Mon, 24 Jun 2013 00:05:40 -0400 -Subject: [PATCH 19/79] Perform I2C combined transactions when possible +Subject: [PATCH 19/92] Perform I2C combined transactions when possible Perform I2C combined transactions whenever possible, within the restrictions of the Broadcomm Serial Controller. @@ -90341,10 +90341,10 @@ index f266f10..8750634 100644 } -From a8f2638feb6187f10fe57305790052d7eb5b8864 Mon Sep 17 00:00:00 2001 +From 72f63745f25941f5114b69e0e03847812325222c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 20/79] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 20/92] 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 @@ -90616,11 +90616,10 @@ index 2820924..fd0550f 100644 } } - -From bd506122daf1d74245615448bc794c2f64fce271 Mon Sep 17 00:00:00 2001 +From b6c327d2034a59f96c6458454a9a50721125357f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 12 Apr 2013 23:58:47 +0100 -Subject: [PATCH 24/79] config: add missing options from 3.6.y kernel +Subject: [PATCH 24/92] config: add missing options from 3.6.y kernel --- arch/arm/configs/bcmrpi_defconfig | 757 ++++++++++++++++++++++++++++++++------ @@ -91669,10 +91668,10 @@ index 31f5afaa..5b69e83 100644 # CONFIG_CRYPTO_HW is not set CONFIG_CRC_ITU_T=y -From 81c9c12a18219e4047e0ce94c903a0d71781005d Mon Sep 17 00:00:00 2001 +From a7f9ef3115b9bd9d2ab0267980c67ac79d74471b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Dec 2013 22:16:19 +0000 -Subject: [PATCH 25/79] config: Enable CONFIG_MEMCG, but leave it disabled (due +Subject: [PATCH 25/92] config: Enable CONFIG_MEMCG, but leave it disabled (due to memory cost). Enable with cgroup_enable=memory. --- @@ -91740,10 +91739,10 @@ index 1f14a43..403173e 100644 #ifdef CONFIG_MEMCG_SWAP -From 4419c5e5a7d400cdd45bcb500a91a46853aaac51 Mon Sep 17 00:00:00 2001 +From d44502238ff6807b97718b9396da51c3ac9c9957 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:46:42 +0100 -Subject: [PATCH 26/79] Add FIQ patch to dwc_otg driver. Enable with +Subject: [PATCH 26/92] 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 @@ -95062,10 +95061,10 @@ index 1b1f83c..c8590b5 100644 if (status.b.sr) { -From 23139849a415b9f4048fbc2e8f9d9a610cfd6bb6 Mon Sep 17 00:00:00 2001 +From 67aabc6b5dd6e3bb605ba2bca7952ec39e22e178 Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 19 Mar 2014 12:58:23 +0000 -Subject: [PATCH 27/79] dwc_otg: fiq_fsm: Base commit for driver rewrite +Subject: [PATCH 27/92] dwc_otg: fiq_fsm: Base commit for driver rewrite This commit removes the previous FIQ fixes entirely and adds fiq_fsm. @@ -99961,10 +99960,10 @@ index 5d310df..4b32941 100644 return -EBUSY; } -From d4a83bcbcb9da2e2da12b9f6c699c4fbba695f94 Mon Sep 17 00:00:00 2001 +From 9c51ea5408ebf250f609d9eab680207cb01cab9e Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 30 Jan 2013 12:45:18 +0000 -Subject: [PATCH 28/79] bcm2835: add v4l2 camera device +Subject: [PATCH 28/92] bcm2835: add v4l2 camera device - Supports raw YUV capture, preview, JPEG and H264. - Uses videobuf2 for data transfer, using dma_buf. @@ -105949,10 +105948,10 @@ index 0000000..9d1d11e + +#endif /* MMAL_VCHIQ_H */ -From ce9099c8d233407393fddc3aac73867919593acf Mon Sep 17 00:00:00 2001 +From 955f36274d222d969074b99d38ad11b6b5facede Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 10:58:01 +0000 -Subject: [PATCH 29/79] V4L2: Fixes from 6by9 +Subject: [PATCH 29/92] V4L2: Fixes from 6by9 V4L2: Fix EV values. Add manual shutter speed control @@ -108324,10 +108323,10 @@ index a06fb44..76f249e 100644 release_msg: -From c6bb89322561ea50e609a73ee792020429329472 Mon Sep 17 00:00:00 2001 +From 951d2a7db1e94e10c47f4146b5aa89ebed472b99 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 30/79] dmaengine: Add support for BCM2708 +Subject: [PATCH 30/92] dmaengine: Add support for BCM2708 Add support for DMA controller of BCM2708 as used in the Raspberry Pi. Currently it only supports cyclic DMA. @@ -108964,10 +108963,10 @@ index 0000000..b244293 +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From 9f7b49b82309f6b788c08ffa9cb7bca2f850c375 Mon Sep 17 00:00:00 2001 +From 8e79544f1ff0c54df986325c4347f4c8d554370c Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:33:38 +0100 -Subject: [PATCH 31/79] ASoC: Add support for BCM2708 +Subject: [PATCH 31/92] ASoC: Add support for BCM2708 This driver adds support for digital audio (I2S) for the BCM2708 SoC that is used by the @@ -109962,10 +109961,10 @@ index 0000000..ebaf3d6 +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From f2d01e149898dfc5a6ccfd5007bc0ac07caa156f Mon Sep 17 00:00:00 2001 +From b66e706776ad1c098c03c7c0a08e1b49a909b001 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:37:51 +0100 -Subject: [PATCH 32/79] BCM2708: Extend mach header +Subject: [PATCH 32/92] BCM2708: Extend mach header Extend the headers of the mach-bcm2708 in order to support I2S and DMA engine. @@ -110007,10 +110006,10 @@ index 992a630..2e7e1bb 100644 #define BSC0_BASE (BCM2708_PERI_BASE + 0x205000) /* BSC0 I2C/TWI */ #define UART1_BASE (BCM2708_PERI_BASE + 0x215000) /* Uart 1 */ -From ba0fd48bfe41f4f12ac70dfbba058afa8f3100fd Mon Sep 17 00:00:00 2001 +From f965994b1704ecbdf5988279fa2675416ec24689 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:59:51 +0100 -Subject: [PATCH 33/79] ASoC: Add support for PCM5102A codec +Subject: [PATCH 33/92] ASoC: Add support for PCM5102A codec Some definitions to support the PCM5102A codec by Texas Instruments. @@ -110135,10 +110134,10 @@ index 0000000..126f1e9 +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From 5c220e69598ccc5a4331a4807685b2bee0e7531e Mon Sep 17 00:00:00 2001 +From 59d1e13538d2251dad81db291c769a47023efd24 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:04:54 +0100 -Subject: [PATCH 34/79] BCM2708: Add I2S support to board file +Subject: [PATCH 34/92] BCM2708: Add I2S support to board file Adds the required initializations for I2S to the board file of mach-bcm2708. @@ -110193,10 +110192,10 @@ index a6eb08e..27e47d5 100644 struct amba_device *d = amba_devs[i]; amba_device_register(d, &iomem_resource); -From 8c4010ef6f120f6f20c3d575600a5b595bbb0994 Mon Sep 17 00:00:00 2001 +From f5ef93926fbc0047c70fd094a8e6a7115f76959f Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 -Subject: [PATCH 35/79] ASoC: Add support for HifiBerry DAC +Subject: [PATCH 35/92] ASoC: Add support for HifiBerry DAC This adds a machine driver for the HifiBerry DAC. It is a sound card that can @@ -110345,10 +110344,10 @@ index 0000000..4b70b45 +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); -From 64aa80c778a2bc0b03e1039f95960243f4201fd7 Mon Sep 17 00:00:00 2001 +From 65d21fa1077ab0de2fff08711085a573b249b70a Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:21:34 +0100 -Subject: [PATCH 36/79] BCM2708: Add HifiBerry DAC to board file +Subject: [PATCH 36/92] BCM2708: Add HifiBerry DAC to board file This adds the initalization of the HifiBerry DAC to the mach-bcm2708 board file. @@ -110396,10 +110395,10 @@ index 27e47d5..fafd8d0 100644 struct amba_device *d = amba_devs[i]; amba_device_register(d, &iomem_resource); -From 15a789cf4a98f88eb75d553b6caea4f7d1c8de9c Mon Sep 17 00:00:00 2001 +From bdfd5b66ade61b7d8add0a972efb58b0db431b56 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 6 Dec 2013 18:55:53 +0100 -Subject: [PATCH 37/79] ASoC: BCM2708: Add 24 bit support +Subject: [PATCH 37/92] 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: @@ -110471,10 +110470,10 @@ index ebaf3d6..a179216 100644 .period_bytes_min = 32, .period_bytes_max = 64 * PAGE_SIZE, -From e0716a7fa7874757ff01fac80f62e8c99a56f33c Mon Sep 17 00:00:00 2001 +From d5c67474b3103119085c63a6baf25ed2eb550a58 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 2 Dec 2013 20:28:22 +0100 -Subject: [PATCH 38/79] BCM2708: Add I2S and DMA support to default config +Subject: [PATCH 38/92] 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. @@ -110514,10 +110513,10 @@ index 0c58172..38ccd22 100644 CONFIG_UIO_PDRV_GENIRQ=m CONFIG_STAGING=y -From 0b2d13950ced9de365af93a96912f8e55271ecf0 Mon Sep 17 00:00:00 2001 +From 384db42ed68bc4fceccee99c9461f14709c28828 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 6 Dec 2013 20:50:28 +0100 -Subject: [PATCH 39/79] ASoC: BCM2708: Add support for RPi-DAC +Subject: [PATCH 39/92] ASoC: BCM2708: Add support for RPi-DAC This adds a machine driver for the RPi-DAC. @@ -110828,10 +110827,10 @@ index 0000000..b4eaa44 +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From 66f98a8406804e24ff9fa194ee21a9b961a53b98 Mon Sep 17 00:00:00 2001 +From 02323e41c0527ef3763cb29dfda6ef0f41c1d80f Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 -Subject: [PATCH 40/79] ASoC: wm8804: Implement MCLK configuration options, add +Subject: [PATCH 40/92] 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 @@ -110871,10 +110870,10 @@ index d96e5963..9a7a289 100644 #define WM8804_RATES (SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \ SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_64000 | \ -From 9903287696cc4f5c070587dd46b2554a3ea771f6 Mon Sep 17 00:00:00 2001 +From 93383b9b50befba8e959c7f9dfec1e9252ee42ba Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 -Subject: [PATCH 41/79] ASoC: BCM:Add support for HiFiBerry Digi. Driver is +Subject: [PATCH 41/92] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patched WM8804 driver. Signed-off-by: Daniel Matuschek @@ -111077,10 +111076,10 @@ index 0000000..e4f769d +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); -From 9089eb1c8089f27f0d825594aca55203fe4c2b33 Mon Sep 17 00:00:00 2001 +From 0e6318ea66a835f331e8f194519f6d03a6ae4dd5 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:26:08 +0100 -Subject: [PATCH 42/79] BCM2708: Added support for HiFiBerry Digi board Board +Subject: [PATCH 42/92] BCM2708: Added support for HiFiBerry Digi board Board initalization by I2C Signed-off-by: Daniel Matuschek @@ -111127,10 +111126,10 @@ index 238f165..139045b 100644 bcm_register_device(&snd_rpi_dac_device); bcm_register_device(&snd_pcm1794a_codec_device); -From 2ccbdf72d828bd288256a23e79fa2e660bea9599 Mon Sep 17 00:00:00 2001 +From 943a8e128f3a685b1ffb7abd67ddc4c262002897 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:27:28 +0100 -Subject: [PATCH 43/79] BCM2708: Added HiFiBerry Digi configuration option It +Subject: [PATCH 43/92] BCM2708: Added HiFiBerry Digi configuration option It will be compiled as a module by default. This also includes the WM8804 driver. @@ -111155,10 +111154,10 @@ index 5e049f9..4f6bb90 100644 CONFIG_SND_SOC_I2C_AND_SPI=m CONFIG_SND_SOC_PCM5102A=m -From 8ca488553ca04a621fbee224210872ca64afc55f Mon Sep 17 00:00:00 2001 +From 601a38140c26626d4f2917bea04fc6b8e096884d Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:36:35 +0100 -Subject: [PATCH 44/79] ASoC: wm8804: Set idle_bias_off to false Idle bias has +Subject: [PATCH 44/92] ASoC: wm8804: Set idle_bias_off to false Idle bias has been change to remove warning on driver startup Signed-off-by: Daniel Matuschek @@ -111180,10 +111179,10 @@ index 9a7a289..32e199a 100644 .controls = wm8804_snd_controls, .num_controls = ARRAY_SIZE(wm8804_snd_controls), -From 658a1d669499b55d8e733ccb470a003e78149e99 Mon Sep 17 00:00:00 2001 +From 5b9e91c82dfebd32160d62ec77ef802bf3fe3e39 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 12 Mar 2014 11:46:34 +0000 -Subject: [PATCH 45/79] ASoc: Don't report S24_LE support, it produces white +Subject: [PATCH 45/92] ASoc: Don't report S24_LE support, it produces white noise with xbmc --- @@ -111218,10 +111217,10 @@ index 126f1e9..7812d34 100644 }, }; -From 5917c8011a856aa57802508ec7df1ec093ae7553 Mon Sep 17 00:00:00 2001 +From 6cfb5d9808b9b905c3e33e406b6599a7358ec3ff Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 -Subject: [PATCH 46/79] Add IQaudIO Sound Card support for Raspberry Pi +Subject: [PATCH 46/92] Add IQaudIO Sound Card support for Raspberry Pi --- arch/arm/configs/bcmrpi_defconfig | 1 + @@ -111431,10 +111430,10 @@ index 0000000..8d0e2ae +MODULE_DESCRIPTION("ASoC Driver for IQAudio DAC"); +MODULE_LICENSE("GPL v2"); -From 603b762a6a41f0549462638f4f10d6c82f11d3f1 Mon Sep 17 00:00:00 2001 +From 5e1cad035f3e1576fdd35adca79ddff557173f9c Mon Sep 17 00:00:00 2001 From: Howard Mitchell Date: Wed, 30 Jul 2014 21:43:37 +0100 -Subject: [PATCH 47/79] soc-core: Fix volsw_range funcs so +Subject: [PATCH 47/92] soc-core: Fix volsw_range funcs so SOC_DOUBLE_R_RANGE_TLV works. This is so that the correct range of values as specified @@ -111508,10 +111507,10 @@ index b87d7d8..1f3d03e 100644 return 0; -From 0b5178b68d7c9f41e0b7fa8eb5e2459d1ef80ebd Mon Sep 17 00:00:00 2001 +From 9776eb7b723a9a1c8b1b821981b7373c13d393de Mon Sep 17 00:00:00 2001 From: Howard Mitchell Date: Fri, 28 Mar 2014 16:40:31 +0000 -Subject: [PATCH 48/79] pcm512x: Use a range macro for Volume and rename to +Subject: [PATCH 48/92] pcm512x: Use a range macro for Volume and rename to PCM. This allows limiting the output gain to avoid clipping in the @@ -111536,10 +111535,10 @@ index 163ec38..1466955 100644 PCM512x_LAGN_SHIFT, PCM512x_RAGN_SHIFT, 1, 1, analog_tlv), SOC_DOUBLE_TLV("Playback Boost Volume", PCM512x_ANALOG_GAIN_BOOST, -From b37fad9a65a4e62657fdecb1d5b62b9dd510be90 Mon Sep 17 00:00:00 2001 +From 1735fd793c3693f19f465396fa8de1d52ad5500b Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Fri, 2 May 2014 16:13:59 +0100 -Subject: [PATCH 49/79] Move GPIO setup to hw_params. +Subject: [PATCH 49/92] 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 @@ -111635,10 +111634,10 @@ index b25e158..9976571 100644 dev->clk_regmap = regmap[1]; -From e5fb8a6be0d14cadcfb602bf22ea8719088c0053 Mon Sep 17 00:00:00 2001 +From 61b6816da3847b9241a7eb6c38e8bcf356abe135 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Jun 2014 13:42:01 +0100 -Subject: [PATCH 50/79] vmstat: Workaround for issue where dirty page count +Subject: [PATCH 50/92] vmstat: Workaround for issue where dirty page count goes negative See: @@ -111665,10 +111664,10 @@ index 82e7db7..f87d16d 100644 static inline void __inc_zone_page_state(struct page *page, -From ab1b06e206515b2a67e2392aed9a3f87c447fd1a Mon Sep 17 00:00:00 2001 +From 8ba5c5f91663aecc77b3eed5c43c3053c0c450bc Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 20 Jun 2014 16:03:12 +0100 -Subject: [PATCH 51/79] dwc_otg: Fix various issues with root port and +Subject: [PATCH 51/92] dwc_otg: Fix various issues with root port and transaction errors Process the host port interrupts correctly (and don't trample them). @@ -111738,10 +111737,10 @@ index d3e2035..6182d3e 100644 fiq_print(FIQDBG_ERR, dwc_otg_hcd->fiq_state, "RESET "); } -From 8a3691d7d3bcefd262cdc2c176cf03c8bbcbf58e Mon Sep 17 00:00:00 2001 +From 47614d6b2e379e784720eacc2e271b5f89dbfc97 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 20 Jun 2014 17:23:20 +0100 -Subject: [PATCH 52/79] fiq_fsm: Implement hack for Split Interrupt +Subject: [PATCH 52/92] fiq_fsm: Implement hack for Split Interrupt transactions Hubs aren't too picky about which endpoint we send Control type split @@ -111827,10 +111826,10 @@ index daea770..35721e5 100644 break; } -From a308c1b04aa2590538f3929459464751af4b1afe Mon Sep 17 00:00:00 2001 +From 4c6a19f732d959989328ba7bdda2d75286736f1e Mon Sep 17 00:00:00 2001 From: notro Date: Sun, 6 Jul 2014 12:07:25 +0200 -Subject: [PATCH 53/79] spi-bcm2708: Prepare for Common Clock Framework +Subject: [PATCH 53/92] spi-bcm2708: Prepare for Common Clock Framework migration As part of migrating to use the Common Clock Framework, replace clk_enable() @@ -111875,10 +111874,10 @@ index b04a57d..349d21f 100644 free_irq(bs->irq, master); iounmap(bs->base); -From f55cc5f0ad7922b97e46bc594bdf420db2982b04 Mon Sep 17 00:00:00 2001 +From 8419618a20b32f53091e548de8b3179efb443b71 Mon Sep 17 00:00:00 2001 From: notro Date: Sun, 6 Jul 2014 12:09:30 +0200 -Subject: [PATCH 54/79] BCM2708: Migrate to the Common Clock Framework +Subject: [PATCH 54/92] 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. @@ -112148,10 +112147,10 @@ index 5f9d725..0000000 - unsigned long rate; -}; -From 79bacbe9b2bc3aa5742e5e636d8750c57bd4abf7 Mon Sep 17 00:00:00 2001 +From 2b75bfbf32d5a53497215f51259e4e123accd3f7 Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:46:08 +0200 -Subject: [PATCH 55/79] BCM2708: Add core Device Tree support +Subject: [PATCH 55/92] BCM2708: Add core Device Tree support Add the bare minimum needed to boot BCM2708 from a Device Tree. @@ -112308,10 +112307,10 @@ index 674e5aa..83277d1f 100644 module_param(boardrev, uint, 0644); -From 504175cf2dab09ee2d3a38abda8cd14e946d9a8d Mon Sep 17 00:00:00 2001 +From 63dd6c49103610f1f0f4ec0ca6a53e2e27153194 Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:47:48 +0200 -Subject: [PATCH 56/79] BCM2708: armctrl: Add IRQ Device Tree support +Subject: [PATCH 56/92] BCM2708: armctrl: Add IRQ Device Tree support Add Device Tree IRQ support for BCM2708. Usage is the same as for irq-bcm2835. @@ -112475,10 +112474,10 @@ index d4c5333..42f5e1c 100644 return 0; } -From 4440f7a92619e12940a7e27f080d11064dc5cc93 Mon Sep 17 00:00:00 2001 +From 0e49e16f168532089aba638b33d3b202ec7de426 Mon Sep 17 00:00:00 2001 From: notro Date: Thu, 10 Jul 2014 13:59:47 +0200 -Subject: [PATCH 57/79] pinctrl: add bcm2708 driver +Subject: [PATCH 57/92] pinctrl: add bcm2708 driver This driver is a verbatim copy of the pinctrl-bcm2835 driver, except for: * changed 2835 to 2708 @@ -113341,10 +113340,10 @@ index 0000000..40d9c86 +MODULE_DESCRIPTION("BCM2708 Pin control driver"); +MODULE_LICENSE("GPL"); -From bef9a66a1a4e952c7d07bf03aa143ed629510152 Mon Sep 17 00:00:00 2001 +From 9fc6a169ddea8269fe1df58c9004abab104f7f48 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 14 Jul 2014 22:02:09 +0100 -Subject: [PATCH 58/79] hid: Reduce default mouse polling interval to 60Hz +Subject: [PATCH 58/92] hid: Reduce default mouse polling interval to 60Hz Reduces overhead when using X --- @@ -113380,10 +113379,10 @@ index 7b88f4c..016a485 100644 ret = -ENOMEM; if (usb_endpoint_dir_in(endpoint)) { -From 4a71b12cde3193dbe01492f2f9edff796f2af095 Mon Sep 17 00:00:00 2001 +From e20b16f3b5dfcf6371790f16f5cdecde921b5130 Mon Sep 17 00:00:00 2001 From: notro Date: Fri, 18 Jul 2014 18:15:57 +0200 -Subject: [PATCH 59/79] BCM2708: DT: change 'axi' nodename to 'soc' +Subject: [PATCH 59/92] 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, @@ -113408,10 +113407,10 @@ index 3f884b3..e02e67b 100644 #address-cells = <1>; #size-cells = <1>; -From e6c0c0c84ded234045eadb9405266010392b4124 Mon Sep 17 00:00:00 2001 +From d6cc30d753e10383f8abe7799caec57d27a3a600 Mon Sep 17 00:00:00 2001 From: notro Date: Sun, 27 Jul 2014 20:12:58 +0200 -Subject: [PATCH 60/79] spi: bcm2708: add device tree support +Subject: [PATCH 60/92] spi: bcm2708: add device tree support Add DT support to driver and add to .dtsi file. Setup pins and spidev in .dts file. @@ -113530,10 +113529,10 @@ index 349d21f..041b5e2 100644 .probe = bcm2708_spi_probe, .remove = bcm2708_spi_remove, -From bac8143ba837822fe0038a809e23a5c517533c57 Mon Sep 17 00:00:00 2001 +From 0ba6413e40b88c218a91e38eae5b0e869dd8d87f Mon Sep 17 00:00:00 2001 From: notro Date: Sun, 27 Jul 2014 20:13:44 +0200 -Subject: [PATCH 61/79] BCM2708: don't register SPI controller when using DT +Subject: [PATCH 61/92] 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. @@ -113604,10 +113603,10 @@ index 83277d1f..a4286e9 100644 bcm_register_device(&bcm2708_bsc1_device); -From 9ed17623b1346dddcf60f50a5c11eccd77a1d907 Mon Sep 17 00:00:00 2001 +From 6aaedef2fbf03ada1f5061390771291e0a4b0ba2 Mon Sep 17 00:00:00 2001 From: notro Date: Sun, 27 Jul 2014 20:14:05 +0200 -Subject: [PATCH 62/79] spi: bcm2835: make driver available on ARCH_BCM2708 +Subject: [PATCH 62/92] spi: bcm2835: make driver available on ARCH_BCM2708 Make this driver available on ARCH_BCM2708 @@ -113630,10 +113629,10 @@ index cb20594..54aac0f 100644 This selects a driver for the Broadcom BCM2835 SPI master. -From 4436b5c4aaa78ab523807228efb9e69dcd13837b Mon Sep 17 00:00:00 2001 +From dcc9c0bc8624de2ee2f77b093f348ecfeef7dd6b Mon Sep 17 00:00:00 2001 From: notro Date: Tue, 29 Jul 2014 11:04:49 +0200 -Subject: [PATCH 63/79] i2c: bcm2708: add device tree support +Subject: [PATCH 63/92] i2c: bcm2708: add device tree support Add DT support to driver and add to .dtsi file. Setup pins in .dts file. @@ -113798,10 +113797,10 @@ index 8750634..728cb69 100644 .probe = bcm2708_i2c_probe, .remove = bcm2708_i2c_remove, -From f32f8d0cc79649f78d6b0d60482af0c0cc7fe53e Mon Sep 17 00:00:00 2001 +From 07ded1952cc830dc6db189b5412aa75f7af20d21 Mon Sep 17 00:00:00 2001 From: notro Date: Tue, 29 Jul 2014 11:05:18 +0200 -Subject: [PATCH 64/79] bcm2708: don't register i2c controllers when using DT +Subject: [PATCH 64/92] 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. @@ -113843,10 +113842,10 @@ index a4286e9..a19f54d 100644 bcm_register_device(&bcm2835_hwmon_device); bcm_register_device(&bcm2835_thermal_device); -From 79e54a26c2c8c34bdae2fe2e38670479643e008e Mon Sep 17 00:00:00 2001 +From 0b7ede139e83da2ab7151e5cbf49f5a2581cf77e Mon Sep 17 00:00:00 2001 From: notro Date: Tue, 29 Jul 2014 11:05:39 +0200 -Subject: [PATCH 65/79] i2c: bcm2835: make driver available on ARCH_BCM2708 +Subject: [PATCH 65/92] i2c: bcm2835: make driver available on ARCH_BCM2708 Make this driver available on ARCH_BCM2708 @@ -113869,10 +113868,10 @@ index 6426811..73c9cfd 100644 If you say yes to this option, support will be included for the BCM2835 I2C controller. -From b4b7637c58d49afd88e39a7a02b99d3b87fb0feb Mon Sep 17 00:00:00 2001 +From 30f0ba5a38268e6d665954f5cfc5ef4921da9a30 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Fri, 25 Jul 2014 07:08:09 +0200 -Subject: [PATCH 66/79] Configure GPIOs for I2S based on revision/card settings +Subject: [PATCH 66/92] 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 @@ -114027,10 +114026,10 @@ index 0000000..94fed6a + +#endif -From ccc6d36d045acb40043635bd123924ec0a470920 Mon Sep 17 00:00:00 2001 +From e1b3205dea5df5f79f1a79efbb28d0cdb417a801 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 24 Jul 2014 21:24:03 +0100 -Subject: [PATCH 67/79] usb: core: make overcurrent messages more prominent +Subject: [PATCH 67/92] usb: core: make overcurrent messages more prominent Hub overcurrent messages are more serious than "debug". Increase loglevel. --- @@ -114038,10 +114037,10 @@ Hub overcurrent messages are more serious than "debug". Increase loglevel. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c -index 0e950ad..6b004cf 100644 +index 27f2171..7c88f04 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -4847,7 +4847,7 @@ static void port_event(struct usb_hub *hub, int port1) +@@ -4897,7 +4897,7 @@ static void port_event(struct usb_hub *hub, int port1) if (portchange & USB_PORT_STAT_C_OVERCURRENT) { u16 status = 0, unused; @@ -114051,10 +114050,10 @@ index 0e950ad..6b004cf 100644 USB_PORT_FEAT_C_OVER_CURRENT); msleep(100); /* Cool down */ -From ff963183dca11df32ba8ef1c1bfbb732f07a50a8 Mon Sep 17 00:00:00 2001 +From 45902ee57f86aab877156829d5ec20f5896b7bee Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Tue, 22 Jul 2014 15:41:04 +0100 -Subject: [PATCH 68/79] vcsm: VideoCore shared memory service for BCM2835 +Subject: [PATCH 68/92] 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 @@ -118387,10 +118386,10 @@ index 0000000..da1c523 +MODULE_DESCRIPTION("VideoCore SharedMemory Driver"); +MODULE_LICENSE("GPL v2"); -From 0765c9fb777f1b40097b74bbaf1944920ceae0d0 Mon Sep 17 00:00:00 2001 +From 8d75c89327ad590f4dbc606e97fc9e1bfa7fbf49 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 7 Aug 2014 02:03:50 +0100 -Subject: [PATCH 69/79] Revert "ARM: dma: Use dma_pfn_offset for dma address +Subject: [PATCH 69/92] Revert "ARM: dma: Use dma_pfn_offset for dma address translation" This reverts commit 6ce0d20016925d031f1e24d64302e4c976d7cec6. @@ -118442,10 +118441,10 @@ index c45b61a..0af6bd0 100644 } -From e9e133a3ad8d0946a687a3fc0c10aa7648952486 Mon Sep 17 00:00:00 2001 +From fbabba459c67f823b397a33882a980028502ea3d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 8 Aug 2014 16:22:59 +0100 -Subject: [PATCH 70/79] VCHIQ: Make service closure fully synchronous (drv) +Subject: [PATCH 70/92] VCHIQ: Make service closure fully synchronous (drv) This is one half of a two-part patch, the other half of which is to the vchiq_lib user library. With these patches, calls to @@ -118794,10 +118793,10 @@ index e248037..6137ae9 100644 #endif -From a3d776fb4bd5f334b87ce1959dfc6a1ff61b1717 Mon Sep 17 00:00:00 2001 +From 233b56a327a92c3aa78fe599c59c192b3ad224cc Mon Sep 17 00:00:00 2001 From: gellert Date: Tue, 29 Jul 2014 17:43:37 +0100 -Subject: [PATCH 71/79] dmaengine: expand functionality by supporting +Subject: [PATCH 71/92] dmaengine: expand functionality by supporting scatter/gather transfers sdhci-bcm2708 and dma.c: fix for LITE channels --- @@ -120092,10 +120091,10 @@ index 6e777f4..15445215 100644 - - -From 8988c7b87776c0335fe4df0634c686eec94e7353 Mon Sep 17 00:00:00 2001 +From 9bbcdf6daf5c3c7d857ff9969431b8b41089c194 Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:06 +0100 -Subject: [PATCH 72/79] MMC: added alternative MMC driver +Subject: [PATCH 72/92] MMC: added alternative MMC driver --- arch/arm/mach-bcm2708/bcm2708.c | 37 +- @@ -121776,10 +121775,10 @@ index 0000000..c50ff43 +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Gellert Weisz"); -From 4310177a783406d20efaeb01548956ebb5da2ff8 Mon Sep 17 00:00:00 2001 +From 89e297b793f62c7bf6c725419b37928d00a6c900 Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:59 +0100 -Subject: [PATCH 73/79] turn on new MMC driver +Subject: [PATCH 73/92] turn on new MMC driver --- arch/arm/configs/bcmrpi_defconfig | 7 +++++-- @@ -121812,10 +121811,10 @@ index 105bcbe..1b06882 100644 CONFIG_UIO_PDRV_GENIRQ=m CONFIG_STAGING=y -From 640da32da5bccd052eae65f49ad7ca5217d5d0ad Mon Sep 17 00:00:00 2001 +From 9e15b1d99263bd5bb80de6a9d408688e0ce0c9a4 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 10:06:56 +0200 -Subject: [PATCH 74/79] Added support for HiFiBerry DAC+ +Subject: [PATCH 74/92] 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. @@ -122039,10 +122038,10 @@ index 0000000..c63387b +MODULE_DESCRIPTION("ASoC Driver for HiFiBerry DAC+"); +MODULE_LICENSE("GPL v2"); -From 504990c26cf6a6e3ed42b5d2f917ff88d0244405 Mon Sep 17 00:00:00 2001 +From 06411e077731eea2573931325379ed81958c7c08 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 4 Aug 2014 16:47:36 +0200 -Subject: [PATCH 75/79] ASoC: BCM: Typo in RPi-DAC driver +Subject: [PATCH 75/92] ASoC: BCM: Typo in RPi-DAC driver This patch corrects a typo that originated from inattentive copy and paste. @@ -122068,10 +122067,10 @@ index ef3cd93..6d6e0ba 100644 .codec_dai_name = "pcm1794a-hifi", .platform_name = "bcm2708-i2s.0", -From 1349a252eb45cc1b8244ab3c882edb2539eb1049 Mon Sep 17 00:00:00 2001 +From 0a267ea51fa04dfa7cdfa7ae2f87120640ff0d63 Mon Sep 17 00:00:00 2001 From: Kari Suvanto Date: Tue, 19 Aug 2014 14:25:28 +0300 -Subject: [PATCH 76/79] usb: dwc: fix lockdep false positive +Subject: [PATCH 76/92] usb: dwc: fix lockdep false positive Os wrapper function for spinlock init causes lockdep to show this false positive splat during boot: @@ -122234,10 +122233,10 @@ index 40fb25c..ae0c72d 100644 pcd, core_if);//GRAYG if (!pcd->lock) { -From 51dd458f1097d92f4731fd497a54954fd8bcc0e5 Mon Sep 17 00:00:00 2001 +From 92463750c77bf0040424411fd70b26204db5cdc1 Mon Sep 17 00:00:00 2001 From: Kari Suvanto Date: Tue, 19 Aug 2014 14:38:24 +0300 -Subject: [PATCH 77/79] usb: dwc: fix inconsistent lock state +Subject: [PATCH 77/92] usb: dwc: fix inconsistent lock state Lockdep gives this splat during boot: [ 4.136748] ================================= @@ -122345,10 +122344,33 @@ index 8706a5c..17d3030 100644 } -From da3f2d954e5ba726ce0183d8909128351f27a393 Mon Sep 17 00:00:00 2001 +From 16c3f0f68eb7a2f4751a9f93babf22d3c3830b3f Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 19 Aug 2014 00:25:00 +0100 +Subject: [PATCH 78/92] bcm2708: Enable bcm2835_mmc by default + +--- + arch/arm/mach-bcm2708/bcm2708.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c +index cf421ee..ac30e14 100644 +--- a/arch/arm/mach-bcm2708/bcm2708.c ++++ b/arch/arm/mach-bcm2708/bcm2708.c +@@ -92,7 +92,7 @@ static unsigned disk_led_active_low = 1; + static unsigned reboot_part = 0; + static unsigned w1_gpio_pin = W1_GPIO; + static unsigned w1_gpio_pullup = W1_PULLUP; +-static unsigned bcm2835_mmc = 0; ++static unsigned bcm2835_mmc = 1; + + static void __init bcm2708_init_led(void); + + +From 8e288e5e667d46d5acb696cb5e4e84c6249f8905 Mon Sep 17 00:00:00 2001 From: android Date: Mon, 25 Aug 2014 06:54:19 +0100 -Subject: [PATCH 78/79] bcm2708_fb : Implement blanking support using the +Subject: [PATCH 79/92] bcm2708_fb : Implement blanking support using the mailbox property interface This implementation uses the userspace request style of an array of unsigned @@ -122435,25 +122457,1522 @@ index b3b1e04..b25dd5b 100644 const struct fb_fillrect *rect) { -From 181fffaab3e595a14da7ce920025b0c0c82879d4 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Tue, 19 Aug 2014 00:25:00 +0100 -Subject: [PATCH 79/79] bcm2708: Enable bcm2835_mmc by default +From 7be5982a8515bb345dee85a5f0fb2c19ff4ce53d Mon Sep 17 00:00:00 2001 +From: Daniel Matuschek +Date: Mon, 4 Aug 2014 11:09:58 +0200 +Subject: [PATCH 80/92] 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. --- - arch/arm/mach-bcm2708/bcm2708.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + arch/arm/configs/bcmrpi_defconfig | 1 + + arch/arm/mach-bcm2708/bcm2708.c | 20 ++ + sound/soc/bcm/Kconfig | 7 + + sound/soc/bcm/Makefile | 2 + + sound/soc/bcm/hifiberry_amp.c | 106 +++++++++++ + sound/soc/codecs/Kconfig | 4 + + sound/soc/codecs/Makefile | 2 + + sound/soc/codecs/tas5713.c | 371 ++++++++++++++++++++++++++++++++++++++ + sound/soc/codecs/tas5713.h | 210 +++++++++++++++++++++ + 9 files changed, 723 insertions(+) + create mode 100644 sound/soc/bcm/hifiberry_amp.c + create mode 100644 sound/soc/codecs/tas5713.c + create mode 100644 sound/soc/codecs/tas5713.h +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 4d70168..742548f 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -749,6 +749,7 @@ CONFIG_SND_BCM2708_SOC_I2S=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m ++CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m + CONFIG_SND_BCM2708_SOC_RPI_DAC=m + CONFIG_SND_SOC_I2C_AND_SPI=m + CONFIG_SND_SOC_PCM5102A=m diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c -index cf421ee..ac30e14 100644 +index ac30e14..527deaa 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -92,7 +92,7 @@ static unsigned disk_led_active_low = 1; - static unsigned reboot_part = 0; - static unsigned w1_gpio_pin = W1_GPIO; - static unsigned w1_gpio_pullup = W1_PULLUP; --static unsigned bcm2835_mmc = 0; -+static unsigned bcm2835_mmc = 1; +@@ -703,6 +703,20 @@ static struct i2c_board_info __initdata snd_wm8804_i2c_devices[] = { - static void __init bcm2708_init_led(void); + #endif ++#if defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) || defined(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP_MODULE) ++static struct platform_device snd_hifiberry_amp_device = { ++ .name = "snd-hifiberry-amp", ++ .id = 0, ++ .num_resources = 0, ++}; ++ ++static struct i2c_board_info __initdata snd_tas5713_i2c_devices[] = { ++ { ++ I2C_BOARD_INFO("tas5713", 0x1b) ++ }, ++}; ++#endif ++ + #if defined(CONFIG_SND_BCM2708_SOC_RPI_DAC) || defined(CONFIG_SND_BCM2708_SOC_RPI_DAC_MODULE) + static struct platform_device snd_rpi_dac_device = { + .name = "snd-rpi-dac", +@@ -903,6 +917,12 @@ void __init bcm2708_init(void) + i2c_register_board_info(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)); ++#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); +diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig +index 926a82b..a562ddf 100644 +--- a/sound/soc/bcm/Kconfig ++++ b/sound/soc/bcm/Kconfig +@@ -40,6 +40,13 @@ config SND_BCM2708_SOC_HIFIBERRY_DIGI + help + Say Y or M if you want to add support for HifiBerry Digi S/PDIF output board. + ++config SND_BCM2708_SOC_HIFIBERRY_AMP ++ tristate "Support for the HifiBerry Amp" ++ depends on SND_BCM2708_SOC_I2S ++ select SND_SOC_TAS5713 ++ help ++ Say Y or M if you want to add support for the HifiBerry Amp amplifier board. ++ + config SND_BCM2708_SOC_RPI_DAC + tristate "Support for RPi-DAC" + depends on SND_BCM2708_SOC_I2S +diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile +index c02e3a2..17ea2b0 100644 +--- a/sound/soc/bcm/Makefile ++++ b/sound/soc/bcm/Makefile +@@ -12,11 +12,13 @@ obj-$(CONFIG_SND_BCM2708_SOC_I2S) += snd-soc-bcm2708-i2s.o + snd-soc-hifiberry-dac-objs := hifiberry_dac.o + snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o + snd-soc-hifiberry-digi-objs := hifiberry_digi.o ++snd-soc-hifiberry-amp-objs := hifiberry_amp.o + snd-soc-rpi-dac-objs := rpi-dac.o + snd-soc-iqaudio-dac-objs := iqaudio-dac.o + + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o ++obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o + obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o +diff --git a/sound/soc/bcm/hifiberry_amp.c b/sound/soc/bcm/hifiberry_amp.c +new file mode 100644 +index 0000000..1e87ee0 +--- /dev/null ++++ b/sound/soc/bcm/hifiberry_amp.c +@@ -0,0 +1,106 @@ ++/* ++ * ASoC Driver for HifiBerry AMP ++ * ++ * Author: Sebastian Eickhoff ++ * Copyright 2014 ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++static int snd_rpi_hifiberry_amp_init(struct snd_soc_pcm_runtime *rtd) ++{ ++ // ToDo: init of the dsp-registers. ++ return 0; ++} ++ ++static int snd_rpi_hifiberry_amp_hw_params( struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params ) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; ++ ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, 64); ++} ++ ++static struct snd_soc_ops snd_rpi_hifiberry_amp_ops = { ++ .hw_params = snd_rpi_hifiberry_amp_hw_params, ++}; ++ ++static struct snd_soc_dai_link snd_rpi_hifiberry_amp_dai[] = { ++ { ++ .name = "HifiBerry AMP", ++ .stream_name = "HifiBerry AMP HiFi", ++ .cpu_dai_name = "bcm2708-i2s.0", ++ .codec_dai_name = "tas5713-hifi", ++ .platform_name = "bcm2708-i2s.0", ++ .codec_name = "tas5713.1-001b", ++ .dai_fmt = SND_SOC_DAIFMT_I2S | ++ SND_SOC_DAIFMT_NB_NF | ++ SND_SOC_DAIFMT_CBS_CFS, ++ .ops = &snd_rpi_hifiberry_amp_ops, ++ .init = snd_rpi_hifiberry_amp_init, ++ }, ++}; ++ ++ ++static struct snd_soc_card snd_rpi_hifiberry_amp = { ++ .name = "snd_rpi_hifiberry_amp", ++ .dai_link = snd_rpi_hifiberry_amp_dai, ++ .num_links = ARRAY_SIZE(snd_rpi_hifiberry_amp_dai), ++}; ++ ++ ++static int snd_rpi_hifiberry_amp_probe(struct platform_device *pdev) ++{ ++ int ret = 0; ++ ++ snd_rpi_hifiberry_amp.dev = &pdev->dev; ++ ++ ret = snd_soc_register_card(&snd_rpi_hifiberry_amp); ++ ++ if (ret != 0) { ++ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret); ++ } ++ ++ return ret; ++} ++ ++ ++static int snd_rpi_hifiberry_amp_remove(struct platform_device *pdev) ++{ ++ return snd_soc_unregister_card(&snd_rpi_hifiberry_amp); ++} ++ ++ ++static struct platform_driver snd_rpi_hifiberry_amp_driver = { ++ .driver = { ++ .name = "snd-hifiberry-amp", ++ .owner = THIS_MODULE, ++ }, ++ .probe = snd_rpi_hifiberry_amp_probe, ++ .remove = snd_rpi_hifiberry_amp_remove, ++}; ++ ++ ++module_platform_driver(snd_rpi_hifiberry_amp_driver); ++ ++ ++MODULE_AUTHOR("Sebastian Eickhoff "); ++MODULE_DESCRIPTION("ASoC driver for HiFiBerry-AMP"); ++MODULE_LICENSE("GPL v2"); +diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig +index 0309507..569c18b 100644 +--- a/sound/soc/codecs/Kconfig ++++ b/sound/soc/codecs/Kconfig +@@ -96,6 +96,7 @@ config SND_SOC_ALL_CODECS + select SND_SOC_TAS5086 if I2C + select SND_SOC_TLV320AIC23_I2C if I2C + select SND_SOC_TLV320AIC23_SPI if SPI_MASTER ++ select SND_SOC_TAS5713 if I2C + select SND_SOC_TLV320AIC26 if SPI_MASTER + select SND_SOC_TLV320AIC31XX if I2C + select SND_SOC_TLV320AIC32X4 if I2C +@@ -533,6 +534,9 @@ config SND_SOC_TAS5086 + tristate "Texas Instruments TAS5086 speaker amplifier" + depends on I2C + ++config SND_SOC_TAS5713 ++ tristate ++ + config SND_SOC_TLV320AIC23 + tristate + +diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile +index 64a04fb..edfa85c 100644 +--- a/sound/soc/codecs/Makefile ++++ b/sound/soc/codecs/Makefile +@@ -95,6 +95,7 @@ snd-soc-sta350-objs := sta350.o + snd-soc-sta529-objs := sta529.o + snd-soc-stac9766-objs := stac9766.o + snd-soc-tas5086-objs := tas5086.o ++snd-soc-tas5713-objs := tas5713.o + snd-soc-tlv320aic23-objs := tlv320aic23.o + snd-soc-tlv320aic23-i2c-objs := tlv320aic23-i2c.o + snd-soc-tlv320aic23-spi-objs := tlv320aic23-spi.o +@@ -260,6 +261,7 @@ obj-$(CONFIG_SND_SOC_STA350) += snd-soc-sta350.o + obj-$(CONFIG_SND_SOC_STA529) += snd-soc-sta529.o + obj-$(CONFIG_SND_SOC_STAC9766) += snd-soc-stac9766.o + obj-$(CONFIG_SND_SOC_TAS5086) += snd-soc-tas5086.o ++obj-$(CONFIG_SND_SOC_TAS5713) += snd-soc-tas5713.o + obj-$(CONFIG_SND_SOC_TLV320AIC23) += snd-soc-tlv320aic23.o + obj-$(CONFIG_SND_SOC_TLV320AIC23_I2C) += snd-soc-tlv320aic23-i2c.o + obj-$(CONFIG_SND_SOC_TLV320AIC23_SPI) += snd-soc-tlv320aic23-spi.o +diff --git a/sound/soc/codecs/tas5713.c b/sound/soc/codecs/tas5713.c +new file mode 100644 +index 0000000..ee96a12 +--- /dev/null ++++ b/sound/soc/codecs/tas5713.c +@@ -0,0 +1,371 @@ ++/* ++ * ASoC Driver for TAS5713 ++ * ++ * Author: Sebastian Eickhoff ++ * Copyright 2014 ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include "tas5713.h" ++ ++ ++static struct i2c_client *i2c; ++ ++struct tas5713_priv { ++ struct regmap *regmap; ++ int mclk_div; ++ struct snd_soc_codec *codec; ++}; ++ ++static struct tas5713_priv *priv_data; ++ ++ ++ ++ ++/* ++ * _ _ ___ _ ___ _ _ ++ * /_\ | | / __| /_\ / __|___ _ _| |_ _ _ ___| |___ ++ * / _ \| |__\__ \/ _ \ | (__/ _ \ ' \ _| '_/ _ \ (_-< ++ * /_/ \_\____|___/_/ \_\ \___\___/_||_\__|_| \___/_/__/ ++ * ++ */ ++ ++static const DECLARE_TLV_DB_SCALE(tas5713_vol_tlv, -10000, 50, 1); ++ ++ ++static const struct snd_kcontrol_new tas5713_snd_controls[] = { ++ SOC_SINGLE_TLV ("Master" , TAS5713_VOL_MASTER, 0, 248, 1, tas5713_vol_tlv), ++ SOC_DOUBLE_R_TLV("Channels" , TAS5713_VOL_CH1, TAS5713_VOL_CH2, 0, 248, 1, tas5713_vol_tlv) ++}; ++ ++ ++ ++ ++/* ++ * __ __ _ _ ___ _ ++ * | \/ |__ _ __| |_ (_)_ _ ___ | \ _ _(_)_ _____ _ _ ++ * | |\/| / _` / _| ' \| | ' \/ -_) | |) | '_| \ V / -_) '_| ++ * |_| |_\__,_\__|_||_|_|_||_\___| |___/|_| |_|\_/\___|_| ++ * ++ */ ++ ++static int tas5713_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params, ++ struct snd_soc_dai *dai) ++{ ++ u16 blen = 0x00; ++ ++ struct snd_soc_codec *codec; ++ codec = dai->codec; ++ priv_data->codec = dai->codec; ++ ++ switch (params_format(params)) { ++ case SNDRV_PCM_FORMAT_S16_LE: ++ blen = 0x03; ++ break; ++ case SNDRV_PCM_FORMAT_S20_3LE: ++ blen = 0x1; ++ break; ++ case SNDRV_PCM_FORMAT_S24_LE: ++ blen = 0x04; ++ break; ++ case SNDRV_PCM_FORMAT_S32_LE: ++ blen = 0x05; ++ break; ++ default: ++ dev_err(dai->dev, "Unsupported word length: %u\n", ++ params_format(params)); ++ return -EINVAL; ++ } ++ ++ // set word length ++ snd_soc_update_bits(codec, TAS5713_SERIAL_DATA_INTERFACE, 0x7, blen); ++ ++ return 0; ++} ++ ++ ++static int tas5713_mute_stream(struct snd_soc_dai *dai, int mute, int stream) ++{ ++ unsigned int val = 0; ++ ++ struct tas5713_priv *tas5713; ++ struct snd_soc_codec *codec = dai->codec; ++ tas5713 = snd_soc_codec_get_drvdata(codec); ++ ++ if (mute) { ++ val = TAS5713_SOFT_MUTE_ALL; ++ } ++ ++ return regmap_write(tas5713->regmap, TAS5713_SOFT_MUTE, val); ++} ++ ++ ++static const struct snd_soc_dai_ops tas5713_dai_ops = { ++ .hw_params = tas5713_hw_params, ++ .mute_stream = tas5713_mute_stream, ++}; ++ ++ ++static struct snd_soc_dai_driver tas5713_dai = { ++ .name = "tas5713-hifi", ++ .playback = { ++ .stream_name = "Playback", ++ .channels_min = 2, ++ .channels_max = 2, ++ .rates = SNDRV_PCM_RATE_8000_48000, ++ .formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE ), ++ }, ++ .ops = &tas5713_dai_ops, ++}; ++ ++ ++ ++ ++/* ++ * ___ _ ___ _ ++ * / __|___ __| |___ __ | \ _ _(_)_ _____ _ _ ++ * | (__/ _ \/ _` / -_) _| | |) | '_| \ V / -_) '_| ++ * \___\___/\__,_\___\__| |___/|_| |_|\_/\___|_| ++ * ++ */ ++ ++static int tas5713_remove(struct snd_soc_codec *codec) ++{ ++ struct tas5713_priv *tas5713; ++ ++ tas5713 = snd_soc_codec_get_drvdata(codec); ++ ++ return 0; ++} ++ ++ ++static int tas5713_probe(struct snd_soc_codec *codec) ++{ ++ struct tas5713_priv *tas5713; ++ int i, ret; ++ ++ i2c = container_of(codec->dev, struct i2c_client, dev); ++ ++ tas5713 = snd_soc_codec_get_drvdata(codec); ++ ++ codec->control_data = tas5713->regmap; ++ ++ ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP); ++ if (ret < 0) { ++ dev_err(codec->dev, "Failed to set cache i/o: %d\n", ret); ++ return ret; ++ } ++ ++ // Reset error ++ ret = snd_soc_write(codec, TAS5713_ERROR_STATUS, 0x00); ++ ++ // Trim oscillator ++ ret = snd_soc_write(codec, TAS5713_OSC_TRIM, 0x00); ++ msleep(1000); ++ ++ // Reset error ++ ret = snd_soc_write(codec, TAS5713_ERROR_STATUS, 0x00); ++ ++ // Clock mode: 44/48kHz, MCLK=64xfs ++ ret = snd_soc_write(codec, TAS5713_CLOCK_CTRL, 0x60); ++ ++ // I2S 24bit ++ ret = snd_soc_write(codec, TAS5713_SERIAL_DATA_INTERFACE, 0x05); ++ ++ // Unmute ++ ret = snd_soc_write(codec, TAS5713_SYSTEM_CTRL2, 0x00); ++ ret = snd_soc_write(codec, TAS5713_SOFT_MUTE, 0x00); ++ ++ // Set volume to 0db ++ ret = snd_soc_write(codec, TAS5713_VOL_MASTER, 0x00); ++ ++ // Now start programming the default initialization sequence ++ for (i = 0; i < ARRAY_SIZE(tas5713_init_sequence); ++i) { ++ ret = i2c_master_send(i2c, ++ tas5713_init_sequence[i].data, ++ tas5713_init_sequence[i].size); ++ ++ if (ret < 0) { ++ printk(KERN_INFO "TAS5713 CODEC PROBE: InitSeq returns: %d\n", ret); ++ } ++ } ++ ++ // Unmute ++ ret = snd_soc_write(codec, TAS5713_SYSTEM_CTRL2, 0x00); ++ ++ ++ return 0; ++} ++ ++ ++static struct snd_soc_codec_driver soc_codec_dev_tas5713 = { ++ .probe = tas5713_probe, ++ .remove = tas5713_remove, ++ .controls = tas5713_snd_controls, ++ .num_controls = ARRAY_SIZE(tas5713_snd_controls), ++}; ++ ++ ++ ++ ++/* ++ * ___ ___ ___ ___ _ ++ * |_ _|_ ) __| | \ _ _(_)_ _____ _ _ ++ * | | / / (__ | |) | '_| \ V / -_) '_| ++ * |___/___\___| |___/|_| |_|\_/\___|_| ++ * ++ */ ++ ++static const struct reg_default tas5713_reg_defaults[] = { ++ { 0x07 ,0x80 }, // R7 - VOL_MASTER - -40dB ++ { 0x08 , 30 }, // R8 - VOL_CH1 - 0dB ++ { 0x09 , 30 }, // R9 - VOL_CH2 - 0dB ++ { 0x0A ,0x80 }, // R10 - VOL_HEADPHONE - -40dB ++}; ++ ++ ++static bool tas5713_reg_volatile(struct device *dev, unsigned int reg) ++{ ++ switch (reg) { ++ case TAS5713_DEVICE_ID: ++ case TAS5713_ERROR_STATUS: ++ return true; ++ default: ++ return false; ++ } ++} ++ ++ ++static const struct of_device_id tas5713_of_match[] = { ++ { .compatible = "ti,tas5713", }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, tas5713_of_match); ++ ++ ++static struct regmap_config tas5713_regmap_config = { ++ .reg_bits = 8, ++ .val_bits = 8, ++ ++ .max_register = TAS5713_MAX_REGISTER, ++ .volatile_reg = tas5713_reg_volatile, ++ ++ .cache_type = REGCACHE_RBTREE, ++ .reg_defaults = tas5713_reg_defaults, ++ .num_reg_defaults = ARRAY_SIZE(tas5713_reg_defaults), ++}; ++ ++ ++static int tas5713_i2c_probe(struct i2c_client *i2c, ++ const struct i2c_device_id *id) ++{ ++ int ret; ++ ++ priv_data = devm_kzalloc(&i2c->dev, sizeof *priv_data, GFP_KERNEL); ++ if (!priv_data) ++ return -ENOMEM; ++ ++ priv_data->regmap = devm_regmap_init_i2c(i2c, &tas5713_regmap_config); ++ if (IS_ERR(priv_data->regmap)) { ++ ret = PTR_ERR(priv_data->regmap); ++ return ret; ++ } ++ ++ i2c_set_clientdata(i2c, priv_data); ++ ++ ret = snd_soc_register_codec(&i2c->dev, ++ &soc_codec_dev_tas5713, &tas5713_dai, 1); ++ ++ return ret; ++} ++ ++ ++static int tas5713_i2c_remove(struct i2c_client *i2c) ++{ ++ snd_soc_unregister_codec(&i2c->dev); ++ i2c_set_clientdata(i2c, NULL); ++ ++ kfree(priv_data); ++ ++ return 0; ++} ++ ++ ++static const struct i2c_device_id tas5713_i2c_id[] = { ++ { "tas5713", 0 }, ++ { } ++}; ++ ++MODULE_DEVICE_TABLE(i2c, tas5713_i2c_id); ++ ++ ++static struct i2c_driver tas5713_i2c_driver = { ++ .driver = { ++ .name = "tas5713", ++ .owner = THIS_MODULE, ++ .of_match_table = tas5713_of_match, ++ }, ++ .probe = tas5713_i2c_probe, ++ .remove = tas5713_i2c_remove, ++ .id_table = tas5713_i2c_id ++}; ++ ++ ++static int __init tas5713_modinit(void) ++{ ++ int ret = 0; ++ int err = -1; ++ ++ ret = i2c_add_driver(&tas5713_i2c_driver); ++ if (ret) { ++ printk(KERN_ERR "Failed to register tas5713 I2C driver: %d\n", ++ ret); ++ } ++ ++ return ret; ++} ++module_init(tas5713_modinit); ++ ++ ++static void __exit tas5713_exit(void) ++{ ++ i2c_del_driver(&tas5713_i2c_driver); ++} ++module_exit(tas5713_exit); ++ ++ ++MODULE_AUTHOR("Sebastian Eickhoff "); ++MODULE_DESCRIPTION("ASoC driver for TAS5713"); ++MODULE_LICENSE("GPL v2"); +diff --git a/sound/soc/codecs/tas5713.h b/sound/soc/codecs/tas5713.h +new file mode 100644 +index 0000000..8f019e0 +--- /dev/null ++++ b/sound/soc/codecs/tas5713.h +@@ -0,0 +1,210 @@ ++/* ++ * ASoC Driver for TAS5713 ++ * ++ * Author: Sebastian Eickhoff ++ * Copyright 2014 ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ */ ++ ++#ifndef _TAS5713_H ++#define _TAS5713_H ++ ++ ++// TAS5713 I2C-bus register addresses ++ ++#define TAS5713_CLOCK_CTRL 0x00 ++#define TAS5713_DEVICE_ID 0x01 ++#define TAS5713_ERROR_STATUS 0x02 ++#define TAS5713_SYSTEM_CTRL1 0x03 ++#define TAS5713_SERIAL_DATA_INTERFACE 0x04 ++#define TAS5713_SYSTEM_CTRL2 0x05 ++#define TAS5713_SOFT_MUTE 0x06 ++#define TAS5713_VOL_MASTER 0x07 ++#define TAS5713_VOL_CH1 0x08 ++#define TAS5713_VOL_CH2 0x09 ++#define TAS5713_VOL_HEADPHONE 0x0A ++#define TAS5713_VOL_CONFIG 0x0E ++#define TAS5713_MODULATION_LIMIT 0x10 ++#define TAS5713_IC_DLY_CH1 0x11 ++#define TAS5713_IC_DLY_CH2 0x12 ++#define TAS5713_IC_DLY_CH3 0x13 ++#define TAS5713_IC_DLY_CH4 0x14 ++ ++#define TAS5713_START_STOP_PERIOD 0x1A ++#define TAS5713_OSC_TRIM 0x1B ++#define TAS5713_BKND_ERR 0x1C ++ ++#define TAS5713_INPUT_MUX 0x20 ++#define TAS5713_SRC_SELECT_CH4 0x21 ++#define TAS5713_PWM_MUX 0x25 ++ ++#define TAS5713_CH1_BQ0 0x29 ++#define TAS5713_CH1_BQ1 0x2A ++#define TAS5713_CH1_BQ2 0x2B ++#define TAS5713_CH1_BQ3 0x2C ++#define TAS5713_CH1_BQ4 0x2D ++#define TAS5713_CH1_BQ5 0x2E ++#define TAS5713_CH1_BQ6 0x2F ++#define TAS5713_CH1_BQ7 0x58 ++#define TAS5713_CH1_BQ8 0x59 ++ ++#define TAS5713_CH2_BQ0 0x30 ++#define TAS5713_CH2_BQ1 0x31 ++#define TAS5713_CH2_BQ2 0x32 ++#define TAS5713_CH2_BQ3 0x33 ++#define TAS5713_CH2_BQ4 0x34 ++#define TAS5713_CH2_BQ5 0x35 ++#define TAS5713_CH2_BQ6 0x36 ++#define TAS5713_CH2_BQ7 0x5C ++#define TAS5713_CH2_BQ8 0x5D ++ ++#define TAS5713_CH4_BQ0 0x5A ++#define TAS5713_CH4_BQ1 0x5B ++#define TAS5713_CH3_BQ0 0x5E ++#define TAS5713_CH3_BQ1 0x5F ++ ++#define TAS5713_DRC1_SOFTENING_FILTER_ALPHA_OMEGA 0x3B ++#define TAS5713_DRC1_ATTACK_RELEASE_RATE 0x3C ++#define TAS5713_DRC2_SOFTENING_FILTER_ALPHA_OMEGA 0x3E ++#define TAS5713_DRC2_ATTACK_RELEASE_RATE 0x3F ++#define TAS5713_DRC1_ATTACK_RELEASE_THRES 0x40 ++#define TAS5713_DRC2_ATTACK_RELEASE_THRES 0x43 ++#define TAS5713_DRC_CTRL 0x46 ++ ++#define TAS5713_BANK_SW_CTRL 0x50 ++#define TAS5713_CH1_OUTPUT_MIXER 0x51 ++#define TAS5713_CH2_OUTPUT_MIXER 0x52 ++#define TAS5713_CH1_INPUT_MIXER 0x53 ++#define TAS5713_CH2_INPUT_MIXER 0x54 ++#define TAS5713_OUTPUT_POST_SCALE 0x56 ++#define TAS5713_OUTPUT_PRESCALE 0x57 ++ ++#define TAS5713_IDF_POST_SCALE 0x62 ++ ++#define TAS5713_CH1_INLINE_MIXER 0x70 ++#define TAS5713_CH1_INLINE_DRC_EN_MIXER 0x71 ++#define TAS5713_CH1_R_CHANNEL_MIXER 0x72 ++#define TAS5713_CH1_L_CHANNEL_MIXER 0x73 ++#define TAS5713_CH2_INLINE_MIXER 0x74 ++#define TAS5713_CH2_INLINE_DRC_EN_MIXER 0x75 ++#define TAS5713_CH2_L_CHANNEL_MIXER 0x76 ++#define TAS5713_CH2_R_CHANNEL_MIXER 0x77 ++ ++#define TAS5713_UPDATE_DEV_ADDR_KEY 0xF8 ++#define TAS5713_UPDATE_DEV_ADDR_REG 0xF9 ++ ++#define TAS5713_REGISTER_COUNT 0x46 ++#define TAS5713_MAX_REGISTER 0xF9 ++ ++ ++// Bitmasks for registers ++#define TAS5713_SOFT_MUTE_ALL 0x07 ++ ++ ++ ++struct tas5713_init_command { ++ const int size; ++ const char *const data; ++}; ++ ++static const struct tas5713_init_command tas5713_init_sequence[] = { ++ ++ // Trim oscillator ++ { .size = 2, .data = "\x1B\x00" }, ++ // System control register 1 (0x03): block DC ++ { .size = 2, .data = "\x03\x80" }, ++ // Mute everything ++ { .size = 2, .data = "\x05\x40" }, ++ // Modulation limit register (0x10): 97.7% ++ { .size = 2, .data = "\x10\x02" }, ++ // Interchannel delay registers ++ // (0x11, 0x12, 0x13, and 0x14): BD mode ++ { .size = 2, .data = "\x11\xB8" }, ++ { .size = 2, .data = "\x12\x60" }, ++ { .size = 2, .data = "\x13\xA0" }, ++ { .size = 2, .data = "\x14\x48" }, ++ // PWM shutdown group register (0x19): no shutdown ++ { .size = 2, .data = "\x19\x00" }, ++ // Input multiplexer register (0x20): BD mode ++ { .size = 2, .data = "\x20\x00\x89\x77\x72" }, ++ // PWM output mux register (0x25) ++ // Channel 1 --> OUTA, channel 1 neg --> OUTB ++ // Channel 2 --> OUTC, channel 2 neg --> OUTD ++ { .size = 5, .data = "\x25\x01\x02\x13\x45" }, ++ // DRC control (0x46): DRC off ++ { .size = 5, .data = "\x46\x00\x00\x00\x00" }, ++ // BKND_ERR register (0x1C): 299ms reset period ++ { .size = 2, .data = "\x1C\x07" }, ++ // Mute channel 3 ++ { .size = 2, .data = "\x0A\xFF" }, ++ // Volume configuration register (0x0E): volume slew 512 steps ++ { .size = 2, .data = "\x0E\x90" }, ++ // Clock control register (0x00): 44/48kHz, MCLK=64xfs ++ { .size = 2, .data = "\x00\x60" }, ++ // Bank switch and eq control (0x50): no bank switching ++ { .size = 5, .data = "\x50\x00\x00\x00\x00" }, ++ // Volume registers (0x07, 0x08, 0x09, 0x0A) ++ { .size = 2, .data = "\x07\x20" }, ++ { .size = 2, .data = "\x08\x30" }, ++ { .size = 2, .data = "\x09\x30" }, ++ { .size = 2, .data = "\x0A\xFF" }, ++ // 0x72, 0x73, 0x76, 0x77 input mixer: ++ // no intermix between channels ++ { .size = 5, .data = "\x72\x00\x00\x00\x00" }, ++ { .size = 5, .data = "\x73\x00\x80\x00\x00" }, ++ { .size = 5, .data = "\x76\x00\x00\x00\x00" }, ++ { .size = 5, .data = "\x77\x00\x80\x00\x00" }, ++ // 0x70, 0x71, 0x74, 0x75 inline DRC mixer: ++ // no inline DRC inmix ++ { .size = 5, .data = "\x70\x00\x80\x00\x00" }, ++ { .size = 5, .data = "\x71\x00\x00\x00\x00" }, ++ { .size = 5, .data = "\x74\x00\x80\x00\x00" }, ++ { .size = 5, .data = "\x75\x00\x00\x00\x00" }, ++ // 0x56, 0x57 Output scale ++ { .size = 5, .data = "\x56\x00\x80\x00\x00" }, ++ { .size = 5, .data = "\x57\x00\x02\x00\x00" }, ++ // 0x3B, 0x3c ++ { .size = 9, .data = "\x3B\x00\x08\x00\x00\x00\x78\x00\x00" }, ++ { .size = 9, .data = "\x3C\x00\x00\x01\x00\xFF\xFF\xFF\x00" }, ++ { .size = 9, .data = "\x3E\x00\x08\x00\x00\x00\x78\x00\x00" }, ++ { .size = 9, .data = "\x3F\x00\x00\x01\x00\xFF\xFF\xFF\x00" }, ++ { .size = 9, .data = "\x40\x00\x00\x01\x00\xFF\xFF\xFF\x00" }, ++ { .size = 9, .data = "\x43\x00\x00\x01\x00\xFF\xFF\xFF\x00" }, ++ // 0x51, 0x52: output mixer ++ { .size = 9, .data = "\x51\x00\x80\x00\x00\x00\x00\x00\x00" }, ++ { .size = 9, .data = "\x52\x00\x80\x00\x00\x00\x00\x00\x00" }, ++ // PEQ defaults ++ { .size = 21, .data = "\x29\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++ { .size = 21, .data = "\x2A\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++ { .size = 21, .data = "\x2B\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++ { .size = 21, .data = "\x2C\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++ { .size = 21, .data = "\x2D\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++ { .size = 21, .data = "\x2E\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++ { .size = 21, .data = "\x2F\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++ { .size = 21, .data = "\x30\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++ { .size = 21, .data = "\x31\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++ { .size = 21, .data = "\x32\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++ { .size = 21, .data = "\x33\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++ { .size = 21, .data = "\x34\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++ { .size = 21, .data = "\x35\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++ { .size = 21, .data = "\x36\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++ { .size = 21, .data = "\x58\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++ { .size = 21, .data = "\x59\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++ { .size = 21, .data = "\x5C\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++ { .size = 21, .data = "\x5D\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++ { .size = 21, .data = "\x5E\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++ { .size = 21, .data = "\x5F\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++ { .size = 21, .data = "\x5A\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++ { .size = 21, .data = "\x5B\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, ++}; ++ ++ ++#endif /* _TAS5713_H */ + +From 0f0f41157f6f1525ec47cd92e87667c3cd574b02 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 12 Sep 2014 14:33:41 +0100 +Subject: [PATCH 81/92] Revert "ASoc: Don't report S24_LE support, it produces + white noise with xbmc" + +This reverts commit db761a2a596f655673d41d329bcfc954c68e6e02. +--- + sound/soc/bcm/bcm2708-i2s.c | 2 +- + sound/soc/codecs/pcm5102a.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sound/soc/bcm/bcm2708-i2s.c b/sound/soc/bcm/bcm2708-i2s.c +index 905f076..128c158 100644 +--- a/sound/soc/bcm/bcm2708-i2s.c ++++ b/sound/soc/bcm/bcm2708-i2s.c +@@ -785,7 +785,7 @@ static struct snd_soc_dai_driver bcm2708_i2s_dai = { + .channels_max = 2, + .rates = SNDRV_PCM_RATE_8000_192000, + .formats = SNDRV_PCM_FMTBIT_S16_LE +- // | SNDRV_PCM_FMTBIT_S24_LE : disable for now, it causes white noise with xbmc ++ | SNDRV_PCM_FMTBIT_S24_LE + | SNDRV_PCM_FMTBIT_S32_LE + }, + .capture = { +diff --git a/sound/soc/codecs/pcm5102a.c b/sound/soc/codecs/pcm5102a.c +index 7812d34..126f1e9 100644 +--- a/sound/soc/codecs/pcm5102a.c ++++ b/sound/soc/codecs/pcm5102a.c +@@ -28,7 +28,7 @@ static struct snd_soc_dai_driver pcm5102a_dai = { + .channels_max = 2, + .rates = SNDRV_PCM_RATE_8000_192000, + .formats = SNDRV_PCM_FMTBIT_S16_LE | +- // SNDRV_PCM_FMTBIT_S24_LE | : disable for now, it causes white noise with xbmc ++ SNDRV_PCM_FMTBIT_S24_LE | + SNDRV_PCM_FMTBIT_S32_LE + }, + }; + +From 737341cede36eba1f41f0193dc4957624398e46d Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Sat, 13 Sep 2014 10:52:04 +0100 +Subject: [PATCH 82/92] bcm2708-i2s: Update bclk_ratio to more correct values + +--- + sound/soc/bcm/bcm2708-i2s.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/sound/soc/bcm/bcm2708-i2s.c b/sound/soc/bcm/bcm2708-i2s.c +index 128c158..f1859b2 100644 +--- a/sound/soc/bcm/bcm2708-i2s.c ++++ b/sound/soc/bcm/bcm2708-i2s.c +@@ -411,15 +411,15 @@ static int bcm2708_i2s_hw_params(struct snd_pcm_substream *substream, + switch (params_format(params)) { + case SNDRV_PCM_FORMAT_S16_LE: + data_length = 16; +- bclk_ratio = 40; ++ bclk_ratio = 50; + break; + case SNDRV_PCM_FORMAT_S24_LE: + data_length = 24; +- bclk_ratio = 40; ++ bclk_ratio = 50; + break; + case SNDRV_PCM_FORMAT_S32_LE: + data_length = 32; +- bclk_ratio = 80; ++ bclk_ratio = 100; + break; + default: + return -EINVAL; + +From ba76bd6851e91bdd554ef9f210e7f31ed12159f9 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 16 Sep 2014 15:10:10 +0100 +Subject: [PATCH 83/92] config: Add module SND_SIMPLE_CARD + +--- + 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 742548f..73fcb9d 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -755,6 +755,7 @@ CONFIG_SND_SOC_I2C_AND_SPI=m + CONFIG_SND_SOC_PCM5102A=m + CONFIG_SND_SOC_PCM1794A=m + CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m ++CONFIG_SND_SIMPLE_CARD=m + CONFIG_SOUND_PRIME=m + CONFIG_HIDRAW=y + CONFIG_HID_A4TECH=m + +From fcf9c64552775b27c1416a9eefaa73cb1cf831eb Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Wed, 3 Sep 2014 23:35:44 +0100 +Subject: [PATCH 84/92] bcm2708_fb: Add pan and vsync controls + +--- + drivers/video/fbdev/bcm2708_fb.c | 53 ++++++++++++++++++++++++++++++++-------- + 1 file changed, 43 insertions(+), 10 deletions(-) + +diff --git a/drivers/video/fbdev/bcm2708_fb.c b/drivers/video/fbdev/bcm2708_fb.c +index b25dd5b..ffa584b 100644 +--- a/drivers/video/fbdev/bcm2708_fb.c ++++ b/drivers/video/fbdev/bcm2708_fb.c +@@ -38,6 +38,9 @@ + #include + #include + ++//#define BCM2708_FB_DEBUG ++#define MODULE_NAME "bcm2708_fb" ++ + #ifdef BCM2708_FB_DEBUG + #define print_debug(fmt,...) pr_debug("%s:%s:%d: "fmt, MODULE_NAME, __func__, __LINE__, ##__VA_ARGS__) + #else +@@ -375,16 +378,14 @@ static int bcm2708_fb_setcolreg(unsigned int regno, unsigned int red, + } + return regno > 255; + } ++ + static int bcm2708_fb_blank(int blank_mode, struct fb_info *info) + { +- s32 result = -1 ; ++ s32 result = -1; + u32 p[7]; + if ( (blank_mode == FB_BLANK_NORMAL) || + (blank_mode == FB_BLANK_UNBLANK)) { +- +- pr_info("bcm2708_fb_blank blank_mode=%d\n",blank_mode); +- +- ++ + p[0] = 28; // size = sizeof u32 * length of p + p[1] = VCMSG_PROCESS_REQUEST; // process request + p[2] = VCMSG_SET_BLANK_SCREEN; // (the tag id) +@@ -395,15 +396,45 @@ static int bcm2708_fb_blank(int blank_mode, struct fb_info *info) + + bcm_mailbox_property(&p, p[0]); + +- pr_info("bcm2708_fb_blank returns=%d p[1]=0x%x\n",p[5],p[1]); ++ pr_info("bcm2708_fb_blank(%d) returns=%d p[1]=0x%x\n", blank_mode, p[5], p[1]); + + if ( p[1] == VCMSG_REQUEST_SUCCESSFUL ) +- result = 0 ; +- ++ result = 0; + } + return result; ++} + ++static int bcm2708_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) ++{ ++ s32 result = -1; ++ info->var.xoffset = var->xoffset; ++ info->var.yoffset = var->yoffset; ++ result = bcm2708_fb_set_par(info); ++ pr_info("bcm2708_fb_pan_display(%d,%d) returns=%d\n", var->xoffset, var->yoffset, result); ++ return result; ++} + ++static int bcm2708_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) ++{ ++ s32 result = -1; ++ u32 p[7]; ++ if (cmd == FBIO_WAITFORVSYNC) { ++ p[0] = 28; // size = sizeof u32 * length of p ++ p[1] = VCMSG_PROCESS_REQUEST; // process request ++ p[2] = VCMSG_SET_VSYNC; // (the tag id) ++ p[3] = 4; // (size of the response buffer) ++ p[4] = 4; // (size of the request data) ++ p[5] = 0; // dummy ++ p[6] = VCMSG_PROPERTY_END; // end tag ++ ++ bcm_mailbox_property(&p, p[0]); ++ ++ pr_info("bcm2708_fb_ioctl %x,%lx returns=%d p[1]=0x%x\n", cmd, arg, p[5], p[1]); ++ ++ if ( p[1] == VCMSG_REQUEST_SUCCESSFUL ) ++ result = 0; ++ } ++ return result; + } + static void bcm2708_fb_fillrect(struct fb_info *info, + const struct fb_fillrect *rect) +@@ -590,6 +621,8 @@ static struct fb_ops bcm2708_fb_ops = { + .fb_fillrect = bcm2708_fb_fillrect, + .fb_copyarea = bcm2708_fb_copyarea, + .fb_imageblit = bcm2708_fb_imageblit, ++ .fb_pan_display = bcm2708_fb_pan_display, ++ .fb_ioctl = bcm2708_ioctl, + }; + + static int bcm2708_fb_register(struct bcm2708_fb *fb) +@@ -616,8 +649,8 @@ static int bcm2708_fb_register(struct bcm2708_fb *fb) + strncpy(fb->fb.fix.id, bcm2708_name, sizeof(fb->fb.fix.id)); + fb->fb.fix.type = FB_TYPE_PACKED_PIXELS; + fb->fb.fix.type_aux = 0; +- fb->fb.fix.xpanstep = 0; +- fb->fb.fix.ypanstep = 0; ++ fb->fb.fix.xpanstep = 1; ++ fb->fb.fix.ypanstep = 1; + fb->fb.fix.ywrapstep = 0; + fb->fb.fix.accel = FB_ACCEL_NONE; + + +From d3f8c5720354f6a5d6b1ec5080d8d1e53ae4203d Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 16 Sep 2014 15:07:30 +0100 +Subject: [PATCH 85/92] bcm2708_fb: Reduce dmesg spam + +--- + drivers/video/fbdev/bcm2708_fb.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/drivers/video/fbdev/bcm2708_fb.c b/drivers/video/fbdev/bcm2708_fb.c +index ffa584b..32aaaf5 100644 +--- a/drivers/video/fbdev/bcm2708_fb.c ++++ b/drivers/video/fbdev/bcm2708_fb.c +@@ -396,10 +396,10 @@ static int bcm2708_fb_blank(int blank_mode, struct fb_info *info) + + bcm_mailbox_property(&p, p[0]); + +- pr_info("bcm2708_fb_blank(%d) returns=%d p[1]=0x%x\n", blank_mode, p[5], p[1]); +- + if ( p[1] == VCMSG_REQUEST_SUCCESSFUL ) + result = 0; ++ else ++ pr_err("bcm2708_fb_blank(%d) returns=%d p[1]=0x%x\n", blank_mode, p[5], p[1]); + } + return result; + } +@@ -410,7 +410,8 @@ static int bcm2708_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info + info->var.xoffset = var->xoffset; + info->var.yoffset = var->yoffset; + result = bcm2708_fb_set_par(info); +- pr_info("bcm2708_fb_pan_display(%d,%d) returns=%d\n", var->xoffset, var->yoffset, result); ++ if (result != 0) ++ pr_err("bcm2708_fb_pan_display(%d,%d) returns=%d\n", var->xoffset, var->yoffset, result); + return result; + } + + +From 93cbf976b7a7d19b0daf5f2ac054aff33425fa74 Mon Sep 17 00:00:00 2001 +From: ghollingworth +Date: Wed, 20 Aug 2014 20:52:31 +0100 +Subject: [PATCH 86/92] gpio: Fix for GPIO interrupts higher than pin 32 + +--- + arch/arm/mach-bcm2708/bcm2708_gpio.c | 56 +++++++++++++++++++----------------- + 1 file changed, 29 insertions(+), 27 deletions(-) + +diff --git a/arch/arm/mach-bcm2708/bcm2708_gpio.c b/arch/arm/mach-bcm2708/bcm2708_gpio.c +index 120929ff..5fb845a 100644 +--- a/arch/arm/mach-bcm2708/bcm2708_gpio.c ++++ b/arch/arm/mach-bcm2708/bcm2708_gpio.c +@@ -56,10 +56,10 @@ struct bcm2708_gpio { + struct list_head list; + void __iomem *base; + struct gpio_chip gc; +- unsigned long rising; +- unsigned long falling; +- unsigned long high; +- unsigned long low; ++ unsigned long rising[(BCM2708_NR_GPIOS + 31) / 32]; ++ unsigned long falling[(BCM2708_NR_GPIOS + 31) / 32]; ++ unsigned long high[(BCM2708_NR_GPIOS + 31) / 32]; ++ unsigned long low[(BCM2708_NR_GPIOS + 31) / 32]; + }; + + static int bcm2708_set_function(struct gpio_chip *gc, unsigned offset, +@@ -146,23 +146,26 @@ static int bcm2708_gpio_irq_set_type(struct irq_data *d, unsigned type) + { + unsigned irq = d->irq; + struct bcm2708_gpio *gpio = irq_get_chip_data(irq); ++ unsigned gn = irq_to_gpio(irq); ++ unsigned gb = gn / 32; ++ unsigned go = gn % 32; + +- gpio->rising &= ~(1 << irq_to_gpio(irq)); +- gpio->falling &= ~(1 << irq_to_gpio(irq)); +- gpio->high &= ~(1 << irq_to_gpio(irq)); +- gpio->low &= ~(1 << irq_to_gpio(irq)); ++ gpio->rising[gb] &= ~(1 << go); ++ gpio->falling[gb] &= ~(1 << go); ++ gpio->high[gb] &= ~(1 << go); ++ gpio->low[gb] &= ~(1 << go); + + if (type & ~(IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING | IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) + return -EINVAL; + + if (type & IRQ_TYPE_EDGE_RISING) +- gpio->rising |= (1 << irq_to_gpio(irq)); ++ gpio->rising[gb] |= (1 << go); + if (type & IRQ_TYPE_EDGE_FALLING) +- gpio->falling |= (1 << irq_to_gpio(irq)); ++ gpio->falling[gb] |= (1 << go); + if (type & IRQ_TYPE_LEVEL_HIGH) +- gpio->high |= (1 << irq_to_gpio(irq)); ++ gpio->high[gb] |= (1 << go); + if (type & IRQ_TYPE_LEVEL_LOW) +- gpio->low |= (1 << irq_to_gpio(irq)); ++ gpio->low[gb] |= (1 << go); + return 0; + } + +@@ -191,37 +194,36 @@ static void bcm2708_gpio_irq_unmask(struct irq_data *d) + struct bcm2708_gpio *gpio = irq_get_chip_data(irq); + unsigned gn = irq_to_gpio(irq); + unsigned gb = gn / 32; ++ unsigned go = gn % 32; + unsigned long rising = readl(gpio->base + GPIOREN(gb)); + unsigned long falling = readl(gpio->base + GPIOFEN(gb)); + unsigned long high = readl(gpio->base + GPIOHEN(gb)); + unsigned long low = readl(gpio->base + GPIOLEN(gb)); + +- gn = gn % 32; +- +- writel(1 << gn, gpio->base + GPIOEDS(gb)); ++ writel(1 << go, gpio->base + GPIOEDS(gb)); + +- if (gpio->rising & (1 << gn)) { +- writel(rising | (1 << gn), gpio->base + GPIOREN(gb)); ++ if (gpio->rising[gb] & (1 << go)) { ++ writel(rising | (1 << go), gpio->base + GPIOREN(gb)); + } else { +- writel(rising & ~(1 << gn), gpio->base + GPIOREN(gb)); ++ writel(rising & ~(1 << go), gpio->base + GPIOREN(gb)); + } + +- if (gpio->falling & (1 << gn)) { +- writel(falling | (1 << gn), gpio->base + GPIOFEN(gb)); ++ if (gpio->falling[gb] & (1 << go)) { ++ writel(falling | (1 << go), gpio->base + GPIOFEN(gb)); + } else { +- writel(falling & ~(1 << gn), gpio->base + GPIOFEN(gb)); ++ writel(falling & ~(1 << go), gpio->base + GPIOFEN(gb)); + } + +- if (gpio->high & (1 << gn)) { +- writel(high | (1 << gn), gpio->base + GPIOHEN(gb)); ++ if (gpio->high[gb] & (1 << go)) { ++ writel(high | (1 << go), gpio->base + GPIOHEN(gb)); + } else { +- writel(high & ~(1 << gn), gpio->base + GPIOHEN(gb)); ++ writel(high & ~(1 << go), gpio->base + GPIOHEN(gb)); + } + +- if (gpio->low & (1 << gn)) { +- writel(low | (1 << gn), gpio->base + GPIOLEN(gb)); ++ if (gpio->low[gb] & (1 << go)) { ++ writel(low | (1 << go), gpio->base + GPIOLEN(gb)); + } else { +- writel(low & ~(1 << gn), gpio->base + GPIOLEN(gb)); ++ writel(low & ~(1 << go), gpio->base + GPIOLEN(gb)); + } + } + + +From e57780aae5cd3f785ade99d0e3ebe15504239a32 Mon Sep 17 00:00:00 2001 +From: Serge Schneider +Date: Wed, 3 Sep 2014 17:28:53 +0100 +Subject: [PATCH 87/92] power: Add defines for contolling DSI power through + mailbox interface + +--- + arch/arm/mach-bcm2708/include/mach/arm_power.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/arm/mach-bcm2708/include/mach/arm_power.h b/arch/arm/mach-bcm2708/include/mach/arm_power.h +index aae9136..d3bf245 100644 +--- a/arch/arm/mach-bcm2708/include/mach/arm_power.h ++++ b/arch/arm/mach-bcm2708/include/mach/arm_power.h +@@ -38,6 +38,7 @@ enum { + PREFIX(POWER_I2C2_BIT), + PREFIX(POWER_SPI_BIT), + PREFIX(POWER_CCP2TX_BIT), ++ PREFIX(POWER_DSI_BIT), + + PREFIX(POWER_MAX) + }; +@@ -52,6 +53,7 @@ enum { + PREFIX(POWER_I2C2_MASK) = (1 << PREFIX(POWER_I2C2_BIT)), + PREFIX(POWER_SPI_MASK) = (1 << PREFIX(POWER_SPI_BIT)), + PREFIX(POWER_CCP2TX_MASK) = (1 << PREFIX(POWER_CCP2TX_BIT)), ++ PREFIX(POWER_DSI) = (1 << PREFIX(POWER_DSI_BIT)), + + PREFIX(POWER_MASK) = (1 << PREFIX(POWER_MAX)) - 1, + PREFIX(POWER_NONE) = 0 + +From dabe7b7d8898de714d73bcdf57a86fa045b9047a Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Wed, 3 Sep 2014 23:34:17 +0100 +Subject: [PATCH 88/92] vcio: Fix incorrect and add new mailbox tags + +--- + arch/arm/mach-bcm2708/include/mach/vcio.h | 29 +++++++++++++++++++++++------ + 1 file changed, 23 insertions(+), 6 deletions(-) + +diff --git a/arch/arm/mach-bcm2708/include/mach/vcio.h b/arch/arm/mach-bcm2708/include/mach/vcio.h +index 62e052e..8e11d67 100644 +--- a/arch/arm/mach-bcm2708/include/mach/vcio.h ++++ b/arch/arm/mach-bcm2708/include/mach/vcio.h +@@ -45,12 +45,12 @@ enum { + VCMSG_PROPERTY_END = 0x00000000, + VCMSG_GET_FIRMWARE_REVISION = 0x00000001, + VCMSG_GET_BOARD_MODEL = 0x00010001, +- VCMSG_GET_BOARD_REVISION = 0x00020002, +- VCMSG_GET_BOARD_MAC_ADDRESS = 0x00020003, +- VCMSG_GET_BOARD_SERIAL = 0x00020004, +- VCMSG_GET_ARM_MEMORY = 0x00020005, +- VCMSG_GET_VC_MEMORY = 0x00020006, +- VCMSG_GET_CLOCKS = 0x00020007, ++ VCMSG_GET_BOARD_REVISION = 0x00010002, ++ VCMSG_GET_BOARD_MAC_ADDRESS = 0x00010003, ++ VCMSG_GET_BOARD_SERIAL = 0x00010004, ++ VCMSG_GET_ARM_MEMORY = 0x00010005, ++ VCMSG_GET_VC_MEMORY = 0x00010006, ++ VCMSG_GET_CLOCKS = 0x00010007, + VCMSG_GET_COMMAND_LINE = 0x00050001, + VCMSG_GET_DMA_CHANNELS = 0x00060001, + VCMSG_GET_POWER_STATE = 0x00020001, +@@ -68,7 +68,20 @@ enum { + VCMSG_GET_MIN_CLOCK = 0x00030007, + VCMSG_GET_MIN_VOLTAGE = 0x00030008, + VCMSG_GET_TURBO = 0x00030009, ++ VCMSG_GET_MAX_TEMPERATURE = 0x0003000a, ++ VCMSG_GET_STC = 0x0003000b, + VCMSG_SET_TURBO = 0x00038009, ++ VCMSG_SET_ALLOCATE_MEM = 0x0003000c, ++ VCMSG_SET_LOCK_MEM = 0x0003000d, ++ VCMSG_SET_UNLOCK_MEM = 0x0003000e, ++ VCMSG_SET_RELEASE_MEM = 0x0003000f, ++ VCMSG_SET_EXECUTE_CODE = 0x00030010, ++ VCMSG_SET_EXECUTE_QPU = 0x00030011, ++ VCMSG_SET_ENABLE_QPU = 0x00030012, ++ VCMSG_GET_RESOURCE_HANDLE = 0x00030014, ++ VCMSG_GET_EDID_BLOCK = 0x00030020, ++ VCMSG_GET_CUSTOMER_OTP = 0x00030021, ++ VCMSG_SET_CUSTOMER_OTP = 0x00038021, + VCMSG_SET_ALLOCATE_BUFFER = 0x00040001, + VCMSG_SET_RELEASE_BUFFER = 0x00048001, + VCMSG_SET_BLANK_SCREEN = 0x00040002, +@@ -106,6 +119,10 @@ enum { + VCMSG_GET_TRANSFORM = 0x0004000d, + VCMSG_TST_TRANSFORM = 0x0004400d, + VCMSG_SET_TRANSFORM = 0x0004800d, ++ VCMSG_TST_VSYNC = 0x0004400e, ++ VCMSG_SET_VSYNC = 0x0004800e, ++ VCMSG_SET_CURSOR_INFO = 0x00008010, ++ VCMSG_SET_CURSOR_STATE = 0x00008011, + }; + + extern int /*rc*/ bcm_mailbox_read(unsigned chan, uint32_t *data28); + +From ee6bb56a54b1407ee814cb3e320d0f31de1a0d40 Mon Sep 17 00:00:00 2001 +From: ghollingworth +Date: Wed, 20 Aug 2014 21:18:21 +0100 +Subject: [PATCH 89/92] lirc: Remove restriction on gpio pins that can be used + with lirc + +Compute Module, for example could use different pins +--- + drivers/staging/media/lirc/lirc_rpi.c | 25 +++++-------------------- + 1 file changed, 5 insertions(+), 20 deletions(-) + +diff --git a/drivers/staging/media/lirc/lirc_rpi.c b/drivers/staging/media/lirc/lirc_rpi.c +index 57ffacf..1da6a9f 100644 +--- a/drivers/staging/media/lirc/lirc_rpi.c ++++ b/drivers/staging/media/lirc/lirc_rpi.c +@@ -38,6 +38,7 @@ + #include + #include + #include ++#include + #include + + #define LIRC_DRIVER_NAME "lirc_rpi" +@@ -81,9 +82,6 @@ static long send_pulse(unsigned long length); + static void send_space(long length); + static void lirc_rpi_exit(void); + +-int valid_gpio_pins[] = { 0, 1, 2, 3, 4, 7, 8, 9, 10, 11, 14, 15, 17, 18, 21, +- 22, 23, 24, 25 ,27, 28, 29, 30, 31 }; +- + static struct platform_device *lirc_rpi_dev; + static struct timeval lasttv = { 0, 0 }; + static struct lirc_buffer rbuf; +@@ -599,24 +597,13 @@ static void lirc_rpi_exit(void) + + static int __init lirc_rpi_init_module(void) + { +- int result, i; ++ int result; + + result = lirc_rpi_init(); + if (result) + return result; + +- /* check if the module received valid gpio pin numbers */ +- result = 0; +- if (gpio_in_pin != gpio_out_pin) { +- for(i = 0; (i < ARRAY_SIZE(valid_gpio_pins)) && (result != 2); i++) { +- if (gpio_in_pin == valid_gpio_pins[i] || +- gpio_out_pin == valid_gpio_pins[i]) { +- result++; +- } +- } +- } +- +- if (result != 2) { ++ if (gpio_in_pin >= BCM2708_NR_GPIOS || gpio_out_pin >= BCM2708_NR_GPIOS) { + result = -EINVAL; + printk(KERN_ERR LIRC_DRIVER_NAME + ": invalid GPIO pin(s) specified!\n"); +@@ -673,13 +660,11 @@ MODULE_LICENSE("GPL"); + + module_param(gpio_out_pin, int, S_IRUGO); + MODULE_PARM_DESC(gpio_out_pin, "GPIO output/transmitter pin number of the BCM" +- " processor. Valid pin numbers are: 0, 1, 4, 8, 7, 9, 10, 11," +- " 14, 15, 17, 18, 21, 22, 23, 24, 25, default 17"); ++ " processor. (default 17"); + + module_param(gpio_in_pin, int, S_IRUGO); + MODULE_PARM_DESC(gpio_in_pin, "GPIO input pin number of the BCM processor." +- " Valid pin numbers are: 0, 1, 4, 8, 7, 9, 10, 11, 14, 15," +- " 17, 18, 21, 22, 23, 24, 25, default 18"); ++ " (default 18"); + + module_param(sense, int, S_IRUGO); + MODULE_PARM_DESC(sense, "Override autodetection of IR receiver circuit" + +From eb9ade7441940042ab3533effddf644faa1c4856 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Wed, 17 Sep 2014 22:23:21 +0100 +Subject: [PATCH 90/92] tas5713: snd_soc_codec_set_cache_io has gone in 3.16 + +--- + sound/soc/codecs/tas5713.c | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/sound/soc/codecs/tas5713.c b/sound/soc/codecs/tas5713.c +index ee96a12..90accc2 100644 +--- a/sound/soc/codecs/tas5713.c ++++ b/sound/soc/codecs/tas5713.c +@@ -180,14 +180,6 @@ static int tas5713_probe(struct snd_soc_codec *codec) + + tas5713 = snd_soc_codec_get_drvdata(codec); + +- codec->control_data = tas5713->regmap; +- +- ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP); +- if (ret < 0) { +- dev_err(codec->dev, "Failed to set cache i/o: %d\n", ret); +- return ret; +- } +- + // Reset error + ret = snd_soc_write(codec, TAS5713_ERROR_STATUS, 0x00); + + +From 16fbce12df7480b49311dce1065770e2f76a971d Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Wed, 17 Sep 2014 22:22:13 +0100 +Subject: [PATCH 91/92] bcm2708-i2s: Avoid leak from iomap when accessing gpio + +--- + sound/soc/bcm/bcm2708-i2s.c | 33 ++++++++++++++++++++++----------- + 1 file changed, 22 insertions(+), 11 deletions(-) + +diff --git a/sound/soc/bcm/bcm2708-i2s.c b/sound/soc/bcm/bcm2708-i2s.c +index f1859b2..2ea78c9 100644 +--- a/sound/soc/bcm/bcm2708-i2s.c ++++ b/sound/soc/bcm/bcm2708-i2s.c +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -318,6 +319,26 @@ static int bcm2708_i2s_set_dai_bclk_ratio(struct snd_soc_dai *dai, + return 0; + } + ++ ++static int bcm2708_i2s_set_function(unsigned offset, int function) ++{ ++ #define GPIOFSEL(x) (0x00+(x)*4) ++ void __iomem *gpio = __io_address(GPIO_BASE); ++ unsigned alt = function <= 3 ? function + 4: function == 4 ? 3 : 2; ++ unsigned gpiodir; ++ unsigned gpio_bank = offset / 10; ++ unsigned gpio_field_offset = (offset - 10 * gpio_bank) * 3; ++ ++ if (offset >= BCM2708_NR_GPIOS) ++ return -EINVAL; ++ ++ gpiodir = readl(gpio + GPIOFSEL(gpio_bank)); ++ gpiodir &= ~(7 << gpio_field_offset); ++ gpiodir |= alt << gpio_field_offset; ++ writel(gpiodir, gpio + GPIOFSEL(gpio_bank)); ++ return 0; ++} ++ + static void bcm2708_i2s_setup_gpio(void) + { + /* +@@ -326,14 +347,8 @@ static void bcm2708_i2s_setup_gpio(void) + * TODO Better way would be to handle + * this in the device tree! + */ +-#define INP_GPIO(g) *(gpio+((g)/10)) &= ~(7<<(((g)%10)*3)) +-#define SET_GPIO_ALT(g,a) *(gpio+(((g)/10))) |= (((a)<=3?(a)+4:(a)==4?3:2)<<(((g)%10)*3)) +- +- unsigned int *gpio; + int pin,pinconfig,startpin,alt; + +- gpio = ioremap(GPIO_BASE, SZ_16K); +- + /* SPI is on different GPIOs on different boards */ + /* for Raspberry Pi B+, this is pin GPIO18-21, for original on 28-31 */ + if (bcm2708_i2s_gpio==BCM2708_I2S_GPIO_AUTO) { +@@ -361,12 +376,8 @@ static void bcm2708_i2s_setup_gpio(void) + + /* configure I2S pins to correct ALT mode */ + for (pin = startpin; pin <= startpin+3; pin++) { +- INP_GPIO(pin); /* set mode to GPIO input first */ +- SET_GPIO_ALT(pin, alt); /* set mode to ALT */ ++ bcm2708_i2s_set_function(pin, alt); + } +- +-#undef INP_GPIO +-#undef SET_GPIO_ALT + } + + static int bcm2708_i2s_hw_params(struct snd_pcm_substream *substream, + +From ba27be53aa6ef038d3e4bdb6c6da83225b28cb3d Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Sat, 30 Aug 2014 16:24:19 +0100 +Subject: [PATCH 92/92] bcm2708-i2s: Fix check for B+ board revision to exclude + flags like warranty bit + +--- + sound/soc/bcm/bcm2708-i2s.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sound/soc/bcm/bcm2708-i2s.c b/sound/soc/bcm/bcm2708-i2s.c +index 2ea78c9..9023984 100644 +--- a/sound/soc/bcm/bcm2708-i2s.c ++++ b/sound/soc/bcm/bcm2708-i2s.c +@@ -352,7 +352,7 @@ static void bcm2708_i2s_setup_gpio(void) + /* SPI is on different GPIOs on different boards */ + /* for Raspberry Pi B+, this is pin GPIO18-21, for original on 28-31 */ + if (bcm2708_i2s_gpio==BCM2708_I2S_GPIO_AUTO) { +- if (system_rev >= 0x10) { ++ if ((system_rev & 0xffffff) >= 0x10) { + /* Model B+ */ + pinconfig=BCM2708_I2S_GPIO_PIN18; + } else {