From 029841cd6f5e1c7392fe0a2361055742cd0ea061 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Fri, 13 Oct 2017 14:16:15 +0100 Subject: [PATCH 01/16] distro-tool: ensure PKG_SHA256 is undefined when downloading specific revision --- tools/distro-tool | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/distro-tool b/tools/distro-tool index 1a0c176abc..0977d43f72 100755 --- a/tools/distro-tool +++ b/tools/distro-tool @@ -814,6 +814,7 @@ generate_work_worker() { PKG_URL="${PKG_URL/${PKG_VERSION}/${revision}}" PKG_SOURCE_NAME="${PKG_SOURCE_NAME/${PKG_VERSION}/${revision}}" PKG_VERSION="${revision}" + PKG_SHA256= fi PKG_IS_ADDON=No From a3d6ae55e4f8bee4c8764a164a41d120f7124f77 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Fri, 13 Oct 2017 14:16:15 +0100 Subject: [PATCH 02/16] linux: update to linux-4.13.1 --- packages/linux/package.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/linux/package.mk b/packages/linux/package.mk index f69e30c271..f9e29adb56 100644 --- a/packages/linux/package.mk +++ b/packages/linux/package.mk @@ -63,8 +63,8 @@ case "$LINUX" in PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET imx6-status-led imx6-soc-fan irqbalanced" ;; *) - PKG_VERSION="4.13" - PKG_SHA256="2db3d6066c3ad93eb25b973a3d2951e022a7e975ee2fa7cbe5bddf84d9a49a2c" + PKG_VERSION="4.13.1" + PKG_SHA256="decee7a2de34aea921fce3e7934f520790fe43176de29bd9718a84419ca6e1ce" PKG_URL="https://www.kernel.org/pub/linux/kernel/v4.x/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_PATCH_DIRS="default" ;; From 501eedb0ca1ed1c298d45af402739c8164da8d8e Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Fri, 13 Oct 2017 14:16:15 +0100 Subject: [PATCH 03/16] RPi: update linux support patch for linux 4.13.1 --- .../patches/linux/linux-01-RPi_support.patch | 5738 ++++++++++++++++- 1 file changed, 5392 insertions(+), 346 deletions(-) diff --git a/projects/RPi/patches/linux/linux-01-RPi_support.patch b/projects/RPi/patches/linux/linux-01-RPi_support.patch index 34e42117fb..185ca794d2 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 4d31e91165e50dab3ce5b4b78bc589d67bd70e0b Mon Sep 17 00:00:00 2001 +From c0ef8025df345a15d43f4c2dfc0e620d31bd733e Mon Sep 17 00:00:00 2001 From: Steve Glendinning Date: Thu, 19 Feb 2015 18:47:12 +0000 -Subject: [PATCH 001/173] smsx95xx: fix crimes against truesize +Subject: [PATCH 001/199] smsx95xx: fix crimes against truesize smsc95xx is adjusting truesize when it shouldn't, and following a recent patch from Eric this is now triggering warnings. @@ -48,10 +48,10 @@ index 340c13484e5cc7dd5001577b7522d5a4318bd5b6..7d3d98f0405ad948f9ab3e035a70e15c usbnet_skb_return(dev, ax_skb); } -From 54fc9336b4a858bf7833f4549f96b16e187192b2 Mon Sep 17 00:00:00 2001 +From 1c84c1665679fdd0068d7fed765386491a91ee49 Mon Sep 17 00:00:00 2001 From: Sam Nazarko Date: Fri, 1 Apr 2016 17:27:21 +0100 -Subject: [PATCH 002/173] smsc95xx: Experimental: Enable turbo_mode and +Subject: [PATCH 002/199] smsc95xx: Experimental: Enable turbo_mode and packetsize=2560 by default See: http://forum.kodi.tv/showthread.php?tid=285288 @@ -94,10 +94,10 @@ index 7d3d98f0405ad948f9ab3e035a70e15c667e4fa1..8d34e517db08d895e6135f785c42bf63 netif_dbg(dev, ifup, dev->net, "rx_urb_size=%ld\n", -From 9c3373c84a4a3740f9e502e256b6cf6b75499e53 Mon Sep 17 00:00:00 2001 +From 880434cf92735720f5cfc191266fe0fd5bc9cfb4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 003/173] Allow mac address to be set in smsc95xx +Subject: [PATCH 003/199] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -193,10 +193,10 @@ index 8d34e517db08d895e6135f785c42bf639671815c..5df7e105c41532c3185e46ee54f43a37 eth_hw_addr_random(dev->net); netif_dbg(dev, ifup, dev->net, "MAC address set to eth_random_addr\n"); -From 4733376458500aefc53f7bb02e16c6fd57439295 Mon Sep 17 00:00:00 2001 +From 2a79c6c02f4b2d233b9a601a57ede0e9f1f05e44 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 13 Mar 2015 12:43:36 +0000 -Subject: [PATCH 004/173] Protect __release_resource against resources without +Subject: [PATCH 004/199] Protect __release_resource against resources without parents Without this patch, removing a device tree overlay can crash here. @@ -224,10 +224,10 @@ index 9b5f04404152c296af3a96132f27cfc80ffa9af9..f8a9af6e6b915812be2ba2c1c2b40106 for (;;) { tmp = *p; -From 6ae5f9ee8ed27f0a0646a8949b27747a60df627e Mon Sep 17 00:00:00 2001 +From fb3ac3b9d01033534f532fcf381e6cd2897ff023 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 4 Dec 2015 17:41:50 +0000 -Subject: [PATCH 005/173] irq-bcm2836: Prevent spurious interrupts, and trap +Subject: [PATCH 005/199] irq-bcm2836: Prevent spurious interrupts, and trap them early The old arch-specific IRQ macros included a dsb to ensure the @@ -254,10 +254,10 @@ index e7463e3c08143acae3e8cc5682f918c6a0b07ebd..a8db33b50ad9ff83d284fa54fe4d3b65 #endif } else if (stat) { -From df9ca00f2536bd3c258fd212fbc50f0388ec0051 Mon Sep 17 00:00:00 2001 +From 8d744d7637c556d38d958112260ddbaa453407c7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:33:30 +0000 -Subject: [PATCH 006/173] irq-bcm2836: Avoid "Invalid trigger warning" +Subject: [PATCH 006/199] irq-bcm2836: Avoid "Invalid trigger warning" Initialise the level for each IRQ to avoid a warning from the arm arch timer code. @@ -281,10 +281,10 @@ index a8db33b50ad9ff83d284fa54fe4d3b65f859df0f..c4e151451cf8c8ebde5225515eac2786 static void -From 738c1a7eac3f687fc2e828be2ab02a173367afe3 Mon Sep 17 00:00:00 2001 +From f886f712e6b6fcd52f3d5e893080ae58a22211a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 12 Jun 2015 19:01:05 +0200 -Subject: [PATCH 007/173] irqchip: bcm2835: Add FIQ support +Subject: [PATCH 007/199] irqchip: bcm2835: Add FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -413,10 +413,10 @@ index 44d7c38dde479d771f3552e914bf8c1c1f5019f7..42ff5e6a8e0d532f5b60a1e7af7cc4d9 } -From 2088067b398e00f0fb16984d0723193853ebe910 Mon Sep 17 00:00:00 2001 +From 7c54bfb906c5315b85c947da06027c4c6bba309a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 23 Oct 2015 16:26:55 +0200 -Subject: [PATCH 008/173] irqchip: irq-bcm2835: Add 2836 FIQ support +Subject: [PATCH 008/199] irqchip: irq-bcm2835: Add 2836 FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -515,10 +515,10 @@ index 42ff5e6a8e0d532f5b60a1e7af7cc4d941bd5008..eccf6ed025299cb480884f5bcbe77abf for (b = 0; b < NR_BANKS; b++) { for (i = 0; i < bank_irqs[b]; i++) { -From 5f9a37381bb18029137e2d8e6c269a15586f82a8 Mon Sep 17 00:00:00 2001 +From 4627b248f0048227f7fcdf283d891bc1f67a431a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 10:26:09 +0100 -Subject: [PATCH 009/173] spidev: Add "spidev" compatible string to silence +Subject: [PATCH 009/199] spidev: Add "spidev" compatible string to silence warning See: https://github.com/raspberrypi/linux/issues/1054 @@ -539,10 +539,10 @@ index cda10719d1d1b21b32866d2b79363faa461ab8e1..4f3779d3aa0960640506725bde918075 }; MODULE_DEVICE_TABLE(of, spidev_dt_ids); -From da0f0b0a74f2827634a1914ac8fa0460a611d722 Mon Sep 17 00:00:00 2001 +From 697efaaf511abb4f49a2f02fc7616111196315db Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 3 Jan 2017 18:25:01 +0000 -Subject: [PATCH 010/173] Revert "pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP" +Subject: [PATCH 010/199] Revert "pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP" This reverts commit 85ae9e512f437cd09bf61564bdba29ab88bab3e3. --- @@ -841,10 +841,10 @@ index 230883168e99a1a3fecc7916ef0a7e0de7e8b3f1..ff3789a11b3c36b922b9d08035abb638 if (IS_ERR(pc->pctl_dev)) { gpiochip_remove(&pc->gpio_chip); -From 0c433b8e5412030ca229b85830abdda47c841eed Mon Sep 17 00:00:00 2001 +From 50667c5da8f225a498d1d8c0abc991bf96858cdd Mon Sep 17 00:00:00 2001 From: notro Date: Thu, 10 Jul 2014 13:59:47 +0200 -Subject: [PATCH 011/173] pinctrl-bcm2835: Set base to 0 give expected gpio +Subject: [PATCH 011/199] pinctrl-bcm2835: Set base to 0 give expected gpio numbering Signed-off-by: Noralf Tronnes @@ -866,10 +866,10 @@ index ff3789a11b3c36b922b9d08035abb638187c2f5a..d2b537572095c86576f78536f737c102 .can_sleep = false, }; -From d9319a075ad9a562fcd70597768b0f52d5c88a4e Mon Sep 17 00:00:00 2001 +From cfe2553b0cd96571188700b2f8316eb7036eca59 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 26 Feb 2015 09:58:22 +0000 -Subject: [PATCH 012/173] pinctrl-bcm2835: Only request the interrupts listed +Subject: [PATCH 012/199] pinctrl-bcm2835: Only request the interrupts listed in the DTB Although the GPIO controller can generate three interrupts (four counting @@ -896,10 +896,10 @@ index d2b537572095c86576f78536f737c102487f99f4..a9d480df32562defbf8be0faf0a39bfe pc->irq_data[i].irqgroup = i; -From 81ba2330c131e7da3bca1b59f01cd254d11d5fa4 Mon Sep 17 00:00:00 2001 +From 9dda59819c2cf3ca64ffc5a211be0ae9deddde13 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Jun 2015 14:10:44 +0100 -Subject: [PATCH 013/173] spi-bcm2835: Support pin groups other than 7-11 +Subject: [PATCH 013/199] spi-bcm2835: Support pin groups other than 7-11 The spi-bcm2835 driver automatically uses GPIO chip-selects due to some unreliability of the native ones. In doing so it chooses the @@ -980,10 +980,10 @@ index f35cc10772f6670397ea923ad30158270dd68578..5dfe20ffc2866fa6789825016c585175 /* and set up the "mode" and level */ dev_info(&spi->dev, "setting up native-CS%i as GPIO %i\n", -From 26b6abf66e4e353b6d308fcf6d50e36053b16db0 Mon Sep 17 00:00:00 2001 +From 1857e16e50b7243664507bf679ff08961c1ff373 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 1 Jul 2016 22:09:24 +0100 -Subject: [PATCH 014/173] spi-bcm2835: Disable forced software CS +Subject: [PATCH 014/199] spi-bcm2835: Disable forced software CS Select software CS in bcm2708_common.dtsi, and disable the automatic conversion in the driver to allow hardware CS to be re-enabled with an @@ -1017,10 +1017,10 @@ index 5dfe20ffc2866fa6789825016c585175a29705b6..8493474d286f7a1ac6454a22c61c8c2c return 0; } -From f9164bc59cb04046bd40a67c7779b0cfc6075d5f Mon Sep 17 00:00:00 2001 +From d9ece314316906c6d8bd0faeb480d5f52f9f6be2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 8 Nov 2016 21:35:38 +0000 -Subject: [PATCH 015/173] spi-bcm2835: Remove unused code +Subject: [PATCH 015/199] spi-bcm2835: Remove unused code --- drivers/spi/spi-bcm2835.c | 61 ----------------------------------------------- @@ -1108,10 +1108,10 @@ index 8493474d286f7a1ac6454a22c61c8c2cef9121bf..33d75ad38a7f77d085321ace9101900a } -From 6f25ff462e75767582fdace353a5408fe684ab04 Mon Sep 17 00:00:00 2001 +From 38d5debf709990dc093fa736d3ea722f699840ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Wed, 3 Jun 2015 12:26:13 +0200 -Subject: [PATCH 016/173] ARM: bcm2835: Set Serial number and Revision +Subject: [PATCH 016/199] ARM: bcm2835: Set Serial number and Revision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1164,10 +1164,10 @@ index 0c1edfc98696da0e0bb7f4a18cdfbcdd27a9795d..8f152266ba9b470df2eaaed9ebcf158e static const char * const bcm2835_compat[] = { -From de38cbe1a0cb31cc4fe4e0768dd0be0b92183907 Mon Sep 17 00:00:00 2001 +From ba48f8c54271772e424ed3e227bbd10a54a7d71b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 3 Oct 2015 22:22:55 +0200 -Subject: [PATCH 017/173] dmaengine: bcm2835: Load driver early and support +Subject: [PATCH 017/199] dmaengine: bcm2835: Load driver early and support legacy API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -1270,10 +1270,10 @@ index 6204cc32d09c5096df8aec304c3c37b3bcb6be44..599c218dc8a73172dd4bd4a058fc8f95 MODULE_ALIAS("platform:bcm2835-dma"); MODULE_DESCRIPTION("BCM2835 DMA engine driver"); -From d7df3482e5e76edbf7f4d6847b8823cd1743535c Mon Sep 17 00:00:00 2001 +From 374f6c02f860169e156d21193ecd76057a398c17 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 25 Jan 2016 17:25:12 +0000 -Subject: [PATCH 018/173] firmware: Updated mailbox header +Subject: [PATCH 018/199] firmware: Updated mailbox header --- include/soc/bcm2835/raspberrypi-firmware.h | 9 +++++++++ @@ -1334,10 +1334,10 @@ index cb979ad90401e299344dd5fae38d09c489d8bd58..30fb37fe175df604a738258a2a632bca RPI_FIRMWARE_VCHIQ_INIT = 0x00048010, -From 8b0d445303d35756ce6bcc859ab12a70d589c291 Mon Sep 17 00:00:00 2001 +From 9c86b4bfa7f318bbbc55a8e055668d624cecc7b0 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 15 Jun 2016 16:48:41 +0100 -Subject: [PATCH 019/173] rtc: Add SPI alias for pcf2123 driver +Subject: [PATCH 019/199] rtc: Add SPI alias for pcf2123 driver Without this alias, Device Tree won't cause the driver to be loaded. @@ -1357,10 +1357,10 @@ index 8895f77726e8da5444afcd602dceff8f25a9b3fd..1833b8853ceb0e6147cceb93a00e558c MODULE_LICENSE("GPL"); +MODULE_ALIAS("spi:rtc-pcf2123"); -From d635eba91a9931609ed9295098d577eb01c3608e Mon Sep 17 00:00:00 2001 +From 9295b4da9ccbdb9d89ca5e29a9bbb488165ea787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 7 Oct 2016 16:50:59 +0200 -Subject: [PATCH 020/173] watchdog: bcm2835: Support setting reboot partition +Subject: [PATCH 020/199] watchdog: bcm2835: Support setting reboot partition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1462,10 +1462,10 @@ index b339e0e67b4c1275fd4992fea4f1e24c0575b783..26b7177573fac2af1cd4ab5488d2686f static int bcm2835_wdt_probe(struct platform_device *pdev) -From e011b348aadd95d8a1fe0169305a1e50ce1fc480 Mon Sep 17 00:00:00 2001 +From 174585be9597561522543fb1521ada01a893229d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 5 Apr 2016 19:40:12 +0100 -Subject: [PATCH 021/173] reboot: Use power off rather than busy spinning when +Subject: [PATCH 021/199] reboot: Use power off rather than busy spinning when halt is requested --- @@ -1488,10 +1488,10 @@ index 3b2aa9a9fe268d45335f781c4aa22cf573753a1b..0180d89a34af45c56243fe0f17fbe209 /* -From 4b568920b166692346db6adf3a8aa94a76b5a0ed Mon Sep 17 00:00:00 2001 +From 3bac0c145da630d2d6d59d2c32ce3f4a79cd2b09 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 9 Nov 2016 13:02:52 +0000 -Subject: [PATCH 022/173] bcm: Make RASPBERRYPI_POWER depend on PM +Subject: [PATCH 022/199] bcm: Make RASPBERRYPI_POWER depend on PM --- drivers/soc/bcm/Kconfig | 1 + @@ -1510,10 +1510,10 @@ index 49f1e2a75d614bc21db152327c7b425ae2504f8d..dccd2374ed00631abd441e3e9d78ee74 help This enables support for the RPi power domains which can be enabled -From bb1668bb395ef4cc0ece7b7ac18fbfa7b7c5b642 Mon Sep 17 00:00:00 2001 +From 1bcc04b9c2cb5a2a72ab16da5f92cccd020c1878 Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Fri, 2 Sep 2016 16:45:27 +0100 -Subject: [PATCH 023/173] Register the clocks early during the boot process, so +Subject: [PATCH 023/199] Register the clocks early during the boot process, so that special/critical clocks can get enabled early on in the boot process avoiding the risk of disabling a clock, pll_divider or pll when a claiming driver fails to install propperly - maybe it needs to defer. @@ -1558,10 +1558,10 @@ index 58ce6af8452db9ca8b4d3c380a06e448919f6a8d..11d89d106026f15719ea25047d6f357b MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("BCM2835 clock driver"); -From 198027c8f72b1c11e435eddf7c81e02dde1ec2aa Mon Sep 17 00:00:00 2001 +From 7fa1fcb860062fb2edc75665992d5bcd553cc98e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 6 Dec 2016 17:05:39 +0000 -Subject: [PATCH 024/173] bcm2835-rng: Avoid initialising if already enabled +Subject: [PATCH 024/199] bcm2835-rng: Avoid initialising if already enabled Avoids the 0x40000 cycles of warmup again if firmware has already used it --- @@ -1587,10 +1587,10 @@ index 574211a495491d9d6021dcaefe4274a63ed02055..e66c0fca8c6090e32f72796c0877a1cf err = hwrng_register(&bcm2835_rng_ops); if (err) { -From 1b4b16d21a4bcf96dc625ad9444c69c28eeef072 Mon Sep 17 00:00:00 2001 +From dc515006b6bb6fb26b41b3ba3ca2cc770c6c1c34 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Aug 2016 16:28:44 +0100 -Subject: [PATCH 025/173] kbuild: Ignore dtco targets when filtering symbols +Subject: [PATCH 025/199] kbuild: Ignore dtco targets when filtering symbols --- scripts/Kbuild.include | 2 +- @@ -1610,10 +1610,10 @@ index 9ffd3dda3889c56a7a72229bed21ff5c49d62856..00da6c9bacbf33334233e22ca5209ade esac | tr ";" "\n" | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/KSYM_\1/p' -From 1b013838bed35a7ba38be239e8590414ab5bfa08 Mon Sep 17 00:00:00 2001 +From cb7635c5281e962458b556d22b496b5b682600df Mon Sep 17 00:00:00 2001 From: Robert Tiemann Date: Mon, 20 Jul 2015 11:01:25 +0200 -Subject: [PATCH 026/173] BCM2835_DT: Fix I2S register map +Subject: [PATCH 026/199] BCM2835_DT: Fix I2S register map --- Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt | 4 ++-- @@ -1651,10 +1651,10 @@ index 65783de0aedf3da79adc36fd077b7a89954ddb6b..a89fe4220fdc3f26f75ee66daf187554 dmas = <&dma 2>, <&dma 3>; -From 3541d2299cb53a29213bd9a653fa4c4c636a251c Mon Sep 17 00:00:00 2001 +From 262f5378b7353bcfb20578e70573cd71f5e44ef7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 -Subject: [PATCH 027/173] clk-bcm2835: Mark used PLLs and dividers CRITICAL +Subject: [PATCH 027/199] clk-bcm2835: Mark used PLLs and dividers CRITICAL The VPU configures and relies on several PLLs and dividers. Mark all enabled dividers and their PLLs as CRITICAL to prevent the kernel from @@ -1682,10 +1682,10 @@ index 11d89d106026f15719ea25047d6f357b4bfcb2c5..fe8f5d65f2749cb3ddc878df61664826 divider->data = data; -From ef265510cf7bcb062ecf5026e9d916ef0ab58dd4 Mon Sep 17 00:00:00 2001 +From a685d676e7f8b10189e7b2dd95a52bf62b1a22df Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 -Subject: [PATCH 028/173] clk-bcm2835: Add claim-clocks property +Subject: [PATCH 028/199] clk-bcm2835: Add claim-clocks property The claim-clocks property can be used to prevent PLLs and dividers from being marked as critical. It contains a vector of clock IDs, @@ -1787,10 +1787,10 @@ index fe8f5d65f2749cb3ddc878df616648267441e0ee..92b5e0f5145b32d3bfc3592fe381e8be sizeof(cprman_parent_names)); of_clk_parent_fill(dev->of_node, cprman->real_parent_names, -From b0cd805d9a43ad2112f2cb57ac6e417b3d7423b1 Mon Sep 17 00:00:00 2001 +From 6d889451f7cb79e35ab73ea54e92be3bc763c838 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 6 Mar 2017 09:06:18 +0000 -Subject: [PATCH 029/173] clk-bcm2835: Read max core clock from firmware +Subject: [PATCH 029/199] clk-bcm2835: Read max core clock from firmware The VPU is responsible for managing the core clock, usually under direction from the bcm2835-cpufreq driver but not via the clk-bcm2835 @@ -1905,10 +1905,10 @@ index 92b5e0f5145b32d3bfc3592fe381e8be3cd90c72..336f8c9c44325d0a94e591a8557f7af2 for (i = 0; !of_property_read_u32_index(pdev->dev.of_node, "claim-clocks", -From d61da4f3762793e7d7a28dd51ca8505110f679ba Mon Sep 17 00:00:00 2001 +From 9ce26bedac45240e0f26c06a2740e667e696a23c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:36:44 +0000 -Subject: [PATCH 030/173] sound: Demote deferral errors to INFO level +Subject: [PATCH 030/199] sound: Demote deferral errors to INFO level At present there is no mechanism to specify driver load order, which can lead to deferrals and repeated retries until successful. @@ -1943,10 +1943,10 @@ index 13c875e2392a40ec5651d7c12a28b9ac9f3aab85..23d56057e49b5ff6b6c3c352c150fee8 goto _err_defer; } -From f933329702240c201e0b4e4fbc18243d2e81f144 Mon Sep 17 00:00:00 2001 +From cad06a693f80f570ddf05c15350a9b64207ae480 Mon Sep 17 00:00:00 2001 From: Claggy3 Date: Sat, 11 Feb 2017 14:00:30 +0000 -Subject: [PATCH 031/173] Update vfpmodule.c +Subject: [PATCH 031/199] Update vfpmodule.c Christopher Alexander Tobias Schulze - May 2, 2015, 11:57 a.m. This patch fixes a problem with VFP state save and restore related @@ -2083,10 +2083,10 @@ index a71a48e71fffa8626fe90106815376c44bbe679b..d6c0a5a0a5ae3510db3ace5e3f5d3410 /* * Save the userland NEON/VFP state. Under UP, -From 281224342f791bcaa650dd6112a313ce76b13f92 Mon Sep 17 00:00:00 2001 +From e0be6e1b8715ebc9527155fbc68e9c05abf9bd6d Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Mar 2017 21:13:24 +1100 -Subject: [PATCH 032/173] ASoC: bcm2835_i2s.c: relax the ch2 register setting +Subject: [PATCH 032/199] ASoC: bcm2835_i2s.c: relax the ch2 register setting for 8 channels This patch allows ch2 registers to be set for 8 channels of audio. @@ -2107,10 +2107,10 @@ index 6ba20498202ed36906b52096893a88867a79269f..56df7d8a43d0aac055a91b0d24aca8e1 format |= BCM2835_I2S_CH1(BCM2835_I2S_CHPOS(ch1pos)); format |= BCM2835_I2S_CH2(BCM2835_I2S_CHPOS(ch2pos)); -From 1d225fa894026b0a705f35363b18fed51fd6b977 Mon Sep 17 00:00:00 2001 +From 060a1edd625429eb91e89dbbb414ecd048bdb8e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Tue, 1 Nov 2016 15:15:41 +0100 -Subject: [PATCH 033/173] i2c: bcm2835: Add debug support +Subject: [PATCH 033/199] i2c: bcm2835: Add debug support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2299,10 +2299,10 @@ index cd07a69e2e9355540442785f95e90823b05c9d10..47167f403cc8329bd811b47c7011c299 if (i2c_dev->msg_err & BCM2835_I2C_S_ERR) return -EREMOTEIO; -From 4f96629b6c09bc6d99e205e145e8398611183658 Mon Sep 17 00:00:00 2001 +From c7a3bb4ffdf4611b3a0939b79ac3e2c2d312381d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 034/173] Main bcm2708/bcm2709 linux port +Subject: [PATCH 034/199] Main bcm2708/bcm2709 linux port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2490,10 +2490,10 @@ index cfb4b4496dd9f61362dea012176c146120fada07..d9c6c217c4d6a2408abe2665bf7f2700 MODULE_AUTHOR("Lubomir Rintel "); MODULE_DESCRIPTION("BCM2835 mailbox IPC driver"); -From 2cf89e248c1f9d4fe0cbc6721141d9aadd427187 Mon Sep 17 00:00:00 2001 +From ce7638012ddc3277b86c82a7c0b7096b91fdf6dd Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 035/173] Add dwc_otg driver +Subject: [PATCH 035/199] Add dwc_otg driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -63635,10 +63635,10 @@ index 0000000000000000000000000000000000000000..cdc9963176e5a4a0d5250613b61e26c5 +test_main(); +0; -From a40d36f39959c4f362ac2358c81a024725e44f94 Mon Sep 17 00:00:00 2001 +From 4ca9284f269d7a605e7e4f547309668bcf8f9b4c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 17:06:34 +0100 -Subject: [PATCH 036/173] bcm2708 framebuffer driver +Subject: [PATCH 036/199] bcm2708 framebuffer driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -67097,10 +67097,10 @@ index 3c14e43b82fefe1d32f591d1b2f61d2cd28d0fa8..7626beb6a5bb8df601ddf0f6e6909d1f +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 1753129c47da9aadf7041d176407003fc466d9df Mon Sep 17 00:00:00 2001 +From 278b0bc44b4fc7ebfbc23c479d3aaa328af07795 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 037/173] dmaengine: Add support for BCM2708 +Subject: [PATCH 037/199] dmaengine: Add support for BCM2708 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -67731,10 +67731,10 @@ index 0000000000000000000000000000000000000000..c5bfff2765be4606077e6c8af73040ec + +#endif /* _PLAT_BCM2708_DMA_H */ -From c9c5b3c903a77dbef477d199e2a5916d056fe4ed Mon Sep 17 00:00:00 2001 +From c2490058d14f3bc40a41ccd80be9da800bc9f31d Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:06 +0100 -Subject: [PATCH 038/173] MMC: added alternative MMC driver +Subject: [PATCH 038/199] MMC: added alternative MMC driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -69456,10 +69456,10 @@ index 0000000000000000000000000000000000000000..4fe8d1fe44578fbefcd48f8c327ba3d0 +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Gellert Weisz"); -From 7c111fc21e11126c810c8dd325ae4334bd54b9b2 Mon Sep 17 00:00:00 2001 +From be2f4cc3a33dc133234a2bb7553652ee95ce5cf3 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Mar 2015 17:49:47 +0000 -Subject: [PATCH 039/173] Adding bcm2835-sdhost driver, and an overlay to +Subject: [PATCH 039/199] Adding bcm2835-sdhost driver, and an overlay to enable it BCM2835 has two SD card interfaces. This driver uses the other one. @@ -71865,10 +71865,10 @@ index 0000000000000000000000000000000000000000..9c6f199a7830959f31012d86bc1f8b1a +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Phil Elwell"); -From ea3ad2b086d049e17be572c35e6c5bba86ebe6e4 Mon Sep 17 00:00:00 2001 +From d2a80e57c13c2c153b7e8b8dba361c1b8692ba1a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 28 Oct 2016 15:36:43 +0100 -Subject: [PATCH 040/173] vc_mem: Add vc_mem driver for querying firmware +Subject: [PATCH 040/199] vc_mem: Add vc_mem driver for querying firmware memory addresses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -72393,10 +72393,10 @@ index 0000000000000000000000000000000000000000..20a475377eb3078ea1ecaef2b24efc35 + +#endif /* _VC_MEM_H */ -From 5d1c473f557525d28a8b9f4a29330f6d8b746a1f Mon Sep 17 00:00:00 2001 +From 84929fb2f82a7f5b0a2fbe12617a665196f8599b Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Tue, 22 Jul 2014 15:41:04 +0100 -Subject: [PATCH 041/173] vcsm: VideoCore shared memory service for BCM2835 +Subject: [PATCH 041/199] vcsm: VideoCore shared memory service for BCM2835 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -76851,10 +76851,10 @@ index 0000000000000000000000000000000000000000..334f36d0d697b047df2922b5f2db67f3 + +#endif /* __VMCS_SM_IOCTL_H__INCLUDED__ */ -From 7b75205c2cd9672a52e657b0075ffa7355bf5093 Mon Sep 17 00:00:00 2001 +From cc56debc252777c1212638269c1b22702e66e575 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Fri, 21 Aug 2015 23:14:48 +0100 -Subject: [PATCH 042/173] Add /dev/gpiomem device for rootless user GPIO access +Subject: [PATCH 042/199] Add /dev/gpiomem device for rootless user GPIO access Signed-off-by: Luke Wren @@ -77162,10 +77162,10 @@ index 0000000000000000000000000000000000000000..f5e7f1ba8fb6f18dee77fad06a17480c +MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace"); +MODULE_AUTHOR("Luke Wren "); -From 2c20cabf60049a431c4946d2c8bbbd940dc43355 Mon Sep 17 00:00:00 2001 +From 49a86dca3ebee1a82de6e6926eda0073c63b6679 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:14:45 +0100 -Subject: [PATCH 043/173] Add SMI driver +Subject: [PATCH 043/199] Add SMI driver Signed-off-by: Luke Wren --- @@ -79116,10 +79116,10 @@ index 0000000000000000000000000000000000000000..ee3a75edfc033eeb0d90a687ffb68b10 + +#endif /* BCM2835_SMI_H */ -From 674631fb6af7dc61e7c2d2d9b50d96e29b46a72a Mon Sep 17 00:00:00 2001 +From c8ba2948c4be512930cac3e5b91747c12db1da59 Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Tue, 26 Apr 2016 14:59:21 +0000 -Subject: [PATCH 044/173] MISC: bcm2835: smi: use clock manager and fix reload +Subject: [PATCH 044/199] MISC: bcm2835: smi: use clock manager and fix reload issues Use clock manager instead of self-made clockmanager. @@ -79289,10 +79289,10 @@ index 63a4ea08b9930a3a31a985f0a1d969b488ed49ec..1261540703127d1d63b9f3c87042c6e5 return 0; } -From 437fba9ae6f282ea8d2fd7e568358f529640e222 Mon Sep 17 00:00:00 2001 +From af1adb0b5369053c77b970fd26d894d1d1e42f24 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:16:10 +0100 -Subject: [PATCH 045/173] Add SMI NAND driver +Subject: [PATCH 045/199] Add SMI NAND driver Signed-off-by: Luke Wren --- @@ -79657,10 +79657,10 @@ index 0000000000000000000000000000000000000000..02adda6da18bd0ba9ab19a104975b79d + ("Driver for NAND chips using Broadcom Secondary Memory Interface"); +MODULE_AUTHOR("Luke Wren "); -From 2ac4a21d9ef42dd54a9e532cffef4cac2ee31750 Mon Sep 17 00:00:00 2001 +From 3f10836ba73c3243ce82d4db696aebbdf1e8062e Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 046/173] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 046/199] 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 @@ -80520,10 +80520,10 @@ index 0000000000000000000000000000000000000000..fb69624ccef00ddbdccf8256d6baf1b1 + +#endif -From 751fe8b7692ced63db9d9e88a5e079ca9f3f632b Mon Sep 17 00:00:00 2001 +From b19b4f31feb4344c91b7a7a8fe2b865f26a235a0 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 047/173] Add cpufreq driver +Subject: [PATCH 047/199] Add cpufreq driver Signed-off-by: popcornmix --- @@ -80790,10 +80790,10 @@ index 0000000000000000000000000000000000000000..414fbdc10dfbfc6e4bb47870a7af3fd5 +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); -From 5ce7c9c8296f76830f0674046a97234e5a8c66e4 Mon Sep 17 00:00:00 2001 +From 08d5cb79d90de584c1c50b0105b9b09201722ae6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 15:44:08 +0100 -Subject: [PATCH 048/173] Add Chris Boot's i2c driver +Subject: [PATCH 048/199] Add Chris Boot's i2c driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -81458,10 +81458,10 @@ index 0000000000000000000000000000000000000000..962f2e5c7455d91bf32925d785f5f16b +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); -From 15fbd36ded7f781a25e607281877489e64d157b9 Mon Sep 17 00:00:00 2001 +From a986279e4623e0ea9fa652445ee4be39081f31cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:27:06 +0200 -Subject: [PATCH 049/173] char: broadcom: Add vcio module +Subject: [PATCH 049/199] char: broadcom: Add vcio module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -81686,10 +81686,10 @@ index 0000000000000000000000000000000000000000..c19bc2075c77879563ef5e59038b5a14 +MODULE_DESCRIPTION("Mailbox userspace access"); +MODULE_LICENSE("GPL"); -From 4d25c2b0be3edd7396a0b22a2e793c32a31e9f49 Mon Sep 17 00:00:00 2001 +From 8ee90476cff1615c2cbb26b5ebfe609e4d6f149d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:25:01 +0200 -Subject: [PATCH 050/173] firmware: bcm2835: Support ARCH_BCM270x +Subject: [PATCH 050/199] firmware: bcm2835: Support ARCH_BCM270x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -81772,10 +81772,10 @@ index dd506cd3a5b874f9e1acd07efb8cd151bb6145d1..3f070bd38a91511c986e3fb114b15bd4 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("Raspberry Pi firmware driver"); -From 121799ce3c68fd5c4982dab632114b83ef46f27d Mon Sep 17 00:00:00 2001 +From bca807b5aaf5a51bbe552b128d0e1f7da0b9ca80 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 May 2015 09:00:42 +0100 -Subject: [PATCH 051/173] scripts: Add mkknlimg and knlinfo scripts from tools +Subject: [PATCH 051/199] scripts: Add mkknlimg and knlinfo scripts from tools repo The Raspberry Pi firmware looks for a trailer on the kernel image to @@ -82302,10 +82302,10 @@ index 0000000000000000000000000000000000000000..84be2593ec1de8f97b0167ff06b3e05d + return $trailer; +} -From a5e82c204eb88de5fa9f1ea33cf39bf57f28c09b Mon Sep 17 00:00:00 2001 +From 28c36d896d2fde6815cbe6a644c8e5d6c0e4f518 Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:46:08 +0200 -Subject: [PATCH 052/173] BCM2708: Add core Device Tree support +Subject: [PATCH 052/199] BCM2708: Add core Device Tree support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -93750,10 +93750,10 @@ index 58c05e5d9870b6c18a72da7dc44ff3112994946d..9842523b225a88505d796cc689c04f40 # Bzip2 -From 6b4c72c0307a6de6dda6ffae1eae88bf174ccd52 Mon Sep 17 00:00:00 2001 +From 254e07fa77675b31244fb9a84bf4a2c423fa8a30 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Feb 2015 13:50:57 +0000 -Subject: [PATCH 053/173] BCM270x_DT: Add pwr_led, and the required "input" +Subject: [PATCH 053/199] BCM270x_DT: Add pwr_led, and the required "input" trigger The "input" trigger makes the associated GPIO an input. This is to support @@ -93928,10 +93928,10 @@ index 64c56d454f7df9f864a5242ce4212df586f66886..3fd74c8737871cb56f0355c858fc135e /* set_brightness_work / blink_timer flags, atomic, private. */ unsigned long work_flags; -From d1c26c42c63b3606fd7951c008b83864621ffc3f Mon Sep 17 00:00:00 2001 +From 87d1f0938731dbcb98ec31c6b6d4246d4533a5cd Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 054/173] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 054/199] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -94199,10 +94199,10 @@ index fb795c3b3c178ad3cd7c9e9e4547ffd492bac181..703fa8a70574323abe2fb32599254582 __u32 dx; /* screen-relative */ __u32 dy; -From 9c7384a03b7b1f487a69293d8dc3b1a3b70ddb9d Mon Sep 17 00:00:00 2001 +From 6916b81b798eefd9ceb95eb50627117608b4f451 Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 055/173] Speed up console framebuffer imageblit function +Subject: [PATCH 055/199] 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 @@ -94411,10 +94411,10 @@ index a2bb276a8b2463eee98eb237c4647bc00cd93601..436494fba15abecb400ef28688466faf start_index, pitch_index); } else -From d0718fee7b3a522e9660f108423528f001c88049 Mon Sep 17 00:00:00 2001 +From 707c7c4548d85e7d7dce820fa46529843408545a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 056/173] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 056/199] 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 @@ -94664,10 +94664,10 @@ index 90cbe7e65059f6b604a87c6bf39cd9bbeae7684c..a52be51ee0a5511a75d4eaa8dacaec5e u8, w1_slave_found_callback); }; -From be35652a05671e3011baea91e94db18e7ea6a384 Mon Sep 17 00:00:00 2001 +From e41ab7ae06a93ef0c4b78d14bcb8e82c5b947e28 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 14 Jul 2014 22:02:09 +0100 -Subject: [PATCH 057/173] hid: Reduce default mouse polling interval to 60Hz +Subject: [PATCH 057/199] hid: Reduce default mouse polling interval to 60Hz Reduces overhead when using X --- @@ -94699,10 +94699,10 @@ index c008847e0b20a2accb00451b10fb1c648f67925b..4a86428a3b4e3d51e9ac6ce9c9c11097 break; case HID_GD_JOYSTICK: -From 2ed02be91b7155dbe5d0c0a850bf761d8150806a Mon Sep 17 00:00:00 2001 +From cdda900d07b28dbb9345b916861252ca167b6b1e Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Tue, 12 May 2015 14:47:56 +0100 -Subject: [PATCH 058/173] rpi-ft5406: Add touchscreen driver for pi LCD display +Subject: [PATCH 058/199] rpi-ft5406: Add touchscreen driver for pi LCD display Fix driver detection failure Check that the buffer response is non-zero meaning the touchscreen was detected @@ -95060,10 +95060,10 @@ index 30fb37fe175df604a738258a2a632bca3bfff33f..4a3d79d3b48eb483a4e4bf498f617515 RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From 9c0b94406c5c1ec11a41bf9b2710051c36ce70e8 Mon Sep 17 00:00:00 2001 +From 760ef6fcb57abe6a1db43c38efd8bfd881f4b632 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 28 Nov 2016 16:50:04 +0000 -Subject: [PATCH 059/173] Improve __copy_to_user and __copy_from_user +Subject: [PATCH 059/199] Improve __copy_to_user and __copy_from_user performance Provide a __copy_from_user that uses memcpy. On BCM2708, use @@ -96638,10 +96638,10 @@ index 17ec37811c32f09126ed42753037e055c5cec115..c08f81812d0d56a0d90c1eb6777d0622 bool "Broadcom BCM63xx DSL SoC" depends on ARCH_MULTI_V7 -From 348a5e09f4bb1417fe37049c1334664d6dc4b5f3 Mon Sep 17 00:00:00 2001 +From d6b095b294a15dc298cc4f5e6d2a91be5e040486 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 25 Jun 2015 12:16:11 +0100 -Subject: [PATCH 060/173] gpio-poweroff: Allow it to work on Raspberry Pi +Subject: [PATCH 060/199] gpio-poweroff: Allow it to work on Raspberry Pi The Raspberry Pi firmware manages the power-down and reboot process. To do this it installs a pm_power_off handler, causing @@ -96676,10 +96676,10 @@ index be3d81ff51cc3f510d85e4eed7a52960e51e7bc1..a030ae9fb1fca325061c093696e82186 "%s: pm_power_off function already registered", __func__); -From 90f2efe61b9ba3c4a3bb0aed6c5aa76484b6d899 Mon Sep 17 00:00:00 2001 +From 25251ff87ca45c92a7c74e68587ba96e8ccd7d70 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 14:32:47 +0100 -Subject: [PATCH 061/173] mfd: Add Raspberry Pi Sense HAT core driver +Subject: [PATCH 061/199] mfd: Add Raspberry Pi Sense HAT core driver --- drivers/input/joystick/Kconfig | 8 + @@ -97544,10 +97544,10 @@ index 0000000000000000000000000000000000000000..56196dc2af10e464a1e3f98b028dca1c + +#endif -From 0d38f30ad88b8ad88309340e9171341ce8e98831 Mon Sep 17 00:00:00 2001 +From 8601452700f05c77b2368b01dac0db7721b0390f Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 -Subject: [PATCH 062/173] ASoC: Add support for HifiBerry DAC +Subject: [PATCH 062/199] ASoC: Add support for HifiBerry DAC This adds a machine driver for the HifiBerry DAC. It is a sound card that can @@ -97722,10 +97722,10 @@ index 0000000000000000000000000000000000000000..ee9f133953544629282631e5ef3f73fe +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); -From 95d9c85a641399f9d3a569db4ea02029f9bf12c8 Mon Sep 17 00:00:00 2001 +From 281166ab55ccc24f9eeb7b72a2ecfdd580d37b3a Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 25 Jan 2016 15:48:59 +0000 -Subject: [PATCH 063/173] ASoC: Add support for Rpi-DAC +Subject: [PATCH 063/199] ASoC: Add support for Rpi-DAC --- sound/soc/bcm/Kconfig | 7 +++ @@ -98009,10 +98009,10 @@ index 0000000000000000000000000000000000000000..afe1b419582aa40c4b2729d242bb13cd +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From 9fc26baae7c35ba5d07b9a95827d3228680c0705 Mon Sep 17 00:00:00 2001 +From de08c6cbae3e35f1b3c77836cc3b740394e002b1 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 -Subject: [PATCH 064/173] ASoC: wm8804: Implement MCLK configuration options, +Subject: [PATCH 064/199] 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 @@ -98061,10 +98061,10 @@ index af95d648265b3e92e345101542b332aee35191d4..513f56ba132929662802d15cdc653af3 .component_driver = { .dapm_widgets = wm8804_dapm_widgets, -From 37aa9704aff6efd6cb8c9593dab934a0896efa7b Mon Sep 17 00:00:00 2001 +From c4c4c2def63057e2a10cb563db6ad37d400d680c Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 -Subject: [PATCH 065/173] ASoC: BCM:Add support for HiFiBerry Digi. Driver is +Subject: [PATCH 065/199] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patched WM8804 driver. Signed-off-by: Daniel Matuschek @@ -98408,10 +98408,10 @@ index 0000000000000000000000000000000000000000..7620dd02de40b6d644ff038b445d375d +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); -From 133a00f5a6cd57787cca59ab2f7913ba5e362517 Mon Sep 17 00:00:00 2001 +From cc8c37ea04c575b57ef52345c5959ade7ffef299 Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 -Subject: [PATCH 066/173] Add IQaudIO Sound Card support for Raspberry Pi +Subject: [PATCH 066/199] Add IQaudIO Sound Card support for Raspberry Pi Set a limit of 0dB on Digital Volume Control @@ -98746,10 +98746,10 @@ index 0000000000000000000000000000000000000000..1ee4097c846376666775272ed692ca33 +MODULE_DESCRIPTION("ASoC Driver for IQAudio DAC"); +MODULE_LICENSE("GPL v2"); -From b87d532365fca2082ac3b45e057010e60eb09bf9 Mon Sep 17 00:00:00 2001 +From 0688bcd09c8d89959ca4974fcd57d5e32f2818b0 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 10:06:56 +0200 -Subject: [PATCH 067/173] Added support for HiFiBerry DAC+ +Subject: [PATCH 067/199] 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. @@ -99379,10 +99379,10 @@ index 72b19e62f6267698aea45d2410d616d91c1825cb..c6839ef6e16754ed9de2698507b8986a dev_err(dev, "No LRCLK?\n"); return -EINVAL; -From 563426f03b8ebee2e70b8b1d0027329348b5d05c Mon Sep 17 00:00:00 2001 +From 61b6a93d26d82226bc51b7a0e56e78d1b95d8ac3 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 11:09:58 +0200 -Subject: [PATCH 068/173] Added driver for HiFiBerry Amp amplifier add-on board +Subject: [PATCH 068/199] 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. @@ -100217,10 +100217,10 @@ index 0000000000000000000000000000000000000000..8f019e04898754d2f87e9630137be9e8 + +#endif /* _TAS5713_H */ -From 554deb30893bb040bd210b2caf2cf4011b85acfd Mon Sep 17 00:00:00 2001 +From 443e7d0bca07aee073c197d5429cc7a6c20da529 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 25 Mar 2015 09:26:17 +0100 -Subject: [PATCH 069/173] Add driver for rpi-proto +Subject: [PATCH 069/199] Add driver for rpi-proto Forward port of 3.10.x driver from https://github.com/koalo We are using a custom board and would like to use rpi 3.18.x @@ -100435,10 +100435,10 @@ index 0000000000000000000000000000000000000000..fadbfade100228aaafabb0d3bdf35c01 +MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to PROTO board (WM8731)"); +MODULE_LICENSE("GPL"); -From 1db46d8581da2dc1918791cf285b358f61915072 Mon Sep 17 00:00:00 2001 +From 5c7bbbec5ea19ab3ad27138803cc392ded3359c1 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:03:47 +0100 -Subject: [PATCH 070/173] RaspiDAC3 support +Subject: [PATCH 070/199] RaspiDAC3 support Signed-off-by: Jan Grulich @@ -100681,10 +100681,10 @@ index 0000000000000000000000000000000000000000..ad2b5b89bc8213dc2e277306ef50d6e3 +MODULE_DESCRIPTION("ASoC Driver for RaspiDAC Rev.3x"); +MODULE_LICENSE("GPL v2"); -From 3e9ea889a1832600d5d85e95ca8f9e1208636aca Mon Sep 17 00:00:00 2001 +From 9aece405c1735a0c20066c75d57b6da40edb1b4f Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Thu, 7 Apr 2016 21:26:21 +0100 -Subject: [PATCH 071/173] Add Support for JustBoom Audio boards +Subject: [PATCH 071/199] Add Support for JustBoom Audio boards justboom-dac: Adjust for ALSA API change @@ -101140,10 +101140,10 @@ index 0000000000000000000000000000000000000000..909cf8928f2f4313982316f9c5b8a709 +MODULE_DESCRIPTION("ASoC Driver for JustBoom PI Digi HAT Sound Card"); +MODULE_LICENSE("GPL v2"); -From f9f3c49616174451761f9650eeb54a7cd3d0c4a7 Mon Sep 17 00:00:00 2001 +From 12b89895a8ffc4222b381111c37303ec1cd0d7c7 Mon Sep 17 00:00:00 2001 From: Andrey Grodzovsky Date: Tue, 3 May 2016 22:10:59 -0400 -Subject: [PATCH 072/173] ARM: adau1977-adc: Add basic machine driver for +Subject: [PATCH 072/199] ARM: adau1977-adc: Add basic machine driver for adau1977 codec driver. This commit adds basic support for the codec usage including: Device tree overlay, @@ -101325,10 +101325,10 @@ index 0000000000000000000000000000000000000000..f3d7e5db7bb912e1d7ca6f8e8d42df5f +MODULE_DESCRIPTION("ASoC Driver for ADAU1977 ADC"); +MODULE_LICENSE("GPL v2"); -From 89146d6df7d2f1f0ac537dc1a6fab18d45745bac Mon Sep 17 00:00:00 2001 +From 0dd1a66f045710d880bfa5c96c53d883b39e27cd Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Mon, 16 May 2016 21:36:31 +1000 -Subject: [PATCH 073/173] New AudioInjector.net Pi soundcard with low jitter +Subject: [PATCH 073/199] New AudioInjector.net Pi soundcard with low jitter audio in and out. Contains the sound/soc/bcm ALSA machine driver and necessary alterations to the Kconfig and Makefile. @@ -101579,10 +101579,10 @@ index 0000000000000000000000000000000000000000..ef54e0f07ea03f59e9957b5d98f3e7fd +MODULE_ALIAS("platform:audioinjector-pi-soundcard"); + -From d2152e820d65214d326d86028f5e58f35b329688 Mon Sep 17 00:00:00 2001 +From da3f26748547b6d52f1b35c375a45205aba921cf Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Thu, 30 Jun 2016 18:38:42 +0100 -Subject: [PATCH 074/173] Add IQAudIO Digi WM8804 board support +Subject: [PATCH 074/199] Add IQAudIO Digi WM8804 board support Support IQAudIO Digi board with iqaudio_digi machine driver and iqaudio-digi-wm8804-audio overlay. @@ -101882,10 +101882,10 @@ index 0000000000000000000000000000000000000000..33aa2be8a43a12a12cfb5d844dd9732c +MODULE_DESCRIPTION("ASoC Driver for IQAudIO WM8804 Digi"); +MODULE_LICENSE("GPL v2"); -From 1660ae420d3e1bf946ab26d857a3efa44ed18399 Mon Sep 17 00:00:00 2001 +From 04900d8d8c36d123f3c437c6f6ec9b7021619641 Mon Sep 17 00:00:00 2001 From: escalator2015 Date: Tue, 24 May 2016 16:20:09 +0100 -Subject: [PATCH 075/173] New driver for RRA DigiDAC1 soundcard using WM8741 + +Subject: [PATCH 075/199] New driver for RRA DigiDAC1 soundcard using WM8741 + WM8804 --- @@ -102358,10 +102358,10 @@ index 0000000000000000000000000000000000000000..f200688bb4ae32b90a0ced555aed94b0 +MODULE_DESCRIPTION("ASoC Driver for RRA DigiDAC1"); +MODULE_LICENSE("GPL v2"); -From 314dc26021276267e532ae3a6695b3c730d670ca Mon Sep 17 00:00:00 2001 +From 5121a600bb82a3c7a835daa4dde1f74eb47ef292 Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Sat, 2 Jul 2016 16:26:19 +0100 -Subject: [PATCH 076/173] Add support for Dion Audio LOCO DAC-AMP HAT +Subject: [PATCH 076/199] Add support for Dion Audio LOCO DAC-AMP HAT Using dedicated machine driver and pcm5102a codec driver. @@ -102534,10 +102534,10 @@ index 0000000000000000000000000000000000000000..65e03741d349a2dc5bd91f69855ea952 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO"); +MODULE_LICENSE("GPL v2"); -From 5f645d53ff8cd061433ae75986e3c29d672d413f Mon Sep 17 00:00:00 2001 +From 3aa340cb5d67bf17ddf70b913a7c6804af0ff3d2 Mon Sep 17 00:00:00 2001 From: Clive Messer Date: Mon, 19 Sep 2016 14:01:04 +0100 -Subject: [PATCH 077/173] Allo Piano DAC boards: Initial 2 channel (stereo) +Subject: [PATCH 077/199] Allo Piano DAC boards: Initial 2 channel (stereo) support (#1645) Add initial 2 channel (stereo) support for Allo Piano DAC (2.0/2.1) boards, @@ -102744,10 +102744,10 @@ index 0000000000000000000000000000000000000000..eaf50fb6dbca1970ae1c6f8662088b0f +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC"); +MODULE_LICENSE("GPL v2"); -From 9122ceca49ddb8ce8a648cd5181e8bdd9c582086 Mon Sep 17 00:00:00 2001 +From f454c7bbdd01560f2598720c3538fb0915d97f57 Mon Sep 17 00:00:00 2001 From: Raashid Muhammed Date: Mon, 27 Mar 2017 12:35:00 +0530 -Subject: [PATCH 078/173] Add support for Allo Piano DAC 2.1 plus add-on board +Subject: [PATCH 078/199] Add support for Allo Piano DAC 2.1 plus add-on board for Raspberry Pi. The Piano DAC 2.1 has support for 4 channels with subwoofer. @@ -103492,10 +103492,10 @@ index 0000000000000000000000000000000000000000..56e43f98846b41e487b3089813f7edc3 +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC Plus"); +MODULE_LICENSE("GPL v2"); -From 74245f043c6887e406fe0a5cb7c75074985b8ca5 Mon Sep 17 00:00:00 2001 +From 99177cea77971faf0a40928bba8672321560b8a1 Mon Sep 17 00:00:00 2001 From: BabuSubashChandar Date: Tue, 28 Mar 2017 20:04:42 +0530 -Subject: [PATCH 079/173] Add support for Allo Boss DAC add-on board for +Subject: [PATCH 079/199] Add support for Allo Boss DAC add-on board for Raspberry Pi. (#1924) Signed-off-by: Baswaraj K @@ -104198,10 +104198,10 @@ index 0000000000000000000000000000000000000000..203ab76c7045b081578e23bda1099dd1 +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Boss DAC"); +MODULE_LICENSE("GPL v2"); -From 73c0d15d727f497ee7df6fa6f9e0829e04fe1d70 Mon Sep 17 00:00:00 2001 +From 2b4f81ee788866bccb81d6c116f73120b91ccdc8 Mon Sep 17 00:00:00 2001 From: gtrainavicius Date: Sun, 23 Oct 2016 12:06:53 +0300 -Subject: [PATCH 080/173] Support for Blokas Labs pisound board +Subject: [PATCH 080/199] Support for Blokas Labs pisound board Pisound dynamic overlay (#1760) @@ -105400,10 +105400,10 @@ index 0000000000000000000000000000000000000000..06ff1e53dc9d860946965b6303577762 +MODULE_DESCRIPTION("ASoC Driver for pisound, http://blokas.io/pisound"); +MODULE_LICENSE("GPL v2"); -From 3dd54e337ec7f50b718a63db94550d7f3bced8e7 Mon Sep 17 00:00:00 2001 +From c827b76c4ee6a9da9701f466282c852750d6f427 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 22 Jan 2017 12:49:37 +0100 -Subject: [PATCH 081/173] ASoC: Add driver for Cirrus Logic Audio Card +Subject: [PATCH 081/199] ASoC: Add driver for Cirrus Logic Audio Card Note: due to problems with deferred probing of regulators the following softdep should be added to a modprobe.d file @@ -106468,10 +106468,10 @@ index 0000000000000000000000000000000000000000..ac8651ddff7bd3701dffe22c7fb88352 +MODULE_DESCRIPTION("ASoC driver for Cirrus Logic Audio Card"); +MODULE_LICENSE("GPL"); -From bc36160418de7ebd7bf4c4d2a52f0d769194954b Mon Sep 17 00:00:00 2001 +From acaf57bbffafca6ac323bb86be1e08e079bcd6bd Mon Sep 17 00:00:00 2001 From: Miquel Date: Fri, 24 Feb 2017 20:51:06 +0100 -Subject: [PATCH 082/173] sound: Support for Dion Audio LOCO-V2 DAC-AMP HAT +Subject: [PATCH 082/199] sound: Support for Dion Audio LOCO-V2 DAC-AMP HAT Signed-off-by: Miquel Blauw --- @@ -106666,10 +106666,10 @@ index 0000000000000000000000000000000000000000..a009c49477972a9832175d86f201b035 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO-V2"); +MODULE_LICENSE("GPL v2"); -From 314df407eb4bf4166ab8b91da5e3f73609946f50 Mon Sep 17 00:00:00 2001 +From 909bf34f09ed99e7dc9160d1c8facdb8ac0b91bb Mon Sep 17 00:00:00 2001 From: Fe-Pi Date: Wed, 1 Mar 2017 04:42:43 -0700 -Subject: [PATCH 083/173] Add support for Fe-Pi audio sound card. (#1867) +Subject: [PATCH 083/199] Add support for Fe-Pi audio sound card. (#1867) Fe-Pi Audio Sound Card is based on NXP SGTL5000 codec. Mechanical specification of the board is the same the Raspberry Pi Zero. @@ -106883,10 +106883,10 @@ index 0000000000000000000000000000000000000000..015b56fd73cc36be5b5eecd17548fd03 +MODULE_DESCRIPTION("ASoC Driver for Fe-Pi Audio"); +MODULE_LICENSE("GPL v2"); -From e3ee86733ec6df9188b0d64d70877adb452c9ad6 Mon Sep 17 00:00:00 2001 +From dc07f0d2ca6061d98ed134edc1cb518579569bd9 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Mar 2017 20:04:13 +1100 -Subject: [PATCH 084/173] Add support for the AudioInjector.net Octo sound card +Subject: [PATCH 084/199] Add support for the AudioInjector.net Octo sound card AudioInjector Octo: sample rates, regulators, reset @@ -107288,10 +107288,10 @@ index 0000000000000000000000000000000000000000..dcf403ab37639ba79e38278d7e4b1ade +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:audioinjector-octo-soundcard"); -From 87a8a2b436a1694ede168fa77994e29c16fec183 Mon Sep 17 00:00:00 2001 +From 88d45791930a8182c4a958fa2e4a5de27dd9ec25 Mon Sep 17 00:00:00 2001 From: Peter Malkin Date: Mon, 27 Mar 2017 16:38:21 -0700 -Subject: [PATCH 085/173] Driver support for Google voiceHAT soundcard. +Subject: [PATCH 085/199] Driver support for Google voiceHAT soundcard. --- sound/soc/bcm/Kconfig | 7 ++ @@ -107682,10 +107682,10 @@ index 0000000000000000000000000000000000000000..225854b8e5298b3c3018f59a49404354 +MODULE_DESCRIPTION("ASoC Driver for Google voiceHAT SoundCard"); +MODULE_LICENSE("GPL v2"); -From ef2d4677dbd95942ef4b799dc343411183e53f5b Mon Sep 17 00:00:00 2001 +From df80b7c7680397e758392a7db950b512d82894b4 Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 21 Oct 2015 14:55:21 +0100 -Subject: [PATCH 086/173] rpi_display: add backlight driver and overlay +Subject: [PATCH 086/199] rpi_display: add backlight driver and overlay Add a mailbox-driven backlight controller for the Raspberry Pi DSI touchscreen display. Requires updated GPU firmware to recognise the @@ -107854,10 +107854,10 @@ index 0000000000000000000000000000000000000000..14a0d9b037395497c1fdae2961feccd5 +MODULE_DESCRIPTION("Raspberry Pi mailbox based Backlight Driver"); +MODULE_LICENSE("GPL"); -From 80071abd1a5757097e30e3474d7945df9e5e1540 Mon Sep 17 00:00:00 2001 +From 74414ea558e4944606017dea505ccc180f16bac8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 23 Feb 2016 19:56:04 +0000 -Subject: [PATCH 087/173] bcm2835-virtgpio: Virtual GPIO driver +Subject: [PATCH 087/199] bcm2835-virtgpio: Virtual GPIO driver Add a virtual GPIO driver that uses the firmware mailbox interface to request that the VPU toggles LEDs. @@ -108131,10 +108131,10 @@ index 4a3d79d3b48eb483a4e4bf498f617515e3ad158f..5f34e1257117fb48013c9926a8a223d6 RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From 8bda6e9cef790aab89b07d56fbbea72db787bc32 Mon Sep 17 00:00:00 2001 +From 5856009e6c33a26c0ed7eaad482be179e102dd6a Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 20 Feb 2017 17:01:21 +0000 -Subject: [PATCH 088/173] bcm2835-gpio-exp: Driver for GPIO expander via +Subject: [PATCH 088/199] bcm2835-gpio-exp: Driver for GPIO expander via mailbox service Pi3 and Compute Module 3 have a GPIO expander that the @@ -108460,10 +108460,10 @@ index 5f34e1257117fb48013c9926a8a223d64a598ab7..c819c21b0158a59c1308882e5a40e3f3 /* Dispmanx TAGS */ RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001, -From 4982ff8f2f3780a6d82f03da3f52375b602e0d28 Mon Sep 17 00:00:00 2001 +From 1429f8125e1da9b233d79f61a5cbf7a02469fd50 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 23 Feb 2016 17:26:48 +0000 -Subject: [PATCH 089/173] amba_pl011: Don't use DT aliases for numbering +Subject: [PATCH 089/199] amba_pl011: Don't use DT aliases for numbering The pl011 driver looks for DT aliases of the form "serial", and if found uses as the device ID. This can cause @@ -108492,10 +108492,10 @@ index 1888d168a41c87c605962da2605df8ab1c02bd20..e22b9e79836a6aeef4c8f9fb618b9595 uap->old_cr = 0; uap->port.dev = dev; -From a9fa581c618a4ad0f041e7ff6f82e5fad0f7cdb4 Mon Sep 17 00:00:00 2001 +From c7a41e7ed777fee2617ff4e2a51cba459f18b917 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 1 Mar 2017 16:07:39 +0000 -Subject: [PATCH 090/173] amba_pl011: Round input clock up +Subject: [PATCH 090/199] amba_pl011: Round input clock up The UART clock is initialised to be as close to the requested frequency as possible without exceeding it. Now that there is a @@ -108581,10 +108581,10 @@ index e22b9e79836a6aeef4c8f9fb618b9595c551500f..4b815abbf9913075885ee60f4d9ad49d /* unregisters the driver also if no more ports are left */ static void pl011_unregister_port(struct uart_amba_port *uap) -From 7bae3b057de6271cc60c5fb58df61de79ba11ff5 Mon Sep 17 00:00:00 2001 +From fbe8a3d3438cd6c3e3bfeb60f7c28c045037c6e3 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 3 Dec 2014 13:23:28 +0200 -Subject: [PATCH 091/173] OF: DT-Overlay configfs interface +Subject: [PATCH 091/199] OF: DT-Overlay configfs interface This is a port of Pantelis Antoniou's v3 port that makes use of the new upstreamed configfs support for binary attributes. @@ -109016,10 +109016,10 @@ index 0000000000000000000000000000000000000000..0037e6868a6cda8706c88194c6a4454b +} +late_initcall(of_cfs_init); -From ee744cbd4f413ecab6f664274972c3807c9d606e Mon Sep 17 00:00:00 2001 +From e2d6f47cb3e1d1f8aa668c5042924bb21f799a4a Mon Sep 17 00:00:00 2001 From: Cheong2K Date: Fri, 26 Feb 2016 18:20:10 +0800 -Subject: [PATCH 092/173] brcm: adds support for BCM43341 wifi +Subject: [PATCH 092/199] brcm: adds support for BCM43341 wifi brcmfmac: Disable power management @@ -109151,10 +109151,10 @@ index f3556122c6ace17c419e13023057861957a507fa..f8d4647016a1cde3d51dd43da07a46ce BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43362_CHIP_ID, 0xFFFFFFFE, 43362), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4339_CHIP_ID, 0xFFFFFFFF, 4339), -From 862219e4c44154cb99abcdd78281a2082de3d53f Mon Sep 17 00:00:00 2001 +From 226c2f122350faed258b25771bee1c67291f56fd Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 17 Feb 2017 15:26:13 +0000 -Subject: [PATCH 093/173] brcmfmac: Mute expected startup 'errors' +Subject: [PATCH 093/199] brcmfmac: Mute expected startup 'errors' The brcmfmac WiFi driver always complains about the '00' country code. Modify the driver to ignore '00' silently. @@ -109178,10 +109178,10 @@ index 508cab2d0817914d454958f92167d350c74d9a5d..987b1f5b999b0ecb68b6ce741b8e3ddb req->alpha2[0], req->alpha2[1]); return; -From 1c5d4e984dc9d4729c336c7d56f41507f0973806 Mon Sep 17 00:00:00 2001 +From 8d02a39e97f408198f347647a1351b03c31b8bfa Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Dec 2015 13:37:07 +0000 -Subject: [PATCH 094/173] hci_h5: Don't send conf_req when ACTIVE +Subject: [PATCH 094/199] hci_h5: Don't send conf_req when ACTIVE Without this patch, a modem and kernel can continuously bombard each other with conf_req and conf_rsp messages, in a demented game of tag. @@ -109204,10 +109204,10 @@ index c0e4e26dc30d7c3c6a771b7b86df88c8cf763646..7308287259eedcaf229f8a496a0e3826 if (H5_HDR_LEN(hdr) > 2) h5->tx_win = (data[2] & 0x07); -From 3de80acbf475780288c867ec9b885da847d90d4a Mon Sep 17 00:00:00 2001 +From 42d9325a007a9a4f166f22f9b09bf37afe6452e1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 13 Apr 2015 17:16:29 +0100 -Subject: [PATCH 095/173] config: Add default configs +Subject: [PATCH 095/199] config: Add default configs --- arch/arm/configs/bcm2709_defconfig | 1312 +++++++++++++++++++++++++++++++++++ @@ -111859,10 +111859,10 @@ index 0000000000000000000000000000000000000000..29fd2abc2cbfcaed37cb630b5edffaa5 +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -From aa0d7e5a28f52a73aa338d6460da265ff880861b Mon Sep 17 00:00:00 2001 +From ca58cd14d77105a95a2b7abf6660e9453e8a1333 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Wed, 24 Aug 2016 03:35:56 -0700 -Subject: [PATCH 096/173] Add arm64 configuration and device tree differences. +Subject: [PATCH 096/199] Add arm64 configuration and device tree differences. Disable MMC_BCM2835_SDHOST and MMC_BCM2835 since these drivers are crashing at the moment. @@ -113276,10 +113276,10 @@ index 0000000000000000000000000000000000000000..e6b09fafa27eed2b762e3d53b55041f7 +CONFIG_LIBCRC32C=y +CONFIG_BCM2835_VCHIQ=n -From 8e2219a0baafc84fd4d99777767c2fb2af678d61 Mon Sep 17 00:00:00 2001 +From c1b44639558d397e5c5efa884a69880ee64d5a5f Mon Sep 17 00:00:00 2001 From: Electron752 Date: Thu, 12 Jan 2017 07:07:08 -0800 -Subject: [PATCH 097/173] ARM64: Make it work again on 4.9 (#1790) +Subject: [PATCH 097/199] ARM64: Make it work again on 4.9 (#1790) * Invoke the dtc compiler with the same options used in arm mode. * ARM64 now uses the bcm2835 platform just like ARM32. @@ -113688,10 +113688,10 @@ index e6b09fafa27eed2b762e3d53b55041f793683d27..c7e891d72969a388d9b135a36dbfc9c9 CONFIG_LIBCRC32C=y -CONFIG_BCM2835_VCHIQ=n -From 22c1d2230b0a3c24579468f54d01fa5de1596eb4 Mon Sep 17 00:00:00 2001 +From 1e28e06eea4a398c7efd323e4c542aa0c74f8187 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Thu, 12 Jan 2017 19:10:07 -0800 -Subject: [PATCH 098/173] ARM64: Enable HDMI audio and vc04_services in +Subject: [PATCH 098/199] ARM64: Enable HDMI audio and vc04_services in bcmrpi3_defconfig Signed-off-by: Michael Zoran @@ -113720,10 +113720,10 @@ index c7e891d72969a388d9b135a36dbfc9c9cb609bf8..4b90f9b64abe9f089ba56b13d5a00de3 CONFIG_BCM2835_MBOX=y # CONFIG_IOMMU_SUPPORT is not set -From 7b4499e2b9552b0b365016240a16c8072bb5f627 Mon Sep 17 00:00:00 2001 +From 9415b9d030e48d72531f5427ffd2f6eef6a10cfc Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Thu, 12 Jan 2017 19:14:03 -0800 -Subject: [PATCH 099/173] ARM64: Run bcmrpi3_defconfig through savedefconfig. +Subject: [PATCH 099/199] ARM64: Run bcmrpi3_defconfig through savedefconfig. Signed-off-by: Michael Zoran --- @@ -113768,10 +113768,10 @@ index 4b90f9b64abe9f089ba56b13d5a00de33343bfb9..dac962ca1634662ce7d966f1ffb53b5b CONFIG_FB_TFT_AGM1264K_FL=m CONFIG_FB_TFT_BD663474=m -From 17093b0945689c18b8695f59f9994313671ab152 Mon Sep 17 00:00:00 2001 +From 87cdf802723bc18edc7a23a498305a0c034fc7fa Mon Sep 17 00:00:00 2001 From: Electron752 Date: Sat, 14 Jan 2017 02:54:26 -0800 -Subject: [PATCH 100/173] ARM64: Enable Kernel Address Space Randomization +Subject: [PATCH 100/199] ARM64: Enable Kernel Address Space Randomization (#1792) Randomization allows the mapping between virtual addresses and physical @@ -113803,10 +113803,10 @@ index dac962ca1634662ce7d966f1ffb53b5bfa27c506..aae33b4b3c3e736ea7cd3ca242158ad6 CONFIG_BINFMT_MISC=y CONFIG_COMPAT=y -From 4e8ce0d9fe85bd01daead09f28aa2be3cbce7edb Mon Sep 17 00:00:00 2001 +From 5b36fd225f5b04ee9d01fa0d2b1a5be0b194e5a1 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sun, 15 Jan 2017 07:31:59 -0800 -Subject: [PATCH 101/173] ARM64: Enable RTL8187/RTL8192CU wifi in build config +Subject: [PATCH 101/199] ARM64: Enable RTL8187/RTL8192CU wifi in build config These drivers build now, so they can be enabled back in the build configuration just like they are for @@ -113831,10 +113831,10 @@ index aae33b4b3c3e736ea7cd3ca242158ad6ba558aff..b7d762df19b85e369a32cd823dfd0621 CONFIG_ZD1211RW=m CONFIG_MAC80211_HWSIM=m -From 5144c8dd8cfdaecf22c4bc4b7aabbae11faa034f Mon Sep 17 00:00:00 2001 +From c746af6cb3b2197c46621f2430c0ef6f2f9a49e1 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:33:51 -0800 -Subject: [PATCH 102/173] ARM64/DWC_OTG: Port dwc_otg driver to ARM64 +Subject: [PATCH 102/199] ARM64/DWC_OTG: Port dwc_otg driver to ARM64 In ARM64, the FIQ mechanism used by this driver is not current implemented. As a workaround, reqular IRQ is used instead @@ -114177,10 +114177,10 @@ index 6b2c7d0c93f36a63863ff4b0ecc1f3eab77e058b..d7b700ff17821ad1944e36721fe6b2db /** The OS page size */ #define DWC_OS_PAGE_SIZE PAGE_SIZE -From 1776d57f4d2d9e1241edd81b0f94b54d44d911bd Mon Sep 17 00:00:00 2001 +From 7df3f200104eb850efc44d8637a8c3bfe9915b76 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:43:57 -0800 -Subject: [PATCH 103/173] ARM64: Round-Robin dispatch IRQs between CPUs. +Subject: [PATCH 103/199] ARM64: Round-Robin dispatch IRQs between CPUs. IRQ-CPU mapping is round robined on ARM64 to increase concurrency and allow multiple interrupts to be serviced @@ -114254,10 +114254,10 @@ index c4e151451cf8c8ebde5225515eac2786d6f61d46..9a7ee04ee0d9b7aa734cf3159ed59c19 .name = "bcm2836-gpu", .irq_mask = bcm2836_arm_irqchip_mask_gpu_irq, -From 32cdec81d123f94e87194e77a0e45b639880b130 Mon Sep 17 00:00:00 2001 +From c70733205699a8736e3211e9fcc4252fa1c09182 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:45:03 -0800 -Subject: [PATCH 104/173] ARM64: Enable DWC_OTG Driver In ARM64 Build +Subject: [PATCH 104/199] ARM64: Enable DWC_OTG Driver In ARM64 Build Config(bcmrpi3_defconfig) Signed-off-by: Michael Zoran @@ -114278,10 +114278,10 @@ index b7d762df19b85e369a32cd823dfd062145bdefa7..4d85c231c5ea0244e1b05fb4a5e3c8fd CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE_REALTEK=m -From 3503301d0f63751ed4be814d6bf4c9c4e0cc0148 Mon Sep 17 00:00:00 2001 +From 01a717501acaf2fa10a897780bc5ceadb90c6e42 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 11 Feb 2017 01:18:31 -0800 -Subject: [PATCH 105/173] ARM64: Force hardware emulation of deprecated +Subject: [PATCH 105/199] ARM64: Force hardware emulation of deprecated instructions. --- @@ -114309,10 +114309,10 @@ index f0e6d717885b1fcf3b22f64c10c38f19c25f809d..0cb830d30fb6d2bd26ab572efe893649 case INSN_OBSOLETE: insn->current_mode = INSN_UNDEF; -From c75fea4314f25493f1a4fa41c0495dccb07d45a2 Mon Sep 17 00:00:00 2001 +From a40a623fb150828587960a458d5359be72a5a47a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 10 Feb 2017 17:57:08 -0800 -Subject: [PATCH 106/173] build/arm64: Add rules for .dtbo files for dts +Subject: [PATCH 106/199] build/arm64: Add rules for .dtbo files for dts overlays We now create overlays as .dtbo files. @@ -114337,10 +114337,10 @@ index 9b41f1e3b1a039cd45fe842e10abff0181186fdf..dc2859b8eed168ed52e95c503e7a5ce3 dtbs: prepare scripts -From 2f1efd7d3d0b00d0ee8d633a19534ac7442f3de4 Mon Sep 17 00:00:00 2001 +From c461e7d7be901677c7c644fd2cd9900c96d732d4 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 9 May 2016 17:28:18 -0700 -Subject: [PATCH 107/173] clk: bcm2835: Mark GPIO clocks enabled at boot as +Subject: [PATCH 107/199] clk: bcm2835: Mark GPIO clocks enabled at boot as critical. These divide off of PLLD_PER and are used for the ethernet and wifi @@ -114378,10 +114378,10 @@ index 336f8c9c44325d0a94e591a8557f7af246adc857..caa05e5ad0b7b5cd683e04fb3591a3df * rate changes on at least of the parents. */ -From 3fc8182fc7a7b27f4867368e5ded2b76f9deefa6 Mon Sep 17 00:00:00 2001 +From 2707c76678d5f062a8bcc7bdcea2cc360012f95b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 24 Feb 2015 13:40:50 +0000 -Subject: [PATCH 108/173] pinctrl-bcm2835: Fix interrupt handling for GPIOs +Subject: [PATCH 108/199] pinctrl-bcm2835: Fix interrupt handling for GPIOs 28-31 and 46-53 Contrary to the documentation, the BCM2835 GPIO controller actually has @@ -114414,10 +114414,10 @@ index a9d480df32562defbf8be0faf0a39bfe06ff71f9..18c92bae3b2e7e9f8208ca0d4487b08b .suppress_bind_attrs = true, }, -From 8d5d79c2d7ee7973c9901827d6a192b248f2a2eb Mon Sep 17 00:00:00 2001 +From 59dac86438c76757e3486ed71ed0f3547ad2040f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 10:06:56 +0000 -Subject: [PATCH 109/173] ASoC: Add prompt for ICS43432 codec +Subject: [PATCH 109/199] ASoC: Add prompt for ICS43432 codec Without a prompt string, a config setting can't be included in a defconfig. Give CONFIG_SND_SOC_ICS43432 a prompt so that Pi soundcards @@ -114442,10 +114442,10 @@ index aca3a53f08dba8762307f7c25a5d7c5561b9cf71..a3be6e005a895b995897cc007bb85c78 config SND_SOC_INNO_RK3036 tristate "Inno codec driver for RK3036 SoC" -From cacb59c057cd62127e01ef15603e71ddb7fcc7ce Mon Sep 17 00:00:00 2001 +From 6cfd9b45e95966f54ec1ddb7295add5d58eede7b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 16:34:46 +0000 -Subject: [PATCH 110/173] bcm2835-aux: Add aux interrupt controller +Subject: [PATCH 110/199] bcm2835-aux: Add aux interrupt controller The AUX block has a shared interrupt line with a register indicating which devices have active IRQs. Expose this as a nested interrupt @@ -114609,10 +114609,10 @@ index bd750cf2238d61489811e7d7bd3b5f9950ed53c8..41e0702fae4692221980b0d02aed1ba6 BCM2835_AUX_CLOCK_COUNT, GFP_KERNEL); if (!onecell) -From f2512ac2b55b875a24a50e59b889afc8140c254e Mon Sep 17 00:00:00 2001 +From 541b179130ab76694bf3d62f27c15146c2876f2f Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 29 Apr 2016 10:32:17 -0700 -Subject: [PATCH 111/173] mmc: read mmc alias from device tree +Subject: [PATCH 111/199] mmc: read mmc alias from device tree To get the SD/MMC host device ID, read the alias from the device tree. @@ -114669,10 +114669,10 @@ index 1503412f826cd0e0e9ad37a0554b31596a49eb77..2f5b3cf86293b96b104eac7c6d48a583 kfree(host); return NULL; -From ecf97118ac5de61d3bf2d83b466280ee29a63822 Mon Sep 17 00:00:00 2001 +From 27a313cf19bffa4d005c6f93db0b5e86425b51a6 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 11 May 2016 12:50:33 +0100 -Subject: [PATCH 112/173] mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards +Subject: [PATCH 112/199] mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards Some SD cards have been found that corrupt data when small blocks are erased. Add a quirk to indicate that ERASE should not be used, @@ -114812,10 +114812,10 @@ index 46c73e97e61f08a41d9753079345f5965caebbc5..388c551ed11e9d06ea1c25b6553d47a8 unsigned int erase_size; /* erase size in sectors */ -From c8b7e3062f047e73581ea9467b79a0c7ca70282c Mon Sep 17 00:00:00 2001 +From be214c817e1c8b75dae09c41df825be00a34a68d Mon Sep 17 00:00:00 2001 From: Yasunari Takiguchi Date: Fri, 14 Apr 2017 10:43:57 +0100 -Subject: [PATCH 113/173] This is the driver for Sony CXD2880 DVB-T2/T tuner + +Subject: [PATCH 113/199] This is the driver for Sony CXD2880 DVB-T2/T tuner + demodulator. It includes the CXD2880 driver and the CXD2880 SPI adapter. The current CXD2880 driver version is 1.4.1 - 1.0.1 released on April 13, 2017. @@ -130947,10 +130947,10 @@ index 0000000000000000000000000000000000000000..82e122349055be817eb74ed5bbcd7560 +MODULE_AUTHOR("Sony Semiconductor Solutions Corporation"); +MODULE_LICENSE("GPL v2"); -From 2572d44289de83da22f0c5537264db7ab390d054 Mon Sep 17 00:00:00 2001 +From f84647ba6a7b448ac028b16837a4a233281d4c5b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:18:09 +0100 -Subject: [PATCH 114/173] raspberrypi-firmware: Define the MBOX channel in the +Subject: [PATCH 114/199] raspberrypi-firmware: Define the MBOX channel in the header. Signed-off-by: Eric Anholt @@ -130972,10 +130972,10 @@ index c819c21b0158a59c1308882e5a40e3f3fe73cbdf..de2a3dcd562beb752266eaf0070e5586 enum rpi_firmware_property_status { -From 6a1197ebcdaf028b90367012c289167371d085c8 Mon Sep 17 00:00:00 2001 +From 2cc8481ced77925ef4a150b368b33f35a453a55f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:16:19 +0100 -Subject: [PATCH 115/173] raspberrypi-firmware: Export the general transaction +Subject: [PATCH 115/199] raspberrypi-firmware: Export the general transaction function. The vc4-firmware-kms module is going to be doing the MBOX FB call. @@ -131019,10 +131019,10 @@ index de2a3dcd562beb752266eaf0070e55861d553f5f..dc7fd58afd5dddebf9b17065bb069a1d #endif /* __SOC_RASPBERRY_FIRMWARE_H__ */ -From ca0b875af245f0577d38b589bd7c32680ef13e0c Mon Sep 17 00:00:00 2001 +From 444cc6c9a1a6245f41cd0d4ed517fb697c10a0bf Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 08:39:33 +0100 -Subject: [PATCH 116/173] drm/vc4: Add a mode for using the closed firmware for +Subject: [PATCH 116/199] drm/vc4: Add a mode for using the closed firmware for display. Signed-off-by: Eric Anholt @@ -131794,10 +131794,10 @@ index 0000000000000000000000000000000000000000..7dd233eed677c1689492ab95bc864753 + }, +}; -From 8d12d4e3904b051c0df8fcfa3aa5dedc93ec6e6c Mon Sep 17 00:00:00 2001 +From 22eee465cf18360c31415a35bff8b991d7560223 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Feb 2017 17:09:18 -0800 -Subject: [PATCH 117/173] drm/vc4: Name the primary and cursor planes in fkms. +Subject: [PATCH 117/199] drm/vc4: Name the primary and cursor planes in fkms. This makes debugging nicer, compared to trying to remember what the IDs are. @@ -131821,10 +131821,10 @@ index 7dd233eed677c1689492ab95bc86475330d2d63b..e6097046fb25361bc61d657083d95b63 if (type == DRM_PLANE_TYPE_PRIMARY) { vc4_plane->fbinfo = -From f561f2b6efcfec7d3daae3b9c3288533d192c6d6 Mon Sep 17 00:00:00 2001 +From e812ab5501b645d4a2939fd4c15eccf7f4c7cf10 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Feb 2017 17:10:09 -0800 -Subject: [PATCH 118/173] drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of +Subject: [PATCH 118/199] drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of fkms. Trying to debug weston on fkms involved figuring out what calls I was @@ -131894,10 +131894,10 @@ index e6097046fb25361bc61d657083d95b634232aabc..72d0b9cffe3d2997d69040c46f4aee11 RPI_FIRMWARE_SET_CURSOR_STATE, &packet_state, -From 59e5aba1a8af1803c655cfec60ba4ef0fda99424 Mon Sep 17 00:00:00 2001 +From bb2165fbe6a22c281525245f0c3f1cdfb62968e0 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 2 Feb 2017 09:42:18 -0800 -Subject: [PATCH 119/173] drm/vc4: Fix sending of page flip completion events +Subject: [PATCH 119/199] drm/vc4: Fix sending of page flip completion events in FKMS mode. In the rewrite of vc4_crtc.c for fkms, I dropped the part of the @@ -131939,10 +131939,10 @@ index 72d0b9cffe3d2997d69040c46f4aee11e22aa213..185f9bd3c1b2d47d0c1fc5293db4199b static void vc4_crtc_handle_page_flip(struct vc4_crtc *vc4_crtc) -From 86905ab00857eb22f1eb8909858ba2e7e3a9165a Mon Sep 17 00:00:00 2001 +From 296a55719cbd424eef3248de8c6845b1fe064150 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 18 Apr 2017 21:43:46 +0100 -Subject: [PATCH 120/173] vc4_fkms: Apply firmware overscan offset to hardware +Subject: [PATCH 120/199] vc4_fkms: Apply firmware overscan offset to hardware cursor --- @@ -131999,10 +131999,10 @@ index 185f9bd3c1b2d47d0c1fc5293db4199bd8963023..072f377b7423ee603d73ace2bf6d620f return 0; -From 4a5fef4b0d90416a76e64de8f4dbc2d75924894f Mon Sep 17 00:00:00 2001 +From b8c3bb12f30704ebe5737db5aaf0890e46b5584b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 16 May 2017 14:39:49 +0100 -Subject: [PATCH 121/173] mmc: Change downstream MMC driver CONFIG option +Subject: [PATCH 121/199] mmc: Change downstream MMC driver CONFIG option The upstream SDHOST driver has now claimed CONFIG_MMC_BCM2835, which clashes with the downstream MMC driver. Rename the downstream option to @@ -132050,10 +132050,10 @@ index cd3a47d8965958ccf3ac3d186a05bbd437494154..9ba643d3b2e12960f5ce4b0eb5d75c1c obj-$(CONFIG_MMC_WBSD) += wbsd.o obj-$(CONFIG_MMC_AU1X) += au1xmmc.o -From 451c7dce838d727f0e9d6ad48ccdff3e8365a20e Mon Sep 17 00:00:00 2001 +From 1a6c973113643f8338a07c7e4df262e2bbc757d0 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 16 May 2017 19:34:52 +0100 -Subject: [PATCH 122/173] config: Add CONFIG_I2C_ROBOTFUZZ_OSIF +Subject: [PATCH 122/199] config: Add CONFIG_I2C_ROBOTFUZZ_OSIF --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -132085,10 +132085,10 @@ index 29fd2abc2cbfcaed37cb630b5edffaa5b4994f6e..05d6d108cb2d013588ccc971c83dcd21 CONFIG_SPI_BCM2835=m CONFIG_SPI_BCM2835AUX=m -From e9a21552d4dbd7a939b72176dab7d056724fdf8b Mon Sep 17 00:00:00 2001 +From d326f9cdd067fb314592215077193120fe5da082 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 18 May 2017 11:40:43 +0100 -Subject: [PATCH 123/173] config: Add FB_TFT_ST7789V module +Subject: [PATCH 123/199] config: Add FB_TFT_ST7789V module --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -132120,10 +132120,10 @@ index 05d6d108cb2d013588ccc971c83dcd212308f230..54175b3c558e89d56b7d65752bccc6bd CONFIG_FB_TFT_TLS8204=m CONFIG_FB_TFT_UC1701=m -From 65838dba857839a2f18ea265152747eaf9738da9 Mon Sep 17 00:00:00 2001 +From ffa030ae69d9b214c58ea93a73738503db84c7fd Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 18 May 2017 15:36:46 +0100 -Subject: [PATCH 124/173] staging: bcm2835-audio: Fix memory corruption +Subject: [PATCH 124/199] staging: bcm2835-audio: Fix memory corruption I'm all for fixing memory leaks, but freeing a block while it is still being used is a recipe for hard-to-debug kernel exeptions. @@ -132158,10 +132158,10 @@ index 5f3d8f2339e34834d11edfa8de1d5819e3e32b4f..89f96f3c02805f4114ec9b488e18d00e return ret; } -From 65e912f0f3280b6facb6f9e89747c498cb38d706 Mon Sep 17 00:00:00 2001 +From af4818a3d2a92c4d5494f0c2a89d79ea1d7554a0 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 15 May 2017 16:40:05 +0100 -Subject: [PATCH 125/173] config: Add CONFIG_TOUCHSCREEN_GOODIX +Subject: [PATCH 125/199] config: Add CONFIG_TOUCHSCREEN_GOODIX --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -132193,10 +132193,10 @@ index 54175b3c558e89d56b7d65752bccc6bdaebcfd5a..1d2d27cb950b5e799370b7ca557f4bcb CONFIG_TOUCHSCREEN_RPI_FT5406=m CONFIG_TOUCHSCREEN_USB_COMPOSITE=m -From 128dd2e40b0ddd9e1259a063cd9d3aac04d289d6 Mon Sep 17 00:00:00 2001 +From 0000bac8a1278b1a1b78a938e3fb5e97cc194822 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 16 May 2017 15:58:00 +0100 -Subject: [PATCH 126/173] config: Add CONFIG_TOUCHSCREEN_EDT_FT5X06 +Subject: [PATCH 126/199] config: Add CONFIG_TOUCHSCREEN_EDT_FT5X06 --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -132228,10 +132228,10 @@ index 1d2d27cb950b5e799370b7ca557f4bcb2508169b..de0b998202e23eec39fafce0e8cd346e CONFIG_TOUCHSCREEN_USB_COMPOSITE=m CONFIG_TOUCHSCREEN_STMPE=m -From d9e51f8dfd5eee9e765b27ae146f0ad190eca7c1 Mon Sep 17 00:00:00 2001 +From 0304459815418228cc15a0645598c2da3c063b68 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 22 May 2017 13:35:28 +0100 -Subject: [PATCH 127/173] config: Add CONFIG_IPV6_SIT_6RD +Subject: [PATCH 127/199] config: Add CONFIG_IPV6_SIT_6RD --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -132263,10 +132263,10 @@ index de0b998202e23eec39fafce0e8cd346e68817f6c..c4d82bec0aefc191c6049500fbeda6ea CONFIG_IPV6_MULTIPLE_TABLES=y CONFIG_IPV6_SUBTREES=y -From ec2378c3a78dff7313dc551eb857e74cb36e5bd2 Mon Sep 17 00:00:00 2001 +From 6aaea037ba350b3fe30184f480e65c53a1dba06f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 22 May 2017 15:28:27 +0100 -Subject: [PATCH 128/173] config: Add CONFIG_IPV6_ROUTE_INFO +Subject: [PATCH 128/199] config: Add CONFIG_IPV6_ROUTE_INFO --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -132298,10 +132298,10 @@ index c4d82bec0aefc191c6049500fbeda6ea0a47f590..7d3522df2b28e53cb63a081316891879 CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m -From 30f1a565079205ce4c5d797b03f62001d5b1e119 Mon Sep 17 00:00:00 2001 +From 800cbca9570bf663f007749736fabd127c713823 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 25 May 2017 16:04:53 +0100 -Subject: [PATCH 129/173] dwc_otg: make periodic scheduling behave properly for +Subject: [PATCH 129/199] dwc_otg: make periodic scheduling behave properly for FS buses If the root port is in full-speed mode, transfer times at 12mbit/s @@ -132472,10 +132472,10 @@ index 85a6d431ca54b47dc10573aa72d1ad69d06f2e36..4b1dd9de99e9e08b2e006fb5f8a7ef92 status = check_max_xfer_size(hcd, qh); if (status) { -From 513a113092ed066fbe36cfc3c08389deb1c04acf Mon Sep 17 00:00:00 2001 +From a3e19ec5100f95382f64a318192f2d1496f1b2b0 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 26 May 2017 12:50:31 +0100 -Subject: [PATCH 130/173] dwc_otg: fiq_fsm: Make isochronous compatibility +Subject: [PATCH 130/199] dwc_otg: fiq_fsm: Make isochronous compatibility checks work properly Get rid of the spammy printk and local pointer mangling. @@ -132539,10 +132539,10 @@ index 38bf5fc792d32352f9e208e0e90f968599b9bc31..71834cf365e67d7ad995bba7869216c4 return 1; } -From 179f3d51610b2d63525037a97c7a41e2a3dec0b5 Mon Sep 17 00:00:00 2001 +From ee3c56dd38f4d066164704ec499346955312b9d4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 12 Jun 2017 13:05:43 +0100 -Subject: [PATCH 131/173] config: Add CONFIG_CAN_GS_USB +Subject: [PATCH 131/199] config: Add CONFIG_CAN_GS_USB --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -132574,10 +132574,10 @@ index 7d3522df2b28e53cb63a0813168918792b65becb..bf0d3fd830a0a0cc9443ef52e7f167eb CONFIG_IRLAN=m CONFIG_IRNET=m -From 0334f3d7c7cf1025d9939521423c78b276df45c2 Mon Sep 17 00:00:00 2001 +From 07b47fafda89cdf5a75e97c51737a8b1ab486b69 Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 12 Jun 2017 16:10:03 +0100 -Subject: [PATCH 132/173] dwc_otg: add module parameter int_ep_interval_min +Subject: [PATCH 132/199] dwc_otg: add module parameter int_ep_interval_min Add a module parameter (defaulting to ignored) that clamps the polling rate of high-speed Interrupt endpoints to a minimum microframe interval. @@ -132659,10 +132659,10 @@ index 4b1dd9de99e9e08b2e006fb5f8a7ef92f20c2553..fe8e8f841f03660c2ad49ab8e66193be DWC_DEBUGPL(DBG_HCD, "DWC OTG HCD QH Initialized\n"); -From a016915f594e2e4e5fe411b6e9a70fd4aed38223 Mon Sep 17 00:00:00 2001 +From 4c549a2c20952bf101f0668aab839c78abd4684b Mon Sep 17 00:00:00 2001 From: P33M Date: Tue, 20 Jun 2017 13:44:01 +0100 -Subject: [PATCH 133/173] dwc_otg: fiq_fsm: Add non-periodic TT exclusivity +Subject: [PATCH 133/199] dwc_otg: fiq_fsm: Add non-periodic TT exclusivity constraints Certain hub types do not discriminate between pipe direction (IN or OUT) @@ -132829,10 +132829,10 @@ index 71834cf365e67d7ad995bba7869216c4091c3a74..7710370b30363e3170bf9bf522597c5f st->fsm = FIQ_PER_SSPLIT_STARTED; } else { -From 7d234795e354ec54b088e8f3d3b1ee0db815722d Mon Sep 17 00:00:00 2001 +From 46faca77a318b878f85497c0c00ba58fc7ca6872 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 26 May 2017 13:03:41 +0100 -Subject: [PATCH 134/173] BCM270X_DT: Add midi-uart1 overlay +Subject: [PATCH 134/199] BCM270X_DT: Add midi-uart1 overlay Add a scaler to the ttyS0 clock so that requesting 38400 baud results in an approximately 31250 baud signal. This is analagous to @@ -132930,10 +132930,10 @@ index 0000000000000000000000000000000000000000..e0bc410acbff3a7a175dd5d53b3ab0d0 + }; +}; -From 5dfe95ff49ef769f8d7674639e0c4561f50b847b Mon Sep 17 00:00:00 2001 +From 3fcb98a4d1c28d554f7af00692e0b6d975f1ccfc Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Sat, 20 May 2017 22:10:14 +0100 -Subject: [PATCH 135/173] overlays: README: remove vestigial SDIO parameters +Subject: [PATCH 135/199] overlays: README: remove vestigial SDIO parameters Signed-off-by: Phil Elwell --- @@ -132987,10 +132987,10 @@ index ec9e7b1941678796facf625b3770c20ed0b15b25..499cd1920fd373702cfbc9f6e0fcaebc (default on: polling once at boot-time) -From eaf3d7aa7038a5f1b13fd2b62cd0674f915824d4 Mon Sep 17 00:00:00 2001 +From b595deb87a6c6fe627083d27e9770fd78d084709 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 27 Jun 2017 15:07:14 +0100 -Subject: [PATCH 136/173] SQUASH: mmc: Apply ERASE_BROKEN quirks correctly +Subject: [PATCH 136/199] SQUASH: mmc: Apply ERASE_BROKEN quirks correctly Squash with: mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards @@ -133020,10 +133020,10 @@ index 05c8d7381fff5ae88531129d9a5ddd554bddb43e..c9d5d644688c1509d7febcff0322fbab END_FIXUP }; -From 5e831629bc1d7eefbe3a98bea00f0758a9fb1990 Mon Sep 17 00:00:00 2001 +From 148f74b9bd4ddb53da30cc68483cda09f3141128 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 11:34:26 +0200 -Subject: [PATCH 137/173] ASoC: bcm2835: Add support for TDM modes +Subject: [PATCH 137/199] ASoC: bcm2835: Add support for TDM modes bcm2835 supports arbitrary positioning of channel data within a frame and thus is capable of supporting TDM modes. Since @@ -133425,10 +133425,10 @@ index 56df7d8a43d0aac055a91b0d24aca8e1b4e308e4..dcacf7f83c9371df539a788ea33fedcf dev->dev = &pdev->dev; dev_set_drvdata(&pdev->dev, dev); -From a6b31aa9fe739751f7f3990027408f1a6bde3cf0 Mon Sep 17 00:00:00 2001 +From ed59e6a2dcabd5acbcd729f41e89883903db5f3c Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 15:30:50 +0200 -Subject: [PATCH 138/173] ASoC: bcm2835: Support left/right justified and DSP +Subject: [PATCH 138/199] ASoC: bcm2835: Support left/right justified and DSP modes DSP modes and left/right justified modes can be supported @@ -133674,10 +133674,10 @@ index dcacf7f83c9371df539a788ea33fedcf97d64690..3a706fda4f39e42efbe12f19d87af9b1 } -From 44e6d969cd8d8978d9d6e96cfde02566954ea6d9 Mon Sep 17 00:00:00 2001 +From 1d0d7a35213b5f4c125ee3b8ad2683d6bc0416dd Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 16:19:54 +0200 -Subject: [PATCH 139/173] ASoC: bcm2835: Support additional samplerates up to +Subject: [PATCH 139/199] ASoC: bcm2835: Support additional samplerates up to 384kHz Sample rates are only restricted by the capabilities of the @@ -133720,10 +133720,10 @@ index 3a706fda4f39e42efbe12f19d87af9b100a348a5..43f5715a0d5dda851731ecf7ff27e76c | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE -From 35185a071e2e90872f7ccc8ba5110949300ce6fd Mon Sep 17 00:00:00 2001 +From 8c57e176565695388f73a7b32fb03cbd5c3057a8 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 16:24:57 +0200 -Subject: [PATCH 140/173] ASoC: bcm2835: Enforce full symmetry +Subject: [PATCH 140/199] ASoC: bcm2835: Enforce full symmetry bcm2835's configuration registers can't be changed when a stream is running, which means asymmetric configurations aren't supported. @@ -133759,10 +133759,10 @@ index 43f5715a0d5dda851731ecf7ff27e76c48fb6e57..2e449d7173fcecbcd647f90a26bd58b6 static bool bcm2835_i2s_volatile_reg(struct device *dev, unsigned int reg) -From 45e973ed24dd64930b942ecfe824904f561cc00e Mon Sep 17 00:00:00 2001 +From e48bde7e25413678347f7df5e7f8c6f7a800414f Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Thu, 6 Jul 2017 18:52:16 +0200 -Subject: [PATCH 141/173] config: add missing arizona regulator modules +Subject: [PATCH 141/199] config: add missing arizona regulator modules In kernel 4.12 CONFIG_REGULATOR_ARIZONA was replaced by 2 separate options for LDO1 and MICSUPP regulators. Enable these, they are @@ -133812,10 +133812,10 @@ index bf0d3fd830a0a0cc9443ef52e7f167eb704ed152..06d0520e332f21afaa27ac112c0eee6c CONFIG_MEDIA_CAMERA_SUPPORT=y CONFIG_MEDIA_ANALOG_TV_SUPPORT=y -From 023dc39250043ccc51c52feac97e463813042707 Mon Sep 17 00:00:00 2001 +From 90114950656a0d9296e94dbf8a94fffc0446b88a Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Tue, 4 Apr 2017 19:20:59 +1000 -Subject: [PATCH 142/173] Audioinjector : make the octo and pi sound cards have +Subject: [PATCH 142/199] Audioinjector : make the octo and pi sound cards have different driver names This patch gives the audioinjector octo and pi soundcards different driver @@ -133852,10 +133852,10 @@ index ef54e0f07ea03f59e9957b5d98f3e7fdc998e469..491906bbf446826e55dd843f28e4860f .of_match_table = audioinjector_pi_soundcard_of_match, }, -From d7ddfc8a6b3f9fce8c4ebc1b5f99219d2cc93289 Mon Sep 17 00:00:00 2001 +From 25a06d83084ed15b81d56b85174a50192709e86c Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Tue, 4 Apr 2017 19:23:04 +1000 -Subject: [PATCH 143/173] Audioinjector octo : Make the playback and capture +Subject: [PATCH 143/199] Audioinjector octo : Make the playback and capture symmetric This patch ensures that the sample rate and channel count of the audioinjector @@ -133878,10 +133878,10 @@ index 49115c8e20ce1a2ba5a99feb8983a1cafb052ca2..5e79f4eff93a21ed3495c77a90f73525 }; -From 9d033a4fbcf7494550753f3d2d978300b6a9c9aa Mon Sep 17 00:00:00 2001 +From b09654f8d85cb6c9fbc59279bd3f2a4564126b39 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Sun, 23 Apr 2017 19:36:53 +0100 -Subject: [PATCH 144/173] BCM270X_DT: Add bme280 and bmp180 to i2c-sensor +Subject: [PATCH 144/199] BCM270X_DT: Add bme280 and bmp180 to i2c-sensor overlay Signed-off-by: Phil Elwell @@ -133955,10 +133955,10 @@ index 606b2d5012abf2e85712be631c42ea40a0b512c5..e23e34b32a0a8927c14203d7384e8008 lm75 = <&lm75>,"status"; lm75addr = <&lm75>,"reg:0"; -From bc28b940403b534e37ded263719bf201b6552eab Mon Sep 17 00:00:00 2001 +From b7fc8e2213909c6d61e41b60ef4fc78f3bd89ead Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Sun, 23 Apr 2017 19:38:06 +0100 -Subject: [PATCH 145/173] config: Add CONFIG_BMP280 (and CONFIG_BMP280_I2C) +Subject: [PATCH 145/199] config: Add CONFIG_BMP280 (and CONFIG_BMP280_I2C) Signed-off-by: Phil Elwell --- @@ -133991,10 +133991,10 @@ index 06d0520e332f21afaa27ac112c0eee6c36a9a9df..515f335d2a638de60d07a45df19ce52a CONFIG_PWM_PCA9685=m CONFIG_RASPBERRYPI_FIRMWARE=y -From 05b3c24c5689b336a7b3114e08bb75ff07df5507 Mon Sep 17 00:00:00 2001 +From 4f1d23ff9a0a14fbf2917b305c3b0c858bdfaf18 Mon Sep 17 00:00:00 2001 From: Scott Ellis Date: Tue, 25 Apr 2017 10:46:09 -0400 -Subject: [PATCH 146/173] config: Enable TI TMP102 temp sensor module +Subject: [PATCH 146/199] config: Enable TI TMP102 temp sensor module Signed-off-by: Scott Ellis --- @@ -134027,10 +134027,10 @@ index 515f335d2a638de60d07a45df19ce52a7579f9ca..bfda35e4c4bce99b5125eab80f97c73a CONFIG_BCM2835_THERMAL=y CONFIG_WATCHDOG=y -From e70fd08d60935d04026931c60a6ebc7115e1fe2c Mon Sep 17 00:00:00 2001 +From c26f16dc876ad99e7844cd4bf82d4d0f5bbf4f4c Mon Sep 17 00:00:00 2001 From: Scott Ellis Date: Tue, 25 Apr 2017 13:05:42 -0400 -Subject: [PATCH 147/173] BCM270X_DT: Add tmp102 to i2c sensor overlay +Subject: [PATCH 147/199] BCM270X_DT: Add tmp102 to i2c sensor overlay Signed-off-by: Scott Ellis --- @@ -134110,10 +134110,10 @@ index e23e34b32a0a8927c14203d7384e800878627347..e86a13f92c3f75c14fa4425cdfb081d6 }; }; -From 80ff6ff1ba623da4a2e680a4ea641d47ad00c93d Mon Sep 17 00:00:00 2001 +From e1367891bcf2949e985ce41739c6809a3764ee36 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 8 May 2017 16:43:40 +0100 -Subject: [PATCH 148/173] irq_bcm2836: Send event when onlining sleeping cores +Subject: [PATCH 148/199] irq_bcm2836: Send event when onlining sleeping cores In order to reduce power consumption and bus traffic, it is sensible for secondary cores to enter a low-power idle state when waiting to @@ -134149,10 +134149,10 @@ index 9a7ee04ee0d9b7aa734cf3159ed59c19a338de0d..014f13f89eb896f5cfc75ed9891787d0 } -From ae1b61f594b8a110ee91f13b30bedf6eea13ff4e Mon Sep 17 00:00:00 2001 +From c1096ba9690c05fe9a6cbea5eb3d9c72e6ee26b9 Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Mon, 15 May 2017 17:10:53 +0200 -Subject: [PATCH 149/173] overlays: Add Goodix overlay +Subject: [PATCH 149/199] overlays: Add Goodix overlay Add support for I2C connected Goodix gt9271 multiple touch controller using GPIOs 4 and 17 (pins 7 and 11 on GPIO header) for interrupt and reset. @@ -134249,10 +134249,10 @@ index 0000000000000000000000000000000000000000..084f74042ed6379ebd9281374d5391a7 + }; +}; -From c183f774a63c80cae7889f78d070eb5ce325cf9b Mon Sep 17 00:00:00 2001 +From e1c8d419eaa87b324f8faa4303b0a075054ce320 Mon Sep 17 00:00:00 2001 From: chenzhiwo Date: Wed, 17 May 2017 16:34:57 +0800 -Subject: [PATCH 150/173] Add device tree overlay for GPIO connected rotary +Subject: [PATCH 150/199] Add device tree overlay for GPIO connected rotary encoder. See Documentation/input/rotary-encoder.txt for more information. --- @@ -134344,10 +134344,10 @@ index 0000000000000000000000000000000000000000..c0c6bccff60cc15d9a9bf59d2c7cba41 + }; +}; -From 9c1c2351c13ce7b2d20de04a438125bb0d75734d Mon Sep 17 00:00:00 2001 +From 1c93193e5e386627af60793a8d07fe1ace5dac69 Mon Sep 17 00:00:00 2001 From: Anton Onishchenko Date: Tue, 23 May 2017 18:55:46 +0300 -Subject: [PATCH 151/173] mpu6050 device tree overlay (#2031) +Subject: [PATCH 151/199] mpu6050 device tree overlay (#2031) Add overlay and config options for InvenSense MPU6050 6-axis motion detector. @@ -134462,10 +134462,10 @@ index bfda35e4c4bce99b5125eab80f97c73a159de969..a9841b71a4b633a81392c533578845d6 CONFIG_PWM_BCM2835=m CONFIG_PWM_PCA9685=m -From 3bcb0faa9c3c8d30eb78355ee4897c551a2b5ab4 Mon Sep 17 00:00:00 2001 +From e8fad7705817fb3df7cfea84330f44ec33a81e1f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 31 May 2017 09:33:55 +0100 -Subject: [PATCH 152/173] config: Adding SENSOR_JC42 +Subject: [PATCH 152/199] config: Adding SENSOR_JC42 The jc42 module supports a number of I2C-based temperature sensor modules. @@ -134505,10 +134505,10 @@ index a9841b71a4b633a81392c533578845d62f6aa78f..2ba46a28c2e7b21a401cc3544353937e CONFIG_SENSORS_SHT21=m CONFIG_SENSORS_SHTC1=m -From 0b1e677ecc506655be6c22dd09851ad6ddd69982 Mon Sep 17 00:00:00 2001 +From 26d098a745698f39dbb3d6b5c047f8ffd6850571 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 31 May 2017 15:27:39 +0100 -Subject: [PATCH 153/173] BCM270X_DT: Improve i2c-sensor and i2c-rtc overlay +Subject: [PATCH 153/199] BCM270X_DT: Improve i2c-sensor and i2c-rtc overlay Use the "__dormant__" feature to permit multiple instances of each overlay, which is more useful now that changing the "reg" property @@ -134873,10 +134873,10 @@ index e86a13f92c3f75c14fa4425cdfb081d6795ff76a..d2f0008addfadac8f6ed774a6e4f3f97 }; }; -From 52595ff8c04eae49d88eaf32b9d74cab4b898773 Mon Sep 17 00:00:00 2001 +From 37967c394186b977fd8ded2df143c105346fbd29 Mon Sep 17 00:00:00 2001 From: Stefan Tatschner Date: Mon, 29 May 2017 21:46:16 +0200 -Subject: [PATCH 154/173] Add device tree config for htu21 +Subject: [PATCH 154/199] Add device tree config for htu21 See: https://github.com/raspberrypi/linux/pull/2041 @@ -134958,10 +134958,10 @@ index d2f0008addfadac8f6ed774a6e4f3f97871c0d61..17c27e3b666a7a83619471b50c63bb93 }; }; -From f216bda69d0eda5a267c97047826989a4512e711 Mon Sep 17 00:00:00 2001 +From 081570902a67ff8f1d521a669a31cf18a7de5ee3 Mon Sep 17 00:00:00 2001 From: sandeepal Date: Fri, 2 Jun 2017 18:59:46 +0530 -Subject: [PATCH 155/173] Allo Digione Driver (#2048) +Subject: [PATCH 155/199] Allo Digione Driver (#2048) Driver for the Allo Digione soundcard --- @@ -135392,10 +135392,10 @@ index 0000000000000000000000000000000000000000..e3664e44c699d0102120ecf99e8b780a +MODULE_DESCRIPTION("ASoC Driver for Allo DigiOne"); +MODULE_LICENSE("GPL v2"); -From f8b82a9b4a3c6441b44117532d48a136e80ad45e Mon Sep 17 00:00:00 2001 +From 9e07aa4160a12bbe686fa3d8363c90b2d9a0201c Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Mon, 5 Jun 2017 16:40:38 +0100 -Subject: [PATCH 156/173] dma-bcm2708: Fix module compilation of +Subject: [PATCH 156/199] dma-bcm2708: Fix module compilation of CONFIG_DMA_BCM2708 bcm2708-dmaengine.c defines functions like bcm_dma_start which are @@ -135438,10 +135438,10 @@ index c5bfff2765be4606077e6c8af73040ec13ee8974..6ca874d332a8bc666b1c9576ac51f479 #endif /* _PLAT_BCM2708_DMA_H */ -From 80c2c56f8363ee02686636240a31a304da2a15e9 Mon Sep 17 00:00:00 2001 +From 3fc44a2838a8ec6407db3952ba1abeab96cdc280 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 20 Jun 2017 17:51:47 +0100 -Subject: [PATCH 157/173] bcm2835-cpufreq: Change licence to GPLv2 +Subject: [PATCH 157/199] bcm2835-cpufreq: Change licence to GPLv2 Signed-off-by: Eben Upton Signed-off-by: Dom Cobley @@ -135494,10 +135494,10 @@ index 414fbdc10dfbfc6e4bb47870a7af3fd5780f9c9a..99345969b0e4d651fd9033d67de2febb /* ---------- INCLUDES ---------- */ #include -From e94077bd011f60fc34f14a722f088d9842102162 Mon Sep 17 00:00:00 2001 +From 195119d1056c9ade9c1e515ec76a841246950439 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 21 Jun 2017 09:03:51 -0700 -Subject: [PATCH 158/173] bcm2708: Drop CMA alignment from FKMS mode as well. +Subject: [PATCH 158/199] bcm2708: Drop CMA alignment from FKMS mode as well. I dropped it from KMS mode in d88274d88ed81de1ade8e18e4c0ed91792ec82ea and should have done both of them at that time. @@ -135553,10 +135553,10 @@ index 95a595a35cb4fbb707bf4b18161f6a46860aa4ae..36fbf6c8c2e612a6dc5aa02d77cc8173 }; -From fc3cb5a0158c0a950571fe0d7612558f5385ce2f Mon Sep 17 00:00:00 2001 +From b237eda1698d0f8b3d7f301a19bcd22c5a022e02 Mon Sep 17 00:00:00 2001 From: Steve Conner Date: Thu, 29 Jun 2017 15:56:19 +0100 -Subject: [PATCH 159/173] New i2c-rtc-gpio device overlay (#2092) +Subject: [PATCH 159/199] New i2c-rtc-gpio device overlay (#2092) Created new i2c-rtc-gpio device overlay by combining i2c-rtc and i2c-gpio. Tested with PCF2127 on CM3. --- @@ -135820,10 +135820,10 @@ index 0000000000000000000000000000000000000000..8415e6081428fba9a47682964174fc02 + }; +}; -From 8764e8f87f6ee8a31c0ee25485b48e61797c6b8a Mon Sep 17 00:00:00 2001 +From 1c2f537195ee1225872b67f9e590f018a31458cc Mon Sep 17 00:00:00 2001 From: Allo Date: Mon, 3 Jul 2017 15:45:20 +0530 -Subject: [PATCH 160/173] PianoPlus: Dual Mono & Dual Stereo features added +Subject: [PATCH 160/199] PianoPlus: Dual Mono & Dual Stereo features added (#2069) --- @@ -136112,10 +136112,10 @@ index 56e43f98846b41e487b3089813f7edc3c08517eb..d4e99e3c6a383d92fb0cf9e8c1cd1e76 } -From d5506bfa946eb2799dd9ffb8b904ff801651ffb7 Mon Sep 17 00:00:00 2001 +From d53373d18c9457b4b568a5c677f99948bf168c9b Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Sun, 9 Jul 2017 15:15:22 +0200 -Subject: [PATCH 161/173] overlays: Add gpio-shutdown overlay (#2103) +Subject: [PATCH 161/199] overlays: Add gpio-shutdown overlay (#2103) This overlay facilitates the addition of a powerbutton by converting GPIO edges into KEY_POWER keypresses, which can be handled by @@ -136271,10 +136271,10 @@ index 0000000000000000000000000000000000000000..863fb395c8539734b658682b900e1fbd + +}; -From a1cc7e0ae96efd623d7d54ba1d55fa213fb9c8c2 Mon Sep 17 00:00:00 2001 +From b3e2ae06f89faa852481a752f72ad723b9c2872d Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Mon, 10 Jul 2017 11:05:17 +0200 -Subject: [PATCH 162/173] config: enable generic S/PDIF codec drivers (#2104) +Subject: [PATCH 162/199] config: enable generic S/PDIF codec drivers (#2104) These drivers can be used as dummy ADC/DAC drivers for attaching general codecs that don't need to be configured. @@ -136331,10 +136331,10 @@ index efdb0fbc1b07c7b679cb20d8c1270c77d5d3c684..472a330439a19ac5d4f70c22059f0158 CONFIG_SND_SIMPLE_CARD=m CONFIG_HIDRAW=y -From bba1b7cbb27a7284d6733d26a4d2e704d7f5f5d6 Mon Sep 17 00:00:00 2001 +From a3c828c08394e2b4c2dbd383f14a02a5c4a6fd36 Mon Sep 17 00:00:00 2001 From: Bilal Amarni Date: Wed, 24 May 2017 10:52:50 +0200 -Subject: [PATCH 163/173] [ARM64] enable drivers for GPIO expander and vcio +Subject: [PATCH 163/199] [ARM64] enable drivers for GPIO expander and vcio --- arch/arm64/configs/bcmrpi3_defconfig | 3 +++ @@ -136362,10 +136362,10 @@ index 4d85c231c5ea0244e1b05fb4a5e3c8fd3e651ddf..9dcb58a519d041fadae99c81a7bda621 CONFIG_GPIO_ARIZONA=m CONFIG_GPIO_STMPE=y -From 0497442c11084d7658140f1d0c12e1366a08bf10 Mon Sep 17 00:00:00 2001 +From 2e172ac9071f7f9bada854ebdf5c0d2b4d83058d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 14 Jul 2017 12:59:55 +0100 -Subject: [PATCH 164/173] bcm2835-mmc: Fix DMA usage +Subject: [PATCH 164/199] bcm2835-mmc: Fix DMA usage The previous change ("bcm2835-mmc: Only claim one DMA channel") used an incorrect variable, the effect of which was to prevent @@ -136400,10 +136400,10 @@ index 4fe8d1fe44578fbefcd48f8c327ba3d03f3d0a2a..981db05de1ff52a83550e41ab362eecf } #endif -From d44a3ce8b3a6a47686f34b6dcc20fc990c5411bc Mon Sep 17 00:00:00 2001 +From 3306429bf95ee0c901200f0b2d9d48ab0da71670 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 16 Jul 2017 21:39:16 +0100 -Subject: [PATCH 165/173] BCM270X_DT: Use the upstream thermal-zones DT node +Subject: [PATCH 165/199] BCM270X_DT: Use the upstream thermal-zones DT node Signed-off-by: Phil Elwell --- @@ -136456,10 +136456,10 @@ index 29dde110e769082a24640d3c7284afb8e99b226c..8cc83a350d02bb485f7a4fcb129df9e0 + /delete-node/ trips; +}; -From 755af56f608bde7a8c4bb223f72a2945503c753b Mon Sep 17 00:00:00 2001 +From 1387c9b1eaa70ec95ee23541a00558c35290c418 Mon Sep 17 00:00:00 2001 From: Conn Date: Mon, 17 Jul 2017 03:25:43 +0100 -Subject: [PATCH 166/173] config: enhance DualShock3 controller support +Subject: [PATCH 166/199] config: enhance DualShock3 controller support Enable rumble support in Sony HID & HID battery strength. --- @@ -136508,10 +136508,10 @@ index 472a330439a19ac5d4f70c22059f015816823694..e0dd8723047ff488e81a03ef42fdbc68 CONFIG_HID_SUNPLUS=m CONFIG_HID_GREENASIA=m -From 000bbf308083a5facd5fa5022a941683550d561d Mon Sep 17 00:00:00 2001 +From bc31dbda132e79151d52eb4bf1cc394579e01636 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 19 Jul 2017 15:20:50 +0100 -Subject: [PATCH 167/173] overlays: i2c1-bcm2708: Don't overwrite i2c1 pins +Subject: [PATCH 167/199] overlays: i2c1-bcm2708: Don't overwrite i2c1 pins node It is bad practise to overwrite an entire node in an overlay. Instead, @@ -136556,10 +136556,10 @@ index e303b9c61c82a28eab7b48f6b085661574d5a849..7c69047bcd88a5c900dddd08e60ad075 }; }; -From ea1f4704015786c01fbfd270f3a11bf5f550cc13 Mon Sep 17 00:00:00 2001 +From ce85845a5685a4434480ad5dfd40db9874f6420e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 18 Jul 2017 15:30:48 +0100 -Subject: [PATCH 168/173] bcm2835-mmc: Prevent DMA race condition +Subject: [PATCH 168/199] bcm2835-mmc: Prevent DMA race condition The end of a read operation is triggered by the completion of the DMA transfer, but writes are complete when the data IRQ is raised. The @@ -136626,10 +136626,10 @@ index 981db05de1ff52a83550e41ab362eecf99cafa29..c4a5e992c6fb4a40b933239350ed4bfc static void bcm2835_mmc_finish_command(struct bcm2835_host *host) -From 680b71b741156963a7bafea1f8a8e1a35d2c1219 Mon Sep 17 00:00:00 2001 +From 15a60a588cd4c94bdc2a64b299022a87b026492a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sven=20K=C3=B6hler?= Date: Mon, 7 Aug 2017 18:49:20 +0200 -Subject: [PATCH 169/173] Fix dependencies broken since driver was renamed +Subject: [PATCH 169/199] Fix dependencies broken since driver was renamed --- drivers/mmc/host/Kconfig | 2 +- @@ -136649,10 +136649,10 @@ index d47cce77c0551d78fa51f50e2c8086f26c7b9e56..dc41121c101e2ac6fe000fe2ab556561 default 2 help -From 0e7c5fbfb2d9173f593a8fefe4bbd727b8de361f Mon Sep 17 00:00:00 2001 +From 654e2f24028ac2d6e77a73a721abef0370d97e0e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 18 Dec 2014 16:07:15 -0800 -Subject: [PATCH 170/173] mm: Remove the PFN busy warning +Subject: [PATCH 170/199] mm: Remove the PFN busy warning See commit dae803e165a11bc88ca8dbc07a11077caf97bbcb -- the warning is expected sometimes when using CMA. However, that commit still spams @@ -136677,10 +136677,10 @@ index 1423da8dd16f5bdc83e20ddf6665b2022a9a6492..6ce930c02160d55dc4eee1e7197a5efa goto done; } -From 3349f1df8142f5463d3a856483691b10eb44e016 Mon Sep 17 00:00:00 2001 +From 8b77f5ca66868bf1818caa3fe5e82da9ed865ab4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 25 Aug 2017 19:18:13 +0100 -Subject: [PATCH 171/173] cache: export clean and invalidate +Subject: [PATCH 171/199] cache: export clean and invalidate --- arch/arm/mm/cache-v6.S | 4 ++-- @@ -136732,10 +136732,10 @@ index de78109d002db1a5e7c94a6c1bc8bb94161d07b8..4c850aa3af2b2439fced4e130441329a sub r3, r2, #1 bic r0, r0, r3 -From d0795818dbfcdb270b5c3b9d3bdccd29b1208d5d Mon Sep 17 00:00:00 2001 +From f323840a871fd84eef5874ed9c5022f7a56e9d63 Mon Sep 17 00:00:00 2001 From: Olivier Schonken Date: Mon, 28 Aug 2017 10:52:32 +0200 -Subject: [PATCH 172/173] Fix DTB overlay compilation for arm64 broadcom +Subject: [PATCH 172/199] Fix DTB overlay compilation for arm64 broadcom The dts-dirs variable was overwritten by the assignment of the stingray directory after the overlays directory, thus no overlays @@ -136760,10 +136760,10 @@ index 97af2ececc52ca3aad7b84dc2fdb5c269a45bde0..3b76320112196a1fce7a0941c696fd1e subdir-y := $(dts-dirs) clean-files := *.dtb -From 80d497d63c3cb89e861723360e653fb2d7750940 Mon Sep 17 00:00:00 2001 +From bc2614057d17b6376b461795493a9bc4f504c0f6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 25 Aug 2017 19:18:26 +0100 -Subject: [PATCH 173/173] vcsm: Provide new ioctl to clean/invalidate a 2D +Subject: [PATCH 173/199] vcsm: Provide new ioctl to clean/invalidate a 2D block --- @@ -136945,3 +136945,5049 @@ index 334f36d0d697b047df2922b5f2db67f38cf76564..2de7f1f41070689c99cad3bd43d11745 #define VMCS_SM_IOCTL_SIZE_USR_HDL\ _IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_SIZE_USR_HANDLE,\ + +From d174670aa6c4cd1b1d2aba4562c1d8af40858cc5 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Wed, 15 Feb 2017 11:16:05 +0000 +Subject: [PATCH 174/199] VCSM: Specify pointers in IPC msgs as uint32_t + +Pointers were specified as void* which will fail +rather badly if the kernel is switched to 64 bit. +GPU wants 32 bit addresses, so use uint32_t and +cast whereever necessary. + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vc_sm_defs.h | 12 ++++---- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 52 +++++++++++++++++--------------- + 2 files changed, 33 insertions(+), 31 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vc_sm_defs.h b/drivers/char/broadcom/vc_sm/vc_sm_defs.h +index c4d5ff718a5ba9071ef87fa4c6cf632486c4d36f..6c19aac6dc9df90edb9432bc32e7477d532d3278 100644 +--- a/drivers/char/broadcom/vc_sm/vc_sm_defs.h ++++ b/drivers/char/broadcom/vc_sm/vc_sm_defs.h +@@ -88,7 +88,7 @@ typedef struct { + /* Resource handle */ + uint32_t res_handle; + /* Pointer to resource buffer */ +- void *res_mem; ++ uint32_t res_mem; + /* Resource base size (bytes) */ + uint32_t res_base_size; + /* Resource number */ +@@ -101,7 +101,7 @@ typedef struct { + /* Resource handle (returned from alloc) */ + uint32_t res_handle; + /* Resource buffer (returned from alloc) */ +- void *res_mem; ++ uint32_t res_mem; + + } VC_SM_FREE_T; + +@@ -110,7 +110,7 @@ typedef struct { + /* Resource handle (returned from alloc) */ + uint32_t res_handle; + /* Resource buffer (returned from alloc) */ +- void *res_mem; ++ uint32_t res_mem; + + } VC_SM_LOCK_UNLOCK_T; + +@@ -119,7 +119,7 @@ typedef struct { + /* Resource handle (returned from alloc) */ + uint32_t res_handle; + /* Resource buffer (returned from alloc) */ +- void *res_mem; ++ uint32_t res_mem; + /* Resource *new* size requested (bytes) */ + uint32_t res_new_size; + +@@ -133,10 +133,10 @@ typedef struct { + /* Resource handle */ + uint32_t res_handle; + /* Pointer to resource buffer */ +- void *res_mem; ++ uint32_t res_mem; + /* Pointer to former resource buffer if the memory + * was reallocated */ +- void *res_old_mem; ++ uint32_t res_old_mem; + + } VC_SM_LOCK_RESULT_T; + +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index d49e39566d521c95a96375c556516e444d52b6a0..1afea701625157e9d9bc9570240c0b1afb186f56 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -877,7 +877,7 @@ static void vmcs_sm_release_resource(struct SM_RESOURCE_T *resource, int force) + */ + if (resource->res_handle) { + VC_SM_FREE_T free = { +- resource->res_handle, resource->res_base_mem ++ resource->res_handle, (uint32_t)resource->res_base_mem + }; + int status = vc_vchi_sm_free(sm_state->sm_handle, &free, + &private->int_trans_id); +@@ -1136,17 +1136,17 @@ static int vcsm_vma_fault(struct vm_fault *vmf) + int status; + + lock_unlock.res_handle = resource->res_handle; +- lock_unlock.res_mem = resource->res_base_mem; ++ lock_unlock.res_mem = (uint32_t)resource->res_base_mem; + + pr_debug("[%s]: attempt to lock data - hdl %x, base address %p\n", +- __func__, lock_unlock.res_handle, lock_unlock.res_mem); ++ __func__, lock_unlock.res_handle, ++ (void *)lock_unlock.res_mem); + + /* Lock the videocore allocated resource. + */ + status = vc_vchi_sm_lock(sm_state->sm_handle, + &lock_unlock, &lock_result, 0); +- if ((status != 0) || +- ((status == 0) && (lock_result.res_mem == NULL))) { ++ if (status || !lock_result.res_mem) { + pr_err("[%s]: failed to lock memory on videocore (status: %u)\n", + __func__, status); + resource->res_stats[LOCK_FAIL]++; +@@ -1162,10 +1162,10 @@ static int vcsm_vma_fault(struct vm_fault *vmf) + + /* Keep track of the new base memory. + */ +- if ((lock_result.res_mem != NULL) && +- (lock_result.res_old_mem != NULL) && ++ if (lock_result.res_mem && ++ lock_result.res_old_mem && + (lock_result.res_mem != lock_result.res_old_mem)) { +- resource->res_base_mem = lock_result.res_mem; ++ resource->res_base_mem = (void *)lock_result.res_mem; + } + } + +@@ -1464,7 +1464,7 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, + private->restart_sys = -EINTR; + private->int_action = VC_SM_MSG_TYPE_ALLOC; + goto error; +- } else if (status != 0 || (status == 0 && result.res_mem == NULL)) { ++ } else if (status != 0 || !result.res_mem) { + pr_err("[%s]: failed to allocate memory on videocore (status: %u, trans_id: %u)\n", + __func__, status, private->int_trans_id); + ret = -ENOMEM; +@@ -1476,7 +1476,7 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, + */ + resource->private = private; + resource->res_handle = result.res_handle; +- resource->res_base_mem = result.res_mem; ++ resource->res_base_mem = (void *)result.res_mem; + resource->res_size = alloc.base_unit * alloc.num_unit; + resource->res_cached = cached; + resource->map = map; +@@ -1654,11 +1654,12 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, + } + + resize.res_handle = resource->res_handle; +- resize.res_mem = resource->res_base_mem; ++ resize.res_mem = (uint32_t)resource->res_base_mem; + resize.res_new_size = ioparam->new_size; + + pr_debug("[%s]: attempt to resize data - guid %x, hdl %x, base address %p\n", +- __func__, ioparam->handle, resize.res_handle, resize.res_mem); ++ __func__, ioparam->handle, resize.res_handle, ++ (void *)resize.res_mem); + + /* Resize the videocore allocated resource. + */ +@@ -1671,7 +1672,7 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, + private->restart_sys = -EINTR; + private->int_action = VC_SM_MSG_TYPE_RESIZE; + goto error; +- } else if (status != 0) { ++ } else if (status) { + pr_err("[%s]: failed to resize memory on videocore (status: %u, trans_id: %u)\n", + __func__, status, private->int_trans_id); + ret = -EPERM; +@@ -1729,14 +1730,14 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, + } + + lock.res_handle = resource->res_handle; +- lock.res_mem = resource->res_base_mem; ++ lock.res_mem = (uint32_t)resource->res_base_mem; + + /* Take the lock and get the address to be mapped. + */ + if (vc_addr == 0) { + pr_debug("[%s]: attempt to lock data - guid %x, hdl %x, base address %p\n", + __func__, ioparam->handle, lock.res_handle, +- lock.res_mem); ++ (void *)lock.res_mem); + + /* Lock the videocore allocated resource. + */ +@@ -1749,8 +1750,8 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, + private->restart_sys = -EINTR; + private->int_action = VC_SM_MSG_TYPE_LOCK; + goto error; +- } else if (status != 0 || +- (status == 0 && result.res_mem == NULL)) { ++ } else if (status || ++ (!status && !(void *)result.res_mem)) { + pr_err("[%s]: failed to lock memory on videocore (status: %u, trans_id: %u)\n", + __func__, status, private->int_trans_id); + ret = -EPERM; +@@ -1759,8 +1760,8 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, + } + + pr_debug("[%s]: succeed to lock data - hdl %x, base address %p (%p), ref-cnt %d\n", +- __func__, lock.res_handle, result.res_mem, +- lock.res_mem, resource->lock_count); ++ __func__, lock.res_handle, (void *)result.res_mem, ++ (void *)lock.res_mem, resource->lock_count); + } + /* Lock assumed taken already, address to be mapped is known. + */ +@@ -1773,10 +1774,10 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, + /* Keep track of the new base memory allocation if it has changed. + */ + if ((vc_addr == 0) && +- (result.res_mem != NULL) && +- (result.res_old_mem != NULL) && ++ ((void *)result.res_mem) && ++ ((void *)result.res_old_mem) && + (result.res_mem != result.res_old_mem)) { +- resource->res_base_mem = result.res_mem; ++ resource->res_base_mem = (void *)result.res_mem; + + /* Kernel allocated resources. + */ +@@ -1901,10 +1902,11 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, + } + + unlock.res_handle = resource->res_handle; +- unlock.res_mem = resource->res_base_mem; ++ unlock.res_mem = (uint32_t)resource->res_base_mem; + + pr_debug("[%s]: attempt to unlock data - guid %x, hdl %x, base address %p\n", +- __func__, ioparam->handle, unlock.res_handle, unlock.res_mem); ++ __func__, ioparam->handle, unlock.res_handle, ++ (void *)unlock.res_mem); + + /* User space allocated resources. + */ +@@ -2039,7 +2041,7 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, + } + + pr_debug("[%s]: success to unlock data - hdl %x, base address %p, ref-cnt %d\n", +- __func__, unlock.res_handle, unlock.res_mem, ++ __func__, unlock.res_handle, (void *)unlock.res_mem, + resource->lock_count); + + error: + +From 3236e9ea6a3af523b256026f0c78e9a5e9d1e986 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 19 May 2017 14:29:12 +0100 +Subject: [PATCH 175/199] vcsm: code-style: Fix comment indentation + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vc_vchi_sm.h | 58 +++++++++++++++++++------------- + 1 file changed, 34 insertions(+), 24 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h +index 5e279f5a95fac7227cea15941bf0570ddc2b0886..f8e555dc30074e7ff226cf34a96aa30a34176775 100644 +--- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h ++++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h +@@ -19,63 +19,73 @@ + + #include "vc_sm_defs.h" + +-/* Forward declare. ++/* ++ * Forward declare. + */ + typedef struct sm_instance *VC_VCHI_SM_HANDLE_T; + +-/* Initialize the shared memory service, opens up vchi connection to talk to it. +-*/ ++/* ++ * Initialize the shared memory service, opens up vchi connection to talk to it. ++ */ + VC_VCHI_SM_HANDLE_T vc_vchi_sm_init(VCHI_INSTANCE_T vchi_instance, + VCHI_CONNECTION_T **vchi_connections, + uint32_t num_connections); + +-/* Terminates the shared memory service. +-*/ ++/* ++ * Terminates the shared memory service. ++ */ + int vc_vchi_sm_stop(VC_VCHI_SM_HANDLE_T *handle); + +-/* Ask the shared memory service to allocate some memory on videocre and +-** return the result of this allocation (which upon success will be a pointer +-** to some memory in videocore space). +-*/ ++/* ++ * Ask the shared memory service to allocate some memory on videocre and ++ * return the result of this allocation (which upon success will be a pointer ++ * to some memory in videocore space). ++ */ + int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, + VC_SM_ALLOC_T *alloc, + VC_SM_ALLOC_RESULT_T *alloc_result, uint32_t *trans_id); + +-/* Ask the shared memory service to free up some memory that was previously +-** allocated by the vc_vchi_sm_alloc function call. +-*/ ++/* ++ * Ask the shared memory service to free up some memory that was previously ++ * allocated by the vc_vchi_sm_alloc function call. ++ */ + int vc_vchi_sm_free(VC_VCHI_SM_HANDLE_T handle, + VC_SM_FREE_T *free, uint32_t *trans_id); + +-/* Ask the shared memory service to lock up some memory that was previously +-** allocated by the vc_vchi_sm_alloc function call. ++/* ++ * Ask the shared memory service to lock up some memory that was previously ++ * allocated by the vc_vchi_sm_alloc function call. + */ + int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, + VC_SM_LOCK_UNLOCK_T *lock_unlock, + VC_SM_LOCK_RESULT_T *lock_result, uint32_t *trans_id); + +-/* Ask the shared memory service to unlock some memory that was previously +-** allocated by the vc_vchi_sm_alloc function call. ++/* ++ * Ask the shared memory service to unlock some memory that was previously ++ * allocated by the vc_vchi_sm_alloc function call. + */ + int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, + VC_SM_LOCK_UNLOCK_T *lock_unlock, + uint32_t *trans_id, uint8_t wait_reply); + +-/* Ask the shared memory service to resize some memory that was previously +-** allocated by the vc_vchi_sm_alloc function call. ++/* ++ * Ask the shared memory service to resize some memory that was previously ++ * allocated by the vc_vchi_sm_alloc function call. + */ + int vc_vchi_sm_resize(VC_VCHI_SM_HANDLE_T handle, + VC_SM_RESIZE_T *resize, uint32_t *trans_id); + +-/* Walk the allocated resources on the videocore side, the allocation will +-** show up in the log. This is purely for debug/information and takes no +-** specific actions. ++/* ++ * Walk the allocated resources on the videocore side, the allocation will ++ * show up in the log. This is purely for debug/information and takes no ++ * specific actions. + */ + int vc_vchi_sm_walk_alloc(VC_VCHI_SM_HANDLE_T handle); + +-/* Clean up following a previously interrupted action which left the system +-** in a bad state of some sort. +-*/ ++/* ++ * Clean up following a previously interrupted action which left the system ++ * in a bad state of some sort. ++ */ + int vc_vchi_sm_clean_up(VC_VCHI_SM_HANDLE_T handle, + VC_SM_ACTION_CLEAN_T *action_clean); + + +From 68bbef13e2711d22165067282f7443c73f968114 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 25 Aug 2017 15:58:57 +0100 +Subject: [PATCH 176/199] vcsm: Convert to loading via device tree. + +Signed-off-by: Dave Stevenson +--- + arch/arm/boot/dts/bcm2708-rpi.dtsi | 6 ++++ + drivers/char/broadcom/vc_sm/vmcs_sm.c | 53 ++++++++++++++++++++++++----------- + 2 files changed, 43 insertions(+), 16 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708-rpi.dtsi b/arch/arm/boot/dts/bcm2708-rpi.dtsi +index 8cc83a350d02bb485f7a4fcb129df9e00fb3f958..f88b844f0aff82742966fd820f6f69cf25c2dfab 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi.dtsi ++++ b/arch/arm/boot/dts/bcm2708-rpi.dtsi +@@ -74,6 +74,12 @@ + firmware = <&firmware>; + }; + ++ vcsm: vcsm { ++ compatible = "raspberrypi,bcm2835-vcsm"; ++ firmware = <&firmware>; ++ status = "okay"; ++ }; ++ + thermal: thermal@7e212000 { + #thermal-sensor-cells = <0>; + status = "okay"; +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index 1afea701625157e9d9bc9570240c0b1afb186f56..eb0d3f8a8c27863a5469d0ac224aab65145e7560 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -27,6 +27,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include +@@ -45,6 +47,7 @@ + /* ---- Private Constants and Types --------------------------------------- */ + + #define DEVICE_NAME "vcsm" ++#define DRIVER_NAME "bcm2835-vcsm" + #define DEVICE_MINOR 0 + + #define VC_SM_DIR_ROOT_NAME "vc-smem" +@@ -165,6 +168,7 @@ struct SM_PRIV_DATA_T { + /* Global state information. + */ + struct SM_STATE_T { ++ struct platform_device *pdev; + VC_VCHI_SM_HANDLE_T sm_handle; /* Handle for videocore service. */ + struct dentry *dir_root; /* Debug fs entries root. */ + struct dentry *dir_alloc; /* Debug fs entries allocations. */ +@@ -3000,18 +3004,6 @@ static void vc_sm_connected_init(void) + + pr_info("[%s]: start\n", __func__); + +- /* Allocate memory for the state structure. +- */ +- sm_state = kzalloc(sizeof(struct SM_STATE_T), GFP_KERNEL); +- if (sm_state == NULL) { +- pr_err("[%s]: failed to allocate memory\n", __func__); +- ret = -ENOMEM; +- goto out; +- } +- +- mutex_init(&sm_state->lock); +- mutex_init(&sm_state->map_lock); +- + /* Initialize and create a VCHI connection for the shared memory service + ** running on videocore. + */ +@@ -3104,15 +3096,23 @@ static void vc_sm_connected_init(void) + } + + /* Driver loading. */ +-static int __init vc_sm_init(void) ++static int bcm2835_vcsm_probe(struct platform_device *pdev) + { + pr_info("vc-sm: Videocore shared memory driver\n"); ++ ++ sm_state = kzalloc(sizeof(*sm_state), GFP_KERNEL); ++ if (!sm_state) ++ return -ENOMEM; ++ sm_state->pdev = pdev; ++ mutex_init(&sm_state->lock); ++ mutex_init(&sm_state->map_lock); ++ + vchiq_add_connected_callback(vc_sm_connected_init); + return 0; + } + + /* Driver unloading. */ +-static void __exit vc_sm_exit(void) ++static int bcm2835_vcsm_remove(struct platform_device *pdev) + { + pr_debug("[%s]: start\n", __func__); + if (sm_inited) { +@@ -3135,6 +3135,7 @@ static void __exit vc_sm_exit(void) + } + + pr_debug("[%s]: end\n", __func__); ++ return 0; + } + + #if defined(__KERNEL__) +@@ -3302,8 +3303,28 @@ int vc_sm_map(int handle, unsigned int sm_addr, VC_SM_LOCK_CACHE_MODE_T mode, + EXPORT_SYMBOL_GPL(vc_sm_map); + #endif + +-late_initcall(vc_sm_init); +-module_exit(vc_sm_exit); ++/* ++ * Register the driver with device tree ++ */ ++ ++static const struct of_device_id bcm2835_vcsm_of_match[] = { ++ {.compatible = "raspberrypi,bcm2835-vcsm",}, ++ { /* sentinel */ }, ++}; ++ ++MODULE_DEVICE_TABLE(of, bcm2835_vcsm_of_match); ++ ++static struct platform_driver bcm2835_vcsm_driver = { ++ .probe = bcm2835_vcsm_probe, ++ .remove = bcm2835_vcsm_remove, ++ .driver = { ++ .name = DRIVER_NAME, ++ .owner = THIS_MODULE, ++ .of_match_table = bcm2835_vcsm_of_match, ++ }, ++}; ++ ++module_platform_driver(bcm2835_vcsm_driver); + + MODULE_AUTHOR("Broadcom"); + MODULE_DESCRIPTION("VideoCore SharedMemory Driver"); + +From 21fe405f7bab7c5c07c80ffa82458562dc10a1ce Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Wed, 15 Feb 2017 11:17:44 +0000 +Subject: [PATCH 177/199] VCSM: New option to import a DMABUF for VPU use + +Takes a dmabuf, and then calls over to the VPU to wrap +it into a suitable handle. + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vc_sm_defs.h | 57 ++++++- + drivers/char/broadcom/vc_sm/vc_sm_knl.h | 21 ++- + drivers/char/broadcom/vc_sm/vc_vchi_sm.c | 9 ++ + drivers/char/broadcom/vc_sm/vc_vchi_sm.h | 7 + + drivers/char/broadcom/vc_sm/vmcs_sm.c | 269 ++++++++++++++++++++++++++++++- + include/linux/broadcom/vmcs_sm_ioctl.h | 18 ++- + 6 files changed, 359 insertions(+), 22 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vc_sm_defs.h b/drivers/char/broadcom/vc_sm/vc_sm_defs.h +index 6c19aac6dc9df90edb9432bc32e7477d532d3278..bf057969644546d8f036044aa14d6606173b6a35 100644 +--- a/drivers/char/broadcom/vc_sm/vc_sm_defs.h ++++ b/drivers/char/broadcom/vc_sm/vc_sm_defs.h +@@ -26,8 +26,9 @@ + /* Resource name maximum size */ + #define VC_SM_RESOURCE_NAME 32 + +-/* All message types supported for HOST->VC direction */ + typedef enum { ++ /* Message types supported for HOST->VC direction */ ++ + /* Allocate shared memory block */ + VC_SM_MSG_TYPE_ALLOC, + /* Lock allocated shared memory block */ +@@ -45,6 +46,21 @@ typedef enum { + + /* A previously applied action will need to be reverted */ + VC_SM_MSG_TYPE_ACTION_CLEAN, ++ ++ /* ++ * Import a physical address and wrap into a MEM_HANDLE_T. ++ * Release with VC_SM_MSG_TYPE_FREE. ++ */ ++ VC_SM_MSG_TYPE_IMPORT, ++ ++ /* Message types supported for VC->HOST direction */ ++ ++ /* ++ * VC has finished with an imported memory allocation. ++ * Release any Linux reference counts on the underlying block. ++ */ ++ VC_SM_MSG_TYPE_RELEASED, ++ + VC_SM_MSG_TYPE_MAX + } VC_SM_MSG_TYPE; + +@@ -165,6 +181,41 @@ typedef struct { + + } VC_SM_FREE_ALL_T; + ++/* Request to import memory (HOST->VC) */ ++struct vc_sm_import { ++ /* type of memory to allocate */ ++ VC_SM_ALLOC_TYPE_T type; ++ /* pointer to the VC (ie physical) address of the allocated memory */ ++ uint32_t addr; ++ /* size of buffer */ ++ uint32_t size; ++ /* opaque handle returned in RELEASED messages */ ++ int32_t kernel_id; ++ /* Allocator identifier */ ++ uint32_t allocator; ++ /* resource name (for easier tracking on vc side) */ ++ char name[VC_SM_RESOURCE_NAME]; ++}; ++ ++/* Result of a requested memory import (VC->HOST) */ ++struct vc_sm_import_result { ++ /* Transaction identifier */ ++ uint32_t trans_id; ++ ++ /* Resource handle */ ++ uint32_t res_handle; ++}; ++ ++/* Notification that VC has finished with an allocation (VC->HOST) */ ++struct vc_sm_released { ++ /* pointer to the VC (ie physical) address of the allocated memory */ ++ uint32_t addr; ++ /* size of buffer */ ++ uint32_t size; ++ /* opaque handle returned in RELEASED messages */ ++ int32_t kernel_id; ++}; ++ + /* Union of ALL messages */ + typedef union { + VC_SM_ALLOC_T alloc; +@@ -175,7 +226,9 @@ typedef union { + VC_SM_LOCK_RESULT_T lock_result; + VC_SM_RESULT_T result; + VC_SM_FREE_ALL_T free_all; +- ++ struct vc_sm_import import; ++ struct vc_sm_import_result import_result; ++ struct vc_sm_released released; + } VC_SM_MSG_UNION_T; + + #endif /* __VC_SM_DEFS_H__INCLUDED__ */ +diff --git a/drivers/char/broadcom/vc_sm/vc_sm_knl.h b/drivers/char/broadcom/vc_sm/vc_sm_knl.h +index 965f9a209a025202fea8065d3947c36f4fa43d0a..31050d3eb242b744c1ca43d6672d63b8439f7bc5 100644 +--- a/drivers/char/broadcom/vc_sm/vc_sm_knl.h ++++ b/drivers/char/broadcom/vc_sm/vc_sm_knl.h +@@ -26,30 +26,27 @@ typedef enum { + + } VC_SM_LOCK_CACHE_MODE_T; + +-/* Allocate a shared memory handle and block. +-*/ ++/* Allocate a shared memory handle and block. */ + int vc_sm_alloc(VC_SM_ALLOC_T *alloc, int *handle); + +-/* Free a previously allocated shared memory handle and block. +-*/ ++/* Free a previously allocated shared memory handle and block. */ + int vc_sm_free(int handle); + +-/* Lock a memory handle for use by kernel. +-*/ ++/* Lock a memory handle for use by kernel. */ + int vc_sm_lock(int handle, VC_SM_LOCK_CACHE_MODE_T mode, + long unsigned int *data); + +-/* Unlock a memory handle in use by kernel. +-*/ ++/* Unlock a memory handle in use by kernel. */ + int vc_sm_unlock(int handle, int flush, int no_vc_unlock); + +-/* Get an internal resource handle mapped from the external one. +-*/ ++/* Get an internal resource handle mapped from the external one. */ + int vc_sm_int_handle(int handle); + +-/* Map a shared memory region for use by kernel. +-*/ ++/* Map a shared memory region for use by kernel. */ + int vc_sm_map(int handle, unsigned int sm_addr, VC_SM_LOCK_CACHE_MODE_T mode, + long unsigned int *data); + ++/* Import a block of memory into the GPU space. */ ++int vc_sm_import_dmabuf(struct dma_buf *dmabuf, int *handle); ++ + #endif /* __VC_SM_KNL_H__INCLUDED__ */ +diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c +index 76abd126c4617b6310fcf0ebd7ab1d5f73a18a70..53fc11a9d5d741ec6a7e55b4d1934c9c43a6df8c 100644 +--- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c ++++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c +@@ -497,3 +497,12 @@ int vc_vchi_sm_clean_up(VC_VCHI_SM_HANDLE_T handle, VC_SM_ACTION_CLEAN_T *msg) + return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_ACTION_CLEAN, + msg, sizeof(*msg), 0, 0, 0, 0); + } ++ ++int vc_vchi_sm_import(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_import *msg, ++ struct vc_sm_import_result *result, ++ uint32_t *cur_trans_id) ++{ ++ return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_IMPORT, ++ msg, sizeof(*msg), result, sizeof(*result), ++ cur_trans_id, 1); ++} +diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h +index f8e555dc30074e7ff226cf34a96aa30a34176775..562217831fa744db99d94295c1c5a46f3a4780fb 100644 +--- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h ++++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h +@@ -89,4 +89,11 @@ int vc_vchi_sm_walk_alloc(VC_VCHI_SM_HANDLE_T handle); + int vc_vchi_sm_clean_up(VC_VCHI_SM_HANDLE_T handle, + VC_SM_ACTION_CLEAN_T *action_clean); + ++/* ++ * Import a contiguous block of memory and wrap it in a GPU MEM_HANDLE_T. ++ */ ++int vc_vchi_sm_import(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_import *msg, ++ struct vc_sm_import_result *result, ++ uint32_t *cur_trans_id); ++ + #endif /* __VC_VCHI_SM_H__INCLUDED__ */ +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index eb0d3f8a8c27863a5469d0ac224aab65145e7560..520f343f3f4b828f3045fc4ff3fb0d8a68bb1f9d 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -69,6 +70,7 @@ enum SM_STATS_T { + MAP, + FLUSH, + INVALID, ++ IMPORT, + + END_ATTEMPT, + +@@ -80,6 +82,7 @@ enum SM_STATS_T { + MAP_FAIL, + FLUSH_FAIL, + INVALID_FAIL, ++ IMPORT_FAIL, + + END_ALL, + +@@ -93,6 +96,7 @@ static const char *const sm_stats_human_read[] = { + "Map", + "Cache Flush", + "Cache Invalidate", ++ "Import", + }; + + typedef int (*VC_SM_SHOW) (struct seq_file *s, void *v); +@@ -144,6 +148,12 @@ struct SM_RESOURCE_T { + uint8_t map_count; /* Counter of mappings for this resource. */ + struct list_head map_list; /* Maps associated with a resource. */ + ++ /* DMABUF related fields */ ++ struct dma_buf *dma_buf; ++ struct dma_buf_attachment *attach; ++ struct sg_table *sgt; ++ dma_addr_t dma_addr; ++ + struct SM_PRIV_DATA_T *private; + bool map; /* whether to map pages up front */ + }; +@@ -500,7 +510,9 @@ static void vmcs_sm_remove_map(struct SM_STATE_T *state, + static int vc_sm_global_state_show(struct seq_file *s, void *v) + { + struct sm_mmap *map = NULL; ++ struct SM_RESOURCE_T *resource = NULL; + int map_count = 0; ++ int resource_count = 0; + + if (sm_state == NULL) + return 0; +@@ -512,7 +524,41 @@ static int vc_sm_global_state_show(struct seq_file *s, void *v) + */ + + mutex_lock(&(sm_state->map_lock)); ++ seq_puts(s, "\nResources\n"); ++ if (!list_empty(&sm_state->resource_list)) { ++ list_for_each_entry(resource, &sm_state->resource_list, ++ global_resource_list) { ++ resource_count++; ++ ++ seq_printf(s, "\nResource %p\n", ++ resource); ++ seq_printf(s, " PID %u\n", ++ resource->pid); ++ seq_printf(s, " RES_GUID 0x%x\n", ++ resource->res_guid); ++ seq_printf(s, " LOCK_COUNT %u\n", ++ resource->lock_count); ++ seq_printf(s, " REF_COUNT %u\n", ++ resource->ref_count); ++ seq_printf(s, " res_handle 0x%X\n", ++ resource->res_handle); ++ seq_printf(s, " res_base_mem %p\n", ++ resource->res_base_mem); ++ seq_printf(s, " SIZE %d\n", ++ resource->res_size); ++ seq_printf(s, " DMABUF %p\n", ++ resource->dma_buf); ++ seq_printf(s, " ATTACH %p\n", ++ resource->attach); ++ seq_printf(s, " SGT %p\n", ++ resource->sgt); ++ seq_printf(s, " DMA_ADDR 0x%08X\n", ++ resource->dma_addr); ++ } ++ } ++ seq_printf(s, "\n\nTotal resource count: %d\n\n", resource_count); + ++ seq_puts(s, "\nMappings\n"); + if (!list_empty(&sm_state->map_list)) { + list_for_each_entry(map, &sm_state->map_list, map_list) { + map_count++; +@@ -527,6 +573,8 @@ static int vc_sm_global_state_show(struct seq_file *s, void *v) + map->res_usr_hdl); + seq_printf(s, " USR-ADDR 0x%lx\n", + map->res_addr); ++ seq_printf(s, " SIZE %d\n", ++ map->resource->res_size); + } + } + +@@ -843,7 +891,8 @@ static void vmcs_sm_release_resource(struct SM_RESOURCE_T *resource, int force) + list_del(&resource->resource_list); + list_del(&resource->global_resource_list); + +- /* Walk the global resource list, find out if the resource is used ++ /* ++ * Walk the global resource list, find out if the resource is used + * somewhere else. In which case we don't want to delete it. + */ + list_for_each_entry(res_tmp, &sm_state->resource_list, +@@ -877,8 +926,7 @@ static void vmcs_sm_release_resource(struct SM_RESOURCE_T *resource, int force) + up_write(¤t->mm->mmap_sem); + } + +- /* Free up the videocore allocated resource. +- */ ++ /* Free up the videocore allocated resource. */ + if (resource->res_handle) { + VC_SM_FREE_T free = { + resource->res_handle, (uint32_t)resource->res_base_mem +@@ -893,13 +941,19 @@ static void vmcs_sm_release_resource(struct SM_RESOURCE_T *resource, int force) + } + } + +- /* Free up the shared resource. +- */ ++ if (resource->sgt) ++ dma_buf_unmap_attachment(resource->attach, resource->sgt, ++ DMA_BIDIRECTIONAL); ++ if (resource->attach) ++ dma_buf_detach(resource->dma_buf, resource->attach); ++ if (resource->dma_buf) ++ dma_buf_put(resource->dma_buf); ++ ++ /* Free up the shared resource. */ + if (resource->res_shared) + vmcs_sm_release_resource(resource->res_shared, 0); + +- /* Free up the local resource tracking this allocation. +- */ ++ /* Free up the local resource tracking this allocation. */ + vc_sm_resource_deceased(resource, force); + kfree(resource); + } +@@ -2055,6 +2109,137 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, + return ret; + } + ++/* ++ * Import a contiguous block of memory to be shared with VC. ++ */ ++int vc_sm_ioctl_import_dmabuf(struct SM_PRIV_DATA_T *private, ++ struct vmcs_sm_ioctl_import_dmabuf *ioparam, ++ struct dma_buf *src_dma_buf) ++{ ++ int ret = 0; ++ int status; ++ struct SM_RESOURCE_T *resource = NULL; ++ struct vc_sm_import import = { 0 }; ++ struct vc_sm_import_result result = { 0 }; ++ struct dma_buf *dma_buf; ++ struct dma_buf_attachment *attach = NULL; ++ struct sg_table *sgt = NULL; ++ ++ /* Setup our allocation parameters */ ++ if (src_dma_buf) { ++ get_dma_buf(src_dma_buf); ++ dma_buf = src_dma_buf; ++ } else { ++ dma_buf = dma_buf_get(ioparam->dmabuf_fd); ++ } ++ if (IS_ERR(dma_buf)) ++ return PTR_ERR(dma_buf); ++ ++ attach = dma_buf_attach(dma_buf, &sm_state->pdev->dev); ++ if (IS_ERR(attach)) { ++ ret = PTR_ERR(attach); ++ goto error; ++ } ++ ++ sgt = dma_buf_map_attachment(attach, DMA_BIDIRECTIONAL); ++ if (IS_ERR(sgt)) { ++ ret = PTR_ERR(sgt); ++ goto error; ++ } ++ ++ /* Verify that the address block is contiguous */ ++ if (sgt->nents != 1) { ++ ret = -ENOMEM; ++ goto error; ++ } ++ ++ import.type = ((ioparam->cached == VMCS_SM_CACHE_VC) || ++ (ioparam->cached == VMCS_SM_CACHE_BOTH)) ? ++ VC_SM_ALLOC_CACHED : VC_SM_ALLOC_NON_CACHED; ++ import.addr = (uint32_t)sg_dma_address(sgt->sgl); ++ import.size = sg_dma_len(sgt->sgl); ++ import.allocator = current->tgid; ++ ++ if (*ioparam->name) ++ memcpy(import.name, ioparam->name, sizeof(import.name) - 1); ++ else ++ memcpy(import.name, VMCS_SM_RESOURCE_NAME_DEFAULT, ++ sizeof(VMCS_SM_RESOURCE_NAME_DEFAULT)); ++ ++ pr_debug("[%s]: attempt to import \"%s\" data - type %u, addr %p, size %u\n", ++ __func__, import.name, import.type, ++ (void *)import.addr, import.size); ++ ++ /* Allocate local resource to track this allocation. */ ++ resource = kzalloc(sizeof(*resource), GFP_KERNEL); ++ if (!resource) { ++ ret = -ENOMEM; ++ goto error; ++ } ++ INIT_LIST_HEAD(&resource->map_list); ++ resource->ref_count++; ++ resource->pid = current->tgid; ++ ++ /* Allocate the videocore resource. */ ++ status = vc_vchi_sm_import(sm_state->sm_handle, &import, &result, ++ &private->int_trans_id); ++ if (status == -EINTR) { ++ pr_debug("[%s]: requesting import memory action restart (trans_id: %u)\n", ++ __func__, private->int_trans_id); ++ ret = -ERESTARTSYS; ++ private->restart_sys = -EINTR; ++ private->int_action = VC_SM_MSG_TYPE_IMPORT; ++ goto error; ++ } else if (status || !result.res_handle) { ++ pr_debug("[%s]: failed to import memory on videocore (status: %u, trans_id: %u)\n", ++ __func__, status, private->int_trans_id); ++ ret = -ENOMEM; ++ resource->res_stats[ALLOC_FAIL]++; ++ goto error; ++ } ++ ++ /* Keep track of the resource we created. ++ */ ++ resource->private = private; ++ resource->res_handle = result.res_handle; ++ resource->res_size = import.size; ++ resource->res_cached = ioparam->cached; ++ ++ resource->dma_buf = dma_buf; ++ resource->attach = attach; ++ resource->sgt = sgt; ++ resource->dma_addr = sg_dma_address(sgt->sgl); ++ ++ /* Kernel/user GUID. This global identifier is used for mmap'ing the ++ * allocated region from user space, it is passed as the mmap'ing ++ * offset, we use it to 'hide' the videocore handle/address. ++ */ ++ mutex_lock(&sm_state->lock); ++ resource->res_guid = ++sm_state->guid; ++ mutex_unlock(&sm_state->lock); ++ resource->res_guid <<= PAGE_SHIFT; ++ ++ vmcs_sm_add_resource(private, resource); ++ ++ /* We're done */ ++ resource->res_stats[IMPORT]++; ++ ioparam->handle = resource->res_guid; ++ return 0; ++ ++error: ++ resource->res_stats[IMPORT_FAIL]++; ++ if (resource) { ++ vc_sm_resource_deceased(resource, 1); ++ kfree(resource); ++ } ++ if (sgt) ++ dma_buf_unmap_attachment(attach, sgt, DMA_BIDIRECTIONAL); ++ if (attach) ++ dma_buf_detach(dma_buf, attach); ++ dma_buf_put(dma_buf); ++ return ret; ++} ++ + /* Handle control from host. */ + static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + { +@@ -2166,6 +2351,40 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + } + break; + ++ case VMCS_SM_CMD_IMPORT_DMABUF: ++ { ++ struct vmcs_sm_ioctl_import_dmabuf ioparam; ++ ++ /* Get the parameter data. ++ */ ++ if (copy_from_user ++ (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { ++ pr_err("[%s]: failed to copy-from-user for cmd %x\n", ++ __func__, cmdnr); ++ ret = -EFAULT; ++ goto out; ++ } ++ ++ ret = vc_sm_ioctl_import_dmabuf(file_data, &ioparam, ++ NULL); ++ if (!ret && ++ (copy_to_user((void *)arg, ++ &ioparam, sizeof(ioparam)) != 0)) { ++ struct vmcs_sm_ioctl_free freeparam = { ++ ioparam.handle ++ }; ++ pr_err("[%s]: failed to copy-to-user for cmd %x\n", ++ __func__, cmdnr); ++ vc_sm_ioctl_free(file_data, &freeparam); ++ ret = -EFAULT; ++ } ++ ++ /* Done. ++ */ ++ goto out; ++ } ++ break; ++ + /* Lock (attempt to) *and* register a cache behavior change. + */ + case VMCS_SM_CMD_LOCK_CACHE: +@@ -3301,6 +3520,42 @@ int vc_sm_map(int handle, unsigned int sm_addr, VC_SM_LOCK_CACHE_MODE_T mode, + return ret; + } + EXPORT_SYMBOL_GPL(vc_sm_map); ++ ++/* Import a dmabuf to be shared with VC. */ ++int vc_sm_import_dmabuf(struct dma_buf *dmabuf, int *handle) ++{ ++ struct vmcs_sm_ioctl_import_dmabuf ioparam = { 0 }; ++ int ret; ++ struct SM_RESOURCE_T *resource; ++ ++ /* Validate we can work with this device. */ ++ if (!sm_state || !dmabuf || !handle) { ++ pr_err("[%s]: invalid input\n", __func__); ++ return -EPERM; ++ } ++ ++ ioparam.cached = 0; ++ strcpy(ioparam.name, "KRNL DMABUF"); ++ ++ ret = vc_sm_ioctl_import_dmabuf(sm_state->data_knl, &ioparam, dmabuf); ++ ++ if (!ret) { ++ resource = vmcs_sm_acquire_resource(sm_state->data_knl, ++ ioparam.handle); ++ if (resource) { ++ resource->pid = 0; ++ vmcs_sm_release_resource(resource, 0); ++ ++ /* Assign valid handle at this time.*/ ++ *handle = ioparam.handle; ++ } else { ++ ret = -ENOMEM; ++ } ++ } ++ ++ return ret; ++} ++EXPORT_SYMBOL_GPL(vc_sm_import_dmabuf); + #endif + + /* +diff --git a/include/linux/broadcom/vmcs_sm_ioctl.h b/include/linux/broadcom/vmcs_sm_ioctl.h +index 2de7f1f41070689c99cad3bd43d117458549cb51..b75729d762f25aace133f7a008633b4094ae2de2 100644 +--- a/include/linux/broadcom/vmcs_sm_ioctl.h ++++ b/include/linux/broadcom/vmcs_sm_ioctl.h +@@ -64,7 +64,9 @@ enum vmcs_sm_cmd_e { + VMCS_SM_CMD_CLEAN_INVALID, + VMCS_SM_CMD_CLEAN_INVALID2, + +- VMCS_SM_CMD_LAST /* Do no delete */ ++ VMCS_SM_CMD_IMPORT_DMABUF, ++ ++ VMCS_SM_CMD_LAST /* Do not delete */ + }; + + /* Cache type supported, conveniently matches the user space definition in +@@ -188,6 +190,16 @@ struct vmcs_sm_ioctl_clean_invalid2 { + } s[0]; + }; + ++struct vmcs_sm_ioctl_import_dmabuf { ++ /* user -> kernel */ ++ int dmabuf_fd; ++ enum vmcs_sm_cache_e cached; ++ char name[VMCS_SM_RESOURCE_NAME]; ++ ++ /* kernel -> user */ ++ unsigned int handle; ++}; ++ + /* IOCTL numbers */ + #define VMCS_SM_IOCTL_MEM_ALLOC\ + _IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_ALLOC,\ +@@ -257,6 +269,10 @@ struct vmcs_sm_ioctl_clean_invalid2 { + _IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_HOST_WALK_PID_MAP,\ + struct vmcs_sm_ioctl_walk) + ++#define VMCS_SM_IOCTL_MEM_IMPORT_DMABUF\ ++ _IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_IMPORT_DMABUF,\ ++ struct vmcs_sm_ioctl_import_dmabuf) ++ + /* ---- Variable Externs ------------------------------------------------- */ + + /* ---- Function Prototypes ---------------------------------------------- */ + +From f74c08227346d8a282e2fdc804310b24317c1ca6 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 1 Sep 2017 16:26:12 +0100 +Subject: [PATCH 178/199] vcsm: Remove all typedefs from vc_sm_defs.h and + calling code + +Remove typedefs on the structures that make up the IPC +to the firmware for VCSM. Update all calling code appropriately. + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vc_sm_defs.h | 83 ++++++++++++++++---------------- + drivers/char/broadcom/vc_sm/vc_sm_knl.h | 2 +- + drivers/char/broadcom/vc_sm/vc_vchi_sm.c | 34 +++++++------ + drivers/char/broadcom/vc_sm/vc_vchi_sm.h | 19 ++++---- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 26 +++++----- + 5 files changed, 84 insertions(+), 80 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vc_sm_defs.h b/drivers/char/broadcom/vc_sm/vc_sm_defs.h +index bf057969644546d8f036044aa14d6606173b6a35..29057db43404716406b06e3c3745e3d82219be16 100644 +--- a/drivers/char/broadcom/vc_sm/vc_sm_defs.h ++++ b/drivers/char/broadcom/vc_sm/vc_sm_defs.h +@@ -19,14 +19,14 @@ + #define VC_SM_SERVER_NAME MAKE_FOURCC("SMEM") + + /* Maximum message length */ +-#define VC_SM_MAX_MSG_LEN (sizeof(VC_SM_MSG_UNION_T) + \ +- sizeof(VC_SM_MSG_HDR_T)) +-#define VC_SM_MAX_RSP_LEN (sizeof(VC_SM_MSG_UNION_T)) ++#define VC_SM_MAX_MSG_LEN (sizeof(union vc_sm_msg_union_t) + \ ++ sizeof(struct vc_sm_msg_hdr_t)) ++#define VC_SM_MAX_RSP_LEN (sizeof(union vc_sm_msg_union_t)) + + /* Resource name maximum size */ + #define VC_SM_RESOURCE_NAME 32 + +-typedef enum { ++enum vc_sm_msg_type { + /* Message types supported for HOST->VC direction */ + + /* Allocate shared memory block */ +@@ -62,27 +62,26 @@ typedef enum { + VC_SM_MSG_TYPE_RELEASED, + + VC_SM_MSG_TYPE_MAX +-} VC_SM_MSG_TYPE; ++}; + + /* Type of memory to be allocated */ +-typedef enum { ++enum vc_sm_alloc_type_t { + VC_SM_ALLOC_CACHED, + VC_SM_ALLOC_NON_CACHED, +- +-} VC_SM_ALLOC_TYPE_T; ++}; + + /* Message header for all messages in HOST->VC direction */ +-typedef struct { ++struct vc_sm_msg_hdr_t { + int32_t type; + uint32_t trans_id; + uint8_t body[0]; + +-} VC_SM_MSG_HDR_T; ++}; + + /* Request to allocate memory (HOST->VC) */ +-typedef struct { ++struct vc_sm_alloc_t { + /* type of memory to allocate */ +- VC_SM_ALLOC_TYPE_T type; ++ enum vc_sm_alloc_type_t type; + /* byte amount of data to allocate per unit */ + uint32_t base_unit; + /* number of unit to allocate */ +@@ -94,10 +93,10 @@ typedef struct { + /* resource name (for easier tracking on vc side) */ + char name[VC_SM_RESOURCE_NAME]; + +-} VC_SM_ALLOC_T; ++}; + + /* Result of a requested memory allocation (VC->HOST) */ +-typedef struct { ++struct vc_sm_alloc_result_t { + /* Transaction identifier */ + uint32_t trans_id; + +@@ -110,28 +109,28 @@ typedef struct { + /* Resource number */ + uint32_t res_num; + +-} VC_SM_ALLOC_RESULT_T; ++}; + + /* Request to free a previously allocated memory (HOST->VC) */ +-typedef struct { ++struct vc_sm_free_t { + /* Resource handle (returned from alloc) */ + uint32_t res_handle; + /* Resource buffer (returned from alloc) */ + uint32_t res_mem; + +-} VC_SM_FREE_T; ++}; + + /* Request to lock a previously allocated memory (HOST->VC) */ +-typedef struct { ++struct vc_sm_lock_unlock_t { + /* Resource handle (returned from alloc) */ + uint32_t res_handle; + /* Resource buffer (returned from alloc) */ + uint32_t res_mem; + +-} VC_SM_LOCK_UNLOCK_T; ++}; + + /* Request to resize a previously allocated memory (HOST->VC) */ +-typedef struct { ++struct vc_sm_resize_t { + /* Resource handle (returned from alloc) */ + uint32_t res_handle; + /* Resource buffer (returned from alloc) */ +@@ -139,10 +138,10 @@ typedef struct { + /* Resource *new* size requested (bytes) */ + uint32_t res_new_size; + +-} VC_SM_RESIZE_T; ++}; + + /* Result of a requested memory lock (VC->HOST) */ +-typedef struct { ++struct vc_sm_lock_result_t { + /* Transaction identifier */ + uint32_t trans_id; + +@@ -154,37 +153,36 @@ typedef struct { + * was reallocated */ + uint32_t res_old_mem; + +-} VC_SM_LOCK_RESULT_T; ++}; + + /* Generic result for a request (VC->HOST) */ +-typedef struct { ++struct vc_sm_result_t { + /* Transaction identifier */ + uint32_t trans_id; + + int32_t success; + +-} VC_SM_RESULT_T; ++}; + + /* Request to revert a previously applied action (HOST->VC) */ +-typedef struct { ++struct vc_sm_action_clean_t { + /* Action of interest */ +- VC_SM_MSG_TYPE res_action; ++ enum vc_sm_msg_type res_action; + /* Transaction identifier for the action of interest */ + uint32_t action_trans_id; + +-} VC_SM_ACTION_CLEAN_T; ++}; + + /* Request to remove all data associated with a given allocator (HOST->VC) */ +-typedef struct { ++struct vc_sm_free_all_t { + /* Allocator identifier */ + uint32_t allocator; +- +-} VC_SM_FREE_ALL_T; ++}; + + /* Request to import memory (HOST->VC) */ + struct vc_sm_import { + /* type of memory to allocate */ +- VC_SM_ALLOC_TYPE_T type; ++ enum vc_sm_alloc_type_t type; + /* pointer to the VC (ie physical) address of the allocated memory */ + uint32_t addr; + /* size of buffer */ +@@ -217,18 +215,19 @@ struct vc_sm_released { + }; + + /* Union of ALL messages */ +-typedef union { +- VC_SM_ALLOC_T alloc; +- VC_SM_ALLOC_RESULT_T alloc_result; +- VC_SM_FREE_T free; +- VC_SM_ACTION_CLEAN_T action_clean; +- VC_SM_RESIZE_T resize; +- VC_SM_LOCK_RESULT_T lock_result; +- VC_SM_RESULT_T result; +- VC_SM_FREE_ALL_T free_all; ++union vc_sm_msg_union_t { ++ struct vc_sm_alloc_t alloc; ++ struct vc_sm_alloc_result_t alloc_result; ++ struct vc_sm_free_t free; ++ struct vc_sm_lock_unlock_t lock_unlock; ++ struct vc_sm_action_clean_t action_clean; ++ struct vc_sm_resize_t resize; ++ struct vc_sm_lock_result_t lock_result; ++ struct vc_sm_result_t result; ++ struct vc_sm_free_all_t free_all; + struct vc_sm_import import; + struct vc_sm_import_result import_result; + struct vc_sm_released released; +-} VC_SM_MSG_UNION_T; ++}; + + #endif /* __VC_SM_DEFS_H__INCLUDED__ */ +diff --git a/drivers/char/broadcom/vc_sm/vc_sm_knl.h b/drivers/char/broadcom/vc_sm/vc_sm_knl.h +index 31050d3eb242b744c1ca43d6672d63b8439f7bc5..3c684ddde5c1fac5c726a71deec305f7588f0200 100644 +--- a/drivers/char/broadcom/vc_sm/vc_sm_knl.h ++++ b/drivers/char/broadcom/vc_sm/vc_sm_knl.h +@@ -27,7 +27,7 @@ typedef enum { + } VC_SM_LOCK_CACHE_MODE_T; + + /* Allocate a shared memory handle and block. */ +-int vc_sm_alloc(VC_SM_ALLOC_T *alloc, int *handle); ++int vc_sm_alloc(struct vc_sm_alloc_t *alloc, int *handle); + + /* Free a previously allocated shared memory handle and block. */ + int vc_sm_free(int handle); +diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c +index 53fc11a9d5d741ec6a7e55b4d1934c9c43a6df8c..a702b0c16478c87e28be3905a14dcd992e6c05cb 100644 +--- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c ++++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c +@@ -83,11 +83,11 @@ bcm2835_vchi_msg_queue(VCHI_SERVICE_HANDLE_T handle, + + static struct + sm_cmd_rsp_blk *vc_vchi_cmd_create(struct sm_instance *instance, +- VC_SM_MSG_TYPE id, void *msg, ++ enum vc_sm_msg_type id, void *msg, + uint32_t size, int wait) + { + struct sm_cmd_rsp_blk *blk; +- VC_SM_MSG_HDR_T *hdr; ++ struct vc_sm_msg_hdr_t *hdr; + + if (down_interruptible(&instance->free_sema)) { + blk = kmalloc(sizeof(*blk), GFP_KERNEL); +@@ -109,7 +109,7 @@ sm_cmd_rsp_blk *vc_vchi_cmd_create(struct sm_instance *instance, + blk->wait = wait; + blk->length = sizeof(*hdr) + size; + +- hdr = (VC_SM_MSG_HDR_T *) blk->msg; ++ hdr = (struct vc_sm_msg_hdr_t *) blk->msg; + hdr->type = id; + mutex_lock(&instance->lock); + hdr->trans_id = blk->id = ++instance->trans_id; +@@ -139,7 +139,7 @@ static int vc_vchi_sm_videocore_io(void *arg) + { + struct sm_instance *instance = arg; + struct sm_cmd_rsp_blk *cmd = NULL, *cmd_tmp; +- VC_SM_RESULT_T *reply; ++ struct vc_sm_result_t *reply; + uint32_t reply_len; + int32_t status; + int svc_use = 1; +@@ -374,7 +374,7 @@ int vc_vchi_sm_stop(VC_VCHI_SM_HANDLE_T *handle) + } + + int vc_vchi_sm_send_msg(VC_VCHI_SM_HANDLE_T handle, +- VC_SM_MSG_TYPE msg_id, ++ enum vc_sm_msg_type msg_id, + void *msg, uint32_t msg_size, + void *result, uint32_t result_size, + uint32_t *cur_trans_id, uint8_t wait_reply) +@@ -433,7 +433,8 @@ int vc_vchi_sm_send_msg(VC_VCHI_SM_HANDLE_T handle, + if (result && result_size) { + memcpy(result, cmd_blk->msg, result_size); + } else { +- VC_SM_RESULT_T *res = (VC_SM_RESULT_T *) cmd_blk->msg; ++ struct vc_sm_result_t *res = ++ (struct vc_sm_result_t *) cmd_blk->msg; + status = (res->success == 0) ? 0 : -ENXIO; + } + +@@ -444,8 +445,9 @@ int vc_vchi_sm_send_msg(VC_VCHI_SM_HANDLE_T handle, + return status; + } + +-int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, VC_SM_ALLOC_T *msg, +- VC_SM_ALLOC_RESULT_T *result, uint32_t *cur_trans_id) ++int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_alloc_t *msg, ++ struct vc_sm_alloc_result_t *result, ++ uint32_t *cur_trans_id) + { + return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_ALLOC, + msg, sizeof(*msg), result, sizeof(*result), +@@ -453,15 +455,16 @@ int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, VC_SM_ALLOC_T *msg, + } + + int vc_vchi_sm_free(VC_VCHI_SM_HANDLE_T handle, +- VC_SM_FREE_T *msg, uint32_t *cur_trans_id) ++ struct vc_sm_free_t *msg, uint32_t *cur_trans_id) + { + return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_FREE, + msg, sizeof(*msg), 0, 0, cur_trans_id, 0); + } + + int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, +- VC_SM_LOCK_UNLOCK_T *msg, +- VC_SM_LOCK_RESULT_T *result, uint32_t *cur_trans_id) ++ struct vc_sm_lock_unlock_t *msg, ++ struct vc_sm_lock_result_t *result, ++ uint32_t *cur_trans_id) + { + return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_LOCK, + msg, sizeof(*msg), result, sizeof(*result), +@@ -469,7 +472,7 @@ int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, + } + + int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, +- VC_SM_LOCK_UNLOCK_T *msg, ++ struct vc_sm_lock_unlock_t *msg, + uint32_t *cur_trans_id, uint8_t wait_reply) + { + return vc_vchi_sm_send_msg(handle, wait_reply ? +@@ -479,8 +482,8 @@ int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, + wait_reply); + } + +-int vc_vchi_sm_resize(VC_VCHI_SM_HANDLE_T handle, VC_SM_RESIZE_T *msg, +- uint32_t *cur_trans_id) ++int vc_vchi_sm_resize(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_resize_t *msg, ++ uint32_t *cur_trans_id) + { + return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_RESIZE, + msg, sizeof(*msg), 0, 0, cur_trans_id, 1); +@@ -492,7 +495,8 @@ int vc_vchi_sm_walk_alloc(VC_VCHI_SM_HANDLE_T handle) + 0, 0, 0, 0, 0, 0); + } + +-int vc_vchi_sm_clean_up(VC_VCHI_SM_HANDLE_T handle, VC_SM_ACTION_CLEAN_T *msg) ++int vc_vchi_sm_clean_up(VC_VCHI_SM_HANDLE_T handle, ++ struct vc_sm_action_clean_t *msg) + { + return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_ACTION_CLEAN, + msg, sizeof(*msg), 0, 0, 0, 0); +diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h +index 562217831fa744db99d94295c1c5a46f3a4780fb..f97cddf14881535c7f62a2ce0166a5eb7e3fad6d 100644 +--- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h ++++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h +@@ -41,31 +41,32 @@ int vc_vchi_sm_stop(VC_VCHI_SM_HANDLE_T *handle); + * return the result of this allocation (which upon success will be a pointer + * to some memory in videocore space). + */ +-int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, +- VC_SM_ALLOC_T *alloc, +- VC_SM_ALLOC_RESULT_T *alloc_result, uint32_t *trans_id); ++int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_alloc_t *alloc, ++ struct vc_sm_alloc_result_t *alloc_result, ++ uint32_t *trans_id); + + /* + * Ask the shared memory service to free up some memory that was previously + * allocated by the vc_vchi_sm_alloc function call. + */ + int vc_vchi_sm_free(VC_VCHI_SM_HANDLE_T handle, +- VC_SM_FREE_T *free, uint32_t *trans_id); ++ struct vc_sm_free_t *free, uint32_t *trans_id); + + /* + * Ask the shared memory service to lock up some memory that was previously + * allocated by the vc_vchi_sm_alloc function call. + */ + int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, +- VC_SM_LOCK_UNLOCK_T *lock_unlock, +- VC_SM_LOCK_RESULT_T *lock_result, uint32_t *trans_id); ++ struct vc_sm_lock_unlock_t *lock_unlock, ++ struct vc_sm_lock_result_t *lock_result, ++ uint32_t *trans_id); + + /* + * Ask the shared memory service to unlock some memory that was previously + * allocated by the vc_vchi_sm_alloc function call. + */ + int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, +- VC_SM_LOCK_UNLOCK_T *lock_unlock, ++ struct vc_sm_lock_unlock_t *lock_unlock, + uint32_t *trans_id, uint8_t wait_reply); + + /* +@@ -73,7 +74,7 @@ int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, + * allocated by the vc_vchi_sm_alloc function call. + */ + int vc_vchi_sm_resize(VC_VCHI_SM_HANDLE_T handle, +- VC_SM_RESIZE_T *resize, uint32_t *trans_id); ++ struct vc_sm_resize_t *resize, uint32_t *trans_id); + + /* + * Walk the allocated resources on the videocore side, the allocation will +@@ -87,7 +88,7 @@ int vc_vchi_sm_walk_alloc(VC_VCHI_SM_HANDLE_T handle); + * in a bad state of some sort. + */ + int vc_vchi_sm_clean_up(VC_VCHI_SM_HANDLE_T handle, +- VC_SM_ACTION_CLEAN_T *action_clean); ++ struct vc_sm_action_clean_t *action_clean); + + /* + * Import a contiguous block of memory and wrap it in a GPU MEM_HANDLE_T. +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index 520f343f3f4b828f3045fc4ff3fb0d8a68bb1f9d..e67d96d54ad82bd51393268c830a51169f62b097 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -170,7 +170,7 @@ struct SM_PRIV_DATA_T { + struct SM_PDE_T dir_res; /* Debug fs resource sub-tree. */ + + int restart_sys; /* Tracks restart on interrupt. */ +- VC_SM_MSG_TYPE int_action; /* Interrupted action. */ ++ enum vc_sm_msg_type int_action; /* Interrupted action. */ + uint32_t int_trans_id; /* Interrupted transaction. */ + + }; +@@ -928,7 +928,7 @@ static void vmcs_sm_release_resource(struct SM_RESOURCE_T *resource, int force) + + /* Free up the videocore allocated resource. */ + if (resource->res_handle) { +- VC_SM_FREE_T free = { ++ struct vc_sm_free_t free = { + resource->res_handle, (uint32_t)resource->res_base_mem + }; + int status = vc_vchi_sm_free(sm_state->sm_handle, &free, +@@ -1123,7 +1123,7 @@ static int vc_sm_release(struct inode *inode, struct file *file) + pr_debug("[%s]: using private data %p\n", __func__, file_data); + + if (file_data->restart_sys == -EINTR) { +- VC_SM_ACTION_CLEAN_T action_clean; ++ struct vc_sm_action_clean_t action_clean; + + pr_debug("[%s]: releasing following EINTR on %u (trans_id: %u) (likely due to signal)...\n", + __func__, file_data->int_action, +@@ -1189,8 +1189,8 @@ static int vcsm_vma_fault(struct vm_fault *vmf) + /* Lock the resource if necessary. + */ + if (!resource->lock_count) { +- VC_SM_LOCK_UNLOCK_T lock_unlock; +- VC_SM_LOCK_RESULT_T lock_result; ++ struct vc_sm_lock_unlock_t lock_unlock; ++ struct vc_sm_lock_result_t lock_result; + int status; + + lock_unlock.res_handle = resource->res_handle; +@@ -1465,8 +1465,8 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, + int ret = 0; + int status; + struct SM_RESOURCE_T *resource; +- VC_SM_ALLOC_T alloc = { 0 }; +- VC_SM_ALLOC_RESULT_T result = { 0 }; ++ struct vc_sm_alloc_t alloc = { 0 }; ++ struct vc_sm_alloc_result_t result = { 0 }; + enum vmcs_sm_cache_e cached = ioparam->cached; + bool map = false; + +@@ -1671,7 +1671,7 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, + { + int ret = 0; + int status; +- VC_SM_RESIZE_T resize; ++ struct vc_sm_resize_t resize; + struct SM_RESOURCE_T *resource; + + /* Locate resource from GUID. +@@ -1761,8 +1761,8 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, + unsigned int vc_addr) + { + int status; +- VC_SM_LOCK_UNLOCK_T lock; +- VC_SM_LOCK_RESULT_T result; ++ struct vc_sm_lock_unlock_t lock; ++ struct vc_sm_lock_result_t result; + struct SM_RESOURCE_T *resource; + int ret = 0; + struct sm_mmap *map, *map_tmp; +@@ -1935,7 +1935,7 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, + int flush, int wait_reply, int no_vc_unlock) + { + int status; +- VC_SM_LOCK_UNLOCK_T unlock; ++ struct vc_sm_lock_unlock_t unlock; + struct sm_mmap *map, *map_tmp; + struct SM_RESOURCE_T *resource; + int ret = 0; +@@ -2261,7 +2261,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + + /* Action is a re-post of a previously interrupted action? */ + if (file_data->restart_sys == -EINTR) { +- VC_SM_ACTION_CLEAN_T action_clean; ++ struct vc_sm_action_clean_t action_clean; + + pr_debug("[%s]: clean up of action %u (trans_id: %u) following EINTR\n", + __func__, file_data->int_action, +@@ -3359,7 +3359,7 @@ static int bcm2835_vcsm_remove(struct platform_device *pdev) + + #if defined(__KERNEL__) + /* Allocate a shared memory handle and block. */ +-int vc_sm_alloc(VC_SM_ALLOC_T *alloc, int *handle) ++int vc_sm_alloc(struct vc_sm_alloc_t *alloc, int *handle) + { + struct vmcs_sm_ioctl_alloc ioparam = { 0 }; + int ret; + +From f9e9c821229711f4590f93592825948f39b24045 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 1 Sep 2017 16:29:53 +0100 +Subject: [PATCH 179/199] vcsm: Correct block comment style on licence headers. + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vc_sm_defs.h | 28 +++++++++++++++------------- + drivers/char/broadcom/vc_sm/vc_sm_knl.h | 28 +++++++++++++++------------- + drivers/char/broadcom/vc_sm/vc_vchi_sm.c | 28 +++++++++++++++------------- + drivers/char/broadcom/vc_sm/vc_vchi_sm.h | 28 +++++++++++++++------------- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 28 +++++++++++++++------------- + 5 files changed, 75 insertions(+), 65 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vc_sm_defs.h b/drivers/char/broadcom/vc_sm/vc_sm_defs.h +index 29057db43404716406b06e3c3745e3d82219be16..8242e8ef28e445ae132187d02c74448b0226c1a4 100644 +--- a/drivers/char/broadcom/vc_sm/vc_sm_defs.h ++++ b/drivers/char/broadcom/vc_sm/vc_sm_defs.h +@@ -1,16 +1,18 @@ +-/***************************************************************************** +-* Copyright 2011 Broadcom Corporation. All rights reserved. +-* +-* Unless you and Broadcom execute a separate written software license +-* agreement governing use of this software, this software is licensed to you +-* under the terms of the GNU General Public License version 2, available at +-* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). +-* +-* Notwithstanding the above, under no circumstances may you combine this +-* software in any way with any other Broadcom software provided under a +-* license other than the GPL, without Broadcom's express prior written +-* consent. +-*****************************************************************************/ ++/* ++ **************************************************************************** ++ * Copyright 2011 Broadcom Corporation. All rights reserved. ++ * ++ * Unless you and Broadcom execute a separate written software license ++ * agreement governing use of this software, this software is licensed to you ++ * under the terms of the GNU General Public License version 2, available at ++ * http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). ++ * ++ * Notwithstanding the above, under no circumstances may you combine this ++ * software in any way with any other Broadcom software provided under a ++ * license other than the GPL, without Broadcom's express prior written ++ * consent. ++ **************************************************************************** ++ */ + + #ifndef __VC_SM_DEFS_H__INCLUDED__ + #define __VC_SM_DEFS_H__INCLUDED__ +diff --git a/drivers/char/broadcom/vc_sm/vc_sm_knl.h b/drivers/char/broadcom/vc_sm/vc_sm_knl.h +index 3c684ddde5c1fac5c726a71deec305f7588f0200..8252d13999a78609fcc7e1bbe83307e2b1c1f8f1 100644 +--- a/drivers/char/broadcom/vc_sm/vc_sm_knl.h ++++ b/drivers/char/broadcom/vc_sm/vc_sm_knl.h +@@ -1,16 +1,18 @@ +-/***************************************************************************** +-* Copyright 2011 Broadcom Corporation. All rights reserved. +-* +-* Unless you and Broadcom execute a separate written software license +-* agreement governing use of this software, this software is licensed to you +-* under the terms of the GNU General Public License version 2, available at +-* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). +-* +-* Notwithstanding the above, under no circumstances may you combine this +-* software in any way with any other Broadcom software provided under a +-* license other than the GPL, without Broadcom's express prior written +-* consent. +-*****************************************************************************/ ++/* ++ **************************************************************************** ++ * Copyright 2011 Broadcom Corporation. All rights reserved. ++ * ++ * Unless you and Broadcom execute a separate written software license ++ * agreement governing use of this software, this software is licensed to you ++ * under the terms of the GNU General Public License version 2, available at ++ * http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). ++ * ++ * Notwithstanding the above, under no circumstances may you combine this ++ * software in any way with any other Broadcom software provided under a ++ * license other than the GPL, without Broadcom's express prior written ++ * consent. ++ **************************************************************************** ++ */ + + #ifndef __VC_SM_KNL_H__INCLUDED__ + #define __VC_SM_KNL_H__INCLUDED__ +diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c +index a702b0c16478c87e28be3905a14dcd992e6c05cb..76678b2f84eb541aa816531f222b5b10f4e25382 100644 +--- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c ++++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c +@@ -1,16 +1,18 @@ +-/***************************************************************************** +-* Copyright 2011-2012 Broadcom Corporation. All rights reserved. +-* +-* Unless you and Broadcom execute a separate written software license +-* agreement governing use of this software, this software is licensed to you +-* under the terms of the GNU General Public License version 2, available at +-* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). +-* +-* Notwithstanding the above, under no circumstances may you combine this +-* software in any way with any other Broadcom software provided under a +-* license other than the GPL, without Broadcom's express prior written +-* consent. +-*****************************************************************************/ ++/* ++ **************************************************************************** ++ * Copyright 2011-2012 Broadcom Corporation. All rights reserved. ++ * ++ * Unless you and Broadcom execute a separate written software license ++ * agreement governing use of this software, this software is licensed to you ++ * under the terms of the GNU General Public License version 2, available at ++ * http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). ++ * ++ * Notwithstanding the above, under no circumstances may you combine this ++ * software in any way with any other Broadcom software provided under a ++ * license other than the GPL, without Broadcom's express prior written ++ * consent. ++ **************************************************************************** ++ */ + + /* ---- Include Files ----------------------------------------------------- */ + #include +diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h +index f97cddf14881535c7f62a2ce0166a5eb7e3fad6d..110db20ef517af9589616e5892c5b48681e62966 100644 +--- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h ++++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h +@@ -1,16 +1,18 @@ +-/***************************************************************************** +-* Copyright 2011 Broadcom Corporation. All rights reserved. +-* +-* Unless you and Broadcom execute a separate written software license +-* agreement governing use of this software, this software is licensed to you +-* under the terms of the GNU General Public License version 2, available at +-* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). +-* +-* Notwithstanding the above, under no circumstances may you combine this +-* software in any way with any other Broadcom software provided under a +-* license other than the GPL, without Broadcom's express prior written +-* consent. +-*****************************************************************************/ ++/* ++ **************************************************************************** ++ * Copyright 2011 Broadcom Corporation. All rights reserved. ++ * ++ * Unless you and Broadcom execute a separate written software license ++ * agreement governing use of this software, this software is licensed to you ++ * under the terms of the GNU General Public License version 2, available at ++ * http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). ++ * ++ * Notwithstanding the above, under no circumstances may you combine this ++ * software in any way with any other Broadcom software provided under a ++ * license other than the GPL, without Broadcom's express prior written ++ * consent. ++ **************************************************************************** ++ */ + + #ifndef __VC_VCHI_SM_H__INCLUDED__ + #define __VC_VCHI_SM_H__INCLUDED__ +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index e67d96d54ad82bd51393268c830a51169f62b097..b121de3c2502e3d7fb6ef1c1b5e4d797d1f5d233 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -1,16 +1,18 @@ +-/***************************************************************************** +-* Copyright 2011-2012 Broadcom Corporation. All rights reserved. +-* +-* Unless you and Broadcom execute a separate written software license +-* agreement governing use of this software, this software is licensed to you +-* under the terms of the GNU General Public License version 2, available at +-* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). +-* +-* Notwithstanding the above, under no circumstances may you combine this +-* software in any way with any other Broadcom software provided under a +-* license other than the GPL, without Broadcom's express prior written +-* consent. +-*****************************************************************************/ ++/* ++ **************************************************************************** ++ * Copyright 2011-2012 Broadcom Corporation. All rights reserved. ++ * ++ * Unless you and Broadcom execute a separate written software license ++ * agreement governing use of this software, this software is licensed to you ++ * under the terms of the GNU General Public License version 2, available at ++ * http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). ++ * ++ * Notwithstanding the above, under no circumstances may you combine this ++ * software in any way with any other Broadcom software provided under a ++ * license other than the GPL, without Broadcom's express prior written ++ * consent. ++ **************************************************************************** ++ */ + + /* ---- Include Files ----------------------------------------------------- */ + + +From b891a362c3e1ea487b0561b4bfe0c21d44343337 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 1 Sep 2017 16:34:13 +0100 +Subject: [PATCH 180/199] vcsm: Fix block comment formatting + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vc_sm_defs.h | 6 ++++-- + drivers/char/broadcom/vc_sm/vc_vchi_sm.h | 10 +++++----- + 2 files changed, 9 insertions(+), 7 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vc_sm_defs.h b/drivers/char/broadcom/vc_sm/vc_sm_defs.h +index 8242e8ef28e445ae132187d02c74448b0226c1a4..de6afe9f65af45582c79a62abd41c688274ad8f2 100644 +--- a/drivers/char/broadcom/vc_sm/vc_sm_defs.h ++++ b/drivers/char/broadcom/vc_sm/vc_sm_defs.h +@@ -151,8 +151,10 @@ struct vc_sm_lock_result_t { + uint32_t res_handle; + /* Pointer to resource buffer */ + uint32_t res_mem; +- /* Pointer to former resource buffer if the memory +- * was reallocated */ ++ /* ++ * Pointer to former resource buffer if the memory ++ * was reallocated ++ */ + uint32_t res_old_mem; + + }; +diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h +index 110db20ef517af9589616e5892c5b48681e62966..48e721c7f2e4ac5abe376a8481e01b0bbcc6d3ad 100644 +--- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h ++++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h +@@ -23,7 +23,7 @@ + + /* + * Forward declare. +-*/ ++ */ + typedef struct sm_instance *VC_VCHI_SM_HANDLE_T; + + /* +@@ -57,7 +57,7 @@ int vc_vchi_sm_free(VC_VCHI_SM_HANDLE_T handle, + /* + * Ask the shared memory service to lock up some memory that was previously + * allocated by the vc_vchi_sm_alloc function call. +-*/ ++ */ + int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, + struct vc_sm_lock_unlock_t *lock_unlock, + struct vc_sm_lock_result_t *lock_result, +@@ -66,7 +66,7 @@ int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, + /* + * Ask the shared memory service to unlock some memory that was previously + * allocated by the vc_vchi_sm_alloc function call. +-*/ ++ */ + int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, + struct vc_sm_lock_unlock_t *lock_unlock, + uint32_t *trans_id, uint8_t wait_reply); +@@ -74,7 +74,7 @@ int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, + /* + * Ask the shared memory service to resize some memory that was previously + * allocated by the vc_vchi_sm_alloc function call. +-*/ ++ */ + int vc_vchi_sm_resize(VC_VCHI_SM_HANDLE_T handle, + struct vc_sm_resize_t *resize, uint32_t *trans_id); + +@@ -82,7 +82,7 @@ int vc_vchi_sm_resize(VC_VCHI_SM_HANDLE_T handle, + * Walk the allocated resources on the videocore side, the allocation will + * show up in the log. This is purely for debug/information and takes no + * specific actions. +-*/ ++ */ + int vc_vchi_sm_walk_alloc(VC_VCHI_SM_HANDLE_T handle); + + /* + +From 9cfc23038c5df5316a860ff911caafa0f9d407f7 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 1 Sep 2017 16:50:29 +0100 +Subject: [PATCH 181/199] vcsm: Remove typedef of VC_VCHI_SM_HANDLE_T + +Replaced with struct sm_instance *. + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vc_vchi_sm.c | 22 +++++++++++----------- + drivers/char/broadcom/vc_sm/vc_vchi_sm.h | 22 +++++++++++----------- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 2 +- + 3 files changed, 23 insertions(+), 23 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c +index 76678b2f84eb541aa816531f222b5b10f4e25382..cc1752e9d42ebd1785cbe7dc0607b7e9c03f49de 100644 +--- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c ++++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c +@@ -257,7 +257,7 @@ static void vc_sm_vchi_callback(void *param, + } + } + +-VC_VCHI_SM_HANDLE_T vc_vchi_sm_init(VCHI_INSTANCE_T vchi_instance, ++struct sm_instance *vc_vchi_sm_init(VCHI_INSTANCE_T vchi_instance, + VCHI_CONNECTION_T **vchi_connections, + uint32_t num_connections) + { +@@ -341,7 +341,7 @@ VC_VCHI_SM_HANDLE_T vc_vchi_sm_init(VCHI_INSTANCE_T vchi_instance, + return NULL; + } + +-int vc_vchi_sm_stop(VC_VCHI_SM_HANDLE_T *handle) ++int vc_vchi_sm_stop(struct sm_instance **handle) + { + struct sm_instance *instance; + uint32_t i; +@@ -375,7 +375,7 @@ int vc_vchi_sm_stop(VC_VCHI_SM_HANDLE_T *handle) + return -EINVAL; + } + +-int vc_vchi_sm_send_msg(VC_VCHI_SM_HANDLE_T handle, ++int vc_vchi_sm_send_msg(struct sm_instance *handle, + enum vc_sm_msg_type msg_id, + void *msg, uint32_t msg_size, + void *result, uint32_t result_size, +@@ -447,7 +447,7 @@ int vc_vchi_sm_send_msg(VC_VCHI_SM_HANDLE_T handle, + return status; + } + +-int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_alloc_t *msg, ++int vc_vchi_sm_alloc(struct sm_instance *handle, struct vc_sm_alloc_t *msg, + struct vc_sm_alloc_result_t *result, + uint32_t *cur_trans_id) + { +@@ -456,14 +456,14 @@ int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_alloc_t *msg, + cur_trans_id, 1); + } + +-int vc_vchi_sm_free(VC_VCHI_SM_HANDLE_T handle, ++int vc_vchi_sm_free(struct sm_instance *handle, + struct vc_sm_free_t *msg, uint32_t *cur_trans_id) + { + return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_FREE, + msg, sizeof(*msg), 0, 0, cur_trans_id, 0); + } + +-int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, ++int vc_vchi_sm_lock(struct sm_instance *handle, + struct vc_sm_lock_unlock_t *msg, + struct vc_sm_lock_result_t *result, + uint32_t *cur_trans_id) +@@ -473,7 +473,7 @@ int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, + cur_trans_id, 1); + } + +-int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, ++int vc_vchi_sm_unlock(struct sm_instance *handle, + struct vc_sm_lock_unlock_t *msg, + uint32_t *cur_trans_id, uint8_t wait_reply) + { +@@ -484,27 +484,27 @@ int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, + wait_reply); + } + +-int vc_vchi_sm_resize(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_resize_t *msg, ++int vc_vchi_sm_resize(struct sm_instance *handle, struct vc_sm_resize_t *msg, + uint32_t *cur_trans_id) + { + return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_RESIZE, + msg, sizeof(*msg), 0, 0, cur_trans_id, 1); + } + +-int vc_vchi_sm_walk_alloc(VC_VCHI_SM_HANDLE_T handle) ++int vc_vchi_sm_walk_alloc(struct sm_instance *handle) + { + return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_WALK_ALLOC, + 0, 0, 0, 0, 0, 0); + } + +-int vc_vchi_sm_clean_up(VC_VCHI_SM_HANDLE_T handle, ++int vc_vchi_sm_clean_up(struct sm_instance *handle, + struct vc_sm_action_clean_t *msg) + { + return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_ACTION_CLEAN, + msg, sizeof(*msg), 0, 0, 0, 0); + } + +-int vc_vchi_sm_import(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_import *msg, ++int vc_vchi_sm_import(struct sm_instance *handle, struct vc_sm_import *msg, + struct vc_sm_import_result *result, + uint32_t *cur_trans_id) + { +diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h +index 48e721c7f2e4ac5abe376a8481e01b0bbcc6d3ad..abe4ed15836f2be756083d3fdb4edb544dacc1a6 100644 +--- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h ++++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h +@@ -24,26 +24,26 @@ + /* + * Forward declare. + */ +-typedef struct sm_instance *VC_VCHI_SM_HANDLE_T; ++struct sm_instance; + + /* + * Initialize the shared memory service, opens up vchi connection to talk to it. + */ +-VC_VCHI_SM_HANDLE_T vc_vchi_sm_init(VCHI_INSTANCE_T vchi_instance, ++struct sm_instance *vc_vchi_sm_init(VCHI_INSTANCE_T vchi_instance, + VCHI_CONNECTION_T **vchi_connections, + uint32_t num_connections); + + /* + * Terminates the shared memory service. + */ +-int vc_vchi_sm_stop(VC_VCHI_SM_HANDLE_T *handle); ++int vc_vchi_sm_stop(struct sm_instance **handle); + + /* + * Ask the shared memory service to allocate some memory on videocre and + * return the result of this allocation (which upon success will be a pointer + * to some memory in videocore space). + */ +-int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_alloc_t *alloc, ++int vc_vchi_sm_alloc(struct sm_instance *handle, struct vc_sm_alloc_t *alloc, + struct vc_sm_alloc_result_t *alloc_result, + uint32_t *trans_id); + +@@ -51,14 +51,14 @@ int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_alloc_t *alloc, + * Ask the shared memory service to free up some memory that was previously + * allocated by the vc_vchi_sm_alloc function call. + */ +-int vc_vchi_sm_free(VC_VCHI_SM_HANDLE_T handle, ++int vc_vchi_sm_free(struct sm_instance *handle, + struct vc_sm_free_t *free, uint32_t *trans_id); + + /* + * Ask the shared memory service to lock up some memory that was previously + * allocated by the vc_vchi_sm_alloc function call. + */ +-int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, ++int vc_vchi_sm_lock(struct sm_instance *handle, + struct vc_sm_lock_unlock_t *lock_unlock, + struct vc_sm_lock_result_t *lock_result, + uint32_t *trans_id); +@@ -67,7 +67,7 @@ int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, + * Ask the shared memory service to unlock some memory that was previously + * allocated by the vc_vchi_sm_alloc function call. + */ +-int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, ++int vc_vchi_sm_unlock(struct sm_instance *handle, + struct vc_sm_lock_unlock_t *lock_unlock, + uint32_t *trans_id, uint8_t wait_reply); + +@@ -75,7 +75,7 @@ int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, + * Ask the shared memory service to resize some memory that was previously + * allocated by the vc_vchi_sm_alloc function call. + */ +-int vc_vchi_sm_resize(VC_VCHI_SM_HANDLE_T handle, ++int vc_vchi_sm_resize(struct sm_instance *handle, + struct vc_sm_resize_t *resize, uint32_t *trans_id); + + /* +@@ -83,19 +83,19 @@ int vc_vchi_sm_resize(VC_VCHI_SM_HANDLE_T handle, + * show up in the log. This is purely for debug/information and takes no + * specific actions. + */ +-int vc_vchi_sm_walk_alloc(VC_VCHI_SM_HANDLE_T handle); ++int vc_vchi_sm_walk_alloc(struct sm_instance *handle); + + /* + * Clean up following a previously interrupted action which left the system + * in a bad state of some sort. + */ +-int vc_vchi_sm_clean_up(VC_VCHI_SM_HANDLE_T handle, ++int vc_vchi_sm_clean_up(struct sm_instance *handle, + struct vc_sm_action_clean_t *action_clean); + + /* + * Import a contiguous block of memory and wrap it in a GPU MEM_HANDLE_T. + */ +-int vc_vchi_sm_import(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_import *msg, ++int vc_vchi_sm_import(struct sm_instance *handle, struct vc_sm_import *msg, + struct vc_sm_import_result *result, + uint32_t *cur_trans_id); + +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index b121de3c2502e3d7fb6ef1c1b5e4d797d1f5d233..8c13dab0f59c959226194214d36d9b5c8c6b1818 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -181,7 +181,7 @@ struct SM_PRIV_DATA_T { + */ + struct SM_STATE_T { + struct platform_device *pdev; +- VC_VCHI_SM_HANDLE_T sm_handle; /* Handle for videocore service. */ ++ struct sm_instance *sm_handle; /* Handle for videocore service. */ + struct dentry *dir_root; /* Debug fs entries root. */ + struct dentry *dir_alloc; /* Debug fs entries allocations. */ + struct SM_PDE_T dir_stats; /* Debug fs entries statistics sub-tree. */ + +From f790babcb244d493b2988b4d3528acc1232ce01d Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 1 Sep 2017 16:55:08 +0100 +Subject: [PATCH 182/199] vcsm: "unsigned int" preferred over "unsigned" fixed. + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vc_vchi_sm.c | 3 ++- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 2 +- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c +index cc1752e9d42ebd1785cbe7dc0607b7e9c03f49de..b9f65e34957506ba0f93d0d0ecd0894ee5be39b5 100644 +--- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c ++++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c +@@ -327,7 +327,8 @@ struct sm_instance *vc_vchi_sm_init(VCHI_INSTANCE_T vchi_instance, + set_user_nice(instance->io_thread, -10); + wake_up_process(instance->io_thread); + +- pr_debug("%s: success - instance 0x%x", __func__, (unsigned)instance); ++ pr_debug("%s: success - instance 0x%x", __func__, ++ (unsigned int)instance); + return instance; + + err_close_services: +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index 8c13dab0f59c959226194214d36d9b5c8c6b1818..8bea643957622cb19b9daac124447fe90558e47c 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -227,7 +227,7 @@ static const char *const sm_cache_map_vector[] = { + + /* ---- Private Functions ------------------------------------------------ */ + +-static inline unsigned vcaddr_to_pfn(unsigned long vc_addr) ++static inline unsigned int vcaddr_to_pfn(unsigned long vc_addr) + { + unsigned long pfn = vc_addr & 0x3FFFFFFF; + pfn += mm_vc_mem_phys_addr; + +From a7348ba2deb173782cb1d132ef88fb7773bbfc04 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 1 Sep 2017 16:59:49 +0100 +Subject: [PATCH 183/199] vcsm: Fix blank lines after declarations. + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vc_vchi_sm.c | 1 + + drivers/char/broadcom/vc_sm/vmcs_sm.c | 7 +++++++ + 2 files changed, 8 insertions(+) + +diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c +index b9f65e34957506ba0f93d0d0ecd0894ee5be39b5..f8b909a09adb0743ed5d55dadf8fbf2fef055197 100644 +--- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c ++++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c +@@ -362,6 +362,7 @@ int vc_vchi_sm_stop(struct sm_instance **handle) + /* Close all VCHI service connections */ + for (i = 0; i < instance->num_connections; i++) { + int32_t success; ++ + vchi_service_use(instance->vchi_handle[i]); + + success = vchi_service_close(instance->vchi_handle[i]); +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index 8bea643957622cb19b9daac124447fe90558e47c..abee526d6fbbddb8c31096cafdcd69814590d750 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -230,6 +230,7 @@ static const char *const sm_cache_map_vector[] = { + static inline unsigned int vcaddr_to_pfn(unsigned long vc_addr) + { + unsigned long pfn = vc_addr & 0x3FFFFFFF; ++ + pfn += mm_vc_mem_phys_addr; + pfn >>= PAGE_SHIFT; + return pfn; +@@ -1441,9 +1442,11 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) + if (resource->map) { + /* We don't use vmf->pgoff since that has the fake offset */ + unsigned long addr; ++ + for (addr = vma->vm_start; addr < vma->vm_end; addr += PAGE_SIZE) { + /* Finally, remap it */ + unsigned long pfn = (unsigned long)resource->res_base_mem & 0x3FFFFFFF; ++ + pfn += mm_vc_mem_phys_addr; + pfn += addr - vma->vm_start; + pfn >>= PAGE_SHIFT; +@@ -1974,6 +1977,7 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, + /* Flush if requested */ + if (resource->res_cached && flush) { + dma_addr_t phys_addr = 0; ++ + resource->res_stats[FLUSH]++; + + phys_addr = +@@ -1988,6 +1992,7 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, + if (map->vma) { + unsigned long start; + unsigned long end; ++ + start = map->vma->vm_start; + end = map->vma->vm_end; + +@@ -3022,6 +3027,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + if ((resource != NULL) && resource->res_cached) { + unsigned long base = ioparam.s[i].addr & ~(PAGE_SIZE-1); + unsigned long end = (ioparam.s[i].addr + ioparam.s[i].size + PAGE_SIZE-1) & ~(PAGE_SIZE-1); ++ + resource->res_stats[ioparam.s[i].cmd == 1 ? INVALID:FLUSH]++; + + /* L1/L2 cache flush */ +@@ -3071,6 +3077,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + + for (i=0; iblock_count; ++j) { + + + +From 5b9dcc594c4c11855547e61b9ab1a97a85962b9a Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 1 Sep 2017 17:01:11 +0100 +Subject: [PATCH 184/199] vcsm: Fix erroneous space in 'if' statement. + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index abee526d6fbbddb8c31096cafdcd69814590d750..6d4729980ebf7dd7b76444dcabf3c85477b51fd4 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -1476,7 +1476,7 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, + bool map = false; + + /* flag to requst buffer is mapped up front, rather than lazily */ +- if (cached & 0x80 ) { ++ if (cached & 0x80) { + map = true; + cached &= ~0x80; + } + +From f42f0921569abb774b3d3b0afade8fc9502d7891 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 1 Sep 2017 17:21:09 +0100 +Subject: [PATCH 185/199] vcsm: Fix lots of block quote formatting issues + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 563 ++++++++++++++-------------------- + 1 file changed, 231 insertions(+), 332 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index 6d4729980ebf7dd7b76444dcabf3c85477b51fd4..f93f18d3c24e43c9cf79e33f11cba9d1806f3124 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -61,8 +61,7 @@ + #define VC_SM_DEBUG "debug" + #define VC_SM_WRITE_BUF_SIZE 128 + +-/* Statistics tracked per resource and globally. +-*/ ++/* Statistics tracked per resource and globally. */ + enum SM_STATS_T { + /* Attempt. */ + ALLOC, +@@ -109,27 +108,25 @@ struct SM_PDE_T { + + }; + +-/* Single resource allocation tracked for all devices. +-*/ ++/* Single resource allocation tracked for all devices. */ + struct sm_mmap { + struct list_head map_list; /* Linked list of maps. */ + + struct SM_RESOURCE_T *resource; /* Pointer to the resource. */ + +- pid_t res_pid; /* PID owning that resource. */ ++ pid_t res_pid; /* PID owning that resource. */ + unsigned int res_vc_hdl; /* Resource handle (videocore). */ + unsigned int res_usr_hdl; /* Resource handle (user). */ + + long unsigned int res_addr; /* Mapped virtual address. */ + struct vm_area_struct *vma; /* VM area for this mapping. */ +- unsigned int ref_count; /* Reference count to this vma. */ ++ unsigned int ref_count; /* Reference count to this vma. */ + + /* Used to link maps associated with a resource. */ + struct list_head resource_map_list; + }; + +-/* Single resource allocation tracked for each opened device. +-*/ ++/* Single resource allocation tracked for each opened device. */ + struct SM_RESOURCE_T { + struct list_head resource_list; /* List of resources. */ + struct list_head global_resource_list; /* Global list of resources. */ +@@ -160,8 +157,7 @@ struct SM_RESOURCE_T { + bool map; /* whether to map pages up front */ + }; + +-/* Private file data associated with each opened device. +-*/ ++/* Private file data associated with each opened device. */ + struct SM_PRIV_DATA_T { + struct list_head resource_list; /* List of resources. */ + +@@ -177,8 +173,7 @@ struct SM_PRIV_DATA_T { + + }; + +-/* Global state information. +-*/ ++/* Global state information. */ + struct SM_STATE_T { + struct platform_device *pdev; + struct sm_instance *sm_handle; /* Handle for videocore service. */ +@@ -236,9 +231,10 @@ static inline unsigned int vcaddr_to_pfn(unsigned long vc_addr) + return pfn; + } + +-/* Carries over to the state statistics the statistics once owned by a deceased +-** resource. +-*/ ++/* ++ * Carries over to the state statistics the statistics once owned by a deceased ++ * resource. ++ */ + static void vc_sm_resource_deceased(struct SM_RESOURCE_T *p_res, int terminated) + { + if (sm_state != NULL) { +@@ -262,9 +258,10 @@ static void vc_sm_resource_deceased(struct SM_RESOURCE_T *p_res, int terminated) + } + } + +-/* Fetch a videocore handle corresponding to a mapping of the pid+address +-** returns 0 (ie NULL) if no such handle exists in the global map. +-*/ ++/* ++ * Fetch a videocore handle corresponding to a mapping of the pid+address ++ * returns 0 (ie NULL) if no such handle exists in the global map. ++ */ + static unsigned int vmcs_sm_vc_handle_from_pid_and_address(unsigned int pid, + unsigned int addr) + { +@@ -276,8 +273,7 @@ static unsigned int vmcs_sm_vc_handle_from_pid_and_address(unsigned int pid, + + mutex_lock(&(sm_state->map_lock)); + +- /* Lookup the resource. +- */ ++ /* Lookup the resource. */ + if (!list_empty(&sm_state->map_list)) { + list_for_each_entry(map, &sm_state->map_list, map_list) { + if (map->res_pid != pid || map->res_addr != addr) +@@ -295,13 +291,14 @@ static unsigned int vmcs_sm_vc_handle_from_pid_and_address(unsigned int pid, + mutex_unlock(&(sm_state->map_lock)); + + out: +- /* Use a debug log here as it may be a valid situation that we query +- ** for something that is not mapped, we do not want a kernel log each +- ** time around. +- ** +- ** There are other error log that would pop up accordingly if someone +- ** subsequently tries to use something invalid after being told not to +- ** use it... ++ /* ++ * Use a debug log here as it may be a valid situation that we query ++ * for something that is not mapped, we do not want a kernel log each ++ * time around. ++ * ++ * There are other error log that would pop up accordingly if someone ++ * subsequently tries to use something invalid after being told not to ++ * use it... + */ + if (handle == 0) { + pr_debug("[%s]: not a valid map (pid %u, addr %x)\n", +@@ -311,9 +308,10 @@ static unsigned int vmcs_sm_vc_handle_from_pid_and_address(unsigned int pid, + return handle; + } + +-/* Fetch a user handle corresponding to a mapping of the pid+address +-** returns 0 (ie NULL) if no such handle exists in the global map. +-*/ ++/* ++ * Fetch a user handle corresponding to a mapping of the pid+address ++ * returns 0 (ie NULL) if no such handle exists in the global map. ++ */ + static unsigned int vmcs_sm_usr_handle_from_pid_and_address(unsigned int pid, + unsigned int addr) + { +@@ -325,8 +323,7 @@ static unsigned int vmcs_sm_usr_handle_from_pid_and_address(unsigned int pid, + + mutex_lock(&(sm_state->map_lock)); + +- /* Lookup the resource. +- */ ++ /* Lookup the resource. */ + if (!list_empty(&sm_state->map_list)) { + list_for_each_entry(map, &sm_state->map_list, map_list) { + if (map->res_pid != pid || map->res_addr != addr) +@@ -344,7 +341,8 @@ static unsigned int vmcs_sm_usr_handle_from_pid_and_address(unsigned int pid, + mutex_unlock(&(sm_state->map_lock)); + + out: +- /* Use a debug log here as it may be a valid situation that we query ++ /* ++ * Use a debug log here as it may be a valid situation that we query + * for something that is not mapped yet. + * + * There are other error log that would pop up accordingly if someone +@@ -359,9 +357,10 @@ static unsigned int vmcs_sm_usr_handle_from_pid_and_address(unsigned int pid, + } + + #if defined(DO_NOT_USE) +-/* Fetch an address corresponding to a mapping of the pid+handle +-** returns 0 (ie NULL) if no such address exists in the global map. +-*/ ++/* ++ * Fetch an address corresponding to a mapping of the pid+handle ++ * returns 0 (ie NULL) if no such address exists in the global map. ++ */ + static unsigned int vmcs_sm_usr_address_from_pid_and_vc_handle(unsigned int pid, + unsigned int hdl) + { +@@ -373,8 +372,7 @@ static unsigned int vmcs_sm_usr_address_from_pid_and_vc_handle(unsigned int pid, + + mutex_lock(&(sm_state->map_lock)); + +- /* Lookup the resource. +- */ ++ /* Lookup the resource. */ + if (!list_empty(&sm_state->map_list)) { + list_for_each_entry(map, &sm_state->map_list, map_list) { + if (map->res_pid != pid || map->res_vc_hdl != hdl) +@@ -392,13 +390,14 @@ static unsigned int vmcs_sm_usr_address_from_pid_and_vc_handle(unsigned int pid, + mutex_unlock(&(sm_state->map_lock)); + + out: +- /* Use a debug log here as it may be a valid situation that we query +- ** for something that is not mapped, we do not want a kernel log each +- ** time around. +- ** +- ** There are other error log that would pop up accordingly if someone +- ** subsequently tries to use something invalid after being told not to +- ** use it... ++ /* ++ * Use a debug log here as it may be a valid situation that we query ++ * for something that is not mapped, we do not want a kernel log each ++ * time around. ++ * ++ * There are other error log that would pop up accordingly if someone ++ * subsequently tries to use something invalid after being told not to ++ * use it... + */ + if (addr == 0) + pr_debug("[%s]: not a valid map (pid %u, hdl %x)\n", +@@ -408,9 +407,10 @@ static unsigned int vmcs_sm_usr_address_from_pid_and_vc_handle(unsigned int pid, + } + #endif + +-/* Fetch an address corresponding to a mapping of the pid+handle +-** returns 0 (ie NULL) if no such address exists in the global map. +-*/ ++/* ++ * Fetch an address corresponding to a mapping of the pid+handle ++ * returns 0 (ie NULL) if no such address exists in the global map. ++ */ + static unsigned int vmcs_sm_usr_address_from_pid_and_usr_handle(unsigned int + pid, + unsigned int +@@ -424,8 +424,7 @@ static unsigned int vmcs_sm_usr_address_from_pid_and_usr_handle(unsigned int + + mutex_lock(&(sm_state->map_lock)); + +- /* Lookup the resource. +- */ ++ /* Lookup the resource. */ + if (!list_empty(&sm_state->map_list)) { + list_for_each_entry(map, &sm_state->map_list, map_list) { + if (map->res_pid != pid || map->res_usr_hdl != hdl) +@@ -443,7 +442,8 @@ static unsigned int vmcs_sm_usr_address_from_pid_and_usr_handle(unsigned int + mutex_unlock(&(sm_state->map_lock)); + + out: +- /* Use a debug log here as it may be a valid situation that we query ++ /* ++ * Use a debug log here as it may be a valid situation that we query + * for something that is not mapped, we do not want a kernel log each + * time around. + * +@@ -458,19 +458,16 @@ static unsigned int vmcs_sm_usr_address_from_pid_and_usr_handle(unsigned int + return addr; + } + +-/* Adds a resource mapping to the global data list. +-*/ ++/* Adds a resource mapping to the global data list. */ + static void vmcs_sm_add_map(struct SM_STATE_T *state, + struct SM_RESOURCE_T *resource, struct sm_mmap *map) + { + mutex_lock(&(state->map_lock)); + +- /* Add to the global list of mappings +- */ ++ /* Add to the global list of mappings */ + list_add(&map->map_list, &state->map_list); + +- /* Add to the list of mappings for this resource +- */ ++ /* Add to the list of mappings for this resource */ + list_add(&map->resource_map_list, &resource->map_list); + resource->map_count++; + +@@ -481,20 +478,17 @@ static void vmcs_sm_add_map(struct SM_STATE_T *state, + map->res_usr_hdl, map->res_addr); + } + +-/* Removes a resource mapping from the global data list. +-*/ ++/* Removes a resource mapping from the global data list. */ + static void vmcs_sm_remove_map(struct SM_STATE_T *state, + struct SM_RESOURCE_T *resource, + struct sm_mmap *map) + { + mutex_lock(&(state->map_lock)); + +- /* Remove from the global list of mappings +- */ ++ /* Remove from the global list of mappings */ + list_del(&map->map_list); + +- /* Remove from the list of mapping for this resource +- */ ++ /* Remove from the list of mapping for this resource */ + list_del(&map->resource_map_list); + if (resource->map_count > 0) + resource->map_count--; +@@ -508,8 +502,7 @@ static void vmcs_sm_remove_map(struct SM_STATE_T *state, + kfree(map); + } + +-/* Read callback for the global state proc entry. +-*/ ++/* Read callback for the global state proc entry. */ + static int vc_sm_global_state_show(struct seq_file *s, void *v) + { + struct sm_mmap *map = NULL; +@@ -523,8 +516,7 @@ static int vc_sm_global_state_show(struct seq_file *s, void *v) + seq_printf(s, "\nVC-ServiceHandle 0x%x\n", + (unsigned int)sm_state->sm_handle); + +- /* Log all applicable mapping(s). +- */ ++ /* Log all applicable mapping(s). */ + + mutex_lock(&(sm_state->map_lock)); + seq_puts(s, "\nResources\n"); +@@ -591,8 +583,7 @@ static int vc_sm_global_statistics_show(struct seq_file *s, void *v) + { + int ix; + +- /* Global state tracked statistics. +- */ ++ /* Global state tracked statistics. */ + if (sm_state != NULL) { + seq_puts(s, "\nDeceased Resources Statistics\n"); + +@@ -638,8 +629,7 @@ static int vc_sm_global_statistics_show(struct seq_file *s, void *v) + } + + #if 0 +-/* Read callback for the statistics proc entry. +-*/ ++/* Read callback for the statistics proc entry. */ + static int vc_sm_statistics_show(struct seq_file *s, void *v) + { + int ix; +@@ -654,8 +644,7 @@ static int vc_sm_statistics_show(struct seq_file *s, void *v) + if (file_data == NULL) + return 0; + +- /* Per process statistics. +- */ ++ /* Per process statistics. */ + + seq_printf(s, "\nStatistics for TGID %d\n", file_data->pid); + +@@ -771,9 +760,10 @@ static const struct file_operations vc_sm_debug_fs_fops = { + .release = single_release, + }; + +-/* Adds a resource to the private data list which tracks all the allocated +-** data. +-*/ ++/* ++ * Adds a resource to the private data list which tracks all the allocated ++ * data. ++ */ + static void vmcs_sm_add_resource(struct SM_PRIV_DATA_T *privdata, + struct SM_RESOURCE_T *resource) + { +@@ -787,9 +777,10 @@ static void vmcs_sm_add_resource(struct SM_PRIV_DATA_T *privdata, + resource->res_handle, resource->res_size, resource->res_cached); + } + +-/* Locates a resource and acquire a reference on it. +-** The resource won't be deleted while there is a reference on it. +-*/ ++/* ++ * Locates a resource and acquire a reference on it. ++ * The resource won't be deleted while there is a reference on it. ++ */ + static struct SM_RESOURCE_T *vmcs_sm_acquire_resource(struct SM_PRIV_DATA_T + *private, + unsigned int res_guid) +@@ -816,9 +807,10 @@ static struct SM_RESOURCE_T *vmcs_sm_acquire_resource(struct SM_PRIV_DATA_T + return ret; + } + +-/* Locates a resource and acquire a reference on it. +-** The resource won't be deleted while there is a reference on it. +-*/ ++/* ++ * Locates a resource and acquire a reference on it. ++ * The resource won't be deleted while there is a reference on it. ++ */ + static struct SM_RESOURCE_T *vmcs_sm_acquire_first_resource( + struct SM_PRIV_DATA_T *private) + { +@@ -841,9 +833,10 @@ static struct SM_RESOURCE_T *vmcs_sm_acquire_first_resource( + return ret; + } + +-/* Locates a resource and acquire a reference on it. +-** The resource won't be deleted while there is a reference on it. +-*/ ++/* ++ * Locates a resource and acquire a reference on it. ++ * The resource won't be deleted while there is a reference on it. ++ */ + static struct SM_RESOURCE_T *vmcs_sm_acquire_global_resource(unsigned int + res_guid) + { +@@ -870,9 +863,10 @@ static struct SM_RESOURCE_T *vmcs_sm_acquire_global_resource(unsigned int + return ret; + } + +-/* Release a previously acquired resource. +-** The resource will be deleted when its refcount reaches 0. +-*/ ++/* ++ * Release a previously acquired resource. ++ * The resource will be deleted when its refcount reaches 0. ++ */ + static void vmcs_sm_release_resource(struct SM_RESOURCE_T *resource, int force) + { + struct SM_PRIV_DATA_T *private = resource->private; +@@ -961,16 +955,16 @@ static void vmcs_sm_release_resource(struct SM_RESOURCE_T *resource, int force) + kfree(resource); + } + +-/* Dump the map table for the driver. If process is -1, dumps the whole table, +-** if process is a valid pid (non -1) dump only the entries associated with the +-** pid of interest. +-*/ ++/* ++ * Dump the map table for the driver. If process is -1, dumps the whole table, ++ * if process is a valid pid (non -1) dump only the entries associated with the ++ * pid of interest. ++ */ + static void vmcs_sm_host_walk_map_per_pid(int pid) + { + struct sm_mmap *map = NULL; + +- /* Make sure the device was started properly. +- */ ++ /* Make sure the device was started properly. */ + if (sm_state == NULL) { + pr_err("[%s]: invalid device\n", __func__); + return; +@@ -978,8 +972,7 @@ static void vmcs_sm_host_walk_map_per_pid(int pid) + + mutex_lock(&(sm_state->map_lock)); + +- /* Log all applicable mapping(s). +- */ ++ /* Log all applicable mapping(s). */ + if (!list_empty(&sm_state->map_list)) { + list_for_each_entry(map, &sm_state->map_list, map_list) { + if (pid == -1 || map->res_pid == pid) { +@@ -995,15 +988,15 @@ static void vmcs_sm_host_walk_map_per_pid(int pid) + return; + } + +-/* Dump the allocation table from host side point of view. This only dumps the +-** data allocated for this process/device referenced by the file_data. +-*/ ++/* ++ * Dump the allocation table from host side point of view. This only dumps the ++ * data allocated for this process/device referenced by the file_data. ++ */ + static void vmcs_sm_host_walk_alloc(struct SM_PRIV_DATA_T *file_data) + { + struct SM_RESOURCE_T *resource = NULL; + +- /* Make sure the device was started properly. +- */ ++ /* Make sure the device was started properly. */ + if ((sm_state == NULL) || (file_data == NULL)) { + pr_err("[%s]: invalid device\n", __func__); + return; +@@ -1026,8 +1019,7 @@ static void vmcs_sm_host_walk_alloc(struct SM_PRIV_DATA_T *file_data) + return; + } + +-/* Create support for private data tracking. +-*/ ++/* Create support for private data tracking. */ + static struct SM_PRIV_DATA_T *vc_sm_create_priv_data(pid_t id) + { + char alloc_name[32]; +@@ -1078,15 +1070,15 @@ static struct SM_PRIV_DATA_T *vc_sm_create_priv_data(pid_t id) + return file_data; + } + +-/* Open the device. Creates a private state to help track all allocation +-** associated with this device. +-*/ ++/* ++ * Open the device. Creates a private state to help track all allocation ++ * associated with this device. ++ */ + static int vc_sm_open(struct inode *inode, struct file *file) + { + int ret = 0; + +- /* Make sure the device was started properly. +- */ ++ /* Make sure the device was started properly. */ + if (!sm_state) { + pr_err("[%s]: invalid device\n", __func__); + ret = -EPERM; +@@ -1105,9 +1097,10 @@ static int vc_sm_open(struct inode *inode, struct file *file) + return ret; + } + +-/* Close the device. Free up all resources still associated with this device +-** at the time. +-*/ ++/* ++ * Close the device. Free up all resources still associated with this device ++ * at the time. ++ */ + static int vc_sm_release(struct inode *inode, struct file *file) + { + struct SM_PRIV_DATA_T *file_data = +@@ -1115,8 +1108,7 @@ static int vc_sm_release(struct inode *inode, struct file *file) + struct SM_RESOURCE_T *resource; + int ret = 0; + +- /* Make sure the device was started properly. +- */ ++ /* Make sure the device was started properly. */ + if (sm_state == NULL || file_data == NULL) { + pr_err("[%s]: invalid device\n", __func__); + ret = -EPERM; +@@ -1146,8 +1138,7 @@ static int vc_sm_release(struct inode *inode, struct file *file) + /* Remove the corresponding proc entry. */ + debugfs_remove_recursive(file_data->dir_pid); + +- /* Terminate the private data. +- */ ++ /* Terminate the private data. */ + kfree(file_data); + + out: +@@ -1175,8 +1166,7 @@ static void vcsm_vma_close(struct vm_area_struct *vma) + + map->ref_count--; + +- /* Remove from the map table. +- */ ++ /* Remove from the map table. */ + if (map->ref_count == 0) + vmcs_sm_remove_map(sm_state, map->resource, map); + } +@@ -1189,8 +1179,7 @@ static int vcsm_vma_fault(struct vm_fault *vmf) + unsigned long pfn; + int ret = 0; + +- /* Lock the resource if necessary. +- */ ++ /* Lock the resource if necessary. */ + if (!resource->lock_count) { + struct vc_sm_lock_unlock_t lock_unlock; + struct vc_sm_lock_result_t lock_result; +@@ -1203,8 +1192,7 @@ static int vcsm_vma_fault(struct vm_fault *vmf) + __func__, lock_unlock.res_handle, + (void *)lock_unlock.res_mem); + +- /* Lock the videocore allocated resource. +- */ ++ /* Lock the videocore allocated resource. */ + status = vc_vchi_sm_lock(sm_state->sm_handle, + &lock_unlock, &lock_result, 0); + if (status || !lock_result.res_mem) { +@@ -1221,8 +1209,7 @@ static int vcsm_vma_fault(struct vm_fault *vmf) + resource->res_stats[LOCK]++; + resource->lock_count++; + +- /* Keep track of the new base memory. +- */ ++ /* Keep track of the new base memory. */ + if (lock_result.res_mem && + lock_result.res_old_mem && + (lock_result.res_mem != lock_result.res_old_mem)) { +@@ -1244,9 +1231,9 @@ static int vcsm_vma_fault(struct vm_fault *vmf) + case 0: + case -ERESTARTSYS: + /* +- * EBUSY is ok: this just means that another thread +- * already did the job. +- */ ++ * EBUSY is ok: this just means that another thread ++ * already did the job. ++ */ + case -EBUSY: + return VM_FAULT_NOPAGE; + case -ENOMEM: +@@ -1324,8 +1311,7 @@ static void vcsm_vma_cache_clean_page_range(unsigned long addr, + } while (pgd++, addr = pgd_next, addr != end); + } + +-/* Map an allocated data into something that the user space. +-*/ ++/* Map an allocated data into something that the user space. */ + static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) + { + int ret = 0; +@@ -1334,8 +1320,7 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) + struct SM_RESOURCE_T *resource = NULL; + struct sm_mmap *map = NULL; + +- /* Make sure the device was started properly. +- */ ++ /* Make sure the device was started properly. */ + if ((sm_state == NULL) || (file_data == NULL)) { + pr_err("[%s]: invalid device\n", __func__); + return -EPERM; +@@ -1344,11 +1329,12 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) + pr_debug("[%s]: private data %p, guid %x\n", __func__, file_data, + ((unsigned int)vma->vm_pgoff << PAGE_SHIFT)); + +- /* We lookup to make sure that the data we are being asked to mmap is +- ** something that we allocated. +- ** +- ** We use the offset information as the key to tell us which resource +- ** we are mapping. ++ /* ++ * We lookup to make sure that the data we are being asked to mmap is ++ * something that we allocated. ++ * ++ * We use the offset information as the key to tell us which resource ++ * we are mapping. + */ + resource = vmcs_sm_acquire_resource(file_data, + ((unsigned int)vma->vm_pgoff << +@@ -1363,8 +1349,7 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) + __func__, resource->res_guid, current->tgid, resource->pid, + file_data->pid); + +- /* Check permissions. +- */ ++ /* Check permissions. */ + if (resource->pid && (resource->pid != current->tgid)) { + pr_err("[%s]: current tgid %u != %u owner\n", + __func__, current->tgid, resource->pid); +@@ -1372,8 +1357,7 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) + goto error; + } + +- /* Verify that what we are asked to mmap is proper. +- */ ++ /* Verify that what we are asked to mmap is proper. */ + if (resource->res_size != (unsigned int)(vma->vm_end - vma->vm_start)) { + pr_err("[%s]: size inconsistency (resource: %u - mmap: %u)\n", + __func__, +@@ -1384,7 +1368,8 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) + goto error; + } + +- /* Keep track of the tuple in the global resource list such that one ++ /* ++ * Keep track of the tuple in the global resource list such that one + * can do a mapping lookup for address/memory handle. + */ + map = kzalloc(sizeof(*map), GFP_KERNEL); +@@ -1403,8 +1388,9 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) + map->vma = vma; + vmcs_sm_add_map(sm_state, resource, map); + +- /* We are not actually mapping the pages, we just provide a fault +- ** handler to allow pages to be mapped when accessed ++ /* ++ * We are not actually mapping the pages, we just provide a fault ++ * handler to allow pages to be mapped when accessed + */ + vma->vm_flags |= + VM_IO | VM_PFNMAP | VM_DONTCOPY | VM_DONTEXPAND; +@@ -1418,8 +1404,7 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) + + if ((resource->res_cached == VMCS_SM_CACHE_NONE) || + (resource->res_cached == VMCS_SM_CACHE_VC)) { +- /* Allocated non host cached memory, honour it. +- */ ++ /* Allocated non host cached memory, honour it. */ + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); + } + +@@ -1462,8 +1447,7 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) + return ret; + } + +-/* Allocate a shared memory handle and block. +-*/ ++/* Allocate a shared memory handle and block. */ + int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, + struct vmcs_sm_ioctl_alloc *ioparam) + { +@@ -1505,8 +1489,7 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, + __func__, alloc.name, alloc.type, ioparam->size, + alloc.base_unit, alloc.num_unit, alloc.alignement); + +- /* Allocate local resource to track this allocation. +- */ ++ /* Allocate local resource to track this allocation. */ + resource = kzalloc(sizeof(*resource), GFP_KERNEL); + if (!resource) { + ret = -ENOMEM; +@@ -1516,8 +1499,7 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, + resource->ref_count++; + resource->pid = current->tgid; + +- /* Allocate the videocore resource. +- */ ++ /* Allocate the videocore resource. */ + status = vc_vchi_sm_alloc(sm_state->sm_handle, &alloc, &result, + &private->int_trans_id); + if (status == -EINTR) { +@@ -1535,8 +1517,7 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, + goto error; + } + +- /* Keep track of the resource we created. +- */ ++ /* Keep track of the resource we created. */ + resource->private = private; + resource->res_handle = result.res_handle; + resource->res_base_mem = (void *)result.res_mem; +@@ -1544,7 +1525,8 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, + resource->res_cached = cached; + resource->map = map; + +- /* Kernel/user GUID. This global identifier is used for mmap'ing the ++ /* ++ * Kernel/user GUID. This global identifier is used for mmap'ing the + * allocated region from user space, it is passed as the mmap'ing + * offset, we use it to 'hide' the videocore handle/address. + */ +@@ -1576,8 +1558,7 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, + return ret; + } + +-/* Share an allocate memory handle and block. +-*/ ++/* Share an allocate memory handle and block.*/ + int vc_sm_ioctl_alloc_share(struct SM_PRIV_DATA_T *private, + struct vmcs_sm_ioctl_alloc_share *ioparam) + { +@@ -1593,8 +1574,7 @@ int vc_sm_ioctl_alloc_share(struct SM_PRIV_DATA_T *private, + goto error; + } + +- /* Allocate local resource to track this allocation. +- */ ++ /* Allocate local resource to track this allocation. */ + resource = kzalloc(sizeof(*resource), GFP_KERNEL); + if (resource == NULL) { + pr_err("[%s]: failed to allocate local tracking resource\n", +@@ -1606,8 +1586,7 @@ int vc_sm_ioctl_alloc_share(struct SM_PRIV_DATA_T *private, + resource->ref_count++; + resource->pid = current->tgid; + +- /* Keep track of the resource we created. +- */ ++ /* Keep track of the resource we created. */ + resource->private = private; + resource->res_handle = shared_resource->res_handle; + resource->res_base_mem = shared_resource->res_base_mem; +@@ -1641,8 +1620,7 @@ int vc_sm_ioctl_alloc_share(struct SM_PRIV_DATA_T *private, + return ret; + } + +-/* Free a previously allocated shared memory handle and block. +-*/ ++/* Free a previously allocated shared memory handle and block.*/ + static int vc_sm_ioctl_free(struct SM_PRIV_DATA_T *private, + struct vmcs_sm_ioctl_free *ioparam) + { +@@ -1655,8 +1633,7 @@ static int vc_sm_ioctl_free(struct SM_PRIV_DATA_T *private, + return -EINVAL; + } + +- /* Check permissions. +- */ ++ /* Check permissions. */ + if (resource->pid && (resource->pid != current->tgid)) { + pr_err("[%s]: current tgid %u != %u owner\n", + __func__, current->tgid, resource->pid); +@@ -1669,8 +1646,7 @@ static int vc_sm_ioctl_free(struct SM_PRIV_DATA_T *private, + return 0; + } + +-/* Resize a previously allocated shared memory handle and block. +-*/ ++/* Resize a previously allocated shared memory handle and block. */ + static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, + struct vmcs_sm_ioctl_resize *ioparam) + { +@@ -1679,8 +1655,7 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, + struct vc_sm_resize_t resize; + struct SM_RESOURCE_T *resource; + +- /* Locate resource from GUID. +- */ ++ /* Locate resource from GUID. */ + resource = vmcs_sm_acquire_resource(private, ioparam->handle); + if (!resource) { + pr_err("[%s]: failed resource - guid %x\n", +@@ -1689,9 +1664,10 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, + goto error; + } + +- /* If the resource is locked, its reference count will be not NULL, +- ** in which case we will not be allowed to resize it anyways, so +- ** reject the attempt here. ++ /* ++ * If the resource is locked, its reference count will be not NULL, ++ * in which case we will not be allowed to resize it anyways, so ++ * reject the attempt here. + */ + if (resource->lock_count != 0) { + pr_err("[%s]: cannot resize - guid %x, ref-cnt %d\n", +@@ -1700,8 +1676,7 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, + goto error; + } + +- /* Check permissions. +- */ ++ /* Check permissions. */ + if (resource->pid && (resource->pid != current->tgid)) { + pr_err("[%s]: current tgid %u != %u owner\n", __func__, + current->tgid, resource->pid); +@@ -1724,8 +1699,7 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, + __func__, ioparam->handle, resize.res_handle, + (void *)resize.res_mem); + +- /* Resize the videocore allocated resource. +- */ ++ /* Resize the videocore allocated resource. */ + status = vc_vchi_sm_resize(sm_state->sm_handle, &resize, + &private->int_trans_id); + if (status == -EINTR) { +@@ -1746,8 +1720,7 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, + __func__, resize.res_handle, resource->res_size, + resize.res_new_size); + +- /* Successfully resized, save the information and inform the user. +- */ ++ /* Successfully resized, save the information and inform the user. */ + ioparam->old_size = resource->res_size; + resource->res_size = resize.res_new_size; + +@@ -1758,8 +1731,7 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, + return ret; + } + +-/* Lock a previously allocated shared memory handle and block. +-*/ ++/* Lock a previously allocated shared memory handle and block. */ + static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, + struct vmcs_sm_ioctl_lock_unlock *ioparam, + int change_cache, enum vmcs_sm_cache_e cache_type, +@@ -1775,16 +1747,14 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, + + map = NULL; + +- /* Locate resource from GUID. +- */ ++ /* Locate resource from GUID. */ + resource = vmcs_sm_acquire_resource(private, ioparam->handle); + if (resource == NULL) { + ret = -EINVAL; + goto error; + } + +- /* Check permissions. +- */ ++ /* Check permissions. */ + if (resource->pid && (resource->pid != current->tgid)) { + pr_err("[%s]: current tgid %u != %u owner\n", __func__, + current->tgid, resource->pid); +@@ -1795,15 +1765,13 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, + lock.res_handle = resource->res_handle; + lock.res_mem = (uint32_t)resource->res_base_mem; + +- /* Take the lock and get the address to be mapped. +- */ ++ /* Take the lock and get the address to be mapped. */ + if (vc_addr == 0) { + pr_debug("[%s]: attempt to lock data - guid %x, hdl %x, base address %p\n", + __func__, ioparam->handle, lock.res_handle, + (void *)lock.res_mem); + +- /* Lock the videocore allocated resource. +- */ ++ /* Lock the videocore allocated resource. */ + status = vc_vchi_sm_lock(sm_state->sm_handle, &lock, &result, + &private->int_trans_id); + if (status == -EINTR) { +@@ -1826,24 +1794,21 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, + __func__, lock.res_handle, (void *)result.res_mem, + (void *)lock.res_mem, resource->lock_count); + } +- /* Lock assumed taken already, address to be mapped is known. +- */ ++ /* Lock assumed taken already, address to be mapped is known. */ + else + resource->res_base_mem = (void *)vc_addr; + + resource->res_stats[LOCK]++; + resource->lock_count++; + +- /* Keep track of the new base memory allocation if it has changed. +- */ ++ /* Keep track of the new base memory allocation if it has changed. */ + if ((vc_addr == 0) && + ((void *)result.res_mem) && + ((void *)result.res_old_mem) && + (result.res_mem != result.res_old_mem)) { + resource->res_base_mem = (void *)result.res_mem; + +- /* Kernel allocated resources. +- */ ++ /* Kernel allocated resources. */ + if (resource->pid == 0) { + if (!list_empty(&resource->map_list)) { + list_for_each_entry_safe(map, map_tmp, +@@ -1875,8 +1840,7 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, + __func__, resource->map_count, private->pid, + current->tgid, ioparam->handle, ioparam->addr); + } else { +- /* Kernel allocated resources. +- */ ++ /* Kernel allocated resources. */ + if (resource->pid == 0) { + pr_debug("[%s]: attempt mapping kernel resource - guid %x, hdl %x\n", + __func__, ioparam->handle, lock.res_handle); +@@ -1933,8 +1897,7 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, + return ret; + } + +-/* Unlock a previously allocated shared memory handle and block. +-*/ ++/* Unlock a previously allocated shared memory handle and block.*/ + static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, + struct vmcs_sm_ioctl_lock_unlock *ioparam, + int flush, int wait_reply, int no_vc_unlock) +@@ -1947,16 +1910,14 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, + + map = NULL; + +- /* Locate resource from GUID. +- */ ++ /* Locate resource from GUID. */ + resource = vmcs_sm_acquire_resource(private, ioparam->handle); + if (resource == NULL) { + ret = -EINVAL; + goto error; + } + +- /* Check permissions. +- */ ++ /* Check permissions. */ + if (resource->pid && (resource->pid != current->tgid)) { + pr_err("[%s]: current tgid %u != %u owner\n", + __func__, current->tgid, resource->pid); +@@ -1971,8 +1932,7 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, + __func__, ioparam->handle, unlock.res_handle, + (void *)unlock.res_mem); + +- /* User space allocated resources. +- */ ++ /* User space allocated resources. */ + if (resource->pid) { + /* Flush if requested */ + if (resource->res_cached && flush) { +@@ -2071,12 +2031,10 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, + } + + if (resource->lock_count) { +- /* Bypass the videocore unlock. +- */ ++ /* Bypass the videocore unlock. */ + if (no_vc_unlock) + status = 0; +- /* Unlock the videocore allocated resource. +- */ ++ /* Unlock the videocore allocated resource. */ + else { + status = + vc_vchi_sm_unlock(sm_state->sm_handle, &unlock, +@@ -2116,9 +2074,7 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, + return ret; + } + +-/* +- * Import a contiguous block of memory to be shared with VC. +- */ ++/* Import a contiguous block of memory to be shared with VC. */ + int vc_sm_ioctl_import_dmabuf(struct SM_PRIV_DATA_T *private, + struct vmcs_sm_ioctl_import_dmabuf *ioparam, + struct dma_buf *src_dma_buf) +@@ -2205,8 +2161,7 @@ int vc_sm_ioctl_import_dmabuf(struct SM_PRIV_DATA_T *private, + goto error; + } + +- /* Keep track of the resource we created. +- */ ++ /* Keep track of the resource we created. */ + resource->private = private; + resource->res_handle = result.res_handle; + resource->res_size = import.size; +@@ -2217,7 +2172,8 @@ int vc_sm_ioctl_import_dmabuf(struct SM_PRIV_DATA_T *private, + resource->sgt = sgt; + resource->dma_addr = sg_dma_address(sgt->sgl); + +- /* Kernel/user GUID. This global identifier is used for mmap'ing the ++ /* ++ * Kernel/user GUID. This global identifier is used for mmap'ing the + * allocated region from user space, it is passed as the mmap'ing + * offset, we use it to 'hide' the videocore handle/address. + */ +@@ -2282,8 +2238,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + file_data->restart_sys = 0; + } + +- /* Now process the command. +- */ ++ /* Now process the command. */ + switch (cmdnr) { + /* New memory allocation. + */ +@@ -2291,8 +2246,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + { + struct vmcs_sm_ioctl_alloc ioparam; + +- /* Get the parameter data. +- */ ++ /* Get the parameter data. */ + if (copy_from_user + (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { + pr_err("[%s]: failed to copy-from-user for cmd %x\n", +@@ -2314,20 +2268,17 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + ret = -EFAULT; + } + +- /* Done. +- */ ++ /* Done. */ + goto out; + } + break; + +- /* Share existing memory allocation. +- */ ++ /* Share existing memory allocation. */ + case VMCS_SM_CMD_ALLOC_SHARE: + { + struct vmcs_sm_ioctl_alloc_share ioparam; + +- /* Get the parameter data. +- */ ++ /* Get the parameter data. */ + if (copy_from_user + (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { + pr_err("[%s]: failed to copy-from-user for cmd %x\n", +@@ -2338,8 +2289,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + + ret = vc_sm_ioctl_alloc_share(file_data, &ioparam); + +- /* Copy result back to user. +- */ ++ /* Copy result back to user. */ + if (!ret + && copy_to_user((void *)arg, &ioparam, + sizeof(ioparam)) != 0) { +@@ -2352,8 +2302,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + ret = -EFAULT; + } + +- /* Done. +- */ ++ /* Done. */ + goto out; + } + break; +@@ -2362,8 +2311,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + { + struct vmcs_sm_ioctl_import_dmabuf ioparam; + +- /* Get the parameter data. +- */ ++ /* Get the parameter data. */ + if (copy_from_user + (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { + pr_err("[%s]: failed to copy-from-user for cmd %x\n", +@@ -2386,21 +2334,18 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + ret = -EFAULT; + } + +- /* Done. +- */ ++ /* Done. */ + goto out; + } + break; + +- /* Lock (attempt to) *and* register a cache behavior change. +- */ ++ /* Lock (attempt to) *and* register a cache behavior change. */ + case VMCS_SM_CMD_LOCK_CACHE: + { + struct vmcs_sm_ioctl_lock_cache ioparam; + struct vmcs_sm_ioctl_lock_unlock lock; + +- /* Get parameter data. +- */ ++ /* Get parameter data. */ + if (copy_from_user + (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { + pr_err("[%s]: failed to copy-from-user for cmd %x\n", +@@ -2414,20 +2359,17 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + vc_sm_ioctl_lock(file_data, &lock, 1, + ioparam.cached, 0); + +- /* Done. +- */ ++ /* Done. */ + goto out; + } + break; + +- /* Lock (attempt to) existing memory allocation. +- */ ++ /* Lock (attempt to) existing memory allocation. */ + case VMCS_SM_CMD_LOCK: + { + struct vmcs_sm_ioctl_lock_unlock ioparam; + +- /* Get parameter data. +- */ ++ /* Get parameter data. */ + if (copy_from_user + (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { + pr_err("[%s]: failed to copy-from-user for cmd %x\n", +@@ -2438,8 +2380,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + + ret = vc_sm_ioctl_lock(file_data, &ioparam, 0, 0, 0); + +- /* Copy result back to user. +- */ ++ /* Copy result back to user. */ + if (copy_to_user((void *)arg, &ioparam, sizeof(ioparam)) + != 0) { + pr_err("[%s]: failed to copy-to-user for cmd %x\n", +@@ -2447,20 +2388,17 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + ret = -EFAULT; + } + +- /* Done. +- */ ++ /* Done. */ + goto out; + } + break; + +- /* Unlock (attempt to) existing memory allocation. +- */ ++ /* Unlock (attempt to) existing memory allocation. */ + case VMCS_SM_CMD_UNLOCK: + { + struct vmcs_sm_ioctl_lock_unlock ioparam; + +- /* Get parameter data. +- */ ++ /* Get parameter data. */ + if (copy_from_user + (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { + pr_err("[%s]: failed to copy-from-user for cmd %x\n", +@@ -2471,20 +2409,17 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + + ret = vc_sm_ioctl_unlock(file_data, &ioparam, 0, 1, 0); + +- /* Done. +- */ ++ /* Done. */ + goto out; + } + break; + +- /* Resize (attempt to) existing memory allocation. +- */ ++ /* Resize (attempt to) existing memory allocation. */ + case VMCS_SM_CMD_RESIZE: + { + struct vmcs_sm_ioctl_resize ioparam; + +- /* Get parameter data. +- */ ++ /* Get parameter data. */ + if (copy_from_user + (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { + pr_err("[%s]: failed to copy-from-user for cmd %x\n", +@@ -2495,17 +2430,13 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + + ret = vc_sm_ioctl_resize(file_data, &ioparam); + +- /* Copy result back to user. +- */ ++ /* Copy result back to user. */ + if (copy_to_user((void *)arg, &ioparam, sizeof(ioparam)) + != 0) { + pr_err("[%s]: failed to copy-to-user for cmd %x\n", + __func__, cmdnr); + ret = -EFAULT; + } +- +- /* Done. +- */ + goto out; + } + break; +@@ -2550,7 +2481,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + goto out; + } + break; +-/* Walk mapping table on host, information shows up in the ++ /* Walk mapping table on host, information shows up in the + ** kernel log. + */ + case VMCS_SM_CMD_HOST_WALK_MAP: +@@ -2589,7 +2520,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + { + struct vmcs_sm_ioctl_walk ioparam; + +- /* Get parameter data. */ ++ /* Get parameter data. */ + if (copy_from_user(&ioparam, + (void *)arg, sizeof(ioparam)) != 0) { + pr_err("[%s]: failed to copy-from-user for cmd %x\n", +@@ -2646,8 +2577,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + { + struct vmcs_sm_ioctl_chk ioparam; + +- /* Get parameter data. +- */ ++ /* Get parameter data. */ + if (copy_from_user(&ioparam, + (void *)arg, sizeof(ioparam)) != 0) { + pr_err("[%s]: failed to copy-from-user for cmd %x\n", +@@ -2662,7 +2592,8 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + vmcs_sm_acquire_resource(file_data, ioparam.handle); + if (resource == NULL) + ret = -EINVAL; +- /* If the resource is cacheable, return additional ++ /* ++ * If the resource is cacheable, return additional + * information that may be needed to flush the cache. + */ + else if ((resource->res_cached == VMCS_SM_CACHE_HOST) || +@@ -2688,8 +2619,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + ret = -EFAULT; + } + +- /* Done. +- */ ++ /* Done. */ + goto out; + } + break; +@@ -2768,8 +2698,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + ret = -EFAULT; + } + +- /* Done. +- */ ++ /* Done. */ + goto out; + } + break; +@@ -2851,8 +2780,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + } + break; + +- /* Maps a user address given process and vc handle. +- */ ++ /* Maps a user address given process and vc handle. */ + case VMCS_SM_CMD_MAPPED_USR_ADDRESS: + { + struct vmcs_sm_ioctl_map ioparam; +@@ -2955,8 +2883,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + goto out; + } + +- /* Locate resource from GUID. +- */ ++ /* Locate resource from GUID. */ + resource = + vmcs_sm_acquire_resource(file_data, ioparam.handle); + +@@ -2992,8 +2919,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + if (resource) + vmcs_sm_release_resource(resource, 0); + +- /* Done. +- */ ++ /* Done. */ + goto out; + } + break; +@@ -3019,8 +2945,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + case 2: /* L1/L2 clean physical range */ + case 3: /* L1/L2 clean+invalidate all */ + { +- /* Locate resource from GUID. +- */ ++ /* Locate resource from GUID. */ + resource = + vmcs_sm_acquire_resource(file_data, ioparam.s[i].handle); + +@@ -3123,8 +3048,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + return ret; + } + +-/* Device operations that we managed in this driver. +-*/ ++/* Device operations that we managed in this driver. */ + static const struct file_operations vmcs_sm_ops = { + .owner = THIS_MODULE, + .unlocked_ioctl = vc_sm_ioctl, +@@ -3133,8 +3057,7 @@ static const struct file_operations vmcs_sm_ops = { + .mmap = vc_sm_mmap, + }; + +-/* Creation of device. +-*/ ++/* Creation of device. */ + static int vc_sm_create_sharedmemory(void) + { + int ret; +@@ -3144,8 +3067,7 @@ static int vc_sm_create_sharedmemory(void) + goto out; + } + +- /* Create a device class for creating dev nodes. +- */ ++ /* Create a device class for creating dev nodes. */ + sm_state->sm_class = class_create(THIS_MODULE, "vc-sm"); + if (IS_ERR(sm_state->sm_class)) { + pr_err("[%s]: unable to create device class\n", __func__); +@@ -3153,8 +3075,7 @@ static int vc_sm_create_sharedmemory(void) + goto out; + } + +- /* Create a character driver. +- */ ++ /* Create a character driver. */ + ret = alloc_chrdev_region(&sm_state->sm_devid, + DEVICE_MINOR, 1, DEVICE_NAME); + if (ret != 0) { +@@ -3169,8 +3090,7 @@ static int vc_sm_create_sharedmemory(void) + goto out_chrdev_unreg; + } + +- /* Create a device node. +- */ ++ /* Create a device node. */ + sm_state->sm_dev = device_create(sm_state->sm_class, + NULL, + MKDEV(MAJOR(sm_state->sm_devid), +@@ -3195,25 +3115,21 @@ static int vc_sm_create_sharedmemory(void) + return ret; + } + +-/* Termination of the device. +-*/ ++/* Termination of the device. */ + static int vc_sm_remove_sharedmemory(void) + { + int ret; + + if (sm_state == NULL) { +- /* Nothing to do. +- */ ++ /* Nothing to do. */ + ret = 0; + goto out; + } + +- /* Remove the sharedmemory character driver. +- */ ++ /* Remove the sharedmemory character driver. */ + cdev_del(&sm_state->sm_cdev); + +- /* Unregister region. +- */ ++ /* Unregister region. */ + unregister_chrdev_region(sm_state->sm_devid, 1); + + ret = 0; +@@ -3232,8 +3148,9 @@ static void vc_sm_connected_init(void) + + pr_info("[%s]: start\n", __func__); + +- /* Initialize and create a VCHI connection for the shared memory service +- ** running on videocore. ++ /* ++ * Initialize and create a VCHI connection for the shared memory service ++ * running on videocore. + */ + ret = vchi_initialise(&vchi_instance); + if (ret != 0) { +@@ -3306,8 +3223,7 @@ static void vc_sm_connected_init(void) + goto err_remove_shared_memory; + } + +- /* Done! +- */ ++ /* Done! */ + sm_inited = 1; + goto out; + +@@ -3344,20 +3260,16 @@ static int bcm2835_vcsm_remove(struct platform_device *pdev) + { + pr_debug("[%s]: start\n", __func__); + if (sm_inited) { +- /* Remove shared memory device. +- */ ++ /* Remove shared memory device. */ + vc_sm_remove_sharedmemory(); + +- /* Remove all proc entries. +- */ ++ /* Remove all proc entries. */ + debugfs_remove_recursive(sm_state->dir_root); + +- /* Stop the videocore shared memory service. +- */ ++ /* Stop the videocore shared memory service. */ + vc_vchi_sm_stop(&sm_state->sm_handle); + +- /* Free the memory for the state structure. +- */ ++ /* Free the memory for the state structure. */ + mutex_destroy(&(sm_state->map_lock)); + kfree(sm_state); + } +@@ -3374,8 +3286,7 @@ int vc_sm_alloc(struct vc_sm_alloc_t *alloc, int *handle) + int ret; + struct SM_RESOURCE_T *resource; + +- /* Validate we can work with this device. +- */ ++ /* Validate we can work with this device. */ + if (sm_state == NULL || alloc == NULL || handle == NULL) { + pr_err("[%s]: invalid input\n", __func__); + return -EPERM; +@@ -3396,8 +3307,7 @@ int vc_sm_alloc(struct vc_sm_alloc_t *alloc, int *handle) + resource->pid = 0; + vmcs_sm_release_resource(resource, 0); + +- /* Assign valid handle at this time. +- */ ++ /* Assign valid handle at this time. */ + *handle = ioparam.handle; + } else { + ret = -ENOMEM; +@@ -3408,22 +3318,19 @@ int vc_sm_alloc(struct vc_sm_alloc_t *alloc, int *handle) + } + EXPORT_SYMBOL_GPL(vc_sm_alloc); + +-/* Get an internal resource handle mapped from the external one. +-*/ ++/* Get an internal resource handle mapped from the external one. */ + int vc_sm_int_handle(int handle) + { + struct SM_RESOURCE_T *resource; + int ret = 0; + +- /* Validate we can work with this device. +- */ ++ /* Validate we can work with this device. */ + if (sm_state == NULL || handle == 0) { + pr_err("[%s]: invalid input\n", __func__); + return 0; + } + +- /* Locate resource from GUID. +- */ ++ /* Locate resource from GUID. */ + resource = vmcs_sm_acquire_resource(sm_state->data_knl, handle); + if (resource) { + ret = resource->res_handle; +@@ -3434,14 +3341,12 @@ int vc_sm_int_handle(int handle) + } + EXPORT_SYMBOL_GPL(vc_sm_int_handle); + +-/* Free a previously allocated shared memory handle and block. +-*/ ++/* Free a previously allocated shared memory handle and block. */ + int vc_sm_free(int handle) + { + struct vmcs_sm_ioctl_free ioparam = { handle }; + +- /* Validate we can work with this device. +- */ ++ /* Validate we can work with this device. */ + if (sm_state == NULL || handle == 0) { + pr_err("[%s]: invalid input\n", __func__); + return -EPERM; +@@ -3451,16 +3356,14 @@ int vc_sm_free(int handle) + } + EXPORT_SYMBOL_GPL(vc_sm_free); + +-/* Lock a memory handle for use by kernel. +-*/ ++/* Lock a memory handle for use by kernel. */ + int vc_sm_lock(int handle, VC_SM_LOCK_CACHE_MODE_T mode, + long unsigned int *data) + { + struct vmcs_sm_ioctl_lock_unlock ioparam; + int ret; + +- /* Validate we can work with this device. +- */ ++ /* Validate we can work with this device. */ + if (sm_state == NULL || handle == 0 || data == NULL) { + pr_err("[%s]: invalid input\n", __func__); + return -EPERM; +@@ -3481,14 +3384,12 @@ int vc_sm_lock(int handle, VC_SM_LOCK_CACHE_MODE_T mode, + } + EXPORT_SYMBOL_GPL(vc_sm_lock); + +-/* Unlock a memory handle in use by kernel. +-*/ ++/* Unlock a memory handle in use by kernel. */ + int vc_sm_unlock(int handle, int flush, int no_vc_unlock) + { + struct vmcs_sm_ioctl_lock_unlock ioparam; + +- /* Validate we can work with this device. +- */ ++ /* Validate we can work with this device. */ + if (sm_state == NULL || handle == 0) { + pr_err("[%s]: invalid input\n", __func__); + return -EPERM; +@@ -3500,16 +3401,14 @@ int vc_sm_unlock(int handle, int flush, int no_vc_unlock) + } + EXPORT_SYMBOL_GPL(vc_sm_unlock); + +-/* Map a shared memory region for use by kernel. +-*/ ++/* Map a shared memory region for use by kernel. */ + int vc_sm_map(int handle, unsigned int sm_addr, VC_SM_LOCK_CACHE_MODE_T mode, + long unsigned int *data) + { + struct vmcs_sm_ioctl_lock_unlock ioparam; + int ret; + +- /* Validate we can work with this device. +- */ ++ /* Validate we can work with this device. */ + if (sm_state == NULL || handle == 0 || data == NULL || sm_addr == 0) { + pr_err("[%s]: invalid input\n", __func__); + return -EPERM; + +From 1425d69839100270659e2c8d634afba48d5bd57c Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 1 Sep 2017 17:29:37 +0100 +Subject: [PATCH 186/199] vcsm: Fix indentation of switch/case statement. + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 53 ++++++++++++++++++----------------- + 1 file changed, 27 insertions(+), 26 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index f93f18d3c24e43c9cf79e33f11cba9d1806f3124..9627a2b187130a68a15ea6fe46a72cf6cb5fe27e 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -2940,33 +2940,34 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + } + for (i=0; ires_cached) { +- unsigned long base = ioparam.s[i].addr & ~(PAGE_SIZE-1); +- unsigned long end = (ioparam.s[i].addr + ioparam.s[i].size + PAGE_SIZE-1) & ~(PAGE_SIZE-1); +- +- resource->res_stats[ioparam.s[i].cmd == 1 ? INVALID:FLUSH]++; +- +- /* L1/L2 cache flush */ +- down_read(¤t->mm->mmap_sem); +- vcsm_vma_cache_clean_page_range(base, end); +- up_read(¤t->mm->mmap_sem); +- } else if (resource == NULL) { +- ret = -EINVAL; +- goto out; +- } +- +- if (resource) +- vmcs_sm_release_resource(resource, 0); ++ default: ++ case 0: ++ break; /* NOOP */ ++ case 1: /* L1/L2 invalidate virtual range */ ++ case 2: /* L1/L2 clean physical range */ ++ case 3: /* L1/L2 clean+invalidate all */ ++ /* Locate resource from GUID. */ ++ resource = ++ vmcs_sm_acquire_resource(file_data, ioparam.s[i].handle); ++ ++ if ((resource != NULL) && resource->res_cached) { ++ unsigned long base = ioparam.s[i].addr & ~(PAGE_SIZE-1); ++ unsigned long end = (ioparam.s[i].addr + ioparam.s[i].size + PAGE_SIZE-1) & ~(PAGE_SIZE-1); ++ ++ resource->res_stats[ioparam.s[i].cmd == 1 ? INVALID:FLUSH]++; ++ ++ /* L1/L2 cache flush */ ++ down_read(¤t->mm->mmap_sem); ++ vcsm_vma_cache_clean_page_range(base, end); ++ up_read(¤t->mm->mmap_sem); ++ } else if (resource == NULL) { ++ ret = -EINVAL; ++ goto out; + } ++ ++ if (resource) ++ vmcs_sm_release_resource(resource, 0); ++ + break; + } + } + +From 0825e0228c00a66d6a553467ffbdab50f4fe6763 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 1 Sep 2017 17:24:48 +0100 +Subject: [PATCH 187/199] vcsm: Fix spaces around operators. + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index 9627a2b187130a68a15ea6fe46a72cf6cb5fe27e..2b29c1f1ad611fe5ad04d0cf7c757370c850a5e9 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -2938,7 +2938,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + ret = -EFAULT; + goto out; + } +- for (i=0; ires_cached) { +- unsigned long base = ioparam.s[i].addr & ~(PAGE_SIZE-1); +- unsigned long end = (ioparam.s[i].addr + ioparam.s[i].size + PAGE_SIZE-1) & ~(PAGE_SIZE-1); ++ unsigned long base = ioparam.s[i].addr & ~(PAGE_SIZE - 1); ++ unsigned long end = (ioparam.s[i].addr + ioparam.s[i].size + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1); + +- resource->res_stats[ioparam.s[i].cmd == 1 ? INVALID:FLUSH]++; ++ resource->res_stats[ioparam.s[i].cmd == 1 ? INVALID : FLUSH]++; + + /* L1/L2 cache flush */ + down_read(¤t->mm->mmap_sem); +@@ -3001,7 +3001,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + goto out; + } + +- for (i=0; iblock_count; ++j) { + +From e156456b178b2b43d6db635da7953612720e4569 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 1 Sep 2017 17:33:49 +0100 +Subject: [PATCH 188/199] vcsm: Fix use of S_IRUGO and use 0444 instead + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index 2b29c1f1ad611fe5ad04d0cf7c757370c850a5e9..25dc958a35bac88e5ec6e0865d7cf35953d1b70b 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -1047,7 +1047,7 @@ static struct SM_PRIV_DATA_T *vc_sm_create_priv_data(pid_t id) + } else { + struct dentry *dir_entry; + +- dir_entry = debugfs_create_file(VC_SM_RESOURCES, S_IRUGO, ++ dir_entry = debugfs_create_file(VC_SM_RESOURCES, 0444, + file_data->dir_pid, file_data, + vc_sm_debug_fs_fops); + +@@ -1055,7 +1055,7 @@ static struct SM_PRIV_DATA_T *vc_sm_create_priv_data(pid_t id) + file_data->dir_res.priv_data = file_data; + file_data->dir_res.show = &vc_sm_alloc_show; + +- dir_entry = debugfs_create_file(VC_SM_STATS, S_IRUGO, ++ dir_entry = debugfs_create_file(VC_SM_STATS, 0444, + file_data->dir_pid, file_data, + vc_sm_debug_fs_fops); + +@@ -3194,12 +3194,12 @@ static void vc_sm_connected_init(void) + + sm_state->dir_state.show = &vc_sm_global_state_show; + sm_state->dir_state.dir_entry = debugfs_create_file(VC_SM_STATE, +- S_IRUGO, sm_state->dir_root, &sm_state->dir_state, ++ 0444, sm_state->dir_root, &sm_state->dir_state, + &vc_sm_debug_fs_fops); + + sm_state->dir_stats.show = &vc_sm_global_statistics_show; + sm_state->dir_stats.dir_entry = debugfs_create_file(VC_SM_STATS, +- S_IRUGO, sm_state->dir_root, &sm_state->dir_stats, ++ 0444, sm_state->dir_root, &sm_state->dir_stats, + &vc_sm_debug_fs_fops); + + /* Create the proc entry children. */ + +From 7bd1557a90736e09b4c8ee4e2c9ef5577da1b641 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 1 Sep 2017 17:36:11 +0100 +Subject: [PATCH 189/199] vcsm: Correct "long unsigned int" to "unsigned long" + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vc_sm_knl.h | 4 ++-- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 16 ++++++++-------- + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vc_sm_knl.h b/drivers/char/broadcom/vc_sm/vc_sm_knl.h +index 8252d13999a78609fcc7e1bbe83307e2b1c1f8f1..8538f618ffd33b2901d220f3fb755aae6001e6d7 100644 +--- a/drivers/char/broadcom/vc_sm/vc_sm_knl.h ++++ b/drivers/char/broadcom/vc_sm/vc_sm_knl.h +@@ -36,7 +36,7 @@ int vc_sm_free(int handle); + + /* Lock a memory handle for use by kernel. */ + int vc_sm_lock(int handle, VC_SM_LOCK_CACHE_MODE_T mode, +- long unsigned int *data); ++ unsigned long *data); + + /* Unlock a memory handle in use by kernel. */ + int vc_sm_unlock(int handle, int flush, int no_vc_unlock); +@@ -46,7 +46,7 @@ int vc_sm_int_handle(int handle); + + /* Map a shared memory region for use by kernel. */ + int vc_sm_map(int handle, unsigned int sm_addr, VC_SM_LOCK_CACHE_MODE_T mode, +- long unsigned int *data); ++ unsigned long *data); + + /* Import a block of memory into the GPU space. */ + int vc_sm_import_dmabuf(struct dma_buf *dmabuf, int *handle); +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index 25dc958a35bac88e5ec6e0865d7cf35953d1b70b..8244b365b690f8e2d00a8fae3754ce1f8bc23fbf 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -118,7 +118,7 @@ struct sm_mmap { + unsigned int res_vc_hdl; /* Resource handle (videocore). */ + unsigned int res_usr_hdl; /* Resource handle (user). */ + +- long unsigned int res_addr; /* Mapped virtual address. */ ++ unsigned long res_addr; /* Mapped virtual address. */ + struct vm_area_struct *vma; /* VM area for this mapping. */ + unsigned int ref_count; /* Reference count to this vma. */ + +@@ -1383,7 +1383,7 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) + map->res_pid = current->tgid; + map->res_vc_hdl = resource->res_handle; + map->res_usr_hdl = resource->res_guid; +- map->res_addr = (long unsigned int)vma->vm_start; ++ map->res_addr = (unsigned long)vma->vm_start; + map->resource = resource; + map->vma = vma; + vmcs_sm_add_map(sm_state, resource, map); +@@ -1743,7 +1743,7 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, + struct SM_RESOURCE_T *resource; + int ret = 0; + struct sm_mmap *map, *map_tmp; +- long unsigned int phys_addr; ++ unsigned long phys_addr; + + map = NULL; + +@@ -1859,7 +1859,7 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, + phys_addr += mm_vc_mem_phys_addr; + if (resource->res_cached + == VMCS_SM_CACHE_HOST) { +- ioparam->addr = (long unsigned int) ++ ioparam->addr = (unsigned long) + /* TODO - make cached work */ + ioremap_nocache(phys_addr, + resource->res_size); +@@ -1868,7 +1868,7 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, + __func__, ioparam->handle, + lock.res_handle, ioparam->addr); + } else { +- ioparam->addr = (long unsigned int) ++ ioparam->addr = (unsigned long) + ioremap_nocache(phys_addr, + resource->res_size); + +@@ -1995,7 +1995,7 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, + if (flush && + (resource->res_cached == + VMCS_SM_CACHE_HOST)) { +- long unsigned int ++ unsigned long + phys_addr; + phys_addr = (uint32_t) + resource->res_base_mem & 0x3FFFFFFF; +@@ -3359,7 +3359,7 @@ EXPORT_SYMBOL_GPL(vc_sm_free); + + /* Lock a memory handle for use by kernel. */ + int vc_sm_lock(int handle, VC_SM_LOCK_CACHE_MODE_T mode, +- long unsigned int *data) ++ unsigned long *data) + { + struct vmcs_sm_ioctl_lock_unlock ioparam; + int ret; +@@ -3404,7 +3404,7 @@ EXPORT_SYMBOL_GPL(vc_sm_unlock); + + /* Map a shared memory region for use by kernel. */ + int vc_sm_map(int handle, unsigned int sm_addr, VC_SM_LOCK_CACHE_MODE_T mode, +- long unsigned int *data) ++ unsigned long *data) + { + struct vmcs_sm_ioctl_lock_unlock ioparam; + int ret; + +From 93cfd41b8dde48c4abb4d54a27e85ee44a5544ca Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 1 Sep 2017 17:38:27 +0100 +Subject: [PATCH 190/199] vcsm: Fix "struct vm_operations_struct should + normally be const" + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index 8244b365b690f8e2d00a8fae3754ce1f8bc23fbf..d8fe579a999d011d0af986a88398ac8b0947b7f3 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -1248,7 +1248,7 @@ static int vcsm_vma_fault(struct vm_fault *vmf) + } + } + +-static struct vm_operations_struct vcsm_vm_ops = { ++static const struct vm_operations_struct vcsm_vm_ops = { + .open = vcsm_vma_open, + .close = vcsm_vma_close, + .fault = vcsm_vma_fault, + +From bb96bdcc4eb7d03a61a32256471c52d137297bdb Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 1 Sep 2017 17:45:34 +0100 +Subject: [PATCH 191/199] vcsm: Fix "void function return statements are not + generally useful" + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index d8fe579a999d011d0af986a88398ac8b0947b7f3..ecff69dce678b5125b81ed82b74b950720c472b0 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -984,8 +984,6 @@ static void vmcs_sm_host_walk_map_per_pid(int pid) + } + + mutex_unlock(&(sm_state->map_lock)); +- +- return; + } + + /* +@@ -1015,8 +1013,6 @@ static void vmcs_sm_host_walk_alloc(struct SM_PRIV_DATA_T *file_data) + } + + mutex_unlock(&(sm_state->map_lock)); +- +- return; + } + + /* Create support for private data tracking. */ + +From 4e47c87c05563c652cb1510b8184833aaf48e0df Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 1 Sep 2017 17:47:32 +0100 +Subject: [PATCH 192/199] vcsm: Fix "Prefer kcalloc over kzalloc with multiply" + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index ecff69dce678b5125b81ed82b74b950720c472b0..ea82a374a5e2ad51cefcfc20ea4265c436258646 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -2984,7 +2984,9 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + ret = -EFAULT; + goto out; + } +- block = kzalloc(ioparam.op_count * sizeof(struct vmcs_sm_ioctl_clean_invalid_block), GFP_KERNEL); ++ block = kcalloc(ioparam.op_count, ++ sizeof(struct vmcs_sm_ioctl_clean_invalid_block), ++ GFP_KERNEL); + if (!block) { + ret = -EFAULT; + goto out; + +From 8d28d3df62ba49f039a998e2eca7bbc3235864ec Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 1 Sep 2017 17:55:07 +0100 +Subject: [PATCH 193/199] vcsm: Remove VC_SM_LOCK_CACHE_MODE_T typedef. + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vc_sm_knl.h | 11 +++++------ + drivers/char/broadcom/vc_sm/vmcs_sm.c | 6 +++--- + 2 files changed, 8 insertions(+), 9 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vc_sm_knl.h b/drivers/char/broadcom/vc_sm/vc_sm_knl.h +index 8538f618ffd33b2901d220f3fb755aae6001e6d7..f7f74750d8358779c61dfcd6fc841aa1789a2c5e 100644 +--- a/drivers/char/broadcom/vc_sm/vc_sm_knl.h ++++ b/drivers/char/broadcom/vc_sm/vc_sm_knl.h +@@ -22,11 +22,10 @@ + #endif + + /* Type of memory to be locked (ie mapped) */ +-typedef enum { ++enum vc_sm_lock_cache_mode { + VC_SM_LOCK_CACHED, + VC_SM_LOCK_NON_CACHED, +- +-} VC_SM_LOCK_CACHE_MODE_T; ++}; + + /* Allocate a shared memory handle and block. */ + int vc_sm_alloc(struct vc_sm_alloc_t *alloc, int *handle); +@@ -35,7 +34,7 @@ int vc_sm_alloc(struct vc_sm_alloc_t *alloc, int *handle); + int vc_sm_free(int handle); + + /* Lock a memory handle for use by kernel. */ +-int vc_sm_lock(int handle, VC_SM_LOCK_CACHE_MODE_T mode, ++int vc_sm_lock(int handle, enum vc_sm_lock_cache_mode mode, + unsigned long *data); + + /* Unlock a memory handle in use by kernel. */ +@@ -45,8 +44,8 @@ int vc_sm_unlock(int handle, int flush, int no_vc_unlock); + int vc_sm_int_handle(int handle); + + /* Map a shared memory region for use by kernel. */ +-int vc_sm_map(int handle, unsigned int sm_addr, VC_SM_LOCK_CACHE_MODE_T mode, +- unsigned long *data); ++int vc_sm_map(int handle, unsigned int sm_addr, ++ enum vc_sm_lock_cache_mode mode, unsigned long *data); + + /* Import a block of memory into the GPU space. */ + int vc_sm_import_dmabuf(struct dma_buf *dmabuf, int *handle); +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index ea82a374a5e2ad51cefcfc20ea4265c436258646..b2452f3d0dfc207deed3703cb3ad43221af50b46 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -3356,7 +3356,7 @@ int vc_sm_free(int handle) + EXPORT_SYMBOL_GPL(vc_sm_free); + + /* Lock a memory handle for use by kernel. */ +-int vc_sm_lock(int handle, VC_SM_LOCK_CACHE_MODE_T mode, ++int vc_sm_lock(int handle, enum vc_sm_lock_cache_mode mode, + unsigned long *data) + { + struct vmcs_sm_ioctl_lock_unlock ioparam; +@@ -3401,8 +3401,8 @@ int vc_sm_unlock(int handle, int flush, int no_vc_unlock) + EXPORT_SYMBOL_GPL(vc_sm_unlock); + + /* Map a shared memory region for use by kernel. */ +-int vc_sm_map(int handle, unsigned int sm_addr, VC_SM_LOCK_CACHE_MODE_T mode, +- unsigned long *data) ++int vc_sm_map(int handle, unsigned int sm_addr, ++ enum vc_sm_lock_cache_mode mode, unsigned long *data) + { + struct vmcs_sm_ioctl_lock_unlock ioparam; + int ret; + +From 7aff1a4e86c2aa8af1e5b29162ba2a78e638bcf2 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Tue, 5 Sep 2017 10:12:21 +0100 +Subject: [PATCH 194/199] vcsm: Replace SM_RESOURCE_T with sm_resource_t + +Follow the Linux kernel coding style. + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 66 +++++++++++++++++------------------ + 1 file changed, 33 insertions(+), 33 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index b2452f3d0dfc207deed3703cb3ad43221af50b46..59e1239b42ba139e29b22017a1b2a669bec6b884 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -112,7 +112,7 @@ struct SM_PDE_T { + struct sm_mmap { + struct list_head map_list; /* Linked list of maps. */ + +- struct SM_RESOURCE_T *resource; /* Pointer to the resource. */ ++ struct sm_resource_t *resource; /* Pointer to the resource. */ + + pid_t res_pid; /* PID owning that resource. */ + unsigned int res_vc_hdl; /* Resource handle (videocore). */ +@@ -127,7 +127,7 @@ struct sm_mmap { + }; + + /* Single resource allocation tracked for each opened device. */ +-struct SM_RESOURCE_T { ++struct sm_resource_t { + struct list_head resource_list; /* List of resources. */ + struct list_head global_resource_list; /* Global list of resources. */ + +@@ -140,7 +140,7 @@ struct SM_RESOURCE_T { + void *res_base_mem; /* Resource base memory address. */ + uint32_t res_size; /* Resource size allocated. */ + enum vmcs_sm_cache_e res_cached; /* Resource cache type. */ +- struct SM_RESOURCE_T *res_shared; /* Shared resource */ ++ struct sm_resource_t *res_shared; /* Shared resource */ + + enum SM_STATS_T res_stats[END_ALL]; /* Resource statistics. */ + +@@ -235,7 +235,7 @@ static inline unsigned int vcaddr_to_pfn(unsigned long vc_addr) + * Carries over to the state statistics the statistics once owned by a deceased + * resource. + */ +-static void vc_sm_resource_deceased(struct SM_RESOURCE_T *p_res, int terminated) ++static void vc_sm_resource_deceased(struct sm_resource_t *p_res, int terminated) + { + if (sm_state != NULL) { + if (p_res != NULL) { +@@ -460,7 +460,7 @@ static unsigned int vmcs_sm_usr_address_from_pid_and_usr_handle(unsigned int + + /* Adds a resource mapping to the global data list. */ + static void vmcs_sm_add_map(struct SM_STATE_T *state, +- struct SM_RESOURCE_T *resource, struct sm_mmap *map) ++ struct sm_resource_t *resource, struct sm_mmap *map) + { + mutex_lock(&(state->map_lock)); + +@@ -480,7 +480,7 @@ static void vmcs_sm_add_map(struct SM_STATE_T *state, + + /* Removes a resource mapping from the global data list. */ + static void vmcs_sm_remove_map(struct SM_STATE_T *state, +- struct SM_RESOURCE_T *resource, ++ struct sm_resource_t *resource, + struct sm_mmap *map) + { + mutex_lock(&(state->map_lock)); +@@ -506,7 +506,7 @@ static void vmcs_sm_remove_map(struct SM_STATE_T *state, + static int vc_sm_global_state_show(struct seq_file *s, void *v) + { + struct sm_mmap *map = NULL; +- struct SM_RESOURCE_T *resource = NULL; ++ struct sm_resource_t *resource = NULL; + int map_count = 0; + int resource_count = 0; + +@@ -634,7 +634,7 @@ static int vc_sm_statistics_show(struct seq_file *s, void *v) + { + int ix; + struct SM_PRIV_DATA_T *file_data; +- struct SM_RESOURCE_T *resource; ++ struct sm_resource_t *resource; + int res_count = 0; + struct SM_PDE_T *p_pde; + +@@ -691,7 +691,7 @@ static int vc_sm_statistics_show(struct seq_file *s, void *v) + static int vc_sm_alloc_show(struct seq_file *s, void *v) + { + struct SM_PRIV_DATA_T *file_data; +- struct SM_RESOURCE_T *resource; ++ struct sm_resource_t *resource; + int alloc_count = 0; + struct SM_PDE_T *p_pde; + +@@ -765,7 +765,7 @@ static const struct file_operations vc_sm_debug_fs_fops = { + * data. + */ + static void vmcs_sm_add_resource(struct SM_PRIV_DATA_T *privdata, +- struct SM_RESOURCE_T *resource) ++ struct sm_resource_t *resource) + { + mutex_lock(&(sm_state->map_lock)); + list_add(&resource->resource_list, &privdata->resource_list); +@@ -781,11 +781,11 @@ static void vmcs_sm_add_resource(struct SM_PRIV_DATA_T *privdata, + * Locates a resource and acquire a reference on it. + * The resource won't be deleted while there is a reference on it. + */ +-static struct SM_RESOURCE_T *vmcs_sm_acquire_resource(struct SM_PRIV_DATA_T ++static struct sm_resource_t *vmcs_sm_acquire_resource(struct SM_PRIV_DATA_T + *private, + unsigned int res_guid) + { +- struct SM_RESOURCE_T *resource, *ret = NULL; ++ struct sm_resource_t *resource, *ret = NULL; + + mutex_lock(&(sm_state->map_lock)); + +@@ -811,10 +811,10 @@ static struct SM_RESOURCE_T *vmcs_sm_acquire_resource(struct SM_PRIV_DATA_T + * Locates a resource and acquire a reference on it. + * The resource won't be deleted while there is a reference on it. + */ +-static struct SM_RESOURCE_T *vmcs_sm_acquire_first_resource( ++static struct sm_resource_t *vmcs_sm_acquire_first_resource( + struct SM_PRIV_DATA_T *private) + { +- struct SM_RESOURCE_T *resource, *ret = NULL; ++ struct sm_resource_t *resource, *ret = NULL; + + mutex_lock(&(sm_state->map_lock)); + +@@ -837,10 +837,10 @@ static struct SM_RESOURCE_T *vmcs_sm_acquire_first_resource( + * Locates a resource and acquire a reference on it. + * The resource won't be deleted while there is a reference on it. + */ +-static struct SM_RESOURCE_T *vmcs_sm_acquire_global_resource(unsigned int ++static struct sm_resource_t *vmcs_sm_acquire_global_resource(unsigned int + res_guid) + { +- struct SM_RESOURCE_T *resource, *ret = NULL; ++ struct sm_resource_t *resource, *ret = NULL; + + mutex_lock(&(sm_state->map_lock)); + +@@ -867,11 +867,11 @@ static struct SM_RESOURCE_T *vmcs_sm_acquire_global_resource(unsigned int + * Release a previously acquired resource. + * The resource will be deleted when its refcount reaches 0. + */ +-static void vmcs_sm_release_resource(struct SM_RESOURCE_T *resource, int force) ++static void vmcs_sm_release_resource(struct sm_resource_t *resource, int force) + { + struct SM_PRIV_DATA_T *private = resource->private; + struct sm_mmap *map, *map_tmp; +- struct SM_RESOURCE_T *res_tmp; ++ struct sm_resource_t *res_tmp; + int ret; + + mutex_lock(&(sm_state->map_lock)); +@@ -992,7 +992,7 @@ static void vmcs_sm_host_walk_map_per_pid(int pid) + */ + static void vmcs_sm_host_walk_alloc(struct SM_PRIV_DATA_T *file_data) + { +- struct SM_RESOURCE_T *resource = NULL; ++ struct sm_resource_t *resource = NULL; + + /* Make sure the device was started properly. */ + if ((sm_state == NULL) || (file_data == NULL)) { +@@ -1101,7 +1101,7 @@ static int vc_sm_release(struct inode *inode, struct file *file) + { + struct SM_PRIV_DATA_T *file_data = + (struct SM_PRIV_DATA_T *)file->private_data; +- struct SM_RESOURCE_T *resource; ++ struct sm_resource_t *resource; + int ret = 0; + + /* Make sure the device was started properly. */ +@@ -1170,7 +1170,7 @@ static void vcsm_vma_close(struct vm_area_struct *vma) + static int vcsm_vma_fault(struct vm_fault *vmf) + { + struct sm_mmap *map = (struct sm_mmap *)vmf->vma->vm_private_data; +- struct SM_RESOURCE_T *resource = map->resource; ++ struct sm_resource_t *resource = map->resource; + pgoff_t page_offset; + unsigned long pfn; + int ret = 0; +@@ -1313,7 +1313,7 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) + int ret = 0; + struct SM_PRIV_DATA_T *file_data = + (struct SM_PRIV_DATA_T *)file->private_data; +- struct SM_RESOURCE_T *resource = NULL; ++ struct sm_resource_t *resource = NULL; + struct sm_mmap *map = NULL; + + /* Make sure the device was started properly. */ +@@ -1449,7 +1449,7 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, + { + int ret = 0; + int status; +- struct SM_RESOURCE_T *resource; ++ struct sm_resource_t *resource; + struct vc_sm_alloc_t alloc = { 0 }; + struct vc_sm_alloc_result_t result = { 0 }; + enum vmcs_sm_cache_e cached = ioparam->cached; +@@ -1558,7 +1558,7 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, + int vc_sm_ioctl_alloc_share(struct SM_PRIV_DATA_T *private, + struct vmcs_sm_ioctl_alloc_share *ioparam) + { +- struct SM_RESOURCE_T *resource, *shared_resource; ++ struct sm_resource_t *resource, *shared_resource; + int ret = 0; + + pr_debug("[%s]: attempt to share resource %u\n", __func__, +@@ -1620,7 +1620,7 @@ int vc_sm_ioctl_alloc_share(struct SM_PRIV_DATA_T *private, + static int vc_sm_ioctl_free(struct SM_PRIV_DATA_T *private, + struct vmcs_sm_ioctl_free *ioparam) + { +- struct SM_RESOURCE_T *resource = ++ struct sm_resource_t *resource = + vmcs_sm_acquire_resource(private, ioparam->handle); + + if (resource == NULL) { +@@ -1649,7 +1649,7 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, + int ret = 0; + int status; + struct vc_sm_resize_t resize; +- struct SM_RESOURCE_T *resource; ++ struct sm_resource_t *resource; + + /* Locate resource from GUID. */ + resource = vmcs_sm_acquire_resource(private, ioparam->handle); +@@ -1736,7 +1736,7 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, + int status; + struct vc_sm_lock_unlock_t lock; + struct vc_sm_lock_result_t result; +- struct SM_RESOURCE_T *resource; ++ struct sm_resource_t *resource; + int ret = 0; + struct sm_mmap *map, *map_tmp; + unsigned long phys_addr; +@@ -1901,7 +1901,7 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, + int status; + struct vc_sm_lock_unlock_t unlock; + struct sm_mmap *map, *map_tmp; +- struct SM_RESOURCE_T *resource; ++ struct sm_resource_t *resource; + int ret = 0; + + map = NULL; +@@ -2077,7 +2077,7 @@ int vc_sm_ioctl_import_dmabuf(struct SM_PRIV_DATA_T *private, + { + int ret = 0; + int status; +- struct SM_RESOURCE_T *resource = NULL; ++ struct sm_resource_t *resource = NULL; + struct vc_sm_import import = { 0 }; + struct vc_sm_import_result result = { 0 }; + struct dma_buf *dma_buf; +@@ -2206,7 +2206,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + unsigned int cmdnr = _IOC_NR(cmd); + struct SM_PRIV_DATA_T *file_data = + (struct SM_PRIV_DATA_T *)file->private_data; +- struct SM_RESOURCE_T *resource = NULL; ++ struct sm_resource_t *resource = NULL; + + /* Validate we can work with this device. */ + if ((sm_state == NULL) || (file_data == NULL)) { +@@ -3283,7 +3283,7 @@ int vc_sm_alloc(struct vc_sm_alloc_t *alloc, int *handle) + { + struct vmcs_sm_ioctl_alloc ioparam = { 0 }; + int ret; +- struct SM_RESOURCE_T *resource; ++ struct sm_resource_t *resource; + + /* Validate we can work with this device. */ + if (sm_state == NULL || alloc == NULL || handle == NULL) { +@@ -3320,7 +3320,7 @@ EXPORT_SYMBOL_GPL(vc_sm_alloc); + /* Get an internal resource handle mapped from the external one. */ + int vc_sm_int_handle(int handle) + { +- struct SM_RESOURCE_T *resource; ++ struct sm_resource_t *resource; + int ret = 0; + + /* Validate we can work with this device. */ +@@ -3433,7 +3433,7 @@ int vc_sm_import_dmabuf(struct dma_buf *dmabuf, int *handle) + { + struct vmcs_sm_ioctl_import_dmabuf ioparam = { 0 }; + int ret; +- struct SM_RESOURCE_T *resource; ++ struct sm_resource_t *resource; + + /* Validate we can work with this device. */ + if (!sm_state || !dmabuf || !handle) { + +From 600dd0a90e3e54e9635d60750dfe69621c645288 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Tue, 5 Sep 2017 10:15:25 +0100 +Subject: [PATCH 195/199] vcsm: Replace SM_STATS_T with sm_stats_t + +Follows the kernel coding style + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index 59e1239b42ba139e29b22017a1b2a669bec6b884..08567b018a63cb783d1e66056f64b2d888f10315 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -62,7 +62,7 @@ + #define VC_SM_WRITE_BUF_SIZE 128 + + /* Statistics tracked per resource and globally. */ +-enum SM_STATS_T { ++enum sm_stats_t { + /* Attempt. */ + ALLOC, + FREE, +@@ -142,7 +142,7 @@ struct sm_resource_t { + enum vmcs_sm_cache_e res_cached; /* Resource cache type. */ + struct sm_resource_t *res_shared; /* Shared resource */ + +- enum SM_STATS_T res_stats[END_ALL]; /* Resource statistics. */ ++ enum sm_stats_t res_stats[END_ALL]; /* Resource statistics. */ + + uint8_t map_count; /* Counter of mappings for this resource. */ + struct list_head map_list; /* Maps associated with a resource. */ +@@ -187,8 +187,8 @@ struct SM_STATE_T { + struct list_head map_list; /* List of maps. */ + struct list_head resource_list; /* List of resources. */ + +- enum SM_STATS_T deceased[END_ALL]; /* Natural termination stats. */ +- enum SM_STATS_T terminated[END_ALL]; /* Forced termination stats. */ ++ enum sm_stats_t deceased[END_ALL]; /* Natural termination stats. */ ++ enum sm_stats_t terminated[END_ALL]; /* Forced termination stats. */ + uint32_t res_deceased_cnt; /* Natural termination counter. */ + uint32_t res_terminated_cnt; /* Forced termination counter. */ + + +From e81fef4ddc170835dc35a05d8015569bd3f84250 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Tue, 5 Sep 2017 10:16:07 +0100 +Subject: [PATCH 196/199] vcsm: Replace SM_STATE_T with sm_state_t + +Follow the Linux kernel coding style + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index 08567b018a63cb783d1e66056f64b2d888f10315..39c64c38ce7638592eeb98583fdb2ddee981a9ec 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -174,7 +174,7 @@ struct SM_PRIV_DATA_T { + }; + + /* Global state information. */ +-struct SM_STATE_T { ++struct sm_state_t { + struct platform_device *pdev; + struct sm_instance *sm_handle; /* Handle for videocore service. */ + struct dentry *dir_root; /* Debug fs entries root. */ +@@ -206,7 +206,7 @@ struct SM_STATE_T { + + /* ---- Private Variables ----------------------------------------------- */ + +-static struct SM_STATE_T *sm_state; ++static struct sm_state_t *sm_state; + static int sm_inited; + + #if 0 +@@ -459,7 +459,7 @@ static unsigned int vmcs_sm_usr_address_from_pid_and_usr_handle(unsigned int + } + + /* Adds a resource mapping to the global data list. */ +-static void vmcs_sm_add_map(struct SM_STATE_T *state, ++static void vmcs_sm_add_map(struct sm_state_t *state, + struct sm_resource_t *resource, struct sm_mmap *map) + { + mutex_lock(&(state->map_lock)); +@@ -479,7 +479,7 @@ static void vmcs_sm_add_map(struct SM_STATE_T *state, + } + + /* Removes a resource mapping from the global data list. */ +-static void vmcs_sm_remove_map(struct SM_STATE_T *state, ++static void vmcs_sm_remove_map(struct sm_state_t *state, + struct sm_resource_t *resource, + struct sm_mmap *map) + { + +From 34628edd77ed91d466cf9e790158d13a9f37224d Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Tue, 5 Sep 2017 10:17:18 +0100 +Subject: [PATCH 197/199] vcsm: Replace SM_PRIV_DATA_T with sm_priv_data_t + +Follows the Linux kernel coding style + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 54 +++++++++++++++++------------------ + 1 file changed, 27 insertions(+), 27 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index 39c64c38ce7638592eeb98583fdb2ddee981a9ec..9f1ea8269385b9c2cf4f7ab0ca6ba99b3ca12b6c 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -153,12 +153,12 @@ struct sm_resource_t { + struct sg_table *sgt; + dma_addr_t dma_addr; + +- struct SM_PRIV_DATA_T *private; ++ struct sm_priv_data_t *private; + bool map; /* whether to map pages up front */ + }; + + /* Private file data associated with each opened device. */ +-struct SM_PRIV_DATA_T { ++struct sm_priv_data_t { + struct list_head resource_list; /* List of resources. */ + + pid_t pid; /* PID of creator. */ +@@ -197,7 +197,7 @@ struct sm_state_t { + struct class *sm_class; /* Class. */ + struct device *sm_dev; /* Device. */ + +- struct SM_PRIV_DATA_T *data_knl; /* Kernel internal data tracking. */ ++ struct sm_priv_data_t *data_knl; /* Kernel internal data tracking. */ + + struct mutex lock; /* Global lock. */ + uint32_t guid; /* GUID (next) tracker. */ +@@ -633,13 +633,13 @@ static int vc_sm_global_statistics_show(struct seq_file *s, void *v) + static int vc_sm_statistics_show(struct seq_file *s, void *v) + { + int ix; +- struct SM_PRIV_DATA_T *file_data; ++ struct sm_priv_data_t *file_data; + struct sm_resource_t *resource; + int res_count = 0; + struct SM_PDE_T *p_pde; + + p_pde = (struct SM_PDE_T *)(s->private); +- file_data = (struct SM_PRIV_DATA_T *)(p_pde->priv_data); ++ file_data = (struct sm_priv_data_t *)(p_pde->priv_data); + + if (file_data == NULL) + return 0; +@@ -690,13 +690,13 @@ static int vc_sm_statistics_show(struct seq_file *s, void *v) + /* Read callback for the allocation proc entry. */ + static int vc_sm_alloc_show(struct seq_file *s, void *v) + { +- struct SM_PRIV_DATA_T *file_data; ++ struct sm_priv_data_t *file_data; + struct sm_resource_t *resource; + int alloc_count = 0; + struct SM_PDE_T *p_pde; + + p_pde = (struct SM_PDE_T *)(s->private); +- file_data = (struct SM_PRIV_DATA_T *)(p_pde->priv_data); ++ file_data = (struct sm_priv_data_t *)(p_pde->priv_data); + + if (!file_data) + return 0; +@@ -764,7 +764,7 @@ static const struct file_operations vc_sm_debug_fs_fops = { + * Adds a resource to the private data list which tracks all the allocated + * data. + */ +-static void vmcs_sm_add_resource(struct SM_PRIV_DATA_T *privdata, ++static void vmcs_sm_add_resource(struct sm_priv_data_t *privdata, + struct sm_resource_t *resource) + { + mutex_lock(&(sm_state->map_lock)); +@@ -781,7 +781,7 @@ static void vmcs_sm_add_resource(struct SM_PRIV_DATA_T *privdata, + * Locates a resource and acquire a reference on it. + * The resource won't be deleted while there is a reference on it. + */ +-static struct sm_resource_t *vmcs_sm_acquire_resource(struct SM_PRIV_DATA_T ++static struct sm_resource_t *vmcs_sm_acquire_resource(struct sm_priv_data_t + *private, + unsigned int res_guid) + { +@@ -812,7 +812,7 @@ static struct sm_resource_t *vmcs_sm_acquire_resource(struct SM_PRIV_DATA_T + * The resource won't be deleted while there is a reference on it. + */ + static struct sm_resource_t *vmcs_sm_acquire_first_resource( +- struct SM_PRIV_DATA_T *private) ++ struct sm_priv_data_t *private) + { + struct sm_resource_t *resource, *ret = NULL; + +@@ -869,7 +869,7 @@ static struct sm_resource_t *vmcs_sm_acquire_global_resource(unsigned int + */ + static void vmcs_sm_release_resource(struct sm_resource_t *resource, int force) + { +- struct SM_PRIV_DATA_T *private = resource->private; ++ struct sm_priv_data_t *private = resource->private; + struct sm_mmap *map, *map_tmp; + struct sm_resource_t *res_tmp; + int ret; +@@ -990,7 +990,7 @@ static void vmcs_sm_host_walk_map_per_pid(int pid) + * Dump the allocation table from host side point of view. This only dumps the + * data allocated for this process/device referenced by the file_data. + */ +-static void vmcs_sm_host_walk_alloc(struct SM_PRIV_DATA_T *file_data) ++static void vmcs_sm_host_walk_alloc(struct sm_priv_data_t *file_data) + { + struct sm_resource_t *resource = NULL; + +@@ -1016,10 +1016,10 @@ static void vmcs_sm_host_walk_alloc(struct SM_PRIV_DATA_T *file_data) + } + + /* Create support for private data tracking. */ +-static struct SM_PRIV_DATA_T *vc_sm_create_priv_data(pid_t id) ++static struct sm_priv_data_t *vc_sm_create_priv_data(pid_t id) + { + char alloc_name[32]; +- struct SM_PRIV_DATA_T *file_data = NULL; ++ struct sm_priv_data_t *file_data = NULL; + + /* Allocate private structure. */ + file_data = kzalloc(sizeof(*file_data), GFP_KERNEL); +@@ -1099,8 +1099,8 @@ static int vc_sm_open(struct inode *inode, struct file *file) + */ + static int vc_sm_release(struct inode *inode, struct file *file) + { +- struct SM_PRIV_DATA_T *file_data = +- (struct SM_PRIV_DATA_T *)file->private_data; ++ struct sm_priv_data_t *file_data = ++ (struct sm_priv_data_t *)file->private_data; + struct sm_resource_t *resource; + int ret = 0; + +@@ -1311,8 +1311,8 @@ static void vcsm_vma_cache_clean_page_range(unsigned long addr, + static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) + { + int ret = 0; +- struct SM_PRIV_DATA_T *file_data = +- (struct SM_PRIV_DATA_T *)file->private_data; ++ struct sm_priv_data_t *file_data = ++ (struct sm_priv_data_t *)file->private_data; + struct sm_resource_t *resource = NULL; + struct sm_mmap *map = NULL; + +@@ -1444,7 +1444,7 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) + } + + /* Allocate a shared memory handle and block. */ +-int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, ++int vc_sm_ioctl_alloc(struct sm_priv_data_t *private, + struct vmcs_sm_ioctl_alloc *ioparam) + { + int ret = 0; +@@ -1555,7 +1555,7 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, + } + + /* Share an allocate memory handle and block.*/ +-int vc_sm_ioctl_alloc_share(struct SM_PRIV_DATA_T *private, ++int vc_sm_ioctl_alloc_share(struct sm_priv_data_t *private, + struct vmcs_sm_ioctl_alloc_share *ioparam) + { + struct sm_resource_t *resource, *shared_resource; +@@ -1617,7 +1617,7 @@ int vc_sm_ioctl_alloc_share(struct SM_PRIV_DATA_T *private, + } + + /* Free a previously allocated shared memory handle and block.*/ +-static int vc_sm_ioctl_free(struct SM_PRIV_DATA_T *private, ++static int vc_sm_ioctl_free(struct sm_priv_data_t *private, + struct vmcs_sm_ioctl_free *ioparam) + { + struct sm_resource_t *resource = +@@ -1643,7 +1643,7 @@ static int vc_sm_ioctl_free(struct SM_PRIV_DATA_T *private, + } + + /* Resize a previously allocated shared memory handle and block. */ +-static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, ++static int vc_sm_ioctl_resize(struct sm_priv_data_t *private, + struct vmcs_sm_ioctl_resize *ioparam) + { + int ret = 0; +@@ -1728,7 +1728,7 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, + } + + /* Lock a previously allocated shared memory handle and block. */ +-static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, ++static int vc_sm_ioctl_lock(struct sm_priv_data_t *private, + struct vmcs_sm_ioctl_lock_unlock *ioparam, + int change_cache, enum vmcs_sm_cache_e cache_type, + unsigned int vc_addr) +@@ -1894,7 +1894,7 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, + } + + /* Unlock a previously allocated shared memory handle and block.*/ +-static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, ++static int vc_sm_ioctl_unlock(struct sm_priv_data_t *private, + struct vmcs_sm_ioctl_lock_unlock *ioparam, + int flush, int wait_reply, int no_vc_unlock) + { +@@ -2071,7 +2071,7 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, + } + + /* Import a contiguous block of memory to be shared with VC. */ +-int vc_sm_ioctl_import_dmabuf(struct SM_PRIV_DATA_T *private, ++int vc_sm_ioctl_import_dmabuf(struct sm_priv_data_t *private, + struct vmcs_sm_ioctl_import_dmabuf *ioparam, + struct dma_buf *src_dma_buf) + { +@@ -2204,8 +2204,8 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + { + int ret = 0; + unsigned int cmdnr = _IOC_NR(cmd); +- struct SM_PRIV_DATA_T *file_data = +- (struct SM_PRIV_DATA_T *)file->private_data; ++ struct sm_priv_data_t *file_data = ++ (struct sm_priv_data_t *)file->private_data; + struct sm_resource_t *resource = NULL; + + /* Validate we can work with this device. */ + +From 690f12efc4e225040a0512c60ae14025883e18df Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Tue, 5 Sep 2017 10:18:33 +0100 +Subject: [PATCH 198/199] vcsm: Replace SM_PDE_T with sm_pde_t + +Follows the Linux kernel coding style + +Signed-off-by: Dave Stevenson +--- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index 9f1ea8269385b9c2cf4f7ab0ca6ba99b3ca12b6c..160e109d780a7badda9e5474a9d38fa9794d0298 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -101,7 +101,7 @@ static const char *const sm_stats_human_read[] = { + }; + + typedef int (*VC_SM_SHOW) (struct seq_file *s, void *v); +-struct SM_PDE_T { ++struct sm_pde_t { + VC_SM_SHOW show; /* Debug fs function hookup. */ + struct dentry *dir_entry; /* Debug fs directory entry. */ + void *priv_data; /* Private data */ +@@ -164,8 +164,8 @@ struct sm_priv_data_t { + pid_t pid; /* PID of creator. */ + + struct dentry *dir_pid; /* Debug fs entries root. */ +- struct SM_PDE_T dir_stats; /* Debug fs entries statistics sub-tree. */ +- struct SM_PDE_T dir_res; /* Debug fs resource sub-tree. */ ++ struct sm_pde_t dir_stats; /* Debug fs entries statistics sub-tree. */ ++ struct sm_pde_t dir_res; /* Debug fs resource sub-tree. */ + + int restart_sys; /* Tracks restart on interrupt. */ + enum vc_sm_msg_type int_action; /* Interrupted action. */ +@@ -179,8 +179,8 @@ struct sm_state_t { + struct sm_instance *sm_handle; /* Handle for videocore service. */ + struct dentry *dir_root; /* Debug fs entries root. */ + struct dentry *dir_alloc; /* Debug fs entries allocations. */ +- struct SM_PDE_T dir_stats; /* Debug fs entries statistics sub-tree. */ +- struct SM_PDE_T dir_state; /* Debug fs entries state sub-tree. */ ++ struct sm_pde_t dir_stats; /* Debug fs entries statistics sub-tree. */ ++ struct sm_pde_t dir_state; /* Debug fs entries state sub-tree. */ + struct dentry *debug; /* Debug fs entries debug. */ + + struct mutex map_lock; /* Global map lock. */ +@@ -636,9 +636,9 @@ static int vc_sm_statistics_show(struct seq_file *s, void *v) + struct sm_priv_data_t *file_data; + struct sm_resource_t *resource; + int res_count = 0; +- struct SM_PDE_T *p_pde; ++ struct sm_pde_t *p_pde; + +- p_pde = (struct SM_PDE_T *)(s->private); ++ p_pde = (struct sm_pde_t *)(s->private); + file_data = (struct sm_priv_data_t *)(p_pde->priv_data); + + if (file_data == NULL) +@@ -693,9 +693,9 @@ static int vc_sm_alloc_show(struct seq_file *s, void *v) + struct sm_priv_data_t *file_data; + struct sm_resource_t *resource; + int alloc_count = 0; +- struct SM_PDE_T *p_pde; ++ struct sm_pde_t *p_pde; + +- p_pde = (struct SM_PDE_T *)(s->private); ++ p_pde = (struct sm_pde_t *)(s->private); + file_data = (struct sm_priv_data_t *)(p_pde->priv_data); + + if (!file_data) +@@ -738,9 +738,9 @@ static int vc_sm_alloc_show(struct seq_file *s, void *v) + + static int vc_sm_seq_file_show(struct seq_file *s, void *v) + { +- struct SM_PDE_T *sm_pde; ++ struct sm_pde_t *sm_pde; + +- sm_pde = (struct SM_PDE_T *)(s->private); ++ sm_pde = (struct sm_pde_t *)(s->private); + + if (sm_pde && sm_pde->show) + sm_pde->show(s, v); + +From 30db193f6e05590ca820269fd68d4ac19016ebbc Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 5 Sep 2017 16:24:03 +0100 +Subject: [PATCH 199/199] vcsm: Handle the clean+invalidate case directly + +--- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 66 +++++++++++++++++++++-------------- + 1 file changed, 39 insertions(+), 27 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index 160e109d780a7badda9e5474a9d38fa9794d0298..034ae2f27f870621af9f49453501f1cde051f32a 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -218,6 +218,32 @@ static const char *const sm_cache_map_vector[] = { + }; + #endif + ++typedef void cache_flush_op_fn(const void *, const void *); ++ ++#if defined(CONFIG_CPU_CACHE_V7) ++extern cache_flush_op_fn v7_dma_inv_range; ++extern cache_flush_op_fn v7_dma_clean_range; ++static cache_flush_op_fn * const flushops[4] = ++{ ++ 0, ++ v7_dma_inv_range, ++ v7_dma_clean_range, ++ v7_dma_flush_range, ++}; ++#elif defined(CONFIG_CPU_CACHE_V6) ++extern cache_flush_op_fn v6_dma_inv_range; ++extern cache_flush_op_fn v6_dma_clean_range; ++static cache_flush_op_fn * const flushops[4] = ++{ ++ 0, ++ v6_dma_inv_range, ++ v6_dma_clean_range, ++ v6_dma_flush_range, ++}; ++#else ++#error Unknown cache config ++#endif ++ + /* ---- Private Function Prototypes -------------------------------------- */ + + /* ---- Private Functions ------------------------------------------------ */ +@@ -2984,7 +3010,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + ret = -EFAULT; + goto out; + } +- block = kcalloc(ioparam.op_count, ++ block = kmalloc(ioparam.op_count * + sizeof(struct vmcs_sm_ioctl_clean_invalid_block), + GFP_KERNEL); + if (!block) { +@@ -3000,35 +3026,21 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + } + + for (i = 0; i < ioparam.op_count; i++) { +- struct vmcs_sm_ioctl_clean_invalid_block *op = block + i; ++ const struct vmcs_sm_ioctl_clean_invalid_block * const op = block + i; ++ cache_flush_op_fn * const op_fn = flushops[op->invalidate_mode & 3]; + +- for (j = 0; j < op->block_count; ++j) { ++ if ((op->invalidate_mode & ~3) != 0) { ++ ret = -EINVAL; ++ break; ++ } + ++ if (op_fn == 0) ++ continue; + +- extern void v6_dma_inv_range(void *start, void *end); +- extern void v6_dma_clean_range(void *start, void *end); +- unsigned long base = (unsigned long)op->start_address + j * op->inter_block_stride; +- unsigned long end = base + op->block_size; +- /* L1/L2 cache clean */ +- if (op->invalidate_mode & 2) { +-#if defined(CONFIG_CPU_CACHE_V7) +- extern void v7_dma_clean_range(void *start, void *end); +- v7_dma_clean_range((void *)base, (void *)end); +-#elif defined(CONFIG_CPU_CACHE_V6) +- extern void v6_dma_clean_range(void *start, void *end); +- v6_dma_clean_range((void *)base, (void *)end); +-#endif +- /* L1/L2 cache invalidate */ +- } +- if (op->invalidate_mode & 1) { +-#if defined(CONFIG_CPU_CACHE_V7) +- extern void v7_dma_inv_range(void *start, void *end); +- v7_dma_inv_range((void *)base, (void *)end); +-#elif defined(CONFIG_CPU_CACHE_V6) +- extern void v6_dma_inv_range(void *start, void *end); +- v6_dma_inv_range((void *)base, (void *)end); +-#endif +- } ++ for (j = 0; j < op->block_count; ++j) { ++ const char * const base = (const char *)op->start_address + j * op->inter_block_stride; ++ const char * const end = base + op->block_size; ++ op_fn(base, end); + } + } + kfree(block); From d5152a2164ba87272e7853dff1f3660f55acb1e1 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Fri, 13 Oct 2017 14:16:15 +0100 Subject: [PATCH 04/16] linux: update to linux-4.13.2 --- packages/linux/package.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/linux/package.mk b/packages/linux/package.mk index f9e29adb56..34917cb6be 100644 --- a/packages/linux/package.mk +++ b/packages/linux/package.mk @@ -63,8 +63,8 @@ case "$LINUX" in PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET imx6-status-led imx6-soc-fan irqbalanced" ;; *) - PKG_VERSION="4.13.1" - PKG_SHA256="decee7a2de34aea921fce3e7934f520790fe43176de29bd9718a84419ca6e1ce" + PKG_VERSION="4.13.2" + PKG_SHA256="064adc177a384a7aee6b18ef5d47c1cea3a43fae1aaa6aa95fdc97eb137ffcd1" PKG_URL="https://www.kernel.org/pub/linux/kernel/v4.x/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_PATCH_DIRS="default" ;; From b3dcd933fc3050e448131228d105f0fa99948fd7 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Fri, 13 Oct 2017 14:16:15 +0100 Subject: [PATCH 05/16] RPi: update linux support patch for linux 4.13.2 --- .../patches/linux/linux-01-RPi_support.patch | 398 +++++++++--------- 1 file changed, 199 insertions(+), 199 deletions(-) diff --git a/projects/RPi/patches/linux/linux-01-RPi_support.patch b/projects/RPi/patches/linux/linux-01-RPi_support.patch index 185ca794d2..116f117051 100644 --- a/projects/RPi/patches/linux/linux-01-RPi_support.patch +++ b/projects/RPi/patches/linux/linux-01-RPi_support.patch @@ -1,4 +1,4 @@ -From c0ef8025df345a15d43f4c2dfc0e620d31bd733e Mon Sep 17 00:00:00 2001 +From a7c5f5699622a8a86f10f0f87e6e0dbe8b12e95b Mon Sep 17 00:00:00 2001 From: Steve Glendinning Date: Thu, 19 Feb 2015 18:47:12 +0000 Subject: [PATCH 001/199] smsx95xx: fix crimes against truesize @@ -48,7 +48,7 @@ index 340c13484e5cc7dd5001577b7522d5a4318bd5b6..7d3d98f0405ad948f9ab3e035a70e15c usbnet_skb_return(dev, ax_skb); } -From 1c84c1665679fdd0068d7fed765386491a91ee49 Mon Sep 17 00:00:00 2001 +From ea7f95f7fa5cb7d80d31193627d90c2c9e6ae2dd Mon Sep 17 00:00:00 2001 From: Sam Nazarko Date: Fri, 1 Apr 2016 17:27:21 +0100 Subject: [PATCH 002/199] smsc95xx: Experimental: Enable turbo_mode and @@ -94,7 +94,7 @@ index 7d3d98f0405ad948f9ab3e035a70e15c667e4fa1..8d34e517db08d895e6135f785c42bf63 netif_dbg(dev, ifup, dev->net, "rx_urb_size=%ld\n", -From 880434cf92735720f5cfc191266fe0fd5bc9cfb4 Mon Sep 17 00:00:00 2001 +From bc924f85dbfd18b8858261b9a3eab89e1300fb10 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 Subject: [PATCH 003/199] Allow mac address to be set in smsc95xx @@ -193,7 +193,7 @@ index 8d34e517db08d895e6135f785c42bf639671815c..5df7e105c41532c3185e46ee54f43a37 eth_hw_addr_random(dev->net); netif_dbg(dev, ifup, dev->net, "MAC address set to eth_random_addr\n"); -From 2a79c6c02f4b2d233b9a601a57ede0e9f1f05e44 Mon Sep 17 00:00:00 2001 +From e809a3bc30bf7cc26016141f5d67b1cae9842475 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 13 Mar 2015 12:43:36 +0000 Subject: [PATCH 004/199] Protect __release_resource against resources without @@ -224,7 +224,7 @@ index 9b5f04404152c296af3a96132f27cfc80ffa9af9..f8a9af6e6b915812be2ba2c1c2b40106 for (;;) { tmp = *p; -From fb3ac3b9d01033534f532fcf381e6cd2897ff023 Mon Sep 17 00:00:00 2001 +From e6c6e7fd1e6ea6e6f69567ab389987f5de19ca79 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 4 Dec 2015 17:41:50 +0000 Subject: [PATCH 005/199] irq-bcm2836: Prevent spurious interrupts, and trap @@ -254,7 +254,7 @@ index e7463e3c08143acae3e8cc5682f918c6a0b07ebd..a8db33b50ad9ff83d284fa54fe4d3b65 #endif } else if (stat) { -From 8d744d7637c556d38d958112260ddbaa453407c7 Mon Sep 17 00:00:00 2001 +From 1a23f9f8acf1fb845d4e36ab74d65b82f1be0ab3 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:33:30 +0000 Subject: [PATCH 006/199] irq-bcm2836: Avoid "Invalid trigger warning" @@ -281,7 +281,7 @@ index a8db33b50ad9ff83d284fa54fe4d3b65f859df0f..c4e151451cf8c8ebde5225515eac2786 static void -From f886f712e6b6fcd52f3d5e893080ae58a22211a4 Mon Sep 17 00:00:00 2001 +From 11fdace9d8f093318a1baa563a0fe80cfb7981de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 12 Jun 2015 19:01:05 +0200 Subject: [PATCH 007/199] irqchip: bcm2835: Add FIQ support @@ -413,7 +413,7 @@ index 44d7c38dde479d771f3552e914bf8c1c1f5019f7..42ff5e6a8e0d532f5b60a1e7af7cc4d9 } -From 7c54bfb906c5315b85c947da06027c4c6bba309a Mon Sep 17 00:00:00 2001 +From 219523948037cd013d47c344b2172bd7c16166aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 23 Oct 2015 16:26:55 +0200 Subject: [PATCH 008/199] irqchip: irq-bcm2835: Add 2836 FIQ support @@ -515,7 +515,7 @@ index 42ff5e6a8e0d532f5b60a1e7af7cc4d941bd5008..eccf6ed025299cb480884f5bcbe77abf for (b = 0; b < NR_BANKS; b++) { for (i = 0; i < bank_irqs[b]; i++) { -From 4627b248f0048227f7fcdf283d891bc1f67a431a Mon Sep 17 00:00:00 2001 +From 3fd120ef50e5b3914008e17f18c4cb59a4c6010f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 10:26:09 +0100 Subject: [PATCH 009/199] spidev: Add "spidev" compatible string to silence @@ -539,7 +539,7 @@ index cda10719d1d1b21b32866d2b79363faa461ab8e1..4f3779d3aa0960640506725bde918075 }; MODULE_DEVICE_TABLE(of, spidev_dt_ids); -From 697efaaf511abb4f49a2f02fc7616111196315db Mon Sep 17 00:00:00 2001 +From 7d9834d2030717ae15fd98ff4d5c62b43f6dd7e8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 3 Jan 2017 18:25:01 +0000 Subject: [PATCH 010/199] Revert "pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP" @@ -841,7 +841,7 @@ index 230883168e99a1a3fecc7916ef0a7e0de7e8b3f1..ff3789a11b3c36b922b9d08035abb638 if (IS_ERR(pc->pctl_dev)) { gpiochip_remove(&pc->gpio_chip); -From 50667c5da8f225a498d1d8c0abc991bf96858cdd Mon Sep 17 00:00:00 2001 +From 4f57071b9819ffd2ff957599813355b846019f28 Mon Sep 17 00:00:00 2001 From: notro Date: Thu, 10 Jul 2014 13:59:47 +0200 Subject: [PATCH 011/199] pinctrl-bcm2835: Set base to 0 give expected gpio @@ -866,7 +866,7 @@ index ff3789a11b3c36b922b9d08035abb638187c2f5a..d2b537572095c86576f78536f737c102 .can_sleep = false, }; -From cfe2553b0cd96571188700b2f8316eb7036eca59 Mon Sep 17 00:00:00 2001 +From b8e7337d276dc67817fa2ee63531878bd6e1886d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 26 Feb 2015 09:58:22 +0000 Subject: [PATCH 012/199] pinctrl-bcm2835: Only request the interrupts listed @@ -896,7 +896,7 @@ index d2b537572095c86576f78536f737c102487f99f4..a9d480df32562defbf8be0faf0a39bfe pc->irq_data[i].irqgroup = i; -From 9dda59819c2cf3ca64ffc5a211be0ae9deddde13 Mon Sep 17 00:00:00 2001 +From d8bc489c37aa1460350ce28389b2698b0f67860d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Jun 2015 14:10:44 +0100 Subject: [PATCH 013/199] spi-bcm2835: Support pin groups other than 7-11 @@ -980,7 +980,7 @@ index f35cc10772f6670397ea923ad30158270dd68578..5dfe20ffc2866fa6789825016c585175 /* and set up the "mode" and level */ dev_info(&spi->dev, "setting up native-CS%i as GPIO %i\n", -From 1857e16e50b7243664507bf679ff08961c1ff373 Mon Sep 17 00:00:00 2001 +From d18b5a8d4af342ac91714fec7e41264d6a914783 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 1 Jul 2016 22:09:24 +0100 Subject: [PATCH 014/199] spi-bcm2835: Disable forced software CS @@ -1017,7 +1017,7 @@ index 5dfe20ffc2866fa6789825016c585175a29705b6..8493474d286f7a1ac6454a22c61c8c2c return 0; } -From d9ece314316906c6d8bd0faeb480d5f52f9f6be2 Mon Sep 17 00:00:00 2001 +From ea9488258ddc1f00a0003c3984f1cee438378ab9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 8 Nov 2016 21:35:38 +0000 Subject: [PATCH 015/199] spi-bcm2835: Remove unused code @@ -1108,7 +1108,7 @@ index 8493474d286f7a1ac6454a22c61c8c2cef9121bf..33d75ad38a7f77d085321ace9101900a } -From 38d5debf709990dc093fa736d3ea722f699840ab Mon Sep 17 00:00:00 2001 +From 0db6b7e0494f20e30285b5089dcf5c55e9f4e672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Wed, 3 Jun 2015 12:26:13 +0200 Subject: [PATCH 016/199] ARM: bcm2835: Set Serial number and Revision @@ -1164,7 +1164,7 @@ index 0c1edfc98696da0e0bb7f4a18cdfbcdd27a9795d..8f152266ba9b470df2eaaed9ebcf158e static const char * const bcm2835_compat[] = { -From ba48f8c54271772e424ed3e227bbd10a54a7d71b Mon Sep 17 00:00:00 2001 +From 8180a30d797d5b2f7ac24178b66e4be7a8329e80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 3 Oct 2015 22:22:55 +0200 Subject: [PATCH 017/199] dmaengine: bcm2835: Load driver early and support @@ -1270,7 +1270,7 @@ index 6204cc32d09c5096df8aec304c3c37b3bcb6be44..599c218dc8a73172dd4bd4a058fc8f95 MODULE_ALIAS("platform:bcm2835-dma"); MODULE_DESCRIPTION("BCM2835 DMA engine driver"); -From 374f6c02f860169e156d21193ecd76057a398c17 Mon Sep 17 00:00:00 2001 +From 1aa512d02cd19f4cfb743c94bf52e126a6aab9b2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 25 Jan 2016 17:25:12 +0000 Subject: [PATCH 018/199] firmware: Updated mailbox header @@ -1334,7 +1334,7 @@ index cb979ad90401e299344dd5fae38d09c489d8bd58..30fb37fe175df604a738258a2a632bca RPI_FIRMWARE_VCHIQ_INIT = 0x00048010, -From 9c86b4bfa7f318bbbc55a8e055668d624cecc7b0 Mon Sep 17 00:00:00 2001 +From 38d9e18c5e01d03b752bda3a6f1fc0f3ae7bf86c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 15 Jun 2016 16:48:41 +0100 Subject: [PATCH 019/199] rtc: Add SPI alias for pcf2123 driver @@ -1357,7 +1357,7 @@ index 8895f77726e8da5444afcd602dceff8f25a9b3fd..1833b8853ceb0e6147cceb93a00e558c MODULE_LICENSE("GPL"); +MODULE_ALIAS("spi:rtc-pcf2123"); -From 9295b4da9ccbdb9d89ca5e29a9bbb488165ea787 Mon Sep 17 00:00:00 2001 +From 0bc915650477b0a838729554c2542622f3635de7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 7 Oct 2016 16:50:59 +0200 Subject: [PATCH 020/199] watchdog: bcm2835: Support setting reboot partition @@ -1462,7 +1462,7 @@ index b339e0e67b4c1275fd4992fea4f1e24c0575b783..26b7177573fac2af1cd4ab5488d2686f static int bcm2835_wdt_probe(struct platform_device *pdev) -From 174585be9597561522543fb1521ada01a893229d Mon Sep 17 00:00:00 2001 +From 672bf092f0da6498bc85ab600926a3558deef1c9 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 5 Apr 2016 19:40:12 +0100 Subject: [PATCH 021/199] reboot: Use power off rather than busy spinning when @@ -1488,7 +1488,7 @@ index 3b2aa9a9fe268d45335f781c4aa22cf573753a1b..0180d89a34af45c56243fe0f17fbe209 /* -From 3bac0c145da630d2d6d59d2c32ce3f4a79cd2b09 Mon Sep 17 00:00:00 2001 +From b59a4c2617f1ee0d62c81167124ac24c25d241f2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 9 Nov 2016 13:02:52 +0000 Subject: [PATCH 022/199] bcm: Make RASPBERRYPI_POWER depend on PM @@ -1510,7 +1510,7 @@ index 49f1e2a75d614bc21db152327c7b425ae2504f8d..dccd2374ed00631abd441e3e9d78ee74 help This enables support for the RPi power domains which can be enabled -From 1bcc04b9c2cb5a2a72ab16da5f92cccd020c1878 Mon Sep 17 00:00:00 2001 +From 88b8bed65fa73493e980d4f8ec9780f59581882d Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Fri, 2 Sep 2016 16:45:27 +0100 Subject: [PATCH 023/199] Register the clocks early during the boot process, so @@ -1558,7 +1558,7 @@ index 58ce6af8452db9ca8b4d3c380a06e448919f6a8d..11d89d106026f15719ea25047d6f357b MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("BCM2835 clock driver"); -From 7fa1fcb860062fb2edc75665992d5bcd553cc98e Mon Sep 17 00:00:00 2001 +From 2cd8ff99a1e23729e35c6464a32be5510b2d2479 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 6 Dec 2016 17:05:39 +0000 Subject: [PATCH 024/199] bcm2835-rng: Avoid initialising if already enabled @@ -1587,7 +1587,7 @@ index 574211a495491d9d6021dcaefe4274a63ed02055..e66c0fca8c6090e32f72796c0877a1cf err = hwrng_register(&bcm2835_rng_ops); if (err) { -From dc515006b6bb6fb26b41b3ba3ca2cc770c6c1c34 Mon Sep 17 00:00:00 2001 +From 3212252aa0321a5ec8cf4fd69756984f87d11142 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Aug 2016 16:28:44 +0100 Subject: [PATCH 025/199] kbuild: Ignore dtco targets when filtering symbols @@ -1610,7 +1610,7 @@ index 9ffd3dda3889c56a7a72229bed21ff5c49d62856..00da6c9bacbf33334233e22ca5209ade esac | tr ";" "\n" | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/KSYM_\1/p' -From cb7635c5281e962458b556d22b496b5b682600df Mon Sep 17 00:00:00 2001 +From c5260941f2ede85922a645a4e310911c5d74574a Mon Sep 17 00:00:00 2001 From: Robert Tiemann Date: Mon, 20 Jul 2015 11:01:25 +0200 Subject: [PATCH 026/199] BCM2835_DT: Fix I2S register map @@ -1651,7 +1651,7 @@ index 65783de0aedf3da79adc36fd077b7a89954ddb6b..a89fe4220fdc3f26f75ee66daf187554 dmas = <&dma 2>, <&dma 3>; -From 262f5378b7353bcfb20578e70573cd71f5e44ef7 Mon Sep 17 00:00:00 2001 +From 50ecc18dc33dabcc2ced1b4dee5673822ccc01c1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 Subject: [PATCH 027/199] clk-bcm2835: Mark used PLLs and dividers CRITICAL @@ -1682,7 +1682,7 @@ index 11d89d106026f15719ea25047d6f357b4bfcb2c5..fe8f5d65f2749cb3ddc878df61664826 divider->data = data; -From a685d676e7f8b10189e7b2dd95a52bf62b1a22df Mon Sep 17 00:00:00 2001 +From b4f6f6ceec4023b92d2e8924f9d8bfbdbb58fdce Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 Subject: [PATCH 028/199] clk-bcm2835: Add claim-clocks property @@ -1787,7 +1787,7 @@ index fe8f5d65f2749cb3ddc878df616648267441e0ee..92b5e0f5145b32d3bfc3592fe381e8be sizeof(cprman_parent_names)); of_clk_parent_fill(dev->of_node, cprman->real_parent_names, -From 6d889451f7cb79e35ab73ea54e92be3bc763c838 Mon Sep 17 00:00:00 2001 +From 859301a74f46e2ec3087634913262db2a470434a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 6 Mar 2017 09:06:18 +0000 Subject: [PATCH 029/199] clk-bcm2835: Read max core clock from firmware @@ -1905,7 +1905,7 @@ index 92b5e0f5145b32d3bfc3592fe381e8be3cd90c72..336f8c9c44325d0a94e591a8557f7af2 for (i = 0; !of_property_read_u32_index(pdev->dev.of_node, "claim-clocks", -From 9ce26bedac45240e0f26c06a2740e667e696a23c Mon Sep 17 00:00:00 2001 +From e28a4010f2ffb4db99e34661a4bcaccb70c4cb0c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:36:44 +0000 Subject: [PATCH 030/199] sound: Demote deferral errors to INFO level @@ -1943,7 +1943,7 @@ index 13c875e2392a40ec5651d7c12a28b9ac9f3aab85..23d56057e49b5ff6b6c3c352c150fee8 goto _err_defer; } -From cad06a693f80f570ddf05c15350a9b64207ae480 Mon Sep 17 00:00:00 2001 +From e8cd11388ae567c9267fbf2901a3e4413837e45d Mon Sep 17 00:00:00 2001 From: Claggy3 Date: Sat, 11 Feb 2017 14:00:30 +0000 Subject: [PATCH 031/199] Update vfpmodule.c @@ -2083,7 +2083,7 @@ index a71a48e71fffa8626fe90106815376c44bbe679b..d6c0a5a0a5ae3510db3ace5e3f5d3410 /* * Save the userland NEON/VFP state. Under UP, -From e0be6e1b8715ebc9527155fbc68e9c05abf9bd6d Mon Sep 17 00:00:00 2001 +From ff3216e3c1b8c1ac6c7b45c19371b16471afc834 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Mar 2017 21:13:24 +1100 Subject: [PATCH 032/199] ASoC: bcm2835_i2s.c: relax the ch2 register setting @@ -2107,7 +2107,7 @@ index 6ba20498202ed36906b52096893a88867a79269f..56df7d8a43d0aac055a91b0d24aca8e1 format |= BCM2835_I2S_CH1(BCM2835_I2S_CHPOS(ch1pos)); format |= BCM2835_I2S_CH2(BCM2835_I2S_CHPOS(ch2pos)); -From 060a1edd625429eb91e89dbbb414ecd048bdb8e2 Mon Sep 17 00:00:00 2001 +From 5d1b18b32af4ca040892a16ddbf5d0f71e8214cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Tue, 1 Nov 2016 15:15:41 +0100 Subject: [PATCH 033/199] i2c: bcm2835: Add debug support @@ -2299,7 +2299,7 @@ index cd07a69e2e9355540442785f95e90823b05c9d10..47167f403cc8329bd811b47c7011c299 if (i2c_dev->msg_err & BCM2835_I2C_S_ERR) return -EREMOTEIO; -From c7a3bb4ffdf4611b3a0939b79ac3e2c2d312381d Mon Sep 17 00:00:00 2001 +From 3d037db93f7c96c91d15f497be5dd5c57862553b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 Subject: [PATCH 034/199] Main bcm2708/bcm2709 linux port @@ -2490,7 +2490,7 @@ index cfb4b4496dd9f61362dea012176c146120fada07..d9c6c217c4d6a2408abe2665bf7f2700 MODULE_AUTHOR("Lubomir Rintel "); MODULE_DESCRIPTION("BCM2835 mailbox IPC driver"); -From ce7638012ddc3277b86c82a7c0b7096b91fdf6dd Mon Sep 17 00:00:00 2001 +From 00be68ede1ad301334e709edcecba80422fca888 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 Subject: [PATCH 035/199] Add dwc_otg driver @@ -63635,7 +63635,7 @@ index 0000000000000000000000000000000000000000..cdc9963176e5a4a0d5250613b61e26c5 +test_main(); +0; -From 4ca9284f269d7a605e7e4f547309668bcf8f9b4c Mon Sep 17 00:00:00 2001 +From 844987ea9f84c46bc183ff9aea1581065d6a07fa Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 17:06:34 +0100 Subject: [PATCH 036/199] bcm2708 framebuffer driver @@ -67097,7 +67097,7 @@ index 3c14e43b82fefe1d32f591d1b2f61d2cd28d0fa8..7626beb6a5bb8df601ddf0f6e6909d1f +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 278b0bc44b4fc7ebfbc23c479d3aaa328af07795 Mon Sep 17 00:00:00 2001 +From 52f1e764e986ebd07816f26362a5f7d4b020d082 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 Subject: [PATCH 037/199] dmaengine: Add support for BCM2708 @@ -67731,7 +67731,7 @@ index 0000000000000000000000000000000000000000..c5bfff2765be4606077e6c8af73040ec + +#endif /* _PLAT_BCM2708_DMA_H */ -From c2490058d14f3bc40a41ccd80be9da800bc9f31d Mon Sep 17 00:00:00 2001 +From dec8b5244ace6cbebf14759ba726344bdd451e22 Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:06 +0100 Subject: [PATCH 038/199] MMC: added alternative MMC driver @@ -69456,7 +69456,7 @@ index 0000000000000000000000000000000000000000..4fe8d1fe44578fbefcd48f8c327ba3d0 +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Gellert Weisz"); -From be2f4cc3a33dc133234a2bb7553652ee95ce5cf3 Mon Sep 17 00:00:00 2001 +From f2db02848cd70f0722f41acb56363971ee9c4729 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Mar 2015 17:49:47 +0000 Subject: [PATCH 039/199] Adding bcm2835-sdhost driver, and an overlay to @@ -71865,7 +71865,7 @@ index 0000000000000000000000000000000000000000..9c6f199a7830959f31012d86bc1f8b1a +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Phil Elwell"); -From d2a80e57c13c2c153b7e8b8dba361c1b8692ba1a Mon Sep 17 00:00:00 2001 +From f310a1afb6420cc8453e79412d81022e6a601be2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 28 Oct 2016 15:36:43 +0100 Subject: [PATCH 040/199] vc_mem: Add vc_mem driver for querying firmware @@ -72393,7 +72393,7 @@ index 0000000000000000000000000000000000000000..20a475377eb3078ea1ecaef2b24efc35 + +#endif /* _VC_MEM_H */ -From 84929fb2f82a7f5b0a2fbe12617a665196f8599b Mon Sep 17 00:00:00 2001 +From 22acb3e4e7b0bafd9292d9ef30c083ef18b377da Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Tue, 22 Jul 2014 15:41:04 +0100 Subject: [PATCH 041/199] vcsm: VideoCore shared memory service for BCM2835 @@ -76851,7 +76851,7 @@ index 0000000000000000000000000000000000000000..334f36d0d697b047df2922b5f2db67f3 + +#endif /* __VMCS_SM_IOCTL_H__INCLUDED__ */ -From cc56debc252777c1212638269c1b22702e66e575 Mon Sep 17 00:00:00 2001 +From 54dbad72f925213c1d1dbb49b7f3beb4cd6f903d Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Fri, 21 Aug 2015 23:14:48 +0100 Subject: [PATCH 042/199] Add /dev/gpiomem device for rootless user GPIO access @@ -77162,7 +77162,7 @@ index 0000000000000000000000000000000000000000..f5e7f1ba8fb6f18dee77fad06a17480c +MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace"); +MODULE_AUTHOR("Luke Wren "); -From 49a86dca3ebee1a82de6e6926eda0073c63b6679 Mon Sep 17 00:00:00 2001 +From d3452b6add04eb41f7e5a09e4f01564b60097792 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:14:45 +0100 Subject: [PATCH 043/199] Add SMI driver @@ -79116,7 +79116,7 @@ index 0000000000000000000000000000000000000000..ee3a75edfc033eeb0d90a687ffb68b10 + +#endif /* BCM2835_SMI_H */ -From c8ba2948c4be512930cac3e5b91747c12db1da59 Mon Sep 17 00:00:00 2001 +From c8104c25a060cf241303b97395eddc0fb3ea147f Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Tue, 26 Apr 2016 14:59:21 +0000 Subject: [PATCH 044/199] MISC: bcm2835: smi: use clock manager and fix reload @@ -79289,7 +79289,7 @@ index 63a4ea08b9930a3a31a985f0a1d969b488ed49ec..1261540703127d1d63b9f3c87042c6e5 return 0; } -From af1adb0b5369053c77b970fd26d894d1d1e42f24 Mon Sep 17 00:00:00 2001 +From d4f1a556543c7c328259d77dcd0b5714117aba16 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:16:10 +0100 Subject: [PATCH 045/199] Add SMI NAND driver @@ -79657,7 +79657,7 @@ index 0000000000000000000000000000000000000000..02adda6da18bd0ba9ab19a104975b79d + ("Driver for NAND chips using Broadcom Secondary Memory Interface"); +MODULE_AUTHOR("Luke Wren "); -From 3f10836ba73c3243ce82d4db696aebbdf1e8062e Mon Sep 17 00:00:00 2001 +From 0a89639705fca9304c067c288364b9997c4b37a7 Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 Subject: [PATCH 046/199] lirc: added support for RaspberryPi GPIO @@ -80520,7 +80520,7 @@ index 0000000000000000000000000000000000000000..fb69624ccef00ddbdccf8256d6baf1b1 + +#endif -From b19b4f31feb4344c91b7a7a8fe2b865f26a235a0 Mon Sep 17 00:00:00 2001 +From 53134e4c000e21874d0a50c3d416b3728a3a621a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 Subject: [PATCH 047/199] Add cpufreq driver @@ -80790,7 +80790,7 @@ index 0000000000000000000000000000000000000000..414fbdc10dfbfc6e4bb47870a7af3fd5 +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); -From 08d5cb79d90de584c1c50b0105b9b09201722ae6 Mon Sep 17 00:00:00 2001 +From 5efe200e855b813f52f9b651554e077af87dec1f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 15:44:08 +0100 Subject: [PATCH 048/199] Add Chris Boot's i2c driver @@ -81458,7 +81458,7 @@ index 0000000000000000000000000000000000000000..962f2e5c7455d91bf32925d785f5f16b +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); -From a986279e4623e0ea9fa652445ee4be39081f31cf Mon Sep 17 00:00:00 2001 +From d1a193f2ba50338e517f3fa9e8f1f25401f764a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:27:06 +0200 Subject: [PATCH 049/199] char: broadcom: Add vcio module @@ -81686,7 +81686,7 @@ index 0000000000000000000000000000000000000000..c19bc2075c77879563ef5e59038b5a14 +MODULE_DESCRIPTION("Mailbox userspace access"); +MODULE_LICENSE("GPL"); -From 8ee90476cff1615c2cbb26b5ebfe609e4d6f149d Mon Sep 17 00:00:00 2001 +From a2a6e93609a97bc827d97d746a0678f50f12fcf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:25:01 +0200 Subject: [PATCH 050/199] firmware: bcm2835: Support ARCH_BCM270x @@ -81772,7 +81772,7 @@ index dd506cd3a5b874f9e1acd07efb8cd151bb6145d1..3f070bd38a91511c986e3fb114b15bd4 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("Raspberry Pi firmware driver"); -From bca807b5aaf5a51bbe552b128d0e1f7da0b9ca80 Mon Sep 17 00:00:00 2001 +From ac7a24adc1031d34e81e8d3116f92cd6fd47d978 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 May 2015 09:00:42 +0100 Subject: [PATCH 051/199] scripts: Add mkknlimg and knlinfo scripts from tools @@ -82302,7 +82302,7 @@ index 0000000000000000000000000000000000000000..84be2593ec1de8f97b0167ff06b3e05d + return $trailer; +} -From 28c36d896d2fde6815cbe6a644c8e5d6c0e4f518 Mon Sep 17 00:00:00 2001 +From 9f3ce085aca3f7c192c9dcd61a19bff71a9c728a Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:46:08 +0200 Subject: [PATCH 052/199] BCM2708: Add core Device Tree support @@ -93750,7 +93750,7 @@ index 58c05e5d9870b6c18a72da7dc44ff3112994946d..9842523b225a88505d796cc689c04f40 # Bzip2 -From 254e07fa77675b31244fb9a84bf4a2c423fa8a30 Mon Sep 17 00:00:00 2001 +From e4e9fdf96b298ae5f105873a2da8dc9eacf43a82 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Feb 2015 13:50:57 +0000 Subject: [PATCH 053/199] BCM270x_DT: Add pwr_led, and the required "input" @@ -93928,7 +93928,7 @@ index 64c56d454f7df9f864a5242ce4212df586f66886..3fd74c8737871cb56f0355c858fc135e /* set_brightness_work / blink_timer flags, atomic, private. */ unsigned long work_flags; -From 87d1f0938731dbcb98ec31c6b6d4246d4533a5cd Mon Sep 17 00:00:00 2001 +From 0134f80b9e4f4886bc47c824a98d9eb60df581bd Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 Subject: [PATCH 054/199] fbdev: add FBIOCOPYAREA ioctl @@ -94199,7 +94199,7 @@ index fb795c3b3c178ad3cd7c9e9e4547ffd492bac181..703fa8a70574323abe2fb32599254582 __u32 dx; /* screen-relative */ __u32 dy; -From 6916b81b798eefd9ceb95eb50627117608b4f451 Mon Sep 17 00:00:00 2001 +From b3cd2630679656e1ebf8110ec0d8c815a1605305 Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 Subject: [PATCH 055/199] Speed up console framebuffer imageblit function @@ -94411,7 +94411,7 @@ index a2bb276a8b2463eee98eb237c4647bc00cd93601..436494fba15abecb400ef28688466faf start_index, pitch_index); } else -From 707c7c4548d85e7d7dce820fa46529843408545a Mon Sep 17 00:00:00 2001 +From 22578d48c455b5fec9cf2b84b8c7f0fa6c76b7dd Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 Subject: [PATCH 056/199] enabling the realtime clock 1-wire chip DS1307 and @@ -94664,7 +94664,7 @@ index 90cbe7e65059f6b604a87c6bf39cd9bbeae7684c..a52be51ee0a5511a75d4eaa8dacaec5e u8, w1_slave_found_callback); }; -From e41ab7ae06a93ef0c4b78d14bcb8e82c5b947e28 Mon Sep 17 00:00:00 2001 +From 23e1f567155092f061d3d38276f0cd687b5c9e83 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 14 Jul 2014 22:02:09 +0100 Subject: [PATCH 057/199] hid: Reduce default mouse polling interval to 60Hz @@ -94699,7 +94699,7 @@ index c008847e0b20a2accb00451b10fb1c648f67925b..4a86428a3b4e3d51e9ac6ce9c9c11097 break; case HID_GD_JOYSTICK: -From cdda900d07b28dbb9345b916861252ca167b6b1e Mon Sep 17 00:00:00 2001 +From c9d870633a4f03f4cc0b38795005ef7baad96913 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Tue, 12 May 2015 14:47:56 +0100 Subject: [PATCH 058/199] rpi-ft5406: Add touchscreen driver for pi LCD display @@ -95060,7 +95060,7 @@ index 30fb37fe175df604a738258a2a632bca3bfff33f..4a3d79d3b48eb483a4e4bf498f617515 RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From 760ef6fcb57abe6a1db43c38efd8bfd881f4b632 Mon Sep 17 00:00:00 2001 +From ba7812c211cefae21ae8306d758968dc53c96ea4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 28 Nov 2016 16:50:04 +0000 Subject: [PATCH 059/199] Improve __copy_to_user and __copy_from_user @@ -96638,7 +96638,7 @@ index 17ec37811c32f09126ed42753037e055c5cec115..c08f81812d0d56a0d90c1eb6777d0622 bool "Broadcom BCM63xx DSL SoC" depends on ARCH_MULTI_V7 -From d6b095b294a15dc298cc4f5e6d2a91be5e040486 Mon Sep 17 00:00:00 2001 +From a482095b44fc466ef5413acdc5b018e239f9b86f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 25 Jun 2015 12:16:11 +0100 Subject: [PATCH 060/199] gpio-poweroff: Allow it to work on Raspberry Pi @@ -96676,7 +96676,7 @@ index be3d81ff51cc3f510d85e4eed7a52960e51e7bc1..a030ae9fb1fca325061c093696e82186 "%s: pm_power_off function already registered", __func__); -From 25251ff87ca45c92a7c74e68587ba96e8ccd7d70 Mon Sep 17 00:00:00 2001 +From e46351a7c352589fadd3f09ef0f64d1e2890e355 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 14:32:47 +0100 Subject: [PATCH 061/199] mfd: Add Raspberry Pi Sense HAT core driver @@ -97544,7 +97544,7 @@ index 0000000000000000000000000000000000000000..56196dc2af10e464a1e3f98b028dca1c + +#endif -From 8601452700f05c77b2368b01dac0db7721b0390f Mon Sep 17 00:00:00 2001 +From 8fe782927b4e226c4b5de92a5edcf60609abf0d3 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 Subject: [PATCH 062/199] ASoC: Add support for HifiBerry DAC @@ -97722,7 +97722,7 @@ index 0000000000000000000000000000000000000000..ee9f133953544629282631e5ef3f73fe +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); -From 281166ab55ccc24f9eeb7b72a2ecfdd580d37b3a Mon Sep 17 00:00:00 2001 +From b828e0be04229dd55be53a90a8a4cf886fbe873b Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 25 Jan 2016 15:48:59 +0000 Subject: [PATCH 063/199] ASoC: Add support for Rpi-DAC @@ -98009,7 +98009,7 @@ index 0000000000000000000000000000000000000000..afe1b419582aa40c4b2729d242bb13cd +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From de08c6cbae3e35f1b3c77836cc3b740394e002b1 Mon Sep 17 00:00:00 2001 +From 26f6ab87f4d58944fca7d44e0610817bd076dd7f Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 Subject: [PATCH 064/199] ASoC: wm8804: Implement MCLK configuration options, @@ -98061,7 +98061,7 @@ index af95d648265b3e92e345101542b332aee35191d4..513f56ba132929662802d15cdc653af3 .component_driver = { .dapm_widgets = wm8804_dapm_widgets, -From c4c4c2def63057e2a10cb563db6ad37d400d680c Mon Sep 17 00:00:00 2001 +From 56646d5f24756eca58ed3440b55ed429bc7142ea Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 Subject: [PATCH 065/199] ASoC: BCM:Add support for HiFiBerry Digi. Driver is @@ -98408,7 +98408,7 @@ index 0000000000000000000000000000000000000000..7620dd02de40b6d644ff038b445d375d +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); -From cc8c37ea04c575b57ef52345c5959ade7ffef299 Mon Sep 17 00:00:00 2001 +From b72345f423788161b0fc0756c154037ec9bd936f Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 Subject: [PATCH 066/199] Add IQaudIO Sound Card support for Raspberry Pi @@ -98746,7 +98746,7 @@ index 0000000000000000000000000000000000000000..1ee4097c846376666775272ed692ca33 +MODULE_DESCRIPTION("ASoC Driver for IQAudio DAC"); +MODULE_LICENSE("GPL v2"); -From 0688bcd09c8d89959ca4974fcd57d5e32f2818b0 Mon Sep 17 00:00:00 2001 +From fb1da40f188d589a92d1dbd8f8e3651b046f8bb6 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 10:06:56 +0200 Subject: [PATCH 067/199] Added support for HiFiBerry DAC+ @@ -99379,7 +99379,7 @@ index 72b19e62f6267698aea45d2410d616d91c1825cb..c6839ef6e16754ed9de2698507b8986a dev_err(dev, "No LRCLK?\n"); return -EINVAL; -From 61b6a93d26d82226bc51b7a0e56e78d1b95d8ac3 Mon Sep 17 00:00:00 2001 +From 07f31e445056ae254574bcb0aa5b137e313456ca Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 11:09:58 +0200 Subject: [PATCH 068/199] Added driver for HiFiBerry Amp amplifier add-on board @@ -100217,7 +100217,7 @@ index 0000000000000000000000000000000000000000..8f019e04898754d2f87e9630137be9e8 + +#endif /* _TAS5713_H */ -From 443e7d0bca07aee073c197d5429cc7a6c20da529 Mon Sep 17 00:00:00 2001 +From 1af9d405621dac8d88598aa164a562fe8d6d538d Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 25 Mar 2015 09:26:17 +0100 Subject: [PATCH 069/199] Add driver for rpi-proto @@ -100435,7 +100435,7 @@ index 0000000000000000000000000000000000000000..fadbfade100228aaafabb0d3bdf35c01 +MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to PROTO board (WM8731)"); +MODULE_LICENSE("GPL"); -From 5c7bbbec5ea19ab3ad27138803cc392ded3359c1 Mon Sep 17 00:00:00 2001 +From b6103893ec46b0ff2b52844cf5d8ad6fd39fb89d Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:03:47 +0100 Subject: [PATCH 070/199] RaspiDAC3 support @@ -100681,7 +100681,7 @@ index 0000000000000000000000000000000000000000..ad2b5b89bc8213dc2e277306ef50d6e3 +MODULE_DESCRIPTION("ASoC Driver for RaspiDAC Rev.3x"); +MODULE_LICENSE("GPL v2"); -From 9aece405c1735a0c20066c75d57b6da40edb1b4f Mon Sep 17 00:00:00 2001 +From 2e068793a621e2a7fbfb197fb21f789fcd5b455c Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Thu, 7 Apr 2016 21:26:21 +0100 Subject: [PATCH 071/199] Add Support for JustBoom Audio boards @@ -101140,7 +101140,7 @@ index 0000000000000000000000000000000000000000..909cf8928f2f4313982316f9c5b8a709 +MODULE_DESCRIPTION("ASoC Driver for JustBoom PI Digi HAT Sound Card"); +MODULE_LICENSE("GPL v2"); -From 12b89895a8ffc4222b381111c37303ec1cd0d7c7 Mon Sep 17 00:00:00 2001 +From b13456be95b5491610b2c3f90d51dd493e66fd07 Mon Sep 17 00:00:00 2001 From: Andrey Grodzovsky Date: Tue, 3 May 2016 22:10:59 -0400 Subject: [PATCH 072/199] ARM: adau1977-adc: Add basic machine driver for @@ -101325,7 +101325,7 @@ index 0000000000000000000000000000000000000000..f3d7e5db7bb912e1d7ca6f8e8d42df5f +MODULE_DESCRIPTION("ASoC Driver for ADAU1977 ADC"); +MODULE_LICENSE("GPL v2"); -From 0dd1a66f045710d880bfa5c96c53d883b39e27cd Mon Sep 17 00:00:00 2001 +From febd89d8cfbc208427f73be72677dab14ef0e7ff Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Mon, 16 May 2016 21:36:31 +1000 Subject: [PATCH 073/199] New AudioInjector.net Pi soundcard with low jitter @@ -101579,7 +101579,7 @@ index 0000000000000000000000000000000000000000..ef54e0f07ea03f59e9957b5d98f3e7fd +MODULE_ALIAS("platform:audioinjector-pi-soundcard"); + -From da3f26748547b6d52f1b35c375a45205aba921cf Mon Sep 17 00:00:00 2001 +From c60859b3ba64eb5f9f87d96fde38ffb9a2c2060b Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Thu, 30 Jun 2016 18:38:42 +0100 Subject: [PATCH 074/199] Add IQAudIO Digi WM8804 board support @@ -101882,7 +101882,7 @@ index 0000000000000000000000000000000000000000..33aa2be8a43a12a12cfb5d844dd9732c +MODULE_DESCRIPTION("ASoC Driver for IQAudIO WM8804 Digi"); +MODULE_LICENSE("GPL v2"); -From 04900d8d8c36d123f3c437c6f6ec9b7021619641 Mon Sep 17 00:00:00 2001 +From 22f846750f606e1ed49912f3630940badd4fa217 Mon Sep 17 00:00:00 2001 From: escalator2015 Date: Tue, 24 May 2016 16:20:09 +0100 Subject: [PATCH 075/199] New driver for RRA DigiDAC1 soundcard using WM8741 + @@ -102358,7 +102358,7 @@ index 0000000000000000000000000000000000000000..f200688bb4ae32b90a0ced555aed94b0 +MODULE_DESCRIPTION("ASoC Driver for RRA DigiDAC1"); +MODULE_LICENSE("GPL v2"); -From 5121a600bb82a3c7a835daa4dde1f74eb47ef292 Mon Sep 17 00:00:00 2001 +From b728e43e3e797f3a7c866e00856ce444558b800c Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Sat, 2 Jul 2016 16:26:19 +0100 Subject: [PATCH 076/199] Add support for Dion Audio LOCO DAC-AMP HAT @@ -102534,7 +102534,7 @@ index 0000000000000000000000000000000000000000..65e03741d349a2dc5bd91f69855ea952 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO"); +MODULE_LICENSE("GPL v2"); -From 3aa340cb5d67bf17ddf70b913a7c6804af0ff3d2 Mon Sep 17 00:00:00 2001 +From 167e7592ee54bb4e46e60414786b49d8e1bd90f0 Mon Sep 17 00:00:00 2001 From: Clive Messer Date: Mon, 19 Sep 2016 14:01:04 +0100 Subject: [PATCH 077/199] Allo Piano DAC boards: Initial 2 channel (stereo) @@ -102744,7 +102744,7 @@ index 0000000000000000000000000000000000000000..eaf50fb6dbca1970ae1c6f8662088b0f +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC"); +MODULE_LICENSE("GPL v2"); -From f454c7bbdd01560f2598720c3538fb0915d97f57 Mon Sep 17 00:00:00 2001 +From 52bcbfab198413486560cac989946a0a50d1a411 Mon Sep 17 00:00:00 2001 From: Raashid Muhammed Date: Mon, 27 Mar 2017 12:35:00 +0530 Subject: [PATCH 078/199] Add support for Allo Piano DAC 2.1 plus add-on board @@ -103492,7 +103492,7 @@ index 0000000000000000000000000000000000000000..56e43f98846b41e487b3089813f7edc3 +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC Plus"); +MODULE_LICENSE("GPL v2"); -From 99177cea77971faf0a40928bba8672321560b8a1 Mon Sep 17 00:00:00 2001 +From 56795e108b638269239778c9546b3e5125d4b216 Mon Sep 17 00:00:00 2001 From: BabuSubashChandar Date: Tue, 28 Mar 2017 20:04:42 +0530 Subject: [PATCH 079/199] Add support for Allo Boss DAC add-on board for @@ -104198,7 +104198,7 @@ index 0000000000000000000000000000000000000000..203ab76c7045b081578e23bda1099dd1 +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Boss DAC"); +MODULE_LICENSE("GPL v2"); -From 2b4f81ee788866bccb81d6c116f73120b91ccdc8 Mon Sep 17 00:00:00 2001 +From 305da1e20346a94876830a1c36991e482732d7e6 Mon Sep 17 00:00:00 2001 From: gtrainavicius Date: Sun, 23 Oct 2016 12:06:53 +0300 Subject: [PATCH 080/199] Support for Blokas Labs pisound board @@ -105400,7 +105400,7 @@ index 0000000000000000000000000000000000000000..06ff1e53dc9d860946965b6303577762 +MODULE_DESCRIPTION("ASoC Driver for pisound, http://blokas.io/pisound"); +MODULE_LICENSE("GPL v2"); -From c827b76c4ee6a9da9701f466282c852750d6f427 Mon Sep 17 00:00:00 2001 +From 58114c260582ecc7b7c3d6193b807f25332aa485 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 22 Jan 2017 12:49:37 +0100 Subject: [PATCH 081/199] ASoC: Add driver for Cirrus Logic Audio Card @@ -106468,7 +106468,7 @@ index 0000000000000000000000000000000000000000..ac8651ddff7bd3701dffe22c7fb88352 +MODULE_DESCRIPTION("ASoC driver for Cirrus Logic Audio Card"); +MODULE_LICENSE("GPL"); -From acaf57bbffafca6ac323bb86be1e08e079bcd6bd Mon Sep 17 00:00:00 2001 +From 1b6be09da4dc272f823629fed84e79834c47f73a Mon Sep 17 00:00:00 2001 From: Miquel Date: Fri, 24 Feb 2017 20:51:06 +0100 Subject: [PATCH 082/199] sound: Support for Dion Audio LOCO-V2 DAC-AMP HAT @@ -106666,7 +106666,7 @@ index 0000000000000000000000000000000000000000..a009c49477972a9832175d86f201b035 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO-V2"); +MODULE_LICENSE("GPL v2"); -From 909bf34f09ed99e7dc9160d1c8facdb8ac0b91bb Mon Sep 17 00:00:00 2001 +From 12310f62bb4b4a5c89f021cca2115a83a7ee4b64 Mon Sep 17 00:00:00 2001 From: Fe-Pi Date: Wed, 1 Mar 2017 04:42:43 -0700 Subject: [PATCH 083/199] Add support for Fe-Pi audio sound card. (#1867) @@ -106883,7 +106883,7 @@ index 0000000000000000000000000000000000000000..015b56fd73cc36be5b5eecd17548fd03 +MODULE_DESCRIPTION("ASoC Driver for Fe-Pi Audio"); +MODULE_LICENSE("GPL v2"); -From dc07f0d2ca6061d98ed134edc1cb518579569bd9 Mon Sep 17 00:00:00 2001 +From c3fe735ad32332d59e31c96f687f578c36f79cab Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Mar 2017 20:04:13 +1100 Subject: [PATCH 084/199] Add support for the AudioInjector.net Octo sound card @@ -107288,7 +107288,7 @@ index 0000000000000000000000000000000000000000..dcf403ab37639ba79e38278d7e4b1ade +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:audioinjector-octo-soundcard"); -From 88d45791930a8182c4a958fa2e4a5de27dd9ec25 Mon Sep 17 00:00:00 2001 +From 34aa72ecf4c3bd091d7631cfba2d03066473bd02 Mon Sep 17 00:00:00 2001 From: Peter Malkin Date: Mon, 27 Mar 2017 16:38:21 -0700 Subject: [PATCH 085/199] Driver support for Google voiceHAT soundcard. @@ -107682,7 +107682,7 @@ index 0000000000000000000000000000000000000000..225854b8e5298b3c3018f59a49404354 +MODULE_DESCRIPTION("ASoC Driver for Google voiceHAT SoundCard"); +MODULE_LICENSE("GPL v2"); -From df80b7c7680397e758392a7db950b512d82894b4 Mon Sep 17 00:00:00 2001 +From e8ceba81b9363e64a30ad6845594d86a75c1a0d4 Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 21 Oct 2015 14:55:21 +0100 Subject: [PATCH 086/199] rpi_display: add backlight driver and overlay @@ -107854,7 +107854,7 @@ index 0000000000000000000000000000000000000000..14a0d9b037395497c1fdae2961feccd5 +MODULE_DESCRIPTION("Raspberry Pi mailbox based Backlight Driver"); +MODULE_LICENSE("GPL"); -From 74414ea558e4944606017dea505ccc180f16bac8 Mon Sep 17 00:00:00 2001 +From a03f5c85a90929d12db1e9e30897a6436f386b38 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 23 Feb 2016 19:56:04 +0000 Subject: [PATCH 087/199] bcm2835-virtgpio: Virtual GPIO driver @@ -108131,7 +108131,7 @@ index 4a3d79d3b48eb483a4e4bf498f617515e3ad158f..5f34e1257117fb48013c9926a8a223d6 RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From 5856009e6c33a26c0ed7eaad482be179e102dd6a Mon Sep 17 00:00:00 2001 +From 3223d97f3ef0560bb0c7083d52e99643d9690d26 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 20 Feb 2017 17:01:21 +0000 Subject: [PATCH 088/199] bcm2835-gpio-exp: Driver for GPIO expander via @@ -108460,7 +108460,7 @@ index 5f34e1257117fb48013c9926a8a223d64a598ab7..c819c21b0158a59c1308882e5a40e3f3 /* Dispmanx TAGS */ RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001, -From 1429f8125e1da9b233d79f61a5cbf7a02469fd50 Mon Sep 17 00:00:00 2001 +From 5d42ed1697d9f6fdb7637cdde6f46c16eacb20d0 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 23 Feb 2016 17:26:48 +0000 Subject: [PATCH 089/199] amba_pl011: Don't use DT aliases for numbering @@ -108492,7 +108492,7 @@ index 1888d168a41c87c605962da2605df8ab1c02bd20..e22b9e79836a6aeef4c8f9fb618b9595 uap->old_cr = 0; uap->port.dev = dev; -From c7a41e7ed777fee2617ff4e2a51cba459f18b917 Mon Sep 17 00:00:00 2001 +From d7f2ab8caad1d23361e64cdad22225642052c44d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 1 Mar 2017 16:07:39 +0000 Subject: [PATCH 090/199] amba_pl011: Round input clock up @@ -108581,7 +108581,7 @@ index e22b9e79836a6aeef4c8f9fb618b9595c551500f..4b815abbf9913075885ee60f4d9ad49d /* unregisters the driver also if no more ports are left */ static void pl011_unregister_port(struct uart_amba_port *uap) -From fbe8a3d3438cd6c3e3bfeb60f7c28c045037c6e3 Mon Sep 17 00:00:00 2001 +From 7b6a45cb774c63411740d790044367d1749f97ff Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 3 Dec 2014 13:23:28 +0200 Subject: [PATCH 091/199] OF: DT-Overlay configfs interface @@ -109016,7 +109016,7 @@ index 0000000000000000000000000000000000000000..0037e6868a6cda8706c88194c6a4454b +} +late_initcall(of_cfs_init); -From e2d6f47cb3e1d1f8aa668c5042924bb21f799a4a Mon Sep 17 00:00:00 2001 +From 69ececf62d3dd363cb121a2e8b128e1d1df21298 Mon Sep 17 00:00:00 2001 From: Cheong2K Date: Fri, 26 Feb 2016 18:20:10 +0800 Subject: [PATCH 092/199] brcm: adds support for BCM43341 wifi @@ -109151,7 +109151,7 @@ index f3556122c6ace17c419e13023057861957a507fa..f8d4647016a1cde3d51dd43da07a46ce BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43362_CHIP_ID, 0xFFFFFFFE, 43362), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4339_CHIP_ID, 0xFFFFFFFF, 4339), -From 226c2f122350faed258b25771bee1c67291f56fd Mon Sep 17 00:00:00 2001 +From 5461c6c71453f7674228ec60d38a3a181adc3964 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 17 Feb 2017 15:26:13 +0000 Subject: [PATCH 093/199] brcmfmac: Mute expected startup 'errors' @@ -109178,7 +109178,7 @@ index 508cab2d0817914d454958f92167d350c74d9a5d..987b1f5b999b0ecb68b6ce741b8e3ddb req->alpha2[0], req->alpha2[1]); return; -From 8d02a39e97f408198f347647a1351b03c31b8bfa Mon Sep 17 00:00:00 2001 +From 443f7e71126f42b5033f3236d20c03cf1f51b65a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Dec 2015 13:37:07 +0000 Subject: [PATCH 094/199] hci_h5: Don't send conf_req when ACTIVE @@ -109204,7 +109204,7 @@ index c0e4e26dc30d7c3c6a771b7b86df88c8cf763646..7308287259eedcaf229f8a496a0e3826 if (H5_HDR_LEN(hdr) > 2) h5->tx_win = (data[2] & 0x07); -From 42d9325a007a9a4f166f22f9b09bf37afe6452e1 Mon Sep 17 00:00:00 2001 +From a889c72dbee32229a53ee87a5730c640b8deab30 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 13 Apr 2015 17:16:29 +0100 Subject: [PATCH 095/199] config: Add default configs @@ -111859,7 +111859,7 @@ index 0000000000000000000000000000000000000000..29fd2abc2cbfcaed37cb630b5edffaa5 +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -From ca58cd14d77105a95a2b7abf6660e9453e8a1333 Mon Sep 17 00:00:00 2001 +From 0c614d6ba3bdf1fade22f4f18c3a55654a73f023 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Wed, 24 Aug 2016 03:35:56 -0700 Subject: [PATCH 096/199] Add arm64 configuration and device tree differences. @@ -113276,7 +113276,7 @@ index 0000000000000000000000000000000000000000..e6b09fafa27eed2b762e3d53b55041f7 +CONFIG_LIBCRC32C=y +CONFIG_BCM2835_VCHIQ=n -From c1b44639558d397e5c5efa884a69880ee64d5a5f Mon Sep 17 00:00:00 2001 +From 8a91e5edc927197cf1630416ec6dcc2f8f415840 Mon Sep 17 00:00:00 2001 From: Electron752 Date: Thu, 12 Jan 2017 07:07:08 -0800 Subject: [PATCH 097/199] ARM64: Make it work again on 4.9 (#1790) @@ -113688,7 +113688,7 @@ index e6b09fafa27eed2b762e3d53b55041f793683d27..c7e891d72969a388d9b135a36dbfc9c9 CONFIG_LIBCRC32C=y -CONFIG_BCM2835_VCHIQ=n -From 1e28e06eea4a398c7efd323e4c542aa0c74f8187 Mon Sep 17 00:00:00 2001 +From ba699d70dc35ab69b559362ee0f3ab72eafc5824 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Thu, 12 Jan 2017 19:10:07 -0800 Subject: [PATCH 098/199] ARM64: Enable HDMI audio and vc04_services in @@ -113720,7 +113720,7 @@ index c7e891d72969a388d9b135a36dbfc9c9cb609bf8..4b90f9b64abe9f089ba56b13d5a00de3 CONFIG_BCM2835_MBOX=y # CONFIG_IOMMU_SUPPORT is not set -From 9415b9d030e48d72531f5427ffd2f6eef6a10cfc Mon Sep 17 00:00:00 2001 +From 4745f7114e0a766c19b60c8dbb75290fc9793532 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Thu, 12 Jan 2017 19:14:03 -0800 Subject: [PATCH 099/199] ARM64: Run bcmrpi3_defconfig through savedefconfig. @@ -113768,7 +113768,7 @@ index 4b90f9b64abe9f089ba56b13d5a00de33343bfb9..dac962ca1634662ce7d966f1ffb53b5b CONFIG_FB_TFT_AGM1264K_FL=m CONFIG_FB_TFT_BD663474=m -From 87cdf802723bc18edc7a23a498305a0c034fc7fa Mon Sep 17 00:00:00 2001 +From b1073189a8a4587bc0fc366ca84167202c8d5611 Mon Sep 17 00:00:00 2001 From: Electron752 Date: Sat, 14 Jan 2017 02:54:26 -0800 Subject: [PATCH 100/199] ARM64: Enable Kernel Address Space Randomization @@ -113803,7 +113803,7 @@ index dac962ca1634662ce7d966f1ffb53b5bfa27c506..aae33b4b3c3e736ea7cd3ca242158ad6 CONFIG_BINFMT_MISC=y CONFIG_COMPAT=y -From 5b36fd225f5b04ee9d01fa0d2b1a5be0b194e5a1 Mon Sep 17 00:00:00 2001 +From 4f9ae4d4070553f3600c1017add373cf60aa03b6 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sun, 15 Jan 2017 07:31:59 -0800 Subject: [PATCH 101/199] ARM64: Enable RTL8187/RTL8192CU wifi in build config @@ -113831,7 +113831,7 @@ index aae33b4b3c3e736ea7cd3ca242158ad6ba558aff..b7d762df19b85e369a32cd823dfd0621 CONFIG_ZD1211RW=m CONFIG_MAC80211_HWSIM=m -From c746af6cb3b2197c46621f2430c0ef6f2f9a49e1 Mon Sep 17 00:00:00 2001 +From 22b662614fdf0110e08c561af08eb01e20f90bb7 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:33:51 -0800 Subject: [PATCH 102/199] ARM64/DWC_OTG: Port dwc_otg driver to ARM64 @@ -114177,7 +114177,7 @@ index 6b2c7d0c93f36a63863ff4b0ecc1f3eab77e058b..d7b700ff17821ad1944e36721fe6b2db /** The OS page size */ #define DWC_OS_PAGE_SIZE PAGE_SIZE -From 7df3f200104eb850efc44d8637a8c3bfe9915b76 Mon Sep 17 00:00:00 2001 +From 084d9b5892b4378a088e96823e46050efc59f102 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:43:57 -0800 Subject: [PATCH 103/199] ARM64: Round-Robin dispatch IRQs between CPUs. @@ -114254,7 +114254,7 @@ index c4e151451cf8c8ebde5225515eac2786d6f61d46..9a7ee04ee0d9b7aa734cf3159ed59c19 .name = "bcm2836-gpu", .irq_mask = bcm2836_arm_irqchip_mask_gpu_irq, -From c70733205699a8736e3211e9fcc4252fa1c09182 Mon Sep 17 00:00:00 2001 +From e8c95b8b02b65eb5c3dbbea55415133d36014b7e Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:45:03 -0800 Subject: [PATCH 104/199] ARM64: Enable DWC_OTG Driver In ARM64 Build @@ -114278,7 +114278,7 @@ index b7d762df19b85e369a32cd823dfd062145bdefa7..4d85c231c5ea0244e1b05fb4a5e3c8fd CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE_REALTEK=m -From 01a717501acaf2fa10a897780bc5ceadb90c6e42 Mon Sep 17 00:00:00 2001 +From 48468a21e50ad4bed91d82f8d003b23eb503b43e Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 11 Feb 2017 01:18:31 -0800 Subject: [PATCH 105/199] ARM64: Force hardware emulation of deprecated @@ -114309,7 +114309,7 @@ index f0e6d717885b1fcf3b22f64c10c38f19c25f809d..0cb830d30fb6d2bd26ab572efe893649 case INSN_OBSOLETE: insn->current_mode = INSN_UNDEF; -From a40a623fb150828587960a458d5359be72a5a47a Mon Sep 17 00:00:00 2001 +From e25377a56bf44f29cd8c1f0ce8cabb672c6957a8 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 10 Feb 2017 17:57:08 -0800 Subject: [PATCH 106/199] build/arm64: Add rules for .dtbo files for dts @@ -114337,7 +114337,7 @@ index 9b41f1e3b1a039cd45fe842e10abff0181186fdf..dc2859b8eed168ed52e95c503e7a5ce3 dtbs: prepare scripts -From c461e7d7be901677c7c644fd2cd9900c96d732d4 Mon Sep 17 00:00:00 2001 +From 6e4e26e2dad7cb32b71d00df6352d553c54d517a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 9 May 2016 17:28:18 -0700 Subject: [PATCH 107/199] clk: bcm2835: Mark GPIO clocks enabled at boot as @@ -114378,7 +114378,7 @@ index 336f8c9c44325d0a94e591a8557f7af246adc857..caa05e5ad0b7b5cd683e04fb3591a3df * rate changes on at least of the parents. */ -From 2707c76678d5f062a8bcc7bdcea2cc360012f95b Mon Sep 17 00:00:00 2001 +From 8ba1d51bc8cb9a1660ef5a16b89ece470f9a3f6a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 24 Feb 2015 13:40:50 +0000 Subject: [PATCH 108/199] pinctrl-bcm2835: Fix interrupt handling for GPIOs @@ -114414,7 +114414,7 @@ index a9d480df32562defbf8be0faf0a39bfe06ff71f9..18c92bae3b2e7e9f8208ca0d4487b08b .suppress_bind_attrs = true, }, -From 59dac86438c76757e3486ed71ed0f3547ad2040f Mon Sep 17 00:00:00 2001 +From 7a1439b8ae71715ce37c8172bb02395a2195d917 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 10:06:56 +0000 Subject: [PATCH 109/199] ASoC: Add prompt for ICS43432 codec @@ -114442,7 +114442,7 @@ index aca3a53f08dba8762307f7c25a5d7c5561b9cf71..a3be6e005a895b995897cc007bb85c78 config SND_SOC_INNO_RK3036 tristate "Inno codec driver for RK3036 SoC" -From 6cfd9b45e95966f54ec1ddb7295add5d58eede7b Mon Sep 17 00:00:00 2001 +From a96b3ae65e7787e3aed57728790d890d01c91280 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 16:34:46 +0000 Subject: [PATCH 110/199] bcm2835-aux: Add aux interrupt controller @@ -114609,7 +114609,7 @@ index bd750cf2238d61489811e7d7bd3b5f9950ed53c8..41e0702fae4692221980b0d02aed1ba6 BCM2835_AUX_CLOCK_COUNT, GFP_KERNEL); if (!onecell) -From 541b179130ab76694bf3d62f27c15146c2876f2f Mon Sep 17 00:00:00 2001 +From 41c0b2c6f9d170b84bb010fa176d8bad683bc452 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 29 Apr 2016 10:32:17 -0700 Subject: [PATCH 111/199] mmc: read mmc alias from device tree @@ -114669,7 +114669,7 @@ index 1503412f826cd0e0e9ad37a0554b31596a49eb77..2f5b3cf86293b96b104eac7c6d48a583 kfree(host); return NULL; -From 27a313cf19bffa4d005c6f93db0b5e86425b51a6 Mon Sep 17 00:00:00 2001 +From e4a17cab1aaee3115790fd04fba8c800ef7352d2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 11 May 2016 12:50:33 +0100 Subject: [PATCH 112/199] mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards @@ -114812,7 +114812,7 @@ index 46c73e97e61f08a41d9753079345f5965caebbc5..388c551ed11e9d06ea1c25b6553d47a8 unsigned int erase_size; /* erase size in sectors */ -From be214c817e1c8b75dae09c41df825be00a34a68d Mon Sep 17 00:00:00 2001 +From bc8a54e265eb99330b99592b0a2697527b419a14 Mon Sep 17 00:00:00 2001 From: Yasunari Takiguchi Date: Fri, 14 Apr 2017 10:43:57 +0100 Subject: [PATCH 113/199] This is the driver for Sony CXD2880 DVB-T2/T tuner + @@ -130947,7 +130947,7 @@ index 0000000000000000000000000000000000000000..82e122349055be817eb74ed5bbcd7560 +MODULE_AUTHOR("Sony Semiconductor Solutions Corporation"); +MODULE_LICENSE("GPL v2"); -From f84647ba6a7b448ac028b16837a4a233281d4c5b Mon Sep 17 00:00:00 2001 +From 98e3c0e9fb2766ef037ebe71559f5952f328849a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:18:09 +0100 Subject: [PATCH 114/199] raspberrypi-firmware: Define the MBOX channel in the @@ -130972,7 +130972,7 @@ index c819c21b0158a59c1308882e5a40e3f3fe73cbdf..de2a3dcd562beb752266eaf0070e5586 enum rpi_firmware_property_status { -From 2cc8481ced77925ef4a150b368b33f35a453a55f Mon Sep 17 00:00:00 2001 +From 2e01d3c71c50672a9fcb0b18f1abf66ed22404b8 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:16:19 +0100 Subject: [PATCH 115/199] raspberrypi-firmware: Export the general transaction @@ -131019,7 +131019,7 @@ index de2a3dcd562beb752266eaf0070e55861d553f5f..dc7fd58afd5dddebf9b17065bb069a1d #endif /* __SOC_RASPBERRY_FIRMWARE_H__ */ -From 444cc6c9a1a6245f41cd0d4ed517fb697c10a0bf Mon Sep 17 00:00:00 2001 +From 8504a4123116599240bd60725badc83c4124094a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 08:39:33 +0100 Subject: [PATCH 116/199] drm/vc4: Add a mode for using the closed firmware for @@ -131794,7 +131794,7 @@ index 0000000000000000000000000000000000000000..7dd233eed677c1689492ab95bc864753 + }, +}; -From 22eee465cf18360c31415a35bff8b991d7560223 Mon Sep 17 00:00:00 2001 +From 8974c502145b67e125c609be2e2ce833cbac8894 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Feb 2017 17:09:18 -0800 Subject: [PATCH 117/199] drm/vc4: Name the primary and cursor planes in fkms. @@ -131821,7 +131821,7 @@ index 7dd233eed677c1689492ab95bc86475330d2d63b..e6097046fb25361bc61d657083d95b63 if (type == DRM_PLANE_TYPE_PRIMARY) { vc4_plane->fbinfo = -From e812ab5501b645d4a2939fd4c15eccf7f4c7cf10 Mon Sep 17 00:00:00 2001 +From 6aecce4695f3c447cee0fd40286a0a5cbf90a757 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Feb 2017 17:10:09 -0800 Subject: [PATCH 118/199] drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of @@ -131894,7 +131894,7 @@ index e6097046fb25361bc61d657083d95b634232aabc..72d0b9cffe3d2997d69040c46f4aee11 RPI_FIRMWARE_SET_CURSOR_STATE, &packet_state, -From bb2165fbe6a22c281525245f0c3f1cdfb62968e0 Mon Sep 17 00:00:00 2001 +From f7634a508d916ee80c2c5e13efe3bd0c8a150e01 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 2 Feb 2017 09:42:18 -0800 Subject: [PATCH 119/199] drm/vc4: Fix sending of page flip completion events @@ -131939,7 +131939,7 @@ index 72d0b9cffe3d2997d69040c46f4aee11e22aa213..185f9bd3c1b2d47d0c1fc5293db4199b static void vc4_crtc_handle_page_flip(struct vc4_crtc *vc4_crtc) -From 296a55719cbd424eef3248de8c6845b1fe064150 Mon Sep 17 00:00:00 2001 +From 6f85a018909173940a13cc4c9f64ae9c247d2e6d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 18 Apr 2017 21:43:46 +0100 Subject: [PATCH 120/199] vc4_fkms: Apply firmware overscan offset to hardware @@ -131999,7 +131999,7 @@ index 185f9bd3c1b2d47d0c1fc5293db4199bd8963023..072f377b7423ee603d73ace2bf6d620f return 0; -From b8c3bb12f30704ebe5737db5aaf0890e46b5584b Mon Sep 17 00:00:00 2001 +From ef1fd13268221caf2cf997ee3d66bb5d7b04201e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 16 May 2017 14:39:49 +0100 Subject: [PATCH 121/199] mmc: Change downstream MMC driver CONFIG option @@ -132050,7 +132050,7 @@ index cd3a47d8965958ccf3ac3d186a05bbd437494154..9ba643d3b2e12960f5ce4b0eb5d75c1c obj-$(CONFIG_MMC_WBSD) += wbsd.o obj-$(CONFIG_MMC_AU1X) += au1xmmc.o -From 1a6c973113643f8338a07c7e4df262e2bbc757d0 Mon Sep 17 00:00:00 2001 +From 9cd4ffbb09e60102daf319a8301806cc1025306f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 16 May 2017 19:34:52 +0100 Subject: [PATCH 122/199] config: Add CONFIG_I2C_ROBOTFUZZ_OSIF @@ -132085,7 +132085,7 @@ index 29fd2abc2cbfcaed37cb630b5edffaa5b4994f6e..05d6d108cb2d013588ccc971c83dcd21 CONFIG_SPI_BCM2835=m CONFIG_SPI_BCM2835AUX=m -From d326f9cdd067fb314592215077193120fe5da082 Mon Sep 17 00:00:00 2001 +From dfcd6c4844d7d84e31ff8fc483e986d4a67f9c11 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 18 May 2017 11:40:43 +0100 Subject: [PATCH 123/199] config: Add FB_TFT_ST7789V module @@ -132120,7 +132120,7 @@ index 05d6d108cb2d013588ccc971c83dcd212308f230..54175b3c558e89d56b7d65752bccc6bd CONFIG_FB_TFT_TLS8204=m CONFIG_FB_TFT_UC1701=m -From ffa030ae69d9b214c58ea93a73738503db84c7fd Mon Sep 17 00:00:00 2001 +From 0bae2d1c40795865ccb314128e49f85af7b52dcb Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 18 May 2017 15:36:46 +0100 Subject: [PATCH 124/199] staging: bcm2835-audio: Fix memory corruption @@ -132158,7 +132158,7 @@ index 5f3d8f2339e34834d11edfa8de1d5819e3e32b4f..89f96f3c02805f4114ec9b488e18d00e return ret; } -From af4818a3d2a92c4d5494f0c2a89d79ea1d7554a0 Mon Sep 17 00:00:00 2001 +From f200034fec4863c4af91348dd99ca0a26e328ecc Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 15 May 2017 16:40:05 +0100 Subject: [PATCH 125/199] config: Add CONFIG_TOUCHSCREEN_GOODIX @@ -132193,7 +132193,7 @@ index 54175b3c558e89d56b7d65752bccc6bdaebcfd5a..1d2d27cb950b5e799370b7ca557f4bcb CONFIG_TOUCHSCREEN_RPI_FT5406=m CONFIG_TOUCHSCREEN_USB_COMPOSITE=m -From 0000bac8a1278b1a1b78a938e3fb5e97cc194822 Mon Sep 17 00:00:00 2001 +From 4af04e40619bf2cbc3d51925d782e584c4b2cfd6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 16 May 2017 15:58:00 +0100 Subject: [PATCH 126/199] config: Add CONFIG_TOUCHSCREEN_EDT_FT5X06 @@ -132228,7 +132228,7 @@ index 1d2d27cb950b5e799370b7ca557f4bcb2508169b..de0b998202e23eec39fafce0e8cd346e CONFIG_TOUCHSCREEN_USB_COMPOSITE=m CONFIG_TOUCHSCREEN_STMPE=m -From 0304459815418228cc15a0645598c2da3c063b68 Mon Sep 17 00:00:00 2001 +From c3bb07909a287fb80ae3c0ed356c589b9fa5f4ed Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 22 May 2017 13:35:28 +0100 Subject: [PATCH 127/199] config: Add CONFIG_IPV6_SIT_6RD @@ -132263,7 +132263,7 @@ index de0b998202e23eec39fafce0e8cd346e68817f6c..c4d82bec0aefc191c6049500fbeda6ea CONFIG_IPV6_MULTIPLE_TABLES=y CONFIG_IPV6_SUBTREES=y -From 6aaea037ba350b3fe30184f480e65c53a1dba06f Mon Sep 17 00:00:00 2001 +From cf46fca414a06bf4afc633d2759295983f32b52b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 22 May 2017 15:28:27 +0100 Subject: [PATCH 128/199] config: Add CONFIG_IPV6_ROUTE_INFO @@ -132298,7 +132298,7 @@ index c4d82bec0aefc191c6049500fbeda6ea0a47f590..7d3522df2b28e53cb63a081316891879 CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m -From 800cbca9570bf663f007749736fabd127c713823 Mon Sep 17 00:00:00 2001 +From e10daa78716bca9ad5158baed4fd4227d0a5d1ec Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 25 May 2017 16:04:53 +0100 Subject: [PATCH 129/199] dwc_otg: make periodic scheduling behave properly for @@ -132472,7 +132472,7 @@ index 85a6d431ca54b47dc10573aa72d1ad69d06f2e36..4b1dd9de99e9e08b2e006fb5f8a7ef92 status = check_max_xfer_size(hcd, qh); if (status) { -From a3e19ec5100f95382f64a318192f2d1496f1b2b0 Mon Sep 17 00:00:00 2001 +From bb023a9ad949c9cd663edfe38722b29ba44ffb57 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 26 May 2017 12:50:31 +0100 Subject: [PATCH 130/199] dwc_otg: fiq_fsm: Make isochronous compatibility @@ -132539,7 +132539,7 @@ index 38bf5fc792d32352f9e208e0e90f968599b9bc31..71834cf365e67d7ad995bba7869216c4 return 1; } -From ee3c56dd38f4d066164704ec499346955312b9d4 Mon Sep 17 00:00:00 2001 +From 4cfbb24e2238bb51f10fa60bc822f6bbf1925cab Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 12 Jun 2017 13:05:43 +0100 Subject: [PATCH 131/199] config: Add CONFIG_CAN_GS_USB @@ -132574,7 +132574,7 @@ index 7d3522df2b28e53cb63a0813168918792b65becb..bf0d3fd830a0a0cc9443ef52e7f167eb CONFIG_IRLAN=m CONFIG_IRNET=m -From 07b47fafda89cdf5a75e97c51737a8b1ab486b69 Mon Sep 17 00:00:00 2001 +From 3c9883d6f804e2587367849e3933d61a5602b0a6 Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 12 Jun 2017 16:10:03 +0100 Subject: [PATCH 132/199] dwc_otg: add module parameter int_ep_interval_min @@ -132659,7 +132659,7 @@ index 4b1dd9de99e9e08b2e006fb5f8a7ef92f20c2553..fe8e8f841f03660c2ad49ab8e66193be DWC_DEBUGPL(DBG_HCD, "DWC OTG HCD QH Initialized\n"); -From 4c549a2c20952bf101f0668aab839c78abd4684b Mon Sep 17 00:00:00 2001 +From 1d6e58ced8a05ed7164cb9716c51ba016fb16191 Mon Sep 17 00:00:00 2001 From: P33M Date: Tue, 20 Jun 2017 13:44:01 +0100 Subject: [PATCH 133/199] dwc_otg: fiq_fsm: Add non-periodic TT exclusivity @@ -132829,7 +132829,7 @@ index 71834cf365e67d7ad995bba7869216c4091c3a74..7710370b30363e3170bf9bf522597c5f st->fsm = FIQ_PER_SSPLIT_STARTED; } else { -From 46faca77a318b878f85497c0c00ba58fc7ca6872 Mon Sep 17 00:00:00 2001 +From a345856a599d7b5cdb9269843d39a54628948590 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 26 May 2017 13:03:41 +0100 Subject: [PATCH 134/199] BCM270X_DT: Add midi-uart1 overlay @@ -132930,7 +132930,7 @@ index 0000000000000000000000000000000000000000..e0bc410acbff3a7a175dd5d53b3ab0d0 + }; +}; -From 3fcb98a4d1c28d554f7af00692e0b6d975f1ccfc Mon Sep 17 00:00:00 2001 +From d33071b43b6688a09e4c62697ed1c345ca6e3f13 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Sat, 20 May 2017 22:10:14 +0100 Subject: [PATCH 135/199] overlays: README: remove vestigial SDIO parameters @@ -132987,7 +132987,7 @@ index ec9e7b1941678796facf625b3770c20ed0b15b25..499cd1920fd373702cfbc9f6e0fcaebc (default on: polling once at boot-time) -From b595deb87a6c6fe627083d27e9770fd78d084709 Mon Sep 17 00:00:00 2001 +From c405f6be721dfb65855b0d4ab53404e06bd55342 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 27 Jun 2017 15:07:14 +0100 Subject: [PATCH 136/199] SQUASH: mmc: Apply ERASE_BROKEN quirks correctly @@ -133020,7 +133020,7 @@ index 05c8d7381fff5ae88531129d9a5ddd554bddb43e..c9d5d644688c1509d7febcff0322fbab END_FIXUP }; -From 148f74b9bd4ddb53da30cc68483cda09f3141128 Mon Sep 17 00:00:00 2001 +From bb939d3addc2a8f7b00594d505d5bcd55d937efc Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 11:34:26 +0200 Subject: [PATCH 137/199] ASoC: bcm2835: Add support for TDM modes @@ -133425,7 +133425,7 @@ index 56df7d8a43d0aac055a91b0d24aca8e1b4e308e4..dcacf7f83c9371df539a788ea33fedcf dev->dev = &pdev->dev; dev_set_drvdata(&pdev->dev, dev); -From ed59e6a2dcabd5acbcd729f41e89883903db5f3c Mon Sep 17 00:00:00 2001 +From 434bd197a2ff514fec1b6b586a917c6e456ac677 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 15:30:50 +0200 Subject: [PATCH 138/199] ASoC: bcm2835: Support left/right justified and DSP @@ -133674,7 +133674,7 @@ index dcacf7f83c9371df539a788ea33fedcf97d64690..3a706fda4f39e42efbe12f19d87af9b1 } -From 1d0d7a35213b5f4c125ee3b8ad2683d6bc0416dd Mon Sep 17 00:00:00 2001 +From e8496ced09fb935883a10511297df0824c119a56 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 16:19:54 +0200 Subject: [PATCH 139/199] ASoC: bcm2835: Support additional samplerates up to @@ -133720,7 +133720,7 @@ index 3a706fda4f39e42efbe12f19d87af9b100a348a5..43f5715a0d5dda851731ecf7ff27e76c | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE -From 8c57e176565695388f73a7b32fb03cbd5c3057a8 Mon Sep 17 00:00:00 2001 +From 80825cda0b5cddc0748e4905215516d2e8f107e3 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 16:24:57 +0200 Subject: [PATCH 140/199] ASoC: bcm2835: Enforce full symmetry @@ -133759,7 +133759,7 @@ index 43f5715a0d5dda851731ecf7ff27e76c48fb6e57..2e449d7173fcecbcd647f90a26bd58b6 static bool bcm2835_i2s_volatile_reg(struct device *dev, unsigned int reg) -From e48bde7e25413678347f7df5e7f8c6f7a800414f Mon Sep 17 00:00:00 2001 +From 998ecd6e3522528d2f1bcae09e3d999ee7b9dc3c Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Thu, 6 Jul 2017 18:52:16 +0200 Subject: [PATCH 141/199] config: add missing arizona regulator modules @@ -133812,7 +133812,7 @@ index bf0d3fd830a0a0cc9443ef52e7f167eb704ed152..06d0520e332f21afaa27ac112c0eee6c CONFIG_MEDIA_CAMERA_SUPPORT=y CONFIG_MEDIA_ANALOG_TV_SUPPORT=y -From 90114950656a0d9296e94dbf8a94fffc0446b88a Mon Sep 17 00:00:00 2001 +From 43ecf468282a9d298028b5a46012e7d4e08fc74d Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Tue, 4 Apr 2017 19:20:59 +1000 Subject: [PATCH 142/199] Audioinjector : make the octo and pi sound cards have @@ -133852,7 +133852,7 @@ index ef54e0f07ea03f59e9957b5d98f3e7fdc998e469..491906bbf446826e55dd843f28e4860f .of_match_table = audioinjector_pi_soundcard_of_match, }, -From 25a06d83084ed15b81d56b85174a50192709e86c Mon Sep 17 00:00:00 2001 +From 393c2e823828b6bf72e97ba1fa406eed2f2c3db6 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Tue, 4 Apr 2017 19:23:04 +1000 Subject: [PATCH 143/199] Audioinjector octo : Make the playback and capture @@ -133878,7 +133878,7 @@ index 49115c8e20ce1a2ba5a99feb8983a1cafb052ca2..5e79f4eff93a21ed3495c77a90f73525 }; -From b09654f8d85cb6c9fbc59279bd3f2a4564126b39 Mon Sep 17 00:00:00 2001 +From 5b1e8621f88fa6372610b7fbf723bf195fab00fc Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Sun, 23 Apr 2017 19:36:53 +0100 Subject: [PATCH 144/199] BCM270X_DT: Add bme280 and bmp180 to i2c-sensor @@ -133955,7 +133955,7 @@ index 606b2d5012abf2e85712be631c42ea40a0b512c5..e23e34b32a0a8927c14203d7384e8008 lm75 = <&lm75>,"status"; lm75addr = <&lm75>,"reg:0"; -From b7fc8e2213909c6d61e41b60ef4fc78f3bd89ead Mon Sep 17 00:00:00 2001 +From 837e2bea658bf521059f5a28b39a161aeb7087eb Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Sun, 23 Apr 2017 19:38:06 +0100 Subject: [PATCH 145/199] config: Add CONFIG_BMP280 (and CONFIG_BMP280_I2C) @@ -133991,7 +133991,7 @@ index 06d0520e332f21afaa27ac112c0eee6c36a9a9df..515f335d2a638de60d07a45df19ce52a CONFIG_PWM_PCA9685=m CONFIG_RASPBERRYPI_FIRMWARE=y -From 4f1d23ff9a0a14fbf2917b305c3b0c858bdfaf18 Mon Sep 17 00:00:00 2001 +From b816acaa0d8fb53924639b6de9e59226b0044fc9 Mon Sep 17 00:00:00 2001 From: Scott Ellis Date: Tue, 25 Apr 2017 10:46:09 -0400 Subject: [PATCH 146/199] config: Enable TI TMP102 temp sensor module @@ -134027,7 +134027,7 @@ index 515f335d2a638de60d07a45df19ce52a7579f9ca..bfda35e4c4bce99b5125eab80f97c73a CONFIG_BCM2835_THERMAL=y CONFIG_WATCHDOG=y -From c26f16dc876ad99e7844cd4bf82d4d0f5bbf4f4c Mon Sep 17 00:00:00 2001 +From 71b830eabd648fde8ac9cf14158c667612fdd536 Mon Sep 17 00:00:00 2001 From: Scott Ellis Date: Tue, 25 Apr 2017 13:05:42 -0400 Subject: [PATCH 147/199] BCM270X_DT: Add tmp102 to i2c sensor overlay @@ -134110,7 +134110,7 @@ index e23e34b32a0a8927c14203d7384e800878627347..e86a13f92c3f75c14fa4425cdfb081d6 }; }; -From e1367891bcf2949e985ce41739c6809a3764ee36 Mon Sep 17 00:00:00 2001 +From 9cf926a180a5c1e2ddef1e012a3a6382eb0e6def Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 8 May 2017 16:43:40 +0100 Subject: [PATCH 148/199] irq_bcm2836: Send event when onlining sleeping cores @@ -134149,7 +134149,7 @@ index 9a7ee04ee0d9b7aa734cf3159ed59c19a338de0d..014f13f89eb896f5cfc75ed9891787d0 } -From c1096ba9690c05fe9a6cbea5eb3d9c72e6ee26b9 Mon Sep 17 00:00:00 2001 +From c1f656b7faa555665af9946bf3e586a66258213e Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Mon, 15 May 2017 17:10:53 +0200 Subject: [PATCH 149/199] overlays: Add Goodix overlay @@ -134249,7 +134249,7 @@ index 0000000000000000000000000000000000000000..084f74042ed6379ebd9281374d5391a7 + }; +}; -From e1c8d419eaa87b324f8faa4303b0a075054ce320 Mon Sep 17 00:00:00 2001 +From 7af08623c8ef0a98da5490a87d9cc1e3b4867614 Mon Sep 17 00:00:00 2001 From: chenzhiwo Date: Wed, 17 May 2017 16:34:57 +0800 Subject: [PATCH 150/199] Add device tree overlay for GPIO connected rotary @@ -134344,7 +134344,7 @@ index 0000000000000000000000000000000000000000..c0c6bccff60cc15d9a9bf59d2c7cba41 + }; +}; -From 1c93193e5e386627af60793a8d07fe1ace5dac69 Mon Sep 17 00:00:00 2001 +From 76196f40dbed74eac9240e52c4d91498442ea5c1 Mon Sep 17 00:00:00 2001 From: Anton Onishchenko Date: Tue, 23 May 2017 18:55:46 +0300 Subject: [PATCH 151/199] mpu6050 device tree overlay (#2031) @@ -134462,7 +134462,7 @@ index bfda35e4c4bce99b5125eab80f97c73a159de969..a9841b71a4b633a81392c533578845d6 CONFIG_PWM_BCM2835=m CONFIG_PWM_PCA9685=m -From e8fad7705817fb3df7cfea84330f44ec33a81e1f Mon Sep 17 00:00:00 2001 +From c97964c91a2bceeb94bdb8f63edf39ef67194808 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 31 May 2017 09:33:55 +0100 Subject: [PATCH 152/199] config: Adding SENSOR_JC42 @@ -134505,7 +134505,7 @@ index a9841b71a4b633a81392c533578845d62f6aa78f..2ba46a28c2e7b21a401cc3544353937e CONFIG_SENSORS_SHT21=m CONFIG_SENSORS_SHTC1=m -From 26d098a745698f39dbb3d6b5c047f8ffd6850571 Mon Sep 17 00:00:00 2001 +From 3867f9c70395cfc2c33b0b7a23d80d64a5589b47 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 31 May 2017 15:27:39 +0100 Subject: [PATCH 153/199] BCM270X_DT: Improve i2c-sensor and i2c-rtc overlay @@ -134873,7 +134873,7 @@ index e86a13f92c3f75c14fa4425cdfb081d6795ff76a..d2f0008addfadac8f6ed774a6e4f3f97 }; }; -From 37967c394186b977fd8ded2df143c105346fbd29 Mon Sep 17 00:00:00 2001 +From 1c7571813a26ad03b886f2b0bf411f08a9892ac7 Mon Sep 17 00:00:00 2001 From: Stefan Tatschner Date: Mon, 29 May 2017 21:46:16 +0200 Subject: [PATCH 154/199] Add device tree config for htu21 @@ -134958,7 +134958,7 @@ index d2f0008addfadac8f6ed774a6e4f3f97871c0d61..17c27e3b666a7a83619471b50c63bb93 }; }; -From 081570902a67ff8f1d521a669a31cf18a7de5ee3 Mon Sep 17 00:00:00 2001 +From 7f73bc13baca73c1428385dcfbdb72deffdac09f Mon Sep 17 00:00:00 2001 From: sandeepal Date: Fri, 2 Jun 2017 18:59:46 +0530 Subject: [PATCH 155/199] Allo Digione Driver (#2048) @@ -135392,7 +135392,7 @@ index 0000000000000000000000000000000000000000..e3664e44c699d0102120ecf99e8b780a +MODULE_DESCRIPTION("ASoC Driver for Allo DigiOne"); +MODULE_LICENSE("GPL v2"); -From 9e07aa4160a12bbe686fa3d8363c90b2d9a0201c Mon Sep 17 00:00:00 2001 +From a936a089e96c837040d822eae274739ea46dd323 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Mon, 5 Jun 2017 16:40:38 +0100 Subject: [PATCH 156/199] dma-bcm2708: Fix module compilation of @@ -135438,7 +135438,7 @@ index c5bfff2765be4606077e6c8af73040ec13ee8974..6ca874d332a8bc666b1c9576ac51f479 #endif /* _PLAT_BCM2708_DMA_H */ -From 3fc44a2838a8ec6407db3952ba1abeab96cdc280 Mon Sep 17 00:00:00 2001 +From d3b2f6efa2d4f208a401f331e7d1ee1313ee7b32 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 20 Jun 2017 17:51:47 +0100 Subject: [PATCH 157/199] bcm2835-cpufreq: Change licence to GPLv2 @@ -135494,7 +135494,7 @@ index 414fbdc10dfbfc6e4bb47870a7af3fd5780f9c9a..99345969b0e4d651fd9033d67de2febb /* ---------- INCLUDES ---------- */ #include -From 195119d1056c9ade9c1e515ec76a841246950439 Mon Sep 17 00:00:00 2001 +From 4ce3dfd1ea9a66cc9f1582a43db0fef011c6309a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 21 Jun 2017 09:03:51 -0700 Subject: [PATCH 158/199] bcm2708: Drop CMA alignment from FKMS mode as well. @@ -135553,7 +135553,7 @@ index 95a595a35cb4fbb707bf4b18161f6a46860aa4ae..36fbf6c8c2e612a6dc5aa02d77cc8173 }; -From b237eda1698d0f8b3d7f301a19bcd22c5a022e02 Mon Sep 17 00:00:00 2001 +From c7ab84da6b4e2bc7257567b056247fed250a1c4b Mon Sep 17 00:00:00 2001 From: Steve Conner Date: Thu, 29 Jun 2017 15:56:19 +0100 Subject: [PATCH 159/199] New i2c-rtc-gpio device overlay (#2092) @@ -135820,7 +135820,7 @@ index 0000000000000000000000000000000000000000..8415e6081428fba9a47682964174fc02 + }; +}; -From 1c2f537195ee1225872b67f9e590f018a31458cc Mon Sep 17 00:00:00 2001 +From 547e83222054f994be34a521a2792944576a9930 Mon Sep 17 00:00:00 2001 From: Allo Date: Mon, 3 Jul 2017 15:45:20 +0530 Subject: [PATCH 160/199] PianoPlus: Dual Mono & Dual Stereo features added @@ -136112,7 +136112,7 @@ index 56e43f98846b41e487b3089813f7edc3c08517eb..d4e99e3c6a383d92fb0cf9e8c1cd1e76 } -From d53373d18c9457b4b568a5c677f99948bf168c9b Mon Sep 17 00:00:00 2001 +From 9c8b2225d69f22e5362891045b4490c2c8fa6b47 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Sun, 9 Jul 2017 15:15:22 +0200 Subject: [PATCH 161/199] overlays: Add gpio-shutdown overlay (#2103) @@ -136271,7 +136271,7 @@ index 0000000000000000000000000000000000000000..863fb395c8539734b658682b900e1fbd + +}; -From b3e2ae06f89faa852481a752f72ad723b9c2872d Mon Sep 17 00:00:00 2001 +From 21d1516665338a99d6decc6fe70c5ed47058818c Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Mon, 10 Jul 2017 11:05:17 +0200 Subject: [PATCH 162/199] config: enable generic S/PDIF codec drivers (#2104) @@ -136331,7 +136331,7 @@ index efdb0fbc1b07c7b679cb20d8c1270c77d5d3c684..472a330439a19ac5d4f70c22059f0158 CONFIG_SND_SIMPLE_CARD=m CONFIG_HIDRAW=y -From a3c828c08394e2b4c2dbd383f14a02a5c4a6fd36 Mon Sep 17 00:00:00 2001 +From 542f21c01f0f3e5427ec08548f452eced6ec500b Mon Sep 17 00:00:00 2001 From: Bilal Amarni Date: Wed, 24 May 2017 10:52:50 +0200 Subject: [PATCH 163/199] [ARM64] enable drivers for GPIO expander and vcio @@ -136362,7 +136362,7 @@ index 4d85c231c5ea0244e1b05fb4a5e3c8fd3e651ddf..9dcb58a519d041fadae99c81a7bda621 CONFIG_GPIO_ARIZONA=m CONFIG_GPIO_STMPE=y -From 2e172ac9071f7f9bada854ebdf5c0d2b4d83058d Mon Sep 17 00:00:00 2001 +From 73345bb3d3cd24d3e80531e6be7c05eb123f1655 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 14 Jul 2017 12:59:55 +0100 Subject: [PATCH 164/199] bcm2835-mmc: Fix DMA usage @@ -136400,7 +136400,7 @@ index 4fe8d1fe44578fbefcd48f8c327ba3d03f3d0a2a..981db05de1ff52a83550e41ab362eecf } #endif -From 3306429bf95ee0c901200f0b2d9d48ab0da71670 Mon Sep 17 00:00:00 2001 +From fb6e916972bc742b21a85990d7500046eab1eb17 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 16 Jul 2017 21:39:16 +0100 Subject: [PATCH 165/199] BCM270X_DT: Use the upstream thermal-zones DT node @@ -136456,7 +136456,7 @@ index 29dde110e769082a24640d3c7284afb8e99b226c..8cc83a350d02bb485f7a4fcb129df9e0 + /delete-node/ trips; +}; -From 1387c9b1eaa70ec95ee23541a00558c35290c418 Mon Sep 17 00:00:00 2001 +From 65c5ea6e4cb5b2950f0c27ed8b772e9137c35975 Mon Sep 17 00:00:00 2001 From: Conn Date: Mon, 17 Jul 2017 03:25:43 +0100 Subject: [PATCH 166/199] config: enhance DualShock3 controller support @@ -136508,7 +136508,7 @@ index 472a330439a19ac5d4f70c22059f015816823694..e0dd8723047ff488e81a03ef42fdbc68 CONFIG_HID_SUNPLUS=m CONFIG_HID_GREENASIA=m -From bc31dbda132e79151d52eb4bf1cc394579e01636 Mon Sep 17 00:00:00 2001 +From feb8aaa3a587b0d0586da870c2e3a36bd6b94ad7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 19 Jul 2017 15:20:50 +0100 Subject: [PATCH 167/199] overlays: i2c1-bcm2708: Don't overwrite i2c1 pins @@ -136556,7 +136556,7 @@ index e303b9c61c82a28eab7b48f6b085661574d5a849..7c69047bcd88a5c900dddd08e60ad075 }; }; -From ce85845a5685a4434480ad5dfd40db9874f6420e Mon Sep 17 00:00:00 2001 +From 9bc65e4fd1f183b88b75b8f39b75dc1a67c9fcf6 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 18 Jul 2017 15:30:48 +0100 Subject: [PATCH 168/199] bcm2835-mmc: Prevent DMA race condition @@ -136626,7 +136626,7 @@ index 981db05de1ff52a83550e41ab362eecf99cafa29..c4a5e992c6fb4a40b933239350ed4bfc static void bcm2835_mmc_finish_command(struct bcm2835_host *host) -From 15a60a588cd4c94bdc2a64b299022a87b026492a Mon Sep 17 00:00:00 2001 +From 4e41bebdfecead7b710734c79718629edd6a9ba7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sven=20K=C3=B6hler?= Date: Mon, 7 Aug 2017 18:49:20 +0200 Subject: [PATCH 169/199] Fix dependencies broken since driver was renamed @@ -136649,7 +136649,7 @@ index d47cce77c0551d78fa51f50e2c8086f26c7b9e56..dc41121c101e2ac6fe000fe2ab556561 default 2 help -From 654e2f24028ac2d6e77a73a721abef0370d97e0e Mon Sep 17 00:00:00 2001 +From 0ffd02d1a31a96cf40000d077a80d32cd0a35ead Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 18 Dec 2014 16:07:15 -0800 Subject: [PATCH 170/199] mm: Remove the PFN busy warning @@ -136677,7 +136677,7 @@ index 1423da8dd16f5bdc83e20ddf6665b2022a9a6492..6ce930c02160d55dc4eee1e7197a5efa goto done; } -From 8b77f5ca66868bf1818caa3fe5e82da9ed865ab4 Mon Sep 17 00:00:00 2001 +From efc0b3db0e9f0358308a9cfd121282d2d4b3057d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 25 Aug 2017 19:18:13 +0100 Subject: [PATCH 171/199] cache: export clean and invalidate @@ -136732,7 +136732,7 @@ index de78109d002db1a5e7c94a6c1bc8bb94161d07b8..4c850aa3af2b2439fced4e130441329a sub r3, r2, #1 bic r0, r0, r3 -From f323840a871fd84eef5874ed9c5022f7a56e9d63 Mon Sep 17 00:00:00 2001 +From d3c2586371e3d21fa37fc6a5ed62041769ceea9a Mon Sep 17 00:00:00 2001 From: Olivier Schonken Date: Mon, 28 Aug 2017 10:52:32 +0200 Subject: [PATCH 172/199] Fix DTB overlay compilation for arm64 broadcom @@ -136760,7 +136760,7 @@ index 97af2ececc52ca3aad7b84dc2fdb5c269a45bde0..3b76320112196a1fce7a0941c696fd1e subdir-y := $(dts-dirs) clean-files := *.dtb -From bc2614057d17b6376b461795493a9bc4f504c0f6 Mon Sep 17 00:00:00 2001 +From f3a57e732ea6da07452519cee968db4f1bc5820f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 25 Aug 2017 19:18:26 +0100 Subject: [PATCH 173/199] vcsm: Provide new ioctl to clean/invalidate a 2D @@ -136946,7 +136946,7 @@ index 334f36d0d697b047df2922b5f2db67f38cf76564..2de7f1f41070689c99cad3bd43d11745 #define VMCS_SM_IOCTL_SIZE_USR_HDL\ _IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_SIZE_USR_HANDLE,\ -From d174670aa6c4cd1b1d2aba4562c1d8af40858cc5 Mon Sep 17 00:00:00 2001 +From b9111ab4c7fe798b294e9485630750431b5dd5fa Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 15 Feb 2017 11:16:05 +0000 Subject: [PATCH 174/199] VCSM: Specify pointers in IPC msgs as uint32_t @@ -137183,7 +137183,7 @@ index d49e39566d521c95a96375c556516e444d52b6a0..1afea701625157e9d9bc9570240c0b1a error: -From 3236e9ea6a3af523b256026f0c78e9a5e9d1e986 Mon Sep 17 00:00:00 2001 +From 27e934896b9c0685c6d49f8d3f4fac692bcd6cb5 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 19 May 2017 14:29:12 +0100 Subject: [PATCH 175/199] vcsm: code-style: Fix comment indentation @@ -137296,7 +137296,7 @@ index 5e279f5a95fac7227cea15941bf0570ddc2b0886..f8e555dc30074e7ff226cf34a96aa30a VC_SM_ACTION_CLEAN_T *action_clean); -From 68bbef13e2711d22165067282f7443c73f968114 Mon Sep 17 00:00:00 2001 +From 4d48640616c8d5f0f7800ea60fd427dacef89c3e Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 25 Aug 2017 15:58:57 +0100 Subject: [PATCH 176/199] vcsm: Convert to loading via device tree. @@ -137438,7 +137438,7 @@ index 1afea701625157e9d9bc9570240c0b1afb186f56..eb0d3f8a8c27863a5469d0ac224aab65 MODULE_AUTHOR("Broadcom"); MODULE_DESCRIPTION("VideoCore SharedMemory Driver"); -From 21fe405f7bab7c5c07c80ffa82458562dc10a1ce Mon Sep 17 00:00:00 2001 +From b99343baef75676dc3192f9fc71eb6a703cbb4ae Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 15 Feb 2017 11:17:44 +0000 Subject: [PATCH 177/199] VCSM: New option to import a DMABUF for VPU use @@ -138043,7 +138043,7 @@ index 2de7f1f41070689c99cad3bd43d117458549cb51..b75729d762f25aace133f7a008633b40 /* ---- Function Prototypes ---------------------------------------------- */ -From f74c08227346d8a282e2fdc804310b24317c1ca6 Mon Sep 17 00:00:00 2001 +From eb3b64dfcae6eb6adcbbd2c9f8292faa967cc129 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 1 Sep 2017 16:26:12 +0100 Subject: [PATCH 178/199] vcsm: Remove all typedefs from vc_sm_defs.h and @@ -138550,7 +138550,7 @@ index 520f343f3f4b828f3045fc4ff3fb0d8a68bb1f9d..e67d96d54ad82bd51393268c830a5116 struct vmcs_sm_ioctl_alloc ioparam = { 0 }; int ret; -From f9e9c821229711f4590f93592825948f39b24045 Mon Sep 17 00:00:00 2001 +From e590f31b520dd4cac2556c30ae4f7cce04415894 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 1 Sep 2017 16:29:53 +0100 Subject: [PATCH 179/199] vcsm: Correct block comment style on licence headers. @@ -138745,7 +138745,7 @@ index e67d96d54ad82bd51393268c830a51169f62b097..b121de3c2502e3d7fb6ef1c1b5e4d797 /* ---- Include Files ----------------------------------------------------- */ -From b891a362c3e1ea487b0561b4bfe0c21d44343337 Mon Sep 17 00:00:00 2001 +From 8319293c88f09bc266aee8e0451a5e7934587903 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 1 Sep 2017 16:34:13 +0100 Subject: [PATCH 180/199] vcsm: Fix block comment formatting @@ -138823,7 +138823,7 @@ index 110db20ef517af9589616e5892c5b48681e62966..48e721c7f2e4ac5abe376a8481e01b0b /* -From 9cfc23038c5df5316a860ff911caafa0f9d407f7 Mon Sep 17 00:00:00 2001 +From e5473bf342fcd4a4e3b3fd80c057d21a41f84c98 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 1 Sep 2017 16:50:29 +0100 Subject: [PATCH 181/199] vcsm: Remove typedef of VC_VCHI_SM_HANDLE_T @@ -139042,7 +139042,7 @@ index b121de3c2502e3d7fb6ef1c1b5e4d797d1f5d233..8c13dab0f59c959226194214d36d9b5c struct dentry *dir_alloc; /* Debug fs entries allocations. */ struct SM_PDE_T dir_stats; /* Debug fs entries statistics sub-tree. */ -From f790babcb244d493b2988b4d3528acc1232ce01d Mon Sep 17 00:00:00 2001 +From 4ca3276fb4a30f6c1f44d41faa1769cef1e3c90c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 1 Sep 2017 16:55:08 +0100 Subject: [PATCH 182/199] vcsm: "unsigned int" preferred over "unsigned" fixed. @@ -139081,7 +139081,7 @@ index 8c13dab0f59c959226194214d36d9b5c8c6b1818..8bea643957622cb19b9daac124447fe9 unsigned long pfn = vc_addr & 0x3FFFFFFF; pfn += mm_vc_mem_phys_addr; -From a7348ba2deb173782cb1d132ef88fb7773bbfc04 Mon Sep 17 00:00:00 2001 +From 2d10ce1a39ed212bf01e9431578d970874607bdb Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 1 Sep 2017 16:59:49 +0100 Subject: [PATCH 183/199] vcsm: Fix blank lines after declarations. @@ -139161,7 +139161,7 @@ index 8bea643957622cb19b9daac124447fe90558e47c..abee526d6fbbddb8c31096cafdcd6981 -From 5b9dcc594c4c11855547e61b9ab1a97a85962b9a Mon Sep 17 00:00:00 2001 +From be8605f2967a6a59ae6b32a9381717240980616a Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 1 Sep 2017 17:01:11 +0100 Subject: [PATCH 184/199] vcsm: Fix erroneous space in 'if' statement. @@ -139185,7 +139185,7 @@ index abee526d6fbbddb8c31096cafdcd69814590d750..6d4729980ebf7dd7b76444dcabf3c854 cached &= ~0x80; } -From f42f0921569abb774b3d3b0afade8fc9502d7891 Mon Sep 17 00:00:00 2001 +From 520fa3d662564695842f90684b77e5de587e90b8 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 1 Sep 2017 17:21:09 +0100 Subject: [PATCH 185/199] vcsm: Fix lots of block quote formatting issues @@ -140742,7 +140742,7 @@ index 6d4729980ebf7dd7b76444dcabf3c85477b51fd4..f93f18d3c24e43c9cf79e33f11cba9d1 pr_err("[%s]: invalid input\n", __func__); return -EPERM; -From 1425d69839100270659e2c8d634afba48d5bd57c Mon Sep 17 00:00:00 2001 +From c706af18d535efef6c572e801db4cb2e4626afe7 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 1 Sep 2017 17:29:37 +0100 Subject: [PATCH 186/199] vcsm: Fix indentation of switch/case statement. @@ -140818,7 +140818,7 @@ index f93f18d3c24e43c9cf79e33f11cba9d1806f3124..9627a2b187130a68a15ea6fe46a72cf6 } } -From 0825e0228c00a66d6a553467ffbdab50f4fe6763 Mon Sep 17 00:00:00 2001 +From 4acacac866fa956ca26124fbc01784e9e19445d2 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 1 Sep 2017 17:24:48 +0100 Subject: [PATCH 187/199] vcsm: Fix spaces around operators. @@ -140865,7 +140865,7 @@ index 9627a2b187130a68a15ea6fe46a72cf6cb5fe27e..2b29c1f1ad611fe5ad04d0cf7c757370 for (j = 0; j < op->block_count; ++j) { -From e156456b178b2b43d6db635da7953612720e4569 Mon Sep 17 00:00:00 2001 +From 931ff674af5765891fd59828562907a4ef0a3e72 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 1 Sep 2017 17:33:49 +0100 Subject: [PATCH 188/199] vcsm: Fix use of S_IRUGO and use 0444 instead @@ -140913,7 +140913,7 @@ index 2b29c1f1ad611fe5ad04d0cf7c757370c850a5e9..25dc958a35bac88e5ec6e0865d7cf359 /* Create the proc entry children. */ -From 7bd1557a90736e09b4c8ee4e2c9ef5577da1b641 Mon Sep 17 00:00:00 2001 +From fdd78a027d14bf60b26f8e89d8c8391c08b27bfc Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 1 Sep 2017 17:36:11 +0100 Subject: [PATCH 189/199] vcsm: Correct "long unsigned int" to "unsigned long" @@ -141023,7 +141023,7 @@ index 25dc958a35bac88e5ec6e0865d7cf35953d1b70b..8244b365b690f8e2d00a8fae3754ce1f struct vmcs_sm_ioctl_lock_unlock ioparam; int ret; -From 93cfd41b8dde48c4abb4d54a27e85ee44a5544ca Mon Sep 17 00:00:00 2001 +From efa2798b15577ed3143bc36cb63f75c66e986f6b Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 1 Sep 2017 17:38:27 +0100 Subject: [PATCH 190/199] vcsm: Fix "struct vm_operations_struct should @@ -141048,7 +141048,7 @@ index 8244b365b690f8e2d00a8fae3754ce1f8bc23fbf..d8fe579a999d011d0af986a88398ac8b .close = vcsm_vma_close, .fault = vcsm_vma_fault, -From bb96bdcc4eb7d03a61a32256471c52d137297bdb Mon Sep 17 00:00:00 2001 +From 7ade658e79c8be6151b3354f99efe3644318b26d Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 1 Sep 2017 17:45:34 +0100 Subject: [PATCH 191/199] vcsm: Fix "void function return statements are not @@ -141082,7 +141082,7 @@ index d8fe579a999d011d0af986a88398ac8b0947b7f3..ecff69dce678b5125b81ed82b74b9507 /* Create support for private data tracking. */ -From 4e47c87c05563c652cb1510b8184833aaf48e0df Mon Sep 17 00:00:00 2001 +From fdba256e8df20dfb09579518f1eba063aab829e1 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 1 Sep 2017 17:47:32 +0100 Subject: [PATCH 192/199] vcsm: Fix "Prefer kcalloc over kzalloc with multiply" @@ -141108,7 +141108,7 @@ index ecff69dce678b5125b81ed82b74b950720c472b0..ea82a374a5e2ad51cefcfc20ea4265c4 ret = -EFAULT; goto out; -From 8d28d3df62ba49f039a998e2eca7bbc3235864ec Mon Sep 17 00:00:00 2001 +From 90f02b6982a289ed24252d07be2918e23e8fe891 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 1 Sep 2017 17:55:07 +0100 Subject: [PATCH 193/199] vcsm: Remove VC_SM_LOCK_CACHE_MODE_T typedef. @@ -141182,7 +141182,7 @@ index ea82a374a5e2ad51cefcfc20ea4265c436258646..b2452f3d0dfc207deed3703cb3ad4322 struct vmcs_sm_ioctl_lock_unlock ioparam; int ret; -From 7aff1a4e86c2aa8af1e5b29162ba2a78e638bcf2 Mon Sep 17 00:00:00 2001 +From d9b278599bab9340b5218c78f8183a0fc577f889 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 5 Sep 2017 10:12:21 +0100 Subject: [PATCH 194/199] vcsm: Replace SM_RESOURCE_T with sm_resource_t @@ -141478,7 +141478,7 @@ index b2452f3d0dfc207deed3703cb3ad43221af50b46..59e1239b42ba139e29b22017a1b2a669 /* Validate we can work with this device. */ if (!sm_state || !dmabuf || !handle) { -From 600dd0a90e3e54e9635d60750dfe69621c645288 Mon Sep 17 00:00:00 2001 +From ec71f864e5976f147727465843d2a46836aaed1e Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 5 Sep 2017 10:15:25 +0100 Subject: [PATCH 195/199] vcsm: Replace SM_STATS_T with sm_stats_t @@ -141524,7 +141524,7 @@ index 59e1239b42ba139e29b22017a1b2a669bec6b884..08567b018a63cb783d1e66056f64b2d8 uint32_t res_terminated_cnt; /* Forced termination counter. */ -From e81fef4ddc170835dc35a05d8015569bd3f84250 Mon Sep 17 00:00:00 2001 +From e481434fe4b5187aad8f25257fcc16fbf30b569e Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 5 Sep 2017 10:16:07 +0100 Subject: [PATCH 196/199] vcsm: Replace SM_STATE_T with sm_state_t @@ -141577,7 +141577,7 @@ index 08567b018a63cb783d1e66056f64b2d888f10315..39c64c38ce7638592eeb98583fdb2dde struct sm_mmap *map) { -From 34628edd77ed91d466cf9e790158d13a9f37224d Mon Sep 17 00:00:00 2001 +From 7268cef4b7ded9a72301d42efc6c8449b12be89b Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 5 Sep 2017 10:17:18 +0100 Subject: [PATCH 197/199] vcsm: Replace SM_PRIV_DATA_T with sm_priv_data_t @@ -141804,7 +141804,7 @@ index 39c64c38ce7638592eeb98583fdb2ddee981a9ec..9f1ea8269385b9c2cf4f7ab0ca6ba99b /* Validate we can work with this device. */ -From 690f12efc4e225040a0512c60ae14025883e18df Mon Sep 17 00:00:00 2001 +From 68735673c349b79d33822bfe91fc98e54b99f3b9 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 5 Sep 2017 10:18:33 +0100 Subject: [PATCH 198/199] vcsm: Replace SM_PDE_T with sm_pde_t @@ -141888,7 +141888,7 @@ index 9f1ea8269385b9c2cf4f7ab0ca6ba99b3ca12b6c..160e109d780a7badda9e5474a9d38fa9 if (sm_pde && sm_pde->show) sm_pde->show(s, v); -From 30db193f6e05590ca820269fd68d4ac19016ebbc Mon Sep 17 00:00:00 2001 +From 09d3e47d84e7ac57fac2c90607e8a6dda0b82c40 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 5 Sep 2017 16:24:03 +0100 Subject: [PATCH 199/199] vcsm: Handle the clean+invalidate case directly From 3d76b5dca1e52b0836ff60a4a732e76f8297e233 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Fri, 13 Oct 2017 14:16:15 +0100 Subject: [PATCH 06/16] linux: update full range patch from fritsch --- ...99-i915-implement-passthrough-colors.patch | 167 +++++++++++++++--- 1 file changed, 144 insertions(+), 23 deletions(-) diff --git a/packages/linux/patches/default/linux-999-i915-implement-passthrough-colors.patch b/packages/linux/patches/default/linux-999-i915-implement-passthrough-colors.patch index 96c11d30bb..0448469b41 100644 --- a/packages/linux/patches/default/linux-999-i915-implement-passthrough-colors.patch +++ b/packages/linux/patches/default/linux-999-i915-implement-passthrough-colors.patch @@ -1,8 +1,24 @@ +From 81f46f38dc5b67b223774310951ad9ce444c120b Mon Sep 17 00:00:00 2001 +From: fritsch +Date: Sat, 16 Sep 2017 12:42:34 +0200 +Subject: [PATCH] i915: Implement uncompressed Video Range output + +Signed-off-by: fritsch +--- + drivers/gpu/drm/i915/i915_drv.h | 1 + + drivers/gpu/drm/i915/intel_color.c | 11 +++++++---- + drivers/gpu/drm/i915/intel_display.c | 6 ++++-- + drivers/gpu/drm/i915/intel_dp.c | 3 ++- + drivers/gpu/drm/i915/intel_drv.h | 11 +++++++++-- + drivers/gpu/drm/i915/intel_hdmi.c | 16 +++++++++++++--- + drivers/gpu/drm/i915/intel_modes.c | 1 + + 7 files changed, 37 insertions(+), 12 deletions(-) + diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h -index e1f7c97..d99e406 100644 +index 5aecbf795b55..70bd525317c8 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h -@@ -4044,6 +4044,7 @@ __raw_write(64, q) +@@ -4230,6 +4230,7 @@ __raw_write(64, q) #define INTEL_BROADCAST_RGB_AUTO 0 #define INTEL_BROADCAST_RGB_FULL 1 #define INTEL_BROADCAST_RGB_LIMITED 2 @@ -10,48 +26,149 @@ index e1f7c97..d99e406 100644 static inline i915_reg_t i915_vgacntrl_reg(struct drm_i915_private *dev_priv) { +diff --git a/drivers/gpu/drm/i915/intel_color.c b/drivers/gpu/drm/i915/intel_color.c +index ff9ecd211abb..a2dccc64a5a0 100644 +--- a/drivers/gpu/drm/i915/intel_color.c ++++ b/drivers/gpu/drm/i915/intel_color.c +@@ -149,7 +149,7 @@ static void i9xx_load_csc_matrix(struct drm_crtc_state *crtc_state) + (struct drm_color_ctm *)crtc_state->ctm->data; + uint64_t input[9] = { 0, }; + +- if (intel_crtc_state->limited_color_range) { ++ if (intel_crtc_state->limited_color_range && intel_crtc_state->compress_range) { + ctm_mult_by_limited(input, ctm->matrix); + } else { + for (i = 0; i < ARRAY_SIZE(input); i++) +@@ -201,7 +201,8 @@ static void i9xx_load_csc_matrix(struct drm_crtc_state *crtc_state) + * into consideration. + */ + for (i = 0; i < 3; i++) { +- if (intel_crtc_state->limited_color_range) ++ if (intel_crtc_state->limited_color_range && ++ intel_crtc_state->compress_range) + coeffs[i * 3 + i] = + I9XX_CSC_COEFF_LIMITED_RANGE; + else +@@ -225,7 +226,8 @@ static void i9xx_load_csc_matrix(struct drm_crtc_state *crtc_state) + if (INTEL_GEN(dev_priv) > 6) { + uint16_t postoff = 0; + +- if (intel_crtc_state->limited_color_range) ++ if (intel_crtc_state->limited_color_range && ++ intel_crtc_state->compress_range) + postoff = (16 * (1 << 12) / 255) & 0x1fff; + + I915_WRITE(PIPE_CSC_POSTOFF_HI(pipe), postoff); +@@ -236,7 +238,8 @@ static void i9xx_load_csc_matrix(struct drm_crtc_state *crtc_state) + } else { + uint32_t mode = CSC_MODE_YUV_TO_RGB; + +- if (intel_crtc_state->limited_color_range) ++ if (intel_crtc_state->limited_color_range && ++ intel_crtc_state->compress_range) + mode |= CSC_BLACK_SCREEN_OFFSET; + + I915_WRITE(PIPE_CSC_MODE(pipe), mode); +diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c +index 8599e425abb1..4de43eb12f0e 100644 +--- a/drivers/gpu/drm/i915/intel_display.c ++++ b/drivers/gpu/drm/i915/intel_display.c +@@ -7247,7 +7247,8 @@ static void i9xx_set_pipeconf(struct intel_crtc *intel_crtc) + pipeconf |= PIPECONF_PROGRESSIVE; + + if ((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) && +- intel_crtc->config->limited_color_range) ++ intel_crtc->config->limited_color_range && ++ intel_crtc->config->compress_range) + pipeconf |= PIPECONF_COLOR_RANGE_SELECT; + + I915_WRITE(PIPECONF(intel_crtc->pipe), pipeconf); +@@ -8177,7 +8178,8 @@ static void ironlake_set_pipeconf(struct drm_crtc *crtc) + else + val |= PIPECONF_PROGRESSIVE; + +- if (intel_crtc->config->limited_color_range) ++ if (intel_crtc->config->limited_color_range && ++ intel_crtc->config->compress_range) + val |= PIPECONF_COLOR_RANGE_SELECT; + + I915_WRITE(PIPECONF(pipe), val); +diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c +index 887953c0f495..437dd0465be3 100644 +--- a/drivers/gpu/drm/i915/intel_dp.c ++++ b/drivers/gpu/drm/i915/intel_dp.c +@@ -1926,7 +1926,8 @@ static void intel_dp_prepare(struct intel_encoder *encoder, + trans_dp &= ~TRANS_DP_ENH_FRAMING; + I915_WRITE(TRANS_DP_CTL(crtc->pipe), trans_dp); + } else { +- if (IS_G4X(dev_priv) && pipe_config->limited_color_range) ++ if (IS_G4X(dev_priv) && pipe_config->limited_color_range && ++ pipe_config->compress_range) + intel_dp->DP |= DP_COLOR_RANGE_16_235; + + if (adjusted_mode->flags & DRM_MODE_FLAG_PHSYNC) diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h -index d93efb4..0de8a5e 100644 +index 307807672896..35602a1ed471 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h -@@ -652,6 +652,13 @@ struct intel_crtc_state { +@@ -649,11 +649,18 @@ struct intel_crtc_state { + enum transcoder cpu_transcoder; + + /* +- * Use reduced/limited/broadcast rbg range, compressing from the full +- * range fed into the crtcs. ++ * Use reduced/limited/broadcast rbg range. */ bool limited_color_range; + /* + * -+ * Use reduced/limited/broadcast rgb range without compressing. ++ * Compress the input range when doing limited/broadcast rgb range ++ * output. This is the default for Limited 16:235 Output mode. + * + */ -+ bool video_color_range; ++ bool compress_range; + /* Bitmask of encoder types (enum intel_output_type) * driven by the pipe. */ diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c -index ec0779a..42fd4e5 100644 +index e6f8f30ce7bd..4963903f177e 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c -@@ -470,7 +470,7 @@ static void intel_hdmi_set_avi_infoframe(struct drm_encoder *encoder, +@@ -880,7 +880,8 @@ static void intel_hdmi_prepare(struct intel_encoder *encoder, + intel_dp_dual_mode_set_tmds_output(intel_hdmi, true); + + hdmi_val = SDVO_ENCODING_HDMI; +- if (!HAS_PCH_SPLIT(dev_priv) && crtc_state->limited_color_range) ++ if (!HAS_PCH_SPLIT(dev_priv) && crtc_state->limited_color_range ++ && crtc_state->compress_range) + hdmi_val |= HDMI_COLOR_RANGE_16_235; + if (adjusted_mode->flags & DRM_MODE_FLAG_PVSYNC) + hdmi_val |= SDVO_VSYNC_ACTIVE_HIGH; +@@ -1419,9 +1420,18 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder, + pipe_config->has_hdmi_sink && + drm_default_rgb_quant_range(adjusted_mode) == + HDMI_QUANTIZATION_RANGE_LIMITED; ++ pipe_config->compress_range = pipe_config->limited_color_range; ++ } else if (intel_conn_state->broadcast_rgb ++ == INTEL_BROADCAST_RGB_LIMITED) { ++ pipe_config->limited_color_range = true; ++ pipe_config->compress_range = true; ++ } else if (intel_conn_state->broadcast_rgb ++ == INTEL_BROADCAST_RGB_FULL) { ++ pipe_config->limited_color_range = false; ++ pipe_config->compress_range = false; + } else { +- pipe_config->limited_color_range = +- intel_conn_state->broadcast_rgb == INTEL_BROADCAST_RGB_LIMITED; ++ pipe_config->limited_color_range = true; ++ pipe_config->compress_range = false; } - drm_hdmi_avi_infoframe_quant_range(&frame.avi, adjusted_mode, -- crtc_state->limited_color_range ? -+ (crtc_state->limited_color_range || crtc_state->video_color_range) ? - HDMI_QUANTIZATION_RANGE_LIMITED : - HDMI_QUANTIZATION_RANGE_FULL, - intel_hdmi->rgb_quant_range_selectable); -@@ -1370,6 +1370,8 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder, - intel_conn_state->broadcast_rgb == INTEL_BROADCAST_RGB_LIMITED; - } - -+ pipe_config->video_color_range = (intel_conn_state->broadcast_rgb == INTEL_BROADCAST_RGB_VIDEO); -+ if (adjusted_mode->flags & DRM_MODE_FLAG_DBLCLK) { - pipe_config->pixel_multiplier = 2; - clock_8bpc *= 2; diff --git a/drivers/gpu/drm/i915/intel_modes.c b/drivers/gpu/drm/i915/intel_modes.c -index 951e834..d817558 100644 +index 951e834dd274..d817558410eb 100644 --- a/drivers/gpu/drm/i915/intel_modes.c +++ b/drivers/gpu/drm/i915/intel_modes.c @@ -102,6 +102,7 @@ static const struct drm_prop_enum_list broadcast_rgb_names[] = { @@ -62,3 +179,7 @@ index 951e834..d817558 100644 }; void +-- +2.11.0 + + From 6a3f00326fc125043c7c9bf731ae83b4253a049c Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Fri, 13 Oct 2017 14:16:15 +0100 Subject: [PATCH 07/16] linux: update to linux-4.13.3 --- packages/linux/package.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/linux/package.mk b/packages/linux/package.mk index 34917cb6be..0c2636a573 100644 --- a/packages/linux/package.mk +++ b/packages/linux/package.mk @@ -63,8 +63,8 @@ case "$LINUX" in PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET imx6-status-led imx6-soc-fan irqbalanced" ;; *) - PKG_VERSION="4.13.2" - PKG_SHA256="064adc177a384a7aee6b18ef5d47c1cea3a43fae1aaa6aa95fdc97eb137ffcd1" + PKG_VERSION="4.13.3" + PKG_SHA256="03d22c74a102b66341b6f52e72142f0544cea3b413ca78bffe7d2a09e288caab" PKG_URL="https://www.kernel.org/pub/linux/kernel/v4.x/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_PATCH_DIRS="default" ;; From dff3da0091f9943cf34b886df26d7abc624e73ed Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Fri, 13 Oct 2017 14:16:15 +0100 Subject: [PATCH 08/16] RPi: update linux support patch for linux 4.13.3 --- .../patches/linux/linux-01-RPi_support.patch | 14166 ++++------------ 1 file changed, 3465 insertions(+), 10701 deletions(-) diff --git a/projects/RPi/patches/linux/linux-01-RPi_support.patch b/projects/RPi/patches/linux/linux-01-RPi_support.patch index 116f117051..83e925c470 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 a7c5f5699622a8a86f10f0f87e6e0dbe8b12e95b Mon Sep 17 00:00:00 2001 +From 88902a722552e30b8d6249e486eda1ff04fdfa1f Mon Sep 17 00:00:00 2001 From: Steve Glendinning Date: Thu, 19 Feb 2015 18:47:12 +0000 -Subject: [PATCH 001/199] smsx95xx: fix crimes against truesize +Subject: [PATCH 001/129] smsx95xx: fix crimes against truesize smsc95xx is adjusting truesize when it shouldn't, and following a recent patch from Eric this is now triggering warnings. @@ -48,10 +48,10 @@ index 340c13484e5cc7dd5001577b7522d5a4318bd5b6..7d3d98f0405ad948f9ab3e035a70e15c usbnet_skb_return(dev, ax_skb); } -From ea7f95f7fa5cb7d80d31193627d90c2c9e6ae2dd Mon Sep 17 00:00:00 2001 +From ade4a8cacbaefcb895d993c9381aaeeeee31e673 Mon Sep 17 00:00:00 2001 From: Sam Nazarko Date: Fri, 1 Apr 2016 17:27:21 +0100 -Subject: [PATCH 002/199] smsc95xx: Experimental: Enable turbo_mode and +Subject: [PATCH 002/129] smsc95xx: Experimental: Enable turbo_mode and packetsize=2560 by default See: http://forum.kodi.tv/showthread.php?tid=285288 @@ -94,10 +94,10 @@ index 7d3d98f0405ad948f9ab3e035a70e15c667e4fa1..8d34e517db08d895e6135f785c42bf63 netif_dbg(dev, ifup, dev->net, "rx_urb_size=%ld\n", -From bc924f85dbfd18b8858261b9a3eab89e1300fb10 Mon Sep 17 00:00:00 2001 +From 25192933d19d59a14f37215e2ddbb90579503fa6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 003/199] Allow mac address to be set in smsc95xx +Subject: [PATCH 003/129] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -193,10 +193,10 @@ index 8d34e517db08d895e6135f785c42bf639671815c..5df7e105c41532c3185e46ee54f43a37 eth_hw_addr_random(dev->net); netif_dbg(dev, ifup, dev->net, "MAC address set to eth_random_addr\n"); -From e809a3bc30bf7cc26016141f5d67b1cae9842475 Mon Sep 17 00:00:00 2001 +From d500d2894205e2337ed233cf3e8dfad496ebfe21 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 13 Mar 2015 12:43:36 +0000 -Subject: [PATCH 004/199] Protect __release_resource against resources without +Subject: [PATCH 004/129] Protect __release_resource against resources without parents Without this patch, removing a device tree overlay can crash here. @@ -224,10 +224,10 @@ index 9b5f04404152c296af3a96132f27cfc80ffa9af9..f8a9af6e6b915812be2ba2c1c2b40106 for (;;) { tmp = *p; -From e6c6e7fd1e6ea6e6f69567ab389987f5de19ca79 Mon Sep 17 00:00:00 2001 +From 033e8448f979a939698a76dd416690bee818fb5f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 4 Dec 2015 17:41:50 +0000 -Subject: [PATCH 005/199] irq-bcm2836: Prevent spurious interrupts, and trap +Subject: [PATCH 005/129] irq-bcm2836: Prevent spurious interrupts, and trap them early The old arch-specific IRQ macros included a dsb to ensure the @@ -254,10 +254,10 @@ index e7463e3c08143acae3e8cc5682f918c6a0b07ebd..a8db33b50ad9ff83d284fa54fe4d3b65 #endif } else if (stat) { -From 1a23f9f8acf1fb845d4e36ab74d65b82f1be0ab3 Mon Sep 17 00:00:00 2001 +From a07bbe09f1c828d00b67d894c6892271c26e1b4f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:33:30 +0000 -Subject: [PATCH 006/199] irq-bcm2836: Avoid "Invalid trigger warning" +Subject: [PATCH 006/129] irq-bcm2836: Avoid "Invalid trigger warning" Initialise the level for each IRQ to avoid a warning from the arm arch timer code. @@ -281,10 +281,10 @@ index a8db33b50ad9ff83d284fa54fe4d3b65f859df0f..c4e151451cf8c8ebde5225515eac2786 static void -From 11fdace9d8f093318a1baa563a0fe80cfb7981de Mon Sep 17 00:00:00 2001 +From 112959db13883e0ff2f9523468ae8da2828b2dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 12 Jun 2015 19:01:05 +0200 -Subject: [PATCH 007/199] irqchip: bcm2835: Add FIQ support +Subject: [PATCH 007/129] irqchip: bcm2835: Add FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -413,10 +413,10 @@ index 44d7c38dde479d771f3552e914bf8c1c1f5019f7..42ff5e6a8e0d532f5b60a1e7af7cc4d9 } -From 219523948037cd013d47c344b2172bd7c16166aa Mon Sep 17 00:00:00 2001 +From ef67af593f58b62123bbd33bb0cf0f3bc1265e75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 23 Oct 2015 16:26:55 +0200 -Subject: [PATCH 008/199] irqchip: irq-bcm2835: Add 2836 FIQ support +Subject: [PATCH 008/129] irqchip: irq-bcm2835: Add 2836 FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -515,10 +515,49 @@ index 42ff5e6a8e0d532f5b60a1e7af7cc4d941bd5008..eccf6ed025299cb480884f5bcbe77abf for (b = 0; b < NR_BANKS; b++) { for (i = 0; i < bank_irqs[b]; i++) { -From 3fd120ef50e5b3914008e17f18c4cb59a4c6010f Mon Sep 17 00:00:00 2001 +From c91ea2c42ff1dbdb6d9b753128443a47923616b2 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 8 May 2017 16:43:40 +0100 +Subject: [PATCH 009/129] irq_bcm2836: Send event when onlining sleeping cores + +In order to reduce power consumption and bus traffic, it is sensible +for secondary cores to enter a low-power idle state when waiting to +be started. The wfe instruction causes a core to wait until an event +or interrupt arrives before continuing to the next instruction. +The sev instruction sends a wakeup event to the other cores, so call +it from bcm2836_smp_boot_secondary, the function that wakes up the +waiting cores during booting. + +It is harmless to use this patch without the corresponding change +adding wfe to the ARMv7/ARMv8-32 stubs, but if the stubs are updated +and this patch is not applied then the other cores will sleep forever. + +See: https://github.com/raspberrypi/linux/issues/1989 + +Signed-off-by: Phil Elwell +--- + drivers/irqchip/irq-bcm2836.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/drivers/irqchip/irq-bcm2836.c b/drivers/irqchip/irq-bcm2836.c +index c4e151451cf8c8ebde5225515eac2786d6f61d46..bee4d2d2ebacc3233423bb9d825e076b9f52fccd 100644 +--- a/drivers/irqchip/irq-bcm2836.c ++++ b/drivers/irqchip/irq-bcm2836.c +@@ -227,6 +227,9 @@ static int __init bcm2836_smp_boot_secondary(unsigned int cpu, + writel(secondary_startup_phys, + intc.base + LOCAL_MAILBOX3_SET0 + 16 * cpu); + ++ dsb(sy); /* Ensure write has completed before waking the other CPUs */ ++ sev(); ++ + return 0; + } + + +From fdfd3d413d68d2ef3867288479264346469f7431 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 10:26:09 +0100 -Subject: [PATCH 009/199] spidev: Add "spidev" compatible string to silence +Subject: [PATCH 010/129] spidev: Add "spidev" compatible string to silence warning See: https://github.com/raspberrypi/linux/issues/1054 @@ -539,10 +578,10 @@ index cda10719d1d1b21b32866d2b79363faa461ab8e1..4f3779d3aa0960640506725bde918075 }; MODULE_DEVICE_TABLE(of, spidev_dt_ids); -From 7d9834d2030717ae15fd98ff4d5c62b43f6dd7e8 Mon Sep 17 00:00:00 2001 +From 4bea356be10941992f3dcfeac2f7974abb05ed74 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 3 Jan 2017 18:25:01 +0000 -Subject: [PATCH 010/199] Revert "pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP" +Subject: [PATCH 011/129] Revert "pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP" This reverts commit 85ae9e512f437cd09bf61564bdba29ab88bab3e3. --- @@ -841,10 +880,10 @@ index 230883168e99a1a3fecc7916ef0a7e0de7e8b3f1..ff3789a11b3c36b922b9d08035abb638 if (IS_ERR(pc->pctl_dev)) { gpiochip_remove(&pc->gpio_chip); -From 4f57071b9819ffd2ff957599813355b846019f28 Mon Sep 17 00:00:00 2001 +From 1490a00a1591a44f00f128903052e075456a765c Mon Sep 17 00:00:00 2001 From: notro Date: Thu, 10 Jul 2014 13:59:47 +0200 -Subject: [PATCH 011/199] pinctrl-bcm2835: Set base to 0 give expected gpio +Subject: [PATCH 012/129] pinctrl-bcm2835: Set base to 0 give expected gpio numbering Signed-off-by: Noralf Tronnes @@ -866,10 +905,10 @@ index ff3789a11b3c36b922b9d08035abb638187c2f5a..d2b537572095c86576f78536f737c102 .can_sleep = false, }; -From b8e7337d276dc67817fa2ee63531878bd6e1886d Mon Sep 17 00:00:00 2001 +From e60b8d2799a20fab024ac1cff86087763d0c5cd9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 26 Feb 2015 09:58:22 +0000 -Subject: [PATCH 012/199] pinctrl-bcm2835: Only request the interrupts listed +Subject: [PATCH 013/129] pinctrl-bcm2835: Only request the interrupts listed in the DTB Although the GPIO controller can generate three interrupts (four counting @@ -896,10 +935,10 @@ index d2b537572095c86576f78536f737c102487f99f4..a9d480df32562defbf8be0faf0a39bfe pc->irq_data[i].irqgroup = i; -From d8bc489c37aa1460350ce28389b2698b0f67860d Mon Sep 17 00:00:00 2001 +From b91abfd233fffb8f22735c8428f5a8af367f9387 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Jun 2015 14:10:44 +0100 -Subject: [PATCH 013/199] spi-bcm2835: Support pin groups other than 7-11 +Subject: [PATCH 014/129] spi-bcm2835: Support pin groups other than 7-11 The spi-bcm2835 driver automatically uses GPIO chip-selects due to some unreliability of the native ones. In doing so it chooses the @@ -980,10 +1019,10 @@ index f35cc10772f6670397ea923ad30158270dd68578..5dfe20ffc2866fa6789825016c585175 /* and set up the "mode" and level */ dev_info(&spi->dev, "setting up native-CS%i as GPIO %i\n", -From d18b5a8d4af342ac91714fec7e41264d6a914783 Mon Sep 17 00:00:00 2001 +From 142bcdabeeaad29d9aeecf26cf16c4de71764c7f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 1 Jul 2016 22:09:24 +0100 -Subject: [PATCH 014/199] spi-bcm2835: Disable forced software CS +Subject: [PATCH 015/129] spi-bcm2835: Disable forced software CS Select software CS in bcm2708_common.dtsi, and disable the automatic conversion in the driver to allow hardware CS to be re-enabled with an @@ -1017,10 +1056,10 @@ index 5dfe20ffc2866fa6789825016c585175a29705b6..8493474d286f7a1ac6454a22c61c8c2c return 0; } -From ea9488258ddc1f00a0003c3984f1cee438378ab9 Mon Sep 17 00:00:00 2001 +From b32e05f02e7113f460c6cbfa7e28539fc2dd4966 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 8 Nov 2016 21:35:38 +0000 -Subject: [PATCH 015/199] spi-bcm2835: Remove unused code +Subject: [PATCH 016/129] spi-bcm2835: Remove unused code --- drivers/spi/spi-bcm2835.c | 61 ----------------------------------------------- @@ -1108,10 +1147,10 @@ index 8493474d286f7a1ac6454a22c61c8c2cef9121bf..33d75ad38a7f77d085321ace9101900a } -From 0db6b7e0494f20e30285b5089dcf5c55e9f4e672 Mon Sep 17 00:00:00 2001 +From 59fa945c6c2a113a1a19d0d80df344b5d53efe91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Wed, 3 Jun 2015 12:26:13 +0200 -Subject: [PATCH 016/199] ARM: bcm2835: Set Serial number and Revision +Subject: [PATCH 017/129] ARM: bcm2835: Set Serial number and Revision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1164,10 +1203,10 @@ index 0c1edfc98696da0e0bb7f4a18cdfbcdd27a9795d..8f152266ba9b470df2eaaed9ebcf158e static const char * const bcm2835_compat[] = { -From 8180a30d797d5b2f7ac24178b66e4be7a8329e80 Mon Sep 17 00:00:00 2001 +From 851f7772f6ef6d244cddc90cdb8fd50d82193aca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 3 Oct 2015 22:22:55 +0200 -Subject: [PATCH 017/199] dmaengine: bcm2835: Load driver early and support +Subject: [PATCH 018/129] dmaengine: bcm2835: Load driver early and support legacy API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -1270,10 +1309,10 @@ index 6204cc32d09c5096df8aec304c3c37b3bcb6be44..599c218dc8a73172dd4bd4a058fc8f95 MODULE_ALIAS("platform:bcm2835-dma"); MODULE_DESCRIPTION("BCM2835 DMA engine driver"); -From 1aa512d02cd19f4cfb743c94bf52e126a6aab9b2 Mon Sep 17 00:00:00 2001 +From 1baf343ec1f8cecd2bd4b59f38428c08dabea9a5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 25 Jan 2016 17:25:12 +0000 -Subject: [PATCH 018/199] firmware: Updated mailbox header +Subject: [PATCH 019/129] firmware: Updated mailbox header --- include/soc/bcm2835/raspberrypi-firmware.h | 9 +++++++++ @@ -1334,10 +1373,10 @@ index cb979ad90401e299344dd5fae38d09c489d8bd58..30fb37fe175df604a738258a2a632bca RPI_FIRMWARE_VCHIQ_INIT = 0x00048010, -From 38d9e18c5e01d03b752bda3a6f1fc0f3ae7bf86c Mon Sep 17 00:00:00 2001 +From 45420f837ce4f053696b2e43d082b9f51082fb94 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 15 Jun 2016 16:48:41 +0100 -Subject: [PATCH 019/199] rtc: Add SPI alias for pcf2123 driver +Subject: [PATCH 020/129] rtc: Add SPI alias for pcf2123 driver Without this alias, Device Tree won't cause the driver to be loaded. @@ -1357,10 +1396,10 @@ index 8895f77726e8da5444afcd602dceff8f25a9b3fd..1833b8853ceb0e6147cceb93a00e558c MODULE_LICENSE("GPL"); +MODULE_ALIAS("spi:rtc-pcf2123"); -From 0bc915650477b0a838729554c2542622f3635de7 Mon Sep 17 00:00:00 2001 +From 6e7df38d91f738603798f9c5c0e24b191265f187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 7 Oct 2016 16:50:59 +0200 -Subject: [PATCH 020/199] watchdog: bcm2835: Support setting reboot partition +Subject: [PATCH 021/129] watchdog: bcm2835: Support setting reboot partition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1462,10 +1501,10 @@ index b339e0e67b4c1275fd4992fea4f1e24c0575b783..26b7177573fac2af1cd4ab5488d2686f static int bcm2835_wdt_probe(struct platform_device *pdev) -From 672bf092f0da6498bc85ab600926a3558deef1c9 Mon Sep 17 00:00:00 2001 +From ff7e96d10d16caddbe8019ab989a4f5394f4d8a5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 5 Apr 2016 19:40:12 +0100 -Subject: [PATCH 021/199] reboot: Use power off rather than busy spinning when +Subject: [PATCH 022/129] reboot: Use power off rather than busy spinning when halt is requested --- @@ -1488,10 +1527,10 @@ index 3b2aa9a9fe268d45335f781c4aa22cf573753a1b..0180d89a34af45c56243fe0f17fbe209 /* -From b59a4c2617f1ee0d62c81167124ac24c25d241f2 Mon Sep 17 00:00:00 2001 +From 9285772bbe4713f5ae62666f915fadf142945771 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 9 Nov 2016 13:02:52 +0000 -Subject: [PATCH 022/199] bcm: Make RASPBERRYPI_POWER depend on PM +Subject: [PATCH 023/129] bcm: Make RASPBERRYPI_POWER depend on PM --- drivers/soc/bcm/Kconfig | 1 + @@ -1510,10 +1549,10 @@ index 49f1e2a75d614bc21db152327c7b425ae2504f8d..dccd2374ed00631abd441e3e9d78ee74 help This enables support for the RPi power domains which can be enabled -From 88b8bed65fa73493e980d4f8ec9780f59581882d Mon Sep 17 00:00:00 2001 +From dbe71688c63bb1f60fed3b9de5a92884d9646b5a Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Fri, 2 Sep 2016 16:45:27 +0100 -Subject: [PATCH 023/199] Register the clocks early during the boot process, so +Subject: [PATCH 024/129] Register the clocks early during the boot process, so that special/critical clocks can get enabled early on in the boot process avoiding the risk of disabling a clock, pll_divider or pll when a claiming driver fails to install propperly - maybe it needs to defer. @@ -1558,10 +1597,10 @@ index 58ce6af8452db9ca8b4d3c380a06e448919f6a8d..11d89d106026f15719ea25047d6f357b MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("BCM2835 clock driver"); -From 2cd8ff99a1e23729e35c6464a32be5510b2d2479 Mon Sep 17 00:00:00 2001 +From 5f3e30fa16d92cb9a91ea15481218a4509373809 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 6 Dec 2016 17:05:39 +0000 -Subject: [PATCH 024/199] bcm2835-rng: Avoid initialising if already enabled +Subject: [PATCH 025/129] bcm2835-rng: Avoid initialising if already enabled Avoids the 0x40000 cycles of warmup again if firmware has already used it --- @@ -1587,10 +1626,10 @@ index 574211a495491d9d6021dcaefe4274a63ed02055..e66c0fca8c6090e32f72796c0877a1cf err = hwrng_register(&bcm2835_rng_ops); if (err) { -From 3212252aa0321a5ec8cf4fd69756984f87d11142 Mon Sep 17 00:00:00 2001 +From 95a3415f7b64beaf568d328bc4b0c04b1276e216 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Aug 2016 16:28:44 +0100 -Subject: [PATCH 025/199] kbuild: Ignore dtco targets when filtering symbols +Subject: [PATCH 026/129] kbuild: Ignore dtco targets when filtering symbols --- scripts/Kbuild.include | 2 +- @@ -1610,10 +1649,10 @@ index 9ffd3dda3889c56a7a72229bed21ff5c49d62856..00da6c9bacbf33334233e22ca5209ade esac | tr ";" "\n" | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/KSYM_\1/p' -From c5260941f2ede85922a645a4e310911c5d74574a Mon Sep 17 00:00:00 2001 +From 7f5a3c3e22445e1c935f15060d93a6b823446ebf Mon Sep 17 00:00:00 2001 From: Robert Tiemann Date: Mon, 20 Jul 2015 11:01:25 +0200 -Subject: [PATCH 026/199] BCM2835_DT: Fix I2S register map +Subject: [PATCH 027/129] BCM2835_DT: Fix I2S register map --- Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt | 4 ++-- @@ -1651,10 +1690,10 @@ index 65783de0aedf3da79adc36fd077b7a89954ddb6b..a89fe4220fdc3f26f75ee66daf187554 dmas = <&dma 2>, <&dma 3>; -From 50ecc18dc33dabcc2ced1b4dee5673822ccc01c1 Mon Sep 17 00:00:00 2001 +From 93f660db6c7099c40cd8c16d83ae7ff0f9b18861 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 -Subject: [PATCH 027/199] clk-bcm2835: Mark used PLLs and dividers CRITICAL +Subject: [PATCH 028/129] clk-bcm2835: Mark used PLLs and dividers CRITICAL The VPU configures and relies on several PLLs and dividers. Mark all enabled dividers and their PLLs as CRITICAL to prevent the kernel from @@ -1682,10 +1721,10 @@ index 11d89d106026f15719ea25047d6f357b4bfcb2c5..fe8f5d65f2749cb3ddc878df61664826 divider->data = data; -From b4f6f6ceec4023b92d2e8924f9d8bfbdbb58fdce Mon Sep 17 00:00:00 2001 +From f15722cc677ff919810f2c3bc95da69b413abb8e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 -Subject: [PATCH 028/199] clk-bcm2835: Add claim-clocks property +Subject: [PATCH 029/129] clk-bcm2835: Add claim-clocks property The claim-clocks property can be used to prevent PLLs and dividers from being marked as critical. It contains a vector of clock IDs, @@ -1787,10 +1826,10 @@ index fe8f5d65f2749cb3ddc878df616648267441e0ee..92b5e0f5145b32d3bfc3592fe381e8be sizeof(cprman_parent_names)); of_clk_parent_fill(dev->of_node, cprman->real_parent_names, -From 859301a74f46e2ec3087634913262db2a470434a Mon Sep 17 00:00:00 2001 +From 50b91b4c4a65d4ff603623a46c8888c87ce1734b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 6 Mar 2017 09:06:18 +0000 -Subject: [PATCH 029/199] clk-bcm2835: Read max core clock from firmware +Subject: [PATCH 030/129] clk-bcm2835: Read max core clock from firmware The VPU is responsible for managing the core clock, usually under direction from the bcm2835-cpufreq driver but not via the clk-bcm2835 @@ -1905,10 +1944,51 @@ index 92b5e0f5145b32d3bfc3592fe381e8be3cd90c72..336f8c9c44325d0a94e591a8557f7af2 for (i = 0; !of_property_read_u32_index(pdev->dev.of_node, "claim-clocks", -From e28a4010f2ffb4db99e34661a4bcaccb70c4cb0c Mon Sep 17 00:00:00 2001 +From 2fe9423b6ac762dcf113b5f21ba1de91bbec1b4c Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 9 May 2016 17:28:18 -0700 +Subject: [PATCH 031/129] clk: bcm2835: Mark GPIO clocks enabled at boot as + critical. + +These divide off of PLLD_PER and are used for the ethernet and wifi +PHYs source PLLs. Neither of them is currently represented by a phy +device that would grab the clock for us. + +This keeps other drivers from killing the networking PHYs when they +disable their own clocks and trigger PLLD_PER's refcount going to 0. + +v2: Skip marking as critical if they aren't on at boot. + +Signed-off-by: Eric Anholt +--- + drivers/clk/bcm/clk-bcm2835.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 336f8c9c44325d0a94e591a8557f7af246adc857..caa05e5ad0b7b5cd683e04fb3591a3dfcb40823f 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1484,6 +1484,15 @@ static struct clk_hw *bcm2835_register_clock(struct bcm2835_cprman *cprman, + init.flags = data->flags | CLK_IGNORE_UNUSED; + + /* ++ * Some GPIO clocks for ethernet/wifi PLLs are marked as ++ * critical (since some platforms use them), but if the ++ * firmware didn't have them turned on then they clearly ++ * aren't actually critical. ++ */ ++ if ((cprman_read(cprman, data->ctl_reg) & CM_ENABLE) == 0) ++ init.flags &= ~CLK_IS_CRITICAL; ++ ++ /* + * Pass the CLK_SET_RATE_PARENT flag if we are allowed to propagate + * rate changes on at least of the parents. + */ + +From 54e5cd6f19e27a6aa5480cab1cb5f419132de958 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:36:44 +0000 -Subject: [PATCH 030/199] sound: Demote deferral errors to INFO level +Subject: [PATCH 032/129] sound: Demote deferral errors to INFO level At present there is no mechanism to specify driver load order, which can lead to deferrals and repeated retries until successful. @@ -1943,10 +2023,10 @@ index 13c875e2392a40ec5651d7c12a28b9ac9f3aab85..23d56057e49b5ff6b6c3c352c150fee8 goto _err_defer; } -From e8cd11388ae567c9267fbf2901a3e4413837e45d Mon Sep 17 00:00:00 2001 +From 8f6a785e3320079f9a2bca412fa103bb12dbb63f Mon Sep 17 00:00:00 2001 From: Claggy3 Date: Sat, 11 Feb 2017 14:00:30 +0000 -Subject: [PATCH 031/199] Update vfpmodule.c +Subject: [PATCH 033/129] Update vfpmodule.c Christopher Alexander Tobias Schulze - May 2, 2015, 11:57 a.m. This patch fixes a problem with VFP state save and restore related @@ -2083,10 +2163,10 @@ index a71a48e71fffa8626fe90106815376c44bbe679b..d6c0a5a0a5ae3510db3ace5e3f5d3410 /* * Save the userland NEON/VFP state. Under UP, -From ff3216e3c1b8c1ac6c7b45c19371b16471afc834 Mon Sep 17 00:00:00 2001 +From f9b54f14e038729bbec2b16ee15975993681d288 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Mar 2017 21:13:24 +1100 -Subject: [PATCH 032/199] ASoC: bcm2835_i2s.c: relax the ch2 register setting +Subject: [PATCH 034/129] ASoC: bcm2835_i2s.c: relax the ch2 register setting for 8 channels This patch allows ch2 registers to be set for 8 channels of audio. @@ -2107,10 +2187,10 @@ index 6ba20498202ed36906b52096893a88867a79269f..56df7d8a43d0aac055a91b0d24aca8e1 format |= BCM2835_I2S_CH1(BCM2835_I2S_CHPOS(ch1pos)); format |= BCM2835_I2S_CH2(BCM2835_I2S_CHPOS(ch2pos)); -From 5d1b18b32af4ca040892a16ddbf5d0f71e8214cd Mon Sep 17 00:00:00 2001 +From f2a96f0a5b4f2a91884e0e7fcfeb8099e044821f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Tue, 1 Nov 2016 15:15:41 +0100 -Subject: [PATCH 033/199] i2c: bcm2835: Add debug support +Subject: [PATCH 035/129] i2c: bcm2835: Add debug support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2299,10 +2379,104 @@ index cd07a69e2e9355540442785f95e90823b05c9d10..47167f403cc8329bd811b47c7011c299 if (i2c_dev->msg_err & BCM2835_I2C_S_ERR) return -EREMOTEIO; -From 3d037db93f7c96c91d15f497be5dd5c57862553b Mon Sep 17 00:00:00 2001 +From e30fc8d777e15b35526ad0427c2177b099dee7b1 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Thu, 18 Dec 2014 16:07:15 -0800 +Subject: [PATCH 036/129] mm: Remove the PFN busy warning + +See commit dae803e165a11bc88ca8dbc07a11077caf97bbcb -- the warning is +expected sometimes when using CMA. However, that commit still spams +my kernel log with these warnings. + +Signed-off-by: Eric Anholt +--- + mm/page_alloc.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/mm/page_alloc.c b/mm/page_alloc.c +index 1423da8dd16f5bdc83e20ddf6665b2022a9a6492..6ce930c02160d55dc4eee1e7197a5efa6ba7d44a 100644 +--- a/mm/page_alloc.c ++++ b/mm/page_alloc.c +@@ -7692,8 +7692,6 @@ int alloc_contig_range(unsigned long start, unsigned long end, + + /* Make sure the range is really isolated. */ + if (test_pages_isolated(outer_start, end, false)) { +- pr_info_ratelimited("%s: [%lx, %lx) PFNs busy\n", +- __func__, outer_start, end); + ret = -EBUSY; + goto done; + } + +From bf033ea532a9005ade064ce2afc23be81ee7b545 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 23 Mar 2017 10:06:56 +0000 +Subject: [PATCH 037/129] ASoC: Add prompt for ICS43432 codec + +Without a prompt string, a config setting can't be included in a +defconfig. Give CONFIG_SND_SOC_ICS43432 a prompt so that Pi soundcards +can use the driver. + +Signed-off-by: Phil Elwell +--- + sound/soc/codecs/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig +index 6c78b0b49b8145c24740d93c4174c059d91ddae9..d6450d5fc144737f967b8e00678baa9b8f92295f 100644 +--- a/sound/soc/codecs/Kconfig ++++ b/sound/soc/codecs/Kconfig +@@ -571,7 +571,7 @@ config SND_SOC_HDAC_HDMI + select HDMI + + config SND_SOC_ICS43432 +- tristate ++ tristate "InvenSense ICS43432 I2S microphone codec" + + config SND_SOC_INNO_RK3036 + tristate "Inno codec driver for RK3036 SoC" + +From 7716560b318c6a16a4ceb38da22d6c595e63fbf4 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 18 May 2017 15:36:46 +0100 +Subject: [PATCH 038/129] staging: bcm2835-audio: Fix memory corruption + +I'm all for fixing memory leaks, but freeing a block while it is still +being used is a recipe for hard-to-debug kernel exeptions. + +1) There is already a vchi method for freeing the instance, so use it. +2) Only call it on error, and then only before initted is false. + +Signed-off-by: Phil Elwell +Fixes: 0adbfd4694c2 ("staging: bcm2835-audio: fix memory leak in bcm2835_audio_open_connection()") +--- + drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c +index 5f3d8f2339e34834d11edfa8de1d5819e3e32b4f..89f96f3c02805f4114ec9b488e18d00e1f348239 100644 +--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c ++++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c +@@ -409,6 +409,7 @@ static int bcm2835_audio_open_connection(struct bcm2835_alsa_stream *alsa_stream + LOG_ERR("%s: failed to connect VCHI instance (ret=%d)\n", + __func__, ret); + ++ vchi_disconnect(vchi_instance); + ret = -EIO; + goto err_free_mem; + } +@@ -431,7 +432,6 @@ static int bcm2835_audio_open_connection(struct bcm2835_alsa_stream *alsa_stream + LOG_DBG(" success !\n"); + ret = 0; + err_free_mem: +- kfree(vchi_instance); + + return ret; + } + +From 168be2ce0a4e8cb82477498fd0c2d2b52dea3d6a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 034/199] Main bcm2708/bcm2709 linux port +Subject: [PATCH 039/129] Main bcm2708/bcm2709 linux port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2490,10 +2664,10 @@ index cfb4b4496dd9f61362dea012176c146120fada07..d9c6c217c4d6a2408abe2665bf7f2700 MODULE_AUTHOR("Lubomir Rintel "); MODULE_DESCRIPTION("BCM2835 mailbox IPC driver"); -From 00be68ede1ad301334e709edcecba80422fca888 Mon Sep 17 00:00:00 2001 +From 4a742c0460e2d8993349b9142603d7b16593c446 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 035/199] Add dwc_otg driver +Subject: [PATCH 040/129] Add dwc_otg driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -3069,6 +3243,47 @@ in hcd->free_hc_list becoming corrupted. dwcotg: Allow to build without FIQ on ARM64 Signed-off-by: popcornmix + +dwc_otg: make periodic scheduling behave properly for FS buses + +If the root port is in full-speed mode, transfer times at 12mbit/s +would be calculated but matched against high-speed quotas. + +Reinitialise hcd->frame_usecs[i] on each port enable event so that +full-speed bandwidth can be tracked sensibly. + +Also, don't bother using the FIQ for transfers when in full-speed +mode - at the slower bus speed, interrupt frequency is reduced by +an order of magnitude. + +Related issue: https://github.com/raspberrypi/linux/issues/2020 + +dwc_otg: fiq_fsm: Make isochronous compatibility checks work properly + +Get rid of the spammy printk and local pointer mangling. +Also, there is a nominal benefit for using fiq_fsm for isochronous +transfers in FS mode (~1.1k IRQs per second vs 2.1k IRQs per second) +so remove the root port speed check. + +dwc_otg: add module parameter int_ep_interval_min + +Add a module parameter (defaulting to ignored) that clamps the polling rate +of high-speed Interrupt endpoints to a minimum microframe interval. + +The parameter is modifiable at runtime as it is used when activating new +endpoints (such as on device connect). + +dwc_otg: fiq_fsm: Add non-periodic TT exclusivity constraints + +Certain hub types do not discriminate between pipe direction (IN or OUT) +when considering non-periodic transfers. Therefore these hubs get confused +if multiple transfers are issued in different directions with the same +device address and endpoint number. + +Constrain queuing non-periodic split transactions so they are performed +serially in such cases. + +Related: https://github.com/raspberrypi/linux/issues/2024 --- arch/arm/include/asm/irqflags.h | 16 +- arch/arm/kernel/fiqasm.S | 4 + @@ -3117,18 +3332,18 @@ Signed-off-by: popcornmix drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c | 1596 +++++ drivers/usb/host/dwc_otg/dwc_otg_core_if.h | 705 ++ drivers/usb/host/dwc_otg/dwc_otg_dbg.h | 117 + - drivers/usb/host/dwc_otg/dwc_otg_driver.c | 1757 +++++ + drivers/usb/host/dwc_otg/dwc_otg_driver.c | 1761 +++++ drivers/usb/host/dwc_otg/dwc_otg_driver.h | 86 + - drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c | 1358 ++++ - drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h | 370 + + drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c | 1390 ++++ + drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h | 372 + drivers/usb/host/dwc_otg/dwc_otg_fiq_stub.S | 80 + - drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 4242 ++++++++++++ - drivers/usb/host/dwc_otg/dwc_otg_hcd.h | 867 +++ + drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 4284 ++++++++++++ + drivers/usb/host/dwc_otg/dwc_otg_hcd.h | 870 +++ drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c | 1134 ++++ drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h | 417 ++ - drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 2749 ++++++++ + drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 2753 ++++++++ drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 1007 +++ - drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c | 967 +++ + drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c | 971 +++ drivers/usb/host/dwc_otg/dwc_otg_os_dep.h | 188 + drivers/usb/host/dwc_otg/dwc_otg_pcd.c | 2725 ++++++++ drivers/usb/host/dwc_otg/dwc_otg_pcd.h | 273 + @@ -3140,7 +3355,7 @@ Signed-off-by: popcornmix drivers/usb/host/dwc_otg/test/dwc_otg_test.pm | 337 + drivers/usb/host/dwc_otg/test/test_mod_param.pl | 133 + drivers/usb/host/dwc_otg/test/test_sysfs.pl | 193 + - 70 files changed, 59917 insertions(+), 16 deletions(-) + 70 files changed, 60008 insertions(+), 16 deletions(-) create mode 100644 drivers/usb/gadget/file_storage.c create mode 100644 drivers/usb/host/dwc_common_port/Makefile create mode 100644 drivers/usb/host/dwc_common_port/Makefile.fbsd @@ -35260,10 +35475,10 @@ index 0000000000000000000000000000000000000000..ccc24e010e449cbda488050d901e9a39 +#endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c new file mode 100644 -index 0000000000000000000000000000000000000000..cb060a7179a3eec791506ed2779b553cad9841b0 +index 0000000000000000000000000000000000000000..95943e07528276b26b51ea2d57a1f433f280aaef --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c -@@ -0,0 +1,1757 @@ +@@ -0,0 +1,1761 @@ +/* ========================================================================== + * $File: //dwh/usb_iip/dev/software/otg/linux/drivers/dwc_otg_driver.c $ + * $Revision: #92 $ @@ -35515,6 +35730,7 @@ index 0000000000000000000000000000000000000000..cb060a7179a3eec791506ed2779b553c + +unsigned short fiq_fsm_mask = 0x0F; + ++unsigned short int_ep_interval_min = 0; +/** + * This function shows the Driver Version. + */ @@ -36664,7 +36880,10 @@ index 0000000000000000000000000000000000000000..cb060a7179a3eec791506ed2779b553c + "Bit 1 : Periodic split transactions\n" + "Bit 2 : High-speed multi-transfer isochronous\n" + "All other bits should be set 0."); -+ ++module_param(int_ep_interval_min, ushort, 0644); ++MODULE_PARM_DESC(int_ep_interval_min, "Clamp high-speed Interrupt endpoints to a minimum polling interval.\n" ++ "0..1 = Use endpoint default\n" ++ "2..n = Minimum interval n microframes. Use powers of 2.\n"); + +/** @page "Module Parameters" + * @@ -37115,10 +37334,10 @@ index 0000000000000000000000000000000000000000..6a8be63a0ab20f4e1c56251b85648aa2 +#endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c new file mode 100644 -index 0000000000000000000000000000000000000000..2035e0762dc6d60673c8fbc47a90b72254f50b69 +index 0000000000000000000000000000000000000000..b7731e7edb4602f93f028d786194822161bbf0f8 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c -@@ -0,0 +1,1358 @@ +@@ -0,0 +1,1390 @@ +/* + * dwc_otg_fiq_fsm.c - The finite state machine FIQ + * @@ -37295,6 +37514,32 @@ index 0000000000000000000000000000000000000000..2035e0762dc6d60673c8fbc47a90b722 + mb(); +} + ++/** ++ * fiq_fsm_restart_np_pending() - Restart a single non-periodic contended transfer ++ * @st: Pointer to the channel's state ++ * @num_channels: Total number of host channels ++ * @orig_channel: Channel index of completed transfer ++ * ++ * In the case where an IN and OUT transfer are simultaneously scheduled to the ++ * same device/EP, inadequate hub implementations will misbehave. Once the first ++ * transfer is complete, a pending non-periodic split can then be issued. ++ */ ++static void notrace fiq_fsm_restart_np_pending(struct fiq_state *st, int num_channels, int orig_channel) ++{ ++ int i; ++ int dev_addr = st->channel[orig_channel].hcchar_copy.b.devaddr; ++ int ep_num = st->channel[orig_channel].hcchar_copy.b.epnum; ++ for (i = 0; i < num_channels; i++) { ++ if (st->channel[i].fsm == FIQ_NP_SSPLIT_PENDING && ++ st->channel[i].hcchar_copy.b.devaddr == dev_addr && ++ st->channel[i].hcchar_copy.b.epnum == ep_num) { ++ st->channel[i].fsm = FIQ_NP_SSPLIT_STARTED; ++ fiq_fsm_restart_channel(st, i, 0); ++ break; ++ } ++ } ++} ++ +static inline int notrace fiq_get_xfer_len(struct fiq_state *st, int n) +{ + /* The xfersize register is a bit wonky. For IN transfers, it decrements by the packet size. */ @@ -37974,6 +38219,9 @@ index 0000000000000000000000000000000000000000..2035e0762dc6d60673c8fbc47a90b722 + st->fsm = FIQ_NP_SPLIT_HS_ABORTED; + } + } ++ if (st->fsm != FIQ_NP_IN_CSPLIT_RETRY) { ++ fiq_fsm_restart_np_pending(state, num_channels, n); ++ } + break; + + case FIQ_NP_OUT_CSPLIT_RETRY: @@ -38023,6 +38271,9 @@ index 0000000000000000000000000000000000000000..2035e0762dc6d60673c8fbc47a90b722 + st->fsm = FIQ_NP_SPLIT_HS_ABORTED; + } + } ++ if (st->fsm != FIQ_NP_OUT_CSPLIT_RETRY) { ++ fiq_fsm_restart_np_pending(state, num_channels, n); ++ } + break; + + /* Periodic split states (except isoc out) */ @@ -38479,10 +38730,10 @@ index 0000000000000000000000000000000000000000..2035e0762dc6d60673c8fbc47a90b722 +} diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h new file mode 100644 -index 0000000000000000000000000000000000000000..f9fddfbcffb37f32c808fd78f222b676378398b1 +index 0000000000000000000000000000000000000000..8340041ce65665c094e2ad49fd5e8eb1751506f3 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h -@@ -0,0 +1,370 @@ +@@ -0,0 +1,372 @@ +/* + * dwc_otg_fiq_fsm.h - Finite state machine FIQ header definitions + * @@ -38655,6 +38906,8 @@ index 0000000000000000000000000000000000000000..f9fddfbcffb37f32c808fd78f222b676 + /* Nonperiodic state groups */ + FIQ_NP_SSPLIT_STARTED = 1, + FIQ_NP_SSPLIT_RETRY = 2, ++ /* TT contention - working around hub bugs */ ++ FIQ_NP_SSPLIT_PENDING = 33, + FIQ_NP_OUT_CSPLIT_RETRY = 3, + FIQ_NP_IN_CSPLIT_RETRY = 4, + FIQ_NP_SPLIT_DONE = 5, @@ -38941,10 +39194,10 @@ index 0000000000000000000000000000000000000000..ffa8d21bc61e893fee86ba04955587e7 +END(_dwc_otg_fiq_stub) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c new file mode 100644 -index 0000000000000000000000000000000000000000..5e4d4ffe7966486d40a5b5e2423ac4df0de772a8 +index 0000000000000000000000000000000000000000..60464acab588a1e189f39b268ffc25766c13dc85 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -@@ -0,0 +1,4242 @@ +@@ -0,0 +1,4284 @@ + +/* ========================================================================== + * $File: //dwh/usb_iip/dev/software/otg/linux/drivers/dwc_otg_hcd.c $ @@ -39873,8 +40126,6 @@ index 0000000000000000000000000000000000000000..5e4d4ffe7966486d40a5b5e2423ac4df + DWC_FREE(dwc_otg_hcd); +} + -+int init_hcd_usecs(dwc_otg_hcd_t *_hcd); -+ +int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd, dwc_otg_core_if_t * core_if) +{ + struct device *dev = dwc_otg_hcd_to_dev(hcd); @@ -40372,6 +40623,7 @@ index 0000000000000000000000000000000000000000..5e4d4ffe7966486d40a5b5e2423ac4df + +/** + * fiq_fsm_transaction_suitable() - Test a QH for compatibility with the FIQ ++ * @hcd: Pointer to the dwc_otg_hcd struct + * @qh: pointer to the endpoint's queue head + * + * Transaction start/end control flow is grafted onto the existing dwc_otg @@ -40381,7 +40633,7 @@ index 0000000000000000000000000000000000000000..5e4d4ffe7966486d40a5b5e2423ac4df + * Returns: 0 for unsuitable, 1 implies the FIQ can be enabled for this transaction. + */ + -+int fiq_fsm_transaction_suitable(dwc_otg_qh_t *qh) ++int fiq_fsm_transaction_suitable(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) +{ + if (qh->do_split) { + switch (qh->ep_type) { @@ -40400,28 +40652,22 @@ index 0000000000000000000000000000000000000000..5e4d4ffe7966486d40a5b5e2423ac4df + } + } else if (qh->ep_type == UE_ISOCHRONOUS) { + if (fiq_fsm_mask & (1 << 2)) { -+ /* HS ISOCH support. We test for compatibility: ++ /* ISOCH support. We test for compatibility: + * - DWORD aligned buffers + * - Must be at least 2 transfers (otherwise pointless to use the FIQ) + * If yes, then the fsm enqueue function will handle the state machine setup. + */ + dwc_otg_qtd_t *qtd = DWC_CIRCLEQ_FIRST(&qh->qtd_list); + dwc_otg_hcd_urb_t *urb = qtd->urb; -+ struct dwc_otg_hcd_iso_packet_desc (*iso_descs)[0] = &urb->iso_descs; -+ int nr_iso_frames = urb->packet_count; ++ dwc_dma_t ptr; + int i; -+ uint32_t ptr; + -+ if (nr_iso_frames < 2) ++ if (urb->packet_count < 2) + return 0; -+ for (i = 0; i < nr_iso_frames; i++) { -+ ptr = urb->dma + iso_descs[i]->offset; -+ if (ptr & 0x3) { -+ printk_ratelimited("%s: Non-Dword aligned isochronous frame offset." -+ " Cannot queue FIQ-accelerated transfer to device %d endpoint %d\n", -+ __FUNCTION__, qh->channel->dev_addr, qh->channel->ep_num); ++ for (i = 0; i < urb->packet_count; i++) { ++ ptr = urb->dma + urb->iso_descs[i].offset; ++ if (ptr & 0x3) + return 0; -+ } + } + return 1; + } @@ -40522,6 +40768,45 @@ index 0000000000000000000000000000000000000000..5e4d4ffe7966486d40a5b5e2423ac4df + } +} + ++/** ++ * fiq_fsm_np_tt_contended() - Avoid performing contended non-periodic transfers ++ * @hcd: Pointer to the dwc_otg_hcd struct ++ * @qh: Pointer to the endpoint's queue head ++ * ++ * Certain hub chips don't differentiate between IN and OUT non-periodic pipes ++ * with the same endpoint number. If transfers get completed out of order ++ * (disregarding the direction token) then the hub can lock up ++ * or return erroneous responses. ++ * ++ * Returns 1 if initiating the transfer would cause contention, 0 otherwise. ++ */ ++int fiq_fsm_np_tt_contended(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) ++{ ++ int i; ++ struct fiq_channel_state *st; ++ int dev_addr = qh->channel->dev_addr; ++ int ep_num = qh->channel->ep_num; ++ for (i = 0; i < hcd->core_if->core_params->host_channels; i++) { ++ if (i == qh->channel->hc_num) ++ continue; ++ st = &hcd->fiq_state->channel[i]; ++ switch (st->fsm) { ++ case FIQ_NP_SSPLIT_STARTED: ++ case FIQ_NP_SSPLIT_RETRY: ++ case FIQ_NP_SSPLIT_PENDING: ++ case FIQ_NP_OUT_CSPLIT_RETRY: ++ case FIQ_NP_IN_CSPLIT_RETRY: ++ if (st->hcchar_copy.b.devaddr == dev_addr && ++ st->hcchar_copy.b.epnum == ep_num) ++ return 1; ++ break; ++ default: ++ break; ++ } ++ } ++ return 0; ++} ++ +/* + * Pushing a periodic request into the queue near the EOF1 point + * in a microframe causes erroneous behaviour (frmovrun) interrupt. @@ -40844,7 +41129,12 @@ index 0000000000000000000000000000000000000000..5e4d4ffe7966486d40a5b5e2423ac4df + switch (hc->ep_type) { + case UE_CONTROL: + case UE_BULK: -+ st->fsm = FIQ_NP_SSPLIT_STARTED; ++ if (fiq_fsm_np_tt_contended(hcd, qh)) { ++ st->fsm = FIQ_NP_SSPLIT_PENDING; ++ start_immediate = 0; ++ } else { ++ st->fsm = FIQ_NP_SSPLIT_STARTED; ++ } + break; + case UE_ISOCHRONOUS: + if (hc->ep_is_in) { @@ -40868,7 +41158,12 @@ index 0000000000000000000000000000000000000000..5e4d4ffe7966486d40a5b5e2423ac4df + break; + case UE_INTERRUPT: + if (fiq_fsm_mask & 0x8) { -+ st->fsm = FIQ_NP_SSPLIT_STARTED; ++ if (fiq_fsm_np_tt_contended(hcd, qh)) { ++ st->fsm = FIQ_NP_SSPLIT_PENDING; ++ start_immediate = 0; ++ } else { ++ st->fsm = FIQ_NP_SSPLIT_STARTED; ++ } + } else if (start_immediate) { + st->fsm = FIQ_PER_SSPLIT_STARTED; + } else { @@ -41161,7 +41456,7 @@ index 0000000000000000000000000000000000000000..5e4d4ffe7966486d40a5b5e2423ac4df + continue; + } + -+ if (fiq_fsm_enable && fiq_fsm_transaction_suitable(qh)) { ++ if (fiq_fsm_enable && fiq_fsm_transaction_suitable(hcd, qh)) { + if (qh->do_split) + fiq_fsm_queue_split_transaction(hcd, qh); + else @@ -41298,7 +41593,7 @@ index 0000000000000000000000000000000000000000..5e4d4ffe7966486d40a5b5e2423ac4df + qh = DWC_LIST_ENTRY(hcd->non_periodic_qh_ptr, dwc_otg_qh_t, + qh_list_entry); + -+ if(fiq_fsm_enable && fiq_fsm_transaction_suitable(qh)) { ++ if(fiq_fsm_enable && fiq_fsm_transaction_suitable(hcd, qh)) { + fiq_fsm_queue_split_transaction(hcd, qh); + } else { + status = queue_transaction(hcd, qh->channel, @@ -43189,10 +43484,10 @@ index 0000000000000000000000000000000000000000..5e4d4ffe7966486d40a5b5e2423ac4df +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h new file mode 100644 -index 0000000000000000000000000000000000000000..7f7e9eaffd6a3c3d898855562fbec11289f77f53 +index 0000000000000000000000000000000000000000..5ed8dccf03959a610849aa6c8946ca745dbae207 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h -@@ -0,0 +1,867 @@ +@@ -0,0 +1,870 @@ +/* ========================================================================== + * $File: //dwh/usb_iip/dev/software/otg/linux/drivers/dwc_otg_hcd.h $ + * $Revision: #58 $ @@ -43605,7 +43900,8 @@ index 0000000000000000000000000000000000000000..7f7e9eaffd6a3c3d898855562fbec112 + unsigned port_suspend_change:1; + unsigned port_over_current_change:1; + unsigned port_l1_change:1; -+ unsigned reserved:26; ++ unsigned port_speed:2; ++ unsigned reserved:24; + } b; + } flags; + @@ -43824,7 +44120,7 @@ index 0000000000000000000000000000000000000000..7f7e9eaffd6a3c3d898855562fbec112 +void dwc_otg_hcd_release_port(dwc_otg_hcd_t * dwc_otg_hcd, dwc_otg_qh_t *qh); + +extern int fiq_fsm_queue_transaction(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh); -+extern int fiq_fsm_transaction_suitable(dwc_otg_qh_t *qh); ++extern int fiq_fsm_transaction_suitable(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh); +extern void dwc_otg_cleanup_fiq_channel(dwc_otg_hcd_t *hcd, uint32_t num); + +/** @} */ @@ -44018,6 +44314,8 @@ index 0000000000000000000000000000000000000000..7f7e9eaffd6a3c3d898855562fbec112 + return frame & 0x7; +} + ++extern void init_hcd_usecs(dwc_otg_hcd_t *_hcd); ++ +void dwc_otg_hcd_save_data_toggle(dwc_hc_t * hc, + dwc_otg_hc_regs_t * hc_regs, + dwc_otg_qtd_t * qtd); @@ -45625,10 +45923,10 @@ index 0000000000000000000000000000000000000000..fb57db09378f4ab95d57cb58aa570a91 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c new file mode 100644 -index 0000000000000000000000000000000000000000..fc52495e4749f45dcf270c1c22960f163b6dc86d +index 0000000000000000000000000000000000000000..ed855eb9c3b64d54e93c5aa7e06212e779400dfd --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -@@ -0,0 +1,2749 @@ +@@ -0,0 +1,2753 @@ +/* ========================================================================== + * $File: //dwh/usb_iip/dev/software/otg/linux/drivers/dwc_otg_hcd_intr.c $ + * $Revision: #89 $ @@ -46145,6 +46443,10 @@ index 0000000000000000000000000000000000000000..fc52495e4749f45dcf270c1c22960f16 + dwc_otg_host_if_t *host_if = + dwc_otg_hcd->core_if->host_if; + ++ dwc_otg_hcd->flags.b.port_speed = hprt0.b.prtspd; ++ if (microframe_schedule) ++ init_hcd_usecs(dwc_otg_hcd); ++ + /* Every time when port enables calculate + * HFIR.FrInterval + */ @@ -49393,10 +49695,10 @@ index 0000000000000000000000000000000000000000..96ec6338bbcb8ebe69a233d21a4b9d24 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c new file mode 100644 -index 0000000000000000000000000000000000000000..85a6d431ca54b47dc10573aa72d1ad69d06f2e36 +index 0000000000000000000000000000000000000000..fe8e8f841f03660c2ad49ab8e66193bec62558d3 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c -@@ -0,0 +1,967 @@ +@@ -0,0 +1,971 @@ +/* ========================================================================== + * $File: //dwh/usb_iip/dev/software/otg/linux/drivers/dwc_otg_hcd_queue.c $ + * $Revision: #44 $ @@ -49442,6 +49744,7 @@ index 0000000000000000000000000000000000000000..85a6d431ca54b47dc10573aa72d1ad69 +#include "dwc_otg_regs.h" + +extern bool microframe_schedule; ++extern unsigned short int_ep_interval_min; + +/** + * Free each QTD in the QH's QTD-list then free the QH. QH should already be @@ -49617,21 +49920,19 @@ index 0000000000000000000000000000000000000000..85a6d431ca54b47dc10573aa72d1ad69 + SCHEDULE_SLOP); + qh->interval = urb->interval; + -+#if 0 -+ /* Increase interrupt polling rate for debugging. */ -+ if (qh->ep_type == UE_INTERRUPT) { -+ qh->interval = 8; -+ } -+#endif + hprt.d32 = DWC_READ_REG32(hcd->core_if->host_if->hprt0); -+ if ((hprt.b.prtspd == DWC_HPRT0_PRTSPD_HIGH_SPEED) && -+ ((dev_speed == USB_SPEED_LOW) || -+ (dev_speed == USB_SPEED_FULL))) { -+ qh->interval *= 8; -+ qh->sched_frame |= 0x7; -+ qh->start_split_frame = qh->sched_frame; ++ if (hprt.b.prtspd == DWC_HPRT0_PRTSPD_HIGH_SPEED) { ++ if (dev_speed == USB_SPEED_LOW || ++ dev_speed == USB_SPEED_FULL) { ++ qh->interval *= 8; ++ qh->sched_frame |= 0x7; ++ qh->start_split_frame = qh->sched_frame; ++ } else if (int_ep_interval_min >= 2 && ++ qh->interval < int_ep_interval_min && ++ qh->ep_type == UE_INTERRUPT) { ++ qh->interval = int_ep_interval_min; ++ } + } -+ + } + + DWC_DEBUGPL(DBG_HCD, "DWC OTG HCD QH Initialized\n"); @@ -49807,13 +50108,17 @@ index 0000000000000000000000000000000000000000..85a6d431ca54b47dc10573aa72d1ad69 +/* + * called from dwc_otg_hcd.c:dwc_otg_hcd_init + */ -+int init_hcd_usecs(dwc_otg_hcd_t *_hcd) ++void init_hcd_usecs(dwc_otg_hcd_t *_hcd) +{ + int i; -+ for (i=0; i<8; i++) { -+ _hcd->frame_usecs[i] = max_uframe_usecs[i]; ++ if (_hcd->flags.b.port_speed == DWC_HPRT0_PRTSPD_FULL_SPEED) { ++ _hcd->frame_usecs[0] = 900; ++ for (i = 1; i < 8; i++) ++ _hcd->frame_usecs[i] = 0; ++ } else { ++ for (i = 0; i < 8; i++) ++ _hcd->frame_usecs[i] = max_uframe_usecs[i]; + } -+ return 0; +} + +static int find_single_uframe(dwc_otg_hcd_t * _hcd, dwc_otg_qh_t * _qh) @@ -49940,8 +50245,9 @@ index 0000000000000000000000000000000000000000..85a6d431ca54b47dc10573aa72d1ad69 + int ret; + ret = -1; + -+ if (_qh->speed == USB_SPEED_HIGH) { -+ /* if this is a hs transaction we need a full frame */ ++ if (_qh->speed == USB_SPEED_HIGH || ++ _hcd->flags.b.port_speed == DWC_HPRT0_PRTSPD_FULL_SPEED) { ++ /* if this is a hs transaction we need a full frame - or account for FS usecs */ + ret = find_single_uframe(_hcd, _qh); + } else { + /* if this is a fs transaction we may need a sequence of frames */ @@ -50026,7 +50332,7 @@ index 0000000000000000000000000000000000000000..85a6d431ca54b47dc10573aa72d1ad69 + if (status) { + DWC_INFO("%s: Insufficient periodic bandwidth for " + "periodic transfer.\n", __func__); -+ return status; ++ return -DWC_E_NO_SPACE; + } + status = check_max_xfer_size(hcd, qh); + if (status) { @@ -63635,10 +63941,10 @@ index 0000000000000000000000000000000000000000..cdc9963176e5a4a0d5250613b61e26c5 +test_main(); +0; -From 844987ea9f84c46bc183ff9aea1581065d6a07fa Mon Sep 17 00:00:00 2001 +From 20e2c528fbc615b591f94a474454671f53cf3d98 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 17:06:34 +0100 -Subject: [PATCH 036/199] bcm2708 framebuffer driver +Subject: [PATCH 041/129] bcm2708 framebuffer driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -67097,10 +67403,10 @@ index 3c14e43b82fefe1d32f591d1b2f61d2cd28d0fa8..7626beb6a5bb8df601ddf0f6e6909d1f +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 52f1e764e986ebd07816f26362a5f7d4b020d082 Mon Sep 17 00:00:00 2001 +From c552685dec9406ed78b0ff592da21eda44757cbc Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 037/199] dmaengine: Add support for BCM2708 +Subject: [PATCH 042/129] dmaengine: Add support for BCM2708 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -67731,10 +68037,10 @@ index 0000000000000000000000000000000000000000..c5bfff2765be4606077e6c8af73040ec + +#endif /* _PLAT_BCM2708_DMA_H */ -From dec8b5244ace6cbebf14759ba726344bdd451e22 Mon Sep 17 00:00:00 2001 +From 2cfc86aae7690a80ab6d6ece491ceaff33e70ca3 Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:06 +0100 -Subject: [PATCH 038/199] MMC: added alternative MMC driver +Subject: [PATCH 043/129] MMC: added alternative MMC driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -67817,21 +68123,156 @@ See: https://github.com/raspberrypi/linux/issues/1327 Signed-off-by: Phil Elwell --- + drivers/mmc/core/block.c | 28 +- + drivers/mmc/core/core.c | 3 +- + drivers/mmc/core/host.c | 17 +- + drivers/mmc/core/quirks.h | 8 + drivers/mmc/host/Kconfig | 29 + drivers/mmc/host/Makefile | 1 + - drivers/mmc/host/bcm2835-mmc.c | 1574 ++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 1604 insertions(+) + drivers/mmc/host/bcm2835-mmc.c | 1584 ++++++++++++++++++++++++++++++++++++++++ + include/linux/mmc/card.h | 2 + + 8 files changed, 1667 insertions(+), 5 deletions(-) create mode 100644 drivers/mmc/host/bcm2835-mmc.c +diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c +index 8bd7aba811e969a3b7cfdc6cf12e685f25e8c37e..cd1eb5cf73358a0104fbf4b6ed8e72dd491d658d 100644 +--- a/drivers/mmc/core/block.c ++++ b/drivers/mmc/core/block.c +@@ -125,6 +125,13 @@ static DEFINE_MUTEX(open_lock); + module_param(perdev_minors, int, 0444); + MODULE_PARM_DESC(perdev_minors, "Minors numbers to allocate per device"); + ++/* ++ * Allow quirks to be overridden for the current card ++ */ ++static char *card_quirks; ++module_param(card_quirks, charp, 0644); ++MODULE_PARM_DESC(card_quirks, "Force the use of the indicated quirks (a bitfield)"); ++ + static inline int mmc_blk_part_switch(struct mmc_card *card, + struct mmc_blk_data *md); + +@@ -2287,6 +2294,7 @@ static int mmc_blk_probe(struct mmc_card *card) + { + struct mmc_blk_data *md, *part_md; + char cap_str[10]; ++ char quirk_str[24]; + + /* + * Check that the card supports the command class(es) we need. +@@ -2294,7 +2302,16 @@ static int mmc_blk_probe(struct mmc_card *card) + if (!(card->csd.cmdclass & CCC_BLOCK_READ)) + return -ENODEV; + +- mmc_fixup_device(card, mmc_blk_fixups); ++ if (card_quirks) { ++ unsigned long quirks; ++ if (kstrtoul(card_quirks, 0, &quirks) == 0) ++ card->quirks = (unsigned int)quirks; ++ else ++ pr_err("mmc_block: Invalid card_quirks parameter '%s'\n", ++ card_quirks); ++ } ++ else ++ mmc_fixup_device(card, mmc_blk_fixups); + + md = mmc_blk_alloc(card); + if (IS_ERR(md)) +@@ -2302,9 +2319,14 @@ static int mmc_blk_probe(struct mmc_card *card) + + string_get_size((u64)get_capacity(md->disk), 512, STRING_UNITS_2, + cap_str, sizeof(cap_str)); +- pr_info("%s: %s %s %s %s\n", ++ if (card->quirks) ++ snprintf(quirk_str, sizeof(quirk_str), ++ " (quirks 0x%08x)", card->quirks); ++ else ++ quirk_str[0] = '\0'; ++ pr_info("%s: %s %s %s%s%s\n", + md->disk->disk_name, mmc_card_id(card), mmc_card_name(card), +- cap_str, md->read_only ? "(ro)" : ""); ++ cap_str, md->read_only ? " (ro)" : "", quirk_str); + + if (mmc_blk_alloc_parts(card, md)) + goto out; +diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c +index 26431267a3e2d790d4eae99e65881ca60bd2047d..0ec589ace762a27f3c5ea39226fef3a67442675f 100644 +--- a/drivers/mmc/core/core.c ++++ b/drivers/mmc/core/core.c +@@ -2211,7 +2211,8 @@ EXPORT_SYMBOL(mmc_erase); + int mmc_can_erase(struct mmc_card *card) + { + if ((card->host->caps & MMC_CAP_ERASE) && +- (card->csd.cmdclass & CCC_ERASE) && card->erase_size) ++ (card->csd.cmdclass & CCC_ERASE) && card->erase_size && ++ !(card->quirks & MMC_QUIRK_ERASE_BROKEN)) + return 1; + return 0; + } +diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c +index 1503412f826cd0e0e9ad37a0554b31596a49eb77..2f5b3cf86293b96b104eac7c6d48a5839d7e974b 100644 +--- a/drivers/mmc/core/host.c ++++ b/drivers/mmc/core/host.c +@@ -344,15 +344,30 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev) + { + int err; + struct mmc_host *host; ++ int id; + + host = kzalloc(sizeof(struct mmc_host) + extra, GFP_KERNEL); + if (!host) + return NULL; + ++ /* If OF aliases exist, start dynamic assignment after highest */ ++ id = of_alias_get_highest_id("mmc"); ++ id = (id < 0) ? 0 : id + 1; ++ ++ /* If this devices has OF node, maybe it has an alias */ ++ if (dev->of_node) { ++ int of_id = of_alias_get_id(dev->of_node, "mmc"); ++ ++ if (of_id < 0) ++ dev_warn(dev, "/aliases ID not available\n"); ++ else ++ id = of_id; ++ } ++ + /* scanning will be enabled when we're ready */ + host->rescan_disable = 1; + +- err = ida_simple_get(&mmc_host_ida, 0, 0, GFP_KERNEL); ++ err = ida_simple_get(&mmc_host_ida, id, 0, GFP_KERNEL); + if (err < 0) { + kfree(host); + return NULL; +diff --git a/drivers/mmc/core/quirks.h b/drivers/mmc/core/quirks.h +index fb725934fa21cee1b98fd7bc08227bf6d0317549..c9d5d644688c1509d7febcff0322fbaba0a842d6 100644 +--- a/drivers/mmc/core/quirks.h ++++ b/drivers/mmc/core/quirks.h +@@ -90,6 +90,14 @@ static const struct mmc_fixup mmc_blk_fixups[] = { + MMC_FIXUP("V10016", CID_MANFID_KINGSTON, CID_OEMID_ANY, add_quirk_mmc, + MMC_QUIRK_TRIM_BROKEN), + ++ /* ++ * On some Kingston SD cards, multiple erases of less than 64 ++ * sectors can cause corruption. ++ */ ++ MMC_FIXUP("SD16G", 0x41, 0x3432, add_quirk, MMC_QUIRK_ERASE_BROKEN), ++ MMC_FIXUP("SD32G", 0x41, 0x3432, add_quirk, MMC_QUIRK_ERASE_BROKEN), ++ MMC_FIXUP("SD64G", 0x41, 0x3432, add_quirk, MMC_QUIRK_ERASE_BROKEN), ++ + END_FIXUP + }; + diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig -index 5755b69f2f728ffb829f257c2016a8965ce19c93..d657e99b7b5a9218cd37dd529ca08eef8c681981 100644 +index 5755b69f2f728ffb829f257c2016a8965ce19c93..267a5be5b029603fcb0a30d59c9c44784b6633d9 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -4,6 +4,35 @@ comment "MMC/SD/SDIO Host Controller Drivers" -+config MMC_BCM2835 ++config MMC_BCM2835_MMC + tristate "MMC support on BCM2835" + depends on MACH_BCM2708 || MACH_BCM2709 || ARCH_BCM2835 + help @@ -67843,7 +68284,7 @@ index 5755b69f2f728ffb829f257c2016a8965ce19c93..d657e99b7b5a9218cd37dd529ca08eef + +config MMC_BCM2835_DMA + bool "DMA support on BCM2835 Arasan controller" -+ depends on MMC_BCM2835 ++ depends on MMC_BCM2835_MMC + help + Enable DMA support on the Arasan SDHCI controller in Broadcom 2708 + based chips. @@ -67852,7 +68293,7 @@ index 5755b69f2f728ffb829f257c2016a8965ce19c93..d657e99b7b5a9218cd37dd529ca08eef + +config MMC_BCM2835_PIO_DMA_BARRIER + int "Block count limit for PIO transfers" -+ depends on MMC_BCM2835 && MMC_BCM2835_DMA ++ depends on MMC_BCM2835_MMC && MMC_BCM2835_DMA + range 0 256 + default 2 + help @@ -67864,23 +68305,23 @@ index 5755b69f2f728ffb829f257c2016a8965ce19c93..d657e99b7b5a9218cd37dd529ca08eef tristate "ARM AMBA Multimedia Card Interface support" depends on ARM_AMBA diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile -index 4d454711631158559c99a4df7953b17f3b1330d6..b8815fc623d7bba9f1375778daa274febeb32769 100644 +index 4d454711631158559c99a4df7953b17f3b1330d6..b27b702f59ba2b473a9d4da77eb5edb0f8763f03 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -18,6 +18,7 @@ obj-$(CONFIG_MMC_SDHCI_S3C) += sdhci-s3c.o obj-$(CONFIG_MMC_SDHCI_SIRF) += sdhci-sirf.o obj-$(CONFIG_MMC_SDHCI_F_SDH30) += sdhci_f_sdh30.o obj-$(CONFIG_MMC_SDHCI_SPEAR) += sdhci-spear.o -+obj-$(CONFIG_MMC_BCM2835) += bcm2835-mmc.o ++obj-$(CONFIG_MMC_BCM2835_MMC) += bcm2835-mmc.o obj-$(CONFIG_MMC_WBSD) += wbsd.o obj-$(CONFIG_MMC_AU1X) += au1xmmc.o obj-$(CONFIG_MMC_MTK) += mtk-sd.o diff --git a/drivers/mmc/host/bcm2835-mmc.c b/drivers/mmc/host/bcm2835-mmc.c new file mode 100644 -index 0000000000000000000000000000000000000000..4fe8d1fe44578fbefcd48f8c327ba3d03f3d0a2a +index 0000000000000000000000000000000000000000..c4a5e992c6fb4a40b933239350ed4bfc8fb40155 --- /dev/null +++ b/drivers/mmc/host/bcm2835-mmc.c -@@ -0,0 +1,1574 @@ +@@ -0,0 +1,1584 @@ +/* + * BCM2835 MMC host driver. + * @@ -67998,6 +68439,7 @@ index 0000000000000000000000000000000000000000..4fe8d1fe44578fbefcd48f8c327ba3d0 + + bool have_dma; + bool use_dma; ++ bool wait_for_dma; + /*end of DMA part*/ + + int max_delay; /* maximum length of time spent waiting */ @@ -68224,6 +68666,8 @@ index 0000000000000000000000000000000000000000..4fe8d1fe44578fbefcd48f8c327ba3d0 + + spin_lock_irqsave(&host->lock, flags); + ++ host->use_dma = false; ++ + if (host->data && !(host->data->flags & MMC_DATA_WRITE)) { + /* otherwise handled in SDHCI IRQ */ + dma_chan = host->dma_chan_rxtx; @@ -68234,6 +68678,9 @@ index 0000000000000000000000000000000000000000..4fe8d1fe44578fbefcd48f8c327ba3d0 + dir_data); + + bcm2835_mmc_finish_data(host); ++ } else if (host->wait_for_dma) { ++ host->wait_for_dma = false; ++ tasklet_schedule(&host->finish_tasklet); + } + + spin_unlock_irqrestore(&host->lock, flags); @@ -68573,6 +69020,7 @@ index 0000000000000000000000000000000000000000..4fe8d1fe44578fbefcd48f8c327ba3d0 + mod_timer(&host->timer, timeout); + + host->cmd = cmd; ++ host->use_dma = false; + + bcm2835_mmc_prepare_data(host, cmd); + @@ -68642,8 +69090,11 @@ index 0000000000000000000000000000000000000000..4fe8d1fe44578fbefcd48f8c327ba3d0 + } + + bcm2835_mmc_send_command(host, data->stop); -+ } else ++ } else if (host->use_dma) { ++ host->wait_for_dma = true; ++ } else { + tasklet_schedule(&host->finish_tasklet); ++ } +} + +static void bcm2835_mmc_finish_command(struct bcm2835_host *host) @@ -69237,14 +69688,14 @@ index 0000000000000000000000000000000000000000..4fe8d1fe44578fbefcd48f8c327ba3d0 + if (ret == 0) { + host->dma_cfg_rx = cfg; + -+ host->use_dma = true; ++ host->have_dma = true; + } else { + pr_err("%s: unable to configure DMA channel. " -+ "Faling back to PIO\n", ++ "Falling back to PIO\n", + mmc_hostname(mmc)); + dma_release_channel(host->dma_chan_rxtx); + host->dma_chan_rxtx = NULL; -+ host->use_dma = false; ++ host->have_dma = false; + } + } +#endif @@ -69455,11 +69906,24 @@ index 0000000000000000000000000000000000000000..4fe8d1fe44578fbefcd48f8c327ba3d0 +MODULE_DESCRIPTION("BCM2835 SDHCI driver"); +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Gellert Weisz"); +diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h +index 46c73e97e61f08a41d9753079345f5965caebbc5..388c551ed11e9d06ea1c25b6553d47a8d668953a 100644 +--- a/include/linux/mmc/card.h ++++ b/include/linux/mmc/card.h +@@ -269,6 +269,8 @@ struct mmc_card { + #define MMC_QUIRK_TRIM_BROKEN (1<<12) /* Skip trim */ + #define MMC_QUIRK_BROKEN_HPI (1<<13) /* Disable broken HPI support */ + ++#define MMC_QUIRK_ERASE_BROKEN (1<<31) /* Skip erase */ ++ + bool reenable_cmdq; /* Re-enable Command Queue */ + + unsigned int erase_size; /* erase size in sectors */ -From f2db02848cd70f0722f41acb56363971ee9c4729 Mon Sep 17 00:00:00 2001 +From 2effda8db6e55c7b4c9edad900cfddfd9e2597bc Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Mar 2015 17:49:47 +0000 -Subject: [PATCH 039/199] Adding bcm2835-sdhost driver, and an overlay to +Subject: [PATCH 044/129] Adding bcm2835-sdhost driver, and an overlay to enable it BCM2835 has two SD card interfaces. This driver uses the other one. @@ -69633,7 +70097,7 @@ Signed-off-by: Phil Elwell create mode 100644 drivers/mmc/host/bcm2835-sdhost.c diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig -index d657e99b7b5a9218cd37dd529ca08eef8c681981..64bd7825131d3dcb003e7ece581b8d599a717b31 100644 +index 267a5be5b029603fcb0a30d59c9c44784b6633d9..dc41121c101e2ac6fe000fe2ab556561a340b78f 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -33,6 +33,16 @@ config MMC_BCM2835_PIO_DMA_BARRIER @@ -69654,13 +70118,13 @@ index d657e99b7b5a9218cd37dd529ca08eef8c681981..64bd7825131d3dcb003e7ece581b8d59 tristate "ARM AMBA Multimedia Card Interface support" depends on ARM_AMBA diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile -index b8815fc623d7bba9f1375778daa274febeb32769..cd3a47d8965958ccf3ac3d186a05bbd437494154 100644 +index b27b702f59ba2b473a9d4da77eb5edb0f8763f03..9ba643d3b2e12960f5ce4b0eb5d75c1c360980ce 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -19,6 +19,7 @@ obj-$(CONFIG_MMC_SDHCI_SIRF) += sdhci-sirf.o obj-$(CONFIG_MMC_SDHCI_F_SDH30) += sdhci_f_sdh30.o obj-$(CONFIG_MMC_SDHCI_SPEAR) += sdhci-spear.o - obj-$(CONFIG_MMC_BCM2835) += bcm2835-mmc.o + obj-$(CONFIG_MMC_BCM2835_MMC) += bcm2835-mmc.o +obj-$(CONFIG_MMC_BCM2835_SDHOST) += bcm2835-sdhost.o obj-$(CONFIG_MMC_WBSD) += wbsd.o obj-$(CONFIG_MMC_AU1X) += au1xmmc.o @@ -71865,10 +72329,10 @@ index 0000000000000000000000000000000000000000..9c6f199a7830959f31012d86bc1f8b1a +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Phil Elwell"); -From f310a1afb6420cc8453e79412d81022e6a601be2 Mon Sep 17 00:00:00 2001 +From 7f0672a5e885d310c886283944dcbb1ebf4263d0 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 28 Oct 2016 15:36:43 +0100 -Subject: [PATCH 040/199] vc_mem: Add vc_mem driver for querying firmware +Subject: [PATCH 045/129] vc_mem: Add vc_mem driver for querying firmware memory addresses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -72393,10 +72857,10 @@ index 0000000000000000000000000000000000000000..20a475377eb3078ea1ecaef2b24efc35 + +#endif /* _VC_MEM_H */ -From 22acb3e4e7b0bafd9292d9ef30c083ef18b377da Mon Sep 17 00:00:00 2001 +From dd72d988c292f9e7287701360e6af45438b59831 Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Tue, 22 Jul 2014 15:41:04 +0100 -Subject: [PATCH 041/199] vcsm: VideoCore shared memory service for BCM2835 +Subject: [PATCH 046/129] vcsm: VideoCore shared memory service for BCM2835 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -72445,19 +72909,32 @@ and the other VM_FAULT_SIGBUS crashing the user code. Also report when mapping fails. Signed-off-by: popcornmix + +vcsm: Provide new ioctl to clean/invalidate a 2D block + +vcsm: Convert to loading via device tree. + +Signed-off-by: Dave Stevenson + +VCSM: New option to import a DMABUF for VPU use + +Takes a dmabuf, and then calls over to the VPU to wrap +it into a suitable handle. + +Signed-off-by: Dave Stevenson --- drivers/char/Kconfig | 2 + drivers/char/Makefile | 1 + drivers/char/broadcom/Kconfig | 9 + drivers/char/broadcom/Makefile | 1 + drivers/char/broadcom/vc_sm/Makefile | 9 + - drivers/char/broadcom/vc_sm/vc_sm_defs.h | 181 ++ - drivers/char/broadcom/vc_sm/vc_sm_knl.h | 55 + - drivers/char/broadcom/vc_sm/vc_vchi_sm.c | 499 +++++ - drivers/char/broadcom/vc_sm/vc_vchi_sm.h | 82 + - drivers/char/broadcom/vc_sm/vmcs_sm.c | 3222 ++++++++++++++++++++++++++++++ - include/linux/broadcom/vmcs_sm_ioctl.h | 248 +++ - 11 files changed, 4309 insertions(+) + drivers/char/broadcom/vc_sm/vc_sm_defs.h | 237 ++ + drivers/char/broadcom/vc_sm/vc_sm_knl.h | 53 + + drivers/char/broadcom/vc_sm/vc_vchi_sm.c | 516 +++++ + drivers/char/broadcom/vc_sm/vc_vchi_sm.h | 102 + + drivers/char/broadcom/vc_sm/vmcs_sm.c | 3505 ++++++++++++++++++++++++++++++ + include/linux/broadcom/vmcs_sm_ioctl.h | 280 +++ + 11 files changed, 4715 insertions(+) create mode 100644 drivers/char/broadcom/vc_sm/Makefile create mode 100644 drivers/char/broadcom/vc_sm/vc_sm_defs.h create mode 100644 drivers/char/broadcom/vc_sm/vc_sm_knl.h @@ -72529,23 +73006,25 @@ index 0000000000000000000000000000000000000000..19ce263bc273dcdb24ea2b4431e4cafc + vc_vchi_sm.o diff --git a/drivers/char/broadcom/vc_sm/vc_sm_defs.h b/drivers/char/broadcom/vc_sm/vc_sm_defs.h new file mode 100644 -index 0000000000000000000000000000000000000000..c4d5ff718a5ba9071ef87fa4c6cf632486c4d36f +index 0000000000000000000000000000000000000000..de6afe9f65af45582c79a62abd41c688274ad8f2 --- /dev/null +++ b/drivers/char/broadcom/vc_sm/vc_sm_defs.h -@@ -0,0 +1,181 @@ -+/***************************************************************************** -+* Copyright 2011 Broadcom Corporation. All rights reserved. -+* -+* Unless you and Broadcom execute a separate written software license -+* agreement governing use of this software, this software is licensed to you -+* under the terms of the GNU General Public License version 2, available at -+* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). -+* -+* Notwithstanding the above, under no circumstances may you combine this -+* software in any way with any other Broadcom software provided under a -+* license other than the GPL, without Broadcom's express prior written -+* consent. -+*****************************************************************************/ +@@ -0,0 +1,237 @@ ++/* ++ **************************************************************************** ++ * Copyright 2011 Broadcom Corporation. All rights reserved. ++ * ++ * Unless you and Broadcom execute a separate written software license ++ * agreement governing use of this software, this software is licensed to you ++ * under the terms of the GNU General Public License version 2, available at ++ * http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). ++ * ++ * Notwithstanding the above, under no circumstances may you combine this ++ * software in any way with any other Broadcom software provided under a ++ * license other than the GPL, without Broadcom's express prior written ++ * consent. ++ **************************************************************************** ++ */ + +#ifndef __VC_SM_DEFS_H__INCLUDED__ +#define __VC_SM_DEFS_H__INCLUDED__ @@ -72554,15 +73033,16 @@ index 0000000000000000000000000000000000000000..c4d5ff718a5ba9071ef87fa4c6cf6324 +#define VC_SM_SERVER_NAME MAKE_FOURCC("SMEM") + +/* Maximum message length */ -+#define VC_SM_MAX_MSG_LEN (sizeof(VC_SM_MSG_UNION_T) + \ -+ sizeof(VC_SM_MSG_HDR_T)) -+#define VC_SM_MAX_RSP_LEN (sizeof(VC_SM_MSG_UNION_T)) ++#define VC_SM_MAX_MSG_LEN (sizeof(union vc_sm_msg_union_t) + \ ++ sizeof(struct vc_sm_msg_hdr_t)) ++#define VC_SM_MAX_RSP_LEN (sizeof(union vc_sm_msg_union_t)) + +/* Resource name maximum size */ +#define VC_SM_RESOURCE_NAME 32 + -+/* All message types supported for HOST->VC direction */ -+typedef enum { ++enum vc_sm_msg_type { ++ /* Message types supported for HOST->VC direction */ ++ + /* Allocate shared memory block */ + VC_SM_MSG_TYPE_ALLOC, + /* Lock allocated shared memory block */ @@ -72580,28 +73060,42 @@ index 0000000000000000000000000000000000000000..c4d5ff718a5ba9071ef87fa4c6cf6324 + + /* A previously applied action will need to be reverted */ + VC_SM_MSG_TYPE_ACTION_CLEAN, ++ ++ /* ++ * Import a physical address and wrap into a MEM_HANDLE_T. ++ * Release with VC_SM_MSG_TYPE_FREE. ++ */ ++ VC_SM_MSG_TYPE_IMPORT, ++ ++ /* Message types supported for VC->HOST direction */ ++ ++ /* ++ * VC has finished with an imported memory allocation. ++ * Release any Linux reference counts on the underlying block. ++ */ ++ VC_SM_MSG_TYPE_RELEASED, ++ + VC_SM_MSG_TYPE_MAX -+} VC_SM_MSG_TYPE; ++}; + +/* Type of memory to be allocated */ -+typedef enum { ++enum vc_sm_alloc_type_t { + VC_SM_ALLOC_CACHED, + VC_SM_ALLOC_NON_CACHED, -+ -+} VC_SM_ALLOC_TYPE_T; ++}; + +/* Message header for all messages in HOST->VC direction */ -+typedef struct { ++struct vc_sm_msg_hdr_t { + int32_t type; + uint32_t trans_id; + uint8_t body[0]; + -+} VC_SM_MSG_HDR_T; ++}; + +/* Request to allocate memory (HOST->VC) */ -+typedef struct { ++struct vc_sm_alloc_t { + /* type of memory to allocate */ -+ VC_SM_ALLOC_TYPE_T type; ++ enum vc_sm_alloc_type_t type; + /* byte amount of data to allocate per unit */ + uint32_t base_unit; + /* number of unit to allocate */ @@ -72613,126 +73107,167 @@ index 0000000000000000000000000000000000000000..c4d5ff718a5ba9071ef87fa4c6cf6324 + /* resource name (for easier tracking on vc side) */ + char name[VC_SM_RESOURCE_NAME]; + -+} VC_SM_ALLOC_T; ++}; + +/* Result of a requested memory allocation (VC->HOST) */ -+typedef struct { ++struct vc_sm_alloc_result_t { + /* Transaction identifier */ + uint32_t trans_id; + + /* Resource handle */ + uint32_t res_handle; + /* Pointer to resource buffer */ -+ void *res_mem; ++ uint32_t res_mem; + /* Resource base size (bytes) */ + uint32_t res_base_size; + /* Resource number */ + uint32_t res_num; + -+} VC_SM_ALLOC_RESULT_T; ++}; + +/* Request to free a previously allocated memory (HOST->VC) */ -+typedef struct { ++struct vc_sm_free_t { + /* Resource handle (returned from alloc) */ + uint32_t res_handle; + /* Resource buffer (returned from alloc) */ -+ void *res_mem; ++ uint32_t res_mem; + -+} VC_SM_FREE_T; ++}; + +/* Request to lock a previously allocated memory (HOST->VC) */ -+typedef struct { ++struct vc_sm_lock_unlock_t { + /* Resource handle (returned from alloc) */ + uint32_t res_handle; + /* Resource buffer (returned from alloc) */ -+ void *res_mem; ++ uint32_t res_mem; + -+} VC_SM_LOCK_UNLOCK_T; ++}; + +/* Request to resize a previously allocated memory (HOST->VC) */ -+typedef struct { ++struct vc_sm_resize_t { + /* Resource handle (returned from alloc) */ + uint32_t res_handle; + /* Resource buffer (returned from alloc) */ -+ void *res_mem; ++ uint32_t res_mem; + /* Resource *new* size requested (bytes) */ + uint32_t res_new_size; + -+} VC_SM_RESIZE_T; ++}; + +/* Result of a requested memory lock (VC->HOST) */ -+typedef struct { ++struct vc_sm_lock_result_t { + /* Transaction identifier */ + uint32_t trans_id; + + /* Resource handle */ + uint32_t res_handle; + /* Pointer to resource buffer */ -+ void *res_mem; -+ /* Pointer to former resource buffer if the memory -+ * was reallocated */ -+ void *res_old_mem; ++ uint32_t res_mem; ++ /* ++ * Pointer to former resource buffer if the memory ++ * was reallocated ++ */ ++ uint32_t res_old_mem; + -+} VC_SM_LOCK_RESULT_T; ++}; + +/* Generic result for a request (VC->HOST) */ -+typedef struct { ++struct vc_sm_result_t { + /* Transaction identifier */ + uint32_t trans_id; + + int32_t success; + -+} VC_SM_RESULT_T; ++}; + +/* Request to revert a previously applied action (HOST->VC) */ -+typedef struct { ++struct vc_sm_action_clean_t { + /* Action of interest */ -+ VC_SM_MSG_TYPE res_action; ++ enum vc_sm_msg_type res_action; + /* Transaction identifier for the action of interest */ + uint32_t action_trans_id; + -+} VC_SM_ACTION_CLEAN_T; ++}; + +/* Request to remove all data associated with a given allocator (HOST->VC) */ -+typedef struct { ++struct vc_sm_free_all_t { + /* Allocator identifier */ + uint32_t allocator; ++}; + -+} VC_SM_FREE_ALL_T; ++/* Request to import memory (HOST->VC) */ ++struct vc_sm_import { ++ /* type of memory to allocate */ ++ enum vc_sm_alloc_type_t type; ++ /* pointer to the VC (ie physical) address of the allocated memory */ ++ uint32_t addr; ++ /* size of buffer */ ++ uint32_t size; ++ /* opaque handle returned in RELEASED messages */ ++ int32_t kernel_id; ++ /* Allocator identifier */ ++ uint32_t allocator; ++ /* resource name (for easier tracking on vc side) */ ++ char name[VC_SM_RESOURCE_NAME]; ++}; ++ ++/* Result of a requested memory import (VC->HOST) */ ++struct vc_sm_import_result { ++ /* Transaction identifier */ ++ uint32_t trans_id; ++ ++ /* Resource handle */ ++ uint32_t res_handle; ++}; ++ ++/* Notification that VC has finished with an allocation (VC->HOST) */ ++struct vc_sm_released { ++ /* pointer to the VC (ie physical) address of the allocated memory */ ++ uint32_t addr; ++ /* size of buffer */ ++ uint32_t size; ++ /* opaque handle returned in RELEASED messages */ ++ int32_t kernel_id; ++}; + +/* Union of ALL messages */ -+typedef union { -+ VC_SM_ALLOC_T alloc; -+ VC_SM_ALLOC_RESULT_T alloc_result; -+ VC_SM_FREE_T free; -+ VC_SM_ACTION_CLEAN_T action_clean; -+ VC_SM_RESIZE_T resize; -+ VC_SM_LOCK_RESULT_T lock_result; -+ VC_SM_RESULT_T result; -+ VC_SM_FREE_ALL_T free_all; -+ -+} VC_SM_MSG_UNION_T; ++union vc_sm_msg_union_t { ++ struct vc_sm_alloc_t alloc; ++ struct vc_sm_alloc_result_t alloc_result; ++ struct vc_sm_free_t free; ++ struct vc_sm_lock_unlock_t lock_unlock; ++ struct vc_sm_action_clean_t action_clean; ++ struct vc_sm_resize_t resize; ++ struct vc_sm_lock_result_t lock_result; ++ struct vc_sm_result_t result; ++ struct vc_sm_free_all_t free_all; ++ struct vc_sm_import import; ++ struct vc_sm_import_result import_result; ++ struct vc_sm_released released; ++}; + +#endif /* __VC_SM_DEFS_H__INCLUDED__ */ diff --git a/drivers/char/broadcom/vc_sm/vc_sm_knl.h b/drivers/char/broadcom/vc_sm/vc_sm_knl.h new file mode 100644 -index 0000000000000000000000000000000000000000..965f9a209a025202fea8065d3947c36f4fa43d0a +index 0000000000000000000000000000000000000000..f7f74750d8358779c61dfcd6fc841aa1789a2c5e --- /dev/null +++ b/drivers/char/broadcom/vc_sm/vc_sm_knl.h -@@ -0,0 +1,55 @@ -+/***************************************************************************** -+* Copyright 2011 Broadcom Corporation. All rights reserved. -+* -+* Unless you and Broadcom execute a separate written software license -+* agreement governing use of this software, this software is licensed to you -+* under the terms of the GNU General Public License version 2, available at -+* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). -+* -+* Notwithstanding the above, under no circumstances may you combine this -+* software in any way with any other Broadcom software provided under a -+* license other than the GPL, without Broadcom's express prior written -+* consent. -+*****************************************************************************/ +@@ -0,0 +1,53 @@ ++/* ++ **************************************************************************** ++ * Copyright 2011 Broadcom Corporation. All rights reserved. ++ * ++ * Unless you and Broadcom execute a separate written software license ++ * agreement governing use of this software, this software is licensed to you ++ * under the terms of the GNU General Public License version 2, available at ++ * http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). ++ * ++ * Notwithstanding the above, under no circumstances may you combine this ++ * software in any way with any other Broadcom software provided under a ++ * license other than the GPL, without Broadcom's express prior written ++ * consent. ++ **************************************************************************** ++ */ + +#ifndef __VC_SM_KNL_H__INCLUDED__ +#define __VC_SM_KNL_H__INCLUDED__ @@ -72742,58 +73277,56 @@ index 0000000000000000000000000000000000000000..965f9a209a025202fea8065d3947c36f +#endif + +/* Type of memory to be locked (ie mapped) */ -+typedef enum { ++enum vc_sm_lock_cache_mode { + VC_SM_LOCK_CACHED, + VC_SM_LOCK_NON_CACHED, ++}; + -+} VC_SM_LOCK_CACHE_MODE_T; ++/* Allocate a shared memory handle and block. */ ++int vc_sm_alloc(struct vc_sm_alloc_t *alloc, int *handle); + -+/* Allocate a shared memory handle and block. -+*/ -+int vc_sm_alloc(VC_SM_ALLOC_T *alloc, int *handle); -+ -+/* Free a previously allocated shared memory handle and block. -+*/ ++/* Free a previously allocated shared memory handle and block. */ +int vc_sm_free(int handle); + -+/* Lock a memory handle for use by kernel. -+*/ -+int vc_sm_lock(int handle, VC_SM_LOCK_CACHE_MODE_T mode, -+ long unsigned int *data); ++/* Lock a memory handle for use by kernel. */ ++int vc_sm_lock(int handle, enum vc_sm_lock_cache_mode mode, ++ unsigned long *data); + -+/* Unlock a memory handle in use by kernel. -+*/ ++/* Unlock a memory handle in use by kernel. */ +int vc_sm_unlock(int handle, int flush, int no_vc_unlock); + -+/* Get an internal resource handle mapped from the external one. -+*/ ++/* Get an internal resource handle mapped from the external one. */ +int vc_sm_int_handle(int handle); + -+/* Map a shared memory region for use by kernel. -+*/ -+int vc_sm_map(int handle, unsigned int sm_addr, VC_SM_LOCK_CACHE_MODE_T mode, -+ long unsigned int *data); ++/* Map a shared memory region for use by kernel. */ ++int vc_sm_map(int handle, unsigned int sm_addr, ++ enum vc_sm_lock_cache_mode mode, unsigned long *data); ++ ++/* Import a block of memory into the GPU space. */ ++int vc_sm_import_dmabuf(struct dma_buf *dmabuf, int *handle); + +#endif /* __VC_SM_KNL_H__INCLUDED__ */ diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c new file mode 100644 -index 0000000000000000000000000000000000000000..76abd126c4617b6310fcf0ebd7ab1d5f73a18a70 +index 0000000000000000000000000000000000000000..f8b909a09adb0743ed5d55dadf8fbf2fef055197 --- /dev/null +++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c -@@ -0,0 +1,499 @@ -+/***************************************************************************** -+* Copyright 2011-2012 Broadcom Corporation. All rights reserved. -+* -+* Unless you and Broadcom execute a separate written software license -+* agreement governing use of this software, this software is licensed to you -+* under the terms of the GNU General Public License version 2, available at -+* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). -+* -+* Notwithstanding the above, under no circumstances may you combine this -+* software in any way with any other Broadcom software provided under a -+* license other than the GPL, without Broadcom's express prior written -+* consent. -+*****************************************************************************/ +@@ -0,0 +1,516 @@ ++/* ++ **************************************************************************** ++ * Copyright 2011-2012 Broadcom Corporation. All rights reserved. ++ * ++ * Unless you and Broadcom execute a separate written software license ++ * agreement governing use of this software, this software is licensed to you ++ * under the terms of the GNU General Public License version 2, available at ++ * http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). ++ * ++ * Notwithstanding the above, under no circumstances may you combine this ++ * software in any way with any other Broadcom software provided under a ++ * license other than the GPL, without Broadcom's express prior written ++ * consent. ++ **************************************************************************** ++ */ + +/* ---- Include Files ----------------------------------------------------- */ +#include @@ -72866,11 +73399,11 @@ index 0000000000000000000000000000000000000000..76abd126c4617b6310fcf0ebd7ab1d5f + +static struct +sm_cmd_rsp_blk *vc_vchi_cmd_create(struct sm_instance *instance, -+ VC_SM_MSG_TYPE id, void *msg, ++ enum vc_sm_msg_type id, void *msg, + uint32_t size, int wait) +{ + struct sm_cmd_rsp_blk *blk; -+ VC_SM_MSG_HDR_T *hdr; ++ struct vc_sm_msg_hdr_t *hdr; + + if (down_interruptible(&instance->free_sema)) { + blk = kmalloc(sizeof(*blk), GFP_KERNEL); @@ -72892,7 +73425,7 @@ index 0000000000000000000000000000000000000000..76abd126c4617b6310fcf0ebd7ab1d5f + blk->wait = wait; + blk->length = sizeof(*hdr) + size; + -+ hdr = (VC_SM_MSG_HDR_T *) blk->msg; ++ hdr = (struct vc_sm_msg_hdr_t *) blk->msg; + hdr->type = id; + mutex_lock(&instance->lock); + hdr->trans_id = blk->id = ++instance->trans_id; @@ -72922,7 +73455,7 @@ index 0000000000000000000000000000000000000000..76abd126c4617b6310fcf0ebd7ab1d5f +{ + struct sm_instance *instance = arg; + struct sm_cmd_rsp_blk *cmd = NULL, *cmd_tmp; -+ VC_SM_RESULT_T *reply; ++ struct vc_sm_result_t *reply; + uint32_t reply_len; + int32_t status; + int svc_use = 1; @@ -73038,7 +73571,7 @@ index 0000000000000000000000000000000000000000..76abd126c4617b6310fcf0ebd7ab1d5f + } +} + -+VC_VCHI_SM_HANDLE_T vc_vchi_sm_init(VCHI_INSTANCE_T vchi_instance, ++struct sm_instance *vc_vchi_sm_init(VCHI_INSTANCE_T vchi_instance, + VCHI_CONNECTION_T **vchi_connections, + uint32_t num_connections) +{ @@ -73108,7 +73641,8 @@ index 0000000000000000000000000000000000000000..76abd126c4617b6310fcf0ebd7ab1d5f + set_user_nice(instance->io_thread, -10); + wake_up_process(instance->io_thread); + -+ pr_debug("%s: success - instance 0x%x", __func__, (unsigned)instance); ++ pr_debug("%s: success - instance 0x%x", __func__, ++ (unsigned int)instance); + return instance; + +err_close_services: @@ -73122,7 +73656,7 @@ index 0000000000000000000000000000000000000000..76abd126c4617b6310fcf0ebd7ab1d5f + return NULL; +} + -+int vc_vchi_sm_stop(VC_VCHI_SM_HANDLE_T *handle) ++int vc_vchi_sm_stop(struct sm_instance **handle) +{ + struct sm_instance *instance; + uint32_t i; @@ -73142,6 +73676,7 @@ index 0000000000000000000000000000000000000000..76abd126c4617b6310fcf0ebd7ab1d5f + /* Close all VCHI service connections */ + for (i = 0; i < instance->num_connections; i++) { + int32_t success; ++ + vchi_service_use(instance->vchi_handle[i]); + + success = vchi_service_close(instance->vchi_handle[i]); @@ -73156,8 +73691,8 @@ index 0000000000000000000000000000000000000000..76abd126c4617b6310fcf0ebd7ab1d5f + return -EINVAL; +} + -+int vc_vchi_sm_send_msg(VC_VCHI_SM_HANDLE_T handle, -+ VC_SM_MSG_TYPE msg_id, ++int vc_vchi_sm_send_msg(struct sm_instance *handle, ++ enum vc_sm_msg_type msg_id, + void *msg, uint32_t msg_size, + void *result, uint32_t result_size, + uint32_t *cur_trans_id, uint8_t wait_reply) @@ -73216,7 +73751,8 @@ index 0000000000000000000000000000000000000000..76abd126c4617b6310fcf0ebd7ab1d5f + if (result && result_size) { + memcpy(result, cmd_blk->msg, result_size); + } else { -+ VC_SM_RESULT_T *res = (VC_SM_RESULT_T *) cmd_blk->msg; ++ struct vc_sm_result_t *res = ++ (struct vc_sm_result_t *) cmd_blk->msg; + status = (res->success == 0) ? 0 : -ENXIO; + } + @@ -73227,32 +73763,34 @@ index 0000000000000000000000000000000000000000..76abd126c4617b6310fcf0ebd7ab1d5f + return status; +} + -+int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, VC_SM_ALLOC_T *msg, -+ VC_SM_ALLOC_RESULT_T *result, uint32_t *cur_trans_id) ++int vc_vchi_sm_alloc(struct sm_instance *handle, struct vc_sm_alloc_t *msg, ++ struct vc_sm_alloc_result_t *result, ++ uint32_t *cur_trans_id) +{ + return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_ALLOC, + msg, sizeof(*msg), result, sizeof(*result), + cur_trans_id, 1); +} + -+int vc_vchi_sm_free(VC_VCHI_SM_HANDLE_T handle, -+ VC_SM_FREE_T *msg, uint32_t *cur_trans_id) ++int vc_vchi_sm_free(struct sm_instance *handle, ++ struct vc_sm_free_t *msg, uint32_t *cur_trans_id) +{ + return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_FREE, + msg, sizeof(*msg), 0, 0, cur_trans_id, 0); +} + -+int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, -+ VC_SM_LOCK_UNLOCK_T *msg, -+ VC_SM_LOCK_RESULT_T *result, uint32_t *cur_trans_id) ++int vc_vchi_sm_lock(struct sm_instance *handle, ++ struct vc_sm_lock_unlock_t *msg, ++ struct vc_sm_lock_result_t *result, ++ uint32_t *cur_trans_id) +{ + return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_LOCK, + msg, sizeof(*msg), result, sizeof(*result), + cur_trans_id, 1); +} + -+int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, -+ VC_SM_LOCK_UNLOCK_T *msg, ++int vc_vchi_sm_unlock(struct sm_instance *handle, ++ struct vc_sm_lock_unlock_t *msg, + uint32_t *cur_trans_id, uint8_t wait_reply) +{ + return vc_vchi_sm_send_msg(handle, wait_reply ? @@ -73262,43 +73800,55 @@ index 0000000000000000000000000000000000000000..76abd126c4617b6310fcf0ebd7ab1d5f + wait_reply); +} + -+int vc_vchi_sm_resize(VC_VCHI_SM_HANDLE_T handle, VC_SM_RESIZE_T *msg, -+ uint32_t *cur_trans_id) ++int vc_vchi_sm_resize(struct sm_instance *handle, struct vc_sm_resize_t *msg, ++ uint32_t *cur_trans_id) +{ + return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_RESIZE, + msg, sizeof(*msg), 0, 0, cur_trans_id, 1); +} + -+int vc_vchi_sm_walk_alloc(VC_VCHI_SM_HANDLE_T handle) ++int vc_vchi_sm_walk_alloc(struct sm_instance *handle) +{ + return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_WALK_ALLOC, + 0, 0, 0, 0, 0, 0); +} + -+int vc_vchi_sm_clean_up(VC_VCHI_SM_HANDLE_T handle, VC_SM_ACTION_CLEAN_T *msg) ++int vc_vchi_sm_clean_up(struct sm_instance *handle, ++ struct vc_sm_action_clean_t *msg) +{ + return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_ACTION_CLEAN, + msg, sizeof(*msg), 0, 0, 0, 0); +} ++ ++int vc_vchi_sm_import(struct sm_instance *handle, struct vc_sm_import *msg, ++ struct vc_sm_import_result *result, ++ uint32_t *cur_trans_id) ++{ ++ return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_IMPORT, ++ msg, sizeof(*msg), result, sizeof(*result), ++ cur_trans_id, 1); ++} diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h new file mode 100644 -index 0000000000000000000000000000000000000000..5e279f5a95fac7227cea15941bf0570ddc2b0886 +index 0000000000000000000000000000000000000000..abe4ed15836f2be756083d3fdb4edb544dacc1a6 --- /dev/null +++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h -@@ -0,0 +1,82 @@ -+/***************************************************************************** -+* Copyright 2011 Broadcom Corporation. All rights reserved. -+* -+* Unless you and Broadcom execute a separate written software license -+* agreement governing use of this software, this software is licensed to you -+* under the terms of the GNU General Public License version 2, available at -+* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). -+* -+* Notwithstanding the above, under no circumstances may you combine this -+* software in any way with any other Broadcom software provided under a -+* license other than the GPL, without Broadcom's express prior written -+* consent. -+*****************************************************************************/ +@@ -0,0 +1,102 @@ ++/* ++ **************************************************************************** ++ * Copyright 2011 Broadcom Corporation. All rights reserved. ++ * ++ * Unless you and Broadcom execute a separate written software license ++ * agreement governing use of this software, this software is licensed to you ++ * under the terms of the GNU General Public License version 2, available at ++ * http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). ++ * ++ * Notwithstanding the above, under no circumstances may you combine this ++ * software in any way with any other Broadcom software provided under a ++ * license other than the GPL, without Broadcom's express prior written ++ * consent. ++ **************************************************************************** ++ */ + +#ifndef __VC_VCHI_SM_H__INCLUDED__ +#define __VC_VCHI_SM_H__INCLUDED__ @@ -73307,86 +73857,106 @@ index 0000000000000000000000000000000000000000..5e279f5a95fac7227cea15941bf0570d + +#include "vc_sm_defs.h" + -+/* Forward declare. -+*/ -+typedef struct sm_instance *VC_VCHI_SM_HANDLE_T; ++/* ++ * Forward declare. ++ */ ++struct sm_instance; + -+/* Initialize the shared memory service, opens up vchi connection to talk to it. -+*/ -+VC_VCHI_SM_HANDLE_T vc_vchi_sm_init(VCHI_INSTANCE_T vchi_instance, ++/* ++ * Initialize the shared memory service, opens up vchi connection to talk to it. ++ */ ++struct sm_instance *vc_vchi_sm_init(VCHI_INSTANCE_T vchi_instance, + VCHI_CONNECTION_T **vchi_connections, + uint32_t num_connections); + -+/* Terminates the shared memory service. -+*/ -+int vc_vchi_sm_stop(VC_VCHI_SM_HANDLE_T *handle); ++/* ++ * Terminates the shared memory service. ++ */ ++int vc_vchi_sm_stop(struct sm_instance **handle); + -+/* Ask the shared memory service to allocate some memory on videocre and -+** return the result of this allocation (which upon success will be a pointer -+** to some memory in videocore space). -+*/ -+int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, -+ VC_SM_ALLOC_T *alloc, -+ VC_SM_ALLOC_RESULT_T *alloc_result, uint32_t *trans_id); ++/* ++ * Ask the shared memory service to allocate some memory on videocre and ++ * return the result of this allocation (which upon success will be a pointer ++ * to some memory in videocore space). ++ */ ++int vc_vchi_sm_alloc(struct sm_instance *handle, struct vc_sm_alloc_t *alloc, ++ struct vc_sm_alloc_result_t *alloc_result, ++ uint32_t *trans_id); + -+/* Ask the shared memory service to free up some memory that was previously -+** allocated by the vc_vchi_sm_alloc function call. -+*/ -+int vc_vchi_sm_free(VC_VCHI_SM_HANDLE_T handle, -+ VC_SM_FREE_T *free, uint32_t *trans_id); ++/* ++ * Ask the shared memory service to free up some memory that was previously ++ * allocated by the vc_vchi_sm_alloc function call. ++ */ ++int vc_vchi_sm_free(struct sm_instance *handle, ++ struct vc_sm_free_t *free, uint32_t *trans_id); + -+/* Ask the shared memory service to lock up some memory that was previously -+** allocated by the vc_vchi_sm_alloc function call. -+*/ -+int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, -+ VC_SM_LOCK_UNLOCK_T *lock_unlock, -+ VC_SM_LOCK_RESULT_T *lock_result, uint32_t *trans_id); ++/* ++ * Ask the shared memory service to lock up some memory that was previously ++ * allocated by the vc_vchi_sm_alloc function call. ++ */ ++int vc_vchi_sm_lock(struct sm_instance *handle, ++ struct vc_sm_lock_unlock_t *lock_unlock, ++ struct vc_sm_lock_result_t *lock_result, ++ uint32_t *trans_id); + -+/* Ask the shared memory service to unlock some memory that was previously -+** allocated by the vc_vchi_sm_alloc function call. -+*/ -+int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, -+ VC_SM_LOCK_UNLOCK_T *lock_unlock, ++/* ++ * Ask the shared memory service to unlock some memory that was previously ++ * allocated by the vc_vchi_sm_alloc function call. ++ */ ++int vc_vchi_sm_unlock(struct sm_instance *handle, ++ struct vc_sm_lock_unlock_t *lock_unlock, + uint32_t *trans_id, uint8_t wait_reply); + -+/* Ask the shared memory service to resize some memory that was previously -+** allocated by the vc_vchi_sm_alloc function call. -+*/ -+int vc_vchi_sm_resize(VC_VCHI_SM_HANDLE_T handle, -+ VC_SM_RESIZE_T *resize, uint32_t *trans_id); ++/* ++ * Ask the shared memory service to resize some memory that was previously ++ * allocated by the vc_vchi_sm_alloc function call. ++ */ ++int vc_vchi_sm_resize(struct sm_instance *handle, ++ struct vc_sm_resize_t *resize, uint32_t *trans_id); + -+/* Walk the allocated resources on the videocore side, the allocation will -+** show up in the log. This is purely for debug/information and takes no -+** specific actions. -+*/ -+int vc_vchi_sm_walk_alloc(VC_VCHI_SM_HANDLE_T handle); ++/* ++ * Walk the allocated resources on the videocore side, the allocation will ++ * show up in the log. This is purely for debug/information and takes no ++ * specific actions. ++ */ ++int vc_vchi_sm_walk_alloc(struct sm_instance *handle); + -+/* Clean up following a previously interrupted action which left the system -+** in a bad state of some sort. -+*/ -+int vc_vchi_sm_clean_up(VC_VCHI_SM_HANDLE_T handle, -+ VC_SM_ACTION_CLEAN_T *action_clean); ++/* ++ * Clean up following a previously interrupted action which left the system ++ * in a bad state of some sort. ++ */ ++int vc_vchi_sm_clean_up(struct sm_instance *handle, ++ struct vc_sm_action_clean_t *action_clean); ++ ++/* ++ * Import a contiguous block of memory and wrap it in a GPU MEM_HANDLE_T. ++ */ ++int vc_vchi_sm_import(struct sm_instance *handle, struct vc_sm_import *msg, ++ struct vc_sm_import_result *result, ++ uint32_t *cur_trans_id); + +#endif /* __VC_VCHI_SM_H__INCLUDED__ */ diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c new file mode 100644 -index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd4203179500 +index 0000000000000000000000000000000000000000..034ae2f27f870621af9f49453501f1cde051f32a --- /dev/null +++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -0,0 +1,3222 @@ -+/***************************************************************************** -+* Copyright 2011-2012 Broadcom Corporation. All rights reserved. -+* -+* Unless you and Broadcom execute a separate written software license -+* agreement governing use of this software, this software is licensed to you -+* under the terms of the GNU General Public License version 2, available at -+* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). -+* -+* Notwithstanding the above, under no circumstances may you combine this -+* software in any way with any other Broadcom software provided under a -+* license other than the GPL, without Broadcom's express prior written -+* consent. -+*****************************************************************************/ +@@ -0,0 +1,3505 @@ ++/* ++ **************************************************************************** ++ * Copyright 2011-2012 Broadcom Corporation. All rights reserved. ++ * ++ * Unless you and Broadcom execute a separate written software license ++ * agreement governing use of this software, this software is licensed to you ++ * under the terms of the GNU General Public License version 2, available at ++ * http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). ++ * ++ * Notwithstanding the above, under no circumstances may you combine this ++ * software in any way with any other Broadcom software provided under a ++ * license other than the GPL, without Broadcom's express prior written ++ * consent. ++ **************************************************************************** ++ */ + +/* ---- Include Files ----------------------------------------------------- */ + @@ -73395,6 +73965,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 +#include +#include +#include ++#include +#include +#include +#include @@ -73403,6 +73974,8 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 +#include +#include +#include ++#include ++#include +#include +#include +#include @@ -73421,6 +73994,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 +/* ---- Private Constants and Types --------------------------------------- */ + +#define DEVICE_NAME "vcsm" ++#define DRIVER_NAME "bcm2835-vcsm" +#define DEVICE_MINOR 0 + +#define VC_SM_DIR_ROOT_NAME "vc-smem" @@ -73431,9 +74005,8 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 +#define VC_SM_DEBUG "debug" +#define VC_SM_WRITE_BUF_SIZE 128 + -+/* Statistics tracked per resource and globally. -+*/ -+enum SM_STATS_T { ++/* Statistics tracked per resource and globally. */ ++enum sm_stats_t { + /* Attempt. */ + ALLOC, + FREE, @@ -73442,6 +74015,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + MAP, + FLUSH, + INVALID, ++ IMPORT, + + END_ATTEMPT, + @@ -73453,6 +74027,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + MAP_FAIL, + FLUSH_FAIL, + INVALID_FAIL, ++ IMPORT_FAIL, + + END_ALL, + @@ -73466,38 +74041,37 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + "Map", + "Cache Flush", + "Cache Invalidate", ++ "Import", +}; + +typedef int (*VC_SM_SHOW) (struct seq_file *s, void *v); -+struct SM_PDE_T { ++struct sm_pde_t { + VC_SM_SHOW show; /* Debug fs function hookup. */ + struct dentry *dir_entry; /* Debug fs directory entry. */ + void *priv_data; /* Private data */ + +}; + -+/* Single resource allocation tracked for all devices. -+*/ ++/* Single resource allocation tracked for all devices. */ +struct sm_mmap { + struct list_head map_list; /* Linked list of maps. */ + -+ struct SM_RESOURCE_T *resource; /* Pointer to the resource. */ ++ struct sm_resource_t *resource; /* Pointer to the resource. */ + -+ pid_t res_pid; /* PID owning that resource. */ ++ pid_t res_pid; /* PID owning that resource. */ + unsigned int res_vc_hdl; /* Resource handle (videocore). */ + unsigned int res_usr_hdl; /* Resource handle (user). */ + -+ long unsigned int res_addr; /* Mapped virtual address. */ ++ unsigned long res_addr; /* Mapped virtual address. */ + struct vm_area_struct *vma; /* VM area for this mapping. */ -+ unsigned int ref_count; /* Reference count to this vma. */ ++ unsigned int ref_count; /* Reference count to this vma. */ + + /* Used to link maps associated with a resource. */ + struct list_head resource_map_list; +}; + -+/* Single resource allocation tracked for each opened device. -+*/ -+struct SM_RESOURCE_T { ++/* Single resource allocation tracked for each opened device. */ ++struct sm_resource_t { + struct list_head resource_list; /* List of resources. */ + struct list_head global_resource_list; /* Global list of resources. */ + @@ -73510,49 +74084,55 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + void *res_base_mem; /* Resource base memory address. */ + uint32_t res_size; /* Resource size allocated. */ + enum vmcs_sm_cache_e res_cached; /* Resource cache type. */ -+ struct SM_RESOURCE_T *res_shared; /* Shared resource */ ++ struct sm_resource_t *res_shared; /* Shared resource */ + -+ enum SM_STATS_T res_stats[END_ALL]; /* Resource statistics. */ ++ enum sm_stats_t res_stats[END_ALL]; /* Resource statistics. */ + + uint8_t map_count; /* Counter of mappings for this resource. */ + struct list_head map_list; /* Maps associated with a resource. */ + -+ struct SM_PRIV_DATA_T *private; ++ /* DMABUF related fields */ ++ struct dma_buf *dma_buf; ++ struct dma_buf_attachment *attach; ++ struct sg_table *sgt; ++ dma_addr_t dma_addr; ++ ++ struct sm_priv_data_t *private; ++ bool map; /* whether to map pages up front */ +}; + -+/* Private file data associated with each opened device. -+*/ -+struct SM_PRIV_DATA_T { ++/* Private file data associated with each opened device. */ ++struct sm_priv_data_t { + struct list_head resource_list; /* List of resources. */ + + pid_t pid; /* PID of creator. */ + + struct dentry *dir_pid; /* Debug fs entries root. */ -+ struct SM_PDE_T dir_stats; /* Debug fs entries statistics sub-tree. */ -+ struct SM_PDE_T dir_res; /* Debug fs resource sub-tree. */ ++ struct sm_pde_t dir_stats; /* Debug fs entries statistics sub-tree. */ ++ struct sm_pde_t dir_res; /* Debug fs resource sub-tree. */ + + int restart_sys; /* Tracks restart on interrupt. */ -+ VC_SM_MSG_TYPE int_action; /* Interrupted action. */ ++ enum vc_sm_msg_type int_action; /* Interrupted action. */ + uint32_t int_trans_id; /* Interrupted transaction. */ + +}; + -+/* Global state information. -+*/ -+struct SM_STATE_T { -+ VC_VCHI_SM_HANDLE_T sm_handle; /* Handle for videocore service. */ ++/* Global state information. */ ++struct sm_state_t { ++ struct platform_device *pdev; ++ struct sm_instance *sm_handle; /* Handle for videocore service. */ + struct dentry *dir_root; /* Debug fs entries root. */ + struct dentry *dir_alloc; /* Debug fs entries allocations. */ -+ struct SM_PDE_T dir_stats; /* Debug fs entries statistics sub-tree. */ -+ struct SM_PDE_T dir_state; /* Debug fs entries state sub-tree. */ ++ struct sm_pde_t dir_stats; /* Debug fs entries statistics sub-tree. */ ++ struct sm_pde_t dir_state; /* Debug fs entries state sub-tree. */ + struct dentry *debug; /* Debug fs entries debug. */ + + struct mutex map_lock; /* Global map lock. */ + struct list_head map_list; /* List of maps. */ + struct list_head resource_list; /* List of resources. */ + -+ enum SM_STATS_T deceased[END_ALL]; /* Natural termination stats. */ -+ enum SM_STATS_T terminated[END_ALL]; /* Forced termination stats. */ ++ enum sm_stats_t deceased[END_ALL]; /* Natural termination stats. */ ++ enum sm_stats_t terminated[END_ALL]; /* Forced termination stats. */ + uint32_t res_deceased_cnt; /* Natural termination counter. */ + uint32_t res_terminated_cnt; /* Forced termination counter. */ + @@ -73561,7 +74141,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + struct class *sm_class; /* Class. */ + struct device *sm_dev; /* Device. */ + -+ struct SM_PRIV_DATA_T *data_knl; /* Kernel internal data tracking. */ ++ struct sm_priv_data_t *data_knl; /* Kernel internal data tracking. */ + + struct mutex lock; /* Global lock. */ + uint32_t guid; /* GUID (next) tracker. */ @@ -73570,7 +74150,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + +/* ---- Private Variables ----------------------------------------------- */ + -+static struct SM_STATE_T *sm_state; ++static struct sm_state_t *sm_state; +static int sm_inited; + +#if 0 @@ -73582,22 +74162,50 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 +}; +#endif + ++typedef void cache_flush_op_fn(const void *, const void *); ++ ++#if defined(CONFIG_CPU_CACHE_V7) ++extern cache_flush_op_fn v7_dma_inv_range; ++extern cache_flush_op_fn v7_dma_clean_range; ++static cache_flush_op_fn * const flushops[4] = ++{ ++ 0, ++ v7_dma_inv_range, ++ v7_dma_clean_range, ++ v7_dma_flush_range, ++}; ++#elif defined(CONFIG_CPU_CACHE_V6) ++extern cache_flush_op_fn v6_dma_inv_range; ++extern cache_flush_op_fn v6_dma_clean_range; ++static cache_flush_op_fn * const flushops[4] = ++{ ++ 0, ++ v6_dma_inv_range, ++ v6_dma_clean_range, ++ v6_dma_flush_range, ++}; ++#else ++#error Unknown cache config ++#endif ++ +/* ---- Private Function Prototypes -------------------------------------- */ + +/* ---- Private Functions ------------------------------------------------ */ + -+static inline unsigned vcaddr_to_pfn(unsigned long vc_addr) ++static inline unsigned int vcaddr_to_pfn(unsigned long vc_addr) +{ + unsigned long pfn = vc_addr & 0x3FFFFFFF; ++ + pfn += mm_vc_mem_phys_addr; + pfn >>= PAGE_SHIFT; + return pfn; +} + -+/* Carries over to the state statistics the statistics once owned by a deceased -+** resource. -+*/ -+static void vc_sm_resource_deceased(struct SM_RESOURCE_T *p_res, int terminated) ++/* ++ * Carries over to the state statistics the statistics once owned by a deceased ++ * resource. ++ */ ++static void vc_sm_resource_deceased(struct sm_resource_t *p_res, int terminated) +{ + if (sm_state != NULL) { + if (p_res != NULL) { @@ -73620,9 +74228,10 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + } +} + -+/* Fetch a videocore handle corresponding to a mapping of the pid+address -+** returns 0 (ie NULL) if no such handle exists in the global map. -+*/ ++/* ++ * Fetch a videocore handle corresponding to a mapping of the pid+address ++ * returns 0 (ie NULL) if no such handle exists in the global map. ++ */ +static unsigned int vmcs_sm_vc_handle_from_pid_and_address(unsigned int pid, + unsigned int addr) +{ @@ -73634,8 +74243,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + + mutex_lock(&(sm_state->map_lock)); + -+ /* Lookup the resource. -+ */ ++ /* Lookup the resource. */ + if (!list_empty(&sm_state->map_list)) { + list_for_each_entry(map, &sm_state->map_list, map_list) { + if (map->res_pid != pid || map->res_addr != addr) @@ -73653,13 +74261,14 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + mutex_unlock(&(sm_state->map_lock)); + +out: -+ /* Use a debug log here as it may be a valid situation that we query -+ ** for something that is not mapped, we do not want a kernel log each -+ ** time around. -+ ** -+ ** There are other error log that would pop up accordingly if someone -+ ** subsequently tries to use something invalid after being told not to -+ ** use it... ++ /* ++ * Use a debug log here as it may be a valid situation that we query ++ * for something that is not mapped, we do not want a kernel log each ++ * time around. ++ * ++ * There are other error log that would pop up accordingly if someone ++ * subsequently tries to use something invalid after being told not to ++ * use it... + */ + if (handle == 0) { + pr_debug("[%s]: not a valid map (pid %u, addr %x)\n", @@ -73669,9 +74278,10 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + return handle; +} + -+/* Fetch a user handle corresponding to a mapping of the pid+address -+** returns 0 (ie NULL) if no such handle exists in the global map. -+*/ ++/* ++ * Fetch a user handle corresponding to a mapping of the pid+address ++ * returns 0 (ie NULL) if no such handle exists in the global map. ++ */ +static unsigned int vmcs_sm_usr_handle_from_pid_and_address(unsigned int pid, + unsigned int addr) +{ @@ -73683,8 +74293,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + + mutex_lock(&(sm_state->map_lock)); + -+ /* Lookup the resource. -+ */ ++ /* Lookup the resource. */ + if (!list_empty(&sm_state->map_list)) { + list_for_each_entry(map, &sm_state->map_list, map_list) { + if (map->res_pid != pid || map->res_addr != addr) @@ -73702,7 +74311,8 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + mutex_unlock(&(sm_state->map_lock)); + +out: -+ /* Use a debug log here as it may be a valid situation that we query ++ /* ++ * Use a debug log here as it may be a valid situation that we query + * for something that is not mapped yet. + * + * There are other error log that would pop up accordingly if someone @@ -73717,9 +74327,10 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 +} + +#if defined(DO_NOT_USE) -+/* Fetch an address corresponding to a mapping of the pid+handle -+** returns 0 (ie NULL) if no such address exists in the global map. -+*/ ++/* ++ * Fetch an address corresponding to a mapping of the pid+handle ++ * returns 0 (ie NULL) if no such address exists in the global map. ++ */ +static unsigned int vmcs_sm_usr_address_from_pid_and_vc_handle(unsigned int pid, + unsigned int hdl) +{ @@ -73731,8 +74342,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + + mutex_lock(&(sm_state->map_lock)); + -+ /* Lookup the resource. -+ */ ++ /* Lookup the resource. */ + if (!list_empty(&sm_state->map_list)) { + list_for_each_entry(map, &sm_state->map_list, map_list) { + if (map->res_pid != pid || map->res_vc_hdl != hdl) @@ -73750,13 +74360,14 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + mutex_unlock(&(sm_state->map_lock)); + +out: -+ /* Use a debug log here as it may be a valid situation that we query -+ ** for something that is not mapped, we do not want a kernel log each -+ ** time around. -+ ** -+ ** There are other error log that would pop up accordingly if someone -+ ** subsequently tries to use something invalid after being told not to -+ ** use it... ++ /* ++ * Use a debug log here as it may be a valid situation that we query ++ * for something that is not mapped, we do not want a kernel log each ++ * time around. ++ * ++ * There are other error log that would pop up accordingly if someone ++ * subsequently tries to use something invalid after being told not to ++ * use it... + */ + if (addr == 0) + pr_debug("[%s]: not a valid map (pid %u, hdl %x)\n", @@ -73766,9 +74377,10 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 +} +#endif + -+/* Fetch an address corresponding to a mapping of the pid+handle -+** returns 0 (ie NULL) if no such address exists in the global map. -+*/ ++/* ++ * Fetch an address corresponding to a mapping of the pid+handle ++ * returns 0 (ie NULL) if no such address exists in the global map. ++ */ +static unsigned int vmcs_sm_usr_address_from_pid_and_usr_handle(unsigned int + pid, + unsigned int @@ -73782,8 +74394,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + + mutex_lock(&(sm_state->map_lock)); + -+ /* Lookup the resource. -+ */ ++ /* Lookup the resource. */ + if (!list_empty(&sm_state->map_list)) { + list_for_each_entry(map, &sm_state->map_list, map_list) { + if (map->res_pid != pid || map->res_usr_hdl != hdl) @@ -73801,7 +74412,8 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + mutex_unlock(&(sm_state->map_lock)); + +out: -+ /* Use a debug log here as it may be a valid situation that we query ++ /* ++ * Use a debug log here as it may be a valid situation that we query + * for something that is not mapped, we do not want a kernel log each + * time around. + * @@ -73816,19 +74428,16 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + return addr; +} + -+/* Adds a resource mapping to the global data list. -+*/ -+static void vmcs_sm_add_map(struct SM_STATE_T *state, -+ struct SM_RESOURCE_T *resource, struct sm_mmap *map) ++/* Adds a resource mapping to the global data list. */ ++static void vmcs_sm_add_map(struct sm_state_t *state, ++ struct sm_resource_t *resource, struct sm_mmap *map) +{ + mutex_lock(&(state->map_lock)); + -+ /* Add to the global list of mappings -+ */ ++ /* Add to the global list of mappings */ + list_add(&map->map_list, &state->map_list); + -+ /* Add to the list of mappings for this resource -+ */ ++ /* Add to the list of mappings for this resource */ + list_add(&map->resource_map_list, &resource->map_list); + resource->map_count++; + @@ -73839,20 +74448,17 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + map->res_usr_hdl, map->res_addr); +} + -+/* Removes a resource mapping from the global data list. -+*/ -+static void vmcs_sm_remove_map(struct SM_STATE_T *state, -+ struct SM_RESOURCE_T *resource, ++/* Removes a resource mapping from the global data list. */ ++static void vmcs_sm_remove_map(struct sm_state_t *state, ++ struct sm_resource_t *resource, + struct sm_mmap *map) +{ + mutex_lock(&(state->map_lock)); + -+ /* Remove from the global list of mappings -+ */ ++ /* Remove from the global list of mappings */ + list_del(&map->map_list); + -+ /* Remove from the list of mapping for this resource -+ */ ++ /* Remove from the list of mapping for this resource */ + list_del(&map->resource_map_list); + if (resource->map_count > 0) + resource->map_count--; @@ -73866,12 +74472,13 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + kfree(map); +} + -+/* Read callback for the global state proc entry. -+*/ ++/* Read callback for the global state proc entry. */ +static int vc_sm_global_state_show(struct seq_file *s, void *v) +{ + struct sm_mmap *map = NULL; ++ struct sm_resource_t *resource = NULL; + int map_count = 0; ++ int resource_count = 0; + + if (sm_state == NULL) + return 0; @@ -73879,11 +74486,44 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + seq_printf(s, "\nVC-ServiceHandle 0x%x\n", + (unsigned int)sm_state->sm_handle); + -+ /* Log all applicable mapping(s). -+ */ ++ /* Log all applicable mapping(s). */ + + mutex_lock(&(sm_state->map_lock)); ++ seq_puts(s, "\nResources\n"); ++ if (!list_empty(&sm_state->resource_list)) { ++ list_for_each_entry(resource, &sm_state->resource_list, ++ global_resource_list) { ++ resource_count++; + ++ seq_printf(s, "\nResource %p\n", ++ resource); ++ seq_printf(s, " PID %u\n", ++ resource->pid); ++ seq_printf(s, " RES_GUID 0x%x\n", ++ resource->res_guid); ++ seq_printf(s, " LOCK_COUNT %u\n", ++ resource->lock_count); ++ seq_printf(s, " REF_COUNT %u\n", ++ resource->ref_count); ++ seq_printf(s, " res_handle 0x%X\n", ++ resource->res_handle); ++ seq_printf(s, " res_base_mem %p\n", ++ resource->res_base_mem); ++ seq_printf(s, " SIZE %d\n", ++ resource->res_size); ++ seq_printf(s, " DMABUF %p\n", ++ resource->dma_buf); ++ seq_printf(s, " ATTACH %p\n", ++ resource->attach); ++ seq_printf(s, " SGT %p\n", ++ resource->sgt); ++ seq_printf(s, " DMA_ADDR 0x%08X\n", ++ resource->dma_addr); ++ } ++ } ++ seq_printf(s, "\n\nTotal resource count: %d\n\n", resource_count); ++ ++ seq_puts(s, "\nMappings\n"); + if (!list_empty(&sm_state->map_list)) { + list_for_each_entry(map, &sm_state->map_list, map_list) { + map_count++; @@ -73898,6 +74538,8 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + map->res_usr_hdl); + seq_printf(s, " USR-ADDR 0x%lx\n", + map->res_addr); ++ seq_printf(s, " SIZE %d\n", ++ map->resource->res_size); + } + } + @@ -73911,8 +74553,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 +{ + int ix; + -+ /* Global state tracked statistics. -+ */ ++ /* Global state tracked statistics. */ + if (sm_state != NULL) { + seq_puts(s, "\nDeceased Resources Statistics\n"); + @@ -73958,24 +74599,22 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 +} + +#if 0 -+/* Read callback for the statistics proc entry. -+*/ ++/* Read callback for the statistics proc entry. */ +static int vc_sm_statistics_show(struct seq_file *s, void *v) +{ + int ix; -+ struct SM_PRIV_DATA_T *file_data; -+ struct SM_RESOURCE_T *resource; ++ struct sm_priv_data_t *file_data; ++ struct sm_resource_t *resource; + int res_count = 0; -+ struct SM_PDE_T *p_pde; ++ struct sm_pde_t *p_pde; + -+ p_pde = (struct SM_PDE_T *)(s->private); -+ file_data = (struct SM_PRIV_DATA_T *)(p_pde->priv_data); ++ p_pde = (struct sm_pde_t *)(s->private); ++ file_data = (struct sm_priv_data_t *)(p_pde->priv_data); + + if (file_data == NULL) + return 0; + -+ /* Per process statistics. -+ */ ++ /* Per process statistics. */ + + seq_printf(s, "\nStatistics for TGID %d\n", file_data->pid); + @@ -74021,13 +74660,13 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 +/* Read callback for the allocation proc entry. */ +static int vc_sm_alloc_show(struct seq_file *s, void *v) +{ -+ struct SM_PRIV_DATA_T *file_data; -+ struct SM_RESOURCE_T *resource; ++ struct sm_priv_data_t *file_data; ++ struct sm_resource_t *resource; + int alloc_count = 0; -+ struct SM_PDE_T *p_pde; ++ struct sm_pde_t *p_pde; + -+ p_pde = (struct SM_PDE_T *)(s->private); -+ file_data = (struct SM_PRIV_DATA_T *)(p_pde->priv_data); ++ p_pde = (struct sm_pde_t *)(s->private); ++ file_data = (struct sm_priv_data_t *)(p_pde->priv_data); + + if (!file_data) + return 0; @@ -74069,9 +74708,9 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + +static int vc_sm_seq_file_show(struct seq_file *s, void *v) +{ -+ struct SM_PDE_T *sm_pde; ++ struct sm_pde_t *sm_pde; + -+ sm_pde = (struct SM_PDE_T *)(s->private); ++ sm_pde = (struct sm_pde_t *)(s->private); + + if (sm_pde && sm_pde->show) + sm_pde->show(s, v); @@ -74091,11 +74730,12 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + .release = single_release, +}; + -+/* Adds a resource to the private data list which tracks all the allocated -+** data. -+*/ -+static void vmcs_sm_add_resource(struct SM_PRIV_DATA_T *privdata, -+ struct SM_RESOURCE_T *resource) ++/* ++ * Adds a resource to the private data list which tracks all the allocated ++ * data. ++ */ ++static void vmcs_sm_add_resource(struct sm_priv_data_t *privdata, ++ struct sm_resource_t *resource) +{ + mutex_lock(&(sm_state->map_lock)); + list_add(&resource->resource_list, &privdata->resource_list); @@ -74107,14 +74747,15 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + resource->res_handle, resource->res_size, resource->res_cached); +} + -+/* Locates a resource and acquire a reference on it. -+** The resource won't be deleted while there is a reference on it. -+*/ -+static struct SM_RESOURCE_T *vmcs_sm_acquire_resource(struct SM_PRIV_DATA_T ++/* ++ * Locates a resource and acquire a reference on it. ++ * The resource won't be deleted while there is a reference on it. ++ */ ++static struct sm_resource_t *vmcs_sm_acquire_resource(struct sm_priv_data_t + *private, + unsigned int res_guid) +{ -+ struct SM_RESOURCE_T *resource, *ret = NULL; ++ struct sm_resource_t *resource, *ret = NULL; + + mutex_lock(&(sm_state->map_lock)); + @@ -74136,13 +74777,14 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + return ret; +} + -+/* Locates a resource and acquire a reference on it. -+** The resource won't be deleted while there is a reference on it. -+*/ -+static struct SM_RESOURCE_T *vmcs_sm_acquire_first_resource( -+ struct SM_PRIV_DATA_T *private) ++/* ++ * Locates a resource and acquire a reference on it. ++ * The resource won't be deleted while there is a reference on it. ++ */ ++static struct sm_resource_t *vmcs_sm_acquire_first_resource( ++ struct sm_priv_data_t *private) +{ -+ struct SM_RESOURCE_T *resource, *ret = NULL; ++ struct sm_resource_t *resource, *ret = NULL; + + mutex_lock(&(sm_state->map_lock)); + @@ -74161,13 +74803,14 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + return ret; +} + -+/* Locates a resource and acquire a reference on it. -+** The resource won't be deleted while there is a reference on it. -+*/ -+static struct SM_RESOURCE_T *vmcs_sm_acquire_global_resource(unsigned int ++/* ++ * Locates a resource and acquire a reference on it. ++ * The resource won't be deleted while there is a reference on it. ++ */ ++static struct sm_resource_t *vmcs_sm_acquire_global_resource(unsigned int + res_guid) +{ -+ struct SM_RESOURCE_T *resource, *ret = NULL; ++ struct sm_resource_t *resource, *ret = NULL; + + mutex_lock(&(sm_state->map_lock)); + @@ -74190,14 +74833,15 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + return ret; +} + -+/* Release a previously acquired resource. -+** The resource will be deleted when its refcount reaches 0. -+*/ -+static void vmcs_sm_release_resource(struct SM_RESOURCE_T *resource, int force) ++/* ++ * Release a previously acquired resource. ++ * The resource will be deleted when its refcount reaches 0. ++ */ ++static void vmcs_sm_release_resource(struct sm_resource_t *resource, int force) +{ -+ struct SM_PRIV_DATA_T *private = resource->private; ++ struct sm_priv_data_t *private = resource->private; + struct sm_mmap *map, *map_tmp; -+ struct SM_RESOURCE_T *res_tmp; ++ struct sm_resource_t *res_tmp; + int ret; + + mutex_lock(&(sm_state->map_lock)); @@ -74214,7 +74858,8 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + list_del(&resource->resource_list); + list_del(&resource->global_resource_list); + -+ /* Walk the global resource list, find out if the resource is used ++ /* ++ * Walk the global resource list, find out if the resource is used + * somewhere else. In which case we don't want to delete it. + */ + list_for_each_entry(res_tmp, &sm_state->resource_list, @@ -74248,11 +74893,10 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + up_write(¤t->mm->mmap_sem); + } + -+ /* Free up the videocore allocated resource. -+ */ ++ /* Free up the videocore allocated resource. */ + if (resource->res_handle) { -+ VC_SM_FREE_T free = { -+ resource->res_handle, resource->res_base_mem ++ struct vc_sm_free_t free = { ++ resource->res_handle, (uint32_t)resource->res_base_mem + }; + int status = vc_vchi_sm_free(sm_state->sm_handle, &free, + &private->int_trans_id); @@ -74264,27 +74908,33 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + } + } + -+ /* Free up the shared resource. -+ */ ++ if (resource->sgt) ++ dma_buf_unmap_attachment(resource->attach, resource->sgt, ++ DMA_BIDIRECTIONAL); ++ if (resource->attach) ++ dma_buf_detach(resource->dma_buf, resource->attach); ++ if (resource->dma_buf) ++ dma_buf_put(resource->dma_buf); ++ ++ /* Free up the shared resource. */ + if (resource->res_shared) + vmcs_sm_release_resource(resource->res_shared, 0); + -+ /* Free up the local resource tracking this allocation. -+ */ ++ /* Free up the local resource tracking this allocation. */ + vc_sm_resource_deceased(resource, force); + kfree(resource); +} + -+/* Dump the map table for the driver. If process is -1, dumps the whole table, -+** if process is a valid pid (non -1) dump only the entries associated with the -+** pid of interest. -+*/ ++/* ++ * Dump the map table for the driver. If process is -1, dumps the whole table, ++ * if process is a valid pid (non -1) dump only the entries associated with the ++ * pid of interest. ++ */ +static void vmcs_sm_host_walk_map_per_pid(int pid) +{ + struct sm_mmap *map = NULL; + -+ /* Make sure the device was started properly. -+ */ ++ /* Make sure the device was started properly. */ + if (sm_state == NULL) { + pr_err("[%s]: invalid device\n", __func__); + return; @@ -74292,8 +74942,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + + mutex_lock(&(sm_state->map_lock)); + -+ /* Log all applicable mapping(s). -+ */ ++ /* Log all applicable mapping(s). */ + if (!list_empty(&sm_state->map_list)) { + list_for_each_entry(map, &sm_state->map_list, map_list) { + if (pid == -1 || map->res_pid == pid) { @@ -74305,19 +74954,17 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + } + + mutex_unlock(&(sm_state->map_lock)); -+ -+ return; +} + -+/* Dump the allocation table from host side point of view. This only dumps the -+** data allocated for this process/device referenced by the file_data. -+*/ -+static void vmcs_sm_host_walk_alloc(struct SM_PRIV_DATA_T *file_data) ++/* ++ * Dump the allocation table from host side point of view. This only dumps the ++ * data allocated for this process/device referenced by the file_data. ++ */ ++static void vmcs_sm_host_walk_alloc(struct sm_priv_data_t *file_data) +{ -+ struct SM_RESOURCE_T *resource = NULL; ++ struct sm_resource_t *resource = NULL; + -+ /* Make sure the device was started properly. -+ */ ++ /* Make sure the device was started properly. */ + if ((sm_state == NULL) || (file_data == NULL)) { + pr_err("[%s]: invalid device\n", __func__); + return; @@ -74336,16 +74983,13 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + } + + mutex_unlock(&(sm_state->map_lock)); -+ -+ return; +} + -+/* Create support for private data tracking. -+*/ -+static struct SM_PRIV_DATA_T *vc_sm_create_priv_data(pid_t id) ++/* Create support for private data tracking. */ ++static struct sm_priv_data_t *vc_sm_create_priv_data(pid_t id) +{ + char alloc_name[32]; -+ struct SM_PRIV_DATA_T *file_data = NULL; ++ struct sm_priv_data_t *file_data = NULL; + + /* Allocate private structure. */ + file_data = kzalloc(sizeof(*file_data), GFP_KERNEL); @@ -74369,7 +75013,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + } else { + struct dentry *dir_entry; + -+ dir_entry = debugfs_create_file(VC_SM_RESOURCES, S_IRUGO, ++ dir_entry = debugfs_create_file(VC_SM_RESOURCES, 0444, + file_data->dir_pid, file_data, + vc_sm_debug_fs_fops); + @@ -74377,7 +75021,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + file_data->dir_res.priv_data = file_data; + file_data->dir_res.show = &vc_sm_alloc_show; + -+ dir_entry = debugfs_create_file(VC_SM_STATS, S_IRUGO, ++ dir_entry = debugfs_create_file(VC_SM_STATS, 0444, + file_data->dir_pid, file_data, + vc_sm_debug_fs_fops); + @@ -74392,15 +75036,15 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + return file_data; +} + -+/* Open the device. Creates a private state to help track all allocation -+** associated with this device. -+*/ ++/* ++ * Open the device. Creates a private state to help track all allocation ++ * associated with this device. ++ */ +static int vc_sm_open(struct inode *inode, struct file *file) +{ + int ret = 0; + -+ /* Make sure the device was started properly. -+ */ ++ /* Make sure the device was started properly. */ + if (!sm_state) { + pr_err("[%s]: invalid device\n", __func__); + ret = -EPERM; @@ -74419,18 +75063,18 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + return ret; +} + -+/* Close the device. Free up all resources still associated with this device -+** at the time. -+*/ ++/* ++ * Close the device. Free up all resources still associated with this device ++ * at the time. ++ */ +static int vc_sm_release(struct inode *inode, struct file *file) +{ -+ struct SM_PRIV_DATA_T *file_data = -+ (struct SM_PRIV_DATA_T *)file->private_data; -+ struct SM_RESOURCE_T *resource; ++ struct sm_priv_data_t *file_data = ++ (struct sm_priv_data_t *)file->private_data; ++ struct sm_resource_t *resource; + int ret = 0; + -+ /* Make sure the device was started properly. -+ */ ++ /* Make sure the device was started properly. */ + if (sm_state == NULL || file_data == NULL) { + pr_err("[%s]: invalid device\n", __func__); + ret = -EPERM; @@ -74440,7 +75084,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + pr_debug("[%s]: using private data %p\n", __func__, file_data); + + if (file_data->restart_sys == -EINTR) { -+ VC_SM_ACTION_CLEAN_T action_clean; ++ struct vc_sm_action_clean_t action_clean; + + pr_debug("[%s]: releasing following EINTR on %u (trans_id: %u) (likely due to signal)...\n", + __func__, file_data->int_action, @@ -74460,8 +75104,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + /* Remove the corresponding proc entry. */ + debugfs_remove_recursive(file_data->dir_pid); + -+ /* Terminate the private data. -+ */ ++ /* Terminate the private data. */ + kfree(file_data); + +out: @@ -74489,8 +75132,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + + map->ref_count--; + -+ /* Remove from the map table. -+ */ ++ /* Remove from the map table. */ + if (map->ref_count == 0) + vmcs_sm_remove_map(sm_state, map->resource, map); +} @@ -74498,30 +75140,28 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 +static int vcsm_vma_fault(struct vm_fault *vmf) +{ + struct sm_mmap *map = (struct sm_mmap *)vmf->vma->vm_private_data; -+ struct SM_RESOURCE_T *resource = map->resource; ++ struct sm_resource_t *resource = map->resource; + pgoff_t page_offset; + unsigned long pfn; + int ret = 0; + -+ /* Lock the resource if necessary. -+ */ ++ /* Lock the resource if necessary. */ + if (!resource->lock_count) { -+ VC_SM_LOCK_UNLOCK_T lock_unlock; -+ VC_SM_LOCK_RESULT_T lock_result; ++ struct vc_sm_lock_unlock_t lock_unlock; ++ struct vc_sm_lock_result_t lock_result; + int status; + + lock_unlock.res_handle = resource->res_handle; -+ lock_unlock.res_mem = resource->res_base_mem; ++ lock_unlock.res_mem = (uint32_t)resource->res_base_mem; + + pr_debug("[%s]: attempt to lock data - hdl %x, base address %p\n", -+ __func__, lock_unlock.res_handle, lock_unlock.res_mem); ++ __func__, lock_unlock.res_handle, ++ (void *)lock_unlock.res_mem); + -+ /* Lock the videocore allocated resource. -+ */ ++ /* Lock the videocore allocated resource. */ + status = vc_vchi_sm_lock(sm_state->sm_handle, + &lock_unlock, &lock_result, 0); -+ if ((status != 0) || -+ ((status == 0) && (lock_result.res_mem == NULL))) { ++ if (status || !lock_result.res_mem) { + pr_err("[%s]: failed to lock memory on videocore (status: %u)\n", + __func__, status); + resource->res_stats[LOCK_FAIL]++; @@ -74535,12 +75175,11 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + resource->res_stats[LOCK]++; + resource->lock_count++; + -+ /* Keep track of the new base memory. -+ */ -+ if ((lock_result.res_mem != NULL) && -+ (lock_result.res_old_mem != NULL) && ++ /* Keep track of the new base memory. */ ++ if (lock_result.res_mem && ++ lock_result.res_old_mem && + (lock_result.res_mem != lock_result.res_old_mem)) { -+ resource->res_base_mem = lock_result.res_mem; ++ resource->res_base_mem = (void *)lock_result.res_mem; + } + } + @@ -74558,9 +75197,9 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + case 0: + case -ERESTARTSYS: + /* -+ * EBUSY is ok: this just means that another thread -+ * already did the job. -+ */ ++ * EBUSY is ok: this just means that another thread ++ * already did the job. ++ */ + case -EBUSY: + return VM_FAULT_NOPAGE; + case -ENOMEM: @@ -74575,7 +75214,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + } +} + -+static struct vm_operations_struct vcsm_vm_ops = { ++static const struct vm_operations_struct vcsm_vm_ops = { + .open = vcsm_vma_open, + .close = vcsm_vma_close, + .fault = vcsm_vma_fault, @@ -74638,18 +75277,16 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + } while (pgd++, addr = pgd_next, addr != end); +} + -+/* Map an allocated data into something that the user space. -+*/ ++/* Map an allocated data into something that the user space. */ +static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) +{ + int ret = 0; -+ struct SM_PRIV_DATA_T *file_data = -+ (struct SM_PRIV_DATA_T *)file->private_data; -+ struct SM_RESOURCE_T *resource = NULL; ++ struct sm_priv_data_t *file_data = ++ (struct sm_priv_data_t *)file->private_data; ++ struct sm_resource_t *resource = NULL; + struct sm_mmap *map = NULL; + -+ /* Make sure the device was started properly. -+ */ ++ /* Make sure the device was started properly. */ + if ((sm_state == NULL) || (file_data == NULL)) { + pr_err("[%s]: invalid device\n", __func__); + return -EPERM; @@ -74658,11 +75295,12 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + pr_debug("[%s]: private data %p, guid %x\n", __func__, file_data, + ((unsigned int)vma->vm_pgoff << PAGE_SHIFT)); + -+ /* We lookup to make sure that the data we are being asked to mmap is -+ ** something that we allocated. -+ ** -+ ** We use the offset information as the key to tell us which resource -+ ** we are mapping. ++ /* ++ * We lookup to make sure that the data we are being asked to mmap is ++ * something that we allocated. ++ * ++ * We use the offset information as the key to tell us which resource ++ * we are mapping. + */ + resource = vmcs_sm_acquire_resource(file_data, + ((unsigned int)vma->vm_pgoff << @@ -74677,8 +75315,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + __func__, resource->res_guid, current->tgid, resource->pid, + file_data->pid); + -+ /* Check permissions. -+ */ ++ /* Check permissions. */ + if (resource->pid && (resource->pid != current->tgid)) { + pr_err("[%s]: current tgid %u != %u owner\n", + __func__, current->tgid, resource->pid); @@ -74686,8 +75323,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + goto error; + } + -+ /* Verify that what we are asked to mmap is proper. -+ */ ++ /* Verify that what we are asked to mmap is proper. */ + if (resource->res_size != (unsigned int)(vma->vm_end - vma->vm_start)) { + pr_err("[%s]: size inconsistency (resource: %u - mmap: %u)\n", + __func__, @@ -74698,7 +75334,8 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + goto error; + } + -+ /* Keep track of the tuple in the global resource list such that one ++ /* ++ * Keep track of the tuple in the global resource list such that one + * can do a mapping lookup for address/memory handle. + */ + map = kzalloc(sizeof(*map), GFP_KERNEL); @@ -74712,13 +75349,14 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + map->res_pid = current->tgid; + map->res_vc_hdl = resource->res_handle; + map->res_usr_hdl = resource->res_guid; -+ map->res_addr = (long unsigned int)vma->vm_start; ++ map->res_addr = (unsigned long)vma->vm_start; + map->resource = resource; + map->vma = vma; + vmcs_sm_add_map(sm_state, resource, map); + -+ /* We are not actually mapping the pages, we just provide a fault -+ ** handler to allow pages to be mapped when accessed ++ /* ++ * We are not actually mapping the pages, we just provide a fault ++ * handler to allow pages to be mapped when accessed + */ + vma->vm_flags |= + VM_IO | VM_PFNMAP | VM_DONTCOPY | VM_DONTEXPAND; @@ -74732,8 +75370,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + + if ((resource->res_cached == VMCS_SM_CACHE_NONE) || + (resource->res_cached == VMCS_SM_CACHE_VC)) { -+ /* Allocated non host cached memory, honour it. -+ */ ++ /* Allocated non host cached memory, honour it. */ + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); + } + @@ -74752,6 +75389,22 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + vcsm_vma_open(vma); + resource->res_stats[MAP]++; + vmcs_sm_release_resource(resource, 0); ++ ++ if (resource->map) { ++ /* We don't use vmf->pgoff since that has the fake offset */ ++ unsigned long addr; ++ ++ for (addr = vma->vm_start; addr < vma->vm_end; addr += PAGE_SIZE) { ++ /* Finally, remap it */ ++ unsigned long pfn = (unsigned long)resource->res_base_mem & 0x3FFFFFFF; ++ ++ pfn += mm_vc_mem_phys_addr; ++ pfn += addr - vma->vm_start; ++ pfn >>= PAGE_SHIFT; ++ ret = vm_insert_pfn(vma, addr, pfn); ++ } ++ } ++ + return 0; + +error: @@ -74760,20 +75413,27 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + return ret; +} + -+/* Allocate a shared memory handle and block. -+*/ -+int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, ++/* Allocate a shared memory handle and block. */ ++int vc_sm_ioctl_alloc(struct sm_priv_data_t *private, + struct vmcs_sm_ioctl_alloc *ioparam) +{ + int ret = 0; + int status; -+ struct SM_RESOURCE_T *resource; -+ VC_SM_ALLOC_T alloc = { 0 }; -+ VC_SM_ALLOC_RESULT_T result = { 0 }; ++ struct sm_resource_t *resource; ++ struct vc_sm_alloc_t alloc = { 0 }; ++ struct vc_sm_alloc_result_t result = { 0 }; ++ enum vmcs_sm_cache_e cached = ioparam->cached; ++ bool map = false; ++ ++ /* flag to requst buffer is mapped up front, rather than lazily */ ++ if (cached & 0x80) { ++ map = true; ++ cached &= ~0x80; ++ } + + /* Setup our allocation parameters */ -+ alloc.type = ((ioparam->cached == VMCS_SM_CACHE_VC) -+ || (ioparam->cached == ++ alloc.type = ((cached == VMCS_SM_CACHE_VC) ++ || (cached == + VMCS_SM_CACHE_BOTH)) ? VC_SM_ALLOC_CACHED : + VC_SM_ALLOC_NON_CACHED; + alloc.base_unit = ioparam->size; @@ -74795,8 +75455,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + __func__, alloc.name, alloc.type, ioparam->size, + alloc.base_unit, alloc.num_unit, alloc.alignement); + -+ /* Allocate local resource to track this allocation. -+ */ ++ /* Allocate local resource to track this allocation. */ + resource = kzalloc(sizeof(*resource), GFP_KERNEL); + if (!resource) { + ret = -ENOMEM; @@ -74806,8 +75465,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + resource->ref_count++; + resource->pid = current->tgid; + -+ /* Allocate the videocore resource. -+ */ ++ /* Allocate the videocore resource. */ + status = vc_vchi_sm_alloc(sm_state->sm_handle, &alloc, &result, + &private->int_trans_id); + if (status == -EINTR) { @@ -74817,7 +75475,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + private->restart_sys = -EINTR; + private->int_action = VC_SM_MSG_TYPE_ALLOC; + goto error; -+ } else if (status != 0 || (status == 0 && result.res_mem == NULL)) { ++ } else if (status != 0 || !result.res_mem) { + pr_err("[%s]: failed to allocate memory on videocore (status: %u, trans_id: %u)\n", + __func__, status, private->int_trans_id); + ret = -ENOMEM; @@ -74825,15 +75483,16 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + goto error; + } + -+ /* Keep track of the resource we created. -+ */ ++ /* Keep track of the resource we created. */ + resource->private = private; + resource->res_handle = result.res_handle; -+ resource->res_base_mem = result.res_mem; ++ resource->res_base_mem = (void *)result.res_mem; + resource->res_size = alloc.base_unit * alloc.num_unit; -+ resource->res_cached = ioparam->cached; ++ resource->res_cached = cached; ++ resource->map = map; + -+ /* Kernel/user GUID. This global identifier is used for mmap'ing the ++ /* ++ * Kernel/user GUID. This global identifier is used for mmap'ing the + * allocated region from user space, it is passed as the mmap'ing + * offset, we use it to 'hide' the videocore handle/address. + */ @@ -74865,12 +75524,11 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + return ret; +} + -+/* Share an allocate memory handle and block. -+*/ -+int vc_sm_ioctl_alloc_share(struct SM_PRIV_DATA_T *private, ++/* Share an allocate memory handle and block.*/ ++int vc_sm_ioctl_alloc_share(struct sm_priv_data_t *private, + struct vmcs_sm_ioctl_alloc_share *ioparam) +{ -+ struct SM_RESOURCE_T *resource, *shared_resource; ++ struct sm_resource_t *resource, *shared_resource; + int ret = 0; + + pr_debug("[%s]: attempt to share resource %u\n", __func__, @@ -74882,8 +75540,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + goto error; + } + -+ /* Allocate local resource to track this allocation. -+ */ ++ /* Allocate local resource to track this allocation. */ + resource = kzalloc(sizeof(*resource), GFP_KERNEL); + if (resource == NULL) { + pr_err("[%s]: failed to allocate local tracking resource\n", @@ -74895,8 +75552,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + resource->ref_count++; + resource->pid = current->tgid; + -+ /* Keep track of the resource we created. -+ */ ++ /* Keep track of the resource we created. */ + resource->private = private; + resource->res_handle = shared_resource->res_handle; + resource->res_base_mem = shared_resource->res_base_mem; @@ -74930,12 +75586,11 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + return ret; +} + -+/* Free a previously allocated shared memory handle and block. -+*/ -+static int vc_sm_ioctl_free(struct SM_PRIV_DATA_T *private, ++/* Free a previously allocated shared memory handle and block.*/ ++static int vc_sm_ioctl_free(struct sm_priv_data_t *private, + struct vmcs_sm_ioctl_free *ioparam) +{ -+ struct SM_RESOURCE_T *resource = ++ struct sm_resource_t *resource = + vmcs_sm_acquire_resource(private, ioparam->handle); + + if (resource == NULL) { @@ -74944,8 +75599,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + return -EINVAL; + } + -+ /* Check permissions. -+ */ ++ /* Check permissions. */ + if (resource->pid && (resource->pid != current->tgid)) { + pr_err("[%s]: current tgid %u != %u owner\n", + __func__, current->tgid, resource->pid); @@ -74958,18 +75612,16 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + return 0; +} + -+/* Resize a previously allocated shared memory handle and block. -+*/ -+static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, ++/* Resize a previously allocated shared memory handle and block. */ ++static int vc_sm_ioctl_resize(struct sm_priv_data_t *private, + struct vmcs_sm_ioctl_resize *ioparam) +{ + int ret = 0; + int status; -+ VC_SM_RESIZE_T resize; -+ struct SM_RESOURCE_T *resource; ++ struct vc_sm_resize_t resize; ++ struct sm_resource_t *resource; + -+ /* Locate resource from GUID. -+ */ ++ /* Locate resource from GUID. */ + resource = vmcs_sm_acquire_resource(private, ioparam->handle); + if (!resource) { + pr_err("[%s]: failed resource - guid %x\n", @@ -74978,9 +75630,10 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + goto error; + } + -+ /* If the resource is locked, its reference count will be not NULL, -+ ** in which case we will not be allowed to resize it anyways, so -+ ** reject the attempt here. ++ /* ++ * If the resource is locked, its reference count will be not NULL, ++ * in which case we will not be allowed to resize it anyways, so ++ * reject the attempt here. + */ + if (resource->lock_count != 0) { + pr_err("[%s]: cannot resize - guid %x, ref-cnt %d\n", @@ -74989,8 +75642,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + goto error; + } + -+ /* Check permissions. -+ */ ++ /* Check permissions. */ + if (resource->pid && (resource->pid != current->tgid)) { + pr_err("[%s]: current tgid %u != %u owner\n", __func__, + current->tgid, resource->pid); @@ -75006,14 +75658,14 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + } + + resize.res_handle = resource->res_handle; -+ resize.res_mem = resource->res_base_mem; ++ resize.res_mem = (uint32_t)resource->res_base_mem; + resize.res_new_size = ioparam->new_size; + + pr_debug("[%s]: attempt to resize data - guid %x, hdl %x, base address %p\n", -+ __func__, ioparam->handle, resize.res_handle, resize.res_mem); ++ __func__, ioparam->handle, resize.res_handle, ++ (void *)resize.res_mem); + -+ /* Resize the videocore allocated resource. -+ */ ++ /* Resize the videocore allocated resource. */ + status = vc_vchi_sm_resize(sm_state->sm_handle, &resize, + &private->int_trans_id); + if (status == -EINTR) { @@ -75023,7 +75675,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + private->restart_sys = -EINTR; + private->int_action = VC_SM_MSG_TYPE_RESIZE; + goto error; -+ } else if (status != 0) { ++ } else if (status) { + pr_err("[%s]: failed to resize memory on videocore (status: %u, trans_id: %u)\n", + __func__, status, private->int_trans_id); + ret = -EPERM; @@ -75034,8 +75686,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + __func__, resize.res_handle, resource->res_size, + resize.res_new_size); + -+ /* Successfully resized, save the information and inform the user. -+ */ ++ /* Successfully resized, save the information and inform the user. */ + ioparam->old_size = resource->res_size; + resource->res_size = resize.res_new_size; + @@ -75046,33 +75697,30 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + return ret; +} + -+/* Lock a previously allocated shared memory handle and block. -+*/ -+static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, ++/* Lock a previously allocated shared memory handle and block. */ ++static int vc_sm_ioctl_lock(struct sm_priv_data_t *private, + struct vmcs_sm_ioctl_lock_unlock *ioparam, + int change_cache, enum vmcs_sm_cache_e cache_type, + unsigned int vc_addr) +{ + int status; -+ VC_SM_LOCK_UNLOCK_T lock; -+ VC_SM_LOCK_RESULT_T result; -+ struct SM_RESOURCE_T *resource; ++ struct vc_sm_lock_unlock_t lock; ++ struct vc_sm_lock_result_t result; ++ struct sm_resource_t *resource; + int ret = 0; + struct sm_mmap *map, *map_tmp; -+ long unsigned int phys_addr; ++ unsigned long phys_addr; + + map = NULL; + -+ /* Locate resource from GUID. -+ */ ++ /* Locate resource from GUID. */ + resource = vmcs_sm_acquire_resource(private, ioparam->handle); + if (resource == NULL) { + ret = -EINVAL; + goto error; + } + -+ /* Check permissions. -+ */ ++ /* Check permissions. */ + if (resource->pid && (resource->pid != current->tgid)) { + pr_err("[%s]: current tgid %u != %u owner\n", __func__, + current->tgid, resource->pid); @@ -75081,17 +75729,15 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + } + + lock.res_handle = resource->res_handle; -+ lock.res_mem = resource->res_base_mem; ++ lock.res_mem = (uint32_t)resource->res_base_mem; + -+ /* Take the lock and get the address to be mapped. -+ */ ++ /* Take the lock and get the address to be mapped. */ + if (vc_addr == 0) { + pr_debug("[%s]: attempt to lock data - guid %x, hdl %x, base address %p\n", + __func__, ioparam->handle, lock.res_handle, -+ lock.res_mem); ++ (void *)lock.res_mem); + -+ /* Lock the videocore allocated resource. -+ */ ++ /* Lock the videocore allocated resource. */ + status = vc_vchi_sm_lock(sm_state->sm_handle, &lock, &result, + &private->int_trans_id); + if (status == -EINTR) { @@ -75101,8 +75747,8 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + private->restart_sys = -EINTR; + private->int_action = VC_SM_MSG_TYPE_LOCK; + goto error; -+ } else if (status != 0 || -+ (status == 0 && result.res_mem == NULL)) { ++ } else if (status || ++ (!status && !(void *)result.res_mem)) { + pr_err("[%s]: failed to lock memory on videocore (status: %u, trans_id: %u)\n", + __func__, status, private->int_trans_id); + ret = -EPERM; @@ -75111,27 +75757,24 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + } + + pr_debug("[%s]: succeed to lock data - hdl %x, base address %p (%p), ref-cnt %d\n", -+ __func__, lock.res_handle, result.res_mem, -+ lock.res_mem, resource->lock_count); ++ __func__, lock.res_handle, (void *)result.res_mem, ++ (void *)lock.res_mem, resource->lock_count); + } -+ /* Lock assumed taken already, address to be mapped is known. -+ */ ++ /* Lock assumed taken already, address to be mapped is known. */ + else + resource->res_base_mem = (void *)vc_addr; + + resource->res_stats[LOCK]++; + resource->lock_count++; + -+ /* Keep track of the new base memory allocation if it has changed. -+ */ ++ /* Keep track of the new base memory allocation if it has changed. */ + if ((vc_addr == 0) && -+ (result.res_mem != NULL) && -+ (result.res_old_mem != NULL) && ++ ((void *)result.res_mem) && ++ ((void *)result.res_old_mem) && + (result.res_mem != result.res_old_mem)) { -+ resource->res_base_mem = result.res_mem; ++ resource->res_base_mem = (void *)result.res_mem; + -+ /* Kernel allocated resources. -+ */ ++ /* Kernel allocated resources. */ + if (resource->pid == 0) { + if (!list_empty(&resource->map_list)) { + list_for_each_entry_safe(map, map_tmp, @@ -75163,8 +75806,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + __func__, resource->map_count, private->pid, + current->tgid, ioparam->handle, ioparam->addr); + } else { -+ /* Kernel allocated resources. -+ */ ++ /* Kernel allocated resources. */ + if (resource->pid == 0) { + pr_debug("[%s]: attempt mapping kernel resource - guid %x, hdl %x\n", + __func__, ioparam->handle, lock.res_handle); @@ -75183,7 +75825,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + phys_addr += mm_vc_mem_phys_addr; + if (resource->res_cached + == VMCS_SM_CACHE_HOST) { -+ ioparam->addr = (long unsigned int) ++ ioparam->addr = (unsigned long) + /* TODO - make cached work */ + ioremap_nocache(phys_addr, + resource->res_size); @@ -75192,7 +75834,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + __func__, ioparam->handle, + lock.res_handle, ioparam->addr); + } else { -+ ioparam->addr = (long unsigned int) ++ ioparam->addr = (unsigned long) + ioremap_nocache(phys_addr, + resource->res_size); + @@ -75221,30 +75863,27 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + return ret; +} + -+/* Unlock a previously allocated shared memory handle and block. -+*/ -+static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, ++/* Unlock a previously allocated shared memory handle and block.*/ ++static int vc_sm_ioctl_unlock(struct sm_priv_data_t *private, + struct vmcs_sm_ioctl_lock_unlock *ioparam, + int flush, int wait_reply, int no_vc_unlock) +{ + int status; -+ VC_SM_LOCK_UNLOCK_T unlock; ++ struct vc_sm_lock_unlock_t unlock; + struct sm_mmap *map, *map_tmp; -+ struct SM_RESOURCE_T *resource; ++ struct sm_resource_t *resource; + int ret = 0; + + map = NULL; + -+ /* Locate resource from GUID. -+ */ ++ /* Locate resource from GUID. */ + resource = vmcs_sm_acquire_resource(private, ioparam->handle); + if (resource == NULL) { + ret = -EINVAL; + goto error; + } + -+ /* Check permissions. -+ */ ++ /* Check permissions. */ + if (resource->pid && (resource->pid != current->tgid)) { + pr_err("[%s]: current tgid %u != %u owner\n", + __func__, current->tgid, resource->pid); @@ -75253,17 +75892,18 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + } + + unlock.res_handle = resource->res_handle; -+ unlock.res_mem = resource->res_base_mem; ++ unlock.res_mem = (uint32_t)resource->res_base_mem; + + pr_debug("[%s]: attempt to unlock data - guid %x, hdl %x, base address %p\n", -+ __func__, ioparam->handle, unlock.res_handle, unlock.res_mem); ++ __func__, ioparam->handle, unlock.res_handle, ++ (void *)unlock.res_mem); + -+ /* User space allocated resources. -+ */ ++ /* User space allocated resources. */ + if (resource->pid) { + /* Flush if requested */ + if (resource->res_cached && flush) { + dma_addr_t phys_addr = 0; ++ + resource->res_stats[FLUSH]++; + + phys_addr = @@ -75278,6 +75918,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + if (map->vma) { + unsigned long start; + unsigned long end; ++ + start = map->vma->vm_start; + end = map->vma->vm_end; + @@ -75320,7 +75961,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + if (flush && + (resource->res_cached == + VMCS_SM_CACHE_HOST)) { -+ long unsigned int ++ unsigned long + phys_addr; + phys_addr = (uint32_t) + resource->res_base_mem & 0x3FFFFFFF; @@ -75356,12 +75997,10 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + } + + if (resource->lock_count) { -+ /* Bypass the videocore unlock. -+ */ ++ /* Bypass the videocore unlock. */ + if (no_vc_unlock) + status = 0; -+ /* Unlock the videocore allocated resource. -+ */ ++ /* Unlock the videocore allocated resource. */ + else { + status = + vc_vchi_sm_unlock(sm_state->sm_handle, &unlock, @@ -75391,7 +76030,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + } + + pr_debug("[%s]: success to unlock data - hdl %x, base address %p, ref-cnt %d\n", -+ __func__, unlock.res_handle, unlock.res_mem, ++ __func__, unlock.res_handle, (void *)unlock.res_mem, + resource->lock_count); + +error: @@ -75401,14 +76040,143 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + return ret; +} + ++/* Import a contiguous block of memory to be shared with VC. */ ++int vc_sm_ioctl_import_dmabuf(struct sm_priv_data_t *private, ++ struct vmcs_sm_ioctl_import_dmabuf *ioparam, ++ struct dma_buf *src_dma_buf) ++{ ++ int ret = 0; ++ int status; ++ struct sm_resource_t *resource = NULL; ++ struct vc_sm_import import = { 0 }; ++ struct vc_sm_import_result result = { 0 }; ++ struct dma_buf *dma_buf; ++ struct dma_buf_attachment *attach = NULL; ++ struct sg_table *sgt = NULL; ++ ++ /* Setup our allocation parameters */ ++ if (src_dma_buf) { ++ get_dma_buf(src_dma_buf); ++ dma_buf = src_dma_buf; ++ } else { ++ dma_buf = dma_buf_get(ioparam->dmabuf_fd); ++ } ++ if (IS_ERR(dma_buf)) ++ return PTR_ERR(dma_buf); ++ ++ attach = dma_buf_attach(dma_buf, &sm_state->pdev->dev); ++ if (IS_ERR(attach)) { ++ ret = PTR_ERR(attach); ++ goto error; ++ } ++ ++ sgt = dma_buf_map_attachment(attach, DMA_BIDIRECTIONAL); ++ if (IS_ERR(sgt)) { ++ ret = PTR_ERR(sgt); ++ goto error; ++ } ++ ++ /* Verify that the address block is contiguous */ ++ if (sgt->nents != 1) { ++ ret = -ENOMEM; ++ goto error; ++ } ++ ++ import.type = ((ioparam->cached == VMCS_SM_CACHE_VC) || ++ (ioparam->cached == VMCS_SM_CACHE_BOTH)) ? ++ VC_SM_ALLOC_CACHED : VC_SM_ALLOC_NON_CACHED; ++ import.addr = (uint32_t)sg_dma_address(sgt->sgl); ++ import.size = sg_dma_len(sgt->sgl); ++ import.allocator = current->tgid; ++ ++ if (*ioparam->name) ++ memcpy(import.name, ioparam->name, sizeof(import.name) - 1); ++ else ++ memcpy(import.name, VMCS_SM_RESOURCE_NAME_DEFAULT, ++ sizeof(VMCS_SM_RESOURCE_NAME_DEFAULT)); ++ ++ pr_debug("[%s]: attempt to import \"%s\" data - type %u, addr %p, size %u\n", ++ __func__, import.name, import.type, ++ (void *)import.addr, import.size); ++ ++ /* Allocate local resource to track this allocation. */ ++ resource = kzalloc(sizeof(*resource), GFP_KERNEL); ++ if (!resource) { ++ ret = -ENOMEM; ++ goto error; ++ } ++ INIT_LIST_HEAD(&resource->map_list); ++ resource->ref_count++; ++ resource->pid = current->tgid; ++ ++ /* Allocate the videocore resource. */ ++ status = vc_vchi_sm_import(sm_state->sm_handle, &import, &result, ++ &private->int_trans_id); ++ if (status == -EINTR) { ++ pr_debug("[%s]: requesting import memory action restart (trans_id: %u)\n", ++ __func__, private->int_trans_id); ++ ret = -ERESTARTSYS; ++ private->restart_sys = -EINTR; ++ private->int_action = VC_SM_MSG_TYPE_IMPORT; ++ goto error; ++ } else if (status || !result.res_handle) { ++ pr_debug("[%s]: failed to import memory on videocore (status: %u, trans_id: %u)\n", ++ __func__, status, private->int_trans_id); ++ ret = -ENOMEM; ++ resource->res_stats[ALLOC_FAIL]++; ++ goto error; ++ } ++ ++ /* Keep track of the resource we created. */ ++ resource->private = private; ++ resource->res_handle = result.res_handle; ++ resource->res_size = import.size; ++ resource->res_cached = ioparam->cached; ++ ++ resource->dma_buf = dma_buf; ++ resource->attach = attach; ++ resource->sgt = sgt; ++ resource->dma_addr = sg_dma_address(sgt->sgl); ++ ++ /* ++ * Kernel/user GUID. This global identifier is used for mmap'ing the ++ * allocated region from user space, it is passed as the mmap'ing ++ * offset, we use it to 'hide' the videocore handle/address. ++ */ ++ mutex_lock(&sm_state->lock); ++ resource->res_guid = ++sm_state->guid; ++ mutex_unlock(&sm_state->lock); ++ resource->res_guid <<= PAGE_SHIFT; ++ ++ vmcs_sm_add_resource(private, resource); ++ ++ /* We're done */ ++ resource->res_stats[IMPORT]++; ++ ioparam->handle = resource->res_guid; ++ return 0; ++ ++error: ++ resource->res_stats[IMPORT_FAIL]++; ++ if (resource) { ++ vc_sm_resource_deceased(resource, 1); ++ kfree(resource); ++ } ++ if (sgt) ++ dma_buf_unmap_attachment(attach, sgt, DMA_BIDIRECTIONAL); ++ if (attach) ++ dma_buf_detach(dma_buf, attach); ++ dma_buf_put(dma_buf); ++ return ret; ++} ++ +/* Handle control from host. */ +static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) +{ + int ret = 0; + unsigned int cmdnr = _IOC_NR(cmd); -+ struct SM_PRIV_DATA_T *file_data = -+ (struct SM_PRIV_DATA_T *)file->private_data; -+ struct SM_RESOURCE_T *resource = NULL; ++ struct sm_priv_data_t *file_data = ++ (struct sm_priv_data_t *)file->private_data; ++ struct sm_resource_t *resource = NULL; + + /* Validate we can work with this device. */ + if ((sm_state == NULL) || (file_data == NULL)) { @@ -75422,7 +76190,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + + /* Action is a re-post of a previously interrupted action? */ + if (file_data->restart_sys == -EINTR) { -+ VC_SM_ACTION_CLEAN_T action_clean; ++ struct vc_sm_action_clean_t action_clean; + + pr_debug("[%s]: clean up of action %u (trans_id: %u) following EINTR\n", + __func__, file_data->int_action, @@ -75436,8 +76204,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + file_data->restart_sys = 0; + } + -+ /* Now process the command. -+ */ ++ /* Now process the command. */ + switch (cmdnr) { + /* New memory allocation. + */ @@ -75445,8 +76212,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + { + struct vmcs_sm_ioctl_alloc ioparam; + -+ /* Get the parameter data. -+ */ ++ /* Get the parameter data. */ + if (copy_from_user + (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { + pr_err("[%s]: failed to copy-from-user for cmd %x\n", @@ -75468,20 +76234,17 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + ret = -EFAULT; + } + -+ /* Done. -+ */ ++ /* Done. */ + goto out; + } + break; + -+ /* Share existing memory allocation. -+ */ ++ /* Share existing memory allocation. */ + case VMCS_SM_CMD_ALLOC_SHARE: + { + struct vmcs_sm_ioctl_alloc_share ioparam; + -+ /* Get the parameter data. -+ */ ++ /* Get the parameter data. */ + if (copy_from_user + (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { + pr_err("[%s]: failed to copy-from-user for cmd %x\n", @@ -75492,8 +76255,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + + ret = vc_sm_ioctl_alloc_share(file_data, &ioparam); + -+ /* Copy result back to user. -+ */ ++ /* Copy result back to user. */ + if (!ret + && copy_to_user((void *)arg, &ioparam, + sizeof(ioparam)) != 0) { @@ -75506,21 +76268,50 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + ret = -EFAULT; + } + -+ /* Done. -+ */ ++ /* Done. */ + goto out; + } + break; + -+ /* Lock (attempt to) *and* register a cache behavior change. -+ */ ++ case VMCS_SM_CMD_IMPORT_DMABUF: ++ { ++ struct vmcs_sm_ioctl_import_dmabuf ioparam; ++ ++ /* Get the parameter data. */ ++ if (copy_from_user ++ (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { ++ pr_err("[%s]: failed to copy-from-user for cmd %x\n", ++ __func__, cmdnr); ++ ret = -EFAULT; ++ goto out; ++ } ++ ++ ret = vc_sm_ioctl_import_dmabuf(file_data, &ioparam, ++ NULL); ++ if (!ret && ++ (copy_to_user((void *)arg, ++ &ioparam, sizeof(ioparam)) != 0)) { ++ struct vmcs_sm_ioctl_free freeparam = { ++ ioparam.handle ++ }; ++ pr_err("[%s]: failed to copy-to-user for cmd %x\n", ++ __func__, cmdnr); ++ vc_sm_ioctl_free(file_data, &freeparam); ++ ret = -EFAULT; ++ } ++ ++ /* Done. */ ++ goto out; ++ } ++ break; ++ ++ /* Lock (attempt to) *and* register a cache behavior change. */ + case VMCS_SM_CMD_LOCK_CACHE: + { + struct vmcs_sm_ioctl_lock_cache ioparam; + struct vmcs_sm_ioctl_lock_unlock lock; + -+ /* Get parameter data. -+ */ ++ /* Get parameter data. */ + if (copy_from_user + (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { + pr_err("[%s]: failed to copy-from-user for cmd %x\n", @@ -75534,20 +76325,17 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + vc_sm_ioctl_lock(file_data, &lock, 1, + ioparam.cached, 0); + -+ /* Done. -+ */ ++ /* Done. */ + goto out; + } + break; + -+ /* Lock (attempt to) existing memory allocation. -+ */ ++ /* Lock (attempt to) existing memory allocation. */ + case VMCS_SM_CMD_LOCK: + { + struct vmcs_sm_ioctl_lock_unlock ioparam; + -+ /* Get parameter data. -+ */ ++ /* Get parameter data. */ + if (copy_from_user + (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { + pr_err("[%s]: failed to copy-from-user for cmd %x\n", @@ -75558,8 +76346,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + + ret = vc_sm_ioctl_lock(file_data, &ioparam, 0, 0, 0); + -+ /* Copy result back to user. -+ */ ++ /* Copy result back to user. */ + if (copy_to_user((void *)arg, &ioparam, sizeof(ioparam)) + != 0) { + pr_err("[%s]: failed to copy-to-user for cmd %x\n", @@ -75567,20 +76354,17 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + ret = -EFAULT; + } + -+ /* Done. -+ */ ++ /* Done. */ + goto out; + } + break; + -+ /* Unlock (attempt to) existing memory allocation. -+ */ ++ /* Unlock (attempt to) existing memory allocation. */ + case VMCS_SM_CMD_UNLOCK: + { + struct vmcs_sm_ioctl_lock_unlock ioparam; + -+ /* Get parameter data. -+ */ ++ /* Get parameter data. */ + if (copy_from_user + (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { + pr_err("[%s]: failed to copy-from-user for cmd %x\n", @@ -75591,20 +76375,17 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + + ret = vc_sm_ioctl_unlock(file_data, &ioparam, 0, 1, 0); + -+ /* Done. -+ */ ++ /* Done. */ + goto out; + } + break; + -+ /* Resize (attempt to) existing memory allocation. -+ */ ++ /* Resize (attempt to) existing memory allocation. */ + case VMCS_SM_CMD_RESIZE: + { + struct vmcs_sm_ioctl_resize ioparam; + -+ /* Get parameter data. -+ */ ++ /* Get parameter data. */ + if (copy_from_user + (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { + pr_err("[%s]: failed to copy-from-user for cmd %x\n", @@ -75615,17 +76396,13 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + + ret = vc_sm_ioctl_resize(file_data, &ioparam); + -+ /* Copy result back to user. -+ */ ++ /* Copy result back to user. */ + if (copy_to_user((void *)arg, &ioparam, sizeof(ioparam)) + != 0) { + pr_err("[%s]: failed to copy-to-user for cmd %x\n", + __func__, cmdnr); + ret = -EFAULT; + } -+ -+ /* Done. -+ */ + goto out; + } + break; @@ -75670,7 +76447,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + goto out; + } + break; -+/* Walk mapping table on host, information shows up in the ++ /* Walk mapping table on host, information shows up in the + ** kernel log. + */ + case VMCS_SM_CMD_HOST_WALK_MAP: @@ -75709,7 +76486,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + { + struct vmcs_sm_ioctl_walk ioparam; + -+ /* Get parameter data. */ ++ /* Get parameter data. */ + if (copy_from_user(&ioparam, + (void *)arg, sizeof(ioparam)) != 0) { + pr_err("[%s]: failed to copy-from-user for cmd %x\n", @@ -75766,8 +76543,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + { + struct vmcs_sm_ioctl_chk ioparam; + -+ /* Get parameter data. -+ */ ++ /* Get parameter data. */ + if (copy_from_user(&ioparam, + (void *)arg, sizeof(ioparam)) != 0) { + pr_err("[%s]: failed to copy-from-user for cmd %x\n", @@ -75782,7 +76558,8 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + vmcs_sm_acquire_resource(file_data, ioparam.handle); + if (resource == NULL) + ret = -EINVAL; -+ /* If the resource is cacheable, return additional ++ /* ++ * If the resource is cacheable, return additional + * information that may be needed to flush the cache. + */ + else if ((resource->res_cached == VMCS_SM_CACHE_HOST) || @@ -75808,8 +76585,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + ret = -EFAULT; + } + -+ /* Done. -+ */ ++ /* Done. */ + goto out; + } + break; @@ -75888,8 +76664,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + ret = -EFAULT; + } + -+ /* Done. -+ */ ++ /* Done. */ + goto out; + } + break; @@ -75971,8 +76746,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + } + break; + -+ /* Maps a user address given process and vc handle. -+ */ ++ /* Maps a user address given process and vc handle. */ + case VMCS_SM_CMD_MAPPED_USR_ADDRESS: + { + struct vmcs_sm_ioctl_map ioparam; @@ -76075,8 +76849,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + goto out; + } + -+ /* Locate resource from GUID. -+ */ ++ /* Locate resource from GUID. */ + resource = + vmcs_sm_acquire_resource(file_data, ioparam.handle); + @@ -76112,8 +76885,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + if (resource) + vmcs_sm_release_resource(resource, 0); + -+ /* Done. -+ */ ++ /* Done. */ + goto out; + } + break; @@ -76132,40 +76904,92 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + ret = -EFAULT; + goto out; + } -+ for (i=0; ires_cached) { -+ unsigned long base = ioparam.s[i].addr & ~(PAGE_SIZE-1); -+ unsigned long end = (ioparam.s[i].addr + ioparam.s[i].size + PAGE_SIZE-1) & ~(PAGE_SIZE-1); -+ resource->res_stats[ioparam.s[i].cmd == 1 ? INVALID:FLUSH]++; ++ if ((resource != NULL) && resource->res_cached) { ++ unsigned long base = ioparam.s[i].addr & ~(PAGE_SIZE - 1); ++ unsigned long end = (ioparam.s[i].addr + ioparam.s[i].size + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1); + -+ /* L1/L2 cache flush */ -+ down_read(¤t->mm->mmap_sem); -+ vcsm_vma_cache_clean_page_range(base, end); -+ up_read(¤t->mm->mmap_sem); -+ } else if (resource == NULL) { -+ ret = -EINVAL; -+ goto out; -+ } ++ resource->res_stats[ioparam.s[i].cmd == 1 ? INVALID : FLUSH]++; + -+ if (resource) -+ vmcs_sm_release_resource(resource, 0); ++ /* L1/L2 cache flush */ ++ down_read(¤t->mm->mmap_sem); ++ vcsm_vma_cache_clean_page_range(base, end); ++ up_read(¤t->mm->mmap_sem); ++ } else if (resource == NULL) { ++ ret = -EINVAL; ++ goto out; + } ++ ++ if (resource) ++ vmcs_sm_release_resource(resource, 0); ++ + break; + } + } + } + break; ++ /* Flush/Invalidate the cache for a given mapping. */ ++ case VMCS_SM_CMD_CLEAN_INVALID2: ++ { ++ int i, j; ++ struct vmcs_sm_ioctl_clean_invalid2 ioparam; ++ struct vmcs_sm_ioctl_clean_invalid_block *block = NULL; ++ ++ /* Get parameter data. */ ++ if (copy_from_user(&ioparam, ++ (void *)arg, sizeof(ioparam)) != 0) { ++ pr_err("[%s]: failed to copy-from-user header for cmd %x\n", ++ __func__, cmdnr); ++ ret = -EFAULT; ++ goto out; ++ } ++ block = kmalloc(ioparam.op_count * ++ sizeof(struct vmcs_sm_ioctl_clean_invalid_block), ++ GFP_KERNEL); ++ if (!block) { ++ ret = -EFAULT; ++ goto out; ++ } ++ if (copy_from_user(block, ++ (void *)(arg + sizeof(ioparam)), ioparam.op_count * sizeof(struct vmcs_sm_ioctl_clean_invalid_block)) != 0) { ++ pr_err("[%s]: failed to copy-from-user payload for cmd %x\n", ++ __func__, cmdnr); ++ ret = -EFAULT; ++ goto out; ++ } ++ ++ for (i = 0; i < ioparam.op_count; i++) { ++ const struct vmcs_sm_ioctl_clean_invalid_block * const op = block + i; ++ cache_flush_op_fn * const op_fn = flushops[op->invalidate_mode & 3]; ++ ++ if ((op->invalidate_mode & ~3) != 0) { ++ ret = -EINVAL; ++ break; ++ } ++ ++ if (op_fn == 0) ++ continue; ++ ++ for (j = 0; j < op->block_count; ++j) { ++ const char * const base = (const char *)op->start_address + j * op->inter_block_stride; ++ const char * const end = base + op->block_size; ++ op_fn(base, end); ++ } ++ } ++ kfree(block); ++ } ++ break; + + default: + { @@ -76179,8 +77003,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + return ret; +} + -+/* Device operations that we managed in this driver. -+*/ ++/* Device operations that we managed in this driver. */ +static const struct file_operations vmcs_sm_ops = { + .owner = THIS_MODULE, + .unlocked_ioctl = vc_sm_ioctl, @@ -76189,8 +77012,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + .mmap = vc_sm_mmap, +}; + -+/* Creation of device. -+*/ ++/* Creation of device. */ +static int vc_sm_create_sharedmemory(void) +{ + int ret; @@ -76200,8 +77022,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + goto out; + } + -+ /* Create a device class for creating dev nodes. -+ */ ++ /* Create a device class for creating dev nodes. */ + sm_state->sm_class = class_create(THIS_MODULE, "vc-sm"); + if (IS_ERR(sm_state->sm_class)) { + pr_err("[%s]: unable to create device class\n", __func__); @@ -76209,8 +77030,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + goto out; + } + -+ /* Create a character driver. -+ */ ++ /* Create a character driver. */ + ret = alloc_chrdev_region(&sm_state->sm_devid, + DEVICE_MINOR, 1, DEVICE_NAME); + if (ret != 0) { @@ -76225,8 +77045,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + goto out_chrdev_unreg; + } + -+ /* Create a device node. -+ */ ++ /* Create a device node. */ + sm_state->sm_dev = device_create(sm_state->sm_class, + NULL, + MKDEV(MAJOR(sm_state->sm_devid), @@ -76251,25 +77070,21 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + return ret; +} + -+/* Termination of the device. -+*/ ++/* Termination of the device. */ +static int vc_sm_remove_sharedmemory(void) +{ + int ret; + + if (sm_state == NULL) { -+ /* Nothing to do. -+ */ ++ /* Nothing to do. */ + ret = 0; + goto out; + } + -+ /* Remove the sharedmemory character driver. -+ */ ++ /* Remove the sharedmemory character driver. */ + cdev_del(&sm_state->sm_cdev); + -+ /* Unregister region. -+ */ ++ /* Unregister region. */ + unregister_chrdev_region(sm_state->sm_devid, 1); + + ret = 0; @@ -76288,20 +77103,9 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + + pr_info("[%s]: start\n", __func__); + -+ /* Allocate memory for the state structure. -+ */ -+ sm_state = kzalloc(sizeof(struct SM_STATE_T), GFP_KERNEL); -+ if (sm_state == NULL) { -+ pr_err("[%s]: failed to allocate memory\n", __func__); -+ ret = -ENOMEM; -+ goto out; -+ } -+ -+ mutex_init(&sm_state->lock); -+ mutex_init(&sm_state->map_lock); -+ -+ /* Initialize and create a VCHI connection for the shared memory service -+ ** running on videocore. ++ /* ++ * Initialize and create a VCHI connection for the shared memory service ++ * running on videocore. + */ + ret = vchi_initialise(&vchi_instance); + if (ret != 0) { @@ -76344,12 +77148,12 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + + sm_state->dir_state.show = &vc_sm_global_state_show; + sm_state->dir_state.dir_entry = debugfs_create_file(VC_SM_STATE, -+ S_IRUGO, sm_state->dir_root, &sm_state->dir_state, ++ 0444, sm_state->dir_root, &sm_state->dir_state, + &vc_sm_debug_fs_fops); + + sm_state->dir_stats.show = &vc_sm_global_statistics_show; + sm_state->dir_stats.dir_entry = debugfs_create_file(VC_SM_STATS, -+ S_IRUGO, sm_state->dir_root, &sm_state->dir_stats, ++ 0444, sm_state->dir_root, &sm_state->dir_stats, + &vc_sm_debug_fs_fops); + + /* Create the proc entry children. */ @@ -76374,8 +77178,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + goto err_remove_shared_memory; + } + -+ /* Done! -+ */ ++ /* Done! */ + sm_inited = 1; + goto out; + @@ -76392,49 +77195,53 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 +} + +/* Driver loading. */ -+static int __init vc_sm_init(void) ++static int bcm2835_vcsm_probe(struct platform_device *pdev) +{ + pr_info("vc-sm: Videocore shared memory driver\n"); ++ ++ sm_state = kzalloc(sizeof(*sm_state), GFP_KERNEL); ++ if (!sm_state) ++ return -ENOMEM; ++ sm_state->pdev = pdev; ++ mutex_init(&sm_state->lock); ++ mutex_init(&sm_state->map_lock); ++ + vchiq_add_connected_callback(vc_sm_connected_init); + return 0; +} + +/* Driver unloading. */ -+static void __exit vc_sm_exit(void) ++static int bcm2835_vcsm_remove(struct platform_device *pdev) +{ + pr_debug("[%s]: start\n", __func__); + if (sm_inited) { -+ /* Remove shared memory device. -+ */ ++ /* Remove shared memory device. */ + vc_sm_remove_sharedmemory(); + -+ /* Remove all proc entries. -+ */ ++ /* Remove all proc entries. */ + debugfs_remove_recursive(sm_state->dir_root); + -+ /* Stop the videocore shared memory service. -+ */ ++ /* Stop the videocore shared memory service. */ + vc_vchi_sm_stop(&sm_state->sm_handle); + -+ /* Free the memory for the state structure. -+ */ ++ /* Free the memory for the state structure. */ + mutex_destroy(&(sm_state->map_lock)); + kfree(sm_state); + } + + pr_debug("[%s]: end\n", __func__); ++ return 0; +} + +#if defined(__KERNEL__) +/* Allocate a shared memory handle and block. */ -+int vc_sm_alloc(VC_SM_ALLOC_T *alloc, int *handle) ++int vc_sm_alloc(struct vc_sm_alloc_t *alloc, int *handle) +{ + struct vmcs_sm_ioctl_alloc ioparam = { 0 }; + int ret; -+ struct SM_RESOURCE_T *resource; ++ struct sm_resource_t *resource; + -+ /* Validate we can work with this device. -+ */ ++ /* Validate we can work with this device. */ + if (sm_state == NULL || alloc == NULL || handle == NULL) { + pr_err("[%s]: invalid input\n", __func__); + return -EPERM; @@ -76455,8 +77262,7 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + resource->pid = 0; + vmcs_sm_release_resource(resource, 0); + -+ /* Assign valid handle at this time. -+ */ ++ /* Assign valid handle at this time. */ + *handle = ioparam.handle; + } else { + ret = -ENOMEM; @@ -76467,22 +77273,19 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 +} +EXPORT_SYMBOL_GPL(vc_sm_alloc); + -+/* Get an internal resource handle mapped from the external one. -+*/ ++/* Get an internal resource handle mapped from the external one. */ +int vc_sm_int_handle(int handle) +{ -+ struct SM_RESOURCE_T *resource; ++ struct sm_resource_t *resource; + int ret = 0; + -+ /* Validate we can work with this device. -+ */ ++ /* Validate we can work with this device. */ + if (sm_state == NULL || handle == 0) { + pr_err("[%s]: invalid input\n", __func__); + return 0; + } + -+ /* Locate resource from GUID. -+ */ ++ /* Locate resource from GUID. */ + resource = vmcs_sm_acquire_resource(sm_state->data_knl, handle); + if (resource) { + ret = resource->res_handle; @@ -76493,14 +77296,12 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 +} +EXPORT_SYMBOL_GPL(vc_sm_int_handle); + -+/* Free a previously allocated shared memory handle and block. -+*/ ++/* Free a previously allocated shared memory handle and block. */ +int vc_sm_free(int handle) +{ + struct vmcs_sm_ioctl_free ioparam = { handle }; + -+ /* Validate we can work with this device. -+ */ ++ /* Validate we can work with this device. */ + if (sm_state == NULL || handle == 0) { + pr_err("[%s]: invalid input\n", __func__); + return -EPERM; @@ -76510,16 +77311,14 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 +} +EXPORT_SYMBOL_GPL(vc_sm_free); + -+/* Lock a memory handle for use by kernel. -+*/ -+int vc_sm_lock(int handle, VC_SM_LOCK_CACHE_MODE_T mode, -+ long unsigned int *data) ++/* Lock a memory handle for use by kernel. */ ++int vc_sm_lock(int handle, enum vc_sm_lock_cache_mode mode, ++ unsigned long *data) +{ + struct vmcs_sm_ioctl_lock_unlock ioparam; + int ret; + -+ /* Validate we can work with this device. -+ */ ++ /* Validate we can work with this device. */ + if (sm_state == NULL || handle == 0 || data == NULL) { + pr_err("[%s]: invalid input\n", __func__); + return -EPERM; @@ -76540,14 +77339,12 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 +} +EXPORT_SYMBOL_GPL(vc_sm_lock); + -+/* Unlock a memory handle in use by kernel. -+*/ ++/* Unlock a memory handle in use by kernel. */ +int vc_sm_unlock(int handle, int flush, int no_vc_unlock) +{ + struct vmcs_sm_ioctl_lock_unlock ioparam; + -+ /* Validate we can work with this device. -+ */ ++ /* Validate we can work with this device. */ + if (sm_state == NULL || handle == 0) { + pr_err("[%s]: invalid input\n", __func__); + return -EPERM; @@ -76559,16 +77356,14 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 +} +EXPORT_SYMBOL_GPL(vc_sm_unlock); + -+/* Map a shared memory region for use by kernel. -+*/ -+int vc_sm_map(int handle, unsigned int sm_addr, VC_SM_LOCK_CACHE_MODE_T mode, -+ long unsigned int *data) ++/* Map a shared memory region for use by kernel. */ ++int vc_sm_map(int handle, unsigned int sm_addr, ++ enum vc_sm_lock_cache_mode mode, unsigned long *data) +{ + struct vmcs_sm_ioctl_lock_unlock ioparam; + int ret; + -+ /* Validate we can work with this device. -+ */ ++ /* Validate we can work with this device. */ + if (sm_state == NULL || handle == 0 || data == NULL || sm_addr == 0) { + pr_err("[%s]: invalid input\n", __func__); + return -EPERM; @@ -76588,20 +77383,76 @@ index 0000000000000000000000000000000000000000..fd2ca788dcd56b1702454d71b7bedd42 + return ret; +} +EXPORT_SYMBOL_GPL(vc_sm_map); ++ ++/* Import a dmabuf to be shared with VC. */ ++int vc_sm_import_dmabuf(struct dma_buf *dmabuf, int *handle) ++{ ++ struct vmcs_sm_ioctl_import_dmabuf ioparam = { 0 }; ++ int ret; ++ struct sm_resource_t *resource; ++ ++ /* Validate we can work with this device. */ ++ if (!sm_state || !dmabuf || !handle) { ++ pr_err("[%s]: invalid input\n", __func__); ++ return -EPERM; ++ } ++ ++ ioparam.cached = 0; ++ strcpy(ioparam.name, "KRNL DMABUF"); ++ ++ ret = vc_sm_ioctl_import_dmabuf(sm_state->data_knl, &ioparam, dmabuf); ++ ++ if (!ret) { ++ resource = vmcs_sm_acquire_resource(sm_state->data_knl, ++ ioparam.handle); ++ if (resource) { ++ resource->pid = 0; ++ vmcs_sm_release_resource(resource, 0); ++ ++ /* Assign valid handle at this time.*/ ++ *handle = ioparam.handle; ++ } else { ++ ret = -ENOMEM; ++ } ++ } ++ ++ return ret; ++} ++EXPORT_SYMBOL_GPL(vc_sm_import_dmabuf); +#endif + -+late_initcall(vc_sm_init); -+module_exit(vc_sm_exit); ++/* ++ * Register the driver with device tree ++ */ ++ ++static const struct of_device_id bcm2835_vcsm_of_match[] = { ++ {.compatible = "raspberrypi,bcm2835-vcsm",}, ++ { /* sentinel */ }, ++}; ++ ++MODULE_DEVICE_TABLE(of, bcm2835_vcsm_of_match); ++ ++static struct platform_driver bcm2835_vcsm_driver = { ++ .probe = bcm2835_vcsm_probe, ++ .remove = bcm2835_vcsm_remove, ++ .driver = { ++ .name = DRIVER_NAME, ++ .owner = THIS_MODULE, ++ .of_match_table = bcm2835_vcsm_of_match, ++ }, ++}; ++ ++module_platform_driver(bcm2835_vcsm_driver); + +MODULE_AUTHOR("Broadcom"); +MODULE_DESCRIPTION("VideoCore SharedMemory Driver"); +MODULE_LICENSE("GPL v2"); diff --git a/include/linux/broadcom/vmcs_sm_ioctl.h b/include/linux/broadcom/vmcs_sm_ioctl.h new file mode 100644 -index 0000000000000000000000000000000000000000..334f36d0d697b047df2922b5f2db67f38cf76564 +index 0000000000000000000000000000000000000000..b75729d762f25aace133f7a008633b4094ae2de2 --- /dev/null +++ b/include/linux/broadcom/vmcs_sm_ioctl.h -@@ -0,0 +1,248 @@ +@@ -0,0 +1,280 @@ +/***************************************************************************** +* Copyright 2011 Broadcom Corporation. All rights reserved. +* @@ -76666,8 +77517,11 @@ index 0000000000000000000000000000000000000000..334f36d0d697b047df2922b5f2db67f3 + VMCS_SM_CMD_HOST_WALK_PID_MAP, + + VMCS_SM_CMD_CLEAN_INVALID, ++ VMCS_SM_CMD_CLEAN_INVALID2, + -+ VMCS_SM_CMD_LAST /* Do no delete */ ++ VMCS_SM_CMD_IMPORT_DMABUF, ++ ++ VMCS_SM_CMD_LAST /* Do not delete */ +}; + +/* Cache type supported, conveniently matches the user space definition in @@ -76779,6 +77633,28 @@ index 0000000000000000000000000000000000000000..334f36d0d697b047df2922b5f2db67f3 + } s[8]; +}; + ++struct vmcs_sm_ioctl_clean_invalid2 { ++ uint8_t op_count; ++ uint8_t zero[3]; ++ struct vmcs_sm_ioctl_clean_invalid_block { ++ uint16_t invalidate_mode; ++ uint16_t block_count; ++ void * start_address; ++ uint32_t block_size; ++ uint32_t inter_block_stride; ++ } s[0]; ++}; ++ ++struct vmcs_sm_ioctl_import_dmabuf { ++ /* user -> kernel */ ++ int dmabuf_fd; ++ enum vmcs_sm_cache_e cached; ++ char name[VMCS_SM_RESOURCE_NAME]; ++ ++ /* kernel -> user */ ++ unsigned int handle; ++}; ++ +/* IOCTL numbers */ +#define VMCS_SM_IOCTL_MEM_ALLOC\ + _IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_ALLOC,\ @@ -76810,6 +77686,9 @@ index 0000000000000000000000000000000000000000..334f36d0d697b047df2922b5f2db67f3 +#define VMCS_SM_IOCTL_MEM_CLEAN_INVALID\ + _IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_CLEAN_INVALID,\ + struct vmcs_sm_ioctl_clean_invalid) ++#define VMCS_SM_IOCTL_MEM_CLEAN_INVALID2\ ++ _IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_CLEAN_INVALID2,\ ++ struct vmcs_sm_ioctl_clean_invalid2) + +#define VMCS_SM_IOCTL_SIZE_USR_HDL\ + _IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_SIZE_USR_HANDLE,\ @@ -76845,16 +77724,20 @@ index 0000000000000000000000000000000000000000..334f36d0d697b047df2922b5f2db67f3 + _IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_HOST_WALK_PID_MAP,\ + struct vmcs_sm_ioctl_walk) + ++#define VMCS_SM_IOCTL_MEM_IMPORT_DMABUF\ ++ _IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_IMPORT_DMABUF,\ ++ struct vmcs_sm_ioctl_import_dmabuf) ++ +/* ---- Variable Externs ------------------------------------------------- */ + +/* ---- Function Prototypes ---------------------------------------------- */ + +#endif /* __VMCS_SM_IOCTL_H__INCLUDED__ */ -From 54dbad72f925213c1d1dbb49b7f3beb4cd6f903d Mon Sep 17 00:00:00 2001 +From 3799b1cc77322f1925aa87ca58b77989ca5a689e Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Fri, 21 Aug 2015 23:14:48 +0100 -Subject: [PATCH 042/199] Add /dev/gpiomem device for rootless user GPIO access +Subject: [PATCH 047/129] Add /dev/gpiomem device for rootless user GPIO access Signed-off-by: Luke Wren @@ -77162,10 +78045,10 @@ index 0000000000000000000000000000000000000000..f5e7f1ba8fb6f18dee77fad06a17480c +MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace"); +MODULE_AUTHOR("Luke Wren "); -From d3452b6add04eb41f7e5a09e4f01564b60097792 Mon Sep 17 00:00:00 2001 +From 6cb24300772167b1c4bb07a7985d025cb508380a Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:14:45 +0100 -Subject: [PATCH 043/199] Add SMI driver +Subject: [PATCH 048/129] Add SMI driver Signed-off-by: Luke Wren --- @@ -79116,10 +79999,10 @@ index 0000000000000000000000000000000000000000..ee3a75edfc033eeb0d90a687ffb68b10 + +#endif /* BCM2835_SMI_H */ -From c8104c25a060cf241303b97395eddc0fb3ea147f Mon Sep 17 00:00:00 2001 +From aeb4c4d9a548d638db0b305484e0b764fa20d82d Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Tue, 26 Apr 2016 14:59:21 +0000 -Subject: [PATCH 044/199] MISC: bcm2835: smi: use clock manager and fix reload +Subject: [PATCH 049/129] MISC: bcm2835: smi: use clock manager and fix reload issues Use clock manager instead of self-made clockmanager. @@ -79289,10 +80172,10 @@ index 63a4ea08b9930a3a31a985f0a1d969b488ed49ec..1261540703127d1d63b9f3c87042c6e5 return 0; } -From d4f1a556543c7c328259d77dcd0b5714117aba16 Mon Sep 17 00:00:00 2001 +From 0597e8bf3e75f13e7cfdc469efe8abe23d01d2b1 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:16:10 +0100 -Subject: [PATCH 045/199] Add SMI NAND driver +Subject: [PATCH 050/129] Add SMI NAND driver Signed-off-by: Luke Wren --- @@ -79657,10 +80540,10 @@ index 0000000000000000000000000000000000000000..02adda6da18bd0ba9ab19a104975b79d + ("Driver for NAND chips using Broadcom Secondary Memory Interface"); +MODULE_AUTHOR("Luke Wren "); -From 0a89639705fca9304c067c288364b9997c4b37a7 Mon Sep 17 00:00:00 2001 +From 1053b28a97453d1b844f569a035e7a9024087ebe Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 046/199] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 051/129] 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 @@ -80520,17 +81403,22 @@ index 0000000000000000000000000000000000000000..fb69624ccef00ddbdccf8256d6baf1b1 + +#endif -From 53134e4c000e21874d0a50c3d416b3728a3a621a Mon Sep 17 00:00:00 2001 +From f1a2739582a18d8e0694b78191dc6226473e94e5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 047/199] Add cpufreq driver +Subject: [PATCH 052/129] Add cpufreq driver Signed-off-by: popcornmix + +bcm2835-cpufreq: Change licence to GPLv2 + +Signed-off-by: Eben Upton +Signed-off-by: Dom Cobley --- drivers/cpufreq/Kconfig.arm | 9 ++ drivers/cpufreq/Makefile | 1 + - drivers/cpufreq/bcm2835-cpufreq.c | 218 ++++++++++++++++++++++++++++++++++++++ - 3 files changed, 228 insertions(+) + drivers/cpufreq/bcm2835-cpufreq.c | 210 ++++++++++++++++++++++++++++++++++++++ + 3 files changed, 220 insertions(+) create mode 100644 drivers/cpufreq/bcm2835-cpufreq.c diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm @@ -80567,32 +81455,24 @@ index ab3a42cd29ef210bcf0cad2ee48c74cb954b14f2..f81761612a9bef474090a868305bb86e obj-$(CONFIG_ARM_TEGRA186_CPUFREQ) += tegra186-cpufreq.o diff --git a/drivers/cpufreq/bcm2835-cpufreq.c b/drivers/cpufreq/bcm2835-cpufreq.c new file mode 100644 -index 0000000000000000000000000000000000000000..414fbdc10dfbfc6e4bb47870a7af3fd5780f9c9a +index 0000000000000000000000000000000000000000..99345969b0e4d651fd9033d67de2febb13fc0892 --- /dev/null +++ b/drivers/cpufreq/bcm2835-cpufreq.c -@@ -0,0 +1,218 @@ -+/***************************************************************************** -+* Copyright 2011 Broadcom Corporation. All rights reserved. -+* -+* Unless you and Broadcom execute a separate written software license -+* agreement governing use of this software, this software is licensed to you -+* under the terms of the GNU General Public License version 2, available at -+* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). -+* -+* Notwithstanding the above, under no circumstances may you combine this -+* software in any way with any other Broadcom software provided under a -+* license other than the GPL, without Broadcom's express prior written -+* consent. -+*****************************************************************************/ -+ -+/***************************************************************************** -+* FILENAME: bcm2835-cpufreq.h -+* DESCRIPTION: This driver dynamically manages the CPU Frequency of the ARM -+* processor. Messages are sent to Videocore either setting or requesting the -+* frequency of the ARM in order to match an appropiate frequency to the current -+* usage of the processor. The policy which selects the frequency to use is -+* defined in the kernel .config file, but can be changed during runtime. -+*****************************************************************************/ +@@ -0,0 +1,210 @@ ++/* ++ * Copyright 2011 Broadcom Corporation. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; version 2 ++ * of the License. ++ * ++ * This driver dynamically manages the CPU Frequency of the ARM ++ * processor. Messages are sent to Videocore either setting or requesting the ++ * frequency of the ARM in order to match an appropiate frequency to the current ++ * usage of the processor. The policy which selects the frequency to use is ++ * defined in the kernel .config file, but can be changed during runtime. ++ */ + +/* ---------- INCLUDES ---------- */ +#include @@ -80790,10 +81670,10 @@ index 0000000000000000000000000000000000000000..414fbdc10dfbfc6e4bb47870a7af3fd5 +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); -From 5efe200e855b813f52f9b651554e077af87dec1f Mon Sep 17 00:00:00 2001 +From bdcf2fea9d9494b1bde5be20708639a899caabc4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 15:44:08 +0100 -Subject: [PATCH 048/199] Add Chris Boot's i2c driver +Subject: [PATCH 053/129] Add Chris Boot's i2c driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -81458,10 +82338,10 @@ index 0000000000000000000000000000000000000000..962f2e5c7455d91bf32925d785f5f16b +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); -From d1a193f2ba50338e517f3fa9e8f1f25401f764a0 Mon Sep 17 00:00:00 2001 +From b3412fd2008d4fc5ef921840c534e637a6acc44e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:27:06 +0200 -Subject: [PATCH 049/199] char: broadcom: Add vcio module +Subject: [PATCH 054/129] char: broadcom: Add vcio module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -81686,10 +82566,10 @@ index 0000000000000000000000000000000000000000..c19bc2075c77879563ef5e59038b5a14 +MODULE_DESCRIPTION("Mailbox userspace access"); +MODULE_LICENSE("GPL"); -From a2a6e93609a97bc827d97d746a0678f50f12fcf9 Mon Sep 17 00:00:00 2001 +From 904187645d8f723be83183d949edd5f4934b2962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:25:01 +0200 -Subject: [PATCH 050/199] firmware: bcm2835: Support ARCH_BCM270x +Subject: [PATCH 055/129] firmware: bcm2835: Support ARCH_BCM270x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -81772,10 +82652,10 @@ index dd506cd3a5b874f9e1acd07efb8cd151bb6145d1..3f070bd38a91511c986e3fb114b15bd4 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("Raspberry Pi firmware driver"); -From ac7a24adc1031d34e81e8d3116f92cd6fd47d978 Mon Sep 17 00:00:00 2001 +From be3055df75011cc2027acab5bf2f294e0543e02f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 May 2015 09:00:42 +0100 -Subject: [PATCH 051/199] scripts: Add mkknlimg and knlinfo scripts from tools +Subject: [PATCH 056/129] scripts: Add mkknlimg and knlinfo scripts from tools repo The Raspberry Pi firmware looks for a trailer on the kernel image to @@ -82302,10 +83182,10 @@ index 0000000000000000000000000000000000000000..84be2593ec1de8f97b0167ff06b3e05d + return $trailer; +} -From 9f3ce085aca3f7c192c9dcd61a19bff71a9c728a Mon Sep 17 00:00:00 2001 +From c063b1ed6fac8ef79ccb0c14ef662515e93787f5 Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:46:08 +0200 -Subject: [PATCH 052/199] BCM2708: Add core Device Tree support +Subject: [PATCH 057/129] BCM2708: Add core Device Tree support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -82505,12 +83385,12 @@ Signed-off-by: Phil Elwell arch/arm/Makefile | 2 + arch/arm/boot/.gitignore | 2 +- arch/arm/boot/dts/Makefile | 20 + - arch/arm/boot/dts/bcm2708-rpi-0-w.dts | 162 +++ + arch/arm/boot/dts/bcm2708-rpi-0-w.dts | 162 ++ arch/arm/boot/dts/bcm2708-rpi-b-plus.dts | 122 ++ arch/arm/boot/dts/bcm2708-rpi-b.dts | 112 ++ arch/arm/boot/dts/bcm2708-rpi-cm.dts | 95 ++ arch/arm/boot/dts/bcm2708-rpi-cm.dtsi | 17 + - arch/arm/boot/dts/bcm2708-rpi.dtsi | 174 +++ + arch/arm/boot/dts/bcm2708-rpi.dtsi | 162 ++ arch/arm/boot/dts/bcm2708.dtsi | 20 + arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 122 ++ arch/arm/boot/dts/bcm2709.dtsi | 22 + @@ -82519,8 +83399,8 @@ Signed-off-by: Phil Elwell arch/arm/boot/dts/bcm2710-rpi-cm3.dts | 129 ++ arch/arm/boot/dts/bcm2710.dtsi | 148 ++ arch/arm/boot/dts/bcm283x.dtsi | 13 +- - arch/arm/boot/dts/overlays/Makefile | 118 ++ - arch/arm/boot/dts/overlays/README | 1517 ++++++++++++++++++++ + arch/arm/boot/dts/overlays/Makefile | 125 ++ + arch/arm/boot/dts/overlays/README | 1620 ++++++++++++++++++++ .../arm/boot/dts/overlays/adau1977-adc-overlay.dts | 40 + .../boot/dts/overlays/adau7002-simple-overlay.dts | 52 + arch/arm/boot/dts/overlays/ads1015-overlay.dts | 98 ++ @@ -82528,6 +83408,7 @@ Signed-off-by: Phil Elwell arch/arm/boot/dts/overlays/ads7846-overlay.dts | 89 ++ .../dts/overlays/akkordion-iqdacplus-overlay.dts | 49 + .../allo-boss-dac-pcm512x-audio-overlay.dts | 59 + + .../arm/boot/dts/overlays/allo-digione-overlay.dts | 44 + .../allo-piano-dac-pcm512x-audio-overlay.dts | 54 + .../allo-piano-dac-plus-pcm512x-audio-overlay.dts | 55 + arch/arm/boot/dts/overlays/at86rf233-overlay.dts | 57 + @@ -82545,9 +83426,11 @@ Signed-off-by: Phil Elwell arch/arm/boot/dts/overlays/enc28j60-overlay.dts | 53 + .../boot/dts/overlays/enc28j60-spi2-overlay.dts | 47 + arch/arm/boot/dts/overlays/fe-pi-audio-overlay.dts | 70 + + arch/arm/boot/dts/overlays/goodix-overlay.dts | 46 + .../overlays/googlevoicehat-soundcard-overlay.dts | 49 + arch/arm/boot/dts/overlays/gpio-ir-overlay.dts | 44 + .../boot/dts/overlays/gpio-poweroff-overlay.dts | 34 + + .../boot/dts/overlays/gpio-shutdown-overlay.dts | 80 + .../boot/dts/overlays/hifiberry-amp-overlay.dts | 39 + .../boot/dts/overlays/hifiberry-dac-overlay.dts | 34 + .../dts/overlays/hifiberry-dacplus-overlay.dts | 59 + @@ -82559,10 +83442,11 @@ Signed-off-by: Phil Elwell arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts | 43 + arch/arm/boot/dts/overlays/i2c-mux-overlay.dts | 139 ++ .../boot/dts/overlays/i2c-pwm-pca9685a-overlay.dts | 26 + - arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts | 83 ++ - arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts | 49 + + .../arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts | 183 +++ + arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts | 164 ++ + arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts | 142 ++ .../arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts | 61 + - .../arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts | 37 + + .../arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts | 34 + .../boot/dts/overlays/i2s-gpio28-31-overlay.dts | 18 + arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts | 46 + .../boot/dts/overlays/iqaudio-dacplus-overlay.dts | 49 + @@ -82571,12 +83455,14 @@ Signed-off-by: Phil Elwell .../boot/dts/overlays/justboom-digi-overlay.dts | 41 + arch/arm/boot/dts/overlays/lirc-rpi-overlay.dts | 57 + arch/arm/boot/dts/overlays/mcp23017-overlay.dts | 54 + - arch/arm/boot/dts/overlays/mcp23s17-overlay.dts | 732 ++++++++++ + arch/arm/boot/dts/overlays/mcp23s17-overlay.dts | 732 +++++++++ .../arm/boot/dts/overlays/mcp2515-can0-overlay.dts | 73 + .../arm/boot/dts/overlays/mcp2515-can1-overlay.dts | 73 + arch/arm/boot/dts/overlays/mcp3008-overlay.dts | 205 +++ arch/arm/boot/dts/overlays/midi-uart0-overlay.dts | 36 + + arch/arm/boot/dts/overlays/midi-uart1-overlay.dts | 43 + arch/arm/boot/dts/overlays/mmc-overlay.dts | 39 + + arch/arm/boot/dts/overlays/mpu6050-overlay.dts | 28 + arch/arm/boot/dts/overlays/mz61581-overlay.dts | 117 ++ arch/arm/boot/dts/overlays/pi3-act-led-overlay.dts | 27 + .../boot/dts/overlays/pi3-disable-bt-overlay.dts | 46 + @@ -82594,6 +83480,7 @@ Signed-off-by: Phil Elwell arch/arm/boot/dts/overlays/pwm-overlay.dts | 43 + arch/arm/boot/dts/overlays/qca7000-overlay.dts | 52 + arch/arm/boot/dts/overlays/raspidac3-overlay.dts | 49 + + .../boot/dts/overlays/rotary-encoder-overlay.dts | 43 + .../boot/dts/overlays/rpi-backlight-overlay.dts | 21 + .../dts/overlays/rpi-cirrus-wm5102-overlay.dts | 146 ++ arch/arm/boot/dts/overlays/rpi-dac-overlay.dts | 34 + @@ -82618,10 +83505,10 @@ Signed-off-by: Phil Elwell arch/arm/boot/dts/overlays/spi0-hw-cs-overlay.dts | 26 + arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts | 57 + arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts | 69 + - arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts | 81 ++ + arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts | 81 + arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts | 57 + arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts | 69 + - arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts | 81 ++ + arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts | 81 + arch/arm/boot/dts/overlays/tinylcd35-overlay.dts | 224 +++ arch/arm/boot/dts/overlays/uart1-overlay.dts | 38 + .../arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts | 89 ++ @@ -82632,7 +83519,7 @@ Signed-off-by: Phil Elwell arch/arm/boot/dts/overlays/wittypi-overlay.dts | 44 + scripts/Makefile.dtbinst | 8 +- scripts/Makefile.lib | 11 + - 130 files changed, 10133 insertions(+), 6 deletions(-) + 137 files changed, 10869 insertions(+), 6 deletions(-) create mode 100644 arch/arm/boot/dts/bcm2708-rpi-0-w.dts create mode 100644 arch/arm/boot/dts/bcm2708-rpi-b-plus.dts create mode 100644 arch/arm/boot/dts/bcm2708-rpi-b.dts @@ -82655,6 +83542,7 @@ Signed-off-by: Phil Elwell create mode 100644 arch/arm/boot/dts/overlays/ads7846-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/allo-boss-dac-pcm512x-audio-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/allo-digione-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/allo-piano-dac-pcm512x-audio-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/allo-piano-dac-plus-pcm512x-audio-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/at86rf233-overlay.dts @@ -82672,9 +83560,11 @@ Signed-off-by: Phil Elwell create mode 100644 arch/arm/boot/dts/overlays/enc28j60-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/enc28j60-spi2-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/fe-pi-audio-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/goodix-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/googlevoicehat-soundcard-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/gpio-ir-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/gpio-poweroff-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/gpio-shutdown-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts @@ -82686,6 +83576,7 @@ Signed-off-by: Phil Elwell create mode 100644 arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/i2c-mux-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/i2c-pwm-pca9685a-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts @@ -82703,7 +83594,9 @@ Signed-off-by: Phil Elwell create mode 100644 arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts create mode 100755 arch/arm/boot/dts/overlays/mcp3008-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/midi-uart0-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/midi-uart1-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/mmc-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/mpu6050-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/mz61581-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/pi3-act-led-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts @@ -82721,6 +83614,7 @@ Signed-off-by: Phil Elwell create mode 100644 arch/arm/boot/dts/overlays/pwm-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/qca7000-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/raspidac3-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/rotary-encoder-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/rpi-backlight-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/rpi-cirrus-wm5102-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/rpi-dac-overlay.dts @@ -83362,10 +84256,10 @@ index 0000000000000000000000000000000000000000..d0299e3d9a09ddcdad80cb0957b30b14 +}; diff --git a/arch/arm/boot/dts/bcm2708-rpi.dtsi b/arch/arm/boot/dts/bcm2708-rpi.dtsi new file mode 100644 -index 0000000000000000000000000000000000000000..29dde110e769082a24640d3c7284afb8e99b226c +index 0000000000000000000000000000000000000000..f88b844f0aff82742966fd820f6f69cf25c2dfab --- /dev/null +++ b/arch/arm/boot/dts/bcm2708-rpi.dtsi -@@ -0,0 +1,174 @@ +@@ -0,0 +1,162 @@ +/* Downstream version of bcm2835-rpi.dtsi */ + +#include @@ -83442,6 +84336,12 @@ index 0000000000000000000000000000000000000000..29dde110e769082a24640d3c7284afb8 + firmware = <&firmware>; + }; + ++ vcsm: vcsm { ++ compatible = "raspberrypi,bcm2835-vcsm"; ++ firmware = <&firmware>; ++ status = "okay"; ++ }; ++ + thermal: thermal@7e212000 { + #thermal-sensor-cells = <0>; + status = "okay"; @@ -83458,30 +84358,6 @@ index 0000000000000000000000000000000000000000..29dde110e769082a24640d3c7284afb8 + sound: sound { + status = "disabled"; + }; -+ -+ thermal-zones { -+ cpu_thermal: cpu-thermal { -+ polling-delay-passive = <0>; -+ polling-delay = <1000>; -+ -+ thermal-sensors = <&thermal>; -+ -+ /* No trips -+ trips { -+ cpu-crit { -+ temperature = <80000>; -+ hysteresis = <0>; -+ type = "critical"; -+ }; -+ }; -+ */ -+ -+ coefficients = <(-538) 407000>; -+ -+ cooling-maps { -+ }; -+ }; -+ }; + }; + + __overrides__ { @@ -83540,6 +84416,12 @@ index 0000000000000000000000000000000000000000..29dde110e769082a24640d3c7284afb8 +&fb { + status = "okay"; +}; ++ ++&cpu_thermal { ++ coefficients = <(-538) 407000>; ++ ++ /delete-node/ trips; ++}; diff --git a/arch/arm/boot/dts/bcm2708.dtsi b/arch/arm/boot/dts/bcm2708.dtsi new file mode 100644 index 0000000000000000000000000000000000000000..756bd3687b488da98f749b27ddfe098693990045 @@ -84411,10 +85293,10 @@ index 431dcfc900c024d85a88231d1df007916dafdfeb..6a119d30c5f8c2d13deacea646af8c30 #size-cells = <0>; diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile new file mode 100644 -index 0000000000000000000000000000000000000000..e2f66a55dc5afe13d690c2c17827054ac94b7168 +index 0000000000000000000000000000000000000000..c50b1dfa9d7334df47ce087f9d2a7a816afa05ba --- /dev/null +++ b/arch/arm/boot/dts/overlays/Makefile -@@ -0,0 +1,118 @@ +@@ -0,0 +1,125 @@ +# Overlays for the Raspberry Pi platform + +dtbo-$(CONFIG_ARCH_BCM2835) += \ @@ -84425,6 +85307,7 @@ index 0000000000000000000000000000000000000000..e2f66a55dc5afe13d690c2c17827054a + ads7846.dtbo \ + akkordion-iqdacplus.dtbo \ + allo-boss-dac-pcm512x-audio.dtbo \ ++ allo-digione.dtbo \ + allo-piano-dac-pcm512x-audio.dtbo \ + allo-piano-dac-plus-pcm512x-audio.dtbo \ + at86rf233.dtbo \ @@ -84442,9 +85325,11 @@ index 0000000000000000000000000000000000000000..e2f66a55dc5afe13d690c2c17827054a + enc28j60.dtbo \ + enc28j60-spi2.dtbo \ + fe-pi-audio.dtbo \ ++ goodix.dtbo \ + googlevoicehat-soundcard.dtbo \ + gpio-ir.dtbo \ + gpio-poweroff.dtbo \ ++ gpio-shutdown.dtbo \ + hifiberry-amp.dtbo \ + hifiberry-dac.dtbo \ + hifiberry-dacplus.dtbo \ @@ -84457,6 +85342,7 @@ index 0000000000000000000000000000000000000000..e2f66a55dc5afe13d690c2c17827054a + i2c-mux.dtbo \ + i2c-pwm-pca9685a.dtbo \ + i2c-rtc.dtbo \ ++ i2c-rtc-gpio.dtbo \ + i2c-sensor.dtbo \ + i2c0-bcm2708.dtbo \ + i2c1-bcm2708.dtbo \ @@ -84473,7 +85359,9 @@ index 0000000000000000000000000000000000000000..e2f66a55dc5afe13d690c2c17827054a + mcp2515-can1.dtbo \ + mcp3008.dtbo \ + midi-uart0.dtbo \ ++ midi-uart1.dtbo \ + mmc.dtbo \ ++ mpu6050.dtbo \ + mz61581.dtbo \ + pi3-act-led.dtbo \ + pi3-disable-bt.dtbo \ @@ -84491,6 +85379,7 @@ index 0000000000000000000000000000000000000000..e2f66a55dc5afe13d690c2c17827054a + pwm-2chan.dtbo \ + qca7000.dtbo \ + raspidac3.dtbo \ ++ rotary-encoder.dtbo \ + rpi-backlight.dtbo \ + rpi-cirrus-wm5102.dtbo \ + rpi-dac.dtbo \ @@ -84535,10 +85424,10 @@ index 0000000000000000000000000000000000000000..e2f66a55dc5afe13d690c2c17827054a +clean-files := *.dtbo diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README new file mode 100644 -index 0000000000000000000000000000000000000000..e2a803e5180cf78d67b6723cfd2f6d3b2b54e53b +index 0000000000000000000000000000000000000000..e6d777a601c91d192bc5713f9a73e1a2d4d708ef --- /dev/null +++ b/arch/arm/boot/dts/overlays/README -@@ -0,0 +1,1517 @@ +@@ -0,0 +1,1620 @@ +Introduction +============ + @@ -84828,6 +85717,12 @@ index 0000000000000000000000000000000000000000..e2a803e5180cf78d67b6723cfd2f6d3b + slave" + + ++Name: allo-digione ++Info: Configures the Allo Digione audio card ++Load: dtoverlay=allo-digione ++Params: ++ ++ +Name: allo-piano-dac-pcm512x-audio +Info: Configures the Allo Piano DAC (2.0/2.1) audio cards. + (NB. This initial support is for 2.0 channel audio ONLY! ie. stereo. @@ -85000,6 +85895,14 @@ index 0000000000000000000000000000000000000000..e2a803e5180cf78d67b6723cfd2f6d3b +Params: + + ++Name: goodix ++Info: Enables I2C connected Goodix gt9271 multiple touch controller using ++ GPIOs 4 and 17 (pins 7 and 11 on GPIO header) for interrupt and reset. ++Load: dtoverlay=goodix,= ++Params: interrupt GPIO used for interrupt (default 4) ++ reset GPIO used for reset (default 17) ++ ++ +Name: googlevoicehat-soundcard +Info: Configures the Google voiceHAT soundcard +Load: dtoverlay=googlevoicehat-soundcard @@ -85035,6 +85938,38 @@ index 0000000000000000000000000000000000000000..e2a803e5180cf78d67b6723cfd2f6d3b + will also cause the pin to go low. + + ++Name: gpio-shutdown ++Info: Initiates a shutdown when GPIO pin changes. The given GPIO pin ++ is configured as an input key that generates KEY_POWER events. ++ This event is handled by systemd-logind by initiating a ++ shutdown. Systemd versions older than 225 need an udev rule ++ enable listening to the input device: ++ ++ ACTION!="REMOVE", SUBSYSTEM=="input", KERNEL=="event*", \ ++ SUBSYSTEMS=="platform", DRIVERS=="gpio-keys", \ ++ ATTRS{keys}=="116", TAG+="power-switch" ++ ++ This overlay only handles shutdown. After shutdown, the system ++ can be powered up again by driving GPIO3 low. The default ++ configuration uses GPIO3 with a pullup, so if you connect a ++ button between GPIO3 and GND (pin 5 and 6 on the 40-pin header), ++ you get a shutdown and power-up button. ++Load: dtoverlay=gpio-shutdown,= ++Params: gpio_pin GPIO pin to trigger on (default 3) ++ ++ active_low When this is 1 (active low), a falling ++ edge generates a key down event and a ++ rising edge generates a key up event. ++ When this is 0 (active high), this is ++ reversed. The default is 1 (active low). ++ ++ gpio_pull Desired pull-up/down state (off, down, up) ++ Default is "up". ++ ++ Note that the default pin (GPIO3) has an ++ external pullup. ++ ++ +Name: hifiberry-amp +Info: Configures the HifiBerry Amp and Amp+ audio cards +Load: dtoverlay=hifiberry-amp @@ -85189,22 +86124,77 @@ index 0000000000000000000000000000000000000000..e2a803e5180cf78d67b6723cfd2f6d3b + source + + ++Name: i2c-rtc-gpio ++Info: Adds support for a number of I2C Real Time Clock devices ++ using the software i2c controller ++Load: dtoverlay=i2c-rtc-gpio,= ++Params: abx80x Select one of the ABx80x family: ++ AB0801, AB0803, AB0804, AB0805, ++ AB1801, AB1803, AB1804, AB1805 ++ ++ ds1307 Select the DS1307 device ++ ++ ds1339 Select the DS1339 device ++ ++ ds3231 Select the DS3231 device ++ ++ mcp7940x Select the MCP7940x device ++ ++ mcp7941x Select the MCP7941x device ++ ++ pcf2127 Select the PCF2127 device ++ ++ pcf8523 Select the PCF8523 device ++ ++ pcf8563 Select the PCF8563 device ++ ++ trickle-diode-type Diode type for trickle charge - "standard" or ++ "schottky" (ABx80x only) ++ ++ trickle-resistor-ohms Resistor value for trickle charge (DS1339, ++ ABx80x) ++ ++ wakeup-source Specify that the RTC can be used as a wakeup ++ source ++ ++ i2c_gpio_sda GPIO used for I2C data (default "23") ++ ++ i2c_gpio_scl GPIO used for I2C clock (default "24") ++ ++ i2c_gpio_delay_us Clock delay in microseconds ++ (default "2" = ~100kHz) ++ ++ +Name: i2c-sensor +Info: Adds support for a number of I2C barometric pressure and temperature + sensors on i2c_arm +Load: dtoverlay=i2c-sensor,= -+Params: bmp085 Select the Bosch sensortronic BMP085 ++Params: addr Set the address for the BME280, BMP280, TMP102 ++ or LM75 + -+ bmp280 Select the Bosch sensortronic BMP280 ++ bme280 Select the Bosch Sensortronic BME280 ++ Valid addresses 0x76-0x77, default 0x76 ++ ++ bmp085 Select the Bosch Sensortronic BMP085 ++ ++ bmp180 Select the Bosch Sensortronic BMP180 ++ ++ bmp280 Select the Bosch Sensortronic BMP280 ++ Valid addresses 0x76-0x77, default 0x76 ++ ++ htu21 Select the HTU21 temperature and humidity sensor + + lm75 Select the Maxim LM75 temperature sensor ++ Valid addresses 0x48-0x4f, default 0x4f + -+ lm75addr Choose the address for the LM75 (0x48-0x4f - -+ default 0x4f) ++ lm75addr Deprecated - use addr parameter instead + + si7020 Select the Silicon Labs Si7013/20/21 humidity/ + temperature sensor + ++ tmp102 Select the Texas Instruments TMP102 temp sensor ++ Valid addresses 0x48-0x4b, default 0x48 ++ + +Name: i2c0-bcm2708 +Info: Enable the i2c_bcm2708 driver for the i2c0 bus. Not all pin combinations @@ -85405,6 +86395,13 @@ index 0000000000000000000000000000000000000000..e2a803e5180cf78d67b6723cfd2f6d3b +Params: + + ++Name: midi-uart1 ++Info: Configures UART1 (ttyS0) so that a requested 38.4kbaud actually gets ++ 31.25kbaud, the frequency required for MIDI ++Load: dtoverlay=midi-uart1 ++Params: ++ ++ +Name: mmc +Info: Selects the bcm2835-mmc SD/MMC driver, optionally with overclock +Load: dtoverlay=mmc,= @@ -85412,6 +86409,12 @@ index 0000000000000000000000000000000000000000..e2a803e5180cf78d67b6723cfd2f6d3b + requests 50MHz + + ++Name: mpu6050 ++Info: Overlay for i2c connected mpu6050 imu ++Load: dtoverlay=mpu6050,= ++Params: interrupt GPIO pin for interrupt (default 4) ++ ++ +Name: mz61581 +Info: MZ61581 display by Tontec +Load: dtoverlay=mz61581,= @@ -85636,6 +86639,15 @@ index 0000000000000000000000000000000000000000..e2a803e5180cf78d67b6723cfd2f6d3b +Params: + + ++Name: rotary-encoder ++Info: Overlay for GPIO connected rotary encoder. ++Load: dtoverlay=rotary-encoder,= ++Params: rotary0_pin_a GPIO connected to rotary encoder channel A ++ (default 4). ++ rotary0_pin_b GPIO connected to rotary encoder channel B ++ (default 17). ++ ++ +Name: rpi-backlight +Info: Raspberry Pi official display backlight driver +Load: dtoverlay=rpi-backlight @@ -85737,19 +86749,9 @@ index 0000000000000000000000000000000000000000..e2a803e5180cf78d67b6723cfd2f6d3b +Info: Selects the bcm2835-sdhost SD/MMC driver, optionally with overclock, + and enables SDIO via GPIOs 22-27. +Load: dtoverlay=sdio,= -+Params: overclock_50 SD Clock (in MHz) to use when the MMC framework -+ requests 50MHz -+ -+ sdio_overclock SDIO Clock (in MHz) to use when the MMC ++Params: sdio_overclock SDIO Clock (in MHz) to use when the MMC + framework requests 50MHz + -+ force_pio Disable DMA support (default off) -+ -+ pio_limit Number of blocks above which to use DMA -+ (default 1) -+ -+ debug Enable debug output (default off) -+ + poll_once Disable SDIO-device polling every second + (default on: polling once at boot-time) + @@ -85760,19 +86762,9 @@ index 0000000000000000000000000000000000000000..e2a803e5180cf78d67b6723cfd2f6d3b +Info: Selects the bcm2835-sdhost SD/MMC driver, optionally with overclock, + and enables 1-bit SDIO via GPIOs 22-25. +Load: dtoverlay=sdio-1bit,= -+Params: overclock_50 SD Clock (in MHz) to use when the MMC framework -+ requests 50MHz -+ -+ sdio_overclock SDIO Clock (in MHz) to use when the MMC ++Params: sdio_overclock SDIO Clock (in MHz) to use when the MMC + framework requests 50MHz + -+ force_pio Disable DMA support (default off) -+ -+ pio_limit Number of blocks above which to use DMA -+ (default 1) -+ -+ debug Enable debug output (default off) -+ + poll_once Disable SDIO-device polling every second + (default on: polling once at boot-time) + @@ -86588,6 +87580,56 @@ index 0000000000000000000000000000000000000000..ac1cfe093d9aa8a77ef25cc62a9d8100 + slave = <&boss_dac>,"allo,slave?"; + }; +}; +diff --git a/arch/arm/boot/dts/overlays/allo-digione-overlay.dts b/arch/arm/boot/dts/overlays/allo-digione-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..101277a11a24e9b3eb441c44c3f19c61836fe77c +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/allo-digione-overlay.dts +@@ -0,0 +1,44 @@ ++// Definitions for Allo DigiOne ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&i2s>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ wm8804@3b { ++ #sound-dai-cells = <0>; ++ compatible = "wlf,wm8804"; ++ reg = <0x3b>; ++ PVDD-supply = <&vdd_3v3_reg>; ++ DVDD-supply = <&vdd_3v3_reg>; ++ status = "okay"; ++ wlf,reset-gpio = <&gpio 17 0>; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "allo,allo-digione"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ clock44-gpio = <&gpio 5 0>; ++ clock48-gpio = <&gpio 6 0>; ++ }; ++ }; ++}; diff --git a/arch/arm/boot/dts/overlays/allo-piano-dac-pcm512x-audio-overlay.dts b/arch/arm/boot/dts/overlays/allo-piano-dac-pcm512x-audio-overlay.dts new file mode 100644 index 0000000000000000000000000000000000000000..a5468d850a911cd509365cf25f8ffa6ad071b90a @@ -87399,6 +88441,58 @@ index 0000000000000000000000000000000000000000..81a07ed5a8c7594e65f0df2176418cac + }; + }; +}; +diff --git a/arch/arm/boot/dts/overlays/goodix-overlay.dts b/arch/arm/boot/dts/overlays/goodix-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..084f74042ed6379ebd9281374d5391a7e23a431e +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/goodix-overlay.dts +@@ -0,0 +1,46 @@ ++// Device tree overlay for I2C connected Goodix gt9271 multiple touch controller ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&gpio>; ++ __overlay__ { ++ goodix_pins: goodix_pins { ++ brcm,pins = <4 17>; // interrupt and reset ++ brcm,function = <0 0>; // in ++ brcm,pull = <2 2>; // pull-up ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ gt9271: gt9271@14 { ++ compatible = "goodix,gt9271"; ++ reg = <0x14>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&goodix_pins>; ++ interrupt-parent = <&gpio>; ++ interrupts = <4 2>; // high-to-low edge triggered ++ irq-gpios = <&gpio 4 0>; // Pin7 on GPIO header ++ reset-gpios = <&gpio 17 0>; // Pin11 on GPIO header ++ }; ++ }; ++ }; ++ ++ __overrides__ { ++ interrupt = <&goodix_pins>,"brcm,pins:0", ++ <>9271>,"interrupts:0", ++ <>9271>,"irq-gpios:4"; ++ reset = <&goodix_pins>,"brcm,pins:4", ++ <>9271>,"reset-gpios:4"; ++ }; ++}; diff --git a/arch/arm/boot/dts/overlays/googlevoicehat-soundcard-overlay.dts b/arch/arm/boot/dts/overlays/googlevoicehat-soundcard-overlay.dts new file mode 100644 index 0000000000000000000000000000000000000000..9a9e9a0ca28cf774a868b2882ae57b00de1cf7b7 @@ -87544,6 +88638,92 @@ index 0000000000000000000000000000000000000000..ff8cb36d94d4940d5151ace24afc4ad1 + active_low = <&power_ctrl>,"gpios:8"; + }; +}; +diff --git a/arch/arm/boot/dts/overlays/gpio-shutdown-overlay.dts b/arch/arm/boot/dts/overlays/gpio-shutdown-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..863fb395c8539734b658682b900e1fbd96c9443e +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/gpio-shutdown-overlay.dts +@@ -0,0 +1,80 @@ ++// Definitions for gpio-poweroff module ++/dts-v1/; ++/plugin/; ++ ++// This overlay sets up an input device that generates KEY_POWER events ++// when a given GPIO pin changes. It defaults to using GPIO3, which can ++// also be used to wake up (start) the Rpi again after shutdown. Since ++// wakeup is active-low, this defaults to active-low with a pullup ++// enabled, but all of this can be changed using overlay parameters (but ++// note that GPIO3 has an external pullup on at least some boards). ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ // Configure the gpio pin controller ++ target = <&gpio>; ++ __overlay__ { ++ // Define a pinctrl state, that sets up the gpio ++ // as an input with a pullup enabled. This does ++ // not take effect by itself, only when referenced ++ // by a "pinctrl client", as is done below. See: ++ // https://www.kernel.org/doc/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt ++ // https://www.kernel.org/doc/Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt ++ pin_state: shutdown_button_pins { ++ brcm,pins = <3>; // gpio number ++ brcm,function = <0>; // 0 = input, 1 = output ++ brcm,pull = <2>; // 0 = none, 1 = pull down, 2 = pull up ++ }; ++ }; ++ }; ++ fragment@1 { ++ // Add a new device to the /soc devicetree node ++ target-path = "/soc"; ++ __overlay__ { ++ shutdown_button { ++ // Let the gpio-keys driver handle this device. See: ++ // https://www.kernel.org/doc/Documentation/devicetree/bindings/input/gpio-keys.txt ++ compatible = "gpio-keys"; ++ ++ // Declare a single pinctrl state (referencing the one declared above) and name it ++ // default, so it is activated automatically. ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pin_state>; ++ ++ // Enable this device ++ status = "okay"; ++ ++ // Define a single key, called "shutdown" that monitors the gpio and sends KEY_POWER ++ // (keycode 116, see ++ // https://github.com/torvalds/linux/blob/v4.12/include/uapi/linux/input-event-codes.h#L190) ++ button: shutdown { ++ label = "shutdown"; ++ linux,code = <116>; // KEY_POWER ++ gpios = <&gpio 3 1>; ++ }; ++ }; ++ }; ++ }; ++ ++ // This defines parameters that can be specified when loading ++ // the overlay. Each foo = line specifies one parameter, named ++ // foo. The rest of the specification gives properties where the ++ // parameter value is inserted into (changing the values above ++ // or adding new ones). ++ __overrides__ { ++ // Allow overriding the GPIO number. ++ gpio_pin = <&button>,"gpios:4", ++ <&pin_state>,"brcm,pins:0"; ++ ++ // Allow changing the internal pullup/down state. 0 = none, 1 = pulldown, 2 = pullup ++ // Note that GPIO3 and GPIO2 are the I2c pins and have an external pullup (at least ++ // on some boards). ++ gpio_pull = <&pin_state>,"brcm,pull:0"; ++ ++ // Allow setting the active_low flag. 0 = active high, 1 = active low ++ active_low = <&button>,"gpios:8"; ++ }; ++ ++}; diff --git a/arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts new file mode 100644 index 0000000000000000000000000000000000000000..5f5785534fd3d9a97309796f842c8881e2d6979a @@ -88288,13 +89468,14 @@ index 0000000000000000000000000000000000000000..d1ffd2326669e46ad68939f94713cc99 + addr = <&pca>,"reg:0"; + }; +}; -diff --git a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts +diff --git a/arch/arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts b/arch/arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts new file mode 100644 -index 0000000000000000000000000000000000000000..1efcf0b712c9c5c19210545002ac1f0931db58f5 +index 0000000000000000000000000000000000000000..8415e6081428fba9a47682964174fc023cfd2b0c --- /dev/null -+++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts -@@ -0,0 +1,83 @@ ++++ b/arch/arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts +@@ -0,0 +1,183 @@ +// Definitions for several I2C based Real Time Clocks ++// Available through i2c-gpio +/dts-v1/; +/plugin/; + @@ -88302,8 +89483,23 @@ index 0000000000000000000000000000000000000000..1efcf0b712c9c5c19210545002ac1f09 + compatible = "brcm,bcm2708"; + + fragment@0 { -+ target = <&i2c_arm>; ++ target-path = "/"; + __overlay__ { ++ i2c_gpio: i2c-gpio-rtc@0 { ++ compatible = "i2c-gpio"; ++ gpios = <&gpio 23 0 /* sda */ ++ &gpio 24 0 /* scl */ ++ >; ++ i2c-gpio,delay-us = <2>; /* ~100 kHz */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c_gpio>; ++ __dormant__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; @@ -88313,61 +89509,315 @@ index 0000000000000000000000000000000000000000..1efcf0b712c9c5c19210545002ac1f09 + reg = <0x69>; + abracon,tc-diode = "standard"; + abracon,tc-resistor = <0>; -+ status = "disable"; ++ status = "okay"; + }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c_gpio>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ + ds1307: ds1307@68 { + compatible = "maxim,ds1307"; + reg = <0x68>; -+ status = "disable"; ++ status = "okay"; + }; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&i2c_gpio>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ + ds1339: ds1339@68 { + compatible = "dallas,ds1339"; + trickle-resistor-ohms = <0>; + reg = <0x68>; -+ status = "disable"; -+ }; -+ mcp7940x: mcp7940x@6f { -+ compatible = "microchip,mcp7940x"; -+ reg = <0x6f>; -+ status = "disable"; -+ }; -+ mcp7941x: mcp7941x@6f { -+ compatible = "microchip,mcp7941x"; -+ reg = <0x6f>; -+ status = "disable"; -+ }; -+ ds3231: ds3231@68 { -+ compatible = "maxim,ds3231"; -+ reg = <0x68>; -+ status = "disable"; -+ }; -+ pcf2127: pcf2127@51 { -+ compatible = "nxp,pcf2127"; -+ reg = <0x51>; -+ status = "disable"; -+ }; -+ pcf8523: pcf8523@68 { -+ compatible = "nxp,pcf8523"; -+ reg = <0x68>; -+ status = "disable"; -+ }; -+ pcf8563: pcf8563@51 { -+ compatible = "nxp,pcf8563"; -+ reg = <0x51>; -+ status = "disable"; ++ status = "okay"; + }; + }; + }; ++ ++ fragment@4 { ++ target = <&i2c_gpio>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ ds3231: ds3231@68 { ++ compatible = "maxim,ds3231"; ++ reg = <0x68>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@5 { ++ target = <&i2c_gpio>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ mcp7940x: mcp7940x@6f { ++ compatible = "microchip,mcp7940x"; ++ reg = <0x6f>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@6 { ++ target = <&i2c_gpio>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ mcp7941x: mcp7941x@6f { ++ compatible = "microchip,mcp7941x"; ++ reg = <0x6f>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@7 { ++ target = <&i2c_gpio>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pcf2127: pcf2127@51 { ++ compatible = "nxp,pcf2127"; ++ reg = <0x51>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@8 { ++ target = <&i2c_gpio>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pcf8523: pcf8523@68 { ++ compatible = "nxp,pcf8523"; ++ reg = <0x68>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@9 { ++ target = <&i2c_gpio>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pcf8563: pcf8563@51 { ++ compatible = "nxp,pcf8563"; ++ reg = <0x51>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ + __overrides__ { -+ abx80x = <&abx80x>,"status"; -+ ds1307 = <&ds1307>,"status"; -+ ds1339 = <&ds1339>,"status"; -+ ds3231 = <&ds3231>,"status"; -+ mcp7940x = <&mcp7940x>,"status"; -+ mcp7941x = <&mcp7941x>,"status"; -+ pcf2127 = <&pcf2127>,"status"; -+ pcf8523 = <&pcf8523>,"status"; -+ pcf8563 = <&pcf8563>,"status"; ++ abx80x = <0>,"+1"; ++ ds1307 = <0>,"+2"; ++ ds1339 = <0>,"+3"; ++ ds3231 = <0>,"+4"; ++ mcp7940x = <0>,"+5"; ++ mcp7941x = <0>,"+6"; ++ pcf2127 = <0>,"+7"; ++ pcf8523 = <0>,"+8"; ++ pcf8563 = <0>,"+9"; ++ trickle-diode-type = <&abx80x>,"abracon,tc-diode"; ++ trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0", ++ <&abx80x>,"abracon,tc-resistor"; ++ wakeup-source = <&ds1339>,"wakeup-source?", ++ <&ds3231>,"wakeup-source?", ++ <&mcp7940x>,"wakeup-source?", ++ <&mcp7941x>,"wakeup-source?"; ++ i2c_gpio_sda = <&i2c_gpio>,"gpios:4"; ++ i2c_gpio_scl = <&i2c_gpio>,"gpios:16"; ++ i2c_gpio_delay_us = <&i2c_gpio>,"i2c-gpio,delay-us:0"; ++ }; ++}; +diff --git a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..6140f172a86b8731782f938f76cb5dac9f28b662 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts +@@ -0,0 +1,164 @@ ++// Definitions for several I2C based Real Time Clocks ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ abx80x: abx80x@69 { ++ compatible = "abracon,abx80x"; ++ reg = <0x69>; ++ abracon,tc-diode = "standard"; ++ abracon,tc-resistor = <0>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ ds1307: ds1307@68 { ++ compatible = "maxim,ds1307"; ++ reg = <0x68>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ ds1339: ds1339@68 { ++ compatible = "dallas,ds1339"; ++ trickle-resistor-ohms = <0>; ++ reg = <0x68>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ ds3231: ds3231@68 { ++ compatible = "maxim,ds3231"; ++ reg = <0x68>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@4 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ mcp7940x: mcp7940x@6f { ++ compatible = "microchip,mcp7940x"; ++ reg = <0x6f>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@5 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ mcp7941x: mcp7941x@6f { ++ compatible = "microchip,mcp7941x"; ++ reg = <0x6f>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@6 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pcf2127: pcf2127@51 { ++ compatible = "nxp,pcf2127"; ++ reg = <0x51>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@7 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pcf8523: pcf8523@68 { ++ compatible = "nxp,pcf8523"; ++ reg = <0x68>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@8 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pcf8563: pcf8563@51 { ++ compatible = "nxp,pcf8563"; ++ reg = <0x51>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ __overrides__ { ++ abx80x = <0>,"+0"; ++ ds1307 = <0>,"+1"; ++ ds1339 = <0>,"+2"; ++ ds3231 = <0>,"+3"; ++ mcp7940x = <0>,"+4"; ++ mcp7941x = <0>,"+5"; ++ pcf2127 = <0>,"+6"; ++ pcf8523 = <0>,"+7"; ++ pcf8563 = <0>,"+8"; + trickle-diode-type = <&abx80x>,"abracon,tc-diode"; + trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0", + <&abx80x>,"abracon,tc-resistor"; @@ -88379,11 +89829,11 @@ index 0000000000000000000000000000000000000000..1efcf0b712c9c5c19210545002ac1f09 +}; diff --git a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts new file mode 100644 -index 0000000000000000000000000000000000000000..606b2d5012abf2e85712be631c42ea40a0b512c5 +index 0000000000000000000000000000000000000000..17c27e3b666a7a83619471b50c63bb93836653c5 --- /dev/null +++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts -@@ -0,0 +1,49 @@ -+// Definitions for I2C based sensors using the Industrial IO interface. +@@ -0,0 +1,142 @@ ++// Definitions for I2C based sensors using the Industrial IO or HWMON interface. +/dts-v1/; +/plugin/; + @@ -88392,7 +89842,22 @@ index 0000000000000000000000000000000000000000..606b2d5012abf2e85712be631c42ea40 + + fragment@0 { + target = <&i2c_arm>; -+ __overlay__ { ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ bme280: bme280@76 { ++ compatible = "bosch,bme280"; ++ reg = <0x76>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c_arm>; ++ __dormant__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; @@ -88401,35 +89866,113 @@ index 0000000000000000000000000000000000000000..606b2d5012abf2e85712be631c42ea40 + compatible = "bosch,bmp085"; + reg = <0x77>; + default-oversampling = <3>; -+ status = "disable"; ++ status = "okay"; + }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ bmp180: bmp180@77 { ++ compatible = "bosch,bmp180"; ++ reg = <0x77>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; + + bmp280: bmp280@76 { + compatible = "bosch,bmp280"; + reg = <0x76>; -+ status = "disable"; ++ status = "okay"; + }; ++ }; ++ }; ++ ++ fragment@4 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ htu21: htu21@40 { ++ compatible = "htu21"; ++ reg = <0x40>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@5 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; + + lm75: lm75@4f { + compatible = "lm75"; + reg = <0x4f>; -+ status = "disable"; ++ status = "okay"; + }; ++ }; ++ }; ++ ++ fragment@6 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; + + si7020: si7020@40 { + compatible = "si7020"; + reg = <0x40>; -+ status = "disable"; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@7 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ tmp102: tmp102@48 { ++ compatible = "ti,tmp102"; ++ reg = <0x48>; ++ status = "okay"; + }; + }; + }; + + __overrides__ { -+ bmp085 = <&bmp085>,"status"; -+ bmp280 = <&bmp280>,"status"; -+ lm75 = <&lm75>,"status"; ++ addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0", ++ <&lm75>,"reg:0"; ++ bme280 = <0>,"+0"; ++ bmp085 = <0>,"+1"; ++ bmp180 = <0>,"+2"; ++ bmp280 = <0>,"+3"; ++ htu21 = <0>,"+4"; ++ lm75 = <0>,"+5"; + lm75addr = <&lm75>,"reg:0"; -+ si7020 = <&si7020>,"status"; ++ si7020 = <0>,"+6"; ++ tmp102 = <0>,"+7"; + }; +}; diff --git a/arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts b/arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts @@ -88501,10 +90044,10 @@ index 0000000000000000000000000000000000000000..1f4fc7b570604a50ff6d3f6d676c3c46 +}; diff --git a/arch/arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts b/arch/arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts new file mode 100644 -index 0000000000000000000000000000000000000000..e303b9c61c82a28eab7b48f6b085661574d5a849 +index 0000000000000000000000000000000000000000..7c69047bcd88a5c900dddd08e60ad0750b96d785 --- /dev/null +++ b/arch/arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts -@@ -0,0 +1,37 @@ +@@ -0,0 +1,34 @@ +/* + * Device tree overlay for i2c_bcm2708, i2c1 bus + * @@ -88527,19 +90070,16 @@ index 0000000000000000000000000000000000000000..e303b9c61c82a28eab7b48f6b0856615 + }; + + fragment@1 { -+ target = <&gpio>; -+ __overlay__ { -+ i2c1_pins: i2c1 { -+ brcm,pins = <2 3>; -+ brcm,function = <4>; /* alt0 */ -+ }; ++ target = <&i2c1_pins>; ++ pins: __overlay__ { ++ brcm,pins = <2 3>; ++ brcm,function = <4>; /* alt 0 */ + }; + }; -+ + __overrides__ { -+ sda1_pin = <&i2c1_pins>,"brcm,pins:0"; -+ scl1_pin = <&i2c1_pins>,"brcm,pins:4"; -+ pin_func = <&i2c1_pins>,"brcm,function:0"; ++ sda1_pin = <&pins>,"brcm,pins:0"; ++ scl1_pin = <&pins>,"brcm,pins:4"; ++ pin_func = <&pins>,"brcm,function:0"; + }; +}; diff --git a/arch/arm/boot/dts/overlays/i2s-gpio28-31-overlay.dts b/arch/arm/boot/dts/overlays/i2s-gpio28-31-overlay.dts @@ -90097,6 +91637,55 @@ index 0000000000000000000000000000000000000000..565af7cf79d761877be3bd06191f31aa + }; + }; +}; +diff --git a/arch/arm/boot/dts/overlays/midi-uart1-overlay.dts b/arch/arm/boot/dts/overlays/midi-uart1-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..e0bc410acbff3a7a175dd5d53b3ab0d0802e8239 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/midi-uart1-overlay.dts +@@ -0,0 +1,43 @@ ++/dts-v1/; ++/plugin/; ++ ++#include ++ ++/* ++ * Fake a higher clock rate to get a larger divisor, and thereby a lower ++ * baudrate. The real clock is 48MHz, which we scale so that requesting ++ * 38.4kHz results in an actual 31.25kHz. ++ * ++ * 48000000*38400/31250 = 58982400 ++ */ ++ ++/{ ++ compatible = "brcm,bcm2835"; ++ ++ fragment@0 { ++ target-path = "/clocks"; ++ __overlay__ { ++ midi_clk: clock@5 { ++ compatible = "fixed-factor-clock"; ++ #clock-cells = <0>; ++ clocks = <&aux BCM2835_AUX_CLOCK_UART>; ++ clock-mult = <38400>; ++ clock-div = <31250>; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&uart1>; ++ __overlay__ { ++ clocks = <&midi_clk>; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&aux>; ++ __overlay__ { ++ clock-output-names = "aux_uart", "aux_spi1", "aux_spi2"; ++ }; ++ }; ++}; diff --git a/arch/arm/boot/dts/overlays/mmc-overlay.dts b/arch/arm/boot/dts/overlays/mmc-overlay.dts new file mode 100644 index 0000000000000000000000000000000000000000..88251ad653917674f80c2975de2e425fca00b71f @@ -90142,6 +91731,40 @@ index 0000000000000000000000000000000000000000..88251ad653917674f80c2975de2e425f + overclock_50 = <&frag0>,"brcm,overclock-50:0"; + }; +}; +diff --git a/arch/arm/boot/dts/overlays/mpu6050-overlay.dts b/arch/arm/boot/dts/overlays/mpu6050-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..06037969c3abba270b3cad45875342f3c730506e +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/mpu6050-overlay.dts +@@ -0,0 +1,28 @@ ++// Definitions for MPU6050 ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ clock-frequency = <400000>; ++ ++ mpu6050: mpu6050@68 { ++ compatible = "invensense,mpu6050"; ++ reg = <0x68>; ++ interrupt-parent = <&gpio>; ++ interrupts = <4 1>; ++ }; ++ }; ++ }; ++ ++ __overrides__ { ++ interrupt = <&mpu6050>,"interrupts:0"; ++ }; ++}; diff --git a/arch/arm/boot/dts/overlays/mz61581-overlay.dts b/arch/arm/boot/dts/overlays/mz61581-overlay.dts new file mode 100644 index 0000000000000000000000000000000000000000..2c29aaed44c5959d7f0df2a3baf2af052b24b6b4 @@ -91467,6 +93090,55 @@ index 0000000000000000000000000000000000000000..2c3c97813f22c94eff6da2193aff0920 + }; + }; +}; +diff --git a/arch/arm/boot/dts/overlays/rotary-encoder-overlay.dts b/arch/arm/boot/dts/overlays/rotary-encoder-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..c0c6bccff60cc15d9a9bf59d2c7cba41eb9c1cdc +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/rotary-encoder-overlay.dts +@@ -0,0 +1,43 @@ ++// Device tree overlay for GPIO connected rotary encoder. ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&gpio>; ++ __overlay__ { ++ rotary0_pins: rotary0_pins { ++ brcm,pins = <4 17>; /* gpio 4 17 */ ++ brcm,function = <0 0>; /* input */ ++ brcm,pull = <2 2>; /* pull-up */ ++ }; ++ ++ }; ++ }; ++ ++ fragment@1 { ++ target-path = "/"; ++ __overlay__ { ++ rotary0: rotary@0 { ++ compatible = "rotary-encoder"; ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&rotary0_pins>; ++ gpios = <&gpio 4 0>, <&gpio 17 0>; ++ linux,axis = <0>; /* REL_X */ ++ rotary-encoder,encoding = "gray"; ++ rotary-encoder,relative-axis; ++ }; ++ }; ++ ++ }; ++ ++ __overrides__ { ++ rotary0_pin_a = <&rotary0>,"gpios:4", ++ <&rotary0_pins>,"brcm,pins:0"; ++ rotary0_pin_b = <&rotary0>,"gpios:16", ++ <&rotary0_pins>,"brcm,pins:4"; ++ }; ++}; diff --git a/arch/arm/boot/dts/overlays/rpi-backlight-overlay.dts b/arch/arm/boot/dts/overlays/rpi-backlight-overlay.dts new file mode 100644 index 0000000000000000000000000000000000000000..c021d02bb75ff5ceb5c5066d00e4bca942554032 @@ -93267,7 +94939,7 @@ index 0000000000000000000000000000000000000000..fa73e1feaeb1bf53a6755e81a998e71c +}; diff --git a/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts b/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts new file mode 100644 -index 0000000000000000000000000000000000000000..95a595a35cb4fbb707bf4b18161f6a46860aa4ae +index 0000000000000000000000000000000000000000..36fbf6c8c2e612a6dc5aa02d77cc8173098c16ca --- /dev/null +++ b/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts @@ -0,0 +1,89 @@ @@ -93284,35 +94956,35 @@ index 0000000000000000000000000000000000000000..95a595a35cb4fbb707bf4b18161f6a46 + fragment@0 { + target-path = "/chosen"; + __overlay__ { -+ bootargs = "cma=256M@256M"; ++ bootargs = "cma=256M"; + }; + }; + + fragment@1 { + target-path = "/chosen"; + __dormant__ { -+ bootargs = "cma=192M@256M"; ++ bootargs = "cma=192M"; + }; + }; + + fragment@2 { + target-path = "/chosen"; + __dormant__ { -+ bootargs = "cma=128M@128M"; ++ bootargs = "cma=128M"; + }; + }; + + fragment@3 { + target-path = "/chosen"; + __dormant__ { -+ bootargs = "cma=96M@128M"; ++ bootargs = "cma=96M"; + }; + }; + + fragment@4 { + target-path = "/chosen"; + __dormant__ { -+ bootargs = "cma=64M@64M"; ++ bootargs = "cma=64M"; + }; + }; + @@ -93750,10 +95422,10 @@ index 58c05e5d9870b6c18a72da7dc44ff3112994946d..9842523b225a88505d796cc689c04f40 # Bzip2 -From e4e9fdf96b298ae5f105873a2da8dc9eacf43a82 Mon Sep 17 00:00:00 2001 +From 7d2419fe14520e8c16bc9774196f876552f1b282 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Feb 2015 13:50:57 +0000 -Subject: [PATCH 053/199] BCM270x_DT: Add pwr_led, and the required "input" +Subject: [PATCH 058/129] BCM270x_DT: Add pwr_led, and the required "input" trigger The "input" trigger makes the associated GPIO an input. This is to support @@ -93928,10 +95600,10 @@ index 64c56d454f7df9f864a5242ce4212df586f66886..3fd74c8737871cb56f0355c858fc135e /* set_brightness_work / blink_timer flags, atomic, private. */ unsigned long work_flags; -From 0134f80b9e4f4886bc47c824a98d9eb60df581bd Mon Sep 17 00:00:00 2001 +From 9a26bfaab4ad8bd052a8f59dc9d8993dbb8b9fed Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 054/199] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 059/129] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -94199,10 +95871,10 @@ index fb795c3b3c178ad3cd7c9e9e4547ffd492bac181..703fa8a70574323abe2fb32599254582 __u32 dx; /* screen-relative */ __u32 dy; -From b3cd2630679656e1ebf8110ec0d8c815a1605305 Mon Sep 17 00:00:00 2001 +From 43d7209556b61a818e15c77d72de6bb7548a5761 Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 055/199] Speed up console framebuffer imageblit function +Subject: [PATCH 060/129] 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 @@ -94411,10 +96083,10 @@ index a2bb276a8b2463eee98eb237c4647bc00cd93601..436494fba15abecb400ef28688466faf start_index, pitch_index); } else -From 22578d48c455b5fec9cf2b84b8c7f0fa6c76b7dd Mon Sep 17 00:00:00 2001 +From 042d112e55c00d8ae7f286046b57d2ddd1384623 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 056/199] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 061/129] 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 @@ -94664,10 +96336,10 @@ index 90cbe7e65059f6b604a87c6bf39cd9bbeae7684c..a52be51ee0a5511a75d4eaa8dacaec5e u8, w1_slave_found_callback); }; -From 23e1f567155092f061d3d38276f0cd687b5c9e83 Mon Sep 17 00:00:00 2001 +From 2cc6a69a583cb3acc2d7a2e316fa44ff1c0686b6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 14 Jul 2014 22:02:09 +0100 -Subject: [PATCH 057/199] hid: Reduce default mouse polling interval to 60Hz +Subject: [PATCH 062/129] hid: Reduce default mouse polling interval to 60Hz Reduces overhead when using X --- @@ -94699,10 +96371,10 @@ index c008847e0b20a2accb00451b10fb1c648f67925b..4a86428a3b4e3d51e9ac6ce9c9c11097 break; case HID_GD_JOYSTICK: -From c9d870633a4f03f4cc0b38795005ef7baad96913 Mon Sep 17 00:00:00 2001 +From e150996c934660931e40cfdb468214a6644fa72e Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Tue, 12 May 2015 14:47:56 +0100 -Subject: [PATCH 058/199] rpi-ft5406: Add touchscreen driver for pi LCD display +Subject: [PATCH 063/129] rpi-ft5406: Add touchscreen driver for pi LCD display Fix driver detection failure Check that the buffer response is non-zero meaning the touchscreen was detected @@ -95060,10 +96732,10 @@ index 30fb37fe175df604a738258a2a632bca3bfff33f..4a3d79d3b48eb483a4e4bf498f617515 RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From ba7812c211cefae21ae8306d758968dc53c96ea4 Mon Sep 17 00:00:00 2001 +From c0f35fbee29bc94de57a819bb31ee7f04e819c3d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 28 Nov 2016 16:50:04 +0000 -Subject: [PATCH 059/199] Improve __copy_to_user and __copy_from_user +Subject: [PATCH 064/129] Improve __copy_to_user and __copy_from_user performance Provide a __copy_from_user that uses memcpy. On BCM2708, use @@ -96638,10 +98310,10 @@ index 17ec37811c32f09126ed42753037e055c5cec115..c08f81812d0d56a0d90c1eb6777d0622 bool "Broadcom BCM63xx DSL SoC" depends on ARCH_MULTI_V7 -From a482095b44fc466ef5413acdc5b018e239f9b86f Mon Sep 17 00:00:00 2001 +From 3ff9947d7af341718091959a025eab82abfd0d79 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 25 Jun 2015 12:16:11 +0100 -Subject: [PATCH 060/199] gpio-poweroff: Allow it to work on Raspberry Pi +Subject: [PATCH 065/129] gpio-poweroff: Allow it to work on Raspberry Pi The Raspberry Pi firmware manages the power-down and reboot process. To do this it installs a pm_power_off handler, causing @@ -96676,10 +98348,10 @@ index be3d81ff51cc3f510d85e4eed7a52960e51e7bc1..a030ae9fb1fca325061c093696e82186 "%s: pm_power_off function already registered", __func__); -From e46351a7c352589fadd3f09ef0f64d1e2890e355 Mon Sep 17 00:00:00 2001 +From d37d450d370dd100442281c2e6c3beae62f29db1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 14:32:47 +0100 -Subject: [PATCH 061/199] mfd: Add Raspberry Pi Sense HAT core driver +Subject: [PATCH 066/129] mfd: Add Raspberry Pi Sense HAT core driver --- drivers/input/joystick/Kconfig | 8 + @@ -97544,10 +99216,10 @@ index 0000000000000000000000000000000000000000..56196dc2af10e464a1e3f98b028dca1c + +#endif -From 8fe782927b4e226c4b5de92a5edcf60609abf0d3 Mon Sep 17 00:00:00 2001 +From 3f730e36e6c7f445aa3322d256cc1d20e507fb22 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 -Subject: [PATCH 062/199] ASoC: Add support for HifiBerry DAC +Subject: [PATCH 067/129] ASoC: Add support for HifiBerry DAC This adds a machine driver for the HifiBerry DAC. It is a sound card that can @@ -97722,10 +99394,10 @@ index 0000000000000000000000000000000000000000..ee9f133953544629282631e5ef3f73fe +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); -From b828e0be04229dd55be53a90a8a4cf886fbe873b Mon Sep 17 00:00:00 2001 +From 822c013b4add8faace26366e5e0b833634a76624 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 25 Jan 2016 15:48:59 +0000 -Subject: [PATCH 063/199] ASoC: Add support for Rpi-DAC +Subject: [PATCH 068/129] ASoC: Add support for Rpi-DAC --- sound/soc/bcm/Kconfig | 7 +++ @@ -97891,7 +99563,7 @@ index 0000000000000000000000000000000000000000..38224467cbab7d5be3be731e73e2cf78 +MODULE_DESCRIPTION("ASoC Driver for RPi-DAC"); +MODULE_LICENSE("GPL v2"); diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig -index 6c78b0b49b8145c24740d93c4174c059d91ddae9..d8b8cf059e8730432c692e8ce4e4fb9f1269550a 100644 +index d6450d5fc144737f967b8e00678baa9b8f92295f..bdd081016d9eca07a5c72bf238f22b85c3454013 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -108,6 +108,7 @@ config SND_SOC_ALL_CODECS @@ -98009,10 +99681,10 @@ index 0000000000000000000000000000000000000000..afe1b419582aa40c4b2729d242bb13cd +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From 26f6ab87f4d58944fca7d44e0610817bd076dd7f Mon Sep 17 00:00:00 2001 +From 5b7c196681661799820cbcae36ff74ee4f1c0f16 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 -Subject: [PATCH 064/199] ASoC: wm8804: Implement MCLK configuration options, +Subject: [PATCH 069/129] 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 @@ -98061,10 +99733,10 @@ index af95d648265b3e92e345101542b332aee35191d4..513f56ba132929662802d15cdc653af3 .component_driver = { .dapm_widgets = wm8804_dapm_widgets, -From 56646d5f24756eca58ed3440b55ed429bc7142ea Mon Sep 17 00:00:00 2001 +From eb63ac8b4513898b305350779dcd03c5359841cb Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 -Subject: [PATCH 065/199] ASoC: BCM:Add support for HiFiBerry Digi. Driver is +Subject: [PATCH 070/129] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patched WM8804 driver. Signed-off-by: Daniel Matuschek @@ -98408,10 +100080,10 @@ index 0000000000000000000000000000000000000000..7620dd02de40b6d644ff038b445d375d +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); -From b72345f423788161b0fc0756c154037ec9bd936f Mon Sep 17 00:00:00 2001 +From 9307ad8fccbfd25cf21b6528985e4826720a10bf Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 -Subject: [PATCH 066/199] Add IQaudIO Sound Card support for Raspberry Pi +Subject: [PATCH 071/129] Add IQaudIO Sound Card support for Raspberry Pi Set a limit of 0dB on Digital Volume Control @@ -98746,10 +100418,10 @@ index 0000000000000000000000000000000000000000..1ee4097c846376666775272ed692ca33 +MODULE_DESCRIPTION("ASoC Driver for IQAudio DAC"); +MODULE_LICENSE("GPL v2"); -From fb1da40f188d589a92d1dbd8f8e3651b046f8bb6 Mon Sep 17 00:00:00 2001 +From fbc0c13553e42eb4bc367d1bd16a53efb934977d Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 10:06:56 +0200 -Subject: [PATCH 067/199] Added support for HiFiBerry DAC+ +Subject: [PATCH 072/129] 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. @@ -99379,10 +101051,10 @@ index 72b19e62f6267698aea45d2410d616d91c1825cb..c6839ef6e16754ed9de2698507b8986a dev_err(dev, "No LRCLK?\n"); return -EINVAL; -From 07f31e445056ae254574bcb0aa5b137e313456ca Mon Sep 17 00:00:00 2001 +From 3c656fe05ad94ece55f0300040822d5fa289bf88 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 11:09:58 +0200 -Subject: [PATCH 068/199] Added driver for HiFiBerry Amp amplifier add-on board +Subject: [PATCH 073/129] 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. @@ -99582,7 +101254,7 @@ index 0000000000000000000000000000000000000000..221c6c38e6465ffe5d5ad77fa80a0b14 +MODULE_DESCRIPTION("ASoC driver for HiFiBerry-AMP"); +MODULE_LICENSE("GPL v2"); diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig -index d8b8cf059e8730432c692e8ce4e4fb9f1269550a..aca3a53f08dba8762307f7c25a5d7c5561b9cf71 100644 +index bdd081016d9eca07a5c72bf238f22b85c3454013..a3be6e005a895b995897cc007bb85c780a42de8b 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -150,6 +150,7 @@ config SND_SOC_ALL_CODECS @@ -100217,10 +101889,10 @@ index 0000000000000000000000000000000000000000..8f019e04898754d2f87e9630137be9e8 + +#endif /* _TAS5713_H */ -From 1af9d405621dac8d88598aa164a562fe8d6d538d Mon Sep 17 00:00:00 2001 +From 82ee4d398b7cabced98ca63a3f70f3473659ac04 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 25 Mar 2015 09:26:17 +0100 -Subject: [PATCH 069/199] Add driver for rpi-proto +Subject: [PATCH 074/129] Add driver for rpi-proto Forward port of 3.10.x driver from https://github.com/koalo We are using a custom board and would like to use rpi 3.18.x @@ -100435,10 +102107,10 @@ index 0000000000000000000000000000000000000000..fadbfade100228aaafabb0d3bdf35c01 +MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to PROTO board (WM8731)"); +MODULE_LICENSE("GPL"); -From b6103893ec46b0ff2b52844cf5d8ad6fd39fb89d Mon Sep 17 00:00:00 2001 +From e85b9da26bfa51d7dd014a04aacd8ee686d06af8 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:03:47 +0100 -Subject: [PATCH 070/199] RaspiDAC3 support +Subject: [PATCH 075/129] RaspiDAC3 support Signed-off-by: Jan Grulich @@ -100681,10 +102353,10 @@ index 0000000000000000000000000000000000000000..ad2b5b89bc8213dc2e277306ef50d6e3 +MODULE_DESCRIPTION("ASoC Driver for RaspiDAC Rev.3x"); +MODULE_LICENSE("GPL v2"); -From 2e068793a621e2a7fbfb197fb21f789fcd5b455c Mon Sep 17 00:00:00 2001 +From 38ef14cf5946a797c88a64ef8360a22cf2c4d278 Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Thu, 7 Apr 2016 21:26:21 +0100 -Subject: [PATCH 071/199] Add Support for JustBoom Audio boards +Subject: [PATCH 076/129] Add Support for JustBoom Audio boards justboom-dac: Adjust for ALSA API change @@ -101140,10 +102812,10 @@ index 0000000000000000000000000000000000000000..909cf8928f2f4313982316f9c5b8a709 +MODULE_DESCRIPTION("ASoC Driver for JustBoom PI Digi HAT Sound Card"); +MODULE_LICENSE("GPL v2"); -From b13456be95b5491610b2c3f90d51dd493e66fd07 Mon Sep 17 00:00:00 2001 +From f629bb3116976c649e97e435797ee09d39ed1e27 Mon Sep 17 00:00:00 2001 From: Andrey Grodzovsky Date: Tue, 3 May 2016 22:10:59 -0400 -Subject: [PATCH 072/199] ARM: adau1977-adc: Add basic machine driver for +Subject: [PATCH 077/129] ARM: adau1977-adc: Add basic machine driver for adau1977 codec driver. This commit adds basic support for the codec usage including: Device tree overlay, @@ -101325,10 +102997,10 @@ index 0000000000000000000000000000000000000000..f3d7e5db7bb912e1d7ca6f8e8d42df5f +MODULE_DESCRIPTION("ASoC Driver for ADAU1977 ADC"); +MODULE_LICENSE("GPL v2"); -From febd89d8cfbc208427f73be72677dab14ef0e7ff Mon Sep 17 00:00:00 2001 +From 6fbc69ecb541aeeb109dab802385e90efb71b48d Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Mon, 16 May 2016 21:36:31 +1000 -Subject: [PATCH 073/199] New AudioInjector.net Pi soundcard with low jitter +Subject: [PATCH 078/129] New AudioInjector.net Pi soundcard with low jitter audio in and out. Contains the sound/soc/bcm ALSA machine driver and necessary alterations to the Kconfig and Makefile. @@ -101381,7 +103053,7 @@ index 8c20ce506f2b0d653be39ceb9224503a0ef63c39..4d4189b6d0c57645c5ec19554f1e77d4 + diff --git a/sound/soc/bcm/audioinjector-pi-soundcard.c b/sound/soc/bcm/audioinjector-pi-soundcard.c new file mode 100644 -index 0000000000000000000000000000000000000000..ef54e0f07ea03f59e9957b5d98f3e7fdc998e469 +index 0000000000000000000000000000000000000000..491906bbf446826e55dd843f28e4860f48e908b8 --- /dev/null +++ b/sound/soc/bcm/audioinjector-pi-soundcard.c @@ -0,0 +1,193 @@ @@ -101564,7 +103236,7 @@ index 0000000000000000000000000000000000000000..ef54e0f07ea03f59e9957b5d98f3e7fd + +static struct platform_driver audioinjector_pi_soundcard_driver = { + .driver = { -+ .name = "audioinjector-audio", ++ .name = "audioinjector-stereo", + .owner = THIS_MODULE, + .of_match_table = audioinjector_pi_soundcard_of_match, + }, @@ -101579,10 +103251,10 @@ index 0000000000000000000000000000000000000000..ef54e0f07ea03f59e9957b5d98f3e7fd +MODULE_ALIAS("platform:audioinjector-pi-soundcard"); + -From c60859b3ba64eb5f9f87d96fde38ffb9a2c2060b Mon Sep 17 00:00:00 2001 +From 69c13c876fb2ba99bb854f858c16b1b03281d586 Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Thu, 30 Jun 2016 18:38:42 +0100 -Subject: [PATCH 074/199] Add IQAudIO Digi WM8804 board support +Subject: [PATCH 079/129] Add IQAudIO Digi WM8804 board support Support IQAudIO Digi board with iqaudio_digi machine driver and iqaudio-digi-wm8804-audio overlay. @@ -101882,10 +103554,10 @@ index 0000000000000000000000000000000000000000..33aa2be8a43a12a12cfb5d844dd9732c +MODULE_DESCRIPTION("ASoC Driver for IQAudIO WM8804 Digi"); +MODULE_LICENSE("GPL v2"); -From 22f846750f606e1ed49912f3630940badd4fa217 Mon Sep 17 00:00:00 2001 +From ef454cce0ff5410983c63dd34258226b8ffaf0f1 Mon Sep 17 00:00:00 2001 From: escalator2015 Date: Tue, 24 May 2016 16:20:09 +0100 -Subject: [PATCH 075/199] New driver for RRA DigiDAC1 soundcard using WM8741 + +Subject: [PATCH 080/129] New driver for RRA DigiDAC1 soundcard using WM8741 + WM8804 --- @@ -102358,10 +104030,10 @@ index 0000000000000000000000000000000000000000..f200688bb4ae32b90a0ced555aed94b0 +MODULE_DESCRIPTION("ASoC Driver for RRA DigiDAC1"); +MODULE_LICENSE("GPL v2"); -From b728e43e3e797f3a7c866e00856ce444558b800c Mon Sep 17 00:00:00 2001 +From f5eda3e4747c90c99ffe1eb29d2abb824e4753bb Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Sat, 2 Jul 2016 16:26:19 +0100 -Subject: [PATCH 076/199] Add support for Dion Audio LOCO DAC-AMP HAT +Subject: [PATCH 081/129] Add support for Dion Audio LOCO DAC-AMP HAT Using dedicated machine driver and pcm5102a codec driver. @@ -102534,10 +104206,10 @@ index 0000000000000000000000000000000000000000..65e03741d349a2dc5bd91f69855ea952 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO"); +MODULE_LICENSE("GPL v2"); -From 167e7592ee54bb4e46e60414786b49d8e1bd90f0 Mon Sep 17 00:00:00 2001 +From ebff2709bd934a94f765aff4a361cef4ae03e30e Mon Sep 17 00:00:00 2001 From: Clive Messer Date: Mon, 19 Sep 2016 14:01:04 +0100 -Subject: [PATCH 077/199] Allo Piano DAC boards: Initial 2 channel (stereo) +Subject: [PATCH 082/129] Allo Piano DAC boards: Initial 2 channel (stereo) support (#1645) Add initial 2 channel (stereo) support for Allo Piano DAC (2.0/2.1) boards, @@ -102744,10 +104416,10 @@ index 0000000000000000000000000000000000000000..eaf50fb6dbca1970ae1c6f8662088b0f +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC"); +MODULE_LICENSE("GPL v2"); -From 52bcbfab198413486560cac989946a0a50d1a411 Mon Sep 17 00:00:00 2001 +From 52875cef71e2bb50bdb71172c5eb4e3f0c7e7db7 Mon Sep 17 00:00:00 2001 From: Raashid Muhammed Date: Mon, 27 Mar 2017 12:35:00 +0530 -Subject: [PATCH 078/199] Add support for Allo Piano DAC 2.1 plus add-on board +Subject: [PATCH 083/129] Add support for Allo Piano DAC 2.1 plus add-on board for Raspberry Pi. The Piano DAC 2.1 has support for 4 channels with subwoofer. @@ -102763,11 +104435,13 @@ Also improve code style and adhere to ALSA coding conventions. Signed-off-by: Baswaraj K Reviewed-by: Vijay Kumar B. Reviewed-by: Raashid Muhammed + +PianoPlus: Dual Mono & Dual Stereo features added (#2069) --- sound/soc/bcm/Kconfig | 7 + sound/soc/bcm/Makefile | 2 + - sound/soc/bcm/allo-piano-dac-plus.c | 683 ++++++++++++++++++++++++++++++++++++ - 3 files changed, 692 insertions(+) + sound/soc/bcm/allo-piano-dac-plus.c | 805 ++++++++++++++++++++++++++++++++++++ + 3 files changed, 814 insertions(+) create mode 100644 sound/soc/bcm/allo-piano-dac-plus.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig @@ -102804,10 +104478,10 @@ index 64f007f8ba38276a42e0bd8db92544db9412544b..023b2c17098b4e64bb188a598f0b4923 +obj-$(CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS) += snd-soc-allo-piano-dac-plus.o diff --git a/sound/soc/bcm/allo-piano-dac-plus.c b/sound/soc/bcm/allo-piano-dac-plus.c new file mode 100644 -index 0000000000000000000000000000000000000000..56e43f98846b41e487b3089813f7edc3c08517eb +index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e7657358d49 --- /dev/null +++ b/sound/soc/bcm/allo-piano-dac-plus.c -@@ -0,0 +1,683 @@ +@@ -0,0 +1,805 @@ +/* + * ALSA ASoC Machine Driver for Allo Piano DAC Plus Subwoofer + * @@ -102846,6 +104520,7 @@ index 0000000000000000000000000000000000000000..56e43f98846b41e487b3089813f7edc3 + +struct glb_pool { + struct mutex lock; ++ unsigned int dual_mode; + unsigned int set_lowpass; + unsigned int set_mode; + unsigned int set_rate; @@ -102857,8 +104532,8 @@ index 0000000000000000000000000000000000000000..56e43f98846b41e487b3089813f7edc3 + +static struct gpio_desc *mute_gpio[2]; + -+ +static const char * const allo_piano_mode_texts[] = { ++ "None", + "2.0", + "2.1", + "2.2", @@ -102867,6 +104542,15 @@ index 0000000000000000000000000000000000000000..56e43f98846b41e487b3089813f7edc3 +static const SOC_ENUM_SINGLE_DECL(allo_piano_mode_enum, + 0, 0, allo_piano_mode_texts); + ++static const char * const allo_piano_dual_mode_texts[] = { ++ "None", ++ "Dual-Mono", ++ "Dual-Stereo", ++}; ++ ++static const SOC_ENUM_SINGLE_DECL(allo_piano_dual_mode_enum, ++ 0, 0, allo_piano_dual_mode_texts); ++ +static const char * const allo_piano_dsp_low_pass_texts[] = { + "60", + "70", @@ -102892,10 +104576,10 @@ index 0000000000000000000000000000000000000000..56e43f98846b41e487b3089813f7edc3 + unsigned int mode, unsigned int rate, unsigned int lowpass) +{ + const struct firmware *fw; -+ char firmware_name[60]; -+ int ret = 0, dac = 0; + struct snd_soc_card *card = rtd->card; + struct glb_pool *glb_ptr = card->drvdata; ++ char firmware_name[60]; ++ int ret = 0, dac = 0; + + if (rate <= 46000) + rate = 44100; @@ -102910,26 +104594,35 @@ index 0000000000000000000000000000000000000000..56e43f98846b41e487b3089813f7edc3 + else + rate = 192000; + -+ if ((lowpass > 14) || (lowpass < 0)) -+ lowpass = 3; -+ if ((mode > 2) || (mode < 0)) -+ mode = 0; ++ if (lowpass > 14) ++ glb_ptr->set_lowpass = lowpass = 3; ++ ++ if (mode > 3) ++ glb_ptr->set_mode = mode = 0; ++ ++ if (mode > 0) ++ glb_ptr->dual_mode = 0; + + /* same configuration loaded */ + if ((rate == glb_ptr->set_rate) && (lowpass == glb_ptr->set_lowpass) + && (mode == glb_ptr->set_mode)) + return 0; + -+ if (mode == 0) { /* 2.0 */ -+ snd_soc_write(rtd->codec_dais[1]->codec, -+ PCM512x_MUTE, 0x11); ++ switch (mode) { ++ case 0: /* None */ ++ return 1; ++ ++ case 1: /* 2.0 */ ++ snd_soc_write(rtd->codec_dais[0]->codec, PCM512x_MUTE, 0x00); ++ snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, 0x11); + glb_ptr->set_rate = rate; + glb_ptr->set_mode = mode; + glb_ptr->set_lowpass = lowpass; + return 1; -+ } else { -+ snd_soc_write(rtd->codec_dais[1]->codec, -+ PCM512x_MUTE, 0x00); ++ ++ default: ++ snd_soc_write(rtd->codec_dais[0]->codec, PCM512x_MUTE, 0x00); ++ snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, 0x00); + } + + for (dac = 0; dac < rtd->num_codecs; dac++) { @@ -102938,13 +104631,13 @@ index 0000000000000000000000000000000000000000..56e43f98846b41e487b3089813f7edc3 + int i = 1; + + if (dac == 0) { /* high */ -+ sprintf(firmware_name, ++ snprintf(firmware_name, sizeof(firmware_name), + "allo/piano/2.2/allo-piano-dsp-%d-%d-%d.bin", + rate, ((lowpass * 10) + 60), dac); + } else { /* low */ -+ sprintf(firmware_name, ++ snprintf(firmware_name, sizeof(firmware_name), + "allo/piano/2.%d/allo-piano-dsp-%d-%d-%d.bin", -+ mode, rate, ((lowpass * 10) + 60), dac); ++ (mode - 1), rate, ((lowpass * 10) + 60), dac); + } + + dev_info(codec->dev, "Dsp Firmware File Name: %s\n", @@ -103009,6 +104702,80 @@ index 0000000000000000000000000000000000000000..56e43f98846b41e487b3089813f7edc3 + return ret; +} + ++static int snd_allo_piano_dual_mode_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); ++ struct glb_pool *glb_ptr = card->drvdata; ++ ++ ucontrol->value.integer.value[0] = glb_ptr->dual_mode; ++ ++ return 0; ++} ++ ++static int snd_allo_piano_dual_mode_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); ++ struct glb_pool *glb_ptr = card->drvdata; ++ struct snd_soc_pcm_runtime *rtd; ++ struct snd_card *snd_card_ptr = card->snd_card; ++ struct snd_kcontrol *kctl; ++ struct soc_mixer_control *mc; ++ unsigned int left_val = 0; ++ ++ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); ++ ++ if (ucontrol->value.integer.value[0] > 0) { ++ glb_ptr->dual_mode = ucontrol->value.integer.value[0]; ++ glb_ptr->set_mode = 0; ++ } else if (ucontrol->value.integer.value[0] <= 0) { ++ if (glb_ptr->set_mode <= 0) { ++ glb_ptr->dual_mode = 1; ++ glb_ptr->set_mode = 0; ++ } ++ } else { ++ glb_ptr->dual_mode = 0; ++ return 0; ++ } ++ ++ if (glb_ptr->dual_mode == 1) { ++ snd_soc_write(rtd->codec_dais[0]->codec, PCM512x_MUTE, 0x01); ++ snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, 0x10); ++ snd_soc_write(rtd->codec_dais[0]->codec, ++ PCM512x_DIGITAL_VOLUME_3, 0xff); ++ ++ list_for_each_entry(kctl, &snd_card_ptr->controls, list) { ++ if (!strncmp(kctl->id.name, "Digital Playback Volume", ++ sizeof(kctl->id.name))) { ++ mc = (struct soc_mixer_control *) ++ kctl->private_value; ++ mc->rreg = mc->reg; ++ break; ++ } ++ } ++ } else { ++ left_val = snd_soc_read(rtd->codec_dais[0]->codec, ++ PCM512x_DIGITAL_VOLUME_2); ++ list_for_each_entry(kctl, &snd_card_ptr->controls, list) { ++ if (!strncmp(kctl->id.name, "Digital Playback Volume", ++ sizeof(kctl->id.name))) { ++ mc = (struct soc_mixer_control *) ++ kctl->private_value; ++ mc->rreg = PCM512x_DIGITAL_VOLUME_3; ++ break; ++ } ++ } ++ ++ snd_soc_write(rtd->codec_dais[0]->codec, ++ PCM512x_DIGITAL_VOLUME_3, left_val); ++ snd_soc_write(rtd->codec_dais[0]->codec, PCM512x_MUTE, 0x00); ++ snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, 0x00); ++ } ++ ++ return 0; ++} ++ +static int snd_allo_piano_mode_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ @@ -103025,8 +104792,30 @@ index 0000000000000000000000000000000000000000..56e43f98846b41e487b3089813f7edc3 + struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); + struct snd_soc_pcm_runtime *rtd; + struct glb_pool *glb_ptr = card->drvdata; ++ struct snd_card *snd_card_ptr = card->snd_card; ++ struct snd_kcontrol *kctl; ++ struct soc_mixer_control *mc; ++ unsigned int left_val = 0; + + rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); ++ ++ if ((glb_ptr->dual_mode == 1) && ++ (ucontrol->value.integer.value[0] > 0)) { ++ left_val = snd_soc_read(rtd->codec_dais[0]->codec, ++ PCM512x_DIGITAL_VOLUME_2); ++ list_for_each_entry(kctl, &snd_card_ptr->controls, list) { ++ if (!strncmp(kctl->id.name, "Digital Playback Volume", ++ sizeof(kctl->id.name))) { ++ mc = (struct soc_mixer_control *) ++ kctl->private_value; ++ mc->rreg = PCM512x_DIGITAL_VOLUME_3; ++ break; ++ } ++ } ++ snd_soc_write(rtd->codec_dais[0]->codec, ++ PCM512x_DIGITAL_VOLUME_3, left_val); ++ } ++ + return(snd_allo_piano_dsp_program(rtd, + ucontrol->value.integer.value[0], + glb_ptr->set_rate, glb_ptr->set_lowpass)); @@ -103154,6 +104943,11 @@ index 0000000000000000000000000000000000000000..56e43f98846b41e487b3089813f7edc3 + snd_allo_piano_mode_get, + snd_allo_piano_mode_put), + ++ SOC_ENUM_EXT("Dual Mode Route", ++ allo_piano_dual_mode_enum, ++ snd_allo_piano_dual_mode_get, ++ snd_allo_piano_dual_mode_put), ++ + SOC_ENUM_EXT("Lowpass Route", allo_piano_enum, + snd_allo_piano_lowpass_get, + snd_allo_piano_lowpass_put), @@ -103282,7 +105076,7 @@ index 0000000000000000000000000000000000000000..56e43f98846b41e487b3089813f7edc3 + PCM512x_RATE_DET_4); + if (val < 0) { + dev_err(rtd->codec_dais[dac]->codec->dev, -+ "Failed to read register PCM512x_RATE_DET_4\n"); ++ "Failed to read register PCM512x_RATE_DET_4\n"); + return val; + } + @@ -103292,7 +105086,7 @@ index 0000000000000000000000000000000000000000..56e43f98846b41e487b3089813f7edc3 + PCM512x_SREF_BCK); + + dev_info(rtd->codec_dais[dac]->codec->dev, -+ "Setting BCLK as input clock & Enable PLL\n"); ++ "Setting BCLK as input clock & Enable PLL\n"); + } else { + snd_soc_write(rtd->codec_dais[dac]->codec, + PCM512x_PLL_EN, @@ -103303,7 +105097,7 @@ index 0000000000000000000000000000000000000000..56e43f98846b41e487b3089813f7edc3 + PCM512x_SREF_SCK); + + dev_info(rtd->codec_dais[dac]->codec->dev, -+ "Setting SCLK as input clock & disabled PLL\n"); ++ "Setting SCLK as input clock & disabled PLL\n"); + } + } + @@ -103314,6 +105108,7 @@ index 0000000000000000000000000000000000000000..56e43f98846b41e487b3089813f7edc3 + dev_warn(card->dev, "Failed to set volume limit: %d\n", + ret); + } ++ + ret = snd_allo_piano_dsp_program(rtd, glb_ptr->set_mode, rate, + glb_ptr->set_lowpass); + if (ret < 0) @@ -103331,6 +105126,7 @@ index 0000000000000000000000000000000000000000..56e43f98846b41e487b3089813f7edc3 + struct snd_soc_card *card = rtd->card; + + snd_allo_piano_gpio_unmute(card); ++ + return 0; +} + @@ -103492,11 +105288,11 @@ index 0000000000000000000000000000000000000000..56e43f98846b41e487b3089813f7edc3 +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC Plus"); +MODULE_LICENSE("GPL v2"); -From 56795e108b638269239778c9546b3e5125d4b216 Mon Sep 17 00:00:00 2001 +From e42b4e221249dd728e85fba984ff1cb8347e8be8 Mon Sep 17 00:00:00 2001 From: BabuSubashChandar Date: Tue, 28 Mar 2017 20:04:42 +0530 -Subject: [PATCH 079/199] Add support for Allo Boss DAC add-on board for - Raspberry Pi. (#1924) +Subject: [PATCH 084/129] Add support for Allo Boss DAC add-on board for + Raspberry Pi. (#1924) Signed-off-by: Baswaraj K Reviewed-by: Deepak @@ -104198,10 +105994,10 @@ index 0000000000000000000000000000000000000000..203ab76c7045b081578e23bda1099dd1 +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Boss DAC"); +MODULE_LICENSE("GPL v2"); -From 305da1e20346a94876830a1c36991e482732d7e6 Mon Sep 17 00:00:00 2001 +From ba9487e8829443e63cd95c00b57492a1170754bf Mon Sep 17 00:00:00 2001 From: gtrainavicius Date: Sun, 23 Oct 2016 12:06:53 +0300 -Subject: [PATCH 080/199] Support for Blokas Labs pisound board +Subject: [PATCH 085/129] Support for Blokas Labs pisound board Pisound dynamic overlay (#1760) @@ -105400,10 +107196,10 @@ index 0000000000000000000000000000000000000000..06ff1e53dc9d860946965b6303577762 +MODULE_DESCRIPTION("ASoC Driver for pisound, http://blokas.io/pisound"); +MODULE_LICENSE("GPL v2"); -From 58114c260582ecc7b7c3d6193b807f25332aa485 Mon Sep 17 00:00:00 2001 +From c7ccddce5f413a68aaba65d3f3908b41b3e7da0f Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 22 Jan 2017 12:49:37 +0100 -Subject: [PATCH 081/199] ASoC: Add driver for Cirrus Logic Audio Card +Subject: [PATCH 086/129] ASoC: Add driver for Cirrus Logic Audio Card Note: due to problems with deferred probing of regulators the following softdep should be added to a modprobe.d file @@ -106468,10 +108264,10 @@ index 0000000000000000000000000000000000000000..ac8651ddff7bd3701dffe22c7fb88352 +MODULE_DESCRIPTION("ASoC driver for Cirrus Logic Audio Card"); +MODULE_LICENSE("GPL"); -From 1b6be09da4dc272f823629fed84e79834c47f73a Mon Sep 17 00:00:00 2001 +From f82b730b26f6626d9f1e261c792feb80c26837de Mon Sep 17 00:00:00 2001 From: Miquel Date: Fri, 24 Feb 2017 20:51:06 +0100 -Subject: [PATCH 082/199] sound: Support for Dion Audio LOCO-V2 DAC-AMP HAT +Subject: [PATCH 087/129] sound: Support for Dion Audio LOCO-V2 DAC-AMP HAT Signed-off-by: Miquel Blauw --- @@ -106666,10 +108462,10 @@ index 0000000000000000000000000000000000000000..a009c49477972a9832175d86f201b035 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO-V2"); +MODULE_LICENSE("GPL v2"); -From 12310f62bb4b4a5c89f021cca2115a83a7ee4b64 Mon Sep 17 00:00:00 2001 +From c6220b7c4674451da55a209557ebb87b5eaa14b6 Mon Sep 17 00:00:00 2001 From: Fe-Pi Date: Wed, 1 Mar 2017 04:42:43 -0700 -Subject: [PATCH 083/199] Add support for Fe-Pi audio sound card. (#1867) +Subject: [PATCH 088/129] Add support for Fe-Pi audio sound card. (#1867) Fe-Pi Audio Sound Card is based on NXP SGTL5000 codec. Mechanical specification of the board is the same the Raspberry Pi Zero. @@ -106883,10 +108679,10 @@ index 0000000000000000000000000000000000000000..015b56fd73cc36be5b5eecd17548fd03 +MODULE_DESCRIPTION("ASoC Driver for Fe-Pi Audio"); +MODULE_LICENSE("GPL v2"); -From c3fe735ad32332d59e31c96f687f578c36f79cab Mon Sep 17 00:00:00 2001 +From afd8236c2f127531902daad63f61afcae95f0a37 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Mar 2017 20:04:13 +1100 -Subject: [PATCH 084/199] Add support for the AudioInjector.net Octo sound card +Subject: [PATCH 089/129] Add support for the AudioInjector.net Octo sound card AudioInjector Octo: sample rates, regulators, reset @@ -106897,11 +108693,16 @@ new supported rates are (in kHz) : Reference the bcm270x DT regulators in the overlay. This patch adds a reset GPIO for the AudioInjector.net octo sound card. + +Audioinjector octo : Make the playback and capture symmetric + +This patch ensures that the sample rate and channel count of the audioinjector +octo sound card are symmetric. --- sound/soc/bcm/Kconfig | 7 + sound/soc/bcm/Makefile | 2 + - sound/soc/bcm/audioinjector-octo-soundcard.c | 339 +++++++++++++++++++++++++++ - 3 files changed, 348 insertions(+) + sound/soc/bcm/audioinjector-octo-soundcard.c | 341 +++++++++++++++++++++++++++ + 3 files changed, 350 insertions(+) create mode 100644 sound/soc/bcm/audioinjector-octo-soundcard.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig @@ -106944,10 +108745,10 @@ index c3feaf198d997935fdf6815f9f8555d8704e53af..113b6899dd9fd6c4a6f706f57e32201d obj-$(CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2) += snd-soc-dionaudio-loco-v2.o diff --git a/sound/soc/bcm/audioinjector-octo-soundcard.c b/sound/soc/bcm/audioinjector-octo-soundcard.c new file mode 100644 -index 0000000000000000000000000000000000000000..dcf403ab37639ba79e38278d7e4b1ade452c292a +index 0000000000000000000000000000000000000000..5e79f4eff93a21ed3495c77a90f73525695cb3d5 --- /dev/null +++ b/sound/soc/bcm/audioinjector-octo-soundcard.c -@@ -0,0 +1,339 @@ +@@ -0,0 +1,341 @@ +/* + * ASoC Driver for AudioInjector Pi octo channel soundcard (hat) + * @@ -107154,6 +108955,8 @@ index 0000000000000000000000000000000000000000..dcf403ab37639ba79e38278d7e4b1ade + .codec_dai_name = "cs42448", + .ops = &audioinjector_octo_ops, + .init = audioinjector_octo_dai_init, ++ .symmetric_rates = 1, ++ .symmetric_channels = 1, + }, +}; + @@ -107274,7 +109077,7 @@ index 0000000000000000000000000000000000000000..dcf403ab37639ba79e38278d7e4b1ade + +static struct platform_driver audioinjector_octo_driver = { + .driver = { -+ .name = "audioinjector-audio", ++ .name = "audioinjector-octo", + .owner = THIS_MODULE, + .of_match_table = audioinjector_octo_of_match, + }, @@ -107288,10 +109091,10 @@ index 0000000000000000000000000000000000000000..dcf403ab37639ba79e38278d7e4b1ade +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:audioinjector-octo-soundcard"); -From 34aa72ecf4c3bd091d7631cfba2d03066473bd02 Mon Sep 17 00:00:00 2001 +From 08d3e5a0ec754c239219af3f1f3d18913ea8cc35 Mon Sep 17 00:00:00 2001 From: Peter Malkin Date: Mon, 27 Mar 2017 16:38:21 -0700 -Subject: [PATCH 085/199] Driver support for Google voiceHAT soundcard. +Subject: [PATCH 090/129] Driver support for Google voiceHAT soundcard. --- sound/soc/bcm/Kconfig | 7 ++ @@ -107682,10 +109485,335 @@ index 0000000000000000000000000000000000000000..225854b8e5298b3c3018f59a49404354 +MODULE_DESCRIPTION("ASoC Driver for Google voiceHAT SoundCard"); +MODULE_LICENSE("GPL v2"); -From e8ceba81b9363e64a30ad6845594d86a75c1a0d4 Mon Sep 17 00:00:00 2001 +From 5926e0d83bb9c5bd15806fd81ea648bc90f3aab3 Mon Sep 17 00:00:00 2001 +From: sandeepal +Date: Fri, 2 Jun 2017 18:59:46 +0530 +Subject: [PATCH 091/129] Allo Digione Driver (#2048) + +Driver for the Allo Digione soundcard +--- + sound/soc/bcm/Kconfig | 7 ++ + sound/soc/bcm/Makefile | 2 + + sound/soc/bcm/allo-digione.c | 268 +++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 277 insertions(+) + create mode 100644 sound/soc/bcm/allo-digione.c + +diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig +index 355bdeb25f81d15593f78df0e87a48404908ca4b..381d32bb9deb3cf2c531e2a4563418cd6eb9d505 100644 +--- a/sound/soc/bcm/Kconfig ++++ b/sound/soc/bcm/Kconfig +@@ -176,6 +176,13 @@ config SND_BCM2708_SOC_ALLO_BOSS_DAC + help + Say Y or M if you want to add support for Allo Boss DAC. + ++config SND_BCM2708_SOC_ALLO_DIGIONE ++ tristate "Support for Allo DigiOne" ++ depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S ++ select SND_SOC_PCM512x_I2C ++ help ++ Say Y or M if you want to add support for Allo DigiOne. ++ + config SND_BCM2708_SOC_FE_PI_AUDIO + tristate "Support for Fe-Pi-Audio" + depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S +diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile +index 72e1620fa4038035804cf3b2a09c6b12e7ae0fe1..53ea8229d7ac2065176983385dd7ba85ee3915ea 100644 +--- a/sound/soc/bcm/Makefile ++++ b/sound/soc/bcm/Makefile +@@ -34,6 +34,7 @@ snd-soc-dionaudio-loco-v2-objs := dionaudio_loco-v2.o + snd-soc-allo-boss-dac-objs := allo-boss-dac.o + snd-soc-allo-piano-dac-objs := allo-piano-dac.o + snd-soc-allo-piano-dac-plus-objs := allo-piano-dac-plus.o ++snd-soc-allo-digione-objs := allo-digione.o + snd-soc-pisound-objs := pisound.o + snd-soc-fe-pi-audio-objs := fe-pi-audio.o + +@@ -60,5 +61,6 @@ obj-$(CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2) += snd-soc-dionaudio-loco-v2.o + obj-$(CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC) += snd-soc-allo-boss-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC) += snd-soc-allo-piano-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS) += snd-soc-allo-piano-dac-plus.o ++obj-$(CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE) += snd-soc-allo-digione.o + obj-$(CONFIG_SND_PISOUND) += snd-soc-pisound.o + obj-$(CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO) += snd-soc-fe-pi-audio.o +diff --git a/sound/soc/bcm/allo-digione.c b/sound/soc/bcm/allo-digione.c +new file mode 100644 +index 0000000000000000000000000000000000000000..e3664e44c699d0102120ecf99e8b780a4505ebad +--- /dev/null ++++ b/sound/soc/bcm/allo-digione.c +@@ -0,0 +1,268 @@ ++/* ++ * ASoC Driver for Allo DigiOne ++ * ++ * Author: Baswaraj ++ * Copyright 2017 ++ * based on code by Daniel Matuschek ++ * based on code by Florian Meier ++ * ++ * 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 "../codecs/wm8804.h" ++ ++static short int auto_shutdown_output = 0; ++module_param(auto_shutdown_output, short, ++ S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP); ++MODULE_PARM_DESC(auto_shutdown_output, "Shutdown SP/DIF output if playback is stopped"); ++ ++#define CLK_44EN_RATE 22579200UL ++#define CLK_48EN_RATE 24576000UL ++ ++static struct gpio_desc *snd_allo_clk44gpio; ++static struct gpio_desc *snd_allo_clk48gpio; ++ ++static int samplerate = 44100; ++ ++static uint32_t snd_allo_digione_enable_clock(int sample_rate) ++{ ++ switch (sample_rate) { ++ case 11025: ++ case 22050: ++ case 44100: ++ case 88200: ++ case 176400: ++ gpiod_set_value_cansleep(snd_allo_clk44gpio, 1); ++ gpiod_set_value_cansleep(snd_allo_clk48gpio, 0); ++ return CLK_44EN_RATE; ++ default: ++ gpiod_set_value_cansleep(snd_allo_clk48gpio, 1); ++ gpiod_set_value_cansleep(snd_allo_clk44gpio, 0); ++ return CLK_48EN_RATE; ++ } ++} ++ ++ ++static int snd_allo_digione_init(struct snd_soc_pcm_runtime *rtd) ++{ ++ struct snd_soc_codec *codec = rtd->codec; ++ ++ /* enable TX output */ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0); ++ ++ return 0; ++} ++ ++static int snd_allo_digione_startup(struct snd_pcm_substream *substream) ++{ ++ /* turn on digital output */ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_codec *codec = rtd->codec; ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x00); ++ return 0; ++} ++ ++static void snd_allo_digione_shutdown(struct snd_pcm_substream *substream) ++{ ++ /* turn off output */ ++ if (auto_shutdown_output) { ++ /* turn off output */ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_codec *codec = rtd->codec; ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x3c); ++ } ++} ++ ++static int snd_allo_digione_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 *codec_dai = rtd->codec_dai; ++ struct snd_soc_codec *codec = rtd->codec; ++ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; ++ ++ int sysclk = 27000000; /* This is fixed on this board */ ++ ++ long mclk_freq = 0; ++ int mclk_div = 1; ++ int sampling_freq = 1; ++ ++ int ret; ++ ++ samplerate = params_rate(params); ++ ++ if (samplerate <= 96000) { ++ mclk_freq = samplerate * 256; ++ mclk_div = WM8804_MCLKDIV_256FS; ++ } else { ++ mclk_freq = samplerate * 128; ++ mclk_div = WM8804_MCLKDIV_128FS; ++ } ++ ++ sysclk = snd_allo_digione_enable_clock(samplerate); ++ ++ switch (samplerate) { ++ case 32000: ++ sampling_freq=0x03; ++ break; ++ case 44100: ++ sampling_freq=0x00; ++ break; ++ case 48000: ++ sampling_freq=0x02; ++ break; ++ case 88200: ++ sampling_freq=0x08; ++ break; ++ case 96000: ++ sampling_freq=0x0a; ++ break; ++ case 176400: ++ sampling_freq=0x0c; ++ break; ++ case 192000: ++ sampling_freq=0x0e; ++ break; ++ default: ++ dev_err(codec->dev, ++ "Failed to set WM8804 SYSCLK, unsupported samplerate %d\n", ++ samplerate); ++ } ++ ++ snd_soc_dai_set_clkdiv(codec_dai, WM8804_MCLK_DIV, mclk_div); ++ snd_soc_dai_set_pll(codec_dai, 0, 0, sysclk, mclk_freq); ++ ++ ret = snd_soc_dai_set_sysclk(codec_dai, WM8804_TX_CLKSRC_PLL, ++ sysclk, SND_SOC_CLOCK_OUT); ++ ++ if (ret < 0) { ++ dev_err(codec->dev, ++ "Failed to set WM8804 SYSCLK: %d\n", ret); ++ return ret; ++ } ++ ++ /* Enable TX output */ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0); ++ ++ /* Power on */ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x9, 0); ++ ++ /* set sampling frequency status bits */ ++ snd_soc_update_bits(codec, WM8804_SPDTX4, 0x0f, sampling_freq); ++ ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, 64); ++} ++ ++/* machine stream operations */ ++static struct snd_soc_ops snd_allo_digione_ops = { ++ .hw_params = snd_allo_digione_hw_params, ++ .startup = snd_allo_digione_startup, ++ .shutdown = snd_allo_digione_shutdown, ++}; ++ ++static struct snd_soc_dai_link snd_allo_digione_dai[] = { ++{ ++ .name = "Allo DigiOne", ++ .stream_name = "Allo DigiOne HiFi", ++ .cpu_dai_name = "bcm2708-i2s.0", ++ .codec_dai_name = "wm8804-spdif", ++ .platform_name = "bcm2708-i2s.0", ++ .codec_name = "wm8804.1-003b", ++ .dai_fmt = SND_SOC_DAIFMT_I2S | ++ SND_SOC_DAIFMT_NB_NF | ++ SND_SOC_DAIFMT_CBM_CFM, ++ .ops = &snd_allo_digione_ops, ++ .init = snd_allo_digione_init, ++}, ++}; ++ ++/* audio machine driver */ ++static struct snd_soc_card snd_allo_digione = { ++ .name = "snd_allo_digione", ++ .driver_name = "AlloDigiOne", ++ .owner = THIS_MODULE, ++ .dai_link = snd_allo_digione_dai, ++ .num_links = ARRAY_SIZE(snd_allo_digione_dai), ++}; ++ ++static int snd_allo_digione_probe(struct platform_device *pdev) ++{ ++ int ret = 0; ++ ++ snd_allo_digione.dev = &pdev->dev; ++ ++ if (pdev->dev.of_node) { ++ struct device_node *i2s_node; ++ struct snd_soc_dai_link *dai = &snd_allo_digione_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; ++ } ++ ++ snd_allo_clk44gpio = ++ devm_gpiod_get(&pdev->dev, "clock44", GPIOD_OUT_LOW); ++ if (IS_ERR(snd_allo_clk44gpio)) ++ dev_err(&pdev->dev, "devm_gpiod_get() failed\n"); ++ ++ snd_allo_clk48gpio = ++ devm_gpiod_get(&pdev->dev, "clock48", GPIOD_OUT_LOW); ++ if (IS_ERR(snd_allo_clk48gpio)) ++ dev_err(&pdev->dev, "devm_gpiod_get() failed\n"); ++ } ++ ++ ret = snd_soc_register_card(&snd_allo_digione); ++ if (ret && ret != -EPROBE_DEFER) ++ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ++ ret); ++ ++ return ret; ++} ++ ++static int snd_allo_digione_remove(struct platform_device *pdev) ++{ ++ return snd_soc_unregister_card(&snd_allo_digione); ++} ++ ++static const struct of_device_id snd_allo_digione_of_match[] = { ++ { .compatible = "allo,allo-digione", }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, snd_allo_digione_of_match); ++ ++static struct platform_driver snd_allo_digione_driver = { ++ .driver = { ++ .name = "snd-allo-digione", ++ .owner = THIS_MODULE, ++ .of_match_table = snd_allo_digione_of_match, ++ }, ++ .probe = snd_allo_digione_probe, ++ .remove = snd_allo_digione_remove, ++}; ++ ++module_platform_driver(snd_allo_digione_driver); ++ ++MODULE_AUTHOR("Baswaraj "); ++MODULE_DESCRIPTION("ASoC Driver for Allo DigiOne"); ++MODULE_LICENSE("GPL v2"); + +From 1ec00318fdec23f1feed3e7972ac8e7ab70d51d5 Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 21 Oct 2015 14:55:21 +0100 -Subject: [PATCH 086/199] rpi_display: add backlight driver and overlay +Subject: [PATCH 092/129] rpi_display: add backlight driver and overlay Add a mailbox-driven backlight controller for the Raspberry Pi DSI touchscreen display. Requires updated GPU firmware to recognise the @@ -107854,10 +109982,10 @@ index 0000000000000000000000000000000000000000..14a0d9b037395497c1fdae2961feccd5 +MODULE_DESCRIPTION("Raspberry Pi mailbox based Backlight Driver"); +MODULE_LICENSE("GPL"); -From a03f5c85a90929d12db1e9e30897a6436f386b38 Mon Sep 17 00:00:00 2001 +From 8b334bd0404a15a9ef5e1c58075855d2a17220a8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 23 Feb 2016 19:56:04 +0000 -Subject: [PATCH 087/199] bcm2835-virtgpio: Virtual GPIO driver +Subject: [PATCH 093/129] bcm2835-virtgpio: Virtual GPIO driver Add a virtual GPIO driver that uses the firmware mailbox interface to request that the VPU toggles LEDs. @@ -108131,10 +110259,10 @@ index 4a3d79d3b48eb483a4e4bf498f617515e3ad158f..5f34e1257117fb48013c9926a8a223d6 RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From 3223d97f3ef0560bb0c7083d52e99643d9690d26 Mon Sep 17 00:00:00 2001 +From e164ee9987147c29263b184bb8358a357003b7e8 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 20 Feb 2017 17:01:21 +0000 -Subject: [PATCH 088/199] bcm2835-gpio-exp: Driver for GPIO expander via +Subject: [PATCH 094/129] bcm2835-gpio-exp: Driver for GPIO expander via mailbox service Pi3 and Compute Module 3 have a GPIO expander that the @@ -108460,10 +110588,10 @@ index 5f34e1257117fb48013c9926a8a223d64a598ab7..c819c21b0158a59c1308882e5a40e3f3 /* Dispmanx TAGS */ RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001, -From 5d42ed1697d9f6fdb7637cdde6f46c16eacb20d0 Mon Sep 17 00:00:00 2001 +From 9e5f33653205607cacd13a7666eccece3a7d6da4 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 23 Feb 2016 17:26:48 +0000 -Subject: [PATCH 089/199] amba_pl011: Don't use DT aliases for numbering +Subject: [PATCH 095/129] amba_pl011: Don't use DT aliases for numbering The pl011 driver looks for DT aliases of the form "serial", and if found uses as the device ID. This can cause @@ -108492,10 +110620,10 @@ index 1888d168a41c87c605962da2605df8ab1c02bd20..e22b9e79836a6aeef4c8f9fb618b9595 uap->old_cr = 0; uap->port.dev = dev; -From d7f2ab8caad1d23361e64cdad22225642052c44d Mon Sep 17 00:00:00 2001 +From 6fe7c9b534c7e1aa0cb75d47b27a2f85e7b17aae Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 1 Mar 2017 16:07:39 +0000 -Subject: [PATCH 090/199] amba_pl011: Round input clock up +Subject: [PATCH 096/129] amba_pl011: Round input clock up The UART clock is initialised to be as close to the requested frequency as possible without exceeding it. Now that there is a @@ -108581,10 +110709,10 @@ index e22b9e79836a6aeef4c8f9fb618b9595c551500f..4b815abbf9913075885ee60f4d9ad49d /* unregisters the driver also if no more ports are left */ static void pl011_unregister_port(struct uart_amba_port *uap) -From 7b6a45cb774c63411740d790044367d1749f97ff Mon Sep 17 00:00:00 2001 +From 768c90f10d2587bd8abc735114c7c853b70310f4 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 3 Dec 2014 13:23:28 +0200 -Subject: [PATCH 091/199] OF: DT-Overlay configfs interface +Subject: [PATCH 097/129] OF: DT-Overlay configfs interface This is a port of Pantelis Antoniou's v3 port that makes use of the new upstreamed configfs support for binary attributes. @@ -109016,10 +111144,10 @@ index 0000000000000000000000000000000000000000..0037e6868a6cda8706c88194c6a4454b +} +late_initcall(of_cfs_init); -From 69ececf62d3dd363cb121a2e8b128e1d1df21298 Mon Sep 17 00:00:00 2001 +From 1540430c40bd65a02de5063f24aaeb908256af91 Mon Sep 17 00:00:00 2001 From: Cheong2K Date: Fri, 26 Feb 2016 18:20:10 +0800 -Subject: [PATCH 092/199] brcm: adds support for BCM43341 wifi +Subject: [PATCH 098/129] brcm: adds support for BCM43341 wifi brcmfmac: Disable power management @@ -109151,10 +111279,10 @@ index f3556122c6ace17c419e13023057861957a507fa..f8d4647016a1cde3d51dd43da07a46ce BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43362_CHIP_ID, 0xFFFFFFFE, 43362), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4339_CHIP_ID, 0xFFFFFFFF, 4339), -From 5461c6c71453f7674228ec60d38a3a181adc3964 Mon Sep 17 00:00:00 2001 +From 44f82d3decd6bab4e5b05ecb8450bc62affea3a9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 17 Feb 2017 15:26:13 +0000 -Subject: [PATCH 093/199] brcmfmac: Mute expected startup 'errors' +Subject: [PATCH 099/129] brcmfmac: Mute expected startup 'errors' The brcmfmac WiFi driver always complains about the '00' country code. Modify the driver to ignore '00' silently. @@ -109178,10 +111306,10 @@ index 508cab2d0817914d454958f92167d350c74d9a5d..987b1f5b999b0ecb68b6ce741b8e3ddb req->alpha2[0], req->alpha2[1]); return; -From 443f7e71126f42b5033f3236d20c03cf1f51b65a Mon Sep 17 00:00:00 2001 +From 19e8cd50ec3a94a2e12bdc46e58b24f9358dfaf0 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Dec 2015 13:37:07 +0000 -Subject: [PATCH 094/199] hci_h5: Don't send conf_req when ACTIVE +Subject: [PATCH 100/129] hci_h5: Don't send conf_req when ACTIVE Without this patch, a modem and kernel can continuously bombard each other with conf_req and conf_rsp messages, in a demented game of tag. @@ -109204,24 +111332,24 @@ index c0e4e26dc30d7c3c6a771b7b86df88c8cf763646..7308287259eedcaf229f8a496a0e3826 if (H5_HDR_LEN(hdr) > 2) h5->tx_win = (data[2] & 0x07); -From a889c72dbee32229a53ee87a5730c640b8deab30 Mon Sep 17 00:00:00 2001 +From c3bd471961998f57775043a1fd1bd98748eaaa58 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 13 Apr 2015 17:16:29 +0100 -Subject: [PATCH 095/199] config: Add default configs +Subject: [PATCH 101/129] config: Add default configs --- - arch/arm/configs/bcm2709_defconfig | 1312 +++++++++++++++++++++++++++++++++++ - arch/arm/configs/bcmrpi_defconfig | 1318 ++++++++++++++++++++++++++++++++++++ - 2 files changed, 2630 insertions(+) + arch/arm/configs/bcm2709_defconfig | 1326 +++++++++++++++++++++++++++++++++++ + arch/arm/configs/bcmrpi_defconfig | 1331 ++++++++++++++++++++++++++++++++++++ + 2 files changed, 2657 insertions(+) create mode 100644 arch/arm/configs/bcm2709_defconfig create mode 100644 arch/arm/configs/bcmrpi_defconfig diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig new file mode 100644 -index 0000000000000000000000000000000000000000..93cdfa4ce3e7d3ff9f437a05a9ee6bcf4b895a20 +index 0000000000000000000000000000000000000000..62909413e1d625a1d33559d965ee8707ca57ba91 --- /dev/null +++ b/arch/arm/configs/bcm2709_defconfig -@@ -0,0 +1,1312 @@ +@@ -0,0 +1,1326 @@ +CONFIG_LOCALVERSION="-v7" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_SYSVIPC=y @@ -109327,9 +111455,11 @@ index 0000000000000000000000000000000000000000..93cdfa4ce3e7d3ff9f437a05a9ee6bcf +CONFIG_TCP_CONG_BBR=m +CONFIG_IPV6=m +CONFIG_IPV6_ROUTER_PREF=y ++CONFIG_IPV6_ROUTE_INFO=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m ++CONFIG_IPV6_SIT_6RD=y +CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_SUBTREES=y @@ -109584,6 +111714,7 @@ index 0000000000000000000000000000000000000000..93cdfa4ce3e7d3ff9f437a05a9ee6bcf +CONFIG_CAN_VCAN=m +CONFIG_CAN_SLCAN=m +CONFIG_CAN_MCP251X=m ++CONFIG_CAN_GS_USB=m +CONFIG_IRDA=m +CONFIG_IRLAN=m +CONFIG_IRNET=m @@ -109789,6 +111920,7 @@ index 0000000000000000000000000000000000000000..93cdfa4ce3e7d3ff9f437a05a9ee6bcf +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ADS7846=m +CONFIG_TOUCHSCREEN_EGALAX=m ++CONFIG_TOUCHSCREEN_GOODIX=m +CONFIG_TOUCHSCREEN_EDT_FT5X06=m +CONFIG_TOUCHSCREEN_RPI_FT5406=m +CONFIG_TOUCHSCREEN_USB_COMPOSITE=m @@ -109838,6 +111970,7 @@ index 0000000000000000000000000000000000000000..93cdfa4ce3e7d3ff9f437a05a9ee6bcf +CONFIG_I2C_BCM2708=m +CONFIG_I2C_BCM2835=m +CONFIG_I2C_GPIO=m ++CONFIG_I2C_ROBOTFUZZ_OSIF=m +CONFIG_SPI=y +CONFIG_SPI_BCM2835=m +CONFIG_SPI_BCM2835AUX=m @@ -109873,11 +112006,13 @@ index 0000000000000000000000000000000000000000..93cdfa4ce3e7d3ff9f437a05a9ee6bcf +CONFIG_POWER_RESET_GPIO=y +CONFIG_BATTERY_DS2760=m +CONFIG_HWMON=m ++CONFIG_SENSORS_JC42=m +CONFIG_SENSORS_LM75=m +CONFIG_SENSORS_SHT21=m +CONFIG_SENSORS_SHTC1=m +CONFIG_SENSORS_ADS1015=m +CONFIG_SENSORS_INA2XX=m ++CONFIG_SENSORS_TMP102=m +CONFIG_THERMAL=y +CONFIG_BCM2835_THERMAL=y +CONFIG_WATCHDOG=y @@ -109889,6 +112024,8 @@ index 0000000000000000000000000000000000000000..93cdfa4ce3e7d3ff9f437a05a9ee6bcf +CONFIG_MFD_WM5102=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=m ++CONFIG_REGULATOR_ARIZONA_LDO1=m ++CONFIG_REGULATOR_ARIZONA_MICSUPP=m +CONFIG_MEDIA_SUPPORT=m +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_ANALOG_TV_SUPPORT=y @@ -110107,13 +112244,16 @@ index 0000000000000000000000000000000000000000..93cdfa4ce3e7d3ff9f437a05a9ee6bcf +CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m +CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m +CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m ++CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m +CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m +CONFIG_SND_PISOUND=m +CONFIG_SND_SOC_ADAU1701=m +CONFIG_SND_SOC_ADAU7002=m +CONFIG_SND_SOC_AK4554=m ++CONFIG_SND_SOC_SPDIF=m +CONFIG_SND_SOC_WM8804_I2C=m +CONFIG_SND_SIMPLE_CARD=m ++CONFIG_HID_BATTERY_STRENGTH=y +CONFIG_HIDRAW=y +CONFIG_UHID=m +CONFIG_HID_A4TECH=m @@ -110156,6 +112296,7 @@ index 0000000000000000000000000000000000000000..93cdfa4ce3e7d3ff9f437a05a9ee6bcf +CONFIG_HID_ROCCAT=m +CONFIG_HID_SAMSUNG=m +CONFIG_HID_SONY=m ++CONFIG_SONY_FF=y +CONFIG_HID_SPEEDLINK=m +CONFIG_HID_SUNPLUS=m +CONFIG_HID_GREENASIA=m @@ -110361,6 +112502,7 @@ index 0000000000000000000000000000000000000000..93cdfa4ce3e7d3ff9f437a05a9ee6bcf +CONFIG_FB_TFT_SSD1331=m +CONFIG_FB_TFT_SSD1351=m +CONFIG_FB_TFT_ST7735R=m ++CONFIG_FB_TFT_ST7789V=m +CONFIG_FB_TFT_TINYLCD=m +CONFIG_FB_TFT_TLS8204=m +CONFIG_FB_TFT_UC1701=m @@ -110379,13 +112521,13 @@ index 0000000000000000000000000000000000000000..93cdfa4ce3e7d3ff9f437a05a9ee6bcf +CONFIG_EXTCON=m +CONFIG_EXTCON_ARIZONA=m +CONFIG_IIO=m -+CONFIG_IIO_BUFFER=y +CONFIG_IIO_BUFFER_CB=m -+CONFIG_IIO_KFIFO_BUF=m +CONFIG_MCP320X=m +CONFIG_MCP3422=m +CONFIG_DHT11=m +CONFIG_HTU21=m ++CONFIG_INV_MPU6050_I2C=m ++CONFIG_BMP280=m +CONFIG_PWM_BCM2835=m +CONFIG_PWM_PCA9685=m +CONFIG_RASPBERRYPI_FIRMWARE=y @@ -110536,10 +112678,10 @@ index 0000000000000000000000000000000000000000..93cdfa4ce3e7d3ff9f437a05a9ee6bcf +CONFIG_LIBCRC32C=y diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig new file mode 100644 -index 0000000000000000000000000000000000000000..29fd2abc2cbfcaed37cb630b5edffaa5b4994f6e +index 0000000000000000000000000000000000000000..e0dd8723047ff488e81a03ef42fdbc68c43dc721 --- /dev/null +++ b/arch/arm/configs/bcmrpi_defconfig -@@ -0,0 +1,1318 @@ +@@ -0,0 +1,1331 @@ +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y @@ -110640,9 +112782,11 @@ index 0000000000000000000000000000000000000000..29fd2abc2cbfcaed37cb630b5edffaa5 +CONFIG_TCP_CONG_BBR=m +CONFIG_IPV6=m +CONFIG_IPV6_ROUTER_PREF=y ++CONFIG_IPV6_ROUTE_INFO=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m ++CONFIG_IPV6_SIT_6RD=y +CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_SUBTREES=y @@ -110897,6 +113041,7 @@ index 0000000000000000000000000000000000000000..29fd2abc2cbfcaed37cb630b5edffaa5 +CONFIG_CAN_VCAN=m +CONFIG_CAN_SLCAN=m +CONFIG_CAN_MCP251X=m ++CONFIG_CAN_GS_USB=m +CONFIG_IRDA=m +CONFIG_IRLAN=m +CONFIG_IRNET=m @@ -111102,8 +113247,8 @@ index 0000000000000000000000000000000000000000..29fd2abc2cbfcaed37cb630b5edffaa5 +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ADS7846=m +CONFIG_TOUCHSCREEN_EGALAX=m -+CONFIG_TOUCHSCREEN_EDT_FT5X06=m +CONFIG_TOUCHSCREEN_GOODIX=m ++CONFIG_TOUCHSCREEN_EDT_FT5X06=m +CONFIG_TOUCHSCREEN_RPI_FT5406=m +CONFIG_TOUCHSCREEN_USB_COMPOSITE=m +CONFIG_TOUCHSCREEN_STMPE=m @@ -111152,6 +113297,7 @@ index 0000000000000000000000000000000000000000..29fd2abc2cbfcaed37cb630b5edffaa5 +CONFIG_I2C_BCM2708=m +CONFIG_I2C_BCM2835=m +CONFIG_I2C_GPIO=m ++CONFIG_I2C_ROBOTFUZZ_OSIF=m +CONFIG_SPI=y +CONFIG_SPI_BCM2835=m +CONFIG_SPI_BCM2835AUX=m @@ -111185,11 +113331,13 @@ index 0000000000000000000000000000000000000000..29fd2abc2cbfcaed37cb630b5edffaa5 +CONFIG_POWER_RESET_GPIO=y +CONFIG_BATTERY_DS2760=m +CONFIG_HWMON=m ++CONFIG_SENSORS_JC42=m +CONFIG_SENSORS_LM75=m +CONFIG_SENSORS_SHT21=m +CONFIG_SENSORS_SHTC1=m +CONFIG_SENSORS_ADS1015=m +CONFIG_SENSORS_INA2XX=m ++CONFIG_SENSORS_TMP102=m +CONFIG_THERMAL=y +CONFIG_BCM2835_THERMAL=y +CONFIG_WATCHDOG=y @@ -111201,6 +113349,8 @@ index 0000000000000000000000000000000000000000..29fd2abc2cbfcaed37cb630b5edffaa5 +CONFIG_MFD_WM5102=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=m ++CONFIG_REGULATOR_ARIZONA_LDO1=m ++CONFIG_REGULATOR_ARIZONA_MICSUPP=m +CONFIG_MEDIA_SUPPORT=m +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_ANALOG_TV_SUPPORT=y @@ -111419,13 +113569,16 @@ index 0000000000000000000000000000000000000000..29fd2abc2cbfcaed37cb630b5edffaa5 +CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m +CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m +CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m ++CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m +CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m +CONFIG_SND_PISOUND=m +CONFIG_SND_SOC_ADAU1701=m +CONFIG_SND_SOC_ADAU7002=m +CONFIG_SND_SOC_AK4554=m ++CONFIG_SND_SOC_SPDIF=m +CONFIG_SND_SOC_WM8804_I2C=m +CONFIG_SND_SIMPLE_CARD=m ++CONFIG_HID_BATTERY_STRENGTH=y +CONFIG_HIDRAW=y +CONFIG_UHID=m +CONFIG_HID_A4TECH=m @@ -111468,6 +113621,7 @@ index 0000000000000000000000000000000000000000..29fd2abc2cbfcaed37cb630b5edffaa5 +CONFIG_HID_ROCCAT=m +CONFIG_HID_SAMSUNG=m +CONFIG_HID_SONY=m ++CONFIG_SONY_FF=y +CONFIG_HID_SPEEDLINK=m +CONFIG_HID_SUNPLUS=m +CONFIG_HID_GREENASIA=m @@ -111686,6 +113840,7 @@ index 0000000000000000000000000000000000000000..29fd2abc2cbfcaed37cb630b5edffaa5 +CONFIG_FB_TFT_SSD1331=m +CONFIG_FB_TFT_SSD1351=m +CONFIG_FB_TFT_ST7735R=m ++CONFIG_FB_TFT_ST7789V=m +CONFIG_FB_TFT_TINYLCD=m +CONFIG_FB_TFT_TLS8204=m +CONFIG_FB_TFT_UC1701=m @@ -111704,13 +113859,13 @@ index 0000000000000000000000000000000000000000..29fd2abc2cbfcaed37cb630b5edffaa5 +CONFIG_EXTCON=m +CONFIG_EXTCON_ARIZONA=m +CONFIG_IIO=m -+CONFIG_IIO_BUFFER=y +CONFIG_IIO_BUFFER_CB=m -+CONFIG_IIO_KFIFO_BUF=m +CONFIG_MCP320X=m +CONFIG_MCP3422=m +CONFIG_DHT11=m +CONFIG_HTU21=m ++CONFIG_INV_MPU6050_I2C=m ++CONFIG_BMP280=m +CONFIG_PWM_BCM2835=m +CONFIG_PWM_PCA9685=m +CONFIG_RASPBERRYPI_FIRMWARE=y @@ -111859,10 +114014,10 @@ index 0000000000000000000000000000000000000000..29fd2abc2cbfcaed37cb630b5edffaa5 +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -From 0c614d6ba3bdf1fade22f4f18c3a55654a73f023 Mon Sep 17 00:00:00 2001 +From 6d6fd6d9179c237acb740832880f1603e019e2cd Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Wed, 24 Aug 2016 03:35:56 -0700 -Subject: [PATCH 096/199] Add arm64 configuration and device tree differences. +Subject: [PATCH 102/129] Add arm64 configuration and device tree differences. Disable MMC_BCM2835_SDHOST and MMC_BCM2835 since these drivers are crashing at the moment. @@ -113276,10 +115431,10 @@ index 0000000000000000000000000000000000000000..e6b09fafa27eed2b762e3d53b55041f7 +CONFIG_LIBCRC32C=y +CONFIG_BCM2835_VCHIQ=n -From 8a91e5edc927197cf1630416ec6dcc2f8f415840 Mon Sep 17 00:00:00 2001 +From e9c43898ea8dd00edb15de87acca6c1c63048f1c Mon Sep 17 00:00:00 2001 From: Electron752 Date: Thu, 12 Jan 2017 07:07:08 -0800 -Subject: [PATCH 097/199] ARM64: Make it work again on 4.9 (#1790) +Subject: [PATCH 103/129] ARM64: Make it work again on 4.9 (#1790) * Invoke the dtc compiler with the same options used in arm mode. * ARM64 now uses the bcm2835 platform just like ARM32. @@ -113288,10 +115443,10 @@ Subject: [PATCH 097/199] ARM64: Make it work again on 4.9 (#1790) Signed-off-by: Michael Zoran --- arch/arm64/Kconfig.platforms | 28 -------- - arch/arm64/boot/dts/broadcom/Makefile | 9 +++ + arch/arm64/boot/dts/broadcom/Makefile | 11 ++- arch/arm64/boot/dts/overlays | 1 + arch/arm64/configs/bcmrpi3_defconfig | 125 +++++++++++----------------------- - 4 files changed, 48 insertions(+), 115 deletions(-) + 4 files changed, 49 insertions(+), 116 deletions(-) create mode 120000 arch/arm64/boot/dts/overlays diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms @@ -113333,10 +115488,10 @@ index d8550598e3403e7d35050e48e71bac17ed8dc493..1b7f6ea1171f5cc7a1df649d146520c1 bool "Allwinner sunxi 64-bit SoC Family" select ARCH_HAS_RESET_CONTROLLER diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile -index 1046bed8bf1509eaf3127733b9263fa39a166895..97af2ececc52ca3aad7b84dc2fdb5c269a45bde0 100644 +index 1046bed8bf1509eaf3127733b9263fa39a166895..3b76320112196a1fce7a0941c696fd1ec43b817f 100644 --- a/arch/arm64/boot/dts/broadcom/Makefile +++ b/arch/arm64/boot/dts/broadcom/Makefile -@@ -1,6 +1,15 @@ +@@ -1,8 +1,17 @@ +# Enable fixups to support overlays on BCM2835 platforms + +ifeq ($(CONFIG_ARCH_BCM2835),y) @@ -113350,8 +115505,11 @@ index 1046bed8bf1509eaf3127733b9263fa39a166895..97af2ececc52ca3aad7b84dc2fdb5c26 + +dts-dirs += ../overlays - dts-dirs := stingray +-dts-dirs := stingray ++dts-dirs += stingray always := $(dtb-y) + subdir-y := $(dts-dirs) + clean-files := *.dtb diff --git a/arch/arm64/boot/dts/overlays b/arch/arm64/boot/dts/overlays new file mode 120000 index 0000000000000000000000000000000000000000..ded08646b6f66cdf734f8bf9c1be3a2e3a7103d7 @@ -113688,10 +115846,10 @@ index e6b09fafa27eed2b762e3d53b55041f793683d27..c7e891d72969a388d9b135a36dbfc9c9 CONFIG_LIBCRC32C=y -CONFIG_BCM2835_VCHIQ=n -From ba699d70dc35ab69b559362ee0f3ab72eafc5824 Mon Sep 17 00:00:00 2001 +From fb47b55bed10e44abfe8e21cf6a8d3bf75e54200 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Thu, 12 Jan 2017 19:10:07 -0800 -Subject: [PATCH 098/199] ARM64: Enable HDMI audio and vc04_services in +Subject: [PATCH 104/129] ARM64: Enable HDMI audio and vc04_services in bcmrpi3_defconfig Signed-off-by: Michael Zoran @@ -113720,10 +115878,10 @@ index c7e891d72969a388d9b135a36dbfc9c9cb609bf8..4b90f9b64abe9f089ba56b13d5a00de3 CONFIG_BCM2835_MBOX=y # CONFIG_IOMMU_SUPPORT is not set -From 4745f7114e0a766c19b60c8dbb75290fc9793532 Mon Sep 17 00:00:00 2001 +From 900935e9cd0fd44dc9f8636308c8c7b421a8c83a Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Thu, 12 Jan 2017 19:14:03 -0800 -Subject: [PATCH 099/199] ARM64: Run bcmrpi3_defconfig through savedefconfig. +Subject: [PATCH 105/129] ARM64: Run bcmrpi3_defconfig through savedefconfig. Signed-off-by: Michael Zoran --- @@ -113768,10 +115926,10 @@ index 4b90f9b64abe9f089ba56b13d5a00de33343bfb9..dac962ca1634662ce7d966f1ffb53b5b CONFIG_FB_TFT_AGM1264K_FL=m CONFIG_FB_TFT_BD663474=m -From b1073189a8a4587bc0fc366ca84167202c8d5611 Mon Sep 17 00:00:00 2001 +From ef2764a77908404cd53995df24b1dc7fc66824cd Mon Sep 17 00:00:00 2001 From: Electron752 Date: Sat, 14 Jan 2017 02:54:26 -0800 -Subject: [PATCH 100/199] ARM64: Enable Kernel Address Space Randomization +Subject: [PATCH 106/129] ARM64: Enable Kernel Address Space Randomization (#1792) Randomization allows the mapping between virtual addresses and physical @@ -113803,10 +115961,10 @@ index dac962ca1634662ce7d966f1ffb53b5bfa27c506..aae33b4b3c3e736ea7cd3ca242158ad6 CONFIG_BINFMT_MISC=y CONFIG_COMPAT=y -From 4f9ae4d4070553f3600c1017add373cf60aa03b6 Mon Sep 17 00:00:00 2001 +From fe858fcdd237aca3425f4020862fc06a10ca12de Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sun, 15 Jan 2017 07:31:59 -0800 -Subject: [PATCH 101/199] ARM64: Enable RTL8187/RTL8192CU wifi in build config +Subject: [PATCH 107/129] ARM64: Enable RTL8187/RTL8192CU wifi in build config These drivers build now, so they can be enabled back in the build configuration just like they are for @@ -113831,10 +115989,10 @@ index aae33b4b3c3e736ea7cd3ca242158ad6ba558aff..b7d762df19b85e369a32cd823dfd0621 CONFIG_ZD1211RW=m CONFIG_MAC80211_HWSIM=m -From 22b662614fdf0110e08c561af08eb01e20f90bb7 Mon Sep 17 00:00:00 2001 +From f4fca0f5426c2745774afa536c2c4fc9aca8d9c8 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:33:51 -0800 -Subject: [PATCH 102/199] ARM64/DWC_OTG: Port dwc_otg driver to ARM64 +Subject: [PATCH 108/129] ARM64/DWC_OTG: Port dwc_otg driver to ARM64 In ARM64, the FIQ mechanism used by this driver is not current implemented. As a workaround, reqular IRQ is used instead @@ -113891,7 +116049,7 @@ index e7bdd12015fee1727a7956ae3e3b2786e88892c1..4872b8113b68bc9087cf5e128657c580 dwc_otg-objs += dwc_otg_cfi.o endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c -index 2035e0762dc6d60673c8fbc47a90b72254f50b69..208252645c09d1d17bf07673989f91b7f4b3ef7a 100644 +index b7731e7edb4602f93f028d786194822161bbf0f8..0163e9cf620ba58df36a872b82cea92734baada6 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c @@ -74,6 +74,21 @@ void notrace _fiq_print(enum fiq_debug_level dbg_lvl, volatile struct fiq_state @@ -113926,7 +116084,7 @@ index 2035e0762dc6d60673c8fbc47a90b72254f50b69..208252645c09d1d17bf07673989f91b7 * fiq_fsm_restart_channel() - Poke channel enable bit for a split transaction * @channel: channel to re-enable diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h -index f9fddfbcffb37f32c808fd78f222b676378398b1..0a1ddf3f89f45ca75b8880722fbc22cbdc9f4a2f 100644 +index 8340041ce65665c094e2ad49fd5e8eb1751506f3..ed088f34f210e9a337ab9b80fff0cf9e9b0241ea 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h @@ -127,6 +127,12 @@ enum fiq_debug_level { @@ -113951,7 +116109,7 @@ index f9fddfbcffb37f32c808fd78f222b676378398b1..0a1ddf3f89f45ca75b8880722fbc22cb struct fiq_state; extern void _fiq_print (enum fiq_debug_level dbg_lvl, volatile struct fiq_state *state, char *fmt, ...); -@@ -355,6 +363,22 @@ struct fiq_state { +@@ -357,6 +365,22 @@ struct fiq_state { struct fiq_channel_state channel[0]; }; @@ -113975,10 +116133,10 @@ index f9fddfbcffb37f32c808fd78f222b676378398b1..0a1ddf3f89f45ca75b8880722fbc22cb extern void fiq_fsm_spin_unlock(fiq_lock_t *lock); diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index 5e4d4ffe7966486d40a5b5e2423ac4df0de772a8..a2dc6337836b2719f4c954edeeb2a71301931b04 100644 +index 60464acab588a1e189f39b268ffc25766c13dc85..7710370b30363e3170bf9bf522597c5f41dfb908 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -@@ -1002,6 +1002,10 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd, dwc_otg_core_if_t * core_if) +@@ -1000,6 +1000,10 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd, dwc_otg_core_if_t * core_if) } DWC_MEMSET(hcd->fiq_state, 0, (sizeof(struct fiq_state) + (sizeof(struct fiq_channel_state) * num_channels))); @@ -114006,7 +116164,7 @@ index fb57db09378f4ab95d57cb58aa570a915ccb61c3..a384db5e7ac219936ace65e5616e68c8 /** * Returns private data set by diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index fc52495e4749f45dcf270c1c22960f163b6dc86d..a4355afc77b68718fdaba6c5d4be257dadc75036 100644 +index ed855eb9c3b64d54e93c5aa7e06212e779400dfd..c8f52709a7d24974c0a38dcf1708f91073e96b0e 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -36,8 +36,9 @@ @@ -114177,10 +116335,10 @@ index 6b2c7d0c93f36a63863ff4b0ecc1f3eab77e058b..d7b700ff17821ad1944e36721fe6b2db /** The OS page size */ #define DWC_OS_PAGE_SIZE PAGE_SIZE -From 084d9b5892b4378a088e96823e46050efc59f102 Mon Sep 17 00:00:00 2001 +From 167c98d704c7a38aeab88f5005077d4bdc3fcac9 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:43:57 -0800 -Subject: [PATCH 103/199] ARM64: Round-Robin dispatch IRQs between CPUs. +Subject: [PATCH 109/129] ARM64: Round-Robin dispatch IRQs between CPUs. IRQ-CPU mapping is round robined on ARM64 to increase concurrency and allow multiple interrupts to be serviced @@ -114222,7 +116380,7 @@ index 8ed457fd74bd23bee27b64a2c9e3828ce0e4fb87..a035e1ceacc0494fa293e6811ff8f7e3 static int armctrl_xlate(struct irq_domain *d, struct device_node *ctrlr, diff --git a/drivers/irqchip/irq-bcm2836.c b/drivers/irqchip/irq-bcm2836.c -index c4e151451cf8c8ebde5225515eac2786d6f61d46..9a7ee04ee0d9b7aa734cf3159ed59c19a338de0d 100644 +index bee4d2d2ebacc3233423bb9d825e076b9f52fccd..014f13f89eb896f5cfc75ed9891787d0490baa4b 100644 --- a/drivers/irqchip/irq-bcm2836.c +++ b/drivers/irqchip/irq-bcm2836.c @@ -145,6 +145,27 @@ static void bcm2836_arm_irqchip_unmask_gpu_irq(struct irq_data *d) @@ -114254,10 +116412,10 @@ index c4e151451cf8c8ebde5225515eac2786d6f61d46..9a7ee04ee0d9b7aa734cf3159ed59c19 .name = "bcm2836-gpu", .irq_mask = bcm2836_arm_irqchip_mask_gpu_irq, -From e8c95b8b02b65eb5c3dbbea55415133d36014b7e Mon Sep 17 00:00:00 2001 +From 3d387f3c82eb55430bceb4a21b3150e80a7a5a00 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:45:03 -0800 -Subject: [PATCH 104/199] ARM64: Enable DWC_OTG Driver In ARM64 Build +Subject: [PATCH 110/129] ARM64: Enable DWC_OTG Driver In ARM64 Build Config(bcmrpi3_defconfig) Signed-off-by: Michael Zoran @@ -114278,10 +116436,10 @@ index b7d762df19b85e369a32cd823dfd062145bdefa7..4d85c231c5ea0244e1b05fb4a5e3c8fd CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE_REALTEK=m -From 48468a21e50ad4bed91d82f8d003b23eb503b43e Mon Sep 17 00:00:00 2001 +From d340cd7493c6124278913e0e0bd1bcd00153f124 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 11 Feb 2017 01:18:31 -0800 -Subject: [PATCH 105/199] ARM64: Force hardware emulation of deprecated +Subject: [PATCH 111/129] ARM64: Force hardware emulation of deprecated instructions. --- @@ -114309,10 +116467,10 @@ index f0e6d717885b1fcf3b22f64c10c38f19c25f809d..0cb830d30fb6d2bd26ab572efe893649 case INSN_OBSOLETE: insn->current_mode = INSN_UNDEF; -From e25377a56bf44f29cd8c1f0ce8cabb672c6957a8 Mon Sep 17 00:00:00 2001 +From 4a4a6c4967fe59a4d24117939af272d3b4cc8712 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 10 Feb 2017 17:57:08 -0800 -Subject: [PATCH 106/199] build/arm64: Add rules for .dtbo files for dts +Subject: [PATCH 112/129] build/arm64: Add rules for .dtbo files for dts overlays We now create overlays as .dtbo files. @@ -114337,51 +116495,41 @@ index 9b41f1e3b1a039cd45fe842e10abff0181186fdf..dc2859b8eed168ed52e95c503e7a5ce3 dtbs: prepare scripts -From 6e4e26e2dad7cb32b71d00df6352d553c54d517a Mon Sep 17 00:00:00 2001 -From: Eric Anholt -Date: Mon, 9 May 2016 17:28:18 -0700 -Subject: [PATCH 107/199] clk: bcm2835: Mark GPIO clocks enabled at boot as - critical. +From cd741e0be1011d9e7c167cde89efb09f97648c00 Mon Sep 17 00:00:00 2001 +From: Bilal Amarni +Date: Wed, 24 May 2017 10:52:50 +0200 +Subject: [PATCH 113/129] enable drivers for GPIO expander and vcio -These divide off of PLLD_PER and are used for the ethernet and wifi -PHYs source PLLs. Neither of them is currently represented by a phy -device that would grab the clock for us. - -This keeps other drivers from killing the networking PHYs when they -disable their own clocks and trigger PLLD_PER's refcount going to 0. - -v2: Skip marking as critical if they aren't on at boot. - -Signed-off-by: Eric Anholt --- - drivers/clk/bcm/clk-bcm2835.c | 9 +++++++++ - 1 file changed, 9 insertions(+) + arch/arm64/configs/bcmrpi3_defconfig | 3 +++ + 1 file changed, 3 insertions(+) -diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c -index 336f8c9c44325d0a94e591a8557f7af246adc857..caa05e5ad0b7b5cd683e04fb3591a3dfcb40823f 100644 ---- a/drivers/clk/bcm/clk-bcm2835.c -+++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1484,6 +1484,15 @@ static struct clk_hw *bcm2835_register_clock(struct bcm2835_cprman *cprman, - init.flags = data->flags | CLK_IGNORE_UNUSED; - - /* -+ * Some GPIO clocks for ethernet/wifi PLLs are marked as -+ * critical (since some platforms use them), but if the -+ * firmware didn't have them turned on then they clearly -+ * aren't actually critical. -+ */ -+ if ((cprman_read(cprman, data->ctl_reg) & CM_ENABLE) == 0) -+ init.flags &= ~CLK_IS_CRITICAL; -+ -+ /* - * Pass the CLK_SET_RATE_PARENT flag if we are allowed to propagate - * rate changes on at least of the parents. - */ +diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig +index 4d85c231c5ea0244e1b05fb4a5e3c8fd3e651ddf..9dcb58a519d041fadae99c81a7bda621b2a49f12 100644 +--- a/arch/arm64/configs/bcmrpi3_defconfig ++++ b/arch/arm64/configs/bcmrpi3_defconfig +@@ -575,6 +575,8 @@ CONFIG_SERIO_RAW=m + CONFIG_GAMEPORT=m + CONFIG_GAMEPORT_NS558=m + CONFIG_GAMEPORT_L4=m ++CONFIG_BRCM_CHAR_DRIVERS=y ++CONFIG_BCM_VCIO=y + # CONFIG_BCM2835_DEVGPIOMEM is not set + # CONFIG_BCM2835_SMI_DEV is not set + # CONFIG_LEGACY_PTYS is not set +@@ -609,6 +611,7 @@ CONFIG_PPS=m + CONFIG_PPS_CLIENT_LDISC=m + CONFIG_PPS_CLIENT_GPIO=m + CONFIG_GPIO_SYSFS=y ++CONFIG_GPIO_BCM_EXP=y + CONFIG_GPIO_BCM_VIRT=y + CONFIG_GPIO_ARIZONA=m + CONFIG_GPIO_STMPE=y -From 8ba1d51bc8cb9a1660ef5a16b89ece470f9a3f6a Mon Sep 17 00:00:00 2001 +From 049d05d668250c8ecd91908177fed22322a7797b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 24 Feb 2015 13:40:50 +0000 -Subject: [PATCH 108/199] pinctrl-bcm2835: Fix interrupt handling for GPIOs +Subject: [PATCH 114/129] pinctrl-bcm2835: Fix interrupt handling for GPIOs 28-31 and 46-53 Contrary to the documentation, the BCM2835 GPIO controller actually has @@ -114414,38 +116562,10 @@ index a9d480df32562defbf8be0faf0a39bfe06ff71f9..18c92bae3b2e7e9f8208ca0d4487b08b .suppress_bind_attrs = true, }, -From 7a1439b8ae71715ce37c8172bb02395a2195d917 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Thu, 23 Mar 2017 10:06:56 +0000 -Subject: [PATCH 109/199] ASoC: Add prompt for ICS43432 codec - -Without a prompt string, a config setting can't be included in a -defconfig. Give CONFIG_SND_SOC_ICS43432 a prompt so that Pi soundcards -can use the driver. - -Signed-off-by: Phil Elwell ---- - sound/soc/codecs/Kconfig | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig -index aca3a53f08dba8762307f7c25a5d7c5561b9cf71..a3be6e005a895b995897cc007bb85c780a42de8b 100644 ---- a/sound/soc/codecs/Kconfig -+++ b/sound/soc/codecs/Kconfig -@@ -573,7 +573,7 @@ config SND_SOC_HDAC_HDMI - select HDMI - - config SND_SOC_ICS43432 -- tristate -+ tristate "InvenSense ICS43432 I2S microphone codec" - - config SND_SOC_INNO_RK3036 - tristate "Inno codec driver for RK3036 SoC" - -From a96b3ae65e7787e3aed57728790d890d01c91280 Mon Sep 17 00:00:00 2001 +From 90aed6ca4d4698fac72196495c38bcfbc2adaaf5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 16:34:46 +0000 -Subject: [PATCH 110/199] bcm2835-aux: Add aux interrupt controller +Subject: [PATCH 115/129] bcm2835-aux: Add aux interrupt controller The AUX block has a shared interrupt line with a register indicating which devices have active IRQs. Expose this as a nested interrupt @@ -114609,213 +116729,10 @@ index bd750cf2238d61489811e7d7bd3b5f9950ed53c8..41e0702fae4692221980b0d02aed1ba6 BCM2835_AUX_CLOCK_COUNT, GFP_KERNEL); if (!onecell) -From 41c0b2c6f9d170b84bb010fa176d8bad683bc452 Mon Sep 17 00:00:00 2001 -From: Stefan Agner -Date: Fri, 29 Apr 2016 10:32:17 -0700 -Subject: [PATCH 111/199] mmc: read mmc alias from device tree - -To get the SD/MMC host device ID, read the alias from the device -tree. - -This is useful in case a SoC has multipe SD/MMC host controllers while -the second controller should logically be the first device (e.g. if -the second controller is connected to an internal eMMC). Combined -with block device numbering using MMC/SD host device ID, this -results in predictable name assignment of the internal eMMC block -device. - -Signed-off-by: Stefan Agner -Signed-off-by: Dmitry Torokhov -[dianders: rebase + roll in http://crosreview.com/259916] -Signed-off-by: Douglas Anderson ---- - drivers/mmc/core/host.c | 17 ++++++++++++++++- - 1 file changed, 16 insertions(+), 1 deletion(-) - -diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c -index 1503412f826cd0e0e9ad37a0554b31596a49eb77..2f5b3cf86293b96b104eac7c6d48a5839d7e974b 100644 ---- a/drivers/mmc/core/host.c -+++ b/drivers/mmc/core/host.c -@@ -344,15 +344,30 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev) - { - int err; - struct mmc_host *host; -+ int id; - - host = kzalloc(sizeof(struct mmc_host) + extra, GFP_KERNEL); - if (!host) - return NULL; - -+ /* If OF aliases exist, start dynamic assignment after highest */ -+ id = of_alias_get_highest_id("mmc"); -+ id = (id < 0) ? 0 : id + 1; -+ -+ /* If this devices has OF node, maybe it has an alias */ -+ if (dev->of_node) { -+ int of_id = of_alias_get_id(dev->of_node, "mmc"); -+ -+ if (of_id < 0) -+ dev_warn(dev, "/aliases ID not available\n"); -+ else -+ id = of_id; -+ } -+ - /* scanning will be enabled when we're ready */ - host->rescan_disable = 1; - -- err = ida_simple_get(&mmc_host_ida, 0, 0, GFP_KERNEL); -+ err = ida_simple_get(&mmc_host_ida, id, 0, GFP_KERNEL); - if (err < 0) { - kfree(host); - return NULL; - -From e4a17cab1aaee3115790fd04fba8c800ef7352d2 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Wed, 11 May 2016 12:50:33 +0100 -Subject: [PATCH 112/199] mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards - -Some SD cards have been found that corrupt data when small blocks -are erased. Add a quirk to indicate that ERASE should not be used, -and set it for cards of that type. - -Signed-off-by: Phil Elwell - -mmc: Apply QUIRK_BROKEN_ERASE to other capacities - -Signed-off-by: Phil Elwell - -mmc: Add card_quirks module parameter, log quirks - -Use mmc_block.card_quirks to override the quirks for all SD or MMC -cards. The value is a bitfield using the bit positions defined in -include/linux/mmc/card.h. If the module parameter is placed in the -kernel command line (or bootargs) stored on the card then, assuming the -device only has one SD card interface, the override effectively becomes -card-specific. - -Signed-off-by: Phil Elwell ---- - drivers/mmc/core/block.c | 28 +++++++++++++++++++++++++--- - drivers/mmc/core/core.c | 3 ++- - drivers/mmc/core/quirks.h | 11 +++++++++++ - include/linux/mmc/card.h | 2 ++ - 4 files changed, 40 insertions(+), 4 deletions(-) - -diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c -index 8bd7aba811e969a3b7cfdc6cf12e685f25e8c37e..cd1eb5cf73358a0104fbf4b6ed8e72dd491d658d 100644 ---- a/drivers/mmc/core/block.c -+++ b/drivers/mmc/core/block.c -@@ -125,6 +125,13 @@ static DEFINE_MUTEX(open_lock); - module_param(perdev_minors, int, 0444); - MODULE_PARM_DESC(perdev_minors, "Minors numbers to allocate per device"); - -+/* -+ * Allow quirks to be overridden for the current card -+ */ -+static char *card_quirks; -+module_param(card_quirks, charp, 0644); -+MODULE_PARM_DESC(card_quirks, "Force the use of the indicated quirks (a bitfield)"); -+ - static inline int mmc_blk_part_switch(struct mmc_card *card, - struct mmc_blk_data *md); - -@@ -2287,6 +2294,7 @@ static int mmc_blk_probe(struct mmc_card *card) - { - struct mmc_blk_data *md, *part_md; - char cap_str[10]; -+ char quirk_str[24]; - - /* - * Check that the card supports the command class(es) we need. -@@ -2294,7 +2302,16 @@ static int mmc_blk_probe(struct mmc_card *card) - if (!(card->csd.cmdclass & CCC_BLOCK_READ)) - return -ENODEV; - -- mmc_fixup_device(card, mmc_blk_fixups); -+ if (card_quirks) { -+ unsigned long quirks; -+ if (kstrtoul(card_quirks, 0, &quirks) == 0) -+ card->quirks = (unsigned int)quirks; -+ else -+ pr_err("mmc_block: Invalid card_quirks parameter '%s'\n", -+ card_quirks); -+ } -+ else -+ mmc_fixup_device(card, mmc_blk_fixups); - - md = mmc_blk_alloc(card); - if (IS_ERR(md)) -@@ -2302,9 +2319,14 @@ static int mmc_blk_probe(struct mmc_card *card) - - string_get_size((u64)get_capacity(md->disk), 512, STRING_UNITS_2, - cap_str, sizeof(cap_str)); -- pr_info("%s: %s %s %s %s\n", -+ if (card->quirks) -+ snprintf(quirk_str, sizeof(quirk_str), -+ " (quirks 0x%08x)", card->quirks); -+ else -+ quirk_str[0] = '\0'; -+ pr_info("%s: %s %s %s%s%s\n", - md->disk->disk_name, mmc_card_id(card), mmc_card_name(card), -- cap_str, md->read_only ? "(ro)" : ""); -+ cap_str, md->read_only ? " (ro)" : "", quirk_str); - - if (mmc_blk_alloc_parts(card, md)) - goto out; -diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c -index 26431267a3e2d790d4eae99e65881ca60bd2047d..0ec589ace762a27f3c5ea39226fef3a67442675f 100644 ---- a/drivers/mmc/core/core.c -+++ b/drivers/mmc/core/core.c -@@ -2211,7 +2211,8 @@ EXPORT_SYMBOL(mmc_erase); - int mmc_can_erase(struct mmc_card *card) - { - if ((card->host->caps & MMC_CAP_ERASE) && -- (card->csd.cmdclass & CCC_ERASE) && card->erase_size) -+ (card->csd.cmdclass & CCC_ERASE) && card->erase_size && -+ !(card->quirks & MMC_QUIRK_ERASE_BROKEN)) - return 1; - return 0; - } -diff --git a/drivers/mmc/core/quirks.h b/drivers/mmc/core/quirks.h -index fb725934fa21cee1b98fd7bc08227bf6d0317549..05c8d7381fff5ae88531129d9a5ddd554bddb43e 100644 ---- a/drivers/mmc/core/quirks.h -+++ b/drivers/mmc/core/quirks.h -@@ -90,6 +90,17 @@ static const struct mmc_fixup mmc_blk_fixups[] = { - MMC_FIXUP("V10016", CID_MANFID_KINGSTON, CID_OEMID_ANY, add_quirk_mmc, - MMC_QUIRK_TRIM_BROKEN), - -+ /* -+ * On some Kingston SD cards, multiple erases of less than 64 -+ * sectors can cause corruption. -+ */ -+ MMC_FIXUP("SD16G", 0x41, 0x3432, add_quirk_mmc, -+ MMC_QUIRK_ERASE_BROKEN), -+ MMC_FIXUP("SD32G", 0x41, 0x3432, add_quirk_mmc, -+ MMC_QUIRK_ERASE_BROKEN), -+ MMC_FIXUP("SD64G", 0x41, 0x3432, add_quirk_mmc, -+ MMC_QUIRK_ERASE_BROKEN), -+ - END_FIXUP - }; - -diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h -index 46c73e97e61f08a41d9753079345f5965caebbc5..388c551ed11e9d06ea1c25b6553d47a8d668953a 100644 ---- a/include/linux/mmc/card.h -+++ b/include/linux/mmc/card.h -@@ -269,6 +269,8 @@ struct mmc_card { - #define MMC_QUIRK_TRIM_BROKEN (1<<12) /* Skip trim */ - #define MMC_QUIRK_BROKEN_HPI (1<<13) /* Disable broken HPI support */ - -+#define MMC_QUIRK_ERASE_BROKEN (1<<31) /* Skip erase */ -+ - bool reenable_cmdq; /* Re-enable Command Queue */ - - unsigned int erase_size; /* erase size in sectors */ - -From bc8a54e265eb99330b99592b0a2697527b419a14 Mon Sep 17 00:00:00 2001 +From a2b5db64ae961375981dc9c21230e918e9da1a53 Mon Sep 17 00:00:00 2001 From: Yasunari Takiguchi Date: Fri, 14 Apr 2017 10:43:57 +0100 -Subject: [PATCH 113/199] This is the driver for Sony CXD2880 DVB-T2/T tuner + +Subject: [PATCH 116/129] This is the driver for Sony CXD2880 DVB-T2/T tuner + demodulator. It includes the CXD2880 driver and the CXD2880 SPI adapter. The current CXD2880 driver version is 1.4.1 - 1.0.1 released on April 13, 2017. @@ -130947,10 +132864,10 @@ index 0000000000000000000000000000000000000000..82e122349055be817eb74ed5bbcd7560 +MODULE_AUTHOR("Sony Semiconductor Solutions Corporation"); +MODULE_LICENSE("GPL v2"); -From 98e3c0e9fb2766ef037ebe71559f5952f328849a Mon Sep 17 00:00:00 2001 +From 8519c61633549f88e24ec126082a29c176da4253 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:18:09 +0100 -Subject: [PATCH 114/199] raspberrypi-firmware: Define the MBOX channel in the +Subject: [PATCH 117/129] raspberrypi-firmware: Define the MBOX channel in the header. Signed-off-by: Eric Anholt @@ -130972,10 +132889,10 @@ index c819c21b0158a59c1308882e5a40e3f3fe73cbdf..de2a3dcd562beb752266eaf0070e5586 enum rpi_firmware_property_status { -From 2e01d3c71c50672a9fcb0b18f1abf66ed22404b8 Mon Sep 17 00:00:00 2001 +From 49686a4d16e39cbe24057dc16ec0cffb0009055f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:16:19 +0100 -Subject: [PATCH 115/199] raspberrypi-firmware: Export the general transaction +Subject: [PATCH 118/129] raspberrypi-firmware: Export the general transaction function. The vc4-firmware-kms module is going to be doing the MBOX FB call. @@ -131019,10 +132936,10 @@ index de2a3dcd562beb752266eaf0070e55861d553f5f..dc7fd58afd5dddebf9b17065bb069a1d #endif /* __SOC_RASPBERRY_FIRMWARE_H__ */ -From 8504a4123116599240bd60725badc83c4124094a Mon Sep 17 00:00:00 2001 +From 89922ab276b06410d8ef5e78f370a8e13bacfe32 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 08:39:33 +0100 -Subject: [PATCH 116/199] drm/vc4: Add a mode for using the closed firmware for +Subject: [PATCH 119/129] drm/vc4: Add a mode for using the closed firmware for display. Signed-off-by: Eric Anholt @@ -131794,10 +133711,10 @@ index 0000000000000000000000000000000000000000..7dd233eed677c1689492ab95bc864753 + }, +}; -From 8974c502145b67e125c609be2e2ce833cbac8894 Mon Sep 17 00:00:00 2001 +From 98157ac6f00edcad39580c8ee8c665a11d89ba08 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Feb 2017 17:09:18 -0800 -Subject: [PATCH 117/199] drm/vc4: Name the primary and cursor planes in fkms. +Subject: [PATCH 120/129] drm/vc4: Name the primary and cursor planes in fkms. This makes debugging nicer, compared to trying to remember what the IDs are. @@ -131821,10 +133738,10 @@ index 7dd233eed677c1689492ab95bc86475330d2d63b..e6097046fb25361bc61d657083d95b63 if (type == DRM_PLANE_TYPE_PRIMARY) { vc4_plane->fbinfo = -From 6aecce4695f3c447cee0fd40286a0a5cbf90a757 Mon Sep 17 00:00:00 2001 +From de225be7df4dcaad443716baf7c4249109adcc0f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Feb 2017 17:10:09 -0800 -Subject: [PATCH 118/199] drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of +Subject: [PATCH 121/129] drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of fkms. Trying to debug weston on fkms involved figuring out what calls I was @@ -131894,10 +133811,10 @@ index e6097046fb25361bc61d657083d95b634232aabc..72d0b9cffe3d2997d69040c46f4aee11 RPI_FIRMWARE_SET_CURSOR_STATE, &packet_state, -From f7634a508d916ee80c2c5e13efe3bd0c8a150e01 Mon Sep 17 00:00:00 2001 +From f2e9a1b05c7e626085cf93930263e0e9b9154877 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 2 Feb 2017 09:42:18 -0800 -Subject: [PATCH 119/199] drm/vc4: Fix sending of page flip completion events +Subject: [PATCH 122/129] drm/vc4: Fix sending of page flip completion events in FKMS mode. In the rewrite of vc4_crtc.c for fkms, I dropped the part of the @@ -131939,10 +133856,10 @@ index 72d0b9cffe3d2997d69040c46f4aee11e22aa213..185f9bd3c1b2d47d0c1fc5293db4199b static void vc4_crtc_handle_page_flip(struct vc4_crtc *vc4_crtc) -From 6f85a018909173940a13cc4c9f64ae9c247d2e6d Mon Sep 17 00:00:00 2001 +From caeeb7fd92cb6b7225ecf470191983090d4c6ad1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 18 Apr 2017 21:43:46 +0100 -Subject: [PATCH 120/199] vc4_fkms: Apply firmware overscan offset to hardware +Subject: [PATCH 123/129] vc4_fkms: Apply firmware overscan offset to hardware cursor --- @@ -131999,1031 +133916,10 @@ index 185f9bd3c1b2d47d0c1fc5293db4199bd8963023..072f377b7423ee603d73ace2bf6d620f return 0; -From ef1fd13268221caf2cf997ee3d66bb5d7b04201e Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Tue, 16 May 2017 14:39:49 +0100 -Subject: [PATCH 121/199] mmc: Change downstream MMC driver CONFIG option - -The upstream SDHOST driver has now claimed CONFIG_MMC_BCM2835, which -clashes with the downstream MMC driver. Rename the downstream option to -CONFIG_MMC_BCM2835_MMC. - -Signed-off-by: Phil Elwell ---- - drivers/mmc/host/Kconfig | 4 ++-- - drivers/mmc/host/Makefile | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig -index 64bd7825131d3dcb003e7ece581b8d599a717b31..d47cce77c0551d78fa51f50e2c8086f26c7b9e56 100644 ---- a/drivers/mmc/host/Kconfig -+++ b/drivers/mmc/host/Kconfig -@@ -4,7 +4,7 @@ - - comment "MMC/SD/SDIO Host Controller Drivers" - --config MMC_BCM2835 -+config MMC_BCM2835_MMC - tristate "MMC support on BCM2835" - depends on MACH_BCM2708 || MACH_BCM2709 || ARCH_BCM2835 - help -@@ -16,7 +16,7 @@ config MMC_BCM2835 - - config MMC_BCM2835_DMA - bool "DMA support on BCM2835 Arasan controller" -- depends on MMC_BCM2835 -+ depends on MMC_BCM2835_MMC - help - Enable DMA support on the Arasan SDHCI controller in Broadcom 2708 - based chips. -diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile -index cd3a47d8965958ccf3ac3d186a05bbd437494154..9ba643d3b2e12960f5ce4b0eb5d75c1c360980ce 100644 ---- a/drivers/mmc/host/Makefile -+++ b/drivers/mmc/host/Makefile -@@ -18,7 +18,7 @@ obj-$(CONFIG_MMC_SDHCI_S3C) += sdhci-s3c.o - obj-$(CONFIG_MMC_SDHCI_SIRF) += sdhci-sirf.o - obj-$(CONFIG_MMC_SDHCI_F_SDH30) += sdhci_f_sdh30.o - obj-$(CONFIG_MMC_SDHCI_SPEAR) += sdhci-spear.o --obj-$(CONFIG_MMC_BCM2835) += bcm2835-mmc.o -+obj-$(CONFIG_MMC_BCM2835_MMC) += bcm2835-mmc.o - obj-$(CONFIG_MMC_BCM2835_SDHOST) += bcm2835-sdhost.o - obj-$(CONFIG_MMC_WBSD) += wbsd.o - obj-$(CONFIG_MMC_AU1X) += au1xmmc.o - -From 9cd4ffbb09e60102daf319a8301806cc1025306f Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Tue, 16 May 2017 19:34:52 +0100 -Subject: [PATCH 122/199] config: Add CONFIG_I2C_ROBOTFUZZ_OSIF - ---- - arch/arm/configs/bcm2709_defconfig | 1 + - arch/arm/configs/bcmrpi_defconfig | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 93cdfa4ce3e7d3ff9f437a05a9ee6bcf4b895a20..4afeb9120a1d8411648c9ac685665aeb395af448 100644 ---- a/arch/arm/configs/bcm2709_defconfig -+++ b/arch/arm/configs/bcm2709_defconfig -@@ -614,6 +614,7 @@ CONFIG_I2C_MUX_PCA954x=m - CONFIG_I2C_BCM2708=m - CONFIG_I2C_BCM2835=m - CONFIG_I2C_GPIO=m -+CONFIG_I2C_ROBOTFUZZ_OSIF=m - CONFIG_SPI=y - CONFIG_SPI_BCM2835=m - CONFIG_SPI_BCM2835AUX=m -diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 29fd2abc2cbfcaed37cb630b5edffaa5b4994f6e..05d6d108cb2d013588ccc971c83dcd212308f230 100644 ---- a/arch/arm/configs/bcmrpi_defconfig -+++ b/arch/arm/configs/bcmrpi_defconfig -@@ -610,6 +610,7 @@ CONFIG_I2C_MUX_PCA954x=m - CONFIG_I2C_BCM2708=m - CONFIG_I2C_BCM2835=m - CONFIG_I2C_GPIO=m -+CONFIG_I2C_ROBOTFUZZ_OSIF=m - CONFIG_SPI=y - CONFIG_SPI_BCM2835=m - CONFIG_SPI_BCM2835AUX=m - -From dfcd6c4844d7d84e31ff8fc483e986d4a67f9c11 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Thu, 18 May 2017 11:40:43 +0100 -Subject: [PATCH 123/199] config: Add FB_TFT_ST7789V module - ---- - arch/arm/configs/bcm2709_defconfig | 1 + - arch/arm/configs/bcmrpi_defconfig | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 4afeb9120a1d8411648c9ac685665aeb395af448..cdf0206ea890c3843542f8f1db546e93e9a1f8ba 100644 ---- a/arch/arm/configs/bcm2709_defconfig -+++ b/arch/arm/configs/bcm2709_defconfig -@@ -1138,6 +1138,7 @@ CONFIG_FB_TFT_SSD1306=m - CONFIG_FB_TFT_SSD1331=m - CONFIG_FB_TFT_SSD1351=m - CONFIG_FB_TFT_ST7735R=m -+CONFIG_FB_TFT_ST7789V=m - CONFIG_FB_TFT_TINYLCD=m - CONFIG_FB_TFT_TLS8204=m - CONFIG_FB_TFT_UC1701=m -diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 05d6d108cb2d013588ccc971c83dcd212308f230..54175b3c558e89d56b7d65752bccc6bdaebcfd5a 100644 ---- a/arch/arm/configs/bcmrpi_defconfig -+++ b/arch/arm/configs/bcmrpi_defconfig -@@ -1145,6 +1145,7 @@ CONFIG_FB_TFT_SSD1306=m - CONFIG_FB_TFT_SSD1331=m - CONFIG_FB_TFT_SSD1351=m - CONFIG_FB_TFT_ST7735R=m -+CONFIG_FB_TFT_ST7789V=m - CONFIG_FB_TFT_TINYLCD=m - CONFIG_FB_TFT_TLS8204=m - CONFIG_FB_TFT_UC1701=m - -From 0bae2d1c40795865ccb314128e49f85af7b52dcb Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Thu, 18 May 2017 15:36:46 +0100 -Subject: [PATCH 124/199] staging: bcm2835-audio: Fix memory corruption - -I'm all for fixing memory leaks, but freeing a block while it is still -being used is a recipe for hard-to-debug kernel exeptions. - -1) There is already a vchi method for freeing the instance, so use it. -2) Only call it on error, and then only before initted is false. - -Signed-off-by: Phil Elwell -Fixes: 0adbfd4694c2 ("staging: bcm2835-audio: fix memory leak in bcm2835_audio_open_connection()") ---- - drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c -index 5f3d8f2339e34834d11edfa8de1d5819e3e32b4f..89f96f3c02805f4114ec9b488e18d00e1f348239 100644 ---- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c -+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c -@@ -409,6 +409,7 @@ static int bcm2835_audio_open_connection(struct bcm2835_alsa_stream *alsa_stream - LOG_ERR("%s: failed to connect VCHI instance (ret=%d)\n", - __func__, ret); - -+ vchi_disconnect(vchi_instance); - ret = -EIO; - goto err_free_mem; - } -@@ -431,7 +432,6 @@ static int bcm2835_audio_open_connection(struct bcm2835_alsa_stream *alsa_stream - LOG_DBG(" success !\n"); - ret = 0; - err_free_mem: -- kfree(vchi_instance); - - return ret; - } - -From f200034fec4863c4af91348dd99ca0a26e328ecc Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Mon, 15 May 2017 16:40:05 +0100 -Subject: [PATCH 125/199] config: Add CONFIG_TOUCHSCREEN_GOODIX - ---- - arch/arm/configs/bcm2709_defconfig | 1 + - arch/arm/configs/bcmrpi_defconfig | 1 - - 2 files changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index cdf0206ea890c3843542f8f1db546e93e9a1f8ba..2624359759f0318290287c6201cf7e511367128d 100644 ---- a/arch/arm/configs/bcm2709_defconfig -+++ b/arch/arm/configs/bcm2709_defconfig -@@ -566,6 +566,7 @@ CONFIG_INPUT_TOUCHSCREEN=y - CONFIG_TOUCHSCREEN_ADS7846=m - CONFIG_TOUCHSCREEN_EGALAX=m - CONFIG_TOUCHSCREEN_EDT_FT5X06=m -+CONFIG_TOUCHSCREEN_GOODIX=m - CONFIG_TOUCHSCREEN_RPI_FT5406=m - CONFIG_TOUCHSCREEN_USB_COMPOSITE=m - CONFIG_TOUCHSCREEN_STMPE=m -diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 54175b3c558e89d56b7d65752bccc6bdaebcfd5a..1d2d27cb950b5e799370b7ca557f4bcb2508169b 100644 ---- a/arch/arm/configs/bcmrpi_defconfig -+++ b/arch/arm/configs/bcmrpi_defconfig -@@ -560,7 +560,6 @@ CONFIG_JOYSTICK_RPISENSE=m - CONFIG_INPUT_TOUCHSCREEN=y - CONFIG_TOUCHSCREEN_ADS7846=m - CONFIG_TOUCHSCREEN_EGALAX=m --CONFIG_TOUCHSCREEN_EDT_FT5X06=m - CONFIG_TOUCHSCREEN_GOODIX=m - CONFIG_TOUCHSCREEN_RPI_FT5406=m - CONFIG_TOUCHSCREEN_USB_COMPOSITE=m - -From 4af04e40619bf2cbc3d51925d782e584c4b2cfd6 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Tue, 16 May 2017 15:58:00 +0100 -Subject: [PATCH 126/199] config: Add CONFIG_TOUCHSCREEN_EDT_FT5X06 - ---- - arch/arm/configs/bcm2709_defconfig | 1 + - arch/arm/configs/bcmrpi_defconfig | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 2624359759f0318290287c6201cf7e511367128d..e1855e95ad612c5c615da8edd90b9b6cfd4e0807 100644 ---- a/arch/arm/configs/bcm2709_defconfig -+++ b/arch/arm/configs/bcm2709_defconfig -@@ -567,6 +567,7 @@ CONFIG_TOUCHSCREEN_ADS7846=m - CONFIG_TOUCHSCREEN_EGALAX=m - CONFIG_TOUCHSCREEN_EDT_FT5X06=m - CONFIG_TOUCHSCREEN_GOODIX=m -+CONFIG_TOUCHSCREEN_EDT_FT5X06=m - CONFIG_TOUCHSCREEN_RPI_FT5406=m - CONFIG_TOUCHSCREEN_USB_COMPOSITE=m - CONFIG_TOUCHSCREEN_STMPE=m -diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 1d2d27cb950b5e799370b7ca557f4bcb2508169b..de0b998202e23eec39fafce0e8cd346e68817f6c 100644 ---- a/arch/arm/configs/bcmrpi_defconfig -+++ b/arch/arm/configs/bcmrpi_defconfig -@@ -561,6 +561,7 @@ CONFIG_INPUT_TOUCHSCREEN=y - CONFIG_TOUCHSCREEN_ADS7846=m - CONFIG_TOUCHSCREEN_EGALAX=m - CONFIG_TOUCHSCREEN_GOODIX=m -+CONFIG_TOUCHSCREEN_EDT_FT5X06=m - CONFIG_TOUCHSCREEN_RPI_FT5406=m - CONFIG_TOUCHSCREEN_USB_COMPOSITE=m - CONFIG_TOUCHSCREEN_STMPE=m - -From c3bb07909a287fb80ae3c0ed356c589b9fa5f4ed Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Mon, 22 May 2017 13:35:28 +0100 -Subject: [PATCH 127/199] config: Add CONFIG_IPV6_SIT_6RD - ---- - arch/arm/configs/bcm2709_defconfig | 1 + - arch/arm/configs/bcmrpi_defconfig | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index e1855e95ad612c5c615da8edd90b9b6cfd4e0807..43928722d8f751b137d40ac22ae672bc6282c091 100644 ---- a/arch/arm/configs/bcm2709_defconfig -+++ b/arch/arm/configs/bcm2709_defconfig -@@ -106,6 +106,7 @@ CONFIG_IPV6_ROUTER_PREF=y - CONFIG_INET6_AH=m - CONFIG_INET6_ESP=m - CONFIG_INET6_IPCOMP=m -+CONFIG_IPV6_SIT_6RD=y - CONFIG_IPV6_TUNNEL=m - CONFIG_IPV6_MULTIPLE_TABLES=y - CONFIG_IPV6_SUBTREES=y -diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index de0b998202e23eec39fafce0e8cd346e68817f6c..c4d82bec0aefc191c6049500fbeda6ea0a47f590 100644 ---- a/arch/arm/configs/bcmrpi_defconfig -+++ b/arch/arm/configs/bcmrpi_defconfig -@@ -101,6 +101,7 @@ CONFIG_IPV6_ROUTER_PREF=y - CONFIG_INET6_AH=m - CONFIG_INET6_ESP=m - CONFIG_INET6_IPCOMP=m -+CONFIG_IPV6_SIT_6RD=y - CONFIG_IPV6_TUNNEL=m - CONFIG_IPV6_MULTIPLE_TABLES=y - CONFIG_IPV6_SUBTREES=y - -From cf46fca414a06bf4afc633d2759295983f32b52b Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Mon, 22 May 2017 15:28:27 +0100 -Subject: [PATCH 128/199] config: Add CONFIG_IPV6_ROUTE_INFO - ---- - arch/arm/configs/bcm2709_defconfig | 1 + - arch/arm/configs/bcmrpi_defconfig | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 43928722d8f751b137d40ac22ae672bc6282c091..ba89462cf80f17e6275c1e7912d754d672d4c68d 100644 ---- a/arch/arm/configs/bcm2709_defconfig -+++ b/arch/arm/configs/bcm2709_defconfig -@@ -103,6 +103,7 @@ CONFIG_TCP_CONG_ADVANCED=y - CONFIG_TCP_CONG_BBR=m - CONFIG_IPV6=m - CONFIG_IPV6_ROUTER_PREF=y -+CONFIG_IPV6_ROUTE_INFO=y - CONFIG_INET6_AH=m - CONFIG_INET6_ESP=m - CONFIG_INET6_IPCOMP=m -diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index c4d82bec0aefc191c6049500fbeda6ea0a47f590..7d3522df2b28e53cb63a0813168918792b65becb 100644 ---- a/arch/arm/configs/bcmrpi_defconfig -+++ b/arch/arm/configs/bcmrpi_defconfig -@@ -98,6 +98,7 @@ CONFIG_TCP_CONG_ADVANCED=y - CONFIG_TCP_CONG_BBR=m - CONFIG_IPV6=m - CONFIG_IPV6_ROUTER_PREF=y -+CONFIG_IPV6_ROUTE_INFO=y - CONFIG_INET6_AH=m - CONFIG_INET6_ESP=m - CONFIG_INET6_IPCOMP=m - -From e10daa78716bca9ad5158baed4fd4227d0a5d1ec Mon Sep 17 00:00:00 2001 -From: P33M -Date: Thu, 25 May 2017 16:04:53 +0100 -Subject: [PATCH 129/199] dwc_otg: make periodic scheduling behave properly for - FS buses - -If the root port is in full-speed mode, transfer times at 12mbit/s -would be calculated but matched against high-speed quotas. - -Reinitialise hcd->frame_usecs[i] on each port enable event so that -full-speed bandwidth can be tracked sensibly. - -Also, don't bother using the FIQ for transfers when in full-speed -mode - at the slower bus speed, interrupt frequency is reduced by -an order of magnitude. - -Related issue: https://github.com/raspberrypi/linux/issues/2020 ---- - drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 15 ++++++++++----- - drivers/usb/host/dwc_otg/dwc_otg_hcd.h | 7 +++++-- - drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 4 ++++ - drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c | 19 ++++++++++++------- - 4 files changed, 31 insertions(+), 14 deletions(-) - -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index a2dc6337836b2719f4c954edeeb2a71301931b04..38bf5fc792d32352f9e208e0e90f968599b9bc31 100644 ---- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -@@ -926,8 +926,6 @@ static void dwc_otg_hcd_free(dwc_otg_hcd_t * dwc_otg_hcd) - DWC_FREE(dwc_otg_hcd); - } - --int init_hcd_usecs(dwc_otg_hcd_t *_hcd); -- - int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd, dwc_otg_core_if_t * core_if) - { - struct device *dev = dwc_otg_hcd_to_dev(hcd); -@@ -1429,6 +1427,7 @@ static void assign_and_init_hc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) - - /** - * fiq_fsm_transaction_suitable() - Test a QH for compatibility with the FIQ -+ * @hcd: Pointer to the dwc_otg_hcd struct - * @qh: pointer to the endpoint's queue head - * - * Transaction start/end control flow is grafted onto the existing dwc_otg -@@ -1438,8 +1437,14 @@ static void assign_and_init_hc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) - * Returns: 0 for unsuitable, 1 implies the FIQ can be enabled for this transaction. - */ - --int fiq_fsm_transaction_suitable(dwc_otg_qh_t *qh) -+int fiq_fsm_transaction_suitable(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) - { -+ /* There is little benefit in using the FIQ to perform transfers if -+ * the root port is not in high-speed mode. -+ */ -+ if (hcd->flags.b.port_speed != DWC_HPRT0_PRTSPD_HIGH_SPEED) -+ return 0; -+ - if (qh->do_split) { - switch (qh->ep_type) { - case UE_CONTROL: -@@ -2218,7 +2223,7 @@ static void process_periodic_channels(dwc_otg_hcd_t * hcd) - continue; - } - -- if (fiq_fsm_enable && fiq_fsm_transaction_suitable(qh)) { -+ if (fiq_fsm_enable && fiq_fsm_transaction_suitable(hcd, qh)) { - if (qh->do_split) - fiq_fsm_queue_split_transaction(hcd, qh); - else -@@ -2355,7 +2360,7 @@ static void process_non_periodic_channels(dwc_otg_hcd_t * hcd) - qh = DWC_LIST_ENTRY(hcd->non_periodic_qh_ptr, dwc_otg_qh_t, - qh_list_entry); - -- if(fiq_fsm_enable && fiq_fsm_transaction_suitable(qh)) { -+ if(fiq_fsm_enable && fiq_fsm_transaction_suitable(hcd, qh)) { - fiq_fsm_queue_split_transaction(hcd, qh); - } else { - status = queue_transaction(hcd, qh->channel, -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h -index 7f7e9eaffd6a3c3d898855562fbec11289f77f53..5ed8dccf03959a610849aa6c8946ca745dbae207 100644 ---- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h -+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h -@@ -410,7 +410,8 @@ struct dwc_otg_hcd { - unsigned port_suspend_change:1; - unsigned port_over_current_change:1; - unsigned port_l1_change:1; -- unsigned reserved:26; -+ unsigned port_speed:2; -+ unsigned reserved:24; - } b; - } flags; - -@@ -629,7 +630,7 @@ int dwc_otg_hcd_allocate_port(dwc_otg_hcd_t * hcd, dwc_otg_qh_t *qh); - void dwc_otg_hcd_release_port(dwc_otg_hcd_t * dwc_otg_hcd, dwc_otg_qh_t *qh); - - extern int fiq_fsm_queue_transaction(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh); --extern int fiq_fsm_transaction_suitable(dwc_otg_qh_t *qh); -+extern int fiq_fsm_transaction_suitable(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh); - extern void dwc_otg_cleanup_fiq_channel(dwc_otg_hcd_t *hcd, uint32_t num); - - /** @} */ -@@ -823,6 +824,8 @@ static inline uint16_t dwc_micro_frame_num(uint16_t frame) - return frame & 0x7; - } - -+extern void init_hcd_usecs(dwc_otg_hcd_t *_hcd); -+ - void dwc_otg_hcd_save_data_toggle(dwc_hc_t * hc, - dwc_otg_hc_regs_t * hc_regs, - dwc_otg_qtd_t * qtd); -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index a4355afc77b68718fdaba6c5d4be257dadc75036..c8f52709a7d24974c0a38dcf1708f91073e96b0e 100644 ---- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -@@ -515,6 +515,10 @@ int32_t dwc_otg_hcd_handle_port_intr(dwc_otg_hcd_t * dwc_otg_hcd) - dwc_otg_host_if_t *host_if = - dwc_otg_hcd->core_if->host_if; - -+ dwc_otg_hcd->flags.b.port_speed = hprt0.b.prtspd; -+ if (microframe_schedule) -+ init_hcd_usecs(dwc_otg_hcd); -+ - /* Every time when port enables calculate - * HFIR.FrInterval - */ -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c -index 85a6d431ca54b47dc10573aa72d1ad69d06f2e36..4b1dd9de99e9e08b2e006fb5f8a7ef92f20c2553 100644 ---- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c -+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c -@@ -408,13 +408,17 @@ const unsigned short max_uframe_usecs[]={ 100, 100, 100, 100, 100, 100, 30, 0 }; - /* - * called from dwc_otg_hcd.c:dwc_otg_hcd_init - */ --int init_hcd_usecs(dwc_otg_hcd_t *_hcd) -+void init_hcd_usecs(dwc_otg_hcd_t *_hcd) - { - int i; -- for (i=0; i<8; i++) { -- _hcd->frame_usecs[i] = max_uframe_usecs[i]; -+ if (_hcd->flags.b.port_speed == DWC_HPRT0_PRTSPD_FULL_SPEED) { -+ _hcd->frame_usecs[0] = 900; -+ for (i = 1; i < 8; i++) -+ _hcd->frame_usecs[i] = 0; -+ } else { -+ for (i = 0; i < 8; i++) -+ _hcd->frame_usecs[i] = max_uframe_usecs[i]; - } -- return 0; - } - - static int find_single_uframe(dwc_otg_hcd_t * _hcd, dwc_otg_qh_t * _qh) -@@ -541,8 +545,9 @@ static int find_uframe(dwc_otg_hcd_t * _hcd, dwc_otg_qh_t * _qh) - int ret; - ret = -1; - -- if (_qh->speed == USB_SPEED_HIGH) { -- /* if this is a hs transaction we need a full frame */ -+ if (_qh->speed == USB_SPEED_HIGH || -+ _hcd->flags.b.port_speed == DWC_HPRT0_PRTSPD_FULL_SPEED) { -+ /* if this is a hs transaction we need a full frame - or account for FS usecs */ - ret = find_single_uframe(_hcd, _qh); - } else { - /* if this is a fs transaction we may need a sequence of frames */ -@@ -627,7 +632,7 @@ static int schedule_periodic(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) - if (status) { - DWC_INFO("%s: Insufficient periodic bandwidth for " - "periodic transfer.\n", __func__); -- return status; -+ return -DWC_E_NO_SPACE; - } - status = check_max_xfer_size(hcd, qh); - if (status) { - -From bb023a9ad949c9cd663edfe38722b29ba44ffb57 Mon Sep 17 00:00:00 2001 -From: P33M -Date: Fri, 26 May 2017 12:50:31 +0100 -Subject: [PATCH 130/199] dwc_otg: fiq_fsm: Make isochronous compatibility - checks work properly - -Get rid of the spammy printk and local pointer mangling. -Also, there is a nominal benefit for using fiq_fsm for isochronous -transfers in FS mode (~1.1k IRQs per second vs 2.1k IRQs per second) -so remove the root port speed check. ---- - drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 24 ++++++------------------ - 1 file changed, 6 insertions(+), 18 deletions(-) - -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index 38bf5fc792d32352f9e208e0e90f968599b9bc31..71834cf365e67d7ad995bba7869216c4091c3a74 100644 ---- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -@@ -1439,12 +1439,6 @@ static void assign_and_init_hc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) - - int fiq_fsm_transaction_suitable(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) - { -- /* There is little benefit in using the FIQ to perform transfers if -- * the root port is not in high-speed mode. -- */ -- if (hcd->flags.b.port_speed != DWC_HPRT0_PRTSPD_HIGH_SPEED) -- return 0; -- - if (qh->do_split) { - switch (qh->ep_type) { - case UE_CONTROL: -@@ -1462,28 +1456,22 @@ int fiq_fsm_transaction_suitable(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) - } - } else if (qh->ep_type == UE_ISOCHRONOUS) { - if (fiq_fsm_mask & (1 << 2)) { -- /* HS ISOCH support. We test for compatibility: -+ /* ISOCH support. We test for compatibility: - * - DWORD aligned buffers - * - Must be at least 2 transfers (otherwise pointless to use the FIQ) - * If yes, then the fsm enqueue function will handle the state machine setup. - */ - dwc_otg_qtd_t *qtd = DWC_CIRCLEQ_FIRST(&qh->qtd_list); - dwc_otg_hcd_urb_t *urb = qtd->urb; -- struct dwc_otg_hcd_iso_packet_desc (*iso_descs)[0] = &urb->iso_descs; -- int nr_iso_frames = urb->packet_count; -+ dwc_dma_t ptr; - int i; -- uint32_t ptr; - -- if (nr_iso_frames < 2) -+ if (urb->packet_count < 2) - return 0; -- for (i = 0; i < nr_iso_frames; i++) { -- ptr = urb->dma + iso_descs[i]->offset; -- if (ptr & 0x3) { -- printk_ratelimited("%s: Non-Dword aligned isochronous frame offset." -- " Cannot queue FIQ-accelerated transfer to device %d endpoint %d\n", -- __FUNCTION__, qh->channel->dev_addr, qh->channel->ep_num); -+ for (i = 0; i < urb->packet_count; i++) { -+ ptr = urb->dma + urb->iso_descs[i].offset; -+ if (ptr & 0x3) - return 0; -- } - } - return 1; - } - -From 4cfbb24e2238bb51f10fa60bc822f6bbf1925cab Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Mon, 12 Jun 2017 13:05:43 +0100 -Subject: [PATCH 131/199] config: Add CONFIG_CAN_GS_USB - ---- - arch/arm/configs/bcm2709_defconfig | 1 + - arch/arm/configs/bcmrpi_defconfig | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index ba89462cf80f17e6275c1e7912d754d672d4c68d..fd6d3980bc003801a6868e6098f3868a2544573f 100644 ---- a/arch/arm/configs/bcm2709_defconfig -+++ b/arch/arm/configs/bcm2709_defconfig -@@ -362,6 +362,7 @@ CONFIG_CAN=m - CONFIG_CAN_VCAN=m - CONFIG_CAN_SLCAN=m - CONFIG_CAN_MCP251X=m -+CONFIG_CAN_GS_USB=m - CONFIG_IRDA=m - CONFIG_IRLAN=m - CONFIG_IRNET=m -diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 7d3522df2b28e53cb63a0813168918792b65becb..bf0d3fd830a0a0cc9443ef52e7f167eb704ed152 100644 ---- a/arch/arm/configs/bcmrpi_defconfig -+++ b/arch/arm/configs/bcmrpi_defconfig -@@ -357,6 +357,7 @@ CONFIG_CAN=m - CONFIG_CAN_VCAN=m - CONFIG_CAN_SLCAN=m - CONFIG_CAN_MCP251X=m -+CONFIG_CAN_GS_USB=m - CONFIG_IRDA=m - CONFIG_IRLAN=m - CONFIG_IRNET=m - -From 3c9883d6f804e2587367849e3933d61a5602b0a6 Mon Sep 17 00:00:00 2001 -From: P33M -Date: Mon, 12 Jun 2017 16:10:03 +0100 -Subject: [PATCH 132/199] dwc_otg: add module parameter int_ep_interval_min - -Add a module parameter (defaulting to ignored) that clamps the polling rate -of high-speed Interrupt endpoints to a minimum microframe interval. - -The parameter is modifiable at runtime as it is used when activating new -endpoints (such as on device connect). ---- - drivers/usb/host/dwc_otg/dwc_otg_driver.c | 6 +++++- - drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c | 25 ++++++++++++------------- - 2 files changed, 17 insertions(+), 14 deletions(-) - -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c -index cb060a7179a3eec791506ed2779b553cad9841b0..95943e07528276b26b51ea2d57a1f433f280aaef 100644 ---- a/drivers/usb/host/dwc_otg/dwc_otg_driver.c -+++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c -@@ -249,6 +249,7 @@ uint16_t nak_holdoff = 8; - - unsigned short fiq_fsm_mask = 0x0F; - -+unsigned short int_ep_interval_min = 0; - /** - * This function shows the Driver Version. - */ -@@ -1398,7 +1399,10 @@ MODULE_PARM_DESC(fiq_fsm_mask, "Bitmask of transactions to perform in the FIQ.\n - "Bit 1 : Periodic split transactions\n" - "Bit 2 : High-speed multi-transfer isochronous\n" - "All other bits should be set 0."); -- -+module_param(int_ep_interval_min, ushort, 0644); -+MODULE_PARM_DESC(int_ep_interval_min, "Clamp high-speed Interrupt endpoints to a minimum polling interval.\n" -+ "0..1 = Use endpoint default\n" -+ "2..n = Minimum interval n microframes. Use powers of 2.\n"); - - /** @page "Module Parameters" - * -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c -index 4b1dd9de99e9e08b2e006fb5f8a7ef92f20c2553..fe8e8f841f03660c2ad49ab8e66193bec62558d3 100644 ---- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c -+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c -@@ -43,6 +43,7 @@ - #include "dwc_otg_regs.h" - - extern bool microframe_schedule; -+extern unsigned short int_ep_interval_min; - - /** - * Free each QTD in the QH's QTD-list then free the QH. QH should already be -@@ -218,21 +219,19 @@ void qh_init(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh, dwc_otg_hcd_urb_t * urb) - SCHEDULE_SLOP); - qh->interval = urb->interval; - --#if 0 -- /* Increase interrupt polling rate for debugging. */ -- if (qh->ep_type == UE_INTERRUPT) { -- qh->interval = 8; -- } --#endif - hprt.d32 = DWC_READ_REG32(hcd->core_if->host_if->hprt0); -- if ((hprt.b.prtspd == DWC_HPRT0_PRTSPD_HIGH_SPEED) && -- ((dev_speed == USB_SPEED_LOW) || -- (dev_speed == USB_SPEED_FULL))) { -- qh->interval *= 8; -- qh->sched_frame |= 0x7; -- qh->start_split_frame = qh->sched_frame; -+ if (hprt.b.prtspd == DWC_HPRT0_PRTSPD_HIGH_SPEED) { -+ if (dev_speed == USB_SPEED_LOW || -+ dev_speed == USB_SPEED_FULL) { -+ qh->interval *= 8; -+ qh->sched_frame |= 0x7; -+ qh->start_split_frame = qh->sched_frame; -+ } else if (int_ep_interval_min >= 2 && -+ qh->interval < int_ep_interval_min && -+ qh->ep_type == UE_INTERRUPT) { -+ qh->interval = int_ep_interval_min; -+ } - } -- - } - - DWC_DEBUGPL(DBG_HCD, "DWC OTG HCD QH Initialized\n"); - -From 1d6e58ced8a05ed7164cb9716c51ba016fb16191 Mon Sep 17 00:00:00 2001 -From: P33M -Date: Tue, 20 Jun 2017 13:44:01 +0100 -Subject: [PATCH 133/199] dwc_otg: fiq_fsm: Add non-periodic TT exclusivity - constraints - -Certain hub types do not discriminate between pipe direction (IN or OUT) -when considering non-periodic transfers. Therefore these hubs get confused -if multiple transfers are issued in different directions with the same -device address and endpoint number. - -Constrain queuing non-periodic split transactions so they are performed -serially in such cases. - -Related: https://github.com/raspberrypi/linux/issues/2024 ---- - drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c | 32 ++++++++++++++++++ - drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h | 2 ++ - drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 53 ++++++++++++++++++++++++++++-- - 3 files changed, 85 insertions(+), 2 deletions(-) - -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c -index 208252645c09d1d17bf07673989f91b7f4b3ef7a..0163e9cf620ba58df36a872b82cea92734baada6 100644 ---- a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c -+++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c -@@ -191,6 +191,32 @@ static void notrace fiq_fsm_setup_csplit(struct fiq_state *st, int n) - mb(); - } - -+/** -+ * fiq_fsm_restart_np_pending() - Restart a single non-periodic contended transfer -+ * @st: Pointer to the channel's state -+ * @num_channels: Total number of host channels -+ * @orig_channel: Channel index of completed transfer -+ * -+ * In the case where an IN and OUT transfer are simultaneously scheduled to the -+ * same device/EP, inadequate hub implementations will misbehave. Once the first -+ * transfer is complete, a pending non-periodic split can then be issued. -+ */ -+static void notrace fiq_fsm_restart_np_pending(struct fiq_state *st, int num_channels, int orig_channel) -+{ -+ int i; -+ int dev_addr = st->channel[orig_channel].hcchar_copy.b.devaddr; -+ int ep_num = st->channel[orig_channel].hcchar_copy.b.epnum; -+ for (i = 0; i < num_channels; i++) { -+ if (st->channel[i].fsm == FIQ_NP_SSPLIT_PENDING && -+ st->channel[i].hcchar_copy.b.devaddr == dev_addr && -+ st->channel[i].hcchar_copy.b.epnum == ep_num) { -+ st->channel[i].fsm = FIQ_NP_SSPLIT_STARTED; -+ fiq_fsm_restart_channel(st, i, 0); -+ break; -+ } -+ } -+} -+ - static inline int notrace fiq_get_xfer_len(struct fiq_state *st, int n) - { - /* The xfersize register is a bit wonky. For IN transfers, it decrements by the packet size. */ -@@ -870,6 +896,9 @@ static int notrace noinline fiq_fsm_do_hcintr(struct fiq_state *state, int num_c - st->fsm = FIQ_NP_SPLIT_HS_ABORTED; - } - } -+ if (st->fsm != FIQ_NP_IN_CSPLIT_RETRY) { -+ fiq_fsm_restart_np_pending(state, num_channels, n); -+ } - break; - - case FIQ_NP_OUT_CSPLIT_RETRY: -@@ -919,6 +948,9 @@ static int notrace noinline fiq_fsm_do_hcintr(struct fiq_state *state, int num_c - st->fsm = FIQ_NP_SPLIT_HS_ABORTED; - } - } -+ if (st->fsm != FIQ_NP_OUT_CSPLIT_RETRY) { -+ fiq_fsm_restart_np_pending(state, num_channels, n); -+ } - break; - - /* Periodic split states (except isoc out) */ -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h -index 0a1ddf3f89f45ca75b8880722fbc22cbdc9f4a2f..ed088f34f210e9a337ab9b80fff0cf9e9b0241ea 100644 ---- a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h -+++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h -@@ -178,6 +178,8 @@ enum fiq_fsm_state { - /* Nonperiodic state groups */ - FIQ_NP_SSPLIT_STARTED = 1, - FIQ_NP_SSPLIT_RETRY = 2, -+ /* TT contention - working around hub bugs */ -+ FIQ_NP_SSPLIT_PENDING = 33, - FIQ_NP_OUT_CSPLIT_RETRY = 3, - FIQ_NP_IN_CSPLIT_RETRY = 4, - FIQ_NP_SPLIT_DONE = 5, -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index 71834cf365e67d7ad995bba7869216c4091c3a74..7710370b30363e3170bf9bf522597c5f41dfb908 100644 ---- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -@@ -1572,6 +1572,45 @@ int fiq_fsm_setup_periodic_dma(dwc_otg_hcd_t *hcd, struct fiq_channel_state *st, - } - } - -+/** -+ * fiq_fsm_np_tt_contended() - Avoid performing contended non-periodic transfers -+ * @hcd: Pointer to the dwc_otg_hcd struct -+ * @qh: Pointer to the endpoint's queue head -+ * -+ * Certain hub chips don't differentiate between IN and OUT non-periodic pipes -+ * with the same endpoint number. If transfers get completed out of order -+ * (disregarding the direction token) then the hub can lock up -+ * or return erroneous responses. -+ * -+ * Returns 1 if initiating the transfer would cause contention, 0 otherwise. -+ */ -+int fiq_fsm_np_tt_contended(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) -+{ -+ int i; -+ struct fiq_channel_state *st; -+ int dev_addr = qh->channel->dev_addr; -+ int ep_num = qh->channel->ep_num; -+ for (i = 0; i < hcd->core_if->core_params->host_channels; i++) { -+ if (i == qh->channel->hc_num) -+ continue; -+ st = &hcd->fiq_state->channel[i]; -+ switch (st->fsm) { -+ case FIQ_NP_SSPLIT_STARTED: -+ case FIQ_NP_SSPLIT_RETRY: -+ case FIQ_NP_SSPLIT_PENDING: -+ case FIQ_NP_OUT_CSPLIT_RETRY: -+ case FIQ_NP_IN_CSPLIT_RETRY: -+ if (st->hcchar_copy.b.devaddr == dev_addr && -+ st->hcchar_copy.b.epnum == ep_num) -+ return 1; -+ break; -+ default: -+ break; -+ } -+ } -+ return 0; -+} -+ - /* - * Pushing a periodic request into the queue near the EOF1 point - * in a microframe causes erroneous behaviour (frmovrun) interrupt. -@@ -1894,7 +1933,12 @@ int fiq_fsm_queue_split_transaction(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) - switch (hc->ep_type) { - case UE_CONTROL: - case UE_BULK: -- st->fsm = FIQ_NP_SSPLIT_STARTED; -+ if (fiq_fsm_np_tt_contended(hcd, qh)) { -+ st->fsm = FIQ_NP_SSPLIT_PENDING; -+ start_immediate = 0; -+ } else { -+ st->fsm = FIQ_NP_SSPLIT_STARTED; -+ } - break; - case UE_ISOCHRONOUS: - if (hc->ep_is_in) { -@@ -1918,7 +1962,12 @@ int fiq_fsm_queue_split_transaction(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) - break; - case UE_INTERRUPT: - if (fiq_fsm_mask & 0x8) { -- st->fsm = FIQ_NP_SSPLIT_STARTED; -+ if (fiq_fsm_np_tt_contended(hcd, qh)) { -+ st->fsm = FIQ_NP_SSPLIT_PENDING; -+ start_immediate = 0; -+ } else { -+ st->fsm = FIQ_NP_SSPLIT_STARTED; -+ } - } else if (start_immediate) { - st->fsm = FIQ_PER_SSPLIT_STARTED; - } else { - -From a345856a599d7b5cdb9269843d39a54628948590 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Fri, 26 May 2017 13:03:41 +0100 -Subject: [PATCH 134/199] BCM270X_DT: Add midi-uart1 overlay - -Add a scaler to the ttyS0 clock so that requesting 38400 baud results -in an approximately 31250 baud signal. This is analagous to -midi-uart0, except for ttyS0, which may be useful on Pi3 and also -may avoid an issue with ttyAMA0 failing to synchronise to an active -data stream. - -See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=183860 - -Signed-off-by: Phil Elwell ---- - arch/arm/boot/dts/overlays/Makefile | 1 + - arch/arm/boot/dts/overlays/README | 7 ++++ - arch/arm/boot/dts/overlays/midi-uart1-overlay.dts | 43 +++++++++++++++++++++++ - 3 files changed, 51 insertions(+) - create mode 100644 arch/arm/boot/dts/overlays/midi-uart1-overlay.dts - -diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index e2f66a55dc5afe13d690c2c17827054ac94b7168..e0ff5793f124fce73732e175bfca424f0a97b632 100644 ---- a/arch/arm/boot/dts/overlays/Makefile -+++ b/arch/arm/boot/dts/overlays/Makefile -@@ -56,6 +56,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ - mcp2515-can1.dtbo \ - mcp3008.dtbo \ - midi-uart0.dtbo \ -+ midi-uart1.dtbo \ - mmc.dtbo \ - mz61581.dtbo \ - pi3-act-led.dtbo \ -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index e2a803e5180cf78d67b6723cfd2f6d3b2b54e53b..ec9e7b1941678796facf625b3770c20ed0b15b25 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -864,6 +864,13 @@ Load: dtoverlay=midi-uart0 - Params: - - -+Name: midi-uart1 -+Info: Configures UART1 (ttyS0) so that a requested 38.4kbaud actually gets -+ 31.25kbaud, the frequency required for MIDI -+Load: dtoverlay=midi-uart1 -+Params: -+ -+ - Name: mmc - Info: Selects the bcm2835-mmc SD/MMC driver, optionally with overclock - Load: dtoverlay=mmc,= -diff --git a/arch/arm/boot/dts/overlays/midi-uart1-overlay.dts b/arch/arm/boot/dts/overlays/midi-uart1-overlay.dts -new file mode 100644 -index 0000000000000000000000000000000000000000..e0bc410acbff3a7a175dd5d53b3ab0d0802e8239 ---- /dev/null -+++ b/arch/arm/boot/dts/overlays/midi-uart1-overlay.dts -@@ -0,0 +1,43 @@ -+/dts-v1/; -+/plugin/; -+ -+#include -+ -+/* -+ * Fake a higher clock rate to get a larger divisor, and thereby a lower -+ * baudrate. The real clock is 48MHz, which we scale so that requesting -+ * 38.4kHz results in an actual 31.25kHz. -+ * -+ * 48000000*38400/31250 = 58982400 -+ */ -+ -+/{ -+ compatible = "brcm,bcm2835"; -+ -+ fragment@0 { -+ target-path = "/clocks"; -+ __overlay__ { -+ midi_clk: clock@5 { -+ compatible = "fixed-factor-clock"; -+ #clock-cells = <0>; -+ clocks = <&aux BCM2835_AUX_CLOCK_UART>; -+ clock-mult = <38400>; -+ clock-div = <31250>; -+ }; -+ }; -+ }; -+ -+ fragment@1 { -+ target = <&uart1>; -+ __overlay__ { -+ clocks = <&midi_clk>; -+ }; -+ }; -+ -+ fragment@2 { -+ target = <&aux>; -+ __overlay__ { -+ clock-output-names = "aux_uart", "aux_spi1", "aux_spi2"; -+ }; -+ }; -+}; - -From d33071b43b6688a09e4c62697ed1c345ca6e3f13 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Sat, 20 May 2017 22:10:14 +0100 -Subject: [PATCH 135/199] overlays: README: remove vestigial SDIO parameters - -Signed-off-by: Phil Elwell ---- - arch/arm/boot/dts/overlays/README | 24 ++---------------------- - 1 file changed, 2 insertions(+), 22 deletions(-) - -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index ec9e7b1941678796facf625b3770c20ed0b15b25..499cd1920fd373702cfbc9f6e0fcaebca8a47cfc 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -1203,19 +1203,9 @@ Name: sdio - Info: Selects the bcm2835-sdhost SD/MMC driver, optionally with overclock, - and enables SDIO via GPIOs 22-27. - Load: dtoverlay=sdio,= --Params: overclock_50 SD Clock (in MHz) to use when the MMC framework -- requests 50MHz -- -- sdio_overclock SDIO Clock (in MHz) to use when the MMC -+Params: sdio_overclock SDIO Clock (in MHz) to use when the MMC - framework requests 50MHz - -- force_pio Disable DMA support (default off) -- -- pio_limit Number of blocks above which to use DMA -- (default 1) -- -- debug Enable debug output (default off) -- - poll_once Disable SDIO-device polling every second - (default on: polling once at boot-time) - -@@ -1226,19 +1216,9 @@ Name: sdio-1bit - Info: Selects the bcm2835-sdhost SD/MMC driver, optionally with overclock, - and enables 1-bit SDIO via GPIOs 22-25. - Load: dtoverlay=sdio-1bit,= --Params: overclock_50 SD Clock (in MHz) to use when the MMC framework -- requests 50MHz -- -- sdio_overclock SDIO Clock (in MHz) to use when the MMC -+Params: sdio_overclock SDIO Clock (in MHz) to use when the MMC - framework requests 50MHz - -- force_pio Disable DMA support (default off) -- -- pio_limit Number of blocks above which to use DMA -- (default 1) -- -- debug Enable debug output (default off) -- - poll_once Disable SDIO-device polling every second - (default on: polling once at boot-time) - - -From c405f6be721dfb65855b0d4ab53404e06bd55342 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Tue, 27 Jun 2017 15:07:14 +0100 -Subject: [PATCH 136/199] SQUASH: mmc: Apply ERASE_BROKEN quirks correctly - -Squash with: mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards - -Signed-off-by: Phil Elwell ---- - drivers/mmc/core/quirks.h | 9 +++------ - 1 file changed, 3 insertions(+), 6 deletions(-) - -diff --git a/drivers/mmc/core/quirks.h b/drivers/mmc/core/quirks.h -index 05c8d7381fff5ae88531129d9a5ddd554bddb43e..c9d5d644688c1509d7febcff0322fbaba0a842d6 100644 ---- a/drivers/mmc/core/quirks.h -+++ b/drivers/mmc/core/quirks.h -@@ -94,12 +94,9 @@ static const struct mmc_fixup mmc_blk_fixups[] = { - * On some Kingston SD cards, multiple erases of less than 64 - * sectors can cause corruption. - */ -- MMC_FIXUP("SD16G", 0x41, 0x3432, add_quirk_mmc, -- MMC_QUIRK_ERASE_BROKEN), -- MMC_FIXUP("SD32G", 0x41, 0x3432, add_quirk_mmc, -- MMC_QUIRK_ERASE_BROKEN), -- MMC_FIXUP("SD64G", 0x41, 0x3432, add_quirk_mmc, -- MMC_QUIRK_ERASE_BROKEN), -+ MMC_FIXUP("SD16G", 0x41, 0x3432, add_quirk, MMC_QUIRK_ERASE_BROKEN), -+ MMC_FIXUP("SD32G", 0x41, 0x3432, add_quirk, MMC_QUIRK_ERASE_BROKEN), -+ MMC_FIXUP("SD64G", 0x41, 0x3432, add_quirk, MMC_QUIRK_ERASE_BROKEN), - - END_FIXUP - }; - -From bb939d3addc2a8f7b00594d505d5bcd55d937efc Mon Sep 17 00:00:00 2001 +From 703fb6dc2bdb896d92907e25bddbb47c02a95a3f Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 11:34:26 +0200 -Subject: [PATCH 137/199] ASoC: bcm2835: Add support for TDM modes +Subject: [PATCH 124/129] ASoC: bcm2835: Add support for TDM modes bcm2835 supports arbitrary positioning of channel data within a frame and thus is capable of supporting TDM modes. Since @@ -133425,10 +134321,10 @@ index 56df7d8a43d0aac055a91b0d24aca8e1b4e308e4..dcacf7f83c9371df539a788ea33fedcf dev->dev = &pdev->dev; dev_set_drvdata(&pdev->dev, dev); -From 434bd197a2ff514fec1b6b586a917c6e456ac677 Mon Sep 17 00:00:00 2001 +From dd338425587a3c4d54f218f6b4d8353e1b8e166b Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 15:30:50 +0200 -Subject: [PATCH 138/199] ASoC: bcm2835: Support left/right justified and DSP +Subject: [PATCH 125/129] ASoC: bcm2835: Support left/right justified and DSP modes DSP modes and left/right justified modes can be supported @@ -133674,10 +134570,10 @@ index dcacf7f83c9371df539a788ea33fedcf97d64690..3a706fda4f39e42efbe12f19d87af9b1 } -From e8496ced09fb935883a10511297df0824c119a56 Mon Sep 17 00:00:00 2001 +From 129ca2a27effd87c3d6aae09e357cc4f5deb636c Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 16:19:54 +0200 -Subject: [PATCH 139/199] ASoC: bcm2835: Support additional samplerates up to +Subject: [PATCH 126/129] ASoC: bcm2835: Support additional samplerates up to 384kHz Sample rates are only restricted by the capabilities of the @@ -133720,10 +134616,10 @@ index 3a706fda4f39e42efbe12f19d87af9b100a348a5..43f5715a0d5dda851731ecf7ff27e76c | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE -From 80825cda0b5cddc0748e4905215516d2e8f107e3 Mon Sep 17 00:00:00 2001 +From 21821e1d5caa6534029429200d5488d989f5cb16 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 16:24:57 +0200 -Subject: [PATCH 140/199] ASoC: bcm2835: Enforce full symmetry +Subject: [PATCH 127/129] ASoC: bcm2835: Enforce full symmetry bcm2835's configuration registers can't be changed when a stream is running, which means asymmetric configurations aren't supported. @@ -133759,1643 +134655,10 @@ index 43f5715a0d5dda851731ecf7ff27e76c48fb6e57..2e449d7173fcecbcd647f90a26bd58b6 static bool bcm2835_i2s_volatile_reg(struct device *dev, unsigned int reg) -From 998ecd6e3522528d2f1bcae09e3d999ee7b9dc3c Mon Sep 17 00:00:00 2001 -From: Matthias Reichl -Date: Thu, 6 Jul 2017 18:52:16 +0200 -Subject: [PATCH 141/199] config: add missing arizona regulator modules - -In kernel 4.12 CONFIG_REGULATOR_ARIZONA was replaced by 2 separate -options for LDO1 and MICSUPP regulators. Enable these, they are -needed by the Cirrus Logic Audio Card. - -Also regenerate configs with make savedefconfig to get rid of -the duplicated CONFIG_TOUCHSCREEN_EDT_FT5X06 entry. - -Signed-off-by: Matthias Reichl ---- - arch/arm/configs/bcm2709_defconfig | 3 ++- - arch/arm/configs/bcmrpi_defconfig | 2 ++ - 2 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index fd6d3980bc003801a6868e6098f3868a2544573f..95da3daaf33c7cfab76f6af397e058e9ed8d998f 100644 ---- a/arch/arm/configs/bcm2709_defconfig -+++ b/arch/arm/configs/bcm2709_defconfig -@@ -568,7 +568,6 @@ CONFIG_JOYSTICK_RPISENSE=m - CONFIG_INPUT_TOUCHSCREEN=y - CONFIG_TOUCHSCREEN_ADS7846=m - CONFIG_TOUCHSCREEN_EGALAX=m --CONFIG_TOUCHSCREEN_EDT_FT5X06=m - CONFIG_TOUCHSCREEN_GOODIX=m - CONFIG_TOUCHSCREEN_EDT_FT5X06=m - CONFIG_TOUCHSCREEN_RPI_FT5406=m -@@ -671,6 +670,8 @@ CONFIG_MFD_ARIZONA_SPI=m - CONFIG_MFD_WM5102=y - CONFIG_REGULATOR=y - CONFIG_REGULATOR_FIXED_VOLTAGE=m -+CONFIG_REGULATOR_ARIZONA_LDO1=m -+CONFIG_REGULATOR_ARIZONA_MICSUPP=m - CONFIG_MEDIA_SUPPORT=m - CONFIG_MEDIA_CAMERA_SUPPORT=y - CONFIG_MEDIA_ANALOG_TV_SUPPORT=y -diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index bf0d3fd830a0a0cc9443ef52e7f167eb704ed152..06d0520e332f21afaa27ac112c0eee6c36a9a9df 100644 ---- a/arch/arm/configs/bcmrpi_defconfig -+++ b/arch/arm/configs/bcmrpi_defconfig -@@ -663,6 +663,8 @@ CONFIG_MFD_ARIZONA_SPI=m - CONFIG_MFD_WM5102=y - CONFIG_REGULATOR=y - CONFIG_REGULATOR_FIXED_VOLTAGE=m -+CONFIG_REGULATOR_ARIZONA_LDO1=m -+CONFIG_REGULATOR_ARIZONA_MICSUPP=m - CONFIG_MEDIA_SUPPORT=m - CONFIG_MEDIA_CAMERA_SUPPORT=y - CONFIG_MEDIA_ANALOG_TV_SUPPORT=y - -From 43ecf468282a9d298028b5a46012e7d4e08fc74d Mon Sep 17 00:00:00 2001 -From: Matt Flax -Date: Tue, 4 Apr 2017 19:20:59 +1000 -Subject: [PATCH 142/199] Audioinjector : make the octo and pi sound cards have - different driver names - -This patch gives the audioinjector octo and pi soundcards different driver -names. This allows both the be loaded without clashing. ---- - sound/soc/bcm/audioinjector-octo-soundcard.c | 2 +- - sound/soc/bcm/audioinjector-pi-soundcard.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/sound/soc/bcm/audioinjector-octo-soundcard.c b/sound/soc/bcm/audioinjector-octo-soundcard.c -index dcf403ab37639ba79e38278d7e4b1ade452c292a..49115c8e20ce1a2ba5a99feb8983a1cafb052ca2 100644 ---- a/sound/soc/bcm/audioinjector-octo-soundcard.c -+++ b/sound/soc/bcm/audioinjector-octo-soundcard.c -@@ -324,7 +324,7 @@ MODULE_DEVICE_TABLE(of, audioinjector_octo_of_match); - - static struct platform_driver audioinjector_octo_driver = { - .driver = { -- .name = "audioinjector-audio", -+ .name = "audioinjector-octo", - .owner = THIS_MODULE, - .of_match_table = audioinjector_octo_of_match, - }, -diff --git a/sound/soc/bcm/audioinjector-pi-soundcard.c b/sound/soc/bcm/audioinjector-pi-soundcard.c -index ef54e0f07ea03f59e9957b5d98f3e7fdc998e469..491906bbf446826e55dd843f28e4860f48e908b8 100644 ---- a/sound/soc/bcm/audioinjector-pi-soundcard.c -+++ b/sound/soc/bcm/audioinjector-pi-soundcard.c -@@ -177,7 +177,7 @@ MODULE_DEVICE_TABLE(of, audioinjector_pi_soundcard_of_match); - - static struct platform_driver audioinjector_pi_soundcard_driver = { - .driver = { -- .name = "audioinjector-audio", -+ .name = "audioinjector-stereo", - .owner = THIS_MODULE, - .of_match_table = audioinjector_pi_soundcard_of_match, - }, - -From 393c2e823828b6bf72e97ba1fa406eed2f2c3db6 Mon Sep 17 00:00:00 2001 -From: Matt Flax -Date: Tue, 4 Apr 2017 19:23:04 +1000 -Subject: [PATCH 143/199] Audioinjector octo : Make the playback and capture - symmetric - -This patch ensures that the sample rate and channel count of the audioinjector -octo sound card are symmetric. ---- - sound/soc/bcm/audioinjector-octo-soundcard.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/sound/soc/bcm/audioinjector-octo-soundcard.c b/sound/soc/bcm/audioinjector-octo-soundcard.c -index 49115c8e20ce1a2ba5a99feb8983a1cafb052ca2..5e79f4eff93a21ed3495c77a90f73525695cb3d5 100644 ---- a/sound/soc/bcm/audioinjector-octo-soundcard.c -+++ b/sound/soc/bcm/audioinjector-octo-soundcard.c -@@ -204,6 +204,8 @@ static struct snd_soc_dai_link audioinjector_octo_dai[] = { - .codec_dai_name = "cs42448", - .ops = &audioinjector_octo_ops, - .init = audioinjector_octo_dai_init, -+ .symmetric_rates = 1, -+ .symmetric_channels = 1, - }, - }; - - -From 5b1e8621f88fa6372610b7fbf723bf195fab00fc Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Sun, 23 Apr 2017 19:36:53 +0100 -Subject: [PATCH 144/199] BCM270X_DT: Add bme280 and bmp180 to i2c-sensor - overlay - -Signed-off-by: Phil Elwell ---- - arch/arm/boot/dts/overlays/README | 11 +++++++++-- - arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts | 15 +++++++++++++++ - 2 files changed, 24 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 499cd1920fd373702cfbc9f6e0fcaebca8a47cfc..d32a31cbf4a4382ddfc1b38018ef3ff0ff445145 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -652,9 +652,16 @@ Name: i2c-sensor - Info: Adds support for a number of I2C barometric pressure and temperature - sensors on i2c_arm - Load: dtoverlay=i2c-sensor,= --Params: bmp085 Select the Bosch sensortronic BMP085 -+Params: addr Set the address for the BME280 and BMP280 (0x76 -+ or 0x77 - default 0x76) - -- bmp280 Select the Bosch sensortronic BMP280 -+ bme280 Select the Bosch Sensortronic BME280 -+ -+ bmp085 Select the Bosch Sensortronic BMP085 -+ -+ bmp180 Select the Bosch Sensortronic BMP180 -+ -+ bmp280 Select the Bosch Sensortronic BMP280 - - lm75 Select the Maxim LM75 temperature sensor - -diff --git a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts -index 606b2d5012abf2e85712be631c42ea40a0b512c5..e23e34b32a0a8927c14203d7384e800878627347 100644 ---- a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts -+++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts -@@ -12,6 +12,12 @@ - #size-cells = <0>; - status = "okay"; - -+ bme280: bme280@76 { -+ compatible = "bosch,bme280"; -+ reg = <0x76>; -+ status = "disable"; -+ }; -+ - bmp085: bmp085@77 { - compatible = "bosch,bmp085"; - reg = <0x77>; -@@ -19,6 +25,12 @@ - status = "disable"; - }; - -+ bmp180: bmp180@77 { -+ compatible = "bosch,bmp180"; -+ reg = <0x77>; -+ status = "disable"; -+ }; -+ - bmp280: bmp280@76 { - compatible = "bosch,bmp280"; - reg = <0x76>; -@@ -40,7 +52,10 @@ - }; - - __overrides__ { -+ addr = <&bme280>,"reg:0", <&bmp280>,"reg:0"; -+ bme280 = <&bme280>,"status"; - bmp085 = <&bmp085>,"status"; -+ bmp180 = <&bmp180>,"status"; - bmp280 = <&bmp280>,"status"; - lm75 = <&lm75>,"status"; - lm75addr = <&lm75>,"reg:0"; - -From 837e2bea658bf521059f5a28b39a161aeb7087eb Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Sun, 23 Apr 2017 19:38:06 +0100 -Subject: [PATCH 145/199] config: Add CONFIG_BMP280 (and CONFIG_BMP280_I2C) - -Signed-off-by: Phil Elwell ---- - arch/arm/configs/bcm2709_defconfig | 1 + - arch/arm/configs/bcmrpi_defconfig | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 95da3daaf33c7cfab76f6af397e058e9ed8d998f..c86d93a0b103cf812f502088f31ec222f4dea90a 100644 ---- a/arch/arm/configs/bcm2709_defconfig -+++ b/arch/arm/configs/bcm2709_defconfig -@@ -1170,6 +1170,7 @@ CONFIG_MCP320X=m - CONFIG_MCP3422=m - CONFIG_DHT11=m - CONFIG_HTU21=m -+CONFIG_BMP280=m - CONFIG_PWM_BCM2835=m - CONFIG_PWM_PCA9685=m - CONFIG_RASPBERRYPI_FIRMWARE=y -diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 06d0520e332f21afaa27ac112c0eee6c36a9a9df..515f335d2a638de60d07a45df19ce52a7579f9ca 100644 ---- a/arch/arm/configs/bcmrpi_defconfig -+++ b/arch/arm/configs/bcmrpi_defconfig -@@ -1176,6 +1176,7 @@ CONFIG_MCP320X=m - CONFIG_MCP3422=m - CONFIG_DHT11=m - CONFIG_HTU21=m -+CONFIG_BMP280=m - CONFIG_PWM_BCM2835=m - CONFIG_PWM_PCA9685=m - CONFIG_RASPBERRYPI_FIRMWARE=y - -From b816acaa0d8fb53924639b6de9e59226b0044fc9 Mon Sep 17 00:00:00 2001 -From: Scott Ellis -Date: Tue, 25 Apr 2017 10:46:09 -0400 -Subject: [PATCH 146/199] config: Enable TI TMP102 temp sensor module - -Signed-off-by: Scott Ellis ---- - arch/arm/configs/bcm2709_defconfig | 1 + - arch/arm/configs/bcmrpi_defconfig | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index c86d93a0b103cf812f502088f31ec222f4dea90a..5f5830fb19c497895c3e6d6e3a47e961fc84e09a 100644 ---- a/arch/arm/configs/bcm2709_defconfig -+++ b/arch/arm/configs/bcm2709_defconfig -@@ -659,6 +659,7 @@ CONFIG_SENSORS_SHT21=m - CONFIG_SENSORS_SHTC1=m - CONFIG_SENSORS_ADS1015=m - CONFIG_SENSORS_INA2XX=m -+CONFIG_SENSORS_TMP102=m - CONFIG_THERMAL=y - CONFIG_BCM2835_THERMAL=y - CONFIG_WATCHDOG=y -diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 515f335d2a638de60d07a45df19ce52a7579f9ca..bfda35e4c4bce99b5125eab80f97c73a159de969 100644 ---- a/arch/arm/configs/bcmrpi_defconfig -+++ b/arch/arm/configs/bcmrpi_defconfig -@@ -652,6 +652,7 @@ CONFIG_SENSORS_SHT21=m - CONFIG_SENSORS_SHTC1=m - CONFIG_SENSORS_ADS1015=m - CONFIG_SENSORS_INA2XX=m -+CONFIG_SENSORS_TMP102=m - CONFIG_THERMAL=y - CONFIG_BCM2835_THERMAL=y - CONFIG_WATCHDOG=y - -From 71b830eabd648fde8ac9cf14158c667612fdd536 Mon Sep 17 00:00:00 2001 -From: Scott Ellis -Date: Tue, 25 Apr 2017 13:05:42 -0400 -Subject: [PATCH 147/199] BCM270X_DT: Add tmp102 to i2c sensor overlay - -Signed-off-by: Scott Ellis ---- - arch/arm/boot/dts/overlays/README | 9 +++++++-- - arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts | 11 +++++++++-- - 2 files changed, 16 insertions(+), 4 deletions(-) - -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index d32a31cbf4a4382ddfc1b38018ef3ff0ff445145..4171208933e675a5a3a7e17f8b15447f30a11887 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -652,16 +652,18 @@ Name: i2c-sensor - Info: Adds support for a number of I2C barometric pressure and temperature - sensors on i2c_arm - Load: dtoverlay=i2c-sensor,= --Params: addr Set the address for the BME280 and BMP280 (0x76 -- or 0x77 - default 0x76) -+Params: addr Set the address for the BME280, BMP280 or -+ TMP102 - - bme280 Select the Bosch Sensortronic BME280 -+ Valid addresses 0x76-0x77, default 0x76 - - bmp085 Select the Bosch Sensortronic BMP085 - - bmp180 Select the Bosch Sensortronic BMP180 - - bmp280 Select the Bosch Sensortronic BMP280 -+ Valid addresses 0x76-0x77, default 0x76 - - lm75 Select the Maxim LM75 temperature sensor - -@@ -671,6 +673,9 @@ Params: addr Set the address for the BME280 and BMP280 (0x76 - si7020 Select the Silicon Labs Si7013/20/21 humidity/ - temperature sensor - -+ tmp102 Select the Texas Instruments TMP102 temp sensor -+ Valid addresses 0x48-0x4b, default 0x48 -+ - - Name: i2c0-bcm2708 - Info: Enable the i2c_bcm2708 driver for the i2c0 bus. Not all pin combinations -diff --git a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts -index e23e34b32a0a8927c14203d7384e800878627347..e86a13f92c3f75c14fa4425cdfb081d6795ff76a 100644 ---- a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts -+++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts -@@ -1,4 +1,4 @@ --// Definitions for I2C based sensors using the Industrial IO interface. -+// Definitions for I2C based sensors using the Industrial IO or HWMON interface. - /dts-v1/; - /plugin/; - -@@ -48,11 +48,17 @@ - reg = <0x40>; - status = "disable"; - }; -+ -+ tmp102: tmp102@48 { -+ compatible = "ti,tmp102"; -+ reg = <0x48>; -+ status = "disable"; -+ }; - }; - }; - - __overrides__ { -- addr = <&bme280>,"reg:0", <&bmp280>,"reg:0"; -+ addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0"; - bme280 = <&bme280>,"status"; - bmp085 = <&bmp085>,"status"; - bmp180 = <&bmp180>,"status"; -@@ -60,5 +66,6 @@ - lm75 = <&lm75>,"status"; - lm75addr = <&lm75>,"reg:0"; - si7020 = <&si7020>,"status"; -+ tmp102 = <&tmp102>,"status"; - }; - }; - -From 9cf926a180a5c1e2ddef1e012a3a6382eb0e6def Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Mon, 8 May 2017 16:43:40 +0100 -Subject: [PATCH 148/199] irq_bcm2836: Send event when onlining sleeping cores - -In order to reduce power consumption and bus traffic, it is sensible -for secondary cores to enter a low-power idle state when waiting to -be started. The wfe instruction causes a core to wait until an event -or interrupt arrives before continuing to the next instruction. -The sev instruction sends a wakeup event to the other cores, so call -it from bcm2836_smp_boot_secondary, the function that wakes up the -waiting cores during booting. - -It is harmless to use this patch without the corresponding change -adding wfe to the ARMv7/ARMv8-32 stubs, but if the stubs are updated -and this patch is not applied then the other cores will sleep forever. - -See: https://github.com/raspberrypi/linux/issues/1989 - -Signed-off-by: Phil Elwell ---- - drivers/irqchip/irq-bcm2836.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/drivers/irqchip/irq-bcm2836.c b/drivers/irqchip/irq-bcm2836.c -index 9a7ee04ee0d9b7aa734cf3159ed59c19a338de0d..014f13f89eb896f5cfc75ed9891787d0490baa4b 100644 ---- a/drivers/irqchip/irq-bcm2836.c -+++ b/drivers/irqchip/irq-bcm2836.c -@@ -248,6 +248,9 @@ static int __init bcm2836_smp_boot_secondary(unsigned int cpu, - writel(secondary_startup_phys, - intc.base + LOCAL_MAILBOX3_SET0 + 16 * cpu); - -+ dsb(sy); /* Ensure write has completed before waking the other CPUs */ -+ sev(); -+ - return 0; - } - - -From c1f656b7faa555665af9946bf3e586a66258213e Mon Sep 17 00:00:00 2001 -From: Ahmet Inan -Date: Mon, 15 May 2017 17:10:53 +0200 -Subject: [PATCH 149/199] overlays: Add Goodix overlay - -Add support for I2C connected Goodix gt9271 multiple touch controller using -GPIOs 4 and 17 (pins 7 and 11 on GPIO header) for interrupt and reset. - -Signed-off-by: Ahmet Inan ---- - arch/arm/boot/dts/overlays/Makefile | 1 + - arch/arm/boot/dts/overlays/README | 8 +++++ - arch/arm/boot/dts/overlays/goodix-overlay.dts | 46 +++++++++++++++++++++++++++ - 3 files changed, 55 insertions(+) - create mode 100644 arch/arm/boot/dts/overlays/goodix-overlay.dts - -diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index e0ff5793f124fce73732e175bfca424f0a97b632..ddf431837b619f99beb8df45a2714c112e02273c 100644 ---- a/arch/arm/boot/dts/overlays/Makefile -+++ b/arch/arm/boot/dts/overlays/Makefile -@@ -25,6 +25,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ - enc28j60.dtbo \ - enc28j60-spi2.dtbo \ - fe-pi-audio.dtbo \ -+ goodix.dtbo \ - googlevoicehat-soundcard.dtbo \ - gpio-ir.dtbo \ - gpio-poweroff.dtbo \ -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 4171208933e675a5a3a7e17f8b15447f30a11887..dc391ac88f738c9a711b01a87561c94733745457 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -459,6 +459,14 @@ Load: dtoverlay=fe-pi-audio - Params: - - -+Name: goodix -+Info: Enables I2C connected Goodix gt9271 multiple touch controller using -+ GPIOs 4 and 17 (pins 7 and 11 on GPIO header) for interrupt and reset. -+Load: dtoverlay=goodix,= -+Params: interrupt GPIO used for interrupt (default 4) -+ reset GPIO used for reset (default 17) -+ -+ - Name: googlevoicehat-soundcard - Info: Configures the Google voiceHAT soundcard - Load: dtoverlay=googlevoicehat-soundcard -diff --git a/arch/arm/boot/dts/overlays/goodix-overlay.dts b/arch/arm/boot/dts/overlays/goodix-overlay.dts -new file mode 100644 -index 0000000000000000000000000000000000000000..084f74042ed6379ebd9281374d5391a7e23a431e ---- /dev/null -+++ b/arch/arm/boot/dts/overlays/goodix-overlay.dts -@@ -0,0 +1,46 @@ -+// Device tree overlay for I2C connected Goodix gt9271 multiple touch controller -+/dts-v1/; -+/plugin/; -+ -+/ { -+ compatible = "brcm,bcm2708"; -+ -+ fragment@0 { -+ target = <&gpio>; -+ __overlay__ { -+ goodix_pins: goodix_pins { -+ brcm,pins = <4 17>; // interrupt and reset -+ brcm,function = <0 0>; // in -+ brcm,pull = <2 2>; // pull-up -+ }; -+ }; -+ }; -+ -+ fragment@1 { -+ target = <&i2c1>; -+ __overlay__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ gt9271: gt9271@14 { -+ compatible = "goodix,gt9271"; -+ reg = <0x14>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&goodix_pins>; -+ interrupt-parent = <&gpio>; -+ interrupts = <4 2>; // high-to-low edge triggered -+ irq-gpios = <&gpio 4 0>; // Pin7 on GPIO header -+ reset-gpios = <&gpio 17 0>; // Pin11 on GPIO header -+ }; -+ }; -+ }; -+ -+ __overrides__ { -+ interrupt = <&goodix_pins>,"brcm,pins:0", -+ <>9271>,"interrupts:0", -+ <>9271>,"irq-gpios:4"; -+ reset = <&goodix_pins>,"brcm,pins:4", -+ <>9271>,"reset-gpios:4"; -+ }; -+}; - -From 7af08623c8ef0a98da5490a87d9cc1e3b4867614 Mon Sep 17 00:00:00 2001 -From: chenzhiwo -Date: Wed, 17 May 2017 16:34:57 +0800 -Subject: [PATCH 150/199] Add device tree overlay for GPIO connected rotary - encoder. See Documentation/input/rotary-encoder.txt for more information. - ---- - arch/arm/boot/dts/overlays/Makefile | 1 + - arch/arm/boot/dts/overlays/README | 9 +++++ - .../boot/dts/overlays/rotary-encoder-overlay.dts | 43 ++++++++++++++++++++++ - 3 files changed, 53 insertions(+) - create mode 100644 arch/arm/boot/dts/overlays/rotary-encoder-overlay.dts - -diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index ddf431837b619f99beb8df45a2714c112e02273c..6853e3575f001522a402e7eb31933d32fbac581d 100644 ---- a/arch/arm/boot/dts/overlays/Makefile -+++ b/arch/arm/boot/dts/overlays/Makefile -@@ -76,6 +76,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ - pwm-2chan.dtbo \ - qca7000.dtbo \ - raspidac3.dtbo \ -+ rotary-encoder.dtbo \ - rpi-backlight.dtbo \ - rpi-cirrus-wm5102.dtbo \ - rpi-dac.dtbo \ -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index dc391ac88f738c9a711b01a87561c94733745457..f7e11387e535ce2dba8272798a023963315685b6 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -1122,6 +1122,15 @@ Load: dtoverlay=raspidac3 - Params: - - -+Name: rotary-encoder -+Info: Overlay for GPIO connected rotary encoder. -+Load: dtoverlay=rotary-encoder,= -+Params: rotary0_pin_a GPIO connected to rotary encoder channel A -+ (default 4). -+ rotary0_pin_b GPIO connected to rotary encoder channel B -+ (default 17). -+ -+ - Name: rpi-backlight - Info: Raspberry Pi official display backlight driver - Load: dtoverlay=rpi-backlight -diff --git a/arch/arm/boot/dts/overlays/rotary-encoder-overlay.dts b/arch/arm/boot/dts/overlays/rotary-encoder-overlay.dts -new file mode 100644 -index 0000000000000000000000000000000000000000..c0c6bccff60cc15d9a9bf59d2c7cba41eb9c1cdc ---- /dev/null -+++ b/arch/arm/boot/dts/overlays/rotary-encoder-overlay.dts -@@ -0,0 +1,43 @@ -+// Device tree overlay for GPIO connected rotary encoder. -+/dts-v1/; -+/plugin/; -+ -+/ { -+ compatible = "brcm,bcm2708"; -+ -+ fragment@0 { -+ target = <&gpio>; -+ __overlay__ { -+ rotary0_pins: rotary0_pins { -+ brcm,pins = <4 17>; /* gpio 4 17 */ -+ brcm,function = <0 0>; /* input */ -+ brcm,pull = <2 2>; /* pull-up */ -+ }; -+ -+ }; -+ }; -+ -+ fragment@1 { -+ target-path = "/"; -+ __overlay__ { -+ rotary0: rotary@0 { -+ compatible = "rotary-encoder"; -+ status = "okay"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&rotary0_pins>; -+ gpios = <&gpio 4 0>, <&gpio 17 0>; -+ linux,axis = <0>; /* REL_X */ -+ rotary-encoder,encoding = "gray"; -+ rotary-encoder,relative-axis; -+ }; -+ }; -+ -+ }; -+ -+ __overrides__ { -+ rotary0_pin_a = <&rotary0>,"gpios:4", -+ <&rotary0_pins>,"brcm,pins:0"; -+ rotary0_pin_b = <&rotary0>,"gpios:16", -+ <&rotary0_pins>,"brcm,pins:4"; -+ }; -+}; - -From 76196f40dbed74eac9240e52c4d91498442ea5c1 Mon Sep 17 00:00:00 2001 -From: Anton Onishchenko -Date: Tue, 23 May 2017 18:55:46 +0300 -Subject: [PATCH 151/199] mpu6050 device tree overlay (#2031) - -Add overlay and config options for InvenSense MPU6050 6-axis motion -detector. ---- - arch/arm/boot/dts/overlays/Makefile | 1 + - arch/arm/boot/dts/overlays/README | 6 ++++++ - arch/arm/boot/dts/overlays/mpu6050-overlay.dts | 28 ++++++++++++++++++++++++++ - arch/arm/configs/bcm2709_defconfig | 3 +-- - arch/arm/configs/bcmrpi_defconfig | 3 +-- - 5 files changed, 37 insertions(+), 4 deletions(-) - create mode 100644 arch/arm/boot/dts/overlays/mpu6050-overlay.dts - -diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 6853e3575f001522a402e7eb31933d32fbac581d..c95b37f0a4c72160421f44819c5f29246d3352f9 100644 ---- a/arch/arm/boot/dts/overlays/Makefile -+++ b/arch/arm/boot/dts/overlays/Makefile -@@ -59,6 +59,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ - midi-uart0.dtbo \ - midi-uart1.dtbo \ - mmc.dtbo \ -+ mpu6050.dtbo \ - mz61581.dtbo \ - pi3-act-led.dtbo \ - pi3-disable-bt.dtbo \ -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index f7e11387e535ce2dba8272798a023963315685b6..d560490c2661c3396d37315bbb9b2d9e93b5ac15 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -898,6 +898,12 @@ Params: overclock_50 Clock (in MHz) to use when the MMC framework - requests 50MHz - - -+Name: mpu6050 -+Info: Overlay for i2c connected mpu6050 imu -+Load: dtoverlay=mpu6050,= -+Params: interrupt GPIO pin for interrupt (default 4) -+ -+ - Name: mz61581 - Info: MZ61581 display by Tontec - Load: dtoverlay=mz61581,= -diff --git a/arch/arm/boot/dts/overlays/mpu6050-overlay.dts b/arch/arm/boot/dts/overlays/mpu6050-overlay.dts -new file mode 100644 -index 0000000000000000000000000000000000000000..06037969c3abba270b3cad45875342f3c730506e ---- /dev/null -+++ b/arch/arm/boot/dts/overlays/mpu6050-overlay.dts -@@ -0,0 +1,28 @@ -+// Definitions for MPU6050 -+/dts-v1/; -+/plugin/; -+ -+/ { -+ compatible = "brcm,bcm2708"; -+ -+ fragment@0 { -+ target = <&i2c1>; -+ __overlay__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ clock-frequency = <400000>; -+ -+ mpu6050: mpu6050@68 { -+ compatible = "invensense,mpu6050"; -+ reg = <0x68>; -+ interrupt-parent = <&gpio>; -+ interrupts = <4 1>; -+ }; -+ }; -+ }; -+ -+ __overrides__ { -+ interrupt = <&mpu6050>,"interrupts:0"; -+ }; -+}; -diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 5f5830fb19c497895c3e6d6e3a47e961fc84e09a..b310e13042b20c709a8139d0b3973c3ed5f283cf 100644 ---- a/arch/arm/configs/bcm2709_defconfig -+++ b/arch/arm/configs/bcm2709_defconfig -@@ -1164,13 +1164,12 @@ CONFIG_RASPBERRYPI_POWER=y - CONFIG_EXTCON=m - CONFIG_EXTCON_ARIZONA=m - CONFIG_IIO=m --CONFIG_IIO_BUFFER=y - CONFIG_IIO_BUFFER_CB=m --CONFIG_IIO_KFIFO_BUF=m - CONFIG_MCP320X=m - CONFIG_MCP3422=m - CONFIG_DHT11=m - CONFIG_HTU21=m -+CONFIG_INV_MPU6050_I2C=m - CONFIG_BMP280=m - CONFIG_PWM_BCM2835=m - CONFIG_PWM_PCA9685=m -diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index bfda35e4c4bce99b5125eab80f97c73a159de969..a9841b71a4b633a81392c533578845d62f6aa78f 100644 ---- a/arch/arm/configs/bcmrpi_defconfig -+++ b/arch/arm/configs/bcmrpi_defconfig -@@ -1170,13 +1170,12 @@ CONFIG_RASPBERRYPI_POWER=y - CONFIG_EXTCON=m - CONFIG_EXTCON_ARIZONA=m - CONFIG_IIO=m --CONFIG_IIO_BUFFER=y - CONFIG_IIO_BUFFER_CB=m --CONFIG_IIO_KFIFO_BUF=m - CONFIG_MCP320X=m - CONFIG_MCP3422=m - CONFIG_DHT11=m - CONFIG_HTU21=m -+CONFIG_INV_MPU6050_I2C=m - CONFIG_BMP280=m - CONFIG_PWM_BCM2835=m - CONFIG_PWM_PCA9685=m - -From c97964c91a2bceeb94bdb8f63edf39ef67194808 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Wed, 31 May 2017 09:33:55 +0100 -Subject: [PATCH 152/199] config: Adding SENSOR_JC42 - -The jc42 module supports a number of I2C-based temperature -sensor modules. - -[ DM_RAID0 config lost because now selected by DM_RAID ] - -See: https://github.com/raspberrypi/linux/issues/2046 - -Signed-off-by: Phil Elwell ---- - arch/arm/configs/bcm2709_defconfig | 1 + - arch/arm/configs/bcmrpi_defconfig | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index b310e13042b20c709a8139d0b3973c3ed5f283cf..00845b52952479976b4fdfdc94a16a366d82ae7d 100644 ---- a/arch/arm/configs/bcm2709_defconfig -+++ b/arch/arm/configs/bcm2709_defconfig -@@ -654,6 +654,7 @@ CONFIG_POWER_RESET=y - CONFIG_POWER_RESET_GPIO=y - CONFIG_BATTERY_DS2760=m - CONFIG_HWMON=m -+CONFIG_SENSORS_JC42=m - CONFIG_SENSORS_LM75=m - CONFIG_SENSORS_SHT21=m - CONFIG_SENSORS_SHTC1=m -diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index a9841b71a4b633a81392c533578845d62f6aa78f..2ba46a28c2e7b21a401cc3544353937eca44218d 100644 ---- a/arch/arm/configs/bcmrpi_defconfig -+++ b/arch/arm/configs/bcmrpi_defconfig -@@ -647,6 +647,7 @@ CONFIG_POWER_RESET=y - CONFIG_POWER_RESET_GPIO=y - CONFIG_BATTERY_DS2760=m - CONFIG_HWMON=m -+CONFIG_SENSORS_JC42=m - CONFIG_SENSORS_LM75=m - CONFIG_SENSORS_SHT21=m - CONFIG_SENSORS_SHTC1=m - -From 3867f9c70395cfc2c33b0b7a23d80d64a5589b47 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Wed, 31 May 2017 15:27:39 +0100 -Subject: [PATCH 153/199] BCM270X_DT: Improve i2c-sensor and i2c-rtc overlay - -Use the "__dormant__" feature to permit multiple instances of each -overlay, which is more useful now that changing the "reg" property -also changes the node address. Although the overlay grows slightly, -when applied only the requested node is included. - -Usage does not change, except that the "lm75addr" parameter of the -i2c-sensor overlay has been deprecated in favour of the generic -"addr" parameter. - -Signed-off-by: Phil Elwell ---- - arch/arm/boot/dts/overlays/README | 8 +- - arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts | 127 ++++++++++++++++++---- - arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts | 87 ++++++++++++--- - 3 files changed, 179 insertions(+), 43 deletions(-) - -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index d560490c2661c3396d37315bbb9b2d9e93b5ac15..ce8706a8aa88c36b0dee95c56ee58b4a524b8b43 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -660,8 +660,8 @@ Name: i2c-sensor - Info: Adds support for a number of I2C barometric pressure and temperature - sensors on i2c_arm - Load: dtoverlay=i2c-sensor,= --Params: addr Set the address for the BME280, BMP280 or -- TMP102 -+Params: addr Set the address for the BME280, BMP280, TMP102 -+ or LM75 - - bme280 Select the Bosch Sensortronic BME280 - Valid addresses 0x76-0x77, default 0x76 -@@ -674,9 +674,9 @@ Params: addr Set the address for the BME280, BMP280 or - Valid addresses 0x76-0x77, default 0x76 - - lm75 Select the Maxim LM75 temperature sensor -+ Valid addresses 0x48-0x4f, default 0x4f - -- lm75addr Choose the address for the LM75 (0x48-0x4f - -- default 0x4f) -+ lm75addr Deprecated - use addr parameter instead - - si7020 Select the Silicon Labs Si7013/20/21 humidity/ - temperature sensor -diff --git a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts -index 1efcf0b712c9c5c19210545002ac1f0931db58f5..6140f172a86b8731782f938f76cb5dac9f28b662 100644 ---- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts -+++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts -@@ -7,7 +7,7 @@ - - fragment@0 { - target = <&i2c_arm>; -- __overlay__ { -+ __dormant__ { - #address-cells = <1>; - #size-cells = <0>; - status = "okay"; -@@ -17,61 +17,142 @@ - reg = <0x69>; - abracon,tc-diode = "standard"; - abracon,tc-resistor = <0>; -- status = "disable"; -+ status = "okay"; - }; -+ }; -+ }; -+ -+ fragment@1 { -+ target = <&i2c_arm>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ - ds1307: ds1307@68 { - compatible = "maxim,ds1307"; - reg = <0x68>; -- status = "disable"; -+ status = "okay"; - }; -+ }; -+ }; -+ -+ fragment@2 { -+ target = <&i2c_arm>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ - ds1339: ds1339@68 { - compatible = "dallas,ds1339"; - trickle-resistor-ohms = <0>; - reg = <0x68>; -- status = "disable"; -+ status = "okay"; - }; -+ }; -+ }; -+ -+ fragment@3 { -+ target = <&i2c_arm>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ ds3231: ds3231@68 { -+ compatible = "maxim,ds3231"; -+ reg = <0x68>; -+ status = "okay"; -+ }; -+ }; -+ }; -+ -+ fragment@4 { -+ target = <&i2c_arm>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ - mcp7940x: mcp7940x@6f { - compatible = "microchip,mcp7940x"; - reg = <0x6f>; -- status = "disable"; -+ status = "okay"; - }; -+ }; -+ }; -+ -+ fragment@5 { -+ target = <&i2c_arm>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ - mcp7941x: mcp7941x@6f { - compatible = "microchip,mcp7941x"; - reg = <0x6f>; -- status = "disable"; -- }; -- ds3231: ds3231@68 { -- compatible = "maxim,ds3231"; -- reg = <0x68>; -- status = "disable"; -+ status = "okay"; - }; -+ }; -+ }; -+ -+ fragment@6 { -+ target = <&i2c_arm>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ - pcf2127: pcf2127@51 { - compatible = "nxp,pcf2127"; - reg = <0x51>; -- status = "disable"; -+ status = "okay"; - }; -+ }; -+ }; -+ -+ fragment@7 { -+ target = <&i2c_arm>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ - pcf8523: pcf8523@68 { - compatible = "nxp,pcf8523"; - reg = <0x68>; -- status = "disable"; -+ status = "okay"; - }; -+ }; -+ }; -+ -+ fragment@8 { -+ target = <&i2c_arm>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ - pcf8563: pcf8563@51 { - compatible = "nxp,pcf8563"; - reg = <0x51>; -- status = "disable"; -+ status = "okay"; - }; - }; - }; -+ - __overrides__ { -- abx80x = <&abx80x>,"status"; -- ds1307 = <&ds1307>,"status"; -- ds1339 = <&ds1339>,"status"; -- ds3231 = <&ds3231>,"status"; -- mcp7940x = <&mcp7940x>,"status"; -- mcp7941x = <&mcp7941x>,"status"; -- pcf2127 = <&pcf2127>,"status"; -- pcf8523 = <&pcf8523>,"status"; -- pcf8563 = <&pcf8563>,"status"; -+ abx80x = <0>,"+0"; -+ ds1307 = <0>,"+1"; -+ ds1339 = <0>,"+2"; -+ ds3231 = <0>,"+3"; -+ mcp7940x = <0>,"+4"; -+ mcp7941x = <0>,"+5"; -+ pcf2127 = <0>,"+6"; -+ pcf8523 = <0>,"+7"; -+ pcf8563 = <0>,"+8"; - trickle-diode-type = <&abx80x>,"abracon,tc-diode"; - trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0", - <&abx80x>,"abracon,tc-resistor"; -diff --git a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts -index e86a13f92c3f75c14fa4425cdfb081d6795ff76a..d2f0008addfadac8f6ed774a6e4f3f97871c0d61 100644 ---- a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts -+++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts -@@ -7,7 +7,7 @@ - - fragment@0 { - target = <&i2c_arm>; -- __overlay__ { -+ __dormant__ { - #address-cells = <1>; - #size-cells = <0>; - status = "okay"; -@@ -15,57 +15,112 @@ - bme280: bme280@76 { - compatible = "bosch,bme280"; - reg = <0x76>; -- status = "disable"; -+ status = "okay"; - }; -+ }; -+ }; -+ -+ fragment@1 { -+ target = <&i2c_arm>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; - - bmp085: bmp085@77 { - compatible = "bosch,bmp085"; - reg = <0x77>; - default-oversampling = <3>; -- status = "disable"; -+ status = "okay"; - }; -+ }; -+ }; -+ -+ fragment@2 { -+ target = <&i2c_arm>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; - - bmp180: bmp180@77 { - compatible = "bosch,bmp180"; - reg = <0x77>; -- status = "disable"; -+ status = "okay"; - }; -+ }; -+ }; -+ -+ fragment@3 { -+ target = <&i2c_arm>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; - - bmp280: bmp280@76 { - compatible = "bosch,bmp280"; - reg = <0x76>; -- status = "disable"; -+ status = "okay"; - }; -+ }; -+ }; -+ -+ fragment@4 { -+ target = <&i2c_arm>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; - - lm75: lm75@4f { - compatible = "lm75"; - reg = <0x4f>; -- status = "disable"; -+ status = "okay"; - }; -+ }; -+ }; -+ -+ fragment@5 { -+ target = <&i2c_arm>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; - - si7020: si7020@40 { - compatible = "si7020"; - reg = <0x40>; -- status = "disable"; -+ status = "okay"; - }; -+ }; -+ }; -+ -+ fragment@6 { -+ target = <&i2c_arm>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; - - tmp102: tmp102@48 { - compatible = "ti,tmp102"; - reg = <0x48>; -- status = "disable"; -+ status = "okay"; - }; - }; - }; - - __overrides__ { -- addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0"; -- bme280 = <&bme280>,"status"; -- bmp085 = <&bmp085>,"status"; -- bmp180 = <&bmp180>,"status"; -- bmp280 = <&bmp280>,"status"; -- lm75 = <&lm75>,"status"; -+ addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0", -+ <&lm75>,"reg:0"; -+ bme280 = <0>,"+0"; -+ bmp085 = <0>,"+1"; -+ bmp180 = <0>,"+2"; -+ bmp280 = <0>,"+3"; -+ lm75 = <0>,"+4"; - lm75addr = <&lm75>,"reg:0"; -- si7020 = <&si7020>,"status"; -- tmp102 = <&tmp102>,"status"; -+ si7020 = <0>,"+5"; -+ tmp102 = <0>,"+6"; - }; - }; - -From 1c7571813a26ad03b886f2b0bf411f08a9892ac7 Mon Sep 17 00:00:00 2001 -From: Stefan Tatschner -Date: Mon, 29 May 2017 21:46:16 +0200 -Subject: [PATCH 154/199] Add device tree config for htu21 - -See: https://github.com/raspberrypi/linux/pull/2041 - -Signed-off-by: Phil Elwell ---- - arch/arm/boot/dts/overlays/README | 2 ++ - arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts | 26 ++++++++++++++++++----- - 2 files changed, 23 insertions(+), 5 deletions(-) - -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index ce8706a8aa88c36b0dee95c56ee58b4a524b8b43..bce02c82f3438995e5a74080876391f758bfe27b 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -673,6 +673,8 @@ Params: addr Set the address for the BME280, BMP280, TMP102 - bmp280 Select the Bosch Sensortronic BMP280 - Valid addresses 0x76-0x77, default 0x76 - -+ htu21 Select the HTU21 temperature and humidity sensor -+ - lm75 Select the Maxim LM75 temperature sensor - Valid addresses 0x48-0x4f, default 0x4f - -diff --git a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts -index d2f0008addfadac8f6ed774a6e4f3f97871c0d61..17c27e3b666a7a83619471b50c63bb93836653c5 100644 ---- a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts -+++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts -@@ -73,6 +73,21 @@ - #size-cells = <0>; - status = "okay"; - -+ htu21: htu21@40 { -+ compatible = "htu21"; -+ reg = <0x40>; -+ status = "okay"; -+ }; -+ }; -+ }; -+ -+ fragment@5 { -+ target = <&i2c_arm>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ - lm75: lm75@4f { - compatible = "lm75"; - reg = <0x4f>; -@@ -81,7 +96,7 @@ - }; - }; - -- fragment@5 { -+ fragment@6 { - target = <&i2c_arm>; - __dormant__ { - #address-cells = <1>; -@@ -96,7 +111,7 @@ - }; - }; - -- fragment@6 { -+ fragment@7 { - target = <&i2c_arm>; - __dormant__ { - #address-cells = <1>; -@@ -118,9 +133,10 @@ - bmp085 = <0>,"+1"; - bmp180 = <0>,"+2"; - bmp280 = <0>,"+3"; -- lm75 = <0>,"+4"; -+ htu21 = <0>,"+4"; -+ lm75 = <0>,"+5"; - lm75addr = <&lm75>,"reg:0"; -- si7020 = <0>,"+5"; -- tmp102 = <0>,"+6"; -+ si7020 = <0>,"+6"; -+ tmp102 = <0>,"+7"; - }; - }; - -From 7f73bc13baca73c1428385dcfbdb72deffdac09f Mon Sep 17 00:00:00 2001 -From: sandeepal -Date: Fri, 2 Jun 2017 18:59:46 +0530 -Subject: [PATCH 155/199] Allo Digione Driver (#2048) - -Driver for the Allo Digione soundcard ---- - arch/arm/boot/dts/overlays/Makefile | 1 + - arch/arm/boot/dts/overlays/README | 6 + - .../arm/boot/dts/overlays/allo-digione-overlay.dts | 44 ++++ - arch/arm/configs/bcm2709_defconfig | 1 + - arch/arm/configs/bcmrpi_defconfig | 1 + - sound/soc/bcm/Kconfig | 7 + - sound/soc/bcm/Makefile | 2 + - sound/soc/bcm/allo-digione.c | 268 +++++++++++++++++++++ - 8 files changed, 330 insertions(+) - create mode 100644 arch/arm/boot/dts/overlays/allo-digione-overlay.dts - create mode 100644 sound/soc/bcm/allo-digione.c - -diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index c95b37f0a4c72160421f44819c5f29246d3352f9..eca81982c0f19988abd05165fc62a80d26f539cb 100644 ---- a/arch/arm/boot/dts/overlays/Makefile -+++ b/arch/arm/boot/dts/overlays/Makefile -@@ -8,6 +8,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ - ads7846.dtbo \ - akkordion-iqdacplus.dtbo \ - allo-boss-dac-pcm512x-audio.dtbo \ -+ allo-digione.dtbo \ - allo-piano-dac-pcm512x-audio.dtbo \ - allo-piano-dac-plus-pcm512x-audio.dtbo \ - at86rf233.dtbo \ -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index bce02c82f3438995e5a74080876391f758bfe27b..19df6883be4277240283d5f63f27e34a22a2eec5 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -287,6 +287,12 @@ Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec - slave" - - -+Name: allo-digione -+Info: Configures the Allo Digione audio card -+Load: dtoverlay=allo-digione -+Params: -+ -+ - Name: allo-piano-dac-pcm512x-audio - Info: Configures the Allo Piano DAC (2.0/2.1) audio cards. - (NB. This initial support is for 2.0 channel audio ONLY! ie. stereo. -diff --git a/arch/arm/boot/dts/overlays/allo-digione-overlay.dts b/arch/arm/boot/dts/overlays/allo-digione-overlay.dts -new file mode 100644 -index 0000000000000000000000000000000000000000..101277a11a24e9b3eb441c44c3f19c61836fe77c ---- /dev/null -+++ b/arch/arm/boot/dts/overlays/allo-digione-overlay.dts -@@ -0,0 +1,44 @@ -+// Definitions for Allo DigiOne -+/dts-v1/; -+/plugin/; -+ -+/ { -+ compatible = "brcm,bcm2708"; -+ -+ fragment@0 { -+ target = <&i2s>; -+ __overlay__ { -+ status = "okay"; -+ }; -+ }; -+ -+ fragment@1 { -+ target = <&i2c1>; -+ __overlay__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ wm8804@3b { -+ #sound-dai-cells = <0>; -+ compatible = "wlf,wm8804"; -+ reg = <0x3b>; -+ PVDD-supply = <&vdd_3v3_reg>; -+ DVDD-supply = <&vdd_3v3_reg>; -+ status = "okay"; -+ wlf,reset-gpio = <&gpio 17 0>; -+ }; -+ }; -+ }; -+ -+ fragment@2 { -+ target = <&sound>; -+ __overlay__ { -+ compatible = "allo,allo-digione"; -+ i2s-controller = <&i2s>; -+ status = "okay"; -+ clock44-gpio = <&gpio 5 0>; -+ clock48-gpio = <&gpio 6 0>; -+ }; -+ }; -+}; -diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 00845b52952479976b4fdfdc94a16a366d82ae7d..d2838cde4019be5f6faf0a70038c6365df9e6dde 100644 ---- a/arch/arm/configs/bcm2709_defconfig -+++ b/arch/arm/configs/bcm2709_defconfig -@@ -892,6 +892,7 @@ CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2=m - CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m - CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m - CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m -+CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m - CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m - CONFIG_SND_PISOUND=m - CONFIG_SND_SOC_ADAU1701=m -diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 2ba46a28c2e7b21a401cc3544353937eca44218d..efdb0fbc1b07c7b679cb20d8c1270c77d5d3c684 100644 ---- a/arch/arm/configs/bcmrpi_defconfig -+++ b/arch/arm/configs/bcmrpi_defconfig -@@ -885,6 +885,7 @@ CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2=m - CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m - CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m - CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m -+CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m - CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m - CONFIG_SND_PISOUND=m - CONFIG_SND_SOC_ADAU1701=m -diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 355bdeb25f81d15593f78df0e87a48404908ca4b..381d32bb9deb3cf2c531e2a4563418cd6eb9d505 100644 ---- a/sound/soc/bcm/Kconfig -+++ b/sound/soc/bcm/Kconfig -@@ -176,6 +176,13 @@ config SND_BCM2708_SOC_ALLO_BOSS_DAC - help - Say Y or M if you want to add support for Allo Boss DAC. - -+config SND_BCM2708_SOC_ALLO_DIGIONE -+ tristate "Support for Allo DigiOne" -+ depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S -+ select SND_SOC_PCM512x_I2C -+ help -+ Say Y or M if you want to add support for Allo DigiOne. -+ - config SND_BCM2708_SOC_FE_PI_AUDIO - tristate "Support for Fe-Pi-Audio" - depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S -diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 72e1620fa4038035804cf3b2a09c6b12e7ae0fe1..53ea8229d7ac2065176983385dd7ba85ee3915ea 100644 ---- a/sound/soc/bcm/Makefile -+++ b/sound/soc/bcm/Makefile -@@ -34,6 +34,7 @@ snd-soc-dionaudio-loco-v2-objs := dionaudio_loco-v2.o - snd-soc-allo-boss-dac-objs := allo-boss-dac.o - snd-soc-allo-piano-dac-objs := allo-piano-dac.o - snd-soc-allo-piano-dac-plus-objs := allo-piano-dac-plus.o -+snd-soc-allo-digione-objs := allo-digione.o - snd-soc-pisound-objs := pisound.o - snd-soc-fe-pi-audio-objs := fe-pi-audio.o - -@@ -60,5 +61,6 @@ obj-$(CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2) += snd-soc-dionaudio-loco-v2.o - obj-$(CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC) += snd-soc-allo-boss-dac.o - obj-$(CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC) += snd-soc-allo-piano-dac.o - obj-$(CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS) += snd-soc-allo-piano-dac-plus.o -+obj-$(CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE) += snd-soc-allo-digione.o - obj-$(CONFIG_SND_PISOUND) += snd-soc-pisound.o - obj-$(CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO) += snd-soc-fe-pi-audio.o -diff --git a/sound/soc/bcm/allo-digione.c b/sound/soc/bcm/allo-digione.c -new file mode 100644 -index 0000000000000000000000000000000000000000..e3664e44c699d0102120ecf99e8b780a4505ebad ---- /dev/null -+++ b/sound/soc/bcm/allo-digione.c -@@ -0,0 +1,268 @@ -+/* -+ * ASoC Driver for Allo DigiOne -+ * -+ * Author: Baswaraj -+ * Copyright 2017 -+ * based on code by Daniel Matuschek -+ * based on code by Florian Meier -+ * -+ * 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 "../codecs/wm8804.h" -+ -+static short int auto_shutdown_output = 0; -+module_param(auto_shutdown_output, short, -+ S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP); -+MODULE_PARM_DESC(auto_shutdown_output, "Shutdown SP/DIF output if playback is stopped"); -+ -+#define CLK_44EN_RATE 22579200UL -+#define CLK_48EN_RATE 24576000UL -+ -+static struct gpio_desc *snd_allo_clk44gpio; -+static struct gpio_desc *snd_allo_clk48gpio; -+ -+static int samplerate = 44100; -+ -+static uint32_t snd_allo_digione_enable_clock(int sample_rate) -+{ -+ switch (sample_rate) { -+ case 11025: -+ case 22050: -+ case 44100: -+ case 88200: -+ case 176400: -+ gpiod_set_value_cansleep(snd_allo_clk44gpio, 1); -+ gpiod_set_value_cansleep(snd_allo_clk48gpio, 0); -+ return CLK_44EN_RATE; -+ default: -+ gpiod_set_value_cansleep(snd_allo_clk48gpio, 1); -+ gpiod_set_value_cansleep(snd_allo_clk44gpio, 0); -+ return CLK_48EN_RATE; -+ } -+} -+ -+ -+static int snd_allo_digione_init(struct snd_soc_pcm_runtime *rtd) -+{ -+ struct snd_soc_codec *codec = rtd->codec; -+ -+ /* enable TX output */ -+ snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0); -+ -+ return 0; -+} -+ -+static int snd_allo_digione_startup(struct snd_pcm_substream *substream) -+{ -+ /* turn on digital output */ -+ struct snd_soc_pcm_runtime *rtd = substream->private_data; -+ struct snd_soc_codec *codec = rtd->codec; -+ snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x00); -+ return 0; -+} -+ -+static void snd_allo_digione_shutdown(struct snd_pcm_substream *substream) -+{ -+ /* turn off output */ -+ if (auto_shutdown_output) { -+ /* turn off output */ -+ struct snd_soc_pcm_runtime *rtd = substream->private_data; -+ struct snd_soc_codec *codec = rtd->codec; -+ snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x3c); -+ } -+} -+ -+static int snd_allo_digione_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 *codec_dai = rtd->codec_dai; -+ struct snd_soc_codec *codec = rtd->codec; -+ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; -+ -+ int sysclk = 27000000; /* This is fixed on this board */ -+ -+ long mclk_freq = 0; -+ int mclk_div = 1; -+ int sampling_freq = 1; -+ -+ int ret; -+ -+ samplerate = params_rate(params); -+ -+ if (samplerate <= 96000) { -+ mclk_freq = samplerate * 256; -+ mclk_div = WM8804_MCLKDIV_256FS; -+ } else { -+ mclk_freq = samplerate * 128; -+ mclk_div = WM8804_MCLKDIV_128FS; -+ } -+ -+ sysclk = snd_allo_digione_enable_clock(samplerate); -+ -+ switch (samplerate) { -+ case 32000: -+ sampling_freq=0x03; -+ break; -+ case 44100: -+ sampling_freq=0x00; -+ break; -+ case 48000: -+ sampling_freq=0x02; -+ break; -+ case 88200: -+ sampling_freq=0x08; -+ break; -+ case 96000: -+ sampling_freq=0x0a; -+ break; -+ case 176400: -+ sampling_freq=0x0c; -+ break; -+ case 192000: -+ sampling_freq=0x0e; -+ break; -+ default: -+ dev_err(codec->dev, -+ "Failed to set WM8804 SYSCLK, unsupported samplerate %d\n", -+ samplerate); -+ } -+ -+ snd_soc_dai_set_clkdiv(codec_dai, WM8804_MCLK_DIV, mclk_div); -+ snd_soc_dai_set_pll(codec_dai, 0, 0, sysclk, mclk_freq); -+ -+ ret = snd_soc_dai_set_sysclk(codec_dai, WM8804_TX_CLKSRC_PLL, -+ sysclk, SND_SOC_CLOCK_OUT); -+ -+ if (ret < 0) { -+ dev_err(codec->dev, -+ "Failed to set WM8804 SYSCLK: %d\n", ret); -+ return ret; -+ } -+ -+ /* Enable TX output */ -+ snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0); -+ -+ /* Power on */ -+ snd_soc_update_bits(codec, WM8804_PWRDN, 0x9, 0); -+ -+ /* set sampling frequency status bits */ -+ snd_soc_update_bits(codec, WM8804_SPDTX4, 0x0f, sampling_freq); -+ -+ return snd_soc_dai_set_bclk_ratio(cpu_dai, 64); -+} -+ -+/* machine stream operations */ -+static struct snd_soc_ops snd_allo_digione_ops = { -+ .hw_params = snd_allo_digione_hw_params, -+ .startup = snd_allo_digione_startup, -+ .shutdown = snd_allo_digione_shutdown, -+}; -+ -+static struct snd_soc_dai_link snd_allo_digione_dai[] = { -+{ -+ .name = "Allo DigiOne", -+ .stream_name = "Allo DigiOne HiFi", -+ .cpu_dai_name = "bcm2708-i2s.0", -+ .codec_dai_name = "wm8804-spdif", -+ .platform_name = "bcm2708-i2s.0", -+ .codec_name = "wm8804.1-003b", -+ .dai_fmt = SND_SOC_DAIFMT_I2S | -+ SND_SOC_DAIFMT_NB_NF | -+ SND_SOC_DAIFMT_CBM_CFM, -+ .ops = &snd_allo_digione_ops, -+ .init = snd_allo_digione_init, -+}, -+}; -+ -+/* audio machine driver */ -+static struct snd_soc_card snd_allo_digione = { -+ .name = "snd_allo_digione", -+ .driver_name = "AlloDigiOne", -+ .owner = THIS_MODULE, -+ .dai_link = snd_allo_digione_dai, -+ .num_links = ARRAY_SIZE(snd_allo_digione_dai), -+}; -+ -+static int snd_allo_digione_probe(struct platform_device *pdev) -+{ -+ int ret = 0; -+ -+ snd_allo_digione.dev = &pdev->dev; -+ -+ if (pdev->dev.of_node) { -+ struct device_node *i2s_node; -+ struct snd_soc_dai_link *dai = &snd_allo_digione_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; -+ } -+ -+ snd_allo_clk44gpio = -+ devm_gpiod_get(&pdev->dev, "clock44", GPIOD_OUT_LOW); -+ if (IS_ERR(snd_allo_clk44gpio)) -+ dev_err(&pdev->dev, "devm_gpiod_get() failed\n"); -+ -+ snd_allo_clk48gpio = -+ devm_gpiod_get(&pdev->dev, "clock48", GPIOD_OUT_LOW); -+ if (IS_ERR(snd_allo_clk48gpio)) -+ dev_err(&pdev->dev, "devm_gpiod_get() failed\n"); -+ } -+ -+ ret = snd_soc_register_card(&snd_allo_digione); -+ if (ret && ret != -EPROBE_DEFER) -+ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", -+ ret); -+ -+ return ret; -+} -+ -+static int snd_allo_digione_remove(struct platform_device *pdev) -+{ -+ return snd_soc_unregister_card(&snd_allo_digione); -+} -+ -+static const struct of_device_id snd_allo_digione_of_match[] = { -+ { .compatible = "allo,allo-digione", }, -+ {}, -+}; -+MODULE_DEVICE_TABLE(of, snd_allo_digione_of_match); -+ -+static struct platform_driver snd_allo_digione_driver = { -+ .driver = { -+ .name = "snd-allo-digione", -+ .owner = THIS_MODULE, -+ .of_match_table = snd_allo_digione_of_match, -+ }, -+ .probe = snd_allo_digione_probe, -+ .remove = snd_allo_digione_remove, -+}; -+ -+module_platform_driver(snd_allo_digione_driver); -+ -+MODULE_AUTHOR("Baswaraj "); -+MODULE_DESCRIPTION("ASoC Driver for Allo DigiOne"); -+MODULE_LICENSE("GPL v2"); - -From a936a089e96c837040d822eae274739ea46dd323 Mon Sep 17 00:00:00 2001 +From c45671ace023bcf54d977980e66c9ad202bbc3f1 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Mon, 5 Jun 2017 16:40:38 +0100 -Subject: [PATCH 156/199] dma-bcm2708: Fix module compilation of +Subject: [PATCH 128/129] dma-bcm2708: Fix module compilation of CONFIG_DMA_BCM2708 bcm2708-dmaengine.c defines functions like bcm_dma_start which are @@ -135438,1249 +134701,10 @@ index c5bfff2765be4606077e6c8af73040ec13ee8974..6ca874d332a8bc666b1c9576ac51f479 #endif /* _PLAT_BCM2708_DMA_H */ -From d3b2f6efa2d4f208a401f331e7d1ee1313ee7b32 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Tue, 20 Jun 2017 17:51:47 +0100 -Subject: [PATCH 157/199] bcm2835-cpufreq: Change licence to GPLv2 - -Signed-off-by: Eben Upton -Signed-off-by: Dom Cobley ---- - drivers/cpufreq/bcm2835-cpufreq.c | 36 ++++++++++++++---------------------- - 1 file changed, 14 insertions(+), 22 deletions(-) - -diff --git a/drivers/cpufreq/bcm2835-cpufreq.c b/drivers/cpufreq/bcm2835-cpufreq.c -index 414fbdc10dfbfc6e4bb47870a7af3fd5780f9c9a..99345969b0e4d651fd9033d67de2febb13fc0892 100644 ---- a/drivers/cpufreq/bcm2835-cpufreq.c -+++ b/drivers/cpufreq/bcm2835-cpufreq.c -@@ -1,25 +1,17 @@ --/***************************************************************************** --* Copyright 2011 Broadcom Corporation. All rights reserved. --* --* Unless you and Broadcom execute a separate written software license --* agreement governing use of this software, this software is licensed to you --* under the terms of the GNU General Public License version 2, available at --* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). --* --* Notwithstanding the above, under no circumstances may you combine this --* software in any way with any other Broadcom software provided under a --* license other than the GPL, without Broadcom's express prior written --* consent. --*****************************************************************************/ -- --/***************************************************************************** --* FILENAME: bcm2835-cpufreq.h --* DESCRIPTION: This driver dynamically manages the CPU Frequency of the ARM --* processor. Messages are sent to Videocore either setting or requesting the --* frequency of the ARM in order to match an appropiate frequency to the current --* usage of the processor. The policy which selects the frequency to use is --* defined in the kernel .config file, but can be changed during runtime. --*****************************************************************************/ -+/* -+ * Copyright 2011 Broadcom Corporation. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * as published by the Free Software Foundation; version 2 -+ * of the License. -+ * -+ * This driver dynamically manages the CPU Frequency of the ARM -+ * processor. Messages are sent to Videocore either setting or requesting the -+ * frequency of the ARM in order to match an appropiate frequency to the current -+ * usage of the processor. The policy which selects the frequency to use is -+ * defined in the kernel .config file, but can be changed during runtime. -+ */ - - /* ---------- INCLUDES ---------- */ - #include - -From 4ce3dfd1ea9a66cc9f1582a43db0fef011c6309a Mon Sep 17 00:00:00 2001 -From: Eric Anholt -Date: Wed, 21 Jun 2017 09:03:51 -0700 -Subject: [PATCH 158/199] bcm2708: Drop CMA alignment from FKMS mode as well. - -I dropped it from KMS mode in d88274d88ed81de1ade8e18e4c0ed91792ec82ea -and should have done both of them at that time. - -Signed-off-by: Eric Anholt ---- - arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts b/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts -index 95a595a35cb4fbb707bf4b18161f6a46860aa4ae..36fbf6c8c2e612a6dc5aa02d77cc8173098c16ca 100644 ---- a/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts -+++ b/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts -@@ -11,35 +11,35 @@ - fragment@0 { - target-path = "/chosen"; - __overlay__ { -- bootargs = "cma=256M@256M"; -+ bootargs = "cma=256M"; - }; - }; - - fragment@1 { - target-path = "/chosen"; - __dormant__ { -- bootargs = "cma=192M@256M"; -+ bootargs = "cma=192M"; - }; - }; - - fragment@2 { - target-path = "/chosen"; - __dormant__ { -- bootargs = "cma=128M@128M"; -+ bootargs = "cma=128M"; - }; - }; - - fragment@3 { - target-path = "/chosen"; - __dormant__ { -- bootargs = "cma=96M@128M"; -+ bootargs = "cma=96M"; - }; - }; - - fragment@4 { - target-path = "/chosen"; - __dormant__ { -- bootargs = "cma=64M@64M"; -+ bootargs = "cma=64M"; - }; - }; - - -From c7ab84da6b4e2bc7257567b056247fed250a1c4b Mon Sep 17 00:00:00 2001 -From: Steve Conner -Date: Thu, 29 Jun 2017 15:56:19 +0100 -Subject: [PATCH 159/199] New i2c-rtc-gpio device overlay (#2092) - -Created new i2c-rtc-gpio device overlay by combining i2c-rtc and i2c-gpio. Tested with PCF2127 on CM3. ---- - arch/arm/boot/dts/overlays/Makefile | 1 + - arch/arm/boot/dts/overlays/README | 41 +++++ - .../arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts | 183 +++++++++++++++++++++ - 3 files changed, 225 insertions(+) - create mode 100644 arch/arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts - -diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index eca81982c0f19988abd05165fc62a80d26f539cb..8a3131f5a4bc90d4a597b416416953e8e49d41ec 100644 ---- a/arch/arm/boot/dts/overlays/Makefile -+++ b/arch/arm/boot/dts/overlays/Makefile -@@ -42,6 +42,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ - i2c-mux.dtbo \ - i2c-pwm-pca9685a.dtbo \ - i2c-rtc.dtbo \ -+ i2c-rtc-gpio.dtbo \ - i2c-sensor.dtbo \ - i2c0-bcm2708.dtbo \ - i2c1-bcm2708.dtbo \ -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 19df6883be4277240283d5f63f27e34a22a2eec5..a69e3a0d8dce1633598dd3cd8e00cad9509eee03 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -662,6 +662,47 @@ Params: abx80x Select one of the ABx80x family: - source - - -+Name: i2c-rtc-gpio -+Info: Adds support for a number of I2C Real Time Clock devices -+ using the software i2c controller -+Load: dtoverlay=i2c-rtc-gpio,= -+Params: abx80x Select one of the ABx80x family: -+ AB0801, AB0803, AB0804, AB0805, -+ AB1801, AB1803, AB1804, AB1805 -+ -+ ds1307 Select the DS1307 device -+ -+ ds1339 Select the DS1339 device -+ -+ ds3231 Select the DS3231 device -+ -+ mcp7940x Select the MCP7940x device -+ -+ mcp7941x Select the MCP7941x device -+ -+ pcf2127 Select the PCF2127 device -+ -+ pcf8523 Select the PCF8523 device -+ -+ pcf8563 Select the PCF8563 device -+ -+ trickle-diode-type Diode type for trickle charge - "standard" or -+ "schottky" (ABx80x only) -+ -+ trickle-resistor-ohms Resistor value for trickle charge (DS1339, -+ ABx80x) -+ -+ wakeup-source Specify that the RTC can be used as a wakeup -+ source -+ -+ i2c_gpio_sda GPIO used for I2C data (default "23") -+ -+ i2c_gpio_scl GPIO used for I2C clock (default "24") -+ -+ i2c_gpio_delay_us Clock delay in microseconds -+ (default "2" = ~100kHz) -+ -+ - Name: i2c-sensor - Info: Adds support for a number of I2C barometric pressure and temperature - sensors on i2c_arm -diff --git a/arch/arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts b/arch/arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts -new file mode 100644 -index 0000000000000000000000000000000000000000..8415e6081428fba9a47682964174fc023cfd2b0c ---- /dev/null -+++ b/arch/arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts -@@ -0,0 +1,183 @@ -+// Definitions for several I2C based Real Time Clocks -+// Available through i2c-gpio -+/dts-v1/; -+/plugin/; -+ -+/ { -+ compatible = "brcm,bcm2708"; -+ -+ fragment@0 { -+ target-path = "/"; -+ __overlay__ { -+ i2c_gpio: i2c-gpio-rtc@0 { -+ compatible = "i2c-gpio"; -+ gpios = <&gpio 23 0 /* sda */ -+ &gpio 24 0 /* scl */ -+ >; -+ i2c-gpio,delay-us = <2>; /* ~100 kHz */ -+ #address-cells = <1>; -+ #size-cells = <0>; -+ }; -+ }; -+ }; -+ -+ fragment@1 { -+ target = <&i2c_gpio>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ abx80x: abx80x@69 { -+ compatible = "abracon,abx80x"; -+ reg = <0x69>; -+ abracon,tc-diode = "standard"; -+ abracon,tc-resistor = <0>; -+ status = "okay"; -+ }; -+ }; -+ }; -+ -+ fragment@2 { -+ target = <&i2c_gpio>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ ds1307: ds1307@68 { -+ compatible = "maxim,ds1307"; -+ reg = <0x68>; -+ status = "okay"; -+ }; -+ }; -+ }; -+ -+ fragment@3 { -+ target = <&i2c_gpio>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ ds1339: ds1339@68 { -+ compatible = "dallas,ds1339"; -+ trickle-resistor-ohms = <0>; -+ reg = <0x68>; -+ status = "okay"; -+ }; -+ }; -+ }; -+ -+ fragment@4 { -+ target = <&i2c_gpio>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ ds3231: ds3231@68 { -+ compatible = "maxim,ds3231"; -+ reg = <0x68>; -+ status = "okay"; -+ }; -+ }; -+ }; -+ -+ fragment@5 { -+ target = <&i2c_gpio>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ mcp7940x: mcp7940x@6f { -+ compatible = "microchip,mcp7940x"; -+ reg = <0x6f>; -+ status = "okay"; -+ }; -+ }; -+ }; -+ -+ fragment@6 { -+ target = <&i2c_gpio>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ mcp7941x: mcp7941x@6f { -+ compatible = "microchip,mcp7941x"; -+ reg = <0x6f>; -+ status = "okay"; -+ }; -+ }; -+ }; -+ -+ fragment@7 { -+ target = <&i2c_gpio>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ pcf2127: pcf2127@51 { -+ compatible = "nxp,pcf2127"; -+ reg = <0x51>; -+ status = "okay"; -+ }; -+ }; -+ }; -+ -+ fragment@8 { -+ target = <&i2c_gpio>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ pcf8523: pcf8523@68 { -+ compatible = "nxp,pcf8523"; -+ reg = <0x68>; -+ status = "okay"; -+ }; -+ }; -+ }; -+ -+ fragment@9 { -+ target = <&i2c_gpio>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ pcf8563: pcf8563@51 { -+ compatible = "nxp,pcf8563"; -+ reg = <0x51>; -+ status = "okay"; -+ }; -+ }; -+ }; -+ -+ __overrides__ { -+ abx80x = <0>,"+1"; -+ ds1307 = <0>,"+2"; -+ ds1339 = <0>,"+3"; -+ ds3231 = <0>,"+4"; -+ mcp7940x = <0>,"+5"; -+ mcp7941x = <0>,"+6"; -+ pcf2127 = <0>,"+7"; -+ pcf8523 = <0>,"+8"; -+ pcf8563 = <0>,"+9"; -+ trickle-diode-type = <&abx80x>,"abracon,tc-diode"; -+ trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0", -+ <&abx80x>,"abracon,tc-resistor"; -+ wakeup-source = <&ds1339>,"wakeup-source?", -+ <&ds3231>,"wakeup-source?", -+ <&mcp7940x>,"wakeup-source?", -+ <&mcp7941x>,"wakeup-source?"; -+ i2c_gpio_sda = <&i2c_gpio>,"gpios:4"; -+ i2c_gpio_scl = <&i2c_gpio>,"gpios:16"; -+ i2c_gpio_delay_us = <&i2c_gpio>,"i2c-gpio,delay-us:0"; -+ }; -+}; - -From 547e83222054f994be34a521a2792944576a9930 Mon Sep 17 00:00:00 2001 -From: Allo -Date: Mon, 3 Jul 2017 15:45:20 +0530 -Subject: [PATCH 160/199] PianoPlus: Dual Mono & Dual Stereo features added - (#2069) - ---- - sound/soc/bcm/allo-piano-dac-plus.c | 160 +++++++++++++++++++++++++++++++----- - 1 file changed, 141 insertions(+), 19 deletions(-) - -diff --git a/sound/soc/bcm/allo-piano-dac-plus.c b/sound/soc/bcm/allo-piano-dac-plus.c -index 56e43f98846b41e487b3089813f7edc3c08517eb..d4e99e3c6a383d92fb0cf9e8c1cd1e7657358d49 100644 ---- a/sound/soc/bcm/allo-piano-dac-plus.c -+++ b/sound/soc/bcm/allo-piano-dac-plus.c -@@ -36,6 +36,7 @@ struct dsp_code { - - struct glb_pool { - struct mutex lock; -+ unsigned int dual_mode; - unsigned int set_lowpass; - unsigned int set_mode; - unsigned int set_rate; -@@ -47,8 +48,8 @@ bool glb_mclk; - - static struct gpio_desc *mute_gpio[2]; - -- - static const char * const allo_piano_mode_texts[] = { -+ "None", - "2.0", - "2.1", - "2.2", -@@ -57,6 +58,15 @@ static const char * const allo_piano_mode_texts[] = { - static const SOC_ENUM_SINGLE_DECL(allo_piano_mode_enum, - 0, 0, allo_piano_mode_texts); - -+static const char * const allo_piano_dual_mode_texts[] = { -+ "None", -+ "Dual-Mono", -+ "Dual-Stereo", -+}; -+ -+static const SOC_ENUM_SINGLE_DECL(allo_piano_dual_mode_enum, -+ 0, 0, allo_piano_dual_mode_texts); -+ - static const char * const allo_piano_dsp_low_pass_texts[] = { - "60", - "70", -@@ -82,10 +92,10 @@ static int __snd_allo_piano_dsp_program(struct snd_soc_pcm_runtime *rtd, - unsigned int mode, unsigned int rate, unsigned int lowpass) - { - const struct firmware *fw; -- char firmware_name[60]; -- int ret = 0, dac = 0; - struct snd_soc_card *card = rtd->card; - struct glb_pool *glb_ptr = card->drvdata; -+ char firmware_name[60]; -+ int ret = 0, dac = 0; - - if (rate <= 46000) - rate = 44100; -@@ -100,26 +110,35 @@ static int __snd_allo_piano_dsp_program(struct snd_soc_pcm_runtime *rtd, - else - rate = 192000; - -- if ((lowpass > 14) || (lowpass < 0)) -- lowpass = 3; -- if ((mode > 2) || (mode < 0)) -- mode = 0; -+ if (lowpass > 14) -+ glb_ptr->set_lowpass = lowpass = 3; -+ -+ if (mode > 3) -+ glb_ptr->set_mode = mode = 0; -+ -+ if (mode > 0) -+ glb_ptr->dual_mode = 0; - - /* same configuration loaded */ - if ((rate == glb_ptr->set_rate) && (lowpass == glb_ptr->set_lowpass) - && (mode == glb_ptr->set_mode)) - return 0; - -- if (mode == 0) { /* 2.0 */ -- snd_soc_write(rtd->codec_dais[1]->codec, -- PCM512x_MUTE, 0x11); -+ switch (mode) { -+ case 0: /* None */ -+ return 1; -+ -+ case 1: /* 2.0 */ -+ snd_soc_write(rtd->codec_dais[0]->codec, PCM512x_MUTE, 0x00); -+ snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, 0x11); - glb_ptr->set_rate = rate; - glb_ptr->set_mode = mode; - glb_ptr->set_lowpass = lowpass; - return 1; -- } else { -- snd_soc_write(rtd->codec_dais[1]->codec, -- PCM512x_MUTE, 0x00); -+ -+ default: -+ snd_soc_write(rtd->codec_dais[0]->codec, PCM512x_MUTE, 0x00); -+ snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, 0x00); - } - - for (dac = 0; dac < rtd->num_codecs; dac++) { -@@ -128,13 +147,13 @@ static int __snd_allo_piano_dsp_program(struct snd_soc_pcm_runtime *rtd, - int i = 1; - - if (dac == 0) { /* high */ -- sprintf(firmware_name, -+ snprintf(firmware_name, sizeof(firmware_name), - "allo/piano/2.2/allo-piano-dsp-%d-%d-%d.bin", - rate, ((lowpass * 10) + 60), dac); - } else { /* low */ -- sprintf(firmware_name, -+ snprintf(firmware_name, sizeof(firmware_name), - "allo/piano/2.%d/allo-piano-dsp-%d-%d-%d.bin", -- mode, rate, ((lowpass * 10) + 60), dac); -+ (mode - 1), rate, ((lowpass * 10) + 60), dac); - } - - dev_info(codec->dev, "Dsp Firmware File Name: %s\n", -@@ -199,6 +218,80 @@ static int snd_allo_piano_dsp_program(struct snd_soc_pcm_runtime *rtd, - return ret; - } - -+static int snd_allo_piano_dual_mode_get(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); -+ struct glb_pool *glb_ptr = card->drvdata; -+ -+ ucontrol->value.integer.value[0] = glb_ptr->dual_mode; -+ -+ return 0; -+} -+ -+static int snd_allo_piano_dual_mode_put(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); -+ struct glb_pool *glb_ptr = card->drvdata; -+ struct snd_soc_pcm_runtime *rtd; -+ struct snd_card *snd_card_ptr = card->snd_card; -+ struct snd_kcontrol *kctl; -+ struct soc_mixer_control *mc; -+ unsigned int left_val = 0; -+ -+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); -+ -+ if (ucontrol->value.integer.value[0] > 0) { -+ glb_ptr->dual_mode = ucontrol->value.integer.value[0]; -+ glb_ptr->set_mode = 0; -+ } else if (ucontrol->value.integer.value[0] <= 0) { -+ if (glb_ptr->set_mode <= 0) { -+ glb_ptr->dual_mode = 1; -+ glb_ptr->set_mode = 0; -+ } -+ } else { -+ glb_ptr->dual_mode = 0; -+ return 0; -+ } -+ -+ if (glb_ptr->dual_mode == 1) { -+ snd_soc_write(rtd->codec_dais[0]->codec, PCM512x_MUTE, 0x01); -+ snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, 0x10); -+ snd_soc_write(rtd->codec_dais[0]->codec, -+ PCM512x_DIGITAL_VOLUME_3, 0xff); -+ -+ list_for_each_entry(kctl, &snd_card_ptr->controls, list) { -+ if (!strncmp(kctl->id.name, "Digital Playback Volume", -+ sizeof(kctl->id.name))) { -+ mc = (struct soc_mixer_control *) -+ kctl->private_value; -+ mc->rreg = mc->reg; -+ break; -+ } -+ } -+ } else { -+ left_val = snd_soc_read(rtd->codec_dais[0]->codec, -+ PCM512x_DIGITAL_VOLUME_2); -+ list_for_each_entry(kctl, &snd_card_ptr->controls, list) { -+ if (!strncmp(kctl->id.name, "Digital Playback Volume", -+ sizeof(kctl->id.name))) { -+ mc = (struct soc_mixer_control *) -+ kctl->private_value; -+ mc->rreg = PCM512x_DIGITAL_VOLUME_3; -+ break; -+ } -+ } -+ -+ snd_soc_write(rtd->codec_dais[0]->codec, -+ PCM512x_DIGITAL_VOLUME_3, left_val); -+ snd_soc_write(rtd->codec_dais[0]->codec, PCM512x_MUTE, 0x00); -+ snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, 0x00); -+ } -+ -+ return 0; -+} -+ - static int snd_allo_piano_mode_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) - { -@@ -215,8 +308,30 @@ static int snd_allo_piano_mode_put(struct snd_kcontrol *kcontrol, - struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); - struct snd_soc_pcm_runtime *rtd; - struct glb_pool *glb_ptr = card->drvdata; -+ struct snd_card *snd_card_ptr = card->snd_card; -+ struct snd_kcontrol *kctl; -+ struct soc_mixer_control *mc; -+ unsigned int left_val = 0; - - rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); -+ -+ if ((glb_ptr->dual_mode == 1) && -+ (ucontrol->value.integer.value[0] > 0)) { -+ left_val = snd_soc_read(rtd->codec_dais[0]->codec, -+ PCM512x_DIGITAL_VOLUME_2); -+ list_for_each_entry(kctl, &snd_card_ptr->controls, list) { -+ if (!strncmp(kctl->id.name, "Digital Playback Volume", -+ sizeof(kctl->id.name))) { -+ mc = (struct soc_mixer_control *) -+ kctl->private_value; -+ mc->rreg = PCM512x_DIGITAL_VOLUME_3; -+ break; -+ } -+ } -+ snd_soc_write(rtd->codec_dais[0]->codec, -+ PCM512x_DIGITAL_VOLUME_3, left_val); -+ } -+ - return(snd_allo_piano_dsp_program(rtd, - ucontrol->value.integer.value[0], - glb_ptr->set_rate, glb_ptr->set_lowpass)); -@@ -344,6 +459,11 @@ static const struct snd_kcontrol_new allo_piano_controls[] = { - snd_allo_piano_mode_get, - snd_allo_piano_mode_put), - -+ SOC_ENUM_EXT("Dual Mode Route", -+ allo_piano_dual_mode_enum, -+ snd_allo_piano_dual_mode_get, -+ snd_allo_piano_dual_mode_put), -+ - SOC_ENUM_EXT("Lowpass Route", allo_piano_enum, - snd_allo_piano_lowpass_get, - snd_allo_piano_lowpass_put), -@@ -472,7 +592,7 @@ static int snd_allo_piano_dac_hw_params( - PCM512x_RATE_DET_4); - if (val < 0) { - dev_err(rtd->codec_dais[dac]->codec->dev, -- "Failed to read register PCM512x_RATE_DET_4\n"); -+ "Failed to read register PCM512x_RATE_DET_4\n"); - return val; - } - -@@ -482,7 +602,7 @@ static int snd_allo_piano_dac_hw_params( - PCM512x_SREF_BCK); - - dev_info(rtd->codec_dais[dac]->codec->dev, -- "Setting BCLK as input clock & Enable PLL\n"); -+ "Setting BCLK as input clock & Enable PLL\n"); - } else { - snd_soc_write(rtd->codec_dais[dac]->codec, - PCM512x_PLL_EN, -@@ -493,7 +613,7 @@ static int snd_allo_piano_dac_hw_params( - PCM512x_SREF_SCK); - - dev_info(rtd->codec_dais[dac]->codec->dev, -- "Setting SCLK as input clock & disabled PLL\n"); -+ "Setting SCLK as input clock & disabled PLL\n"); - } - } - -@@ -504,6 +624,7 @@ static int snd_allo_piano_dac_hw_params( - dev_warn(card->dev, "Failed to set volume limit: %d\n", - ret); - } -+ - ret = snd_allo_piano_dsp_program(rtd, glb_ptr->set_mode, rate, - glb_ptr->set_lowpass); - if (ret < 0) -@@ -521,6 +642,7 @@ static int snd_allo_piano_dac_prepare( - struct snd_soc_card *card = rtd->card; - - snd_allo_piano_gpio_unmute(card); -+ - return 0; - } - - -From 9c8b2225d69f22e5362891045b4490c2c8fa6b47 Mon Sep 17 00:00:00 2001 -From: Matthijs Kooijman -Date: Sun, 9 Jul 2017 15:15:22 +0200 -Subject: [PATCH 161/199] overlays: Add gpio-shutdown overlay (#2103) - -This overlay facilitates the addition of a powerbutton by converting -GPIO edges into KEY_POWER keypresses, which can be handled by -systemd-logind to shut down the system. - -Signed-off-by: Matthijs Kooijman ---- - arch/arm/boot/dts/overlays/Makefile | 1 + - arch/arm/boot/dts/overlays/README | 32 +++++++++ - .../boot/dts/overlays/gpio-shutdown-overlay.dts | 80 ++++++++++++++++++++++ - 3 files changed, 113 insertions(+) - create mode 100644 arch/arm/boot/dts/overlays/gpio-shutdown-overlay.dts - -diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 8a3131f5a4bc90d4a597b416416953e8e49d41ec..c50b1dfa9d7334df47ce087f9d2a7a816afa05ba 100644 ---- a/arch/arm/boot/dts/overlays/Makefile -+++ b/arch/arm/boot/dts/overlays/Makefile -@@ -30,6 +30,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ - googlevoicehat-soundcard.dtbo \ - gpio-ir.dtbo \ - gpio-poweroff.dtbo \ -+ gpio-shutdown.dtbo \ - hifiberry-amp.dtbo \ - hifiberry-dac.dtbo \ - hifiberry-dacplus.dtbo \ -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index a69e3a0d8dce1633598dd3cd8e00cad9509eee03..e6d777a601c91d192bc5713f9a73e1a2d4d708ef 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -508,6 +508,38 @@ Params: gpiopin GPIO for signalling (default 26) - will also cause the pin to go low. - - -+Name: gpio-shutdown -+Info: Initiates a shutdown when GPIO pin changes. The given GPIO pin -+ is configured as an input key that generates KEY_POWER events. -+ This event is handled by systemd-logind by initiating a -+ shutdown. Systemd versions older than 225 need an udev rule -+ enable listening to the input device: -+ -+ ACTION!="REMOVE", SUBSYSTEM=="input", KERNEL=="event*", \ -+ SUBSYSTEMS=="platform", DRIVERS=="gpio-keys", \ -+ ATTRS{keys}=="116", TAG+="power-switch" -+ -+ This overlay only handles shutdown. After shutdown, the system -+ can be powered up again by driving GPIO3 low. The default -+ configuration uses GPIO3 with a pullup, so if you connect a -+ button between GPIO3 and GND (pin 5 and 6 on the 40-pin header), -+ you get a shutdown and power-up button. -+Load: dtoverlay=gpio-shutdown,= -+Params: gpio_pin GPIO pin to trigger on (default 3) -+ -+ active_low When this is 1 (active low), a falling -+ edge generates a key down event and a -+ rising edge generates a key up event. -+ When this is 0 (active high), this is -+ reversed. The default is 1 (active low). -+ -+ gpio_pull Desired pull-up/down state (off, down, up) -+ Default is "up". -+ -+ Note that the default pin (GPIO3) has an -+ external pullup. -+ -+ - Name: hifiberry-amp - Info: Configures the HifiBerry Amp and Amp+ audio cards - Load: dtoverlay=hifiberry-amp -diff --git a/arch/arm/boot/dts/overlays/gpio-shutdown-overlay.dts b/arch/arm/boot/dts/overlays/gpio-shutdown-overlay.dts -new file mode 100644 -index 0000000000000000000000000000000000000000..863fb395c8539734b658682b900e1fbd96c9443e ---- /dev/null -+++ b/arch/arm/boot/dts/overlays/gpio-shutdown-overlay.dts -@@ -0,0 +1,80 @@ -+// Definitions for gpio-poweroff module -+/dts-v1/; -+/plugin/; -+ -+// This overlay sets up an input device that generates KEY_POWER events -+// when a given GPIO pin changes. It defaults to using GPIO3, which can -+// also be used to wake up (start) the Rpi again after shutdown. Since -+// wakeup is active-low, this defaults to active-low with a pullup -+// enabled, but all of this can be changed using overlay parameters (but -+// note that GPIO3 has an external pullup on at least some boards). -+ -+/ { -+ compatible = "brcm,bcm2708"; -+ -+ fragment@0 { -+ // Configure the gpio pin controller -+ target = <&gpio>; -+ __overlay__ { -+ // Define a pinctrl state, that sets up the gpio -+ // as an input with a pullup enabled. This does -+ // not take effect by itself, only when referenced -+ // by a "pinctrl client", as is done below. See: -+ // https://www.kernel.org/doc/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt -+ // https://www.kernel.org/doc/Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt -+ pin_state: shutdown_button_pins { -+ brcm,pins = <3>; // gpio number -+ brcm,function = <0>; // 0 = input, 1 = output -+ brcm,pull = <2>; // 0 = none, 1 = pull down, 2 = pull up -+ }; -+ }; -+ }; -+ fragment@1 { -+ // Add a new device to the /soc devicetree node -+ target-path = "/soc"; -+ __overlay__ { -+ shutdown_button { -+ // Let the gpio-keys driver handle this device. See: -+ // https://www.kernel.org/doc/Documentation/devicetree/bindings/input/gpio-keys.txt -+ compatible = "gpio-keys"; -+ -+ // Declare a single pinctrl state (referencing the one declared above) and name it -+ // default, so it is activated automatically. -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pin_state>; -+ -+ // Enable this device -+ status = "okay"; -+ -+ // Define a single key, called "shutdown" that monitors the gpio and sends KEY_POWER -+ // (keycode 116, see -+ // https://github.com/torvalds/linux/blob/v4.12/include/uapi/linux/input-event-codes.h#L190) -+ button: shutdown { -+ label = "shutdown"; -+ linux,code = <116>; // KEY_POWER -+ gpios = <&gpio 3 1>; -+ }; -+ }; -+ }; -+ }; -+ -+ // This defines parameters that can be specified when loading -+ // the overlay. Each foo = line specifies one parameter, named -+ // foo. The rest of the specification gives properties where the -+ // parameter value is inserted into (changing the values above -+ // or adding new ones). -+ __overrides__ { -+ // Allow overriding the GPIO number. -+ gpio_pin = <&button>,"gpios:4", -+ <&pin_state>,"brcm,pins:0"; -+ -+ // Allow changing the internal pullup/down state. 0 = none, 1 = pulldown, 2 = pullup -+ // Note that GPIO3 and GPIO2 are the I2c pins and have an external pullup (at least -+ // on some boards). -+ gpio_pull = <&pin_state>,"brcm,pull:0"; -+ -+ // Allow setting the active_low flag. 0 = active high, 1 = active low -+ active_low = <&button>,"gpios:8"; -+ }; -+ -+}; - -From 21d1516665338a99d6decc6fe70c5ed47058818c Mon Sep 17 00:00:00 2001 -From: Matthias Reichl -Date: Mon, 10 Jul 2017 11:05:17 +0200 -Subject: [PATCH 162/199] config: enable generic S/PDIF codec drivers (#2104) - -These drivers can be used as dummy ADC/DAC drivers for -attaching general codecs that don't need to be configured. - -This option will build 2 additional drivers, spdif_receiver -and spdif_transmitter. - -Since these drivers have DT bindings they are handy for quick -testing of I2S peripherals with simple-audio-card. - -eg: - -fragment@0 { - target-path = "/"; - __overlay__ { - dummy_receiver: spdif-receiver { - #address-cells = <0>; - #size-cells = <0>; - #sound-dai-cells = <0>; - compatible = "linux,spdif-dir"; - status = "okay"; - }; - }; -}; - -Signed-off-by: Matthias Reichl ---- - arch/arm/configs/bcm2709_defconfig | 1 + - arch/arm/configs/bcmrpi_defconfig | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index d2838cde4019be5f6faf0a70038c6365df9e6dde..6f49e2b69f0cb27154dd26eba20eabdde2d60052 100644 ---- a/arch/arm/configs/bcm2709_defconfig -+++ b/arch/arm/configs/bcm2709_defconfig -@@ -898,6 +898,7 @@ CONFIG_SND_PISOUND=m - CONFIG_SND_SOC_ADAU1701=m - CONFIG_SND_SOC_ADAU7002=m - CONFIG_SND_SOC_AK4554=m -+CONFIG_SND_SOC_SPDIF=m - CONFIG_SND_SOC_WM8804_I2C=m - CONFIG_SND_SIMPLE_CARD=m - CONFIG_HIDRAW=y -diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index efdb0fbc1b07c7b679cb20d8c1270c77d5d3c684..472a330439a19ac5d4f70c22059f015816823694 100644 ---- a/arch/arm/configs/bcmrpi_defconfig -+++ b/arch/arm/configs/bcmrpi_defconfig -@@ -891,6 +891,7 @@ CONFIG_SND_PISOUND=m - CONFIG_SND_SOC_ADAU1701=m - CONFIG_SND_SOC_ADAU7002=m - CONFIG_SND_SOC_AK4554=m -+CONFIG_SND_SOC_SPDIF=m - CONFIG_SND_SOC_WM8804_I2C=m - CONFIG_SND_SIMPLE_CARD=m - CONFIG_HIDRAW=y - -From 542f21c01f0f3e5427ec08548f452eced6ec500b Mon Sep 17 00:00:00 2001 -From: Bilal Amarni -Date: Wed, 24 May 2017 10:52:50 +0200 -Subject: [PATCH 163/199] [ARM64] enable drivers for GPIO expander and vcio - ---- - arch/arm64/configs/bcmrpi3_defconfig | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig -index 4d85c231c5ea0244e1b05fb4a5e3c8fd3e651ddf..9dcb58a519d041fadae99c81a7bda621b2a49f12 100644 ---- a/arch/arm64/configs/bcmrpi3_defconfig -+++ b/arch/arm64/configs/bcmrpi3_defconfig -@@ -575,6 +575,8 @@ CONFIG_SERIO_RAW=m - CONFIG_GAMEPORT=m - CONFIG_GAMEPORT_NS558=m - CONFIG_GAMEPORT_L4=m -+CONFIG_BRCM_CHAR_DRIVERS=y -+CONFIG_BCM_VCIO=y - # CONFIG_BCM2835_DEVGPIOMEM is not set - # CONFIG_BCM2835_SMI_DEV is not set - # CONFIG_LEGACY_PTYS is not set -@@ -609,6 +611,7 @@ CONFIG_PPS=m - CONFIG_PPS_CLIENT_LDISC=m - CONFIG_PPS_CLIENT_GPIO=m - CONFIG_GPIO_SYSFS=y -+CONFIG_GPIO_BCM_EXP=y - CONFIG_GPIO_BCM_VIRT=y - CONFIG_GPIO_ARIZONA=m - CONFIG_GPIO_STMPE=y - -From 73345bb3d3cd24d3e80531e6be7c05eb123f1655 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Fri, 14 Jul 2017 12:59:55 +0100 -Subject: [PATCH 164/199] bcm2835-mmc: Fix DMA usage - -The previous change ("bcm2835-mmc: Only claim one DMA channel") -used an incorrect variable, the effect of which was to prevent -DMA from being used at all. Fix that bug by using the right -variable. - -Signed-off-by: Phil Elwell ---- - drivers/mmc/host/bcm2835-mmc.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/drivers/mmc/host/bcm2835-mmc.c b/drivers/mmc/host/bcm2835-mmc.c -index 4fe8d1fe44578fbefcd48f8c327ba3d03f3d0a2a..981db05de1ff52a83550e41ab362eecf99cafa29 100644 ---- a/drivers/mmc/host/bcm2835-mmc.c -+++ b/drivers/mmc/host/bcm2835-mmc.c -@@ -1354,14 +1354,14 @@ static int bcm2835_mmc_add_host(struct bcm2835_host *host) - if (ret == 0) { - host->dma_cfg_rx = cfg; - -- host->use_dma = true; -+ host->have_dma = true; - } else { - pr_err("%s: unable to configure DMA channel. " -- "Faling back to PIO\n", -+ "Falling back to PIO\n", - mmc_hostname(mmc)); - dma_release_channel(host->dma_chan_rxtx); - host->dma_chan_rxtx = NULL; -- host->use_dma = false; -+ host->have_dma = false; - } - } - #endif - -From fb6e916972bc742b21a85990d7500046eab1eb17 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Sun, 16 Jul 2017 21:39:16 +0100 -Subject: [PATCH 165/199] BCM270X_DT: Use the upstream thermal-zones DT node - -Signed-off-by: Phil Elwell ---- - arch/arm/boot/dts/bcm2708-rpi.dtsi | 30 ++++++------------------------ - 1 file changed, 6 insertions(+), 24 deletions(-) - -diff --git a/arch/arm/boot/dts/bcm2708-rpi.dtsi b/arch/arm/boot/dts/bcm2708-rpi.dtsi -index 29dde110e769082a24640d3c7284afb8e99b226c..8cc83a350d02bb485f7a4fcb129df9e00fb3f958 100644 ---- a/arch/arm/boot/dts/bcm2708-rpi.dtsi -+++ b/arch/arm/boot/dts/bcm2708-rpi.dtsi -@@ -90,30 +90,6 @@ - sound: sound { - status = "disabled"; - }; -- -- thermal-zones { -- cpu_thermal: cpu-thermal { -- polling-delay-passive = <0>; -- polling-delay = <1000>; -- -- thermal-sensors = <&thermal>; -- -- /* No trips -- trips { -- cpu-crit { -- temperature = <80000>; -- hysteresis = <0>; -- type = "critical"; -- }; -- }; -- */ -- -- coefficients = <(-538) 407000>; -- -- cooling-maps { -- }; -- }; -- }; - }; - - __overrides__ { -@@ -172,3 +148,9 @@ sdhost_pins: &sdhost_gpio48 { - &fb { - status = "okay"; - }; -+ -+&cpu_thermal { -+ coefficients = <(-538) 407000>; -+ -+ /delete-node/ trips; -+}; - -From 65c5ea6e4cb5b2950f0c27ed8b772e9137c35975 Mon Sep 17 00:00:00 2001 -From: Conn -Date: Mon, 17 Jul 2017 03:25:43 +0100 -Subject: [PATCH 166/199] config: enhance DualShock3 controller support - -Enable rumble support in Sony HID & HID battery strength. ---- - arch/arm/configs/bcm2709_defconfig | 2 ++ - arch/arm/configs/bcmrpi_defconfig | 2 ++ - 2 files changed, 4 insertions(+) - -diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 6f49e2b69f0cb27154dd26eba20eabdde2d60052..62909413e1d625a1d33559d965ee8707ca57ba91 100644 ---- a/arch/arm/configs/bcm2709_defconfig -+++ b/arch/arm/configs/bcm2709_defconfig -@@ -901,6 +901,7 @@ CONFIG_SND_SOC_AK4554=m - CONFIG_SND_SOC_SPDIF=m - CONFIG_SND_SOC_WM8804_I2C=m - CONFIG_SND_SIMPLE_CARD=m -+CONFIG_HID_BATTERY_STRENGTH=y - CONFIG_HIDRAW=y - CONFIG_UHID=m - CONFIG_HID_A4TECH=m -@@ -943,6 +944,7 @@ CONFIG_HID_PICOLCD=m - CONFIG_HID_ROCCAT=m - CONFIG_HID_SAMSUNG=m - CONFIG_HID_SONY=m -+CONFIG_SONY_FF=y - CONFIG_HID_SPEEDLINK=m - CONFIG_HID_SUNPLUS=m - CONFIG_HID_GREENASIA=m -diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 472a330439a19ac5d4f70c22059f015816823694..e0dd8723047ff488e81a03ef42fdbc68c43dc721 100644 ---- a/arch/arm/configs/bcmrpi_defconfig -+++ b/arch/arm/configs/bcmrpi_defconfig -@@ -894,6 +894,7 @@ CONFIG_SND_SOC_AK4554=m - CONFIG_SND_SOC_SPDIF=m - CONFIG_SND_SOC_WM8804_I2C=m - CONFIG_SND_SIMPLE_CARD=m -+CONFIG_HID_BATTERY_STRENGTH=y - CONFIG_HIDRAW=y - CONFIG_UHID=m - CONFIG_HID_A4TECH=m -@@ -936,6 +937,7 @@ CONFIG_HID_PICOLCD=m - CONFIG_HID_ROCCAT=m - CONFIG_HID_SAMSUNG=m - CONFIG_HID_SONY=m -+CONFIG_SONY_FF=y - CONFIG_HID_SPEEDLINK=m - CONFIG_HID_SUNPLUS=m - CONFIG_HID_GREENASIA=m - -From feb8aaa3a587b0d0586da870c2e3a36bd6b94ad7 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Wed, 19 Jul 2017 15:20:50 +0100 -Subject: [PATCH 167/199] overlays: i2c1-bcm2708: Don't overwrite i2c1 pins - node - -It is bad practise to overwrite an entire node in an overlay. Instead, -target the node and overwrite any properties that need changing. - -See: https://github.com/raspberrypi/linux/pull/2118 - -Suggested-by: soodvarun78 -Signed-off-by: Phil Elwell ---- - arch/arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts | 17 +++++++---------- - 1 file changed, 7 insertions(+), 10 deletions(-) - -diff --git a/arch/arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts b/arch/arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts -index e303b9c61c82a28eab7b48f6b085661574d5a849..7c69047bcd88a5c900dddd08e60ad0750b96d785 100644 ---- a/arch/arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts -+++ b/arch/arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts -@@ -20,18 +20,15 @@ - }; - - fragment@1 { -- target = <&gpio>; -- __overlay__ { -- i2c1_pins: i2c1 { -- brcm,pins = <2 3>; -- brcm,function = <4>; /* alt0 */ -- }; -+ target = <&i2c1_pins>; -+ pins: __overlay__ { -+ brcm,pins = <2 3>; -+ brcm,function = <4>; /* alt 0 */ - }; - }; -- - __overrides__ { -- sda1_pin = <&i2c1_pins>,"brcm,pins:0"; -- scl1_pin = <&i2c1_pins>,"brcm,pins:4"; -- pin_func = <&i2c1_pins>,"brcm,function:0"; -+ sda1_pin = <&pins>,"brcm,pins:0"; -+ scl1_pin = <&pins>,"brcm,pins:4"; -+ pin_func = <&pins>,"brcm,function:0"; - }; - }; - -From 9bc65e4fd1f183b88b75b8f39b75dc1a67c9fcf6 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Tue, 18 Jul 2017 15:30:48 +0100 -Subject: [PATCH 168/199] bcm2835-mmc: Prevent DMA race condition - -The end of a read operation is triggered by the completion of the DMA -transfer, but writes are complete when the data IRQ is raised. The -bcm2835-mmc driver contains a race between the handling of the DMA -completion interrupt and the submission of the next request. Fix the -race by deferring the completion of the request until the DMA -transfer finishes. - -Signed-off-by: Phil Elwell ---- - drivers/mmc/host/bcm2835-mmc.c | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/drivers/mmc/host/bcm2835-mmc.c b/drivers/mmc/host/bcm2835-mmc.c -index 981db05de1ff52a83550e41ab362eecf99cafa29..c4a5e992c6fb4a40b933239350ed4bfc8fb40155 100644 ---- a/drivers/mmc/host/bcm2835-mmc.c -+++ b/drivers/mmc/host/bcm2835-mmc.c -@@ -115,6 +115,7 @@ struct bcm2835_host { - - bool have_dma; - bool use_dma; -+ bool wait_for_dma; - /*end of DMA part*/ - - int max_delay; /* maximum length of time spent waiting */ -@@ -341,6 +342,8 @@ static void bcm2835_mmc_dma_complete(void *param) - - spin_lock_irqsave(&host->lock, flags); - -+ host->use_dma = false; -+ - if (host->data && !(host->data->flags & MMC_DATA_WRITE)) { - /* otherwise handled in SDHCI IRQ */ - dma_chan = host->dma_chan_rxtx; -@@ -351,6 +354,9 @@ static void bcm2835_mmc_dma_complete(void *param) - dir_data); - - bcm2835_mmc_finish_data(host); -+ } else if (host->wait_for_dma) { -+ host->wait_for_dma = false; -+ tasklet_schedule(&host->finish_tasklet); - } - - spin_unlock_irqrestore(&host->lock, flags); -@@ -690,6 +696,7 @@ void bcm2835_mmc_send_command(struct bcm2835_host *host, struct mmc_command *cmd - mod_timer(&host->timer, timeout); - - host->cmd = cmd; -+ host->use_dma = false; - - bcm2835_mmc_prepare_data(host, cmd); - -@@ -759,8 +766,11 @@ static void bcm2835_mmc_finish_data(struct bcm2835_host *host) - } - - bcm2835_mmc_send_command(host, data->stop); -- } else -+ } else if (host->use_dma) { -+ host->wait_for_dma = true; -+ } else { - tasklet_schedule(&host->finish_tasklet); -+ } - } - - static void bcm2835_mmc_finish_command(struct bcm2835_host *host) - -From 4e41bebdfecead7b710734c79718629edd6a9ba7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Sven=20K=C3=B6hler?= -Date: Mon, 7 Aug 2017 18:49:20 +0200 -Subject: [PATCH 169/199] Fix dependencies broken since driver was renamed - ---- - drivers/mmc/host/Kconfig | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig -index d47cce77c0551d78fa51f50e2c8086f26c7b9e56..dc41121c101e2ac6fe000fe2ab556561a340b78f 100644 ---- a/drivers/mmc/host/Kconfig -+++ b/drivers/mmc/host/Kconfig -@@ -25,7 +25,7 @@ config MMC_BCM2835_DMA - - config MMC_BCM2835_PIO_DMA_BARRIER - int "Block count limit for PIO transfers" -- depends on MMC_BCM2835 && MMC_BCM2835_DMA -+ depends on MMC_BCM2835_MMC && MMC_BCM2835_DMA - range 0 256 - default 2 - help - -From 0ffd02d1a31a96cf40000d077a80d32cd0a35ead Mon Sep 17 00:00:00 2001 -From: Eric Anholt -Date: Thu, 18 Dec 2014 16:07:15 -0800 -Subject: [PATCH 170/199] mm: Remove the PFN busy warning - -See commit dae803e165a11bc88ca8dbc07a11077caf97bbcb -- the warning is -expected sometimes when using CMA. However, that commit still spams -my kernel log with these warnings. - -Signed-off-by: Eric Anholt ---- - mm/page_alloc.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 1423da8dd16f5bdc83e20ddf6665b2022a9a6492..6ce930c02160d55dc4eee1e7197a5efa6ba7d44a 100644 ---- a/mm/page_alloc.c -+++ b/mm/page_alloc.c -@@ -7692,8 +7692,6 @@ int alloc_contig_range(unsigned long start, unsigned long end, - - /* Make sure the range is really isolated. */ - if (test_pages_isolated(outer_start, end, false)) { -- pr_info_ratelimited("%s: [%lx, %lx) PFNs busy\n", -- __func__, outer_start, end); - ret = -EBUSY; - goto done; - } - -From efc0b3db0e9f0358308a9cfd121282d2d4b3057d Mon Sep 17 00:00:00 2001 +From 574b675abdbbaeb89923f3538c5193bb347a7e33 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 25 Aug 2017 19:18:13 +0100 -Subject: [PATCH 171/199] cache: export clean and invalidate +Subject: [PATCH 129/129] cache: export clean and invalidate --- arch/arm/mm/cache-v6.S | 4 ++-- @@ -136731,5263 +134755,3 @@ index de78109d002db1a5e7c94a6c1bc8bb94161d07b8..4c850aa3af2b2439fced4e130441329a dcache_line_size r2, r3 sub r3, r2, #1 bic r0, r0, r3 - -From d3c2586371e3d21fa37fc6a5ed62041769ceea9a Mon Sep 17 00:00:00 2001 -From: Olivier Schonken -Date: Mon, 28 Aug 2017 10:52:32 +0200 -Subject: [PATCH 172/199] Fix DTB overlay compilation for arm64 broadcom - -The dts-dirs variable was overwritten by the assignment of the -stingray directory after the overlays directory, thus no overlays -were being built - -Signed-off-by: Olivier Schonken ---- - arch/arm64/boot/dts/broadcom/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile -index 97af2ececc52ca3aad7b84dc2fdb5c269a45bde0..3b76320112196a1fce7a0941c696fd1ec43b817f 100644 ---- a/arch/arm64/boot/dts/broadcom/Makefile -+++ b/arch/arm64/boot/dts/broadcom/Makefile -@@ -11,7 +11,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b.dtb - - dts-dirs += ../overlays - --dts-dirs := stingray -+dts-dirs += stingray - always := $(dtb-y) - subdir-y := $(dts-dirs) - clean-files := *.dtb - -From f3a57e732ea6da07452519cee968db4f1bc5820f Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Fri, 25 Aug 2017 19:18:26 +0100 -Subject: [PATCH 173/199] vcsm: Provide new ioctl to clean/invalidate a 2D - block - ---- - drivers/char/broadcom/vc_sm/vmcs_sm.c | 92 ++++++++++++++++++++++++++++++++-- - include/linux/broadcom/vmcs_sm_ioctl.h | 16 ++++++ - 2 files changed, 105 insertions(+), 3 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index fd2ca788dcd56b1702454d71b7bedd4203179500..d49e39566d521c95a96375c556516e444d52b6a0 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -142,6 +142,7 @@ struct SM_RESOURCE_T { - struct list_head map_list; /* Maps associated with a resource. */ - - struct SM_PRIV_DATA_T *private; -+ bool map; /* whether to map pages up front */ - }; - - /* Private file data associated with each opened device. -@@ -1376,6 +1377,20 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) - vcsm_vma_open(vma); - resource->res_stats[MAP]++; - vmcs_sm_release_resource(resource, 0); -+ -+ if (resource->map) { -+ /* We don't use vmf->pgoff since that has the fake offset */ -+ unsigned long addr; -+ for (addr = vma->vm_start; addr < vma->vm_end; addr += PAGE_SIZE) { -+ /* Finally, remap it */ -+ unsigned long pfn = (unsigned long)resource->res_base_mem & 0x3FFFFFFF; -+ pfn += mm_vc_mem_phys_addr; -+ pfn += addr - vma->vm_start; -+ pfn >>= PAGE_SHIFT; -+ ret = vm_insert_pfn(vma, addr, pfn); -+ } -+ } -+ - return 0; - - error: -@@ -1394,10 +1409,18 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, - struct SM_RESOURCE_T *resource; - VC_SM_ALLOC_T alloc = { 0 }; - VC_SM_ALLOC_RESULT_T result = { 0 }; -+ enum vmcs_sm_cache_e cached = ioparam->cached; -+ bool map = false; -+ -+ /* flag to requst buffer is mapped up front, rather than lazily */ -+ if (cached & 0x80 ) { -+ map = true; -+ cached &= ~0x80; -+ } - - /* Setup our allocation parameters */ -- alloc.type = ((ioparam->cached == VMCS_SM_CACHE_VC) -- || (ioparam->cached == -+ alloc.type = ((cached == VMCS_SM_CACHE_VC) -+ || (cached == - VMCS_SM_CACHE_BOTH)) ? VC_SM_ALLOC_CACHED : - VC_SM_ALLOC_NON_CACHED; - alloc.base_unit = ioparam->size; -@@ -1455,7 +1478,8 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, - resource->res_handle = result.res_handle; - resource->res_base_mem = result.res_mem; - resource->res_size = alloc.base_unit * alloc.num_unit; -- resource->res_cached = ioparam->cached; -+ resource->res_cached = cached; -+ resource->map = map; - - /* Kernel/user GUID. This global identifier is used for mmap'ing the - * allocated region from user space, it is passed as the mmap'ing -@@ -2790,6 +2814,68 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - } - } - break; -+ /* Flush/Invalidate the cache for a given mapping. */ -+ case VMCS_SM_CMD_CLEAN_INVALID2: -+ { -+ int i, j; -+ struct vmcs_sm_ioctl_clean_invalid2 ioparam; -+ struct vmcs_sm_ioctl_clean_invalid_block *block = NULL; -+ -+ /* Get parameter data. */ -+ if (copy_from_user(&ioparam, -+ (void *)arg, sizeof(ioparam)) != 0) { -+ pr_err("[%s]: failed to copy-from-user header for cmd %x\n", -+ __func__, cmdnr); -+ ret = -EFAULT; -+ goto out; -+ } -+ block = kzalloc(ioparam.op_count * sizeof(struct vmcs_sm_ioctl_clean_invalid_block), GFP_KERNEL); -+ if (!block) { -+ ret = -EFAULT; -+ goto out; -+ } -+ if (copy_from_user(block, -+ (void *)(arg + sizeof(ioparam)), ioparam.op_count * sizeof(struct vmcs_sm_ioctl_clean_invalid_block)) != 0) { -+ pr_err("[%s]: failed to copy-from-user payload for cmd %x\n", -+ __func__, cmdnr); -+ ret = -EFAULT; -+ goto out; -+ } -+ -+ for (i=0; iblock_count; ++j) { -+ -+ -+ extern void v6_dma_inv_range(void *start, void *end); -+ extern void v6_dma_clean_range(void *start, void *end); -+ unsigned long base = (unsigned long)op->start_address + j * op->inter_block_stride; -+ unsigned long end = base + op->block_size; -+ /* L1/L2 cache clean */ -+ if (op->invalidate_mode & 2) { -+#if defined(CONFIG_CPU_CACHE_V7) -+ extern void v7_dma_clean_range(void *start, void *end); -+ v7_dma_clean_range((void *)base, (void *)end); -+#elif defined(CONFIG_CPU_CACHE_V6) -+ extern void v6_dma_clean_range(void *start, void *end); -+ v6_dma_clean_range((void *)base, (void *)end); -+#endif -+ /* L1/L2 cache invalidate */ -+ } -+ if (op->invalidate_mode & 1) { -+#if defined(CONFIG_CPU_CACHE_V7) -+ extern void v7_dma_inv_range(void *start, void *end); -+ v7_dma_inv_range((void *)base, (void *)end); -+#elif defined(CONFIG_CPU_CACHE_V6) -+ extern void v6_dma_inv_range(void *start, void *end); -+ v6_dma_inv_range((void *)base, (void *)end); -+#endif -+ } -+ } -+ } -+ kfree(block); -+ } -+ break; - - default: - { -diff --git a/include/linux/broadcom/vmcs_sm_ioctl.h b/include/linux/broadcom/vmcs_sm_ioctl.h -index 334f36d0d697b047df2922b5f2db67f38cf76564..2de7f1f41070689c99cad3bd43d117458549cb51 100644 ---- a/include/linux/broadcom/vmcs_sm_ioctl.h -+++ b/include/linux/broadcom/vmcs_sm_ioctl.h -@@ -62,6 +62,7 @@ enum vmcs_sm_cmd_e { - VMCS_SM_CMD_HOST_WALK_PID_MAP, - - VMCS_SM_CMD_CLEAN_INVALID, -+ VMCS_SM_CMD_CLEAN_INVALID2, - - VMCS_SM_CMD_LAST /* Do no delete */ - }; -@@ -175,6 +176,18 @@ struct vmcs_sm_ioctl_clean_invalid { - } s[8]; - }; - -+struct vmcs_sm_ioctl_clean_invalid2 { -+ uint8_t op_count; -+ uint8_t zero[3]; -+ struct vmcs_sm_ioctl_clean_invalid_block { -+ uint16_t invalidate_mode; -+ uint16_t block_count; -+ void * start_address; -+ uint32_t block_size; -+ uint32_t inter_block_stride; -+ } s[0]; -+}; -+ - /* IOCTL numbers */ - #define VMCS_SM_IOCTL_MEM_ALLOC\ - _IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_ALLOC,\ -@@ -206,6 +219,9 @@ struct vmcs_sm_ioctl_clean_invalid { - #define VMCS_SM_IOCTL_MEM_CLEAN_INVALID\ - _IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_CLEAN_INVALID,\ - struct vmcs_sm_ioctl_clean_invalid) -+#define VMCS_SM_IOCTL_MEM_CLEAN_INVALID2\ -+ _IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_CLEAN_INVALID2,\ -+ struct vmcs_sm_ioctl_clean_invalid2) - - #define VMCS_SM_IOCTL_SIZE_USR_HDL\ - _IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_SIZE_USR_HANDLE,\ - -From b9111ab4c7fe798b294e9485630750431b5dd5fa Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Wed, 15 Feb 2017 11:16:05 +0000 -Subject: [PATCH 174/199] VCSM: Specify pointers in IPC msgs as uint32_t - -Pointers were specified as void* which will fail -rather badly if the kernel is switched to 64 bit. -GPU wants 32 bit addresses, so use uint32_t and -cast whereever necessary. - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vc_sm_defs.h | 12 ++++---- - drivers/char/broadcom/vc_sm/vmcs_sm.c | 52 +++++++++++++++++--------------- - 2 files changed, 33 insertions(+), 31 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vc_sm_defs.h b/drivers/char/broadcom/vc_sm/vc_sm_defs.h -index c4d5ff718a5ba9071ef87fa4c6cf632486c4d36f..6c19aac6dc9df90edb9432bc32e7477d532d3278 100644 ---- a/drivers/char/broadcom/vc_sm/vc_sm_defs.h -+++ b/drivers/char/broadcom/vc_sm/vc_sm_defs.h -@@ -88,7 +88,7 @@ typedef struct { - /* Resource handle */ - uint32_t res_handle; - /* Pointer to resource buffer */ -- void *res_mem; -+ uint32_t res_mem; - /* Resource base size (bytes) */ - uint32_t res_base_size; - /* Resource number */ -@@ -101,7 +101,7 @@ typedef struct { - /* Resource handle (returned from alloc) */ - uint32_t res_handle; - /* Resource buffer (returned from alloc) */ -- void *res_mem; -+ uint32_t res_mem; - - } VC_SM_FREE_T; - -@@ -110,7 +110,7 @@ typedef struct { - /* Resource handle (returned from alloc) */ - uint32_t res_handle; - /* Resource buffer (returned from alloc) */ -- void *res_mem; -+ uint32_t res_mem; - - } VC_SM_LOCK_UNLOCK_T; - -@@ -119,7 +119,7 @@ typedef struct { - /* Resource handle (returned from alloc) */ - uint32_t res_handle; - /* Resource buffer (returned from alloc) */ -- void *res_mem; -+ uint32_t res_mem; - /* Resource *new* size requested (bytes) */ - uint32_t res_new_size; - -@@ -133,10 +133,10 @@ typedef struct { - /* Resource handle */ - uint32_t res_handle; - /* Pointer to resource buffer */ -- void *res_mem; -+ uint32_t res_mem; - /* Pointer to former resource buffer if the memory - * was reallocated */ -- void *res_old_mem; -+ uint32_t res_old_mem; - - } VC_SM_LOCK_RESULT_T; - -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index d49e39566d521c95a96375c556516e444d52b6a0..1afea701625157e9d9bc9570240c0b1afb186f56 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -877,7 +877,7 @@ static void vmcs_sm_release_resource(struct SM_RESOURCE_T *resource, int force) - */ - if (resource->res_handle) { - VC_SM_FREE_T free = { -- resource->res_handle, resource->res_base_mem -+ resource->res_handle, (uint32_t)resource->res_base_mem - }; - int status = vc_vchi_sm_free(sm_state->sm_handle, &free, - &private->int_trans_id); -@@ -1136,17 +1136,17 @@ static int vcsm_vma_fault(struct vm_fault *vmf) - int status; - - lock_unlock.res_handle = resource->res_handle; -- lock_unlock.res_mem = resource->res_base_mem; -+ lock_unlock.res_mem = (uint32_t)resource->res_base_mem; - - pr_debug("[%s]: attempt to lock data - hdl %x, base address %p\n", -- __func__, lock_unlock.res_handle, lock_unlock.res_mem); -+ __func__, lock_unlock.res_handle, -+ (void *)lock_unlock.res_mem); - - /* Lock the videocore allocated resource. - */ - status = vc_vchi_sm_lock(sm_state->sm_handle, - &lock_unlock, &lock_result, 0); -- if ((status != 0) || -- ((status == 0) && (lock_result.res_mem == NULL))) { -+ if (status || !lock_result.res_mem) { - pr_err("[%s]: failed to lock memory on videocore (status: %u)\n", - __func__, status); - resource->res_stats[LOCK_FAIL]++; -@@ -1162,10 +1162,10 @@ static int vcsm_vma_fault(struct vm_fault *vmf) - - /* Keep track of the new base memory. - */ -- if ((lock_result.res_mem != NULL) && -- (lock_result.res_old_mem != NULL) && -+ if (lock_result.res_mem && -+ lock_result.res_old_mem && - (lock_result.res_mem != lock_result.res_old_mem)) { -- resource->res_base_mem = lock_result.res_mem; -+ resource->res_base_mem = (void *)lock_result.res_mem; - } - } - -@@ -1464,7 +1464,7 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, - private->restart_sys = -EINTR; - private->int_action = VC_SM_MSG_TYPE_ALLOC; - goto error; -- } else if (status != 0 || (status == 0 && result.res_mem == NULL)) { -+ } else if (status != 0 || !result.res_mem) { - pr_err("[%s]: failed to allocate memory on videocore (status: %u, trans_id: %u)\n", - __func__, status, private->int_trans_id); - ret = -ENOMEM; -@@ -1476,7 +1476,7 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, - */ - resource->private = private; - resource->res_handle = result.res_handle; -- resource->res_base_mem = result.res_mem; -+ resource->res_base_mem = (void *)result.res_mem; - resource->res_size = alloc.base_unit * alloc.num_unit; - resource->res_cached = cached; - resource->map = map; -@@ -1654,11 +1654,12 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, - } - - resize.res_handle = resource->res_handle; -- resize.res_mem = resource->res_base_mem; -+ resize.res_mem = (uint32_t)resource->res_base_mem; - resize.res_new_size = ioparam->new_size; - - pr_debug("[%s]: attempt to resize data - guid %x, hdl %x, base address %p\n", -- __func__, ioparam->handle, resize.res_handle, resize.res_mem); -+ __func__, ioparam->handle, resize.res_handle, -+ (void *)resize.res_mem); - - /* Resize the videocore allocated resource. - */ -@@ -1671,7 +1672,7 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, - private->restart_sys = -EINTR; - private->int_action = VC_SM_MSG_TYPE_RESIZE; - goto error; -- } else if (status != 0) { -+ } else if (status) { - pr_err("[%s]: failed to resize memory on videocore (status: %u, trans_id: %u)\n", - __func__, status, private->int_trans_id); - ret = -EPERM; -@@ -1729,14 +1730,14 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, - } - - lock.res_handle = resource->res_handle; -- lock.res_mem = resource->res_base_mem; -+ lock.res_mem = (uint32_t)resource->res_base_mem; - - /* Take the lock and get the address to be mapped. - */ - if (vc_addr == 0) { - pr_debug("[%s]: attempt to lock data - guid %x, hdl %x, base address %p\n", - __func__, ioparam->handle, lock.res_handle, -- lock.res_mem); -+ (void *)lock.res_mem); - - /* Lock the videocore allocated resource. - */ -@@ -1749,8 +1750,8 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, - private->restart_sys = -EINTR; - private->int_action = VC_SM_MSG_TYPE_LOCK; - goto error; -- } else if (status != 0 || -- (status == 0 && result.res_mem == NULL)) { -+ } else if (status || -+ (!status && !(void *)result.res_mem)) { - pr_err("[%s]: failed to lock memory on videocore (status: %u, trans_id: %u)\n", - __func__, status, private->int_trans_id); - ret = -EPERM; -@@ -1759,8 +1760,8 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, - } - - pr_debug("[%s]: succeed to lock data - hdl %x, base address %p (%p), ref-cnt %d\n", -- __func__, lock.res_handle, result.res_mem, -- lock.res_mem, resource->lock_count); -+ __func__, lock.res_handle, (void *)result.res_mem, -+ (void *)lock.res_mem, resource->lock_count); - } - /* Lock assumed taken already, address to be mapped is known. - */ -@@ -1773,10 +1774,10 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, - /* Keep track of the new base memory allocation if it has changed. - */ - if ((vc_addr == 0) && -- (result.res_mem != NULL) && -- (result.res_old_mem != NULL) && -+ ((void *)result.res_mem) && -+ ((void *)result.res_old_mem) && - (result.res_mem != result.res_old_mem)) { -- resource->res_base_mem = result.res_mem; -+ resource->res_base_mem = (void *)result.res_mem; - - /* Kernel allocated resources. - */ -@@ -1901,10 +1902,11 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, - } - - unlock.res_handle = resource->res_handle; -- unlock.res_mem = resource->res_base_mem; -+ unlock.res_mem = (uint32_t)resource->res_base_mem; - - pr_debug("[%s]: attempt to unlock data - guid %x, hdl %x, base address %p\n", -- __func__, ioparam->handle, unlock.res_handle, unlock.res_mem); -+ __func__, ioparam->handle, unlock.res_handle, -+ (void *)unlock.res_mem); - - /* User space allocated resources. - */ -@@ -2039,7 +2041,7 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, - } - - pr_debug("[%s]: success to unlock data - hdl %x, base address %p, ref-cnt %d\n", -- __func__, unlock.res_handle, unlock.res_mem, -+ __func__, unlock.res_handle, (void *)unlock.res_mem, - resource->lock_count); - - error: - -From 27e934896b9c0685c6d49f8d3f4fac692bcd6cb5 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 19 May 2017 14:29:12 +0100 -Subject: [PATCH 175/199] vcsm: code-style: Fix comment indentation - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vc_vchi_sm.h | 58 +++++++++++++++++++------------- - 1 file changed, 34 insertions(+), 24 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h -index 5e279f5a95fac7227cea15941bf0570ddc2b0886..f8e555dc30074e7ff226cf34a96aa30a34176775 100644 ---- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h -+++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h -@@ -19,63 +19,73 @@ - - #include "vc_sm_defs.h" - --/* Forward declare. -+/* -+ * Forward declare. - */ - typedef struct sm_instance *VC_VCHI_SM_HANDLE_T; - --/* Initialize the shared memory service, opens up vchi connection to talk to it. --*/ -+/* -+ * Initialize the shared memory service, opens up vchi connection to talk to it. -+ */ - VC_VCHI_SM_HANDLE_T vc_vchi_sm_init(VCHI_INSTANCE_T vchi_instance, - VCHI_CONNECTION_T **vchi_connections, - uint32_t num_connections); - --/* Terminates the shared memory service. --*/ -+/* -+ * Terminates the shared memory service. -+ */ - int vc_vchi_sm_stop(VC_VCHI_SM_HANDLE_T *handle); - --/* Ask the shared memory service to allocate some memory on videocre and --** return the result of this allocation (which upon success will be a pointer --** to some memory in videocore space). --*/ -+/* -+ * Ask the shared memory service to allocate some memory on videocre and -+ * return the result of this allocation (which upon success will be a pointer -+ * to some memory in videocore space). -+ */ - int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, - VC_SM_ALLOC_T *alloc, - VC_SM_ALLOC_RESULT_T *alloc_result, uint32_t *trans_id); - --/* Ask the shared memory service to free up some memory that was previously --** allocated by the vc_vchi_sm_alloc function call. --*/ -+/* -+ * Ask the shared memory service to free up some memory that was previously -+ * allocated by the vc_vchi_sm_alloc function call. -+ */ - int vc_vchi_sm_free(VC_VCHI_SM_HANDLE_T handle, - VC_SM_FREE_T *free, uint32_t *trans_id); - --/* Ask the shared memory service to lock up some memory that was previously --** allocated by the vc_vchi_sm_alloc function call. -+/* -+ * Ask the shared memory service to lock up some memory that was previously -+ * allocated by the vc_vchi_sm_alloc function call. - */ - int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, - VC_SM_LOCK_UNLOCK_T *lock_unlock, - VC_SM_LOCK_RESULT_T *lock_result, uint32_t *trans_id); - --/* Ask the shared memory service to unlock some memory that was previously --** allocated by the vc_vchi_sm_alloc function call. -+/* -+ * Ask the shared memory service to unlock some memory that was previously -+ * allocated by the vc_vchi_sm_alloc function call. - */ - int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, - VC_SM_LOCK_UNLOCK_T *lock_unlock, - uint32_t *trans_id, uint8_t wait_reply); - --/* Ask the shared memory service to resize some memory that was previously --** allocated by the vc_vchi_sm_alloc function call. -+/* -+ * Ask the shared memory service to resize some memory that was previously -+ * allocated by the vc_vchi_sm_alloc function call. - */ - int vc_vchi_sm_resize(VC_VCHI_SM_HANDLE_T handle, - VC_SM_RESIZE_T *resize, uint32_t *trans_id); - --/* Walk the allocated resources on the videocore side, the allocation will --** show up in the log. This is purely for debug/information and takes no --** specific actions. -+/* -+ * Walk the allocated resources on the videocore side, the allocation will -+ * show up in the log. This is purely for debug/information and takes no -+ * specific actions. - */ - int vc_vchi_sm_walk_alloc(VC_VCHI_SM_HANDLE_T handle); - --/* Clean up following a previously interrupted action which left the system --** in a bad state of some sort. --*/ -+/* -+ * Clean up following a previously interrupted action which left the system -+ * in a bad state of some sort. -+ */ - int vc_vchi_sm_clean_up(VC_VCHI_SM_HANDLE_T handle, - VC_SM_ACTION_CLEAN_T *action_clean); - - -From 4d48640616c8d5f0f7800ea60fd427dacef89c3e Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 25 Aug 2017 15:58:57 +0100 -Subject: [PATCH 176/199] vcsm: Convert to loading via device tree. - -Signed-off-by: Dave Stevenson ---- - arch/arm/boot/dts/bcm2708-rpi.dtsi | 6 ++++ - drivers/char/broadcom/vc_sm/vmcs_sm.c | 53 ++++++++++++++++++++++++----------- - 2 files changed, 43 insertions(+), 16 deletions(-) - -diff --git a/arch/arm/boot/dts/bcm2708-rpi.dtsi b/arch/arm/boot/dts/bcm2708-rpi.dtsi -index 8cc83a350d02bb485f7a4fcb129df9e00fb3f958..f88b844f0aff82742966fd820f6f69cf25c2dfab 100644 ---- a/arch/arm/boot/dts/bcm2708-rpi.dtsi -+++ b/arch/arm/boot/dts/bcm2708-rpi.dtsi -@@ -74,6 +74,12 @@ - firmware = <&firmware>; - }; - -+ vcsm: vcsm { -+ compatible = "raspberrypi,bcm2835-vcsm"; -+ firmware = <&firmware>; -+ status = "okay"; -+ }; -+ - thermal: thermal@7e212000 { - #thermal-sensor-cells = <0>; - status = "okay"; -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index 1afea701625157e9d9bc9570240c0b1afb186f56..eb0d3f8a8c27863a5469d0ac224aab65145e7560 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -27,6 +27,8 @@ - #include - #include - #include -+#include -+#include - #include - #include - #include -@@ -45,6 +47,7 @@ - /* ---- Private Constants and Types --------------------------------------- */ - - #define DEVICE_NAME "vcsm" -+#define DRIVER_NAME "bcm2835-vcsm" - #define DEVICE_MINOR 0 - - #define VC_SM_DIR_ROOT_NAME "vc-smem" -@@ -165,6 +168,7 @@ struct SM_PRIV_DATA_T { - /* Global state information. - */ - struct SM_STATE_T { -+ struct platform_device *pdev; - VC_VCHI_SM_HANDLE_T sm_handle; /* Handle for videocore service. */ - struct dentry *dir_root; /* Debug fs entries root. */ - struct dentry *dir_alloc; /* Debug fs entries allocations. */ -@@ -3000,18 +3004,6 @@ static void vc_sm_connected_init(void) - - pr_info("[%s]: start\n", __func__); - -- /* Allocate memory for the state structure. -- */ -- sm_state = kzalloc(sizeof(struct SM_STATE_T), GFP_KERNEL); -- if (sm_state == NULL) { -- pr_err("[%s]: failed to allocate memory\n", __func__); -- ret = -ENOMEM; -- goto out; -- } -- -- mutex_init(&sm_state->lock); -- mutex_init(&sm_state->map_lock); -- - /* Initialize and create a VCHI connection for the shared memory service - ** running on videocore. - */ -@@ -3104,15 +3096,23 @@ static void vc_sm_connected_init(void) - } - - /* Driver loading. */ --static int __init vc_sm_init(void) -+static int bcm2835_vcsm_probe(struct platform_device *pdev) - { - pr_info("vc-sm: Videocore shared memory driver\n"); -+ -+ sm_state = kzalloc(sizeof(*sm_state), GFP_KERNEL); -+ if (!sm_state) -+ return -ENOMEM; -+ sm_state->pdev = pdev; -+ mutex_init(&sm_state->lock); -+ mutex_init(&sm_state->map_lock); -+ - vchiq_add_connected_callback(vc_sm_connected_init); - return 0; - } - - /* Driver unloading. */ --static void __exit vc_sm_exit(void) -+static int bcm2835_vcsm_remove(struct platform_device *pdev) - { - pr_debug("[%s]: start\n", __func__); - if (sm_inited) { -@@ -3135,6 +3135,7 @@ static void __exit vc_sm_exit(void) - } - - pr_debug("[%s]: end\n", __func__); -+ return 0; - } - - #if defined(__KERNEL__) -@@ -3302,8 +3303,28 @@ int vc_sm_map(int handle, unsigned int sm_addr, VC_SM_LOCK_CACHE_MODE_T mode, - EXPORT_SYMBOL_GPL(vc_sm_map); - #endif - --late_initcall(vc_sm_init); --module_exit(vc_sm_exit); -+/* -+ * Register the driver with device tree -+ */ -+ -+static const struct of_device_id bcm2835_vcsm_of_match[] = { -+ {.compatible = "raspberrypi,bcm2835-vcsm",}, -+ { /* sentinel */ }, -+}; -+ -+MODULE_DEVICE_TABLE(of, bcm2835_vcsm_of_match); -+ -+static struct platform_driver bcm2835_vcsm_driver = { -+ .probe = bcm2835_vcsm_probe, -+ .remove = bcm2835_vcsm_remove, -+ .driver = { -+ .name = DRIVER_NAME, -+ .owner = THIS_MODULE, -+ .of_match_table = bcm2835_vcsm_of_match, -+ }, -+}; -+ -+module_platform_driver(bcm2835_vcsm_driver); - - MODULE_AUTHOR("Broadcom"); - MODULE_DESCRIPTION("VideoCore SharedMemory Driver"); - -From b99343baef75676dc3192f9fc71eb6a703cbb4ae Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Wed, 15 Feb 2017 11:17:44 +0000 -Subject: [PATCH 177/199] VCSM: New option to import a DMABUF for VPU use - -Takes a dmabuf, and then calls over to the VPU to wrap -it into a suitable handle. - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vc_sm_defs.h | 57 ++++++- - drivers/char/broadcom/vc_sm/vc_sm_knl.h | 21 ++- - drivers/char/broadcom/vc_sm/vc_vchi_sm.c | 9 ++ - drivers/char/broadcom/vc_sm/vc_vchi_sm.h | 7 + - drivers/char/broadcom/vc_sm/vmcs_sm.c | 269 ++++++++++++++++++++++++++++++- - include/linux/broadcom/vmcs_sm_ioctl.h | 18 ++- - 6 files changed, 359 insertions(+), 22 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vc_sm_defs.h b/drivers/char/broadcom/vc_sm/vc_sm_defs.h -index 6c19aac6dc9df90edb9432bc32e7477d532d3278..bf057969644546d8f036044aa14d6606173b6a35 100644 ---- a/drivers/char/broadcom/vc_sm/vc_sm_defs.h -+++ b/drivers/char/broadcom/vc_sm/vc_sm_defs.h -@@ -26,8 +26,9 @@ - /* Resource name maximum size */ - #define VC_SM_RESOURCE_NAME 32 - --/* All message types supported for HOST->VC direction */ - typedef enum { -+ /* Message types supported for HOST->VC direction */ -+ - /* Allocate shared memory block */ - VC_SM_MSG_TYPE_ALLOC, - /* Lock allocated shared memory block */ -@@ -45,6 +46,21 @@ typedef enum { - - /* A previously applied action will need to be reverted */ - VC_SM_MSG_TYPE_ACTION_CLEAN, -+ -+ /* -+ * Import a physical address and wrap into a MEM_HANDLE_T. -+ * Release with VC_SM_MSG_TYPE_FREE. -+ */ -+ VC_SM_MSG_TYPE_IMPORT, -+ -+ /* Message types supported for VC->HOST direction */ -+ -+ /* -+ * VC has finished with an imported memory allocation. -+ * Release any Linux reference counts on the underlying block. -+ */ -+ VC_SM_MSG_TYPE_RELEASED, -+ - VC_SM_MSG_TYPE_MAX - } VC_SM_MSG_TYPE; - -@@ -165,6 +181,41 @@ typedef struct { - - } VC_SM_FREE_ALL_T; - -+/* Request to import memory (HOST->VC) */ -+struct vc_sm_import { -+ /* type of memory to allocate */ -+ VC_SM_ALLOC_TYPE_T type; -+ /* pointer to the VC (ie physical) address of the allocated memory */ -+ uint32_t addr; -+ /* size of buffer */ -+ uint32_t size; -+ /* opaque handle returned in RELEASED messages */ -+ int32_t kernel_id; -+ /* Allocator identifier */ -+ uint32_t allocator; -+ /* resource name (for easier tracking on vc side) */ -+ char name[VC_SM_RESOURCE_NAME]; -+}; -+ -+/* Result of a requested memory import (VC->HOST) */ -+struct vc_sm_import_result { -+ /* Transaction identifier */ -+ uint32_t trans_id; -+ -+ /* Resource handle */ -+ uint32_t res_handle; -+}; -+ -+/* Notification that VC has finished with an allocation (VC->HOST) */ -+struct vc_sm_released { -+ /* pointer to the VC (ie physical) address of the allocated memory */ -+ uint32_t addr; -+ /* size of buffer */ -+ uint32_t size; -+ /* opaque handle returned in RELEASED messages */ -+ int32_t kernel_id; -+}; -+ - /* Union of ALL messages */ - typedef union { - VC_SM_ALLOC_T alloc; -@@ -175,7 +226,9 @@ typedef union { - VC_SM_LOCK_RESULT_T lock_result; - VC_SM_RESULT_T result; - VC_SM_FREE_ALL_T free_all; -- -+ struct vc_sm_import import; -+ struct vc_sm_import_result import_result; -+ struct vc_sm_released released; - } VC_SM_MSG_UNION_T; - - #endif /* __VC_SM_DEFS_H__INCLUDED__ */ -diff --git a/drivers/char/broadcom/vc_sm/vc_sm_knl.h b/drivers/char/broadcom/vc_sm/vc_sm_knl.h -index 965f9a209a025202fea8065d3947c36f4fa43d0a..31050d3eb242b744c1ca43d6672d63b8439f7bc5 100644 ---- a/drivers/char/broadcom/vc_sm/vc_sm_knl.h -+++ b/drivers/char/broadcom/vc_sm/vc_sm_knl.h -@@ -26,30 +26,27 @@ typedef enum { - - } VC_SM_LOCK_CACHE_MODE_T; - --/* Allocate a shared memory handle and block. --*/ -+/* Allocate a shared memory handle and block. */ - int vc_sm_alloc(VC_SM_ALLOC_T *alloc, int *handle); - --/* Free a previously allocated shared memory handle and block. --*/ -+/* Free a previously allocated shared memory handle and block. */ - int vc_sm_free(int handle); - --/* Lock a memory handle for use by kernel. --*/ -+/* Lock a memory handle for use by kernel. */ - int vc_sm_lock(int handle, VC_SM_LOCK_CACHE_MODE_T mode, - long unsigned int *data); - --/* Unlock a memory handle in use by kernel. --*/ -+/* Unlock a memory handle in use by kernel. */ - int vc_sm_unlock(int handle, int flush, int no_vc_unlock); - --/* Get an internal resource handle mapped from the external one. --*/ -+/* Get an internal resource handle mapped from the external one. */ - int vc_sm_int_handle(int handle); - --/* Map a shared memory region for use by kernel. --*/ -+/* Map a shared memory region for use by kernel. */ - int vc_sm_map(int handle, unsigned int sm_addr, VC_SM_LOCK_CACHE_MODE_T mode, - long unsigned int *data); - -+/* Import a block of memory into the GPU space. */ -+int vc_sm_import_dmabuf(struct dma_buf *dmabuf, int *handle); -+ - #endif /* __VC_SM_KNL_H__INCLUDED__ */ -diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c -index 76abd126c4617b6310fcf0ebd7ab1d5f73a18a70..53fc11a9d5d741ec6a7e55b4d1934c9c43a6df8c 100644 ---- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c -+++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c -@@ -497,3 +497,12 @@ int vc_vchi_sm_clean_up(VC_VCHI_SM_HANDLE_T handle, VC_SM_ACTION_CLEAN_T *msg) - return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_ACTION_CLEAN, - msg, sizeof(*msg), 0, 0, 0, 0); - } -+ -+int vc_vchi_sm_import(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_import *msg, -+ struct vc_sm_import_result *result, -+ uint32_t *cur_trans_id) -+{ -+ return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_IMPORT, -+ msg, sizeof(*msg), result, sizeof(*result), -+ cur_trans_id, 1); -+} -diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h -index f8e555dc30074e7ff226cf34a96aa30a34176775..562217831fa744db99d94295c1c5a46f3a4780fb 100644 ---- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h -+++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h -@@ -89,4 +89,11 @@ int vc_vchi_sm_walk_alloc(VC_VCHI_SM_HANDLE_T handle); - int vc_vchi_sm_clean_up(VC_VCHI_SM_HANDLE_T handle, - VC_SM_ACTION_CLEAN_T *action_clean); - -+/* -+ * Import a contiguous block of memory and wrap it in a GPU MEM_HANDLE_T. -+ */ -+int vc_vchi_sm_import(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_import *msg, -+ struct vc_sm_import_result *result, -+ uint32_t *cur_trans_id); -+ - #endif /* __VC_VCHI_SM_H__INCLUDED__ */ -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index eb0d3f8a8c27863a5469d0ac224aab65145e7560..520f343f3f4b828f3045fc4ff3fb0d8a68bb1f9d 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -69,6 +70,7 @@ enum SM_STATS_T { - MAP, - FLUSH, - INVALID, -+ IMPORT, - - END_ATTEMPT, - -@@ -80,6 +82,7 @@ enum SM_STATS_T { - MAP_FAIL, - FLUSH_FAIL, - INVALID_FAIL, -+ IMPORT_FAIL, - - END_ALL, - -@@ -93,6 +96,7 @@ static const char *const sm_stats_human_read[] = { - "Map", - "Cache Flush", - "Cache Invalidate", -+ "Import", - }; - - typedef int (*VC_SM_SHOW) (struct seq_file *s, void *v); -@@ -144,6 +148,12 @@ struct SM_RESOURCE_T { - uint8_t map_count; /* Counter of mappings for this resource. */ - struct list_head map_list; /* Maps associated with a resource. */ - -+ /* DMABUF related fields */ -+ struct dma_buf *dma_buf; -+ struct dma_buf_attachment *attach; -+ struct sg_table *sgt; -+ dma_addr_t dma_addr; -+ - struct SM_PRIV_DATA_T *private; - bool map; /* whether to map pages up front */ - }; -@@ -500,7 +510,9 @@ static void vmcs_sm_remove_map(struct SM_STATE_T *state, - static int vc_sm_global_state_show(struct seq_file *s, void *v) - { - struct sm_mmap *map = NULL; -+ struct SM_RESOURCE_T *resource = NULL; - int map_count = 0; -+ int resource_count = 0; - - if (sm_state == NULL) - return 0; -@@ -512,7 +524,41 @@ static int vc_sm_global_state_show(struct seq_file *s, void *v) - */ - - mutex_lock(&(sm_state->map_lock)); -+ seq_puts(s, "\nResources\n"); -+ if (!list_empty(&sm_state->resource_list)) { -+ list_for_each_entry(resource, &sm_state->resource_list, -+ global_resource_list) { -+ resource_count++; -+ -+ seq_printf(s, "\nResource %p\n", -+ resource); -+ seq_printf(s, " PID %u\n", -+ resource->pid); -+ seq_printf(s, " RES_GUID 0x%x\n", -+ resource->res_guid); -+ seq_printf(s, " LOCK_COUNT %u\n", -+ resource->lock_count); -+ seq_printf(s, " REF_COUNT %u\n", -+ resource->ref_count); -+ seq_printf(s, " res_handle 0x%X\n", -+ resource->res_handle); -+ seq_printf(s, " res_base_mem %p\n", -+ resource->res_base_mem); -+ seq_printf(s, " SIZE %d\n", -+ resource->res_size); -+ seq_printf(s, " DMABUF %p\n", -+ resource->dma_buf); -+ seq_printf(s, " ATTACH %p\n", -+ resource->attach); -+ seq_printf(s, " SGT %p\n", -+ resource->sgt); -+ seq_printf(s, " DMA_ADDR 0x%08X\n", -+ resource->dma_addr); -+ } -+ } -+ seq_printf(s, "\n\nTotal resource count: %d\n\n", resource_count); - -+ seq_puts(s, "\nMappings\n"); - if (!list_empty(&sm_state->map_list)) { - list_for_each_entry(map, &sm_state->map_list, map_list) { - map_count++; -@@ -527,6 +573,8 @@ static int vc_sm_global_state_show(struct seq_file *s, void *v) - map->res_usr_hdl); - seq_printf(s, " USR-ADDR 0x%lx\n", - map->res_addr); -+ seq_printf(s, " SIZE %d\n", -+ map->resource->res_size); - } - } - -@@ -843,7 +891,8 @@ static void vmcs_sm_release_resource(struct SM_RESOURCE_T *resource, int force) - list_del(&resource->resource_list); - list_del(&resource->global_resource_list); - -- /* Walk the global resource list, find out if the resource is used -+ /* -+ * Walk the global resource list, find out if the resource is used - * somewhere else. In which case we don't want to delete it. - */ - list_for_each_entry(res_tmp, &sm_state->resource_list, -@@ -877,8 +926,7 @@ static void vmcs_sm_release_resource(struct SM_RESOURCE_T *resource, int force) - up_write(¤t->mm->mmap_sem); - } - -- /* Free up the videocore allocated resource. -- */ -+ /* Free up the videocore allocated resource. */ - if (resource->res_handle) { - VC_SM_FREE_T free = { - resource->res_handle, (uint32_t)resource->res_base_mem -@@ -893,13 +941,19 @@ static void vmcs_sm_release_resource(struct SM_RESOURCE_T *resource, int force) - } - } - -- /* Free up the shared resource. -- */ -+ if (resource->sgt) -+ dma_buf_unmap_attachment(resource->attach, resource->sgt, -+ DMA_BIDIRECTIONAL); -+ if (resource->attach) -+ dma_buf_detach(resource->dma_buf, resource->attach); -+ if (resource->dma_buf) -+ dma_buf_put(resource->dma_buf); -+ -+ /* Free up the shared resource. */ - if (resource->res_shared) - vmcs_sm_release_resource(resource->res_shared, 0); - -- /* Free up the local resource tracking this allocation. -- */ -+ /* Free up the local resource tracking this allocation. */ - vc_sm_resource_deceased(resource, force); - kfree(resource); - } -@@ -2055,6 +2109,137 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, - return ret; - } - -+/* -+ * Import a contiguous block of memory to be shared with VC. -+ */ -+int vc_sm_ioctl_import_dmabuf(struct SM_PRIV_DATA_T *private, -+ struct vmcs_sm_ioctl_import_dmabuf *ioparam, -+ struct dma_buf *src_dma_buf) -+{ -+ int ret = 0; -+ int status; -+ struct SM_RESOURCE_T *resource = NULL; -+ struct vc_sm_import import = { 0 }; -+ struct vc_sm_import_result result = { 0 }; -+ struct dma_buf *dma_buf; -+ struct dma_buf_attachment *attach = NULL; -+ struct sg_table *sgt = NULL; -+ -+ /* Setup our allocation parameters */ -+ if (src_dma_buf) { -+ get_dma_buf(src_dma_buf); -+ dma_buf = src_dma_buf; -+ } else { -+ dma_buf = dma_buf_get(ioparam->dmabuf_fd); -+ } -+ if (IS_ERR(dma_buf)) -+ return PTR_ERR(dma_buf); -+ -+ attach = dma_buf_attach(dma_buf, &sm_state->pdev->dev); -+ if (IS_ERR(attach)) { -+ ret = PTR_ERR(attach); -+ goto error; -+ } -+ -+ sgt = dma_buf_map_attachment(attach, DMA_BIDIRECTIONAL); -+ if (IS_ERR(sgt)) { -+ ret = PTR_ERR(sgt); -+ goto error; -+ } -+ -+ /* Verify that the address block is contiguous */ -+ if (sgt->nents != 1) { -+ ret = -ENOMEM; -+ goto error; -+ } -+ -+ import.type = ((ioparam->cached == VMCS_SM_CACHE_VC) || -+ (ioparam->cached == VMCS_SM_CACHE_BOTH)) ? -+ VC_SM_ALLOC_CACHED : VC_SM_ALLOC_NON_CACHED; -+ import.addr = (uint32_t)sg_dma_address(sgt->sgl); -+ import.size = sg_dma_len(sgt->sgl); -+ import.allocator = current->tgid; -+ -+ if (*ioparam->name) -+ memcpy(import.name, ioparam->name, sizeof(import.name) - 1); -+ else -+ memcpy(import.name, VMCS_SM_RESOURCE_NAME_DEFAULT, -+ sizeof(VMCS_SM_RESOURCE_NAME_DEFAULT)); -+ -+ pr_debug("[%s]: attempt to import \"%s\" data - type %u, addr %p, size %u\n", -+ __func__, import.name, import.type, -+ (void *)import.addr, import.size); -+ -+ /* Allocate local resource to track this allocation. */ -+ resource = kzalloc(sizeof(*resource), GFP_KERNEL); -+ if (!resource) { -+ ret = -ENOMEM; -+ goto error; -+ } -+ INIT_LIST_HEAD(&resource->map_list); -+ resource->ref_count++; -+ resource->pid = current->tgid; -+ -+ /* Allocate the videocore resource. */ -+ status = vc_vchi_sm_import(sm_state->sm_handle, &import, &result, -+ &private->int_trans_id); -+ if (status == -EINTR) { -+ pr_debug("[%s]: requesting import memory action restart (trans_id: %u)\n", -+ __func__, private->int_trans_id); -+ ret = -ERESTARTSYS; -+ private->restart_sys = -EINTR; -+ private->int_action = VC_SM_MSG_TYPE_IMPORT; -+ goto error; -+ } else if (status || !result.res_handle) { -+ pr_debug("[%s]: failed to import memory on videocore (status: %u, trans_id: %u)\n", -+ __func__, status, private->int_trans_id); -+ ret = -ENOMEM; -+ resource->res_stats[ALLOC_FAIL]++; -+ goto error; -+ } -+ -+ /* Keep track of the resource we created. -+ */ -+ resource->private = private; -+ resource->res_handle = result.res_handle; -+ resource->res_size = import.size; -+ resource->res_cached = ioparam->cached; -+ -+ resource->dma_buf = dma_buf; -+ resource->attach = attach; -+ resource->sgt = sgt; -+ resource->dma_addr = sg_dma_address(sgt->sgl); -+ -+ /* Kernel/user GUID. This global identifier is used for mmap'ing the -+ * allocated region from user space, it is passed as the mmap'ing -+ * offset, we use it to 'hide' the videocore handle/address. -+ */ -+ mutex_lock(&sm_state->lock); -+ resource->res_guid = ++sm_state->guid; -+ mutex_unlock(&sm_state->lock); -+ resource->res_guid <<= PAGE_SHIFT; -+ -+ vmcs_sm_add_resource(private, resource); -+ -+ /* We're done */ -+ resource->res_stats[IMPORT]++; -+ ioparam->handle = resource->res_guid; -+ return 0; -+ -+error: -+ resource->res_stats[IMPORT_FAIL]++; -+ if (resource) { -+ vc_sm_resource_deceased(resource, 1); -+ kfree(resource); -+ } -+ if (sgt) -+ dma_buf_unmap_attachment(attach, sgt, DMA_BIDIRECTIONAL); -+ if (attach) -+ dma_buf_detach(dma_buf, attach); -+ dma_buf_put(dma_buf); -+ return ret; -+} -+ - /* Handle control from host. */ - static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - { -@@ -2166,6 +2351,40 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - } - break; - -+ case VMCS_SM_CMD_IMPORT_DMABUF: -+ { -+ struct vmcs_sm_ioctl_import_dmabuf ioparam; -+ -+ /* Get the parameter data. -+ */ -+ if (copy_from_user -+ (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { -+ pr_err("[%s]: failed to copy-from-user for cmd %x\n", -+ __func__, cmdnr); -+ ret = -EFAULT; -+ goto out; -+ } -+ -+ ret = vc_sm_ioctl_import_dmabuf(file_data, &ioparam, -+ NULL); -+ if (!ret && -+ (copy_to_user((void *)arg, -+ &ioparam, sizeof(ioparam)) != 0)) { -+ struct vmcs_sm_ioctl_free freeparam = { -+ ioparam.handle -+ }; -+ pr_err("[%s]: failed to copy-to-user for cmd %x\n", -+ __func__, cmdnr); -+ vc_sm_ioctl_free(file_data, &freeparam); -+ ret = -EFAULT; -+ } -+ -+ /* Done. -+ */ -+ goto out; -+ } -+ break; -+ - /* Lock (attempt to) *and* register a cache behavior change. - */ - case VMCS_SM_CMD_LOCK_CACHE: -@@ -3301,6 +3520,42 @@ int vc_sm_map(int handle, unsigned int sm_addr, VC_SM_LOCK_CACHE_MODE_T mode, - return ret; - } - EXPORT_SYMBOL_GPL(vc_sm_map); -+ -+/* Import a dmabuf to be shared with VC. */ -+int vc_sm_import_dmabuf(struct dma_buf *dmabuf, int *handle) -+{ -+ struct vmcs_sm_ioctl_import_dmabuf ioparam = { 0 }; -+ int ret; -+ struct SM_RESOURCE_T *resource; -+ -+ /* Validate we can work with this device. */ -+ if (!sm_state || !dmabuf || !handle) { -+ pr_err("[%s]: invalid input\n", __func__); -+ return -EPERM; -+ } -+ -+ ioparam.cached = 0; -+ strcpy(ioparam.name, "KRNL DMABUF"); -+ -+ ret = vc_sm_ioctl_import_dmabuf(sm_state->data_knl, &ioparam, dmabuf); -+ -+ if (!ret) { -+ resource = vmcs_sm_acquire_resource(sm_state->data_knl, -+ ioparam.handle); -+ if (resource) { -+ resource->pid = 0; -+ vmcs_sm_release_resource(resource, 0); -+ -+ /* Assign valid handle at this time.*/ -+ *handle = ioparam.handle; -+ } else { -+ ret = -ENOMEM; -+ } -+ } -+ -+ return ret; -+} -+EXPORT_SYMBOL_GPL(vc_sm_import_dmabuf); - #endif - - /* -diff --git a/include/linux/broadcom/vmcs_sm_ioctl.h b/include/linux/broadcom/vmcs_sm_ioctl.h -index 2de7f1f41070689c99cad3bd43d117458549cb51..b75729d762f25aace133f7a008633b4094ae2de2 100644 ---- a/include/linux/broadcom/vmcs_sm_ioctl.h -+++ b/include/linux/broadcom/vmcs_sm_ioctl.h -@@ -64,7 +64,9 @@ enum vmcs_sm_cmd_e { - VMCS_SM_CMD_CLEAN_INVALID, - VMCS_SM_CMD_CLEAN_INVALID2, - -- VMCS_SM_CMD_LAST /* Do no delete */ -+ VMCS_SM_CMD_IMPORT_DMABUF, -+ -+ VMCS_SM_CMD_LAST /* Do not delete */ - }; - - /* Cache type supported, conveniently matches the user space definition in -@@ -188,6 +190,16 @@ struct vmcs_sm_ioctl_clean_invalid2 { - } s[0]; - }; - -+struct vmcs_sm_ioctl_import_dmabuf { -+ /* user -> kernel */ -+ int dmabuf_fd; -+ enum vmcs_sm_cache_e cached; -+ char name[VMCS_SM_RESOURCE_NAME]; -+ -+ /* kernel -> user */ -+ unsigned int handle; -+}; -+ - /* IOCTL numbers */ - #define VMCS_SM_IOCTL_MEM_ALLOC\ - _IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_ALLOC,\ -@@ -257,6 +269,10 @@ struct vmcs_sm_ioctl_clean_invalid2 { - _IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_HOST_WALK_PID_MAP,\ - struct vmcs_sm_ioctl_walk) - -+#define VMCS_SM_IOCTL_MEM_IMPORT_DMABUF\ -+ _IOR(VMCS_SM_MAGIC_TYPE, VMCS_SM_CMD_IMPORT_DMABUF,\ -+ struct vmcs_sm_ioctl_import_dmabuf) -+ - /* ---- Variable Externs ------------------------------------------------- */ - - /* ---- Function Prototypes ---------------------------------------------- */ - -From eb3b64dfcae6eb6adcbbd2c9f8292faa967cc129 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 1 Sep 2017 16:26:12 +0100 -Subject: [PATCH 178/199] vcsm: Remove all typedefs from vc_sm_defs.h and - calling code - -Remove typedefs on the structures that make up the IPC -to the firmware for VCSM. Update all calling code appropriately. - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vc_sm_defs.h | 83 ++++++++++++++++---------------- - drivers/char/broadcom/vc_sm/vc_sm_knl.h | 2 +- - drivers/char/broadcom/vc_sm/vc_vchi_sm.c | 34 +++++++------ - drivers/char/broadcom/vc_sm/vc_vchi_sm.h | 19 ++++---- - drivers/char/broadcom/vc_sm/vmcs_sm.c | 26 +++++----- - 5 files changed, 84 insertions(+), 80 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vc_sm_defs.h b/drivers/char/broadcom/vc_sm/vc_sm_defs.h -index bf057969644546d8f036044aa14d6606173b6a35..29057db43404716406b06e3c3745e3d82219be16 100644 ---- a/drivers/char/broadcom/vc_sm/vc_sm_defs.h -+++ b/drivers/char/broadcom/vc_sm/vc_sm_defs.h -@@ -19,14 +19,14 @@ - #define VC_SM_SERVER_NAME MAKE_FOURCC("SMEM") - - /* Maximum message length */ --#define VC_SM_MAX_MSG_LEN (sizeof(VC_SM_MSG_UNION_T) + \ -- sizeof(VC_SM_MSG_HDR_T)) --#define VC_SM_MAX_RSP_LEN (sizeof(VC_SM_MSG_UNION_T)) -+#define VC_SM_MAX_MSG_LEN (sizeof(union vc_sm_msg_union_t) + \ -+ sizeof(struct vc_sm_msg_hdr_t)) -+#define VC_SM_MAX_RSP_LEN (sizeof(union vc_sm_msg_union_t)) - - /* Resource name maximum size */ - #define VC_SM_RESOURCE_NAME 32 - --typedef enum { -+enum vc_sm_msg_type { - /* Message types supported for HOST->VC direction */ - - /* Allocate shared memory block */ -@@ -62,27 +62,26 @@ typedef enum { - VC_SM_MSG_TYPE_RELEASED, - - VC_SM_MSG_TYPE_MAX --} VC_SM_MSG_TYPE; -+}; - - /* Type of memory to be allocated */ --typedef enum { -+enum vc_sm_alloc_type_t { - VC_SM_ALLOC_CACHED, - VC_SM_ALLOC_NON_CACHED, -- --} VC_SM_ALLOC_TYPE_T; -+}; - - /* Message header for all messages in HOST->VC direction */ --typedef struct { -+struct vc_sm_msg_hdr_t { - int32_t type; - uint32_t trans_id; - uint8_t body[0]; - --} VC_SM_MSG_HDR_T; -+}; - - /* Request to allocate memory (HOST->VC) */ --typedef struct { -+struct vc_sm_alloc_t { - /* type of memory to allocate */ -- VC_SM_ALLOC_TYPE_T type; -+ enum vc_sm_alloc_type_t type; - /* byte amount of data to allocate per unit */ - uint32_t base_unit; - /* number of unit to allocate */ -@@ -94,10 +93,10 @@ typedef struct { - /* resource name (for easier tracking on vc side) */ - char name[VC_SM_RESOURCE_NAME]; - --} VC_SM_ALLOC_T; -+}; - - /* Result of a requested memory allocation (VC->HOST) */ --typedef struct { -+struct vc_sm_alloc_result_t { - /* Transaction identifier */ - uint32_t trans_id; - -@@ -110,28 +109,28 @@ typedef struct { - /* Resource number */ - uint32_t res_num; - --} VC_SM_ALLOC_RESULT_T; -+}; - - /* Request to free a previously allocated memory (HOST->VC) */ --typedef struct { -+struct vc_sm_free_t { - /* Resource handle (returned from alloc) */ - uint32_t res_handle; - /* Resource buffer (returned from alloc) */ - uint32_t res_mem; - --} VC_SM_FREE_T; -+}; - - /* Request to lock a previously allocated memory (HOST->VC) */ --typedef struct { -+struct vc_sm_lock_unlock_t { - /* Resource handle (returned from alloc) */ - uint32_t res_handle; - /* Resource buffer (returned from alloc) */ - uint32_t res_mem; - --} VC_SM_LOCK_UNLOCK_T; -+}; - - /* Request to resize a previously allocated memory (HOST->VC) */ --typedef struct { -+struct vc_sm_resize_t { - /* Resource handle (returned from alloc) */ - uint32_t res_handle; - /* Resource buffer (returned from alloc) */ -@@ -139,10 +138,10 @@ typedef struct { - /* Resource *new* size requested (bytes) */ - uint32_t res_new_size; - --} VC_SM_RESIZE_T; -+}; - - /* Result of a requested memory lock (VC->HOST) */ --typedef struct { -+struct vc_sm_lock_result_t { - /* Transaction identifier */ - uint32_t trans_id; - -@@ -154,37 +153,36 @@ typedef struct { - * was reallocated */ - uint32_t res_old_mem; - --} VC_SM_LOCK_RESULT_T; -+}; - - /* Generic result for a request (VC->HOST) */ --typedef struct { -+struct vc_sm_result_t { - /* Transaction identifier */ - uint32_t trans_id; - - int32_t success; - --} VC_SM_RESULT_T; -+}; - - /* Request to revert a previously applied action (HOST->VC) */ --typedef struct { -+struct vc_sm_action_clean_t { - /* Action of interest */ -- VC_SM_MSG_TYPE res_action; -+ enum vc_sm_msg_type res_action; - /* Transaction identifier for the action of interest */ - uint32_t action_trans_id; - --} VC_SM_ACTION_CLEAN_T; -+}; - - /* Request to remove all data associated with a given allocator (HOST->VC) */ --typedef struct { -+struct vc_sm_free_all_t { - /* Allocator identifier */ - uint32_t allocator; -- --} VC_SM_FREE_ALL_T; -+}; - - /* Request to import memory (HOST->VC) */ - struct vc_sm_import { - /* type of memory to allocate */ -- VC_SM_ALLOC_TYPE_T type; -+ enum vc_sm_alloc_type_t type; - /* pointer to the VC (ie physical) address of the allocated memory */ - uint32_t addr; - /* size of buffer */ -@@ -217,18 +215,19 @@ struct vc_sm_released { - }; - - /* Union of ALL messages */ --typedef union { -- VC_SM_ALLOC_T alloc; -- VC_SM_ALLOC_RESULT_T alloc_result; -- VC_SM_FREE_T free; -- VC_SM_ACTION_CLEAN_T action_clean; -- VC_SM_RESIZE_T resize; -- VC_SM_LOCK_RESULT_T lock_result; -- VC_SM_RESULT_T result; -- VC_SM_FREE_ALL_T free_all; -+union vc_sm_msg_union_t { -+ struct vc_sm_alloc_t alloc; -+ struct vc_sm_alloc_result_t alloc_result; -+ struct vc_sm_free_t free; -+ struct vc_sm_lock_unlock_t lock_unlock; -+ struct vc_sm_action_clean_t action_clean; -+ struct vc_sm_resize_t resize; -+ struct vc_sm_lock_result_t lock_result; -+ struct vc_sm_result_t result; -+ struct vc_sm_free_all_t free_all; - struct vc_sm_import import; - struct vc_sm_import_result import_result; - struct vc_sm_released released; --} VC_SM_MSG_UNION_T; -+}; - - #endif /* __VC_SM_DEFS_H__INCLUDED__ */ -diff --git a/drivers/char/broadcom/vc_sm/vc_sm_knl.h b/drivers/char/broadcom/vc_sm/vc_sm_knl.h -index 31050d3eb242b744c1ca43d6672d63b8439f7bc5..3c684ddde5c1fac5c726a71deec305f7588f0200 100644 ---- a/drivers/char/broadcom/vc_sm/vc_sm_knl.h -+++ b/drivers/char/broadcom/vc_sm/vc_sm_knl.h -@@ -27,7 +27,7 @@ typedef enum { - } VC_SM_LOCK_CACHE_MODE_T; - - /* Allocate a shared memory handle and block. */ --int vc_sm_alloc(VC_SM_ALLOC_T *alloc, int *handle); -+int vc_sm_alloc(struct vc_sm_alloc_t *alloc, int *handle); - - /* Free a previously allocated shared memory handle and block. */ - int vc_sm_free(int handle); -diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c -index 53fc11a9d5d741ec6a7e55b4d1934c9c43a6df8c..a702b0c16478c87e28be3905a14dcd992e6c05cb 100644 ---- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c -+++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c -@@ -83,11 +83,11 @@ bcm2835_vchi_msg_queue(VCHI_SERVICE_HANDLE_T handle, - - static struct - sm_cmd_rsp_blk *vc_vchi_cmd_create(struct sm_instance *instance, -- VC_SM_MSG_TYPE id, void *msg, -+ enum vc_sm_msg_type id, void *msg, - uint32_t size, int wait) - { - struct sm_cmd_rsp_blk *blk; -- VC_SM_MSG_HDR_T *hdr; -+ struct vc_sm_msg_hdr_t *hdr; - - if (down_interruptible(&instance->free_sema)) { - blk = kmalloc(sizeof(*blk), GFP_KERNEL); -@@ -109,7 +109,7 @@ sm_cmd_rsp_blk *vc_vchi_cmd_create(struct sm_instance *instance, - blk->wait = wait; - blk->length = sizeof(*hdr) + size; - -- hdr = (VC_SM_MSG_HDR_T *) blk->msg; -+ hdr = (struct vc_sm_msg_hdr_t *) blk->msg; - hdr->type = id; - mutex_lock(&instance->lock); - hdr->trans_id = blk->id = ++instance->trans_id; -@@ -139,7 +139,7 @@ static int vc_vchi_sm_videocore_io(void *arg) - { - struct sm_instance *instance = arg; - struct sm_cmd_rsp_blk *cmd = NULL, *cmd_tmp; -- VC_SM_RESULT_T *reply; -+ struct vc_sm_result_t *reply; - uint32_t reply_len; - int32_t status; - int svc_use = 1; -@@ -374,7 +374,7 @@ int vc_vchi_sm_stop(VC_VCHI_SM_HANDLE_T *handle) - } - - int vc_vchi_sm_send_msg(VC_VCHI_SM_HANDLE_T handle, -- VC_SM_MSG_TYPE msg_id, -+ enum vc_sm_msg_type msg_id, - void *msg, uint32_t msg_size, - void *result, uint32_t result_size, - uint32_t *cur_trans_id, uint8_t wait_reply) -@@ -433,7 +433,8 @@ int vc_vchi_sm_send_msg(VC_VCHI_SM_HANDLE_T handle, - if (result && result_size) { - memcpy(result, cmd_blk->msg, result_size); - } else { -- VC_SM_RESULT_T *res = (VC_SM_RESULT_T *) cmd_blk->msg; -+ struct vc_sm_result_t *res = -+ (struct vc_sm_result_t *) cmd_blk->msg; - status = (res->success == 0) ? 0 : -ENXIO; - } - -@@ -444,8 +445,9 @@ int vc_vchi_sm_send_msg(VC_VCHI_SM_HANDLE_T handle, - return status; - } - --int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, VC_SM_ALLOC_T *msg, -- VC_SM_ALLOC_RESULT_T *result, uint32_t *cur_trans_id) -+int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_alloc_t *msg, -+ struct vc_sm_alloc_result_t *result, -+ uint32_t *cur_trans_id) - { - return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_ALLOC, - msg, sizeof(*msg), result, sizeof(*result), -@@ -453,15 +455,16 @@ int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, VC_SM_ALLOC_T *msg, - } - - int vc_vchi_sm_free(VC_VCHI_SM_HANDLE_T handle, -- VC_SM_FREE_T *msg, uint32_t *cur_trans_id) -+ struct vc_sm_free_t *msg, uint32_t *cur_trans_id) - { - return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_FREE, - msg, sizeof(*msg), 0, 0, cur_trans_id, 0); - } - - int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, -- VC_SM_LOCK_UNLOCK_T *msg, -- VC_SM_LOCK_RESULT_T *result, uint32_t *cur_trans_id) -+ struct vc_sm_lock_unlock_t *msg, -+ struct vc_sm_lock_result_t *result, -+ uint32_t *cur_trans_id) - { - return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_LOCK, - msg, sizeof(*msg), result, sizeof(*result), -@@ -469,7 +472,7 @@ int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, - } - - int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, -- VC_SM_LOCK_UNLOCK_T *msg, -+ struct vc_sm_lock_unlock_t *msg, - uint32_t *cur_trans_id, uint8_t wait_reply) - { - return vc_vchi_sm_send_msg(handle, wait_reply ? -@@ -479,8 +482,8 @@ int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, - wait_reply); - } - --int vc_vchi_sm_resize(VC_VCHI_SM_HANDLE_T handle, VC_SM_RESIZE_T *msg, -- uint32_t *cur_trans_id) -+int vc_vchi_sm_resize(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_resize_t *msg, -+ uint32_t *cur_trans_id) - { - return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_RESIZE, - msg, sizeof(*msg), 0, 0, cur_trans_id, 1); -@@ -492,7 +495,8 @@ int vc_vchi_sm_walk_alloc(VC_VCHI_SM_HANDLE_T handle) - 0, 0, 0, 0, 0, 0); - } - --int vc_vchi_sm_clean_up(VC_VCHI_SM_HANDLE_T handle, VC_SM_ACTION_CLEAN_T *msg) -+int vc_vchi_sm_clean_up(VC_VCHI_SM_HANDLE_T handle, -+ struct vc_sm_action_clean_t *msg) - { - return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_ACTION_CLEAN, - msg, sizeof(*msg), 0, 0, 0, 0); -diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h -index 562217831fa744db99d94295c1c5a46f3a4780fb..f97cddf14881535c7f62a2ce0166a5eb7e3fad6d 100644 ---- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h -+++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h -@@ -41,31 +41,32 @@ int vc_vchi_sm_stop(VC_VCHI_SM_HANDLE_T *handle); - * return the result of this allocation (which upon success will be a pointer - * to some memory in videocore space). - */ --int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, -- VC_SM_ALLOC_T *alloc, -- VC_SM_ALLOC_RESULT_T *alloc_result, uint32_t *trans_id); -+int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_alloc_t *alloc, -+ struct vc_sm_alloc_result_t *alloc_result, -+ uint32_t *trans_id); - - /* - * Ask the shared memory service to free up some memory that was previously - * allocated by the vc_vchi_sm_alloc function call. - */ - int vc_vchi_sm_free(VC_VCHI_SM_HANDLE_T handle, -- VC_SM_FREE_T *free, uint32_t *trans_id); -+ struct vc_sm_free_t *free, uint32_t *trans_id); - - /* - * Ask the shared memory service to lock up some memory that was previously - * allocated by the vc_vchi_sm_alloc function call. - */ - int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, -- VC_SM_LOCK_UNLOCK_T *lock_unlock, -- VC_SM_LOCK_RESULT_T *lock_result, uint32_t *trans_id); -+ struct vc_sm_lock_unlock_t *lock_unlock, -+ struct vc_sm_lock_result_t *lock_result, -+ uint32_t *trans_id); - - /* - * Ask the shared memory service to unlock some memory that was previously - * allocated by the vc_vchi_sm_alloc function call. - */ - int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, -- VC_SM_LOCK_UNLOCK_T *lock_unlock, -+ struct vc_sm_lock_unlock_t *lock_unlock, - uint32_t *trans_id, uint8_t wait_reply); - - /* -@@ -73,7 +74,7 @@ int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, - * allocated by the vc_vchi_sm_alloc function call. - */ - int vc_vchi_sm_resize(VC_VCHI_SM_HANDLE_T handle, -- VC_SM_RESIZE_T *resize, uint32_t *trans_id); -+ struct vc_sm_resize_t *resize, uint32_t *trans_id); - - /* - * Walk the allocated resources on the videocore side, the allocation will -@@ -87,7 +88,7 @@ int vc_vchi_sm_walk_alloc(VC_VCHI_SM_HANDLE_T handle); - * in a bad state of some sort. - */ - int vc_vchi_sm_clean_up(VC_VCHI_SM_HANDLE_T handle, -- VC_SM_ACTION_CLEAN_T *action_clean); -+ struct vc_sm_action_clean_t *action_clean); - - /* - * Import a contiguous block of memory and wrap it in a GPU MEM_HANDLE_T. -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index 520f343f3f4b828f3045fc4ff3fb0d8a68bb1f9d..e67d96d54ad82bd51393268c830a51169f62b097 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -170,7 +170,7 @@ struct SM_PRIV_DATA_T { - struct SM_PDE_T dir_res; /* Debug fs resource sub-tree. */ - - int restart_sys; /* Tracks restart on interrupt. */ -- VC_SM_MSG_TYPE int_action; /* Interrupted action. */ -+ enum vc_sm_msg_type int_action; /* Interrupted action. */ - uint32_t int_trans_id; /* Interrupted transaction. */ - - }; -@@ -928,7 +928,7 @@ static void vmcs_sm_release_resource(struct SM_RESOURCE_T *resource, int force) - - /* Free up the videocore allocated resource. */ - if (resource->res_handle) { -- VC_SM_FREE_T free = { -+ struct vc_sm_free_t free = { - resource->res_handle, (uint32_t)resource->res_base_mem - }; - int status = vc_vchi_sm_free(sm_state->sm_handle, &free, -@@ -1123,7 +1123,7 @@ static int vc_sm_release(struct inode *inode, struct file *file) - pr_debug("[%s]: using private data %p\n", __func__, file_data); - - if (file_data->restart_sys == -EINTR) { -- VC_SM_ACTION_CLEAN_T action_clean; -+ struct vc_sm_action_clean_t action_clean; - - pr_debug("[%s]: releasing following EINTR on %u (trans_id: %u) (likely due to signal)...\n", - __func__, file_data->int_action, -@@ -1189,8 +1189,8 @@ static int vcsm_vma_fault(struct vm_fault *vmf) - /* Lock the resource if necessary. - */ - if (!resource->lock_count) { -- VC_SM_LOCK_UNLOCK_T lock_unlock; -- VC_SM_LOCK_RESULT_T lock_result; -+ struct vc_sm_lock_unlock_t lock_unlock; -+ struct vc_sm_lock_result_t lock_result; - int status; - - lock_unlock.res_handle = resource->res_handle; -@@ -1465,8 +1465,8 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, - int ret = 0; - int status; - struct SM_RESOURCE_T *resource; -- VC_SM_ALLOC_T alloc = { 0 }; -- VC_SM_ALLOC_RESULT_T result = { 0 }; -+ struct vc_sm_alloc_t alloc = { 0 }; -+ struct vc_sm_alloc_result_t result = { 0 }; - enum vmcs_sm_cache_e cached = ioparam->cached; - bool map = false; - -@@ -1671,7 +1671,7 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, - { - int ret = 0; - int status; -- VC_SM_RESIZE_T resize; -+ struct vc_sm_resize_t resize; - struct SM_RESOURCE_T *resource; - - /* Locate resource from GUID. -@@ -1761,8 +1761,8 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, - unsigned int vc_addr) - { - int status; -- VC_SM_LOCK_UNLOCK_T lock; -- VC_SM_LOCK_RESULT_T result; -+ struct vc_sm_lock_unlock_t lock; -+ struct vc_sm_lock_result_t result; - struct SM_RESOURCE_T *resource; - int ret = 0; - struct sm_mmap *map, *map_tmp; -@@ -1935,7 +1935,7 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, - int flush, int wait_reply, int no_vc_unlock) - { - int status; -- VC_SM_LOCK_UNLOCK_T unlock; -+ struct vc_sm_lock_unlock_t unlock; - struct sm_mmap *map, *map_tmp; - struct SM_RESOURCE_T *resource; - int ret = 0; -@@ -2261,7 +2261,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - - /* Action is a re-post of a previously interrupted action? */ - if (file_data->restart_sys == -EINTR) { -- VC_SM_ACTION_CLEAN_T action_clean; -+ struct vc_sm_action_clean_t action_clean; - - pr_debug("[%s]: clean up of action %u (trans_id: %u) following EINTR\n", - __func__, file_data->int_action, -@@ -3359,7 +3359,7 @@ static int bcm2835_vcsm_remove(struct platform_device *pdev) - - #if defined(__KERNEL__) - /* Allocate a shared memory handle and block. */ --int vc_sm_alloc(VC_SM_ALLOC_T *alloc, int *handle) -+int vc_sm_alloc(struct vc_sm_alloc_t *alloc, int *handle) - { - struct vmcs_sm_ioctl_alloc ioparam = { 0 }; - int ret; - -From e590f31b520dd4cac2556c30ae4f7cce04415894 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 1 Sep 2017 16:29:53 +0100 -Subject: [PATCH 179/199] vcsm: Correct block comment style on licence headers. - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vc_sm_defs.h | 28 +++++++++++++++------------- - drivers/char/broadcom/vc_sm/vc_sm_knl.h | 28 +++++++++++++++------------- - drivers/char/broadcom/vc_sm/vc_vchi_sm.c | 28 +++++++++++++++------------- - drivers/char/broadcom/vc_sm/vc_vchi_sm.h | 28 +++++++++++++++------------- - drivers/char/broadcom/vc_sm/vmcs_sm.c | 28 +++++++++++++++------------- - 5 files changed, 75 insertions(+), 65 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vc_sm_defs.h b/drivers/char/broadcom/vc_sm/vc_sm_defs.h -index 29057db43404716406b06e3c3745e3d82219be16..8242e8ef28e445ae132187d02c74448b0226c1a4 100644 ---- a/drivers/char/broadcom/vc_sm/vc_sm_defs.h -+++ b/drivers/char/broadcom/vc_sm/vc_sm_defs.h -@@ -1,16 +1,18 @@ --/***************************************************************************** --* Copyright 2011 Broadcom Corporation. All rights reserved. --* --* Unless you and Broadcom execute a separate written software license --* agreement governing use of this software, this software is licensed to you --* under the terms of the GNU General Public License version 2, available at --* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). --* --* Notwithstanding the above, under no circumstances may you combine this --* software in any way with any other Broadcom software provided under a --* license other than the GPL, without Broadcom's express prior written --* consent. --*****************************************************************************/ -+/* -+ **************************************************************************** -+ * Copyright 2011 Broadcom Corporation. All rights reserved. -+ * -+ * Unless you and Broadcom execute a separate written software license -+ * agreement governing use of this software, this software is licensed to you -+ * under the terms of the GNU General Public License version 2, available at -+ * http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). -+ * -+ * Notwithstanding the above, under no circumstances may you combine this -+ * software in any way with any other Broadcom software provided under a -+ * license other than the GPL, without Broadcom's express prior written -+ * consent. -+ **************************************************************************** -+ */ - - #ifndef __VC_SM_DEFS_H__INCLUDED__ - #define __VC_SM_DEFS_H__INCLUDED__ -diff --git a/drivers/char/broadcom/vc_sm/vc_sm_knl.h b/drivers/char/broadcom/vc_sm/vc_sm_knl.h -index 3c684ddde5c1fac5c726a71deec305f7588f0200..8252d13999a78609fcc7e1bbe83307e2b1c1f8f1 100644 ---- a/drivers/char/broadcom/vc_sm/vc_sm_knl.h -+++ b/drivers/char/broadcom/vc_sm/vc_sm_knl.h -@@ -1,16 +1,18 @@ --/***************************************************************************** --* Copyright 2011 Broadcom Corporation. All rights reserved. --* --* Unless you and Broadcom execute a separate written software license --* agreement governing use of this software, this software is licensed to you --* under the terms of the GNU General Public License version 2, available at --* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). --* --* Notwithstanding the above, under no circumstances may you combine this --* software in any way with any other Broadcom software provided under a --* license other than the GPL, without Broadcom's express prior written --* consent. --*****************************************************************************/ -+/* -+ **************************************************************************** -+ * Copyright 2011 Broadcom Corporation. All rights reserved. -+ * -+ * Unless you and Broadcom execute a separate written software license -+ * agreement governing use of this software, this software is licensed to you -+ * under the terms of the GNU General Public License version 2, available at -+ * http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). -+ * -+ * Notwithstanding the above, under no circumstances may you combine this -+ * software in any way with any other Broadcom software provided under a -+ * license other than the GPL, without Broadcom's express prior written -+ * consent. -+ **************************************************************************** -+ */ - - #ifndef __VC_SM_KNL_H__INCLUDED__ - #define __VC_SM_KNL_H__INCLUDED__ -diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c -index a702b0c16478c87e28be3905a14dcd992e6c05cb..76678b2f84eb541aa816531f222b5b10f4e25382 100644 ---- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c -+++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c -@@ -1,16 +1,18 @@ --/***************************************************************************** --* Copyright 2011-2012 Broadcom Corporation. All rights reserved. --* --* Unless you and Broadcom execute a separate written software license --* agreement governing use of this software, this software is licensed to you --* under the terms of the GNU General Public License version 2, available at --* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). --* --* Notwithstanding the above, under no circumstances may you combine this --* software in any way with any other Broadcom software provided under a --* license other than the GPL, without Broadcom's express prior written --* consent. --*****************************************************************************/ -+/* -+ **************************************************************************** -+ * Copyright 2011-2012 Broadcom Corporation. All rights reserved. -+ * -+ * Unless you and Broadcom execute a separate written software license -+ * agreement governing use of this software, this software is licensed to you -+ * under the terms of the GNU General Public License version 2, available at -+ * http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). -+ * -+ * Notwithstanding the above, under no circumstances may you combine this -+ * software in any way with any other Broadcom software provided under a -+ * license other than the GPL, without Broadcom's express prior written -+ * consent. -+ **************************************************************************** -+ */ - - /* ---- Include Files ----------------------------------------------------- */ - #include -diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h -index f97cddf14881535c7f62a2ce0166a5eb7e3fad6d..110db20ef517af9589616e5892c5b48681e62966 100644 ---- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h -+++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h -@@ -1,16 +1,18 @@ --/***************************************************************************** --* Copyright 2011 Broadcom Corporation. All rights reserved. --* --* Unless you and Broadcom execute a separate written software license --* agreement governing use of this software, this software is licensed to you --* under the terms of the GNU General Public License version 2, available at --* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). --* --* Notwithstanding the above, under no circumstances may you combine this --* software in any way with any other Broadcom software provided under a --* license other than the GPL, without Broadcom's express prior written --* consent. --*****************************************************************************/ -+/* -+ **************************************************************************** -+ * Copyright 2011 Broadcom Corporation. All rights reserved. -+ * -+ * Unless you and Broadcom execute a separate written software license -+ * agreement governing use of this software, this software is licensed to you -+ * under the terms of the GNU General Public License version 2, available at -+ * http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). -+ * -+ * Notwithstanding the above, under no circumstances may you combine this -+ * software in any way with any other Broadcom software provided under a -+ * license other than the GPL, without Broadcom's express prior written -+ * consent. -+ **************************************************************************** -+ */ - - #ifndef __VC_VCHI_SM_H__INCLUDED__ - #define __VC_VCHI_SM_H__INCLUDED__ -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index e67d96d54ad82bd51393268c830a51169f62b097..b121de3c2502e3d7fb6ef1c1b5e4d797d1f5d233 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -1,16 +1,18 @@ --/***************************************************************************** --* Copyright 2011-2012 Broadcom Corporation. All rights reserved. --* --* Unless you and Broadcom execute a separate written software license --* agreement governing use of this software, this software is licensed to you --* under the terms of the GNU General Public License version 2, available at --* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). --* --* Notwithstanding the above, under no circumstances may you combine this --* software in any way with any other Broadcom software provided under a --* license other than the GPL, without Broadcom's express prior written --* consent. --*****************************************************************************/ -+/* -+ **************************************************************************** -+ * Copyright 2011-2012 Broadcom Corporation. All rights reserved. -+ * -+ * Unless you and Broadcom execute a separate written software license -+ * agreement governing use of this software, this software is licensed to you -+ * under the terms of the GNU General Public License version 2, available at -+ * http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). -+ * -+ * Notwithstanding the above, under no circumstances may you combine this -+ * software in any way with any other Broadcom software provided under a -+ * license other than the GPL, without Broadcom's express prior written -+ * consent. -+ **************************************************************************** -+ */ - - /* ---- Include Files ----------------------------------------------------- */ - - -From 8319293c88f09bc266aee8e0451a5e7934587903 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 1 Sep 2017 16:34:13 +0100 -Subject: [PATCH 180/199] vcsm: Fix block comment formatting - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vc_sm_defs.h | 6 ++++-- - drivers/char/broadcom/vc_sm/vc_vchi_sm.h | 10 +++++----- - 2 files changed, 9 insertions(+), 7 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vc_sm_defs.h b/drivers/char/broadcom/vc_sm/vc_sm_defs.h -index 8242e8ef28e445ae132187d02c74448b0226c1a4..de6afe9f65af45582c79a62abd41c688274ad8f2 100644 ---- a/drivers/char/broadcom/vc_sm/vc_sm_defs.h -+++ b/drivers/char/broadcom/vc_sm/vc_sm_defs.h -@@ -151,8 +151,10 @@ struct vc_sm_lock_result_t { - uint32_t res_handle; - /* Pointer to resource buffer */ - uint32_t res_mem; -- /* Pointer to former resource buffer if the memory -- * was reallocated */ -+ /* -+ * Pointer to former resource buffer if the memory -+ * was reallocated -+ */ - uint32_t res_old_mem; - - }; -diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h -index 110db20ef517af9589616e5892c5b48681e62966..48e721c7f2e4ac5abe376a8481e01b0bbcc6d3ad 100644 ---- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h -+++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h -@@ -23,7 +23,7 @@ - - /* - * Forward declare. --*/ -+ */ - typedef struct sm_instance *VC_VCHI_SM_HANDLE_T; - - /* -@@ -57,7 +57,7 @@ int vc_vchi_sm_free(VC_VCHI_SM_HANDLE_T handle, - /* - * Ask the shared memory service to lock up some memory that was previously - * allocated by the vc_vchi_sm_alloc function call. --*/ -+ */ - int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, - struct vc_sm_lock_unlock_t *lock_unlock, - struct vc_sm_lock_result_t *lock_result, -@@ -66,7 +66,7 @@ int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, - /* - * Ask the shared memory service to unlock some memory that was previously - * allocated by the vc_vchi_sm_alloc function call. --*/ -+ */ - int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, - struct vc_sm_lock_unlock_t *lock_unlock, - uint32_t *trans_id, uint8_t wait_reply); -@@ -74,7 +74,7 @@ int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, - /* - * Ask the shared memory service to resize some memory that was previously - * allocated by the vc_vchi_sm_alloc function call. --*/ -+ */ - int vc_vchi_sm_resize(VC_VCHI_SM_HANDLE_T handle, - struct vc_sm_resize_t *resize, uint32_t *trans_id); - -@@ -82,7 +82,7 @@ int vc_vchi_sm_resize(VC_VCHI_SM_HANDLE_T handle, - * Walk the allocated resources on the videocore side, the allocation will - * show up in the log. This is purely for debug/information and takes no - * specific actions. --*/ -+ */ - int vc_vchi_sm_walk_alloc(VC_VCHI_SM_HANDLE_T handle); - - /* - -From e5473bf342fcd4a4e3b3fd80c057d21a41f84c98 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 1 Sep 2017 16:50:29 +0100 -Subject: [PATCH 181/199] vcsm: Remove typedef of VC_VCHI_SM_HANDLE_T - -Replaced with struct sm_instance *. - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vc_vchi_sm.c | 22 +++++++++++----------- - drivers/char/broadcom/vc_sm/vc_vchi_sm.h | 22 +++++++++++----------- - drivers/char/broadcom/vc_sm/vmcs_sm.c | 2 +- - 3 files changed, 23 insertions(+), 23 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c -index 76678b2f84eb541aa816531f222b5b10f4e25382..cc1752e9d42ebd1785cbe7dc0607b7e9c03f49de 100644 ---- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c -+++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c -@@ -257,7 +257,7 @@ static void vc_sm_vchi_callback(void *param, - } - } - --VC_VCHI_SM_HANDLE_T vc_vchi_sm_init(VCHI_INSTANCE_T vchi_instance, -+struct sm_instance *vc_vchi_sm_init(VCHI_INSTANCE_T vchi_instance, - VCHI_CONNECTION_T **vchi_connections, - uint32_t num_connections) - { -@@ -341,7 +341,7 @@ VC_VCHI_SM_HANDLE_T vc_vchi_sm_init(VCHI_INSTANCE_T vchi_instance, - return NULL; - } - --int vc_vchi_sm_stop(VC_VCHI_SM_HANDLE_T *handle) -+int vc_vchi_sm_stop(struct sm_instance **handle) - { - struct sm_instance *instance; - uint32_t i; -@@ -375,7 +375,7 @@ int vc_vchi_sm_stop(VC_VCHI_SM_HANDLE_T *handle) - return -EINVAL; - } - --int vc_vchi_sm_send_msg(VC_VCHI_SM_HANDLE_T handle, -+int vc_vchi_sm_send_msg(struct sm_instance *handle, - enum vc_sm_msg_type msg_id, - void *msg, uint32_t msg_size, - void *result, uint32_t result_size, -@@ -447,7 +447,7 @@ int vc_vchi_sm_send_msg(VC_VCHI_SM_HANDLE_T handle, - return status; - } - --int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_alloc_t *msg, -+int vc_vchi_sm_alloc(struct sm_instance *handle, struct vc_sm_alloc_t *msg, - struct vc_sm_alloc_result_t *result, - uint32_t *cur_trans_id) - { -@@ -456,14 +456,14 @@ int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_alloc_t *msg, - cur_trans_id, 1); - } - --int vc_vchi_sm_free(VC_VCHI_SM_HANDLE_T handle, -+int vc_vchi_sm_free(struct sm_instance *handle, - struct vc_sm_free_t *msg, uint32_t *cur_trans_id) - { - return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_FREE, - msg, sizeof(*msg), 0, 0, cur_trans_id, 0); - } - --int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, -+int vc_vchi_sm_lock(struct sm_instance *handle, - struct vc_sm_lock_unlock_t *msg, - struct vc_sm_lock_result_t *result, - uint32_t *cur_trans_id) -@@ -473,7 +473,7 @@ int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, - cur_trans_id, 1); - } - --int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, -+int vc_vchi_sm_unlock(struct sm_instance *handle, - struct vc_sm_lock_unlock_t *msg, - uint32_t *cur_trans_id, uint8_t wait_reply) - { -@@ -484,27 +484,27 @@ int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, - wait_reply); - } - --int vc_vchi_sm_resize(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_resize_t *msg, -+int vc_vchi_sm_resize(struct sm_instance *handle, struct vc_sm_resize_t *msg, - uint32_t *cur_trans_id) - { - return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_RESIZE, - msg, sizeof(*msg), 0, 0, cur_trans_id, 1); - } - --int vc_vchi_sm_walk_alloc(VC_VCHI_SM_HANDLE_T handle) -+int vc_vchi_sm_walk_alloc(struct sm_instance *handle) - { - return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_WALK_ALLOC, - 0, 0, 0, 0, 0, 0); - } - --int vc_vchi_sm_clean_up(VC_VCHI_SM_HANDLE_T handle, -+int vc_vchi_sm_clean_up(struct sm_instance *handle, - struct vc_sm_action_clean_t *msg) - { - return vc_vchi_sm_send_msg(handle, VC_SM_MSG_TYPE_ACTION_CLEAN, - msg, sizeof(*msg), 0, 0, 0, 0); - } - --int vc_vchi_sm_import(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_import *msg, -+int vc_vchi_sm_import(struct sm_instance *handle, struct vc_sm_import *msg, - struct vc_sm_import_result *result, - uint32_t *cur_trans_id) - { -diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h -index 48e721c7f2e4ac5abe376a8481e01b0bbcc6d3ad..abe4ed15836f2be756083d3fdb4edb544dacc1a6 100644 ---- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h -+++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h -@@ -24,26 +24,26 @@ - /* - * Forward declare. - */ --typedef struct sm_instance *VC_VCHI_SM_HANDLE_T; -+struct sm_instance; - - /* - * Initialize the shared memory service, opens up vchi connection to talk to it. - */ --VC_VCHI_SM_HANDLE_T vc_vchi_sm_init(VCHI_INSTANCE_T vchi_instance, -+struct sm_instance *vc_vchi_sm_init(VCHI_INSTANCE_T vchi_instance, - VCHI_CONNECTION_T **vchi_connections, - uint32_t num_connections); - - /* - * Terminates the shared memory service. - */ --int vc_vchi_sm_stop(VC_VCHI_SM_HANDLE_T *handle); -+int vc_vchi_sm_stop(struct sm_instance **handle); - - /* - * Ask the shared memory service to allocate some memory on videocre and - * return the result of this allocation (which upon success will be a pointer - * to some memory in videocore space). - */ --int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_alloc_t *alloc, -+int vc_vchi_sm_alloc(struct sm_instance *handle, struct vc_sm_alloc_t *alloc, - struct vc_sm_alloc_result_t *alloc_result, - uint32_t *trans_id); - -@@ -51,14 +51,14 @@ int vc_vchi_sm_alloc(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_alloc_t *alloc, - * Ask the shared memory service to free up some memory that was previously - * allocated by the vc_vchi_sm_alloc function call. - */ --int vc_vchi_sm_free(VC_VCHI_SM_HANDLE_T handle, -+int vc_vchi_sm_free(struct sm_instance *handle, - struct vc_sm_free_t *free, uint32_t *trans_id); - - /* - * Ask the shared memory service to lock up some memory that was previously - * allocated by the vc_vchi_sm_alloc function call. - */ --int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, -+int vc_vchi_sm_lock(struct sm_instance *handle, - struct vc_sm_lock_unlock_t *lock_unlock, - struct vc_sm_lock_result_t *lock_result, - uint32_t *trans_id); -@@ -67,7 +67,7 @@ int vc_vchi_sm_lock(VC_VCHI_SM_HANDLE_T handle, - * Ask the shared memory service to unlock some memory that was previously - * allocated by the vc_vchi_sm_alloc function call. - */ --int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, -+int vc_vchi_sm_unlock(struct sm_instance *handle, - struct vc_sm_lock_unlock_t *lock_unlock, - uint32_t *trans_id, uint8_t wait_reply); - -@@ -75,7 +75,7 @@ int vc_vchi_sm_unlock(VC_VCHI_SM_HANDLE_T handle, - * Ask the shared memory service to resize some memory that was previously - * allocated by the vc_vchi_sm_alloc function call. - */ --int vc_vchi_sm_resize(VC_VCHI_SM_HANDLE_T handle, -+int vc_vchi_sm_resize(struct sm_instance *handle, - struct vc_sm_resize_t *resize, uint32_t *trans_id); - - /* -@@ -83,19 +83,19 @@ int vc_vchi_sm_resize(VC_VCHI_SM_HANDLE_T handle, - * show up in the log. This is purely for debug/information and takes no - * specific actions. - */ --int vc_vchi_sm_walk_alloc(VC_VCHI_SM_HANDLE_T handle); -+int vc_vchi_sm_walk_alloc(struct sm_instance *handle); - - /* - * Clean up following a previously interrupted action which left the system - * in a bad state of some sort. - */ --int vc_vchi_sm_clean_up(VC_VCHI_SM_HANDLE_T handle, -+int vc_vchi_sm_clean_up(struct sm_instance *handle, - struct vc_sm_action_clean_t *action_clean); - - /* - * Import a contiguous block of memory and wrap it in a GPU MEM_HANDLE_T. - */ --int vc_vchi_sm_import(VC_VCHI_SM_HANDLE_T handle, struct vc_sm_import *msg, -+int vc_vchi_sm_import(struct sm_instance *handle, struct vc_sm_import *msg, - struct vc_sm_import_result *result, - uint32_t *cur_trans_id); - -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index b121de3c2502e3d7fb6ef1c1b5e4d797d1f5d233..8c13dab0f59c959226194214d36d9b5c8c6b1818 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -181,7 +181,7 @@ struct SM_PRIV_DATA_T { - */ - struct SM_STATE_T { - struct platform_device *pdev; -- VC_VCHI_SM_HANDLE_T sm_handle; /* Handle for videocore service. */ -+ struct sm_instance *sm_handle; /* Handle for videocore service. */ - struct dentry *dir_root; /* Debug fs entries root. */ - struct dentry *dir_alloc; /* Debug fs entries allocations. */ - struct SM_PDE_T dir_stats; /* Debug fs entries statistics sub-tree. */ - -From 4ca3276fb4a30f6c1f44d41faa1769cef1e3c90c Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 1 Sep 2017 16:55:08 +0100 -Subject: [PATCH 182/199] vcsm: "unsigned int" preferred over "unsigned" fixed. - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vc_vchi_sm.c | 3 ++- - drivers/char/broadcom/vc_sm/vmcs_sm.c | 2 +- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c -index cc1752e9d42ebd1785cbe7dc0607b7e9c03f49de..b9f65e34957506ba0f93d0d0ecd0894ee5be39b5 100644 ---- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c -+++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c -@@ -327,7 +327,8 @@ struct sm_instance *vc_vchi_sm_init(VCHI_INSTANCE_T vchi_instance, - set_user_nice(instance->io_thread, -10); - wake_up_process(instance->io_thread); - -- pr_debug("%s: success - instance 0x%x", __func__, (unsigned)instance); -+ pr_debug("%s: success - instance 0x%x", __func__, -+ (unsigned int)instance); - return instance; - - err_close_services: -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index 8c13dab0f59c959226194214d36d9b5c8c6b1818..8bea643957622cb19b9daac124447fe90558e47c 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -227,7 +227,7 @@ static const char *const sm_cache_map_vector[] = { - - /* ---- Private Functions ------------------------------------------------ */ - --static inline unsigned vcaddr_to_pfn(unsigned long vc_addr) -+static inline unsigned int vcaddr_to_pfn(unsigned long vc_addr) - { - unsigned long pfn = vc_addr & 0x3FFFFFFF; - pfn += mm_vc_mem_phys_addr; - -From 2d10ce1a39ed212bf01e9431578d970874607bdb Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 1 Sep 2017 16:59:49 +0100 -Subject: [PATCH 183/199] vcsm: Fix blank lines after declarations. - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vc_vchi_sm.c | 1 + - drivers/char/broadcom/vc_sm/vmcs_sm.c | 7 +++++++ - 2 files changed, 8 insertions(+) - -diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c -index b9f65e34957506ba0f93d0d0ecd0894ee5be39b5..f8b909a09adb0743ed5d55dadf8fbf2fef055197 100644 ---- a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c -+++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c -@@ -362,6 +362,7 @@ int vc_vchi_sm_stop(struct sm_instance **handle) - /* Close all VCHI service connections */ - for (i = 0; i < instance->num_connections; i++) { - int32_t success; -+ - vchi_service_use(instance->vchi_handle[i]); - - success = vchi_service_close(instance->vchi_handle[i]); -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index 8bea643957622cb19b9daac124447fe90558e47c..abee526d6fbbddb8c31096cafdcd69814590d750 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -230,6 +230,7 @@ static const char *const sm_cache_map_vector[] = { - static inline unsigned int vcaddr_to_pfn(unsigned long vc_addr) - { - unsigned long pfn = vc_addr & 0x3FFFFFFF; -+ - pfn += mm_vc_mem_phys_addr; - pfn >>= PAGE_SHIFT; - return pfn; -@@ -1441,9 +1442,11 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) - if (resource->map) { - /* We don't use vmf->pgoff since that has the fake offset */ - unsigned long addr; -+ - for (addr = vma->vm_start; addr < vma->vm_end; addr += PAGE_SIZE) { - /* Finally, remap it */ - unsigned long pfn = (unsigned long)resource->res_base_mem & 0x3FFFFFFF; -+ - pfn += mm_vc_mem_phys_addr; - pfn += addr - vma->vm_start; - pfn >>= PAGE_SHIFT; -@@ -1974,6 +1977,7 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, - /* Flush if requested */ - if (resource->res_cached && flush) { - dma_addr_t phys_addr = 0; -+ - resource->res_stats[FLUSH]++; - - phys_addr = -@@ -1988,6 +1992,7 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, - if (map->vma) { - unsigned long start; - unsigned long end; -+ - start = map->vma->vm_start; - end = map->vma->vm_end; - -@@ -3022,6 +3027,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - if ((resource != NULL) && resource->res_cached) { - unsigned long base = ioparam.s[i].addr & ~(PAGE_SIZE-1); - unsigned long end = (ioparam.s[i].addr + ioparam.s[i].size + PAGE_SIZE-1) & ~(PAGE_SIZE-1); -+ - resource->res_stats[ioparam.s[i].cmd == 1 ? INVALID:FLUSH]++; - - /* L1/L2 cache flush */ -@@ -3071,6 +3077,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - - for (i=0; iblock_count; ++j) { - - - -From be8605f2967a6a59ae6b32a9381717240980616a Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 1 Sep 2017 17:01:11 +0100 -Subject: [PATCH 184/199] vcsm: Fix erroneous space in 'if' statement. - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vmcs_sm.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index abee526d6fbbddb8c31096cafdcd69814590d750..6d4729980ebf7dd7b76444dcabf3c85477b51fd4 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -1476,7 +1476,7 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, - bool map = false; - - /* flag to requst buffer is mapped up front, rather than lazily */ -- if (cached & 0x80 ) { -+ if (cached & 0x80) { - map = true; - cached &= ~0x80; - } - -From 520fa3d662564695842f90684b77e5de587e90b8 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 1 Sep 2017 17:21:09 +0100 -Subject: [PATCH 185/199] vcsm: Fix lots of block quote formatting issues - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vmcs_sm.c | 563 ++++++++++++++-------------------- - 1 file changed, 231 insertions(+), 332 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index 6d4729980ebf7dd7b76444dcabf3c85477b51fd4..f93f18d3c24e43c9cf79e33f11cba9d1806f3124 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -61,8 +61,7 @@ - #define VC_SM_DEBUG "debug" - #define VC_SM_WRITE_BUF_SIZE 128 - --/* Statistics tracked per resource and globally. --*/ -+/* Statistics tracked per resource and globally. */ - enum SM_STATS_T { - /* Attempt. */ - ALLOC, -@@ -109,27 +108,25 @@ struct SM_PDE_T { - - }; - --/* Single resource allocation tracked for all devices. --*/ -+/* Single resource allocation tracked for all devices. */ - struct sm_mmap { - struct list_head map_list; /* Linked list of maps. */ - - struct SM_RESOURCE_T *resource; /* Pointer to the resource. */ - -- pid_t res_pid; /* PID owning that resource. */ -+ pid_t res_pid; /* PID owning that resource. */ - unsigned int res_vc_hdl; /* Resource handle (videocore). */ - unsigned int res_usr_hdl; /* Resource handle (user). */ - - long unsigned int res_addr; /* Mapped virtual address. */ - struct vm_area_struct *vma; /* VM area for this mapping. */ -- unsigned int ref_count; /* Reference count to this vma. */ -+ unsigned int ref_count; /* Reference count to this vma. */ - - /* Used to link maps associated with a resource. */ - struct list_head resource_map_list; - }; - --/* Single resource allocation tracked for each opened device. --*/ -+/* Single resource allocation tracked for each opened device. */ - struct SM_RESOURCE_T { - struct list_head resource_list; /* List of resources. */ - struct list_head global_resource_list; /* Global list of resources. */ -@@ -160,8 +157,7 @@ struct SM_RESOURCE_T { - bool map; /* whether to map pages up front */ - }; - --/* Private file data associated with each opened device. --*/ -+/* Private file data associated with each opened device. */ - struct SM_PRIV_DATA_T { - struct list_head resource_list; /* List of resources. */ - -@@ -177,8 +173,7 @@ struct SM_PRIV_DATA_T { - - }; - --/* Global state information. --*/ -+/* Global state information. */ - struct SM_STATE_T { - struct platform_device *pdev; - struct sm_instance *sm_handle; /* Handle for videocore service. */ -@@ -236,9 +231,10 @@ static inline unsigned int vcaddr_to_pfn(unsigned long vc_addr) - return pfn; - } - --/* Carries over to the state statistics the statistics once owned by a deceased --** resource. --*/ -+/* -+ * Carries over to the state statistics the statistics once owned by a deceased -+ * resource. -+ */ - static void vc_sm_resource_deceased(struct SM_RESOURCE_T *p_res, int terminated) - { - if (sm_state != NULL) { -@@ -262,9 +258,10 @@ static void vc_sm_resource_deceased(struct SM_RESOURCE_T *p_res, int terminated) - } - } - --/* Fetch a videocore handle corresponding to a mapping of the pid+address --** returns 0 (ie NULL) if no such handle exists in the global map. --*/ -+/* -+ * Fetch a videocore handle corresponding to a mapping of the pid+address -+ * returns 0 (ie NULL) if no such handle exists in the global map. -+ */ - static unsigned int vmcs_sm_vc_handle_from_pid_and_address(unsigned int pid, - unsigned int addr) - { -@@ -276,8 +273,7 @@ static unsigned int vmcs_sm_vc_handle_from_pid_and_address(unsigned int pid, - - mutex_lock(&(sm_state->map_lock)); - -- /* Lookup the resource. -- */ -+ /* Lookup the resource. */ - if (!list_empty(&sm_state->map_list)) { - list_for_each_entry(map, &sm_state->map_list, map_list) { - if (map->res_pid != pid || map->res_addr != addr) -@@ -295,13 +291,14 @@ static unsigned int vmcs_sm_vc_handle_from_pid_and_address(unsigned int pid, - mutex_unlock(&(sm_state->map_lock)); - - out: -- /* Use a debug log here as it may be a valid situation that we query -- ** for something that is not mapped, we do not want a kernel log each -- ** time around. -- ** -- ** There are other error log that would pop up accordingly if someone -- ** subsequently tries to use something invalid after being told not to -- ** use it... -+ /* -+ * Use a debug log here as it may be a valid situation that we query -+ * for something that is not mapped, we do not want a kernel log each -+ * time around. -+ * -+ * There are other error log that would pop up accordingly if someone -+ * subsequently tries to use something invalid after being told not to -+ * use it... - */ - if (handle == 0) { - pr_debug("[%s]: not a valid map (pid %u, addr %x)\n", -@@ -311,9 +308,10 @@ static unsigned int vmcs_sm_vc_handle_from_pid_and_address(unsigned int pid, - return handle; - } - --/* Fetch a user handle corresponding to a mapping of the pid+address --** returns 0 (ie NULL) if no such handle exists in the global map. --*/ -+/* -+ * Fetch a user handle corresponding to a mapping of the pid+address -+ * returns 0 (ie NULL) if no such handle exists in the global map. -+ */ - static unsigned int vmcs_sm_usr_handle_from_pid_and_address(unsigned int pid, - unsigned int addr) - { -@@ -325,8 +323,7 @@ static unsigned int vmcs_sm_usr_handle_from_pid_and_address(unsigned int pid, - - mutex_lock(&(sm_state->map_lock)); - -- /* Lookup the resource. -- */ -+ /* Lookup the resource. */ - if (!list_empty(&sm_state->map_list)) { - list_for_each_entry(map, &sm_state->map_list, map_list) { - if (map->res_pid != pid || map->res_addr != addr) -@@ -344,7 +341,8 @@ static unsigned int vmcs_sm_usr_handle_from_pid_and_address(unsigned int pid, - mutex_unlock(&(sm_state->map_lock)); - - out: -- /* Use a debug log here as it may be a valid situation that we query -+ /* -+ * Use a debug log here as it may be a valid situation that we query - * for something that is not mapped yet. - * - * There are other error log that would pop up accordingly if someone -@@ -359,9 +357,10 @@ static unsigned int vmcs_sm_usr_handle_from_pid_and_address(unsigned int pid, - } - - #if defined(DO_NOT_USE) --/* Fetch an address corresponding to a mapping of the pid+handle --** returns 0 (ie NULL) if no such address exists in the global map. --*/ -+/* -+ * Fetch an address corresponding to a mapping of the pid+handle -+ * returns 0 (ie NULL) if no such address exists in the global map. -+ */ - static unsigned int vmcs_sm_usr_address_from_pid_and_vc_handle(unsigned int pid, - unsigned int hdl) - { -@@ -373,8 +372,7 @@ static unsigned int vmcs_sm_usr_address_from_pid_and_vc_handle(unsigned int pid, - - mutex_lock(&(sm_state->map_lock)); - -- /* Lookup the resource. -- */ -+ /* Lookup the resource. */ - if (!list_empty(&sm_state->map_list)) { - list_for_each_entry(map, &sm_state->map_list, map_list) { - if (map->res_pid != pid || map->res_vc_hdl != hdl) -@@ -392,13 +390,14 @@ static unsigned int vmcs_sm_usr_address_from_pid_and_vc_handle(unsigned int pid, - mutex_unlock(&(sm_state->map_lock)); - - out: -- /* Use a debug log here as it may be a valid situation that we query -- ** for something that is not mapped, we do not want a kernel log each -- ** time around. -- ** -- ** There are other error log that would pop up accordingly if someone -- ** subsequently tries to use something invalid after being told not to -- ** use it... -+ /* -+ * Use a debug log here as it may be a valid situation that we query -+ * for something that is not mapped, we do not want a kernel log each -+ * time around. -+ * -+ * There are other error log that would pop up accordingly if someone -+ * subsequently tries to use something invalid after being told not to -+ * use it... - */ - if (addr == 0) - pr_debug("[%s]: not a valid map (pid %u, hdl %x)\n", -@@ -408,9 +407,10 @@ static unsigned int vmcs_sm_usr_address_from_pid_and_vc_handle(unsigned int pid, - } - #endif - --/* Fetch an address corresponding to a mapping of the pid+handle --** returns 0 (ie NULL) if no such address exists in the global map. --*/ -+/* -+ * Fetch an address corresponding to a mapping of the pid+handle -+ * returns 0 (ie NULL) if no such address exists in the global map. -+ */ - static unsigned int vmcs_sm_usr_address_from_pid_and_usr_handle(unsigned int - pid, - unsigned int -@@ -424,8 +424,7 @@ static unsigned int vmcs_sm_usr_address_from_pid_and_usr_handle(unsigned int - - mutex_lock(&(sm_state->map_lock)); - -- /* Lookup the resource. -- */ -+ /* Lookup the resource. */ - if (!list_empty(&sm_state->map_list)) { - list_for_each_entry(map, &sm_state->map_list, map_list) { - if (map->res_pid != pid || map->res_usr_hdl != hdl) -@@ -443,7 +442,8 @@ static unsigned int vmcs_sm_usr_address_from_pid_and_usr_handle(unsigned int - mutex_unlock(&(sm_state->map_lock)); - - out: -- /* Use a debug log here as it may be a valid situation that we query -+ /* -+ * Use a debug log here as it may be a valid situation that we query - * for something that is not mapped, we do not want a kernel log each - * time around. - * -@@ -458,19 +458,16 @@ static unsigned int vmcs_sm_usr_address_from_pid_and_usr_handle(unsigned int - return addr; - } - --/* Adds a resource mapping to the global data list. --*/ -+/* Adds a resource mapping to the global data list. */ - static void vmcs_sm_add_map(struct SM_STATE_T *state, - struct SM_RESOURCE_T *resource, struct sm_mmap *map) - { - mutex_lock(&(state->map_lock)); - -- /* Add to the global list of mappings -- */ -+ /* Add to the global list of mappings */ - list_add(&map->map_list, &state->map_list); - -- /* Add to the list of mappings for this resource -- */ -+ /* Add to the list of mappings for this resource */ - list_add(&map->resource_map_list, &resource->map_list); - resource->map_count++; - -@@ -481,20 +478,17 @@ static void vmcs_sm_add_map(struct SM_STATE_T *state, - map->res_usr_hdl, map->res_addr); - } - --/* Removes a resource mapping from the global data list. --*/ -+/* Removes a resource mapping from the global data list. */ - static void vmcs_sm_remove_map(struct SM_STATE_T *state, - struct SM_RESOURCE_T *resource, - struct sm_mmap *map) - { - mutex_lock(&(state->map_lock)); - -- /* Remove from the global list of mappings -- */ -+ /* Remove from the global list of mappings */ - list_del(&map->map_list); - -- /* Remove from the list of mapping for this resource -- */ -+ /* Remove from the list of mapping for this resource */ - list_del(&map->resource_map_list); - if (resource->map_count > 0) - resource->map_count--; -@@ -508,8 +502,7 @@ static void vmcs_sm_remove_map(struct SM_STATE_T *state, - kfree(map); - } - --/* Read callback for the global state proc entry. --*/ -+/* Read callback for the global state proc entry. */ - static int vc_sm_global_state_show(struct seq_file *s, void *v) - { - struct sm_mmap *map = NULL; -@@ -523,8 +516,7 @@ static int vc_sm_global_state_show(struct seq_file *s, void *v) - seq_printf(s, "\nVC-ServiceHandle 0x%x\n", - (unsigned int)sm_state->sm_handle); - -- /* Log all applicable mapping(s). -- */ -+ /* Log all applicable mapping(s). */ - - mutex_lock(&(sm_state->map_lock)); - seq_puts(s, "\nResources\n"); -@@ -591,8 +583,7 @@ static int vc_sm_global_statistics_show(struct seq_file *s, void *v) - { - int ix; - -- /* Global state tracked statistics. -- */ -+ /* Global state tracked statistics. */ - if (sm_state != NULL) { - seq_puts(s, "\nDeceased Resources Statistics\n"); - -@@ -638,8 +629,7 @@ static int vc_sm_global_statistics_show(struct seq_file *s, void *v) - } - - #if 0 --/* Read callback for the statistics proc entry. --*/ -+/* Read callback for the statistics proc entry. */ - static int vc_sm_statistics_show(struct seq_file *s, void *v) - { - int ix; -@@ -654,8 +644,7 @@ static int vc_sm_statistics_show(struct seq_file *s, void *v) - if (file_data == NULL) - return 0; - -- /* Per process statistics. -- */ -+ /* Per process statistics. */ - - seq_printf(s, "\nStatistics for TGID %d\n", file_data->pid); - -@@ -771,9 +760,10 @@ static const struct file_operations vc_sm_debug_fs_fops = { - .release = single_release, - }; - --/* Adds a resource to the private data list which tracks all the allocated --** data. --*/ -+/* -+ * Adds a resource to the private data list which tracks all the allocated -+ * data. -+ */ - static void vmcs_sm_add_resource(struct SM_PRIV_DATA_T *privdata, - struct SM_RESOURCE_T *resource) - { -@@ -787,9 +777,10 @@ static void vmcs_sm_add_resource(struct SM_PRIV_DATA_T *privdata, - resource->res_handle, resource->res_size, resource->res_cached); - } - --/* Locates a resource and acquire a reference on it. --** The resource won't be deleted while there is a reference on it. --*/ -+/* -+ * Locates a resource and acquire a reference on it. -+ * The resource won't be deleted while there is a reference on it. -+ */ - static struct SM_RESOURCE_T *vmcs_sm_acquire_resource(struct SM_PRIV_DATA_T - *private, - unsigned int res_guid) -@@ -816,9 +807,10 @@ static struct SM_RESOURCE_T *vmcs_sm_acquire_resource(struct SM_PRIV_DATA_T - return ret; - } - --/* Locates a resource and acquire a reference on it. --** The resource won't be deleted while there is a reference on it. --*/ -+/* -+ * Locates a resource and acquire a reference on it. -+ * The resource won't be deleted while there is a reference on it. -+ */ - static struct SM_RESOURCE_T *vmcs_sm_acquire_first_resource( - struct SM_PRIV_DATA_T *private) - { -@@ -841,9 +833,10 @@ static struct SM_RESOURCE_T *vmcs_sm_acquire_first_resource( - return ret; - } - --/* Locates a resource and acquire a reference on it. --** The resource won't be deleted while there is a reference on it. --*/ -+/* -+ * Locates a resource and acquire a reference on it. -+ * The resource won't be deleted while there is a reference on it. -+ */ - static struct SM_RESOURCE_T *vmcs_sm_acquire_global_resource(unsigned int - res_guid) - { -@@ -870,9 +863,10 @@ static struct SM_RESOURCE_T *vmcs_sm_acquire_global_resource(unsigned int - return ret; - } - --/* Release a previously acquired resource. --** The resource will be deleted when its refcount reaches 0. --*/ -+/* -+ * Release a previously acquired resource. -+ * The resource will be deleted when its refcount reaches 0. -+ */ - static void vmcs_sm_release_resource(struct SM_RESOURCE_T *resource, int force) - { - struct SM_PRIV_DATA_T *private = resource->private; -@@ -961,16 +955,16 @@ static void vmcs_sm_release_resource(struct SM_RESOURCE_T *resource, int force) - kfree(resource); - } - --/* Dump the map table for the driver. If process is -1, dumps the whole table, --** if process is a valid pid (non -1) dump only the entries associated with the --** pid of interest. --*/ -+/* -+ * Dump the map table for the driver. If process is -1, dumps the whole table, -+ * if process is a valid pid (non -1) dump only the entries associated with the -+ * pid of interest. -+ */ - static void vmcs_sm_host_walk_map_per_pid(int pid) - { - struct sm_mmap *map = NULL; - -- /* Make sure the device was started properly. -- */ -+ /* Make sure the device was started properly. */ - if (sm_state == NULL) { - pr_err("[%s]: invalid device\n", __func__); - return; -@@ -978,8 +972,7 @@ static void vmcs_sm_host_walk_map_per_pid(int pid) - - mutex_lock(&(sm_state->map_lock)); - -- /* Log all applicable mapping(s). -- */ -+ /* Log all applicable mapping(s). */ - if (!list_empty(&sm_state->map_list)) { - list_for_each_entry(map, &sm_state->map_list, map_list) { - if (pid == -1 || map->res_pid == pid) { -@@ -995,15 +988,15 @@ static void vmcs_sm_host_walk_map_per_pid(int pid) - return; - } - --/* Dump the allocation table from host side point of view. This only dumps the --** data allocated for this process/device referenced by the file_data. --*/ -+/* -+ * Dump the allocation table from host side point of view. This only dumps the -+ * data allocated for this process/device referenced by the file_data. -+ */ - static void vmcs_sm_host_walk_alloc(struct SM_PRIV_DATA_T *file_data) - { - struct SM_RESOURCE_T *resource = NULL; - -- /* Make sure the device was started properly. -- */ -+ /* Make sure the device was started properly. */ - if ((sm_state == NULL) || (file_data == NULL)) { - pr_err("[%s]: invalid device\n", __func__); - return; -@@ -1026,8 +1019,7 @@ static void vmcs_sm_host_walk_alloc(struct SM_PRIV_DATA_T *file_data) - return; - } - --/* Create support for private data tracking. --*/ -+/* Create support for private data tracking. */ - static struct SM_PRIV_DATA_T *vc_sm_create_priv_data(pid_t id) - { - char alloc_name[32]; -@@ -1078,15 +1070,15 @@ static struct SM_PRIV_DATA_T *vc_sm_create_priv_data(pid_t id) - return file_data; - } - --/* Open the device. Creates a private state to help track all allocation --** associated with this device. --*/ -+/* -+ * Open the device. Creates a private state to help track all allocation -+ * associated with this device. -+ */ - static int vc_sm_open(struct inode *inode, struct file *file) - { - int ret = 0; - -- /* Make sure the device was started properly. -- */ -+ /* Make sure the device was started properly. */ - if (!sm_state) { - pr_err("[%s]: invalid device\n", __func__); - ret = -EPERM; -@@ -1105,9 +1097,10 @@ static int vc_sm_open(struct inode *inode, struct file *file) - return ret; - } - --/* Close the device. Free up all resources still associated with this device --** at the time. --*/ -+/* -+ * Close the device. Free up all resources still associated with this device -+ * at the time. -+ */ - static int vc_sm_release(struct inode *inode, struct file *file) - { - struct SM_PRIV_DATA_T *file_data = -@@ -1115,8 +1108,7 @@ static int vc_sm_release(struct inode *inode, struct file *file) - struct SM_RESOURCE_T *resource; - int ret = 0; - -- /* Make sure the device was started properly. -- */ -+ /* Make sure the device was started properly. */ - if (sm_state == NULL || file_data == NULL) { - pr_err("[%s]: invalid device\n", __func__); - ret = -EPERM; -@@ -1146,8 +1138,7 @@ static int vc_sm_release(struct inode *inode, struct file *file) - /* Remove the corresponding proc entry. */ - debugfs_remove_recursive(file_data->dir_pid); - -- /* Terminate the private data. -- */ -+ /* Terminate the private data. */ - kfree(file_data); - - out: -@@ -1175,8 +1166,7 @@ static void vcsm_vma_close(struct vm_area_struct *vma) - - map->ref_count--; - -- /* Remove from the map table. -- */ -+ /* Remove from the map table. */ - if (map->ref_count == 0) - vmcs_sm_remove_map(sm_state, map->resource, map); - } -@@ -1189,8 +1179,7 @@ static int vcsm_vma_fault(struct vm_fault *vmf) - unsigned long pfn; - int ret = 0; - -- /* Lock the resource if necessary. -- */ -+ /* Lock the resource if necessary. */ - if (!resource->lock_count) { - struct vc_sm_lock_unlock_t lock_unlock; - struct vc_sm_lock_result_t lock_result; -@@ -1203,8 +1192,7 @@ static int vcsm_vma_fault(struct vm_fault *vmf) - __func__, lock_unlock.res_handle, - (void *)lock_unlock.res_mem); - -- /* Lock the videocore allocated resource. -- */ -+ /* Lock the videocore allocated resource. */ - status = vc_vchi_sm_lock(sm_state->sm_handle, - &lock_unlock, &lock_result, 0); - if (status || !lock_result.res_mem) { -@@ -1221,8 +1209,7 @@ static int vcsm_vma_fault(struct vm_fault *vmf) - resource->res_stats[LOCK]++; - resource->lock_count++; - -- /* Keep track of the new base memory. -- */ -+ /* Keep track of the new base memory. */ - if (lock_result.res_mem && - lock_result.res_old_mem && - (lock_result.res_mem != lock_result.res_old_mem)) { -@@ -1244,9 +1231,9 @@ static int vcsm_vma_fault(struct vm_fault *vmf) - case 0: - case -ERESTARTSYS: - /* -- * EBUSY is ok: this just means that another thread -- * already did the job. -- */ -+ * EBUSY is ok: this just means that another thread -+ * already did the job. -+ */ - case -EBUSY: - return VM_FAULT_NOPAGE; - case -ENOMEM: -@@ -1324,8 +1311,7 @@ static void vcsm_vma_cache_clean_page_range(unsigned long addr, - } while (pgd++, addr = pgd_next, addr != end); - } - --/* Map an allocated data into something that the user space. --*/ -+/* Map an allocated data into something that the user space. */ - static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) - { - int ret = 0; -@@ -1334,8 +1320,7 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) - struct SM_RESOURCE_T *resource = NULL; - struct sm_mmap *map = NULL; - -- /* Make sure the device was started properly. -- */ -+ /* Make sure the device was started properly. */ - if ((sm_state == NULL) || (file_data == NULL)) { - pr_err("[%s]: invalid device\n", __func__); - return -EPERM; -@@ -1344,11 +1329,12 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) - pr_debug("[%s]: private data %p, guid %x\n", __func__, file_data, - ((unsigned int)vma->vm_pgoff << PAGE_SHIFT)); - -- /* We lookup to make sure that the data we are being asked to mmap is -- ** something that we allocated. -- ** -- ** We use the offset information as the key to tell us which resource -- ** we are mapping. -+ /* -+ * We lookup to make sure that the data we are being asked to mmap is -+ * something that we allocated. -+ * -+ * We use the offset information as the key to tell us which resource -+ * we are mapping. - */ - resource = vmcs_sm_acquire_resource(file_data, - ((unsigned int)vma->vm_pgoff << -@@ -1363,8 +1349,7 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) - __func__, resource->res_guid, current->tgid, resource->pid, - file_data->pid); - -- /* Check permissions. -- */ -+ /* Check permissions. */ - if (resource->pid && (resource->pid != current->tgid)) { - pr_err("[%s]: current tgid %u != %u owner\n", - __func__, current->tgid, resource->pid); -@@ -1372,8 +1357,7 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) - goto error; - } - -- /* Verify that what we are asked to mmap is proper. -- */ -+ /* Verify that what we are asked to mmap is proper. */ - if (resource->res_size != (unsigned int)(vma->vm_end - vma->vm_start)) { - pr_err("[%s]: size inconsistency (resource: %u - mmap: %u)\n", - __func__, -@@ -1384,7 +1368,8 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) - goto error; - } - -- /* Keep track of the tuple in the global resource list such that one -+ /* -+ * Keep track of the tuple in the global resource list such that one - * can do a mapping lookup for address/memory handle. - */ - map = kzalloc(sizeof(*map), GFP_KERNEL); -@@ -1403,8 +1388,9 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) - map->vma = vma; - vmcs_sm_add_map(sm_state, resource, map); - -- /* We are not actually mapping the pages, we just provide a fault -- ** handler to allow pages to be mapped when accessed -+ /* -+ * We are not actually mapping the pages, we just provide a fault -+ * handler to allow pages to be mapped when accessed - */ - vma->vm_flags |= - VM_IO | VM_PFNMAP | VM_DONTCOPY | VM_DONTEXPAND; -@@ -1418,8 +1404,7 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) - - if ((resource->res_cached == VMCS_SM_CACHE_NONE) || - (resource->res_cached == VMCS_SM_CACHE_VC)) { -- /* Allocated non host cached memory, honour it. -- */ -+ /* Allocated non host cached memory, honour it. */ - vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); - } - -@@ -1462,8 +1447,7 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) - return ret; - } - --/* Allocate a shared memory handle and block. --*/ -+/* Allocate a shared memory handle and block. */ - int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, - struct vmcs_sm_ioctl_alloc *ioparam) - { -@@ -1505,8 +1489,7 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, - __func__, alloc.name, alloc.type, ioparam->size, - alloc.base_unit, alloc.num_unit, alloc.alignement); - -- /* Allocate local resource to track this allocation. -- */ -+ /* Allocate local resource to track this allocation. */ - resource = kzalloc(sizeof(*resource), GFP_KERNEL); - if (!resource) { - ret = -ENOMEM; -@@ -1516,8 +1499,7 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, - resource->ref_count++; - resource->pid = current->tgid; - -- /* Allocate the videocore resource. -- */ -+ /* Allocate the videocore resource. */ - status = vc_vchi_sm_alloc(sm_state->sm_handle, &alloc, &result, - &private->int_trans_id); - if (status == -EINTR) { -@@ -1535,8 +1517,7 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, - goto error; - } - -- /* Keep track of the resource we created. -- */ -+ /* Keep track of the resource we created. */ - resource->private = private; - resource->res_handle = result.res_handle; - resource->res_base_mem = (void *)result.res_mem; -@@ -1544,7 +1525,8 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, - resource->res_cached = cached; - resource->map = map; - -- /* Kernel/user GUID. This global identifier is used for mmap'ing the -+ /* -+ * Kernel/user GUID. This global identifier is used for mmap'ing the - * allocated region from user space, it is passed as the mmap'ing - * offset, we use it to 'hide' the videocore handle/address. - */ -@@ -1576,8 +1558,7 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, - return ret; - } - --/* Share an allocate memory handle and block. --*/ -+/* Share an allocate memory handle and block.*/ - int vc_sm_ioctl_alloc_share(struct SM_PRIV_DATA_T *private, - struct vmcs_sm_ioctl_alloc_share *ioparam) - { -@@ -1593,8 +1574,7 @@ int vc_sm_ioctl_alloc_share(struct SM_PRIV_DATA_T *private, - goto error; - } - -- /* Allocate local resource to track this allocation. -- */ -+ /* Allocate local resource to track this allocation. */ - resource = kzalloc(sizeof(*resource), GFP_KERNEL); - if (resource == NULL) { - pr_err("[%s]: failed to allocate local tracking resource\n", -@@ -1606,8 +1586,7 @@ int vc_sm_ioctl_alloc_share(struct SM_PRIV_DATA_T *private, - resource->ref_count++; - resource->pid = current->tgid; - -- /* Keep track of the resource we created. -- */ -+ /* Keep track of the resource we created. */ - resource->private = private; - resource->res_handle = shared_resource->res_handle; - resource->res_base_mem = shared_resource->res_base_mem; -@@ -1641,8 +1620,7 @@ int vc_sm_ioctl_alloc_share(struct SM_PRIV_DATA_T *private, - return ret; - } - --/* Free a previously allocated shared memory handle and block. --*/ -+/* Free a previously allocated shared memory handle and block.*/ - static int vc_sm_ioctl_free(struct SM_PRIV_DATA_T *private, - struct vmcs_sm_ioctl_free *ioparam) - { -@@ -1655,8 +1633,7 @@ static int vc_sm_ioctl_free(struct SM_PRIV_DATA_T *private, - return -EINVAL; - } - -- /* Check permissions. -- */ -+ /* Check permissions. */ - if (resource->pid && (resource->pid != current->tgid)) { - pr_err("[%s]: current tgid %u != %u owner\n", - __func__, current->tgid, resource->pid); -@@ -1669,8 +1646,7 @@ static int vc_sm_ioctl_free(struct SM_PRIV_DATA_T *private, - return 0; - } - --/* Resize a previously allocated shared memory handle and block. --*/ -+/* Resize a previously allocated shared memory handle and block. */ - static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, - struct vmcs_sm_ioctl_resize *ioparam) - { -@@ -1679,8 +1655,7 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, - struct vc_sm_resize_t resize; - struct SM_RESOURCE_T *resource; - -- /* Locate resource from GUID. -- */ -+ /* Locate resource from GUID. */ - resource = vmcs_sm_acquire_resource(private, ioparam->handle); - if (!resource) { - pr_err("[%s]: failed resource - guid %x\n", -@@ -1689,9 +1664,10 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, - goto error; - } - -- /* If the resource is locked, its reference count will be not NULL, -- ** in which case we will not be allowed to resize it anyways, so -- ** reject the attempt here. -+ /* -+ * If the resource is locked, its reference count will be not NULL, -+ * in which case we will not be allowed to resize it anyways, so -+ * reject the attempt here. - */ - if (resource->lock_count != 0) { - pr_err("[%s]: cannot resize - guid %x, ref-cnt %d\n", -@@ -1700,8 +1676,7 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, - goto error; - } - -- /* Check permissions. -- */ -+ /* Check permissions. */ - if (resource->pid && (resource->pid != current->tgid)) { - pr_err("[%s]: current tgid %u != %u owner\n", __func__, - current->tgid, resource->pid); -@@ -1724,8 +1699,7 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, - __func__, ioparam->handle, resize.res_handle, - (void *)resize.res_mem); - -- /* Resize the videocore allocated resource. -- */ -+ /* Resize the videocore allocated resource. */ - status = vc_vchi_sm_resize(sm_state->sm_handle, &resize, - &private->int_trans_id); - if (status == -EINTR) { -@@ -1746,8 +1720,7 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, - __func__, resize.res_handle, resource->res_size, - resize.res_new_size); - -- /* Successfully resized, save the information and inform the user. -- */ -+ /* Successfully resized, save the information and inform the user. */ - ioparam->old_size = resource->res_size; - resource->res_size = resize.res_new_size; - -@@ -1758,8 +1731,7 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, - return ret; - } - --/* Lock a previously allocated shared memory handle and block. --*/ -+/* Lock a previously allocated shared memory handle and block. */ - static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, - struct vmcs_sm_ioctl_lock_unlock *ioparam, - int change_cache, enum vmcs_sm_cache_e cache_type, -@@ -1775,16 +1747,14 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, - - map = NULL; - -- /* Locate resource from GUID. -- */ -+ /* Locate resource from GUID. */ - resource = vmcs_sm_acquire_resource(private, ioparam->handle); - if (resource == NULL) { - ret = -EINVAL; - goto error; - } - -- /* Check permissions. -- */ -+ /* Check permissions. */ - if (resource->pid && (resource->pid != current->tgid)) { - pr_err("[%s]: current tgid %u != %u owner\n", __func__, - current->tgid, resource->pid); -@@ -1795,15 +1765,13 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, - lock.res_handle = resource->res_handle; - lock.res_mem = (uint32_t)resource->res_base_mem; - -- /* Take the lock and get the address to be mapped. -- */ -+ /* Take the lock and get the address to be mapped. */ - if (vc_addr == 0) { - pr_debug("[%s]: attempt to lock data - guid %x, hdl %x, base address %p\n", - __func__, ioparam->handle, lock.res_handle, - (void *)lock.res_mem); - -- /* Lock the videocore allocated resource. -- */ -+ /* Lock the videocore allocated resource. */ - status = vc_vchi_sm_lock(sm_state->sm_handle, &lock, &result, - &private->int_trans_id); - if (status == -EINTR) { -@@ -1826,24 +1794,21 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, - __func__, lock.res_handle, (void *)result.res_mem, - (void *)lock.res_mem, resource->lock_count); - } -- /* Lock assumed taken already, address to be mapped is known. -- */ -+ /* Lock assumed taken already, address to be mapped is known. */ - else - resource->res_base_mem = (void *)vc_addr; - - resource->res_stats[LOCK]++; - resource->lock_count++; - -- /* Keep track of the new base memory allocation if it has changed. -- */ -+ /* Keep track of the new base memory allocation if it has changed. */ - if ((vc_addr == 0) && - ((void *)result.res_mem) && - ((void *)result.res_old_mem) && - (result.res_mem != result.res_old_mem)) { - resource->res_base_mem = (void *)result.res_mem; - -- /* Kernel allocated resources. -- */ -+ /* Kernel allocated resources. */ - if (resource->pid == 0) { - if (!list_empty(&resource->map_list)) { - list_for_each_entry_safe(map, map_tmp, -@@ -1875,8 +1840,7 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, - __func__, resource->map_count, private->pid, - current->tgid, ioparam->handle, ioparam->addr); - } else { -- /* Kernel allocated resources. -- */ -+ /* Kernel allocated resources. */ - if (resource->pid == 0) { - pr_debug("[%s]: attempt mapping kernel resource - guid %x, hdl %x\n", - __func__, ioparam->handle, lock.res_handle); -@@ -1933,8 +1897,7 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, - return ret; - } - --/* Unlock a previously allocated shared memory handle and block. --*/ -+/* Unlock a previously allocated shared memory handle and block.*/ - static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, - struct vmcs_sm_ioctl_lock_unlock *ioparam, - int flush, int wait_reply, int no_vc_unlock) -@@ -1947,16 +1910,14 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, - - map = NULL; - -- /* Locate resource from GUID. -- */ -+ /* Locate resource from GUID. */ - resource = vmcs_sm_acquire_resource(private, ioparam->handle); - if (resource == NULL) { - ret = -EINVAL; - goto error; - } - -- /* Check permissions. -- */ -+ /* Check permissions. */ - if (resource->pid && (resource->pid != current->tgid)) { - pr_err("[%s]: current tgid %u != %u owner\n", - __func__, current->tgid, resource->pid); -@@ -1971,8 +1932,7 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, - __func__, ioparam->handle, unlock.res_handle, - (void *)unlock.res_mem); - -- /* User space allocated resources. -- */ -+ /* User space allocated resources. */ - if (resource->pid) { - /* Flush if requested */ - if (resource->res_cached && flush) { -@@ -2071,12 +2031,10 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, - } - - if (resource->lock_count) { -- /* Bypass the videocore unlock. -- */ -+ /* Bypass the videocore unlock. */ - if (no_vc_unlock) - status = 0; -- /* Unlock the videocore allocated resource. -- */ -+ /* Unlock the videocore allocated resource. */ - else { - status = - vc_vchi_sm_unlock(sm_state->sm_handle, &unlock, -@@ -2116,9 +2074,7 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, - return ret; - } - --/* -- * Import a contiguous block of memory to be shared with VC. -- */ -+/* Import a contiguous block of memory to be shared with VC. */ - int vc_sm_ioctl_import_dmabuf(struct SM_PRIV_DATA_T *private, - struct vmcs_sm_ioctl_import_dmabuf *ioparam, - struct dma_buf *src_dma_buf) -@@ -2205,8 +2161,7 @@ int vc_sm_ioctl_import_dmabuf(struct SM_PRIV_DATA_T *private, - goto error; - } - -- /* Keep track of the resource we created. -- */ -+ /* Keep track of the resource we created. */ - resource->private = private; - resource->res_handle = result.res_handle; - resource->res_size = import.size; -@@ -2217,7 +2172,8 @@ int vc_sm_ioctl_import_dmabuf(struct SM_PRIV_DATA_T *private, - resource->sgt = sgt; - resource->dma_addr = sg_dma_address(sgt->sgl); - -- /* Kernel/user GUID. This global identifier is used for mmap'ing the -+ /* -+ * Kernel/user GUID. This global identifier is used for mmap'ing the - * allocated region from user space, it is passed as the mmap'ing - * offset, we use it to 'hide' the videocore handle/address. - */ -@@ -2282,8 +2238,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - file_data->restart_sys = 0; - } - -- /* Now process the command. -- */ -+ /* Now process the command. */ - switch (cmdnr) { - /* New memory allocation. - */ -@@ -2291,8 +2246,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - { - struct vmcs_sm_ioctl_alloc ioparam; - -- /* Get the parameter data. -- */ -+ /* Get the parameter data. */ - if (copy_from_user - (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { - pr_err("[%s]: failed to copy-from-user for cmd %x\n", -@@ -2314,20 +2268,17 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - ret = -EFAULT; - } - -- /* Done. -- */ -+ /* Done. */ - goto out; - } - break; - -- /* Share existing memory allocation. -- */ -+ /* Share existing memory allocation. */ - case VMCS_SM_CMD_ALLOC_SHARE: - { - struct vmcs_sm_ioctl_alloc_share ioparam; - -- /* Get the parameter data. -- */ -+ /* Get the parameter data. */ - if (copy_from_user - (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { - pr_err("[%s]: failed to copy-from-user for cmd %x\n", -@@ -2338,8 +2289,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - - ret = vc_sm_ioctl_alloc_share(file_data, &ioparam); - -- /* Copy result back to user. -- */ -+ /* Copy result back to user. */ - if (!ret - && copy_to_user((void *)arg, &ioparam, - sizeof(ioparam)) != 0) { -@@ -2352,8 +2302,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - ret = -EFAULT; - } - -- /* Done. -- */ -+ /* Done. */ - goto out; - } - break; -@@ -2362,8 +2311,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - { - struct vmcs_sm_ioctl_import_dmabuf ioparam; - -- /* Get the parameter data. -- */ -+ /* Get the parameter data. */ - if (copy_from_user - (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { - pr_err("[%s]: failed to copy-from-user for cmd %x\n", -@@ -2386,21 +2334,18 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - ret = -EFAULT; - } - -- /* Done. -- */ -+ /* Done. */ - goto out; - } - break; - -- /* Lock (attempt to) *and* register a cache behavior change. -- */ -+ /* Lock (attempt to) *and* register a cache behavior change. */ - case VMCS_SM_CMD_LOCK_CACHE: - { - struct vmcs_sm_ioctl_lock_cache ioparam; - struct vmcs_sm_ioctl_lock_unlock lock; - -- /* Get parameter data. -- */ -+ /* Get parameter data. */ - if (copy_from_user - (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { - pr_err("[%s]: failed to copy-from-user for cmd %x\n", -@@ -2414,20 +2359,17 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - vc_sm_ioctl_lock(file_data, &lock, 1, - ioparam.cached, 0); - -- /* Done. -- */ -+ /* Done. */ - goto out; - } - break; - -- /* Lock (attempt to) existing memory allocation. -- */ -+ /* Lock (attempt to) existing memory allocation. */ - case VMCS_SM_CMD_LOCK: - { - struct vmcs_sm_ioctl_lock_unlock ioparam; - -- /* Get parameter data. -- */ -+ /* Get parameter data. */ - if (copy_from_user - (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { - pr_err("[%s]: failed to copy-from-user for cmd %x\n", -@@ -2438,8 +2380,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - - ret = vc_sm_ioctl_lock(file_data, &ioparam, 0, 0, 0); - -- /* Copy result back to user. -- */ -+ /* Copy result back to user. */ - if (copy_to_user((void *)arg, &ioparam, sizeof(ioparam)) - != 0) { - pr_err("[%s]: failed to copy-to-user for cmd %x\n", -@@ -2447,20 +2388,17 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - ret = -EFAULT; - } - -- /* Done. -- */ -+ /* Done. */ - goto out; - } - break; - -- /* Unlock (attempt to) existing memory allocation. -- */ -+ /* Unlock (attempt to) existing memory allocation. */ - case VMCS_SM_CMD_UNLOCK: - { - struct vmcs_sm_ioctl_lock_unlock ioparam; - -- /* Get parameter data. -- */ -+ /* Get parameter data. */ - if (copy_from_user - (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { - pr_err("[%s]: failed to copy-from-user for cmd %x\n", -@@ -2471,20 +2409,17 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - - ret = vc_sm_ioctl_unlock(file_data, &ioparam, 0, 1, 0); - -- /* Done. -- */ -+ /* Done. */ - goto out; - } - break; - -- /* Resize (attempt to) existing memory allocation. -- */ -+ /* Resize (attempt to) existing memory allocation. */ - case VMCS_SM_CMD_RESIZE: - { - struct vmcs_sm_ioctl_resize ioparam; - -- /* Get parameter data. -- */ -+ /* Get parameter data. */ - if (copy_from_user - (&ioparam, (void *)arg, sizeof(ioparam)) != 0) { - pr_err("[%s]: failed to copy-from-user for cmd %x\n", -@@ -2495,17 +2430,13 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - - ret = vc_sm_ioctl_resize(file_data, &ioparam); - -- /* Copy result back to user. -- */ -+ /* Copy result back to user. */ - if (copy_to_user((void *)arg, &ioparam, sizeof(ioparam)) - != 0) { - pr_err("[%s]: failed to copy-to-user for cmd %x\n", - __func__, cmdnr); - ret = -EFAULT; - } -- -- /* Done. -- */ - goto out; - } - break; -@@ -2550,7 +2481,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - goto out; - } - break; --/* Walk mapping table on host, information shows up in the -+ /* Walk mapping table on host, information shows up in the - ** kernel log. - */ - case VMCS_SM_CMD_HOST_WALK_MAP: -@@ -2589,7 +2520,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - { - struct vmcs_sm_ioctl_walk ioparam; - -- /* Get parameter data. */ -+ /* Get parameter data. */ - if (copy_from_user(&ioparam, - (void *)arg, sizeof(ioparam)) != 0) { - pr_err("[%s]: failed to copy-from-user for cmd %x\n", -@@ -2646,8 +2577,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - { - struct vmcs_sm_ioctl_chk ioparam; - -- /* Get parameter data. -- */ -+ /* Get parameter data. */ - if (copy_from_user(&ioparam, - (void *)arg, sizeof(ioparam)) != 0) { - pr_err("[%s]: failed to copy-from-user for cmd %x\n", -@@ -2662,7 +2592,8 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - vmcs_sm_acquire_resource(file_data, ioparam.handle); - if (resource == NULL) - ret = -EINVAL; -- /* If the resource is cacheable, return additional -+ /* -+ * If the resource is cacheable, return additional - * information that may be needed to flush the cache. - */ - else if ((resource->res_cached == VMCS_SM_CACHE_HOST) || -@@ -2688,8 +2619,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - ret = -EFAULT; - } - -- /* Done. -- */ -+ /* Done. */ - goto out; - } - break; -@@ -2768,8 +2698,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - ret = -EFAULT; - } - -- /* Done. -- */ -+ /* Done. */ - goto out; - } - break; -@@ -2851,8 +2780,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - } - break; - -- /* Maps a user address given process and vc handle. -- */ -+ /* Maps a user address given process and vc handle. */ - case VMCS_SM_CMD_MAPPED_USR_ADDRESS: - { - struct vmcs_sm_ioctl_map ioparam; -@@ -2955,8 +2883,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - goto out; - } - -- /* Locate resource from GUID. -- */ -+ /* Locate resource from GUID. */ - resource = - vmcs_sm_acquire_resource(file_data, ioparam.handle); - -@@ -2992,8 +2919,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - if (resource) - vmcs_sm_release_resource(resource, 0); - -- /* Done. -- */ -+ /* Done. */ - goto out; - } - break; -@@ -3019,8 +2945,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - case 2: /* L1/L2 clean physical range */ - case 3: /* L1/L2 clean+invalidate all */ - { -- /* Locate resource from GUID. -- */ -+ /* Locate resource from GUID. */ - resource = - vmcs_sm_acquire_resource(file_data, ioparam.s[i].handle); - -@@ -3123,8 +3048,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - return ret; - } - --/* Device operations that we managed in this driver. --*/ -+/* Device operations that we managed in this driver. */ - static const struct file_operations vmcs_sm_ops = { - .owner = THIS_MODULE, - .unlocked_ioctl = vc_sm_ioctl, -@@ -3133,8 +3057,7 @@ static const struct file_operations vmcs_sm_ops = { - .mmap = vc_sm_mmap, - }; - --/* Creation of device. --*/ -+/* Creation of device. */ - static int vc_sm_create_sharedmemory(void) - { - int ret; -@@ -3144,8 +3067,7 @@ static int vc_sm_create_sharedmemory(void) - goto out; - } - -- /* Create a device class for creating dev nodes. -- */ -+ /* Create a device class for creating dev nodes. */ - sm_state->sm_class = class_create(THIS_MODULE, "vc-sm"); - if (IS_ERR(sm_state->sm_class)) { - pr_err("[%s]: unable to create device class\n", __func__); -@@ -3153,8 +3075,7 @@ static int vc_sm_create_sharedmemory(void) - goto out; - } - -- /* Create a character driver. -- */ -+ /* Create a character driver. */ - ret = alloc_chrdev_region(&sm_state->sm_devid, - DEVICE_MINOR, 1, DEVICE_NAME); - if (ret != 0) { -@@ -3169,8 +3090,7 @@ static int vc_sm_create_sharedmemory(void) - goto out_chrdev_unreg; - } - -- /* Create a device node. -- */ -+ /* Create a device node. */ - sm_state->sm_dev = device_create(sm_state->sm_class, - NULL, - MKDEV(MAJOR(sm_state->sm_devid), -@@ -3195,25 +3115,21 @@ static int vc_sm_create_sharedmemory(void) - return ret; - } - --/* Termination of the device. --*/ -+/* Termination of the device. */ - static int vc_sm_remove_sharedmemory(void) - { - int ret; - - if (sm_state == NULL) { -- /* Nothing to do. -- */ -+ /* Nothing to do. */ - ret = 0; - goto out; - } - -- /* Remove the sharedmemory character driver. -- */ -+ /* Remove the sharedmemory character driver. */ - cdev_del(&sm_state->sm_cdev); - -- /* Unregister region. -- */ -+ /* Unregister region. */ - unregister_chrdev_region(sm_state->sm_devid, 1); - - ret = 0; -@@ -3232,8 +3148,9 @@ static void vc_sm_connected_init(void) - - pr_info("[%s]: start\n", __func__); - -- /* Initialize and create a VCHI connection for the shared memory service -- ** running on videocore. -+ /* -+ * Initialize and create a VCHI connection for the shared memory service -+ * running on videocore. - */ - ret = vchi_initialise(&vchi_instance); - if (ret != 0) { -@@ -3306,8 +3223,7 @@ static void vc_sm_connected_init(void) - goto err_remove_shared_memory; - } - -- /* Done! -- */ -+ /* Done! */ - sm_inited = 1; - goto out; - -@@ -3344,20 +3260,16 @@ static int bcm2835_vcsm_remove(struct platform_device *pdev) - { - pr_debug("[%s]: start\n", __func__); - if (sm_inited) { -- /* Remove shared memory device. -- */ -+ /* Remove shared memory device. */ - vc_sm_remove_sharedmemory(); - -- /* Remove all proc entries. -- */ -+ /* Remove all proc entries. */ - debugfs_remove_recursive(sm_state->dir_root); - -- /* Stop the videocore shared memory service. -- */ -+ /* Stop the videocore shared memory service. */ - vc_vchi_sm_stop(&sm_state->sm_handle); - -- /* Free the memory for the state structure. -- */ -+ /* Free the memory for the state structure. */ - mutex_destroy(&(sm_state->map_lock)); - kfree(sm_state); - } -@@ -3374,8 +3286,7 @@ int vc_sm_alloc(struct vc_sm_alloc_t *alloc, int *handle) - int ret; - struct SM_RESOURCE_T *resource; - -- /* Validate we can work with this device. -- */ -+ /* Validate we can work with this device. */ - if (sm_state == NULL || alloc == NULL || handle == NULL) { - pr_err("[%s]: invalid input\n", __func__); - return -EPERM; -@@ -3396,8 +3307,7 @@ int vc_sm_alloc(struct vc_sm_alloc_t *alloc, int *handle) - resource->pid = 0; - vmcs_sm_release_resource(resource, 0); - -- /* Assign valid handle at this time. -- */ -+ /* Assign valid handle at this time. */ - *handle = ioparam.handle; - } else { - ret = -ENOMEM; -@@ -3408,22 +3318,19 @@ int vc_sm_alloc(struct vc_sm_alloc_t *alloc, int *handle) - } - EXPORT_SYMBOL_GPL(vc_sm_alloc); - --/* Get an internal resource handle mapped from the external one. --*/ -+/* Get an internal resource handle mapped from the external one. */ - int vc_sm_int_handle(int handle) - { - struct SM_RESOURCE_T *resource; - int ret = 0; - -- /* Validate we can work with this device. -- */ -+ /* Validate we can work with this device. */ - if (sm_state == NULL || handle == 0) { - pr_err("[%s]: invalid input\n", __func__); - return 0; - } - -- /* Locate resource from GUID. -- */ -+ /* Locate resource from GUID. */ - resource = vmcs_sm_acquire_resource(sm_state->data_knl, handle); - if (resource) { - ret = resource->res_handle; -@@ -3434,14 +3341,12 @@ int vc_sm_int_handle(int handle) - } - EXPORT_SYMBOL_GPL(vc_sm_int_handle); - --/* Free a previously allocated shared memory handle and block. --*/ -+/* Free a previously allocated shared memory handle and block. */ - int vc_sm_free(int handle) - { - struct vmcs_sm_ioctl_free ioparam = { handle }; - -- /* Validate we can work with this device. -- */ -+ /* Validate we can work with this device. */ - if (sm_state == NULL || handle == 0) { - pr_err("[%s]: invalid input\n", __func__); - return -EPERM; -@@ -3451,16 +3356,14 @@ int vc_sm_free(int handle) - } - EXPORT_SYMBOL_GPL(vc_sm_free); - --/* Lock a memory handle for use by kernel. --*/ -+/* Lock a memory handle for use by kernel. */ - int vc_sm_lock(int handle, VC_SM_LOCK_CACHE_MODE_T mode, - long unsigned int *data) - { - struct vmcs_sm_ioctl_lock_unlock ioparam; - int ret; - -- /* Validate we can work with this device. -- */ -+ /* Validate we can work with this device. */ - if (sm_state == NULL || handle == 0 || data == NULL) { - pr_err("[%s]: invalid input\n", __func__); - return -EPERM; -@@ -3481,14 +3384,12 @@ int vc_sm_lock(int handle, VC_SM_LOCK_CACHE_MODE_T mode, - } - EXPORT_SYMBOL_GPL(vc_sm_lock); - --/* Unlock a memory handle in use by kernel. --*/ -+/* Unlock a memory handle in use by kernel. */ - int vc_sm_unlock(int handle, int flush, int no_vc_unlock) - { - struct vmcs_sm_ioctl_lock_unlock ioparam; - -- /* Validate we can work with this device. -- */ -+ /* Validate we can work with this device. */ - if (sm_state == NULL || handle == 0) { - pr_err("[%s]: invalid input\n", __func__); - return -EPERM; -@@ -3500,16 +3401,14 @@ int vc_sm_unlock(int handle, int flush, int no_vc_unlock) - } - EXPORT_SYMBOL_GPL(vc_sm_unlock); - --/* Map a shared memory region for use by kernel. --*/ -+/* Map a shared memory region for use by kernel. */ - int vc_sm_map(int handle, unsigned int sm_addr, VC_SM_LOCK_CACHE_MODE_T mode, - long unsigned int *data) - { - struct vmcs_sm_ioctl_lock_unlock ioparam; - int ret; - -- /* Validate we can work with this device. -- */ -+ /* Validate we can work with this device. */ - if (sm_state == NULL || handle == 0 || data == NULL || sm_addr == 0) { - pr_err("[%s]: invalid input\n", __func__); - return -EPERM; - -From c706af18d535efef6c572e801db4cb2e4626afe7 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 1 Sep 2017 17:29:37 +0100 -Subject: [PATCH 186/199] vcsm: Fix indentation of switch/case statement. - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vmcs_sm.c | 53 ++++++++++++++++++----------------- - 1 file changed, 27 insertions(+), 26 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index f93f18d3c24e43c9cf79e33f11cba9d1806f3124..9627a2b187130a68a15ea6fe46a72cf6cb5fe27e 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -2940,33 +2940,34 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - } - for (i=0; ires_cached) { -- unsigned long base = ioparam.s[i].addr & ~(PAGE_SIZE-1); -- unsigned long end = (ioparam.s[i].addr + ioparam.s[i].size + PAGE_SIZE-1) & ~(PAGE_SIZE-1); -- -- resource->res_stats[ioparam.s[i].cmd == 1 ? INVALID:FLUSH]++; -- -- /* L1/L2 cache flush */ -- down_read(¤t->mm->mmap_sem); -- vcsm_vma_cache_clean_page_range(base, end); -- up_read(¤t->mm->mmap_sem); -- } else if (resource == NULL) { -- ret = -EINVAL; -- goto out; -- } -- -- if (resource) -- vmcs_sm_release_resource(resource, 0); -+ default: -+ case 0: -+ break; /* NOOP */ -+ case 1: /* L1/L2 invalidate virtual range */ -+ case 2: /* L1/L2 clean physical range */ -+ case 3: /* L1/L2 clean+invalidate all */ -+ /* Locate resource from GUID. */ -+ resource = -+ vmcs_sm_acquire_resource(file_data, ioparam.s[i].handle); -+ -+ if ((resource != NULL) && resource->res_cached) { -+ unsigned long base = ioparam.s[i].addr & ~(PAGE_SIZE-1); -+ unsigned long end = (ioparam.s[i].addr + ioparam.s[i].size + PAGE_SIZE-1) & ~(PAGE_SIZE-1); -+ -+ resource->res_stats[ioparam.s[i].cmd == 1 ? INVALID:FLUSH]++; -+ -+ /* L1/L2 cache flush */ -+ down_read(¤t->mm->mmap_sem); -+ vcsm_vma_cache_clean_page_range(base, end); -+ up_read(¤t->mm->mmap_sem); -+ } else if (resource == NULL) { -+ ret = -EINVAL; -+ goto out; - } -+ -+ if (resource) -+ vmcs_sm_release_resource(resource, 0); -+ - break; - } - } - -From 4acacac866fa956ca26124fbc01784e9e19445d2 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 1 Sep 2017 17:24:48 +0100 -Subject: [PATCH 187/199] vcsm: Fix spaces around operators. - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vmcs_sm.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index 9627a2b187130a68a15ea6fe46a72cf6cb5fe27e..2b29c1f1ad611fe5ad04d0cf7c757370c850a5e9 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -2938,7 +2938,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - ret = -EFAULT; - goto out; - } -- for (i=0; ires_cached) { -- unsigned long base = ioparam.s[i].addr & ~(PAGE_SIZE-1); -- unsigned long end = (ioparam.s[i].addr + ioparam.s[i].size + PAGE_SIZE-1) & ~(PAGE_SIZE-1); -+ unsigned long base = ioparam.s[i].addr & ~(PAGE_SIZE - 1); -+ unsigned long end = (ioparam.s[i].addr + ioparam.s[i].size + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1); - -- resource->res_stats[ioparam.s[i].cmd == 1 ? INVALID:FLUSH]++; -+ resource->res_stats[ioparam.s[i].cmd == 1 ? INVALID : FLUSH]++; - - /* L1/L2 cache flush */ - down_read(¤t->mm->mmap_sem); -@@ -3001,7 +3001,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - goto out; - } - -- for (i=0; iblock_count; ++j) { - -From 931ff674af5765891fd59828562907a4ef0a3e72 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 1 Sep 2017 17:33:49 +0100 -Subject: [PATCH 188/199] vcsm: Fix use of S_IRUGO and use 0444 instead - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vmcs_sm.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index 2b29c1f1ad611fe5ad04d0cf7c757370c850a5e9..25dc958a35bac88e5ec6e0865d7cf35953d1b70b 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -1047,7 +1047,7 @@ static struct SM_PRIV_DATA_T *vc_sm_create_priv_data(pid_t id) - } else { - struct dentry *dir_entry; - -- dir_entry = debugfs_create_file(VC_SM_RESOURCES, S_IRUGO, -+ dir_entry = debugfs_create_file(VC_SM_RESOURCES, 0444, - file_data->dir_pid, file_data, - vc_sm_debug_fs_fops); - -@@ -1055,7 +1055,7 @@ static struct SM_PRIV_DATA_T *vc_sm_create_priv_data(pid_t id) - file_data->dir_res.priv_data = file_data; - file_data->dir_res.show = &vc_sm_alloc_show; - -- dir_entry = debugfs_create_file(VC_SM_STATS, S_IRUGO, -+ dir_entry = debugfs_create_file(VC_SM_STATS, 0444, - file_data->dir_pid, file_data, - vc_sm_debug_fs_fops); - -@@ -3194,12 +3194,12 @@ static void vc_sm_connected_init(void) - - sm_state->dir_state.show = &vc_sm_global_state_show; - sm_state->dir_state.dir_entry = debugfs_create_file(VC_SM_STATE, -- S_IRUGO, sm_state->dir_root, &sm_state->dir_state, -+ 0444, sm_state->dir_root, &sm_state->dir_state, - &vc_sm_debug_fs_fops); - - sm_state->dir_stats.show = &vc_sm_global_statistics_show; - sm_state->dir_stats.dir_entry = debugfs_create_file(VC_SM_STATS, -- S_IRUGO, sm_state->dir_root, &sm_state->dir_stats, -+ 0444, sm_state->dir_root, &sm_state->dir_stats, - &vc_sm_debug_fs_fops); - - /* Create the proc entry children. */ - -From fdd78a027d14bf60b26f8e89d8c8391c08b27bfc Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 1 Sep 2017 17:36:11 +0100 -Subject: [PATCH 189/199] vcsm: Correct "long unsigned int" to "unsigned long" - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vc_sm_knl.h | 4 ++-- - drivers/char/broadcom/vc_sm/vmcs_sm.c | 16 ++++++++-------- - 2 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vc_sm_knl.h b/drivers/char/broadcom/vc_sm/vc_sm_knl.h -index 8252d13999a78609fcc7e1bbe83307e2b1c1f8f1..8538f618ffd33b2901d220f3fb755aae6001e6d7 100644 ---- a/drivers/char/broadcom/vc_sm/vc_sm_knl.h -+++ b/drivers/char/broadcom/vc_sm/vc_sm_knl.h -@@ -36,7 +36,7 @@ int vc_sm_free(int handle); - - /* Lock a memory handle for use by kernel. */ - int vc_sm_lock(int handle, VC_SM_LOCK_CACHE_MODE_T mode, -- long unsigned int *data); -+ unsigned long *data); - - /* Unlock a memory handle in use by kernel. */ - int vc_sm_unlock(int handle, int flush, int no_vc_unlock); -@@ -46,7 +46,7 @@ int vc_sm_int_handle(int handle); - - /* Map a shared memory region for use by kernel. */ - int vc_sm_map(int handle, unsigned int sm_addr, VC_SM_LOCK_CACHE_MODE_T mode, -- long unsigned int *data); -+ unsigned long *data); - - /* Import a block of memory into the GPU space. */ - int vc_sm_import_dmabuf(struct dma_buf *dmabuf, int *handle); -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index 25dc958a35bac88e5ec6e0865d7cf35953d1b70b..8244b365b690f8e2d00a8fae3754ce1f8bc23fbf 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -118,7 +118,7 @@ struct sm_mmap { - unsigned int res_vc_hdl; /* Resource handle (videocore). */ - unsigned int res_usr_hdl; /* Resource handle (user). */ - -- long unsigned int res_addr; /* Mapped virtual address. */ -+ unsigned long res_addr; /* Mapped virtual address. */ - struct vm_area_struct *vma; /* VM area for this mapping. */ - unsigned int ref_count; /* Reference count to this vma. */ - -@@ -1383,7 +1383,7 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) - map->res_pid = current->tgid; - map->res_vc_hdl = resource->res_handle; - map->res_usr_hdl = resource->res_guid; -- map->res_addr = (long unsigned int)vma->vm_start; -+ map->res_addr = (unsigned long)vma->vm_start; - map->resource = resource; - map->vma = vma; - vmcs_sm_add_map(sm_state, resource, map); -@@ -1743,7 +1743,7 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, - struct SM_RESOURCE_T *resource; - int ret = 0; - struct sm_mmap *map, *map_tmp; -- long unsigned int phys_addr; -+ unsigned long phys_addr; - - map = NULL; - -@@ -1859,7 +1859,7 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, - phys_addr += mm_vc_mem_phys_addr; - if (resource->res_cached - == VMCS_SM_CACHE_HOST) { -- ioparam->addr = (long unsigned int) -+ ioparam->addr = (unsigned long) - /* TODO - make cached work */ - ioremap_nocache(phys_addr, - resource->res_size); -@@ -1868,7 +1868,7 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, - __func__, ioparam->handle, - lock.res_handle, ioparam->addr); - } else { -- ioparam->addr = (long unsigned int) -+ ioparam->addr = (unsigned long) - ioremap_nocache(phys_addr, - resource->res_size); - -@@ -1995,7 +1995,7 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, - if (flush && - (resource->res_cached == - VMCS_SM_CACHE_HOST)) { -- long unsigned int -+ unsigned long - phys_addr; - phys_addr = (uint32_t) - resource->res_base_mem & 0x3FFFFFFF; -@@ -3359,7 +3359,7 @@ EXPORT_SYMBOL_GPL(vc_sm_free); - - /* Lock a memory handle for use by kernel. */ - int vc_sm_lock(int handle, VC_SM_LOCK_CACHE_MODE_T mode, -- long unsigned int *data) -+ unsigned long *data) - { - struct vmcs_sm_ioctl_lock_unlock ioparam; - int ret; -@@ -3404,7 +3404,7 @@ EXPORT_SYMBOL_GPL(vc_sm_unlock); - - /* Map a shared memory region for use by kernel. */ - int vc_sm_map(int handle, unsigned int sm_addr, VC_SM_LOCK_CACHE_MODE_T mode, -- long unsigned int *data) -+ unsigned long *data) - { - struct vmcs_sm_ioctl_lock_unlock ioparam; - int ret; - -From efa2798b15577ed3143bc36cb63f75c66e986f6b Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 1 Sep 2017 17:38:27 +0100 -Subject: [PATCH 190/199] vcsm: Fix "struct vm_operations_struct should - normally be const" - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vmcs_sm.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index 8244b365b690f8e2d00a8fae3754ce1f8bc23fbf..d8fe579a999d011d0af986a88398ac8b0947b7f3 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -1248,7 +1248,7 @@ static int vcsm_vma_fault(struct vm_fault *vmf) - } - } - --static struct vm_operations_struct vcsm_vm_ops = { -+static const struct vm_operations_struct vcsm_vm_ops = { - .open = vcsm_vma_open, - .close = vcsm_vma_close, - .fault = vcsm_vma_fault, - -From 7ade658e79c8be6151b3354f99efe3644318b26d Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 1 Sep 2017 17:45:34 +0100 -Subject: [PATCH 191/199] vcsm: Fix "void function return statements are not - generally useful" - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vmcs_sm.c | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index d8fe579a999d011d0af986a88398ac8b0947b7f3..ecff69dce678b5125b81ed82b74b950720c472b0 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -984,8 +984,6 @@ static void vmcs_sm_host_walk_map_per_pid(int pid) - } - - mutex_unlock(&(sm_state->map_lock)); -- -- return; - } - - /* -@@ -1015,8 +1013,6 @@ static void vmcs_sm_host_walk_alloc(struct SM_PRIV_DATA_T *file_data) - } - - mutex_unlock(&(sm_state->map_lock)); -- -- return; - } - - /* Create support for private data tracking. */ - -From fdba256e8df20dfb09579518f1eba063aab829e1 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 1 Sep 2017 17:47:32 +0100 -Subject: [PATCH 192/199] vcsm: Fix "Prefer kcalloc over kzalloc with multiply" - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vmcs_sm.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index ecff69dce678b5125b81ed82b74b950720c472b0..ea82a374a5e2ad51cefcfc20ea4265c436258646 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -2984,7 +2984,9 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - ret = -EFAULT; - goto out; - } -- block = kzalloc(ioparam.op_count * sizeof(struct vmcs_sm_ioctl_clean_invalid_block), GFP_KERNEL); -+ block = kcalloc(ioparam.op_count, -+ sizeof(struct vmcs_sm_ioctl_clean_invalid_block), -+ GFP_KERNEL); - if (!block) { - ret = -EFAULT; - goto out; - -From 90f02b6982a289ed24252d07be2918e23e8fe891 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 1 Sep 2017 17:55:07 +0100 -Subject: [PATCH 193/199] vcsm: Remove VC_SM_LOCK_CACHE_MODE_T typedef. - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vc_sm_knl.h | 11 +++++------ - drivers/char/broadcom/vc_sm/vmcs_sm.c | 6 +++--- - 2 files changed, 8 insertions(+), 9 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vc_sm_knl.h b/drivers/char/broadcom/vc_sm/vc_sm_knl.h -index 8538f618ffd33b2901d220f3fb755aae6001e6d7..f7f74750d8358779c61dfcd6fc841aa1789a2c5e 100644 ---- a/drivers/char/broadcom/vc_sm/vc_sm_knl.h -+++ b/drivers/char/broadcom/vc_sm/vc_sm_knl.h -@@ -22,11 +22,10 @@ - #endif - - /* Type of memory to be locked (ie mapped) */ --typedef enum { -+enum vc_sm_lock_cache_mode { - VC_SM_LOCK_CACHED, - VC_SM_LOCK_NON_CACHED, -- --} VC_SM_LOCK_CACHE_MODE_T; -+}; - - /* Allocate a shared memory handle and block. */ - int vc_sm_alloc(struct vc_sm_alloc_t *alloc, int *handle); -@@ -35,7 +34,7 @@ int vc_sm_alloc(struct vc_sm_alloc_t *alloc, int *handle); - int vc_sm_free(int handle); - - /* Lock a memory handle for use by kernel. */ --int vc_sm_lock(int handle, VC_SM_LOCK_CACHE_MODE_T mode, -+int vc_sm_lock(int handle, enum vc_sm_lock_cache_mode mode, - unsigned long *data); - - /* Unlock a memory handle in use by kernel. */ -@@ -45,8 +44,8 @@ int vc_sm_unlock(int handle, int flush, int no_vc_unlock); - int vc_sm_int_handle(int handle); - - /* Map a shared memory region for use by kernel. */ --int vc_sm_map(int handle, unsigned int sm_addr, VC_SM_LOCK_CACHE_MODE_T mode, -- unsigned long *data); -+int vc_sm_map(int handle, unsigned int sm_addr, -+ enum vc_sm_lock_cache_mode mode, unsigned long *data); - - /* Import a block of memory into the GPU space. */ - int vc_sm_import_dmabuf(struct dma_buf *dmabuf, int *handle); -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index ea82a374a5e2ad51cefcfc20ea4265c436258646..b2452f3d0dfc207deed3703cb3ad43221af50b46 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -3356,7 +3356,7 @@ int vc_sm_free(int handle) - EXPORT_SYMBOL_GPL(vc_sm_free); - - /* Lock a memory handle for use by kernel. */ --int vc_sm_lock(int handle, VC_SM_LOCK_CACHE_MODE_T mode, -+int vc_sm_lock(int handle, enum vc_sm_lock_cache_mode mode, - unsigned long *data) - { - struct vmcs_sm_ioctl_lock_unlock ioparam; -@@ -3401,8 +3401,8 @@ int vc_sm_unlock(int handle, int flush, int no_vc_unlock) - EXPORT_SYMBOL_GPL(vc_sm_unlock); - - /* Map a shared memory region for use by kernel. */ --int vc_sm_map(int handle, unsigned int sm_addr, VC_SM_LOCK_CACHE_MODE_T mode, -- unsigned long *data) -+int vc_sm_map(int handle, unsigned int sm_addr, -+ enum vc_sm_lock_cache_mode mode, unsigned long *data) - { - struct vmcs_sm_ioctl_lock_unlock ioparam; - int ret; - -From d9b278599bab9340b5218c78f8183a0fc577f889 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Tue, 5 Sep 2017 10:12:21 +0100 -Subject: [PATCH 194/199] vcsm: Replace SM_RESOURCE_T with sm_resource_t - -Follow the Linux kernel coding style. - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vmcs_sm.c | 66 +++++++++++++++++------------------ - 1 file changed, 33 insertions(+), 33 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index b2452f3d0dfc207deed3703cb3ad43221af50b46..59e1239b42ba139e29b22017a1b2a669bec6b884 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -112,7 +112,7 @@ struct SM_PDE_T { - struct sm_mmap { - struct list_head map_list; /* Linked list of maps. */ - -- struct SM_RESOURCE_T *resource; /* Pointer to the resource. */ -+ struct sm_resource_t *resource; /* Pointer to the resource. */ - - pid_t res_pid; /* PID owning that resource. */ - unsigned int res_vc_hdl; /* Resource handle (videocore). */ -@@ -127,7 +127,7 @@ struct sm_mmap { - }; - - /* Single resource allocation tracked for each opened device. */ --struct SM_RESOURCE_T { -+struct sm_resource_t { - struct list_head resource_list; /* List of resources. */ - struct list_head global_resource_list; /* Global list of resources. */ - -@@ -140,7 +140,7 @@ struct SM_RESOURCE_T { - void *res_base_mem; /* Resource base memory address. */ - uint32_t res_size; /* Resource size allocated. */ - enum vmcs_sm_cache_e res_cached; /* Resource cache type. */ -- struct SM_RESOURCE_T *res_shared; /* Shared resource */ -+ struct sm_resource_t *res_shared; /* Shared resource */ - - enum SM_STATS_T res_stats[END_ALL]; /* Resource statistics. */ - -@@ -235,7 +235,7 @@ static inline unsigned int vcaddr_to_pfn(unsigned long vc_addr) - * Carries over to the state statistics the statistics once owned by a deceased - * resource. - */ --static void vc_sm_resource_deceased(struct SM_RESOURCE_T *p_res, int terminated) -+static void vc_sm_resource_deceased(struct sm_resource_t *p_res, int terminated) - { - if (sm_state != NULL) { - if (p_res != NULL) { -@@ -460,7 +460,7 @@ static unsigned int vmcs_sm_usr_address_from_pid_and_usr_handle(unsigned int - - /* Adds a resource mapping to the global data list. */ - static void vmcs_sm_add_map(struct SM_STATE_T *state, -- struct SM_RESOURCE_T *resource, struct sm_mmap *map) -+ struct sm_resource_t *resource, struct sm_mmap *map) - { - mutex_lock(&(state->map_lock)); - -@@ -480,7 +480,7 @@ static void vmcs_sm_add_map(struct SM_STATE_T *state, - - /* Removes a resource mapping from the global data list. */ - static void vmcs_sm_remove_map(struct SM_STATE_T *state, -- struct SM_RESOURCE_T *resource, -+ struct sm_resource_t *resource, - struct sm_mmap *map) - { - mutex_lock(&(state->map_lock)); -@@ -506,7 +506,7 @@ static void vmcs_sm_remove_map(struct SM_STATE_T *state, - static int vc_sm_global_state_show(struct seq_file *s, void *v) - { - struct sm_mmap *map = NULL; -- struct SM_RESOURCE_T *resource = NULL; -+ struct sm_resource_t *resource = NULL; - int map_count = 0; - int resource_count = 0; - -@@ -634,7 +634,7 @@ static int vc_sm_statistics_show(struct seq_file *s, void *v) - { - int ix; - struct SM_PRIV_DATA_T *file_data; -- struct SM_RESOURCE_T *resource; -+ struct sm_resource_t *resource; - int res_count = 0; - struct SM_PDE_T *p_pde; - -@@ -691,7 +691,7 @@ static int vc_sm_statistics_show(struct seq_file *s, void *v) - static int vc_sm_alloc_show(struct seq_file *s, void *v) - { - struct SM_PRIV_DATA_T *file_data; -- struct SM_RESOURCE_T *resource; -+ struct sm_resource_t *resource; - int alloc_count = 0; - struct SM_PDE_T *p_pde; - -@@ -765,7 +765,7 @@ static const struct file_operations vc_sm_debug_fs_fops = { - * data. - */ - static void vmcs_sm_add_resource(struct SM_PRIV_DATA_T *privdata, -- struct SM_RESOURCE_T *resource) -+ struct sm_resource_t *resource) - { - mutex_lock(&(sm_state->map_lock)); - list_add(&resource->resource_list, &privdata->resource_list); -@@ -781,11 +781,11 @@ static void vmcs_sm_add_resource(struct SM_PRIV_DATA_T *privdata, - * Locates a resource and acquire a reference on it. - * The resource won't be deleted while there is a reference on it. - */ --static struct SM_RESOURCE_T *vmcs_sm_acquire_resource(struct SM_PRIV_DATA_T -+static struct sm_resource_t *vmcs_sm_acquire_resource(struct SM_PRIV_DATA_T - *private, - unsigned int res_guid) - { -- struct SM_RESOURCE_T *resource, *ret = NULL; -+ struct sm_resource_t *resource, *ret = NULL; - - mutex_lock(&(sm_state->map_lock)); - -@@ -811,10 +811,10 @@ static struct SM_RESOURCE_T *vmcs_sm_acquire_resource(struct SM_PRIV_DATA_T - * Locates a resource and acquire a reference on it. - * The resource won't be deleted while there is a reference on it. - */ --static struct SM_RESOURCE_T *vmcs_sm_acquire_first_resource( -+static struct sm_resource_t *vmcs_sm_acquire_first_resource( - struct SM_PRIV_DATA_T *private) - { -- struct SM_RESOURCE_T *resource, *ret = NULL; -+ struct sm_resource_t *resource, *ret = NULL; - - mutex_lock(&(sm_state->map_lock)); - -@@ -837,10 +837,10 @@ static struct SM_RESOURCE_T *vmcs_sm_acquire_first_resource( - * Locates a resource and acquire a reference on it. - * The resource won't be deleted while there is a reference on it. - */ --static struct SM_RESOURCE_T *vmcs_sm_acquire_global_resource(unsigned int -+static struct sm_resource_t *vmcs_sm_acquire_global_resource(unsigned int - res_guid) - { -- struct SM_RESOURCE_T *resource, *ret = NULL; -+ struct sm_resource_t *resource, *ret = NULL; - - mutex_lock(&(sm_state->map_lock)); - -@@ -867,11 +867,11 @@ static struct SM_RESOURCE_T *vmcs_sm_acquire_global_resource(unsigned int - * Release a previously acquired resource. - * The resource will be deleted when its refcount reaches 0. - */ --static void vmcs_sm_release_resource(struct SM_RESOURCE_T *resource, int force) -+static void vmcs_sm_release_resource(struct sm_resource_t *resource, int force) - { - struct SM_PRIV_DATA_T *private = resource->private; - struct sm_mmap *map, *map_tmp; -- struct SM_RESOURCE_T *res_tmp; -+ struct sm_resource_t *res_tmp; - int ret; - - mutex_lock(&(sm_state->map_lock)); -@@ -992,7 +992,7 @@ static void vmcs_sm_host_walk_map_per_pid(int pid) - */ - static void vmcs_sm_host_walk_alloc(struct SM_PRIV_DATA_T *file_data) - { -- struct SM_RESOURCE_T *resource = NULL; -+ struct sm_resource_t *resource = NULL; - - /* Make sure the device was started properly. */ - if ((sm_state == NULL) || (file_data == NULL)) { -@@ -1101,7 +1101,7 @@ static int vc_sm_release(struct inode *inode, struct file *file) - { - struct SM_PRIV_DATA_T *file_data = - (struct SM_PRIV_DATA_T *)file->private_data; -- struct SM_RESOURCE_T *resource; -+ struct sm_resource_t *resource; - int ret = 0; - - /* Make sure the device was started properly. */ -@@ -1170,7 +1170,7 @@ static void vcsm_vma_close(struct vm_area_struct *vma) - static int vcsm_vma_fault(struct vm_fault *vmf) - { - struct sm_mmap *map = (struct sm_mmap *)vmf->vma->vm_private_data; -- struct SM_RESOURCE_T *resource = map->resource; -+ struct sm_resource_t *resource = map->resource; - pgoff_t page_offset; - unsigned long pfn; - int ret = 0; -@@ -1313,7 +1313,7 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) - int ret = 0; - struct SM_PRIV_DATA_T *file_data = - (struct SM_PRIV_DATA_T *)file->private_data; -- struct SM_RESOURCE_T *resource = NULL; -+ struct sm_resource_t *resource = NULL; - struct sm_mmap *map = NULL; - - /* Make sure the device was started properly. */ -@@ -1449,7 +1449,7 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, - { - int ret = 0; - int status; -- struct SM_RESOURCE_T *resource; -+ struct sm_resource_t *resource; - struct vc_sm_alloc_t alloc = { 0 }; - struct vc_sm_alloc_result_t result = { 0 }; - enum vmcs_sm_cache_e cached = ioparam->cached; -@@ -1558,7 +1558,7 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, - int vc_sm_ioctl_alloc_share(struct SM_PRIV_DATA_T *private, - struct vmcs_sm_ioctl_alloc_share *ioparam) - { -- struct SM_RESOURCE_T *resource, *shared_resource; -+ struct sm_resource_t *resource, *shared_resource; - int ret = 0; - - pr_debug("[%s]: attempt to share resource %u\n", __func__, -@@ -1620,7 +1620,7 @@ int vc_sm_ioctl_alloc_share(struct SM_PRIV_DATA_T *private, - static int vc_sm_ioctl_free(struct SM_PRIV_DATA_T *private, - struct vmcs_sm_ioctl_free *ioparam) - { -- struct SM_RESOURCE_T *resource = -+ struct sm_resource_t *resource = - vmcs_sm_acquire_resource(private, ioparam->handle); - - if (resource == NULL) { -@@ -1649,7 +1649,7 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, - int ret = 0; - int status; - struct vc_sm_resize_t resize; -- struct SM_RESOURCE_T *resource; -+ struct sm_resource_t *resource; - - /* Locate resource from GUID. */ - resource = vmcs_sm_acquire_resource(private, ioparam->handle); -@@ -1736,7 +1736,7 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, - int status; - struct vc_sm_lock_unlock_t lock; - struct vc_sm_lock_result_t result; -- struct SM_RESOURCE_T *resource; -+ struct sm_resource_t *resource; - int ret = 0; - struct sm_mmap *map, *map_tmp; - unsigned long phys_addr; -@@ -1901,7 +1901,7 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, - int status; - struct vc_sm_lock_unlock_t unlock; - struct sm_mmap *map, *map_tmp; -- struct SM_RESOURCE_T *resource; -+ struct sm_resource_t *resource; - int ret = 0; - - map = NULL; -@@ -2077,7 +2077,7 @@ int vc_sm_ioctl_import_dmabuf(struct SM_PRIV_DATA_T *private, - { - int ret = 0; - int status; -- struct SM_RESOURCE_T *resource = NULL; -+ struct sm_resource_t *resource = NULL; - struct vc_sm_import import = { 0 }; - struct vc_sm_import_result result = { 0 }; - struct dma_buf *dma_buf; -@@ -2206,7 +2206,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - unsigned int cmdnr = _IOC_NR(cmd); - struct SM_PRIV_DATA_T *file_data = - (struct SM_PRIV_DATA_T *)file->private_data; -- struct SM_RESOURCE_T *resource = NULL; -+ struct sm_resource_t *resource = NULL; - - /* Validate we can work with this device. */ - if ((sm_state == NULL) || (file_data == NULL)) { -@@ -3283,7 +3283,7 @@ int vc_sm_alloc(struct vc_sm_alloc_t *alloc, int *handle) - { - struct vmcs_sm_ioctl_alloc ioparam = { 0 }; - int ret; -- struct SM_RESOURCE_T *resource; -+ struct sm_resource_t *resource; - - /* Validate we can work with this device. */ - if (sm_state == NULL || alloc == NULL || handle == NULL) { -@@ -3320,7 +3320,7 @@ EXPORT_SYMBOL_GPL(vc_sm_alloc); - /* Get an internal resource handle mapped from the external one. */ - int vc_sm_int_handle(int handle) - { -- struct SM_RESOURCE_T *resource; -+ struct sm_resource_t *resource; - int ret = 0; - - /* Validate we can work with this device. */ -@@ -3433,7 +3433,7 @@ int vc_sm_import_dmabuf(struct dma_buf *dmabuf, int *handle) - { - struct vmcs_sm_ioctl_import_dmabuf ioparam = { 0 }; - int ret; -- struct SM_RESOURCE_T *resource; -+ struct sm_resource_t *resource; - - /* Validate we can work with this device. */ - if (!sm_state || !dmabuf || !handle) { - -From ec71f864e5976f147727465843d2a46836aaed1e Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Tue, 5 Sep 2017 10:15:25 +0100 -Subject: [PATCH 195/199] vcsm: Replace SM_STATS_T with sm_stats_t - -Follows the kernel coding style - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vmcs_sm.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index 59e1239b42ba139e29b22017a1b2a669bec6b884..08567b018a63cb783d1e66056f64b2d888f10315 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -62,7 +62,7 @@ - #define VC_SM_WRITE_BUF_SIZE 128 - - /* Statistics tracked per resource and globally. */ --enum SM_STATS_T { -+enum sm_stats_t { - /* Attempt. */ - ALLOC, - FREE, -@@ -142,7 +142,7 @@ struct sm_resource_t { - enum vmcs_sm_cache_e res_cached; /* Resource cache type. */ - struct sm_resource_t *res_shared; /* Shared resource */ - -- enum SM_STATS_T res_stats[END_ALL]; /* Resource statistics. */ -+ enum sm_stats_t res_stats[END_ALL]; /* Resource statistics. */ - - uint8_t map_count; /* Counter of mappings for this resource. */ - struct list_head map_list; /* Maps associated with a resource. */ -@@ -187,8 +187,8 @@ struct SM_STATE_T { - struct list_head map_list; /* List of maps. */ - struct list_head resource_list; /* List of resources. */ - -- enum SM_STATS_T deceased[END_ALL]; /* Natural termination stats. */ -- enum SM_STATS_T terminated[END_ALL]; /* Forced termination stats. */ -+ enum sm_stats_t deceased[END_ALL]; /* Natural termination stats. */ -+ enum sm_stats_t terminated[END_ALL]; /* Forced termination stats. */ - uint32_t res_deceased_cnt; /* Natural termination counter. */ - uint32_t res_terminated_cnt; /* Forced termination counter. */ - - -From e481434fe4b5187aad8f25257fcc16fbf30b569e Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Tue, 5 Sep 2017 10:16:07 +0100 -Subject: [PATCH 196/199] vcsm: Replace SM_STATE_T with sm_state_t - -Follow the Linux kernel coding style - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vmcs_sm.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index 08567b018a63cb783d1e66056f64b2d888f10315..39c64c38ce7638592eeb98583fdb2ddee981a9ec 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -174,7 +174,7 @@ struct SM_PRIV_DATA_T { - }; - - /* Global state information. */ --struct SM_STATE_T { -+struct sm_state_t { - struct platform_device *pdev; - struct sm_instance *sm_handle; /* Handle for videocore service. */ - struct dentry *dir_root; /* Debug fs entries root. */ -@@ -206,7 +206,7 @@ struct SM_STATE_T { - - /* ---- Private Variables ----------------------------------------------- */ - --static struct SM_STATE_T *sm_state; -+static struct sm_state_t *sm_state; - static int sm_inited; - - #if 0 -@@ -459,7 +459,7 @@ static unsigned int vmcs_sm_usr_address_from_pid_and_usr_handle(unsigned int - } - - /* Adds a resource mapping to the global data list. */ --static void vmcs_sm_add_map(struct SM_STATE_T *state, -+static void vmcs_sm_add_map(struct sm_state_t *state, - struct sm_resource_t *resource, struct sm_mmap *map) - { - mutex_lock(&(state->map_lock)); -@@ -479,7 +479,7 @@ static void vmcs_sm_add_map(struct SM_STATE_T *state, - } - - /* Removes a resource mapping from the global data list. */ --static void vmcs_sm_remove_map(struct SM_STATE_T *state, -+static void vmcs_sm_remove_map(struct sm_state_t *state, - struct sm_resource_t *resource, - struct sm_mmap *map) - { - -From 7268cef4b7ded9a72301d42efc6c8449b12be89b Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Tue, 5 Sep 2017 10:17:18 +0100 -Subject: [PATCH 197/199] vcsm: Replace SM_PRIV_DATA_T with sm_priv_data_t - -Follows the Linux kernel coding style - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vmcs_sm.c | 54 +++++++++++++++++------------------ - 1 file changed, 27 insertions(+), 27 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index 39c64c38ce7638592eeb98583fdb2ddee981a9ec..9f1ea8269385b9c2cf4f7ab0ca6ba99b3ca12b6c 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -153,12 +153,12 @@ struct sm_resource_t { - struct sg_table *sgt; - dma_addr_t dma_addr; - -- struct SM_PRIV_DATA_T *private; -+ struct sm_priv_data_t *private; - bool map; /* whether to map pages up front */ - }; - - /* Private file data associated with each opened device. */ --struct SM_PRIV_DATA_T { -+struct sm_priv_data_t { - struct list_head resource_list; /* List of resources. */ - - pid_t pid; /* PID of creator. */ -@@ -197,7 +197,7 @@ struct sm_state_t { - struct class *sm_class; /* Class. */ - struct device *sm_dev; /* Device. */ - -- struct SM_PRIV_DATA_T *data_knl; /* Kernel internal data tracking. */ -+ struct sm_priv_data_t *data_knl; /* Kernel internal data tracking. */ - - struct mutex lock; /* Global lock. */ - uint32_t guid; /* GUID (next) tracker. */ -@@ -633,13 +633,13 @@ static int vc_sm_global_statistics_show(struct seq_file *s, void *v) - static int vc_sm_statistics_show(struct seq_file *s, void *v) - { - int ix; -- struct SM_PRIV_DATA_T *file_data; -+ struct sm_priv_data_t *file_data; - struct sm_resource_t *resource; - int res_count = 0; - struct SM_PDE_T *p_pde; - - p_pde = (struct SM_PDE_T *)(s->private); -- file_data = (struct SM_PRIV_DATA_T *)(p_pde->priv_data); -+ file_data = (struct sm_priv_data_t *)(p_pde->priv_data); - - if (file_data == NULL) - return 0; -@@ -690,13 +690,13 @@ static int vc_sm_statistics_show(struct seq_file *s, void *v) - /* Read callback for the allocation proc entry. */ - static int vc_sm_alloc_show(struct seq_file *s, void *v) - { -- struct SM_PRIV_DATA_T *file_data; -+ struct sm_priv_data_t *file_data; - struct sm_resource_t *resource; - int alloc_count = 0; - struct SM_PDE_T *p_pde; - - p_pde = (struct SM_PDE_T *)(s->private); -- file_data = (struct SM_PRIV_DATA_T *)(p_pde->priv_data); -+ file_data = (struct sm_priv_data_t *)(p_pde->priv_data); - - if (!file_data) - return 0; -@@ -764,7 +764,7 @@ static const struct file_operations vc_sm_debug_fs_fops = { - * Adds a resource to the private data list which tracks all the allocated - * data. - */ --static void vmcs_sm_add_resource(struct SM_PRIV_DATA_T *privdata, -+static void vmcs_sm_add_resource(struct sm_priv_data_t *privdata, - struct sm_resource_t *resource) - { - mutex_lock(&(sm_state->map_lock)); -@@ -781,7 +781,7 @@ static void vmcs_sm_add_resource(struct SM_PRIV_DATA_T *privdata, - * Locates a resource and acquire a reference on it. - * The resource won't be deleted while there is a reference on it. - */ --static struct sm_resource_t *vmcs_sm_acquire_resource(struct SM_PRIV_DATA_T -+static struct sm_resource_t *vmcs_sm_acquire_resource(struct sm_priv_data_t - *private, - unsigned int res_guid) - { -@@ -812,7 +812,7 @@ static struct sm_resource_t *vmcs_sm_acquire_resource(struct SM_PRIV_DATA_T - * The resource won't be deleted while there is a reference on it. - */ - static struct sm_resource_t *vmcs_sm_acquire_first_resource( -- struct SM_PRIV_DATA_T *private) -+ struct sm_priv_data_t *private) - { - struct sm_resource_t *resource, *ret = NULL; - -@@ -869,7 +869,7 @@ static struct sm_resource_t *vmcs_sm_acquire_global_resource(unsigned int - */ - static void vmcs_sm_release_resource(struct sm_resource_t *resource, int force) - { -- struct SM_PRIV_DATA_T *private = resource->private; -+ struct sm_priv_data_t *private = resource->private; - struct sm_mmap *map, *map_tmp; - struct sm_resource_t *res_tmp; - int ret; -@@ -990,7 +990,7 @@ static void vmcs_sm_host_walk_map_per_pid(int pid) - * Dump the allocation table from host side point of view. This only dumps the - * data allocated for this process/device referenced by the file_data. - */ --static void vmcs_sm_host_walk_alloc(struct SM_PRIV_DATA_T *file_data) -+static void vmcs_sm_host_walk_alloc(struct sm_priv_data_t *file_data) - { - struct sm_resource_t *resource = NULL; - -@@ -1016,10 +1016,10 @@ static void vmcs_sm_host_walk_alloc(struct SM_PRIV_DATA_T *file_data) - } - - /* Create support for private data tracking. */ --static struct SM_PRIV_DATA_T *vc_sm_create_priv_data(pid_t id) -+static struct sm_priv_data_t *vc_sm_create_priv_data(pid_t id) - { - char alloc_name[32]; -- struct SM_PRIV_DATA_T *file_data = NULL; -+ struct sm_priv_data_t *file_data = NULL; - - /* Allocate private structure. */ - file_data = kzalloc(sizeof(*file_data), GFP_KERNEL); -@@ -1099,8 +1099,8 @@ static int vc_sm_open(struct inode *inode, struct file *file) - */ - static int vc_sm_release(struct inode *inode, struct file *file) - { -- struct SM_PRIV_DATA_T *file_data = -- (struct SM_PRIV_DATA_T *)file->private_data; -+ struct sm_priv_data_t *file_data = -+ (struct sm_priv_data_t *)file->private_data; - struct sm_resource_t *resource; - int ret = 0; - -@@ -1311,8 +1311,8 @@ static void vcsm_vma_cache_clean_page_range(unsigned long addr, - static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) - { - int ret = 0; -- struct SM_PRIV_DATA_T *file_data = -- (struct SM_PRIV_DATA_T *)file->private_data; -+ struct sm_priv_data_t *file_data = -+ (struct sm_priv_data_t *)file->private_data; - struct sm_resource_t *resource = NULL; - struct sm_mmap *map = NULL; - -@@ -1444,7 +1444,7 @@ static int vc_sm_mmap(struct file *file, struct vm_area_struct *vma) - } - - /* Allocate a shared memory handle and block. */ --int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, -+int vc_sm_ioctl_alloc(struct sm_priv_data_t *private, - struct vmcs_sm_ioctl_alloc *ioparam) - { - int ret = 0; -@@ -1555,7 +1555,7 @@ int vc_sm_ioctl_alloc(struct SM_PRIV_DATA_T *private, - } - - /* Share an allocate memory handle and block.*/ --int vc_sm_ioctl_alloc_share(struct SM_PRIV_DATA_T *private, -+int vc_sm_ioctl_alloc_share(struct sm_priv_data_t *private, - struct vmcs_sm_ioctl_alloc_share *ioparam) - { - struct sm_resource_t *resource, *shared_resource; -@@ -1617,7 +1617,7 @@ int vc_sm_ioctl_alloc_share(struct SM_PRIV_DATA_T *private, - } - - /* Free a previously allocated shared memory handle and block.*/ --static int vc_sm_ioctl_free(struct SM_PRIV_DATA_T *private, -+static int vc_sm_ioctl_free(struct sm_priv_data_t *private, - struct vmcs_sm_ioctl_free *ioparam) - { - struct sm_resource_t *resource = -@@ -1643,7 +1643,7 @@ static int vc_sm_ioctl_free(struct SM_PRIV_DATA_T *private, - } - - /* Resize a previously allocated shared memory handle and block. */ --static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, -+static int vc_sm_ioctl_resize(struct sm_priv_data_t *private, - struct vmcs_sm_ioctl_resize *ioparam) - { - int ret = 0; -@@ -1728,7 +1728,7 @@ static int vc_sm_ioctl_resize(struct SM_PRIV_DATA_T *private, - } - - /* Lock a previously allocated shared memory handle and block. */ --static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, -+static int vc_sm_ioctl_lock(struct sm_priv_data_t *private, - struct vmcs_sm_ioctl_lock_unlock *ioparam, - int change_cache, enum vmcs_sm_cache_e cache_type, - unsigned int vc_addr) -@@ -1894,7 +1894,7 @@ static int vc_sm_ioctl_lock(struct SM_PRIV_DATA_T *private, - } - - /* Unlock a previously allocated shared memory handle and block.*/ --static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, -+static int vc_sm_ioctl_unlock(struct sm_priv_data_t *private, - struct vmcs_sm_ioctl_lock_unlock *ioparam, - int flush, int wait_reply, int no_vc_unlock) - { -@@ -2071,7 +2071,7 @@ static int vc_sm_ioctl_unlock(struct SM_PRIV_DATA_T *private, - } - - /* Import a contiguous block of memory to be shared with VC. */ --int vc_sm_ioctl_import_dmabuf(struct SM_PRIV_DATA_T *private, -+int vc_sm_ioctl_import_dmabuf(struct sm_priv_data_t *private, - struct vmcs_sm_ioctl_import_dmabuf *ioparam, - struct dma_buf *src_dma_buf) - { -@@ -2204,8 +2204,8 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - { - int ret = 0; - unsigned int cmdnr = _IOC_NR(cmd); -- struct SM_PRIV_DATA_T *file_data = -- (struct SM_PRIV_DATA_T *)file->private_data; -+ struct sm_priv_data_t *file_data = -+ (struct sm_priv_data_t *)file->private_data; - struct sm_resource_t *resource = NULL; - - /* Validate we can work with this device. */ - -From 68735673c349b79d33822bfe91fc98e54b99f3b9 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Tue, 5 Sep 2017 10:18:33 +0100 -Subject: [PATCH 198/199] vcsm: Replace SM_PDE_T with sm_pde_t - -Follows the Linux kernel coding style - -Signed-off-by: Dave Stevenson ---- - drivers/char/broadcom/vc_sm/vmcs_sm.c | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index 9f1ea8269385b9c2cf4f7ab0ca6ba99b3ca12b6c..160e109d780a7badda9e5474a9d38fa9794d0298 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -101,7 +101,7 @@ static const char *const sm_stats_human_read[] = { - }; - - typedef int (*VC_SM_SHOW) (struct seq_file *s, void *v); --struct SM_PDE_T { -+struct sm_pde_t { - VC_SM_SHOW show; /* Debug fs function hookup. */ - struct dentry *dir_entry; /* Debug fs directory entry. */ - void *priv_data; /* Private data */ -@@ -164,8 +164,8 @@ struct sm_priv_data_t { - pid_t pid; /* PID of creator. */ - - struct dentry *dir_pid; /* Debug fs entries root. */ -- struct SM_PDE_T dir_stats; /* Debug fs entries statistics sub-tree. */ -- struct SM_PDE_T dir_res; /* Debug fs resource sub-tree. */ -+ struct sm_pde_t dir_stats; /* Debug fs entries statistics sub-tree. */ -+ struct sm_pde_t dir_res; /* Debug fs resource sub-tree. */ - - int restart_sys; /* Tracks restart on interrupt. */ - enum vc_sm_msg_type int_action; /* Interrupted action. */ -@@ -179,8 +179,8 @@ struct sm_state_t { - struct sm_instance *sm_handle; /* Handle for videocore service. */ - struct dentry *dir_root; /* Debug fs entries root. */ - struct dentry *dir_alloc; /* Debug fs entries allocations. */ -- struct SM_PDE_T dir_stats; /* Debug fs entries statistics sub-tree. */ -- struct SM_PDE_T dir_state; /* Debug fs entries state sub-tree. */ -+ struct sm_pde_t dir_stats; /* Debug fs entries statistics sub-tree. */ -+ struct sm_pde_t dir_state; /* Debug fs entries state sub-tree. */ - struct dentry *debug; /* Debug fs entries debug. */ - - struct mutex map_lock; /* Global map lock. */ -@@ -636,9 +636,9 @@ static int vc_sm_statistics_show(struct seq_file *s, void *v) - struct sm_priv_data_t *file_data; - struct sm_resource_t *resource; - int res_count = 0; -- struct SM_PDE_T *p_pde; -+ struct sm_pde_t *p_pde; - -- p_pde = (struct SM_PDE_T *)(s->private); -+ p_pde = (struct sm_pde_t *)(s->private); - file_data = (struct sm_priv_data_t *)(p_pde->priv_data); - - if (file_data == NULL) -@@ -693,9 +693,9 @@ static int vc_sm_alloc_show(struct seq_file *s, void *v) - struct sm_priv_data_t *file_data; - struct sm_resource_t *resource; - int alloc_count = 0; -- struct SM_PDE_T *p_pde; -+ struct sm_pde_t *p_pde; - -- p_pde = (struct SM_PDE_T *)(s->private); -+ p_pde = (struct sm_pde_t *)(s->private); - file_data = (struct sm_priv_data_t *)(p_pde->priv_data); - - if (!file_data) -@@ -738,9 +738,9 @@ static int vc_sm_alloc_show(struct seq_file *s, void *v) - - static int vc_sm_seq_file_show(struct seq_file *s, void *v) - { -- struct SM_PDE_T *sm_pde; -+ struct sm_pde_t *sm_pde; - -- sm_pde = (struct SM_PDE_T *)(s->private); -+ sm_pde = (struct sm_pde_t *)(s->private); - - if (sm_pde && sm_pde->show) - sm_pde->show(s, v); - -From 09d3e47d84e7ac57fac2c90607e8a6dda0b82c40 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Tue, 5 Sep 2017 16:24:03 +0100 -Subject: [PATCH 199/199] vcsm: Handle the clean+invalidate case directly - ---- - drivers/char/broadcom/vc_sm/vmcs_sm.c | 66 +++++++++++++++++++++-------------- - 1 file changed, 39 insertions(+), 27 deletions(-) - -diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index 160e109d780a7badda9e5474a9d38fa9794d0298..034ae2f27f870621af9f49453501f1cde051f32a 100644 ---- a/drivers/char/broadcom/vc_sm/vmcs_sm.c -+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c -@@ -218,6 +218,32 @@ static const char *const sm_cache_map_vector[] = { - }; - #endif - -+typedef void cache_flush_op_fn(const void *, const void *); -+ -+#if defined(CONFIG_CPU_CACHE_V7) -+extern cache_flush_op_fn v7_dma_inv_range; -+extern cache_flush_op_fn v7_dma_clean_range; -+static cache_flush_op_fn * const flushops[4] = -+{ -+ 0, -+ v7_dma_inv_range, -+ v7_dma_clean_range, -+ v7_dma_flush_range, -+}; -+#elif defined(CONFIG_CPU_CACHE_V6) -+extern cache_flush_op_fn v6_dma_inv_range; -+extern cache_flush_op_fn v6_dma_clean_range; -+static cache_flush_op_fn * const flushops[4] = -+{ -+ 0, -+ v6_dma_inv_range, -+ v6_dma_clean_range, -+ v6_dma_flush_range, -+}; -+#else -+#error Unknown cache config -+#endif -+ - /* ---- Private Function Prototypes -------------------------------------- */ - - /* ---- Private Functions ------------------------------------------------ */ -@@ -2984,7 +3010,7 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - ret = -EFAULT; - goto out; - } -- block = kcalloc(ioparam.op_count, -+ block = kmalloc(ioparam.op_count * - sizeof(struct vmcs_sm_ioctl_clean_invalid_block), - GFP_KERNEL); - if (!block) { -@@ -3000,35 +3026,21 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - } - - for (i = 0; i < ioparam.op_count; i++) { -- struct vmcs_sm_ioctl_clean_invalid_block *op = block + i; -+ const struct vmcs_sm_ioctl_clean_invalid_block * const op = block + i; -+ cache_flush_op_fn * const op_fn = flushops[op->invalidate_mode & 3]; - -- for (j = 0; j < op->block_count; ++j) { -+ if ((op->invalidate_mode & ~3) != 0) { -+ ret = -EINVAL; -+ break; -+ } - -+ if (op_fn == 0) -+ continue; - -- extern void v6_dma_inv_range(void *start, void *end); -- extern void v6_dma_clean_range(void *start, void *end); -- unsigned long base = (unsigned long)op->start_address + j * op->inter_block_stride; -- unsigned long end = base + op->block_size; -- /* L1/L2 cache clean */ -- if (op->invalidate_mode & 2) { --#if defined(CONFIG_CPU_CACHE_V7) -- extern void v7_dma_clean_range(void *start, void *end); -- v7_dma_clean_range((void *)base, (void *)end); --#elif defined(CONFIG_CPU_CACHE_V6) -- extern void v6_dma_clean_range(void *start, void *end); -- v6_dma_clean_range((void *)base, (void *)end); --#endif -- /* L1/L2 cache invalidate */ -- } -- if (op->invalidate_mode & 1) { --#if defined(CONFIG_CPU_CACHE_V7) -- extern void v7_dma_inv_range(void *start, void *end); -- v7_dma_inv_range((void *)base, (void *)end); --#elif defined(CONFIG_CPU_CACHE_V6) -- extern void v6_dma_inv_range(void *start, void *end); -- v6_dma_inv_range((void *)base, (void *)end); --#endif -- } -+ for (j = 0; j < op->block_count; ++j) { -+ const char * const base = (const char *)op->start_address + j * op->inter_block_stride; -+ const char * const end = base + op->block_size; -+ op_fn(base, end); - } - } - kfree(block); From 97624aff86adb9b9bd93004b8aaf481d0ad1a3f4 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Fri, 13 Oct 2017 14:16:15 +0100 Subject: [PATCH 09/16] linux: update to linux-4.13.4 --- packages/linux/package.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/linux/package.mk b/packages/linux/package.mk index 0c2636a573..6de87f3041 100644 --- a/packages/linux/package.mk +++ b/packages/linux/package.mk @@ -63,8 +63,8 @@ case "$LINUX" in PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET imx6-status-led imx6-soc-fan irqbalanced" ;; *) - PKG_VERSION="4.13.3" - PKG_SHA256="03d22c74a102b66341b6f52e72142f0544cea3b413ca78bffe7d2a09e288caab" + PKG_VERSION="4.13.4" + PKG_SHA256="a09e95eb59de505cec462f3008148bcf7f5b8ed0e9e19f3e129d13a7a8d8f420" PKG_URL="https://www.kernel.org/pub/linux/kernel/v4.x/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_PATCH_DIRS="default" ;; From 7dbcb066861e1a09e776eb70b47634da259eb56a Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Fri, 13 Oct 2017 14:16:15 +0100 Subject: [PATCH 10/16] RPi: update linux support patch for linux 4.13.4 --- .../patches/linux/linux-01-RPi_support.patch | 810 ++++++++++++------ 1 file changed, 552 insertions(+), 258 deletions(-) diff --git a/projects/RPi/patches/linux/linux-01-RPi_support.patch b/projects/RPi/patches/linux/linux-01-RPi_support.patch index 83e925c470..4a3f7ba8bf 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 88902a722552e30b8d6249e486eda1ff04fdfa1f Mon Sep 17 00:00:00 2001 +From c126f85a3ef4bb7a8452acb8302513040ede0232 Mon Sep 17 00:00:00 2001 From: Steve Glendinning Date: Thu, 19 Feb 2015 18:47:12 +0000 -Subject: [PATCH 001/129] smsx95xx: fix crimes against truesize +Subject: [PATCH 001/134] smsx95xx: fix crimes against truesize smsc95xx is adjusting truesize when it shouldn't, and following a recent patch from Eric this is now triggering warnings. @@ -48,10 +48,10 @@ index 340c13484e5cc7dd5001577b7522d5a4318bd5b6..7d3d98f0405ad948f9ab3e035a70e15c usbnet_skb_return(dev, ax_skb); } -From ade4a8cacbaefcb895d993c9381aaeeeee31e673 Mon Sep 17 00:00:00 2001 +From 4dc2f9761aa5b4d60b2537c3ee253de805729347 Mon Sep 17 00:00:00 2001 From: Sam Nazarko Date: Fri, 1 Apr 2016 17:27:21 +0100 -Subject: [PATCH 002/129] smsc95xx: Experimental: Enable turbo_mode and +Subject: [PATCH 002/134] smsc95xx: Experimental: Enable turbo_mode and packetsize=2560 by default See: http://forum.kodi.tv/showthread.php?tid=285288 @@ -94,10 +94,10 @@ index 7d3d98f0405ad948f9ab3e035a70e15c667e4fa1..8d34e517db08d895e6135f785c42bf63 netif_dbg(dev, ifup, dev->net, "rx_urb_size=%ld\n", -From 25192933d19d59a14f37215e2ddbb90579503fa6 Mon Sep 17 00:00:00 2001 +From d722d1411b07a9c16fd03e2f032889961b7c1947 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 003/129] Allow mac address to be set in smsc95xx +Subject: [PATCH 003/134] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -193,10 +193,10 @@ index 8d34e517db08d895e6135f785c42bf639671815c..5df7e105c41532c3185e46ee54f43a37 eth_hw_addr_random(dev->net); netif_dbg(dev, ifup, dev->net, "MAC address set to eth_random_addr\n"); -From d500d2894205e2337ed233cf3e8dfad496ebfe21 Mon Sep 17 00:00:00 2001 +From 28fbd87d522ea5301fda0bc32c1ea3ee0f55de2d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 13 Mar 2015 12:43:36 +0000 -Subject: [PATCH 004/129] Protect __release_resource against resources without +Subject: [PATCH 004/134] Protect __release_resource against resources without parents Without this patch, removing a device tree overlay can crash here. @@ -224,10 +224,10 @@ index 9b5f04404152c296af3a96132f27cfc80ffa9af9..f8a9af6e6b915812be2ba2c1c2b40106 for (;;) { tmp = *p; -From 033e8448f979a939698a76dd416690bee818fb5f Mon Sep 17 00:00:00 2001 +From 907887ac7209429cbad9d425f32151875cfa8972 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 4 Dec 2015 17:41:50 +0000 -Subject: [PATCH 005/129] irq-bcm2836: Prevent spurious interrupts, and trap +Subject: [PATCH 005/134] irq-bcm2836: Prevent spurious interrupts, and trap them early The old arch-specific IRQ macros included a dsb to ensure the @@ -254,10 +254,10 @@ index e7463e3c08143acae3e8cc5682f918c6a0b07ebd..a8db33b50ad9ff83d284fa54fe4d3b65 #endif } else if (stat) { -From a07bbe09f1c828d00b67d894c6892271c26e1b4f Mon Sep 17 00:00:00 2001 +From 6a232939fcdb81eff16aad43c30d518dcf0ca027 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:33:30 +0000 -Subject: [PATCH 006/129] irq-bcm2836: Avoid "Invalid trigger warning" +Subject: [PATCH 006/134] irq-bcm2836: Avoid "Invalid trigger warning" Initialise the level for each IRQ to avoid a warning from the arm arch timer code. @@ -281,10 +281,10 @@ index a8db33b50ad9ff83d284fa54fe4d3b65f859df0f..c4e151451cf8c8ebde5225515eac2786 static void -From 112959db13883e0ff2f9523468ae8da2828b2dfd Mon Sep 17 00:00:00 2001 +From 330b528bfd4a6a88bc68bb7aba5eb68147610eec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 12 Jun 2015 19:01:05 +0200 -Subject: [PATCH 007/129] irqchip: bcm2835: Add FIQ support +Subject: [PATCH 007/134] irqchip: bcm2835: Add FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -413,10 +413,10 @@ index 44d7c38dde479d771f3552e914bf8c1c1f5019f7..42ff5e6a8e0d532f5b60a1e7af7cc4d9 } -From ef67af593f58b62123bbd33bb0cf0f3bc1265e75 Mon Sep 17 00:00:00 2001 +From 6de7ad2320b4a3646bd5f0d5bbd0e921e865e54a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 23 Oct 2015 16:26:55 +0200 -Subject: [PATCH 008/129] irqchip: irq-bcm2835: Add 2836 FIQ support +Subject: [PATCH 008/134] irqchip: irq-bcm2835: Add 2836 FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -515,10 +515,10 @@ index 42ff5e6a8e0d532f5b60a1e7af7cc4d941bd5008..eccf6ed025299cb480884f5bcbe77abf for (b = 0; b < NR_BANKS; b++) { for (i = 0; i < bank_irqs[b]; i++) { -From c91ea2c42ff1dbdb6d9b753128443a47923616b2 Mon Sep 17 00:00:00 2001 +From fd64997995b2ddb95e98145f35687ef1e57892ca Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 8 May 2017 16:43:40 +0100 -Subject: [PATCH 009/129] irq_bcm2836: Send event when onlining sleeping cores +Subject: [PATCH 009/134] irq_bcm2836: Send event when onlining sleeping cores In order to reduce power consumption and bus traffic, it is sensible for secondary cores to enter a low-power idle state when waiting to @@ -554,10 +554,10 @@ index c4e151451cf8c8ebde5225515eac2786d6f61d46..bee4d2d2ebacc3233423bb9d825e076b } -From fdfd3d413d68d2ef3867288479264346469f7431 Mon Sep 17 00:00:00 2001 +From de643cad38610aa424c804a0fae8590a381d6369 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 10:26:09 +0100 -Subject: [PATCH 010/129] spidev: Add "spidev" compatible string to silence +Subject: [PATCH 010/134] spidev: Add "spidev" compatible string to silence warning See: https://github.com/raspberrypi/linux/issues/1054 @@ -578,10 +578,10 @@ index cda10719d1d1b21b32866d2b79363faa461ab8e1..4f3779d3aa0960640506725bde918075 }; MODULE_DEVICE_TABLE(of, spidev_dt_ids); -From 4bea356be10941992f3dcfeac2f7974abb05ed74 Mon Sep 17 00:00:00 2001 +From 8f514d88841d4c243782961ec1968f8f870efcf4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 3 Jan 2017 18:25:01 +0000 -Subject: [PATCH 011/129] Revert "pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP" +Subject: [PATCH 011/134] Revert "pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP" This reverts commit 85ae9e512f437cd09bf61564bdba29ab88bab3e3. --- @@ -880,10 +880,10 @@ index 230883168e99a1a3fecc7916ef0a7e0de7e8b3f1..ff3789a11b3c36b922b9d08035abb638 if (IS_ERR(pc->pctl_dev)) { gpiochip_remove(&pc->gpio_chip); -From 1490a00a1591a44f00f128903052e075456a765c Mon Sep 17 00:00:00 2001 +From 82d8e12faf78a22c262275f150331ac0e3ba7e84 Mon Sep 17 00:00:00 2001 From: notro Date: Thu, 10 Jul 2014 13:59:47 +0200 -Subject: [PATCH 012/129] pinctrl-bcm2835: Set base to 0 give expected gpio +Subject: [PATCH 012/134] pinctrl-bcm2835: Set base to 0 give expected gpio numbering Signed-off-by: Noralf Tronnes @@ -905,10 +905,10 @@ index ff3789a11b3c36b922b9d08035abb638187c2f5a..d2b537572095c86576f78536f737c102 .can_sleep = false, }; -From e60b8d2799a20fab024ac1cff86087763d0c5cd9 Mon Sep 17 00:00:00 2001 +From 4ff754bf83df35759b0f797d8fd4dffeb7cba0ea Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 26 Feb 2015 09:58:22 +0000 -Subject: [PATCH 013/129] pinctrl-bcm2835: Only request the interrupts listed +Subject: [PATCH 013/134] pinctrl-bcm2835: Only request the interrupts listed in the DTB Although the GPIO controller can generate three interrupts (four counting @@ -935,10 +935,10 @@ index d2b537572095c86576f78536f737c102487f99f4..a9d480df32562defbf8be0faf0a39bfe pc->irq_data[i].irqgroup = i; -From b91abfd233fffb8f22735c8428f5a8af367f9387 Mon Sep 17 00:00:00 2001 +From 3333e460bd62167d9a4d0f2610d16f0d67b58744 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Jun 2015 14:10:44 +0100 -Subject: [PATCH 014/129] spi-bcm2835: Support pin groups other than 7-11 +Subject: [PATCH 014/134] spi-bcm2835: Support pin groups other than 7-11 The spi-bcm2835 driver automatically uses GPIO chip-selects due to some unreliability of the native ones. In doing so it chooses the @@ -1019,10 +1019,10 @@ index f35cc10772f6670397ea923ad30158270dd68578..5dfe20ffc2866fa6789825016c585175 /* and set up the "mode" and level */ dev_info(&spi->dev, "setting up native-CS%i as GPIO %i\n", -From 142bcdabeeaad29d9aeecf26cf16c4de71764c7f Mon Sep 17 00:00:00 2001 +From 564577de10650ebf69c28e7f3529a1438b53cf29 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 1 Jul 2016 22:09:24 +0100 -Subject: [PATCH 015/129] spi-bcm2835: Disable forced software CS +Subject: [PATCH 015/134] spi-bcm2835: Disable forced software CS Select software CS in bcm2708_common.dtsi, and disable the automatic conversion in the driver to allow hardware CS to be re-enabled with an @@ -1056,10 +1056,10 @@ index 5dfe20ffc2866fa6789825016c585175a29705b6..8493474d286f7a1ac6454a22c61c8c2c return 0; } -From b32e05f02e7113f460c6cbfa7e28539fc2dd4966 Mon Sep 17 00:00:00 2001 +From 8ed958150abacb645ccad7ec1261ef68ba76238e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 8 Nov 2016 21:35:38 +0000 -Subject: [PATCH 016/129] spi-bcm2835: Remove unused code +Subject: [PATCH 016/134] spi-bcm2835: Remove unused code --- drivers/spi/spi-bcm2835.c | 61 ----------------------------------------------- @@ -1147,10 +1147,10 @@ index 8493474d286f7a1ac6454a22c61c8c2cef9121bf..33d75ad38a7f77d085321ace9101900a } -From 59fa945c6c2a113a1a19d0d80df344b5d53efe91 Mon Sep 17 00:00:00 2001 +From e55862ba66142fc0693c2c0a8efcbd61dd02dcc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Wed, 3 Jun 2015 12:26:13 +0200 -Subject: [PATCH 017/129] ARM: bcm2835: Set Serial number and Revision +Subject: [PATCH 017/134] ARM: bcm2835: Set Serial number and Revision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1203,10 +1203,10 @@ index 0c1edfc98696da0e0bb7f4a18cdfbcdd27a9795d..8f152266ba9b470df2eaaed9ebcf158e static const char * const bcm2835_compat[] = { -From 851f7772f6ef6d244cddc90cdb8fd50d82193aca Mon Sep 17 00:00:00 2001 +From a84fe045ee6c945513339d64348108165516242a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 3 Oct 2015 22:22:55 +0200 -Subject: [PATCH 018/129] dmaengine: bcm2835: Load driver early and support +Subject: [PATCH 018/134] dmaengine: bcm2835: Load driver early and support legacy API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -1309,10 +1309,10 @@ index 6204cc32d09c5096df8aec304c3c37b3bcb6be44..599c218dc8a73172dd4bd4a058fc8f95 MODULE_ALIAS("platform:bcm2835-dma"); MODULE_DESCRIPTION("BCM2835 DMA engine driver"); -From 1baf343ec1f8cecd2bd4b59f38428c08dabea9a5 Mon Sep 17 00:00:00 2001 +From 230fbc29abc1f87c97c07300ee377979fa940e10 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 25 Jan 2016 17:25:12 +0000 -Subject: [PATCH 019/129] firmware: Updated mailbox header +Subject: [PATCH 019/134] firmware: Updated mailbox header --- include/soc/bcm2835/raspberrypi-firmware.h | 9 +++++++++ @@ -1373,10 +1373,10 @@ index cb979ad90401e299344dd5fae38d09c489d8bd58..30fb37fe175df604a738258a2a632bca RPI_FIRMWARE_VCHIQ_INIT = 0x00048010, -From 45420f837ce4f053696b2e43d082b9f51082fb94 Mon Sep 17 00:00:00 2001 +From faf484ee4d3b4c212349d473dd9e4392b8cc75c0 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 15 Jun 2016 16:48:41 +0100 -Subject: [PATCH 020/129] rtc: Add SPI alias for pcf2123 driver +Subject: [PATCH 020/134] rtc: Add SPI alias for pcf2123 driver Without this alias, Device Tree won't cause the driver to be loaded. @@ -1396,10 +1396,10 @@ index 8895f77726e8da5444afcd602dceff8f25a9b3fd..1833b8853ceb0e6147cceb93a00e558c MODULE_LICENSE("GPL"); +MODULE_ALIAS("spi:rtc-pcf2123"); -From 6e7df38d91f738603798f9c5c0e24b191265f187 Mon Sep 17 00:00:00 2001 +From 0e188fba7c9e5f26acdb4479143957a592958a76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 7 Oct 2016 16:50:59 +0200 -Subject: [PATCH 021/129] watchdog: bcm2835: Support setting reboot partition +Subject: [PATCH 021/134] watchdog: bcm2835: Support setting reboot partition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1501,10 +1501,10 @@ index b339e0e67b4c1275fd4992fea4f1e24c0575b783..26b7177573fac2af1cd4ab5488d2686f static int bcm2835_wdt_probe(struct platform_device *pdev) -From ff7e96d10d16caddbe8019ab989a4f5394f4d8a5 Mon Sep 17 00:00:00 2001 +From 709ae2e131a6a57f5095bc2a8898e0dc5c14c83f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 5 Apr 2016 19:40:12 +0100 -Subject: [PATCH 022/129] reboot: Use power off rather than busy spinning when +Subject: [PATCH 022/134] reboot: Use power off rather than busy spinning when halt is requested --- @@ -1527,10 +1527,10 @@ index 3b2aa9a9fe268d45335f781c4aa22cf573753a1b..0180d89a34af45c56243fe0f17fbe209 /* -From 9285772bbe4713f5ae62666f915fadf142945771 Mon Sep 17 00:00:00 2001 +From 39d2393b894dd5c6c2e10cfca375d3312803e2c4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 9 Nov 2016 13:02:52 +0000 -Subject: [PATCH 023/129] bcm: Make RASPBERRYPI_POWER depend on PM +Subject: [PATCH 023/134] bcm: Make RASPBERRYPI_POWER depend on PM --- drivers/soc/bcm/Kconfig | 1 + @@ -1549,10 +1549,10 @@ index 49f1e2a75d614bc21db152327c7b425ae2504f8d..dccd2374ed00631abd441e3e9d78ee74 help This enables support for the RPi power domains which can be enabled -From dbe71688c63bb1f60fed3b9de5a92884d9646b5a Mon Sep 17 00:00:00 2001 +From dd56fb2edb2b69c9715bd0f65ec5a4c7245f4356 Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Fri, 2 Sep 2016 16:45:27 +0100 -Subject: [PATCH 024/129] Register the clocks early during the boot process, so +Subject: [PATCH 024/134] Register the clocks early during the boot process, so that special/critical clocks can get enabled early on in the boot process avoiding the risk of disabling a clock, pll_divider or pll when a claiming driver fails to install propperly - maybe it needs to defer. @@ -1597,10 +1597,10 @@ index 58ce6af8452db9ca8b4d3c380a06e448919f6a8d..11d89d106026f15719ea25047d6f357b MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("BCM2835 clock driver"); -From 5f3e30fa16d92cb9a91ea15481218a4509373809 Mon Sep 17 00:00:00 2001 +From bb124ac8bd0c0aafd3e6d28f5df5cdac6294d74c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 6 Dec 2016 17:05:39 +0000 -Subject: [PATCH 025/129] bcm2835-rng: Avoid initialising if already enabled +Subject: [PATCH 025/134] bcm2835-rng: Avoid initialising if already enabled Avoids the 0x40000 cycles of warmup again if firmware has already used it --- @@ -1626,10 +1626,10 @@ index 574211a495491d9d6021dcaefe4274a63ed02055..e66c0fca8c6090e32f72796c0877a1cf err = hwrng_register(&bcm2835_rng_ops); if (err) { -From 95a3415f7b64beaf568d328bc4b0c04b1276e216 Mon Sep 17 00:00:00 2001 +From 7626e25dc267151b31d06c04bed9fd924bcd0fa8 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Aug 2016 16:28:44 +0100 -Subject: [PATCH 026/129] kbuild: Ignore dtco targets when filtering symbols +Subject: [PATCH 026/134] kbuild: Ignore dtco targets when filtering symbols --- scripts/Kbuild.include | 2 +- @@ -1649,10 +1649,10 @@ index 9ffd3dda3889c56a7a72229bed21ff5c49d62856..00da6c9bacbf33334233e22ca5209ade esac | tr ";" "\n" | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/KSYM_\1/p' -From 7f5a3c3e22445e1c935f15060d93a6b823446ebf Mon Sep 17 00:00:00 2001 +From 123c46723868a13728c6e8398691c2ae57932da6 Mon Sep 17 00:00:00 2001 From: Robert Tiemann Date: Mon, 20 Jul 2015 11:01:25 +0200 -Subject: [PATCH 027/129] BCM2835_DT: Fix I2S register map +Subject: [PATCH 027/134] BCM2835_DT: Fix I2S register map --- Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt | 4 ++-- @@ -1690,10 +1690,10 @@ index 65783de0aedf3da79adc36fd077b7a89954ddb6b..a89fe4220fdc3f26f75ee66daf187554 dmas = <&dma 2>, <&dma 3>; -From 93f660db6c7099c40cd8c16d83ae7ff0f9b18861 Mon Sep 17 00:00:00 2001 +From 5c200cdf2569a9dff3ff61769b4707466634bc95 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 -Subject: [PATCH 028/129] clk-bcm2835: Mark used PLLs and dividers CRITICAL +Subject: [PATCH 028/134] clk-bcm2835: Mark used PLLs and dividers CRITICAL The VPU configures and relies on several PLLs and dividers. Mark all enabled dividers and their PLLs as CRITICAL to prevent the kernel from @@ -1721,10 +1721,10 @@ index 11d89d106026f15719ea25047d6f357b4bfcb2c5..fe8f5d65f2749cb3ddc878df61664826 divider->data = data; -From f15722cc677ff919810f2c3bc95da69b413abb8e Mon Sep 17 00:00:00 2001 +From 769058fcf3c3fbc5d886d793f8146123c1c3a1f5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 -Subject: [PATCH 029/129] clk-bcm2835: Add claim-clocks property +Subject: [PATCH 029/134] clk-bcm2835: Add claim-clocks property The claim-clocks property can be used to prevent PLLs and dividers from being marked as critical. It contains a vector of clock IDs, @@ -1826,10 +1826,10 @@ index fe8f5d65f2749cb3ddc878df616648267441e0ee..92b5e0f5145b32d3bfc3592fe381e8be sizeof(cprman_parent_names)); of_clk_parent_fill(dev->of_node, cprman->real_parent_names, -From 50b91b4c4a65d4ff603623a46c8888c87ce1734b Mon Sep 17 00:00:00 2001 +From 77c9810b13096f46aec90a29f407d9519c7fb41e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 6 Mar 2017 09:06:18 +0000 -Subject: [PATCH 030/129] clk-bcm2835: Read max core clock from firmware +Subject: [PATCH 030/134] clk-bcm2835: Read max core clock from firmware The VPU is responsible for managing the core clock, usually under direction from the bcm2835-cpufreq driver but not via the clk-bcm2835 @@ -1944,10 +1944,10 @@ index 92b5e0f5145b32d3bfc3592fe381e8be3cd90c72..336f8c9c44325d0a94e591a8557f7af2 for (i = 0; !of_property_read_u32_index(pdev->dev.of_node, "claim-clocks", -From 2fe9423b6ac762dcf113b5f21ba1de91bbec1b4c Mon Sep 17 00:00:00 2001 +From 6a2711951d54250553e13bf5932a4f0baf57a83f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 9 May 2016 17:28:18 -0700 -Subject: [PATCH 031/129] clk: bcm2835: Mark GPIO clocks enabled at boot as +Subject: [PATCH 031/134] clk: bcm2835: Mark GPIO clocks enabled at boot as critical. These divide off of PLLD_PER and are used for the ethernet and wifi @@ -1985,10 +1985,10 @@ index 336f8c9c44325d0a94e591a8557f7af246adc857..caa05e5ad0b7b5cd683e04fb3591a3df * rate changes on at least of the parents. */ -From 54e5cd6f19e27a6aa5480cab1cb5f419132de958 Mon Sep 17 00:00:00 2001 +From 5a530d71384e36c00a27f1a3faf12cb80f746601 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:36:44 +0000 -Subject: [PATCH 032/129] sound: Demote deferral errors to INFO level +Subject: [PATCH 032/134] sound: Demote deferral errors to INFO level At present there is no mechanism to specify driver load order, which can lead to deferrals and repeated retries until successful. @@ -2023,10 +2023,10 @@ index 13c875e2392a40ec5651d7c12a28b9ac9f3aab85..23d56057e49b5ff6b6c3c352c150fee8 goto _err_defer; } -From 8f6a785e3320079f9a2bca412fa103bb12dbb63f Mon Sep 17 00:00:00 2001 +From f3df72ebfb8e407402e9de76ce88fe8fe06b64e4 Mon Sep 17 00:00:00 2001 From: Claggy3 Date: Sat, 11 Feb 2017 14:00:30 +0000 -Subject: [PATCH 033/129] Update vfpmodule.c +Subject: [PATCH 033/134] Update vfpmodule.c Christopher Alexander Tobias Schulze - May 2, 2015, 11:57 a.m. This patch fixes a problem with VFP state save and restore related @@ -2163,10 +2163,10 @@ index a71a48e71fffa8626fe90106815376c44bbe679b..d6c0a5a0a5ae3510db3ace5e3f5d3410 /* * Save the userland NEON/VFP state. Under UP, -From f9b54f14e038729bbec2b16ee15975993681d288 Mon Sep 17 00:00:00 2001 +From 84ee4ee351dd2bd92650cb5f29a757b97d003f52 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Mar 2017 21:13:24 +1100 -Subject: [PATCH 034/129] ASoC: bcm2835_i2s.c: relax the ch2 register setting +Subject: [PATCH 034/134] ASoC: bcm2835_i2s.c: relax the ch2 register setting for 8 channels This patch allows ch2 registers to be set for 8 channels of audio. @@ -2187,10 +2187,10 @@ index 6ba20498202ed36906b52096893a88867a79269f..56df7d8a43d0aac055a91b0d24aca8e1 format |= BCM2835_I2S_CH1(BCM2835_I2S_CHPOS(ch1pos)); format |= BCM2835_I2S_CH2(BCM2835_I2S_CHPOS(ch2pos)); -From f2a96f0a5b4f2a91884e0e7fcfeb8099e044821f Mon Sep 17 00:00:00 2001 +From 44ae1a1c279b95a4c641da34e07eb43005fc48ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Tue, 1 Nov 2016 15:15:41 +0100 -Subject: [PATCH 035/129] i2c: bcm2835: Add debug support +Subject: [PATCH 035/134] i2c: bcm2835: Add debug support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2379,10 +2379,10 @@ index cd07a69e2e9355540442785f95e90823b05c9d10..47167f403cc8329bd811b47c7011c299 if (i2c_dev->msg_err & BCM2835_I2C_S_ERR) return -EREMOTEIO; -From e30fc8d777e15b35526ad0427c2177b099dee7b1 Mon Sep 17 00:00:00 2001 +From c7e9b4324849ec435b301a53d695d1f998f9fab4 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 18 Dec 2014 16:07:15 -0800 -Subject: [PATCH 036/129] mm: Remove the PFN busy warning +Subject: [PATCH 036/134] mm: Remove the PFN busy warning See commit dae803e165a11bc88ca8dbc07a11077caf97bbcb -- the warning is expected sometimes when using CMA. However, that commit still spams @@ -2407,10 +2407,10 @@ index 1423da8dd16f5bdc83e20ddf6665b2022a9a6492..6ce930c02160d55dc4eee1e7197a5efa goto done; } -From bf033ea532a9005ade064ce2afc23be81ee7b545 Mon Sep 17 00:00:00 2001 +From df94e12cb7dd9a3657dbb1f0e81d98a181f3d8cd Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 10:06:56 +0000 -Subject: [PATCH 037/129] ASoC: Add prompt for ICS43432 codec +Subject: [PATCH 037/134] ASoC: Add prompt for ICS43432 codec Without a prompt string, a config setting can't be included in a defconfig. Give CONFIG_SND_SOC_ICS43432 a prompt so that Pi soundcards @@ -2435,10 +2435,10 @@ index 6c78b0b49b8145c24740d93c4174c059d91ddae9..d6450d5fc144737f967b8e00678baa9b config SND_SOC_INNO_RK3036 tristate "Inno codec driver for RK3036 SoC" -From 7716560b318c6a16a4ceb38da22d6c595e63fbf4 Mon Sep 17 00:00:00 2001 +From 62c4cf83231254d63f7bb205fc8743591072c9ce Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 18 May 2017 15:36:46 +0100 -Subject: [PATCH 038/129] staging: bcm2835-audio: Fix memory corruption +Subject: [PATCH 038/134] staging: bcm2835-audio: Fix memory corruption I'm all for fixing memory leaks, but freeing a block while it is still being used is a recipe for hard-to-debug kernel exeptions. @@ -2473,10 +2473,10 @@ index 5f3d8f2339e34834d11edfa8de1d5819e3e32b4f..89f96f3c02805f4114ec9b488e18d00e return ret; } -From 168be2ce0a4e8cb82477498fd0c2d2b52dea3d6a Mon Sep 17 00:00:00 2001 +From 0b78c9ffe7de3ea37708d666357e006b6fa02c9d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 039/129] Main bcm2708/bcm2709 linux port +Subject: [PATCH 039/134] Main bcm2708/bcm2709 linux port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2664,10 +2664,10 @@ index cfb4b4496dd9f61362dea012176c146120fada07..d9c6c217c4d6a2408abe2665bf7f2700 MODULE_AUTHOR("Lubomir Rintel "); MODULE_DESCRIPTION("BCM2835 mailbox IPC driver"); -From 4a742c0460e2d8993349b9142603d7b16593c446 Mon Sep 17 00:00:00 2001 +From b614f0993996a586e1067b84dc8c9a3781f7d66e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 040/129] Add dwc_otg driver +Subject: [PATCH 040/134] Add dwc_otg driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -63941,10 +63941,10 @@ index 0000000000000000000000000000000000000000..cdc9963176e5a4a0d5250613b61e26c5 +test_main(); +0; -From 20e2c528fbc615b591f94a474454671f53cf3d98 Mon Sep 17 00:00:00 2001 +From d5ec72f68f13ad6aa9698ddefcd74fa29bb148eb Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 17:06:34 +0100 -Subject: [PATCH 041/129] bcm2708 framebuffer driver +Subject: [PATCH 041/134] bcm2708 framebuffer driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -67403,10 +67403,10 @@ index 3c14e43b82fefe1d32f591d1b2f61d2cd28d0fa8..7626beb6a5bb8df601ddf0f6e6909d1f +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 c552685dec9406ed78b0ff592da21eda44757cbc Mon Sep 17 00:00:00 2001 +From bb813148e1a0b72a63cd63e30ffd49d6b687b828 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 042/129] dmaengine: Add support for BCM2708 +Subject: [PATCH 042/134] dmaengine: Add support for BCM2708 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -68037,10 +68037,10 @@ index 0000000000000000000000000000000000000000..c5bfff2765be4606077e6c8af73040ec + +#endif /* _PLAT_BCM2708_DMA_H */ -From 2cfc86aae7690a80ab6d6ece491ceaff33e70ca3 Mon Sep 17 00:00:00 2001 +From db475f46a1d100d823b7f182a271c5b327fe85bd Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:06 +0100 -Subject: [PATCH 043/129] MMC: added alternative MMC driver +Subject: [PATCH 043/134] MMC: added alternative MMC driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -69920,10 +69920,10 @@ index 46c73e97e61f08a41d9753079345f5965caebbc5..388c551ed11e9d06ea1c25b6553d47a8 unsigned int erase_size; /* erase size in sectors */ -From 2effda8db6e55c7b4c9edad900cfddfd9e2597bc Mon Sep 17 00:00:00 2001 +From 311a1a2a10fd212784ca55e0a5f9b1cd0990f0f4 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Mar 2015 17:49:47 +0000 -Subject: [PATCH 044/129] Adding bcm2835-sdhost driver, and an overlay to +Subject: [PATCH 044/134] Adding bcm2835-sdhost driver, and an overlay to enable it BCM2835 has two SD card interfaces. This driver uses the other one. @@ -72329,10 +72329,10 @@ index 0000000000000000000000000000000000000000..9c6f199a7830959f31012d86bc1f8b1a +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Phil Elwell"); -From 7f0672a5e885d310c886283944dcbb1ebf4263d0 Mon Sep 17 00:00:00 2001 +From 91c2214a554425ca42419323565e772344062e1c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 28 Oct 2016 15:36:43 +0100 -Subject: [PATCH 045/129] vc_mem: Add vc_mem driver for querying firmware +Subject: [PATCH 045/134] vc_mem: Add vc_mem driver for querying firmware memory addresses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -72857,10 +72857,10 @@ index 0000000000000000000000000000000000000000..20a475377eb3078ea1ecaef2b24efc35 + +#endif /* _VC_MEM_H */ -From dd72d988c292f9e7287701360e6af45438b59831 Mon Sep 17 00:00:00 2001 +From 701ef83b2f016c20884b9faae7cd66d3bd56913d Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Tue, 22 Jul 2014 15:41:04 +0100 -Subject: [PATCH 046/129] vcsm: VideoCore shared memory service for BCM2835 +Subject: [PATCH 046/134] vcsm: VideoCore shared memory service for BCM2835 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -77734,10 +77734,10 @@ index 0000000000000000000000000000000000000000..b75729d762f25aace133f7a008633b40 + +#endif /* __VMCS_SM_IOCTL_H__INCLUDED__ */ -From 3799b1cc77322f1925aa87ca58b77989ca5a689e Mon Sep 17 00:00:00 2001 +From f3a26295cfaebafafe862e4c42dbbe82f7226a31 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Fri, 21 Aug 2015 23:14:48 +0100 -Subject: [PATCH 047/129] Add /dev/gpiomem device for rootless user GPIO access +Subject: [PATCH 047/134] Add /dev/gpiomem device for rootless user GPIO access Signed-off-by: Luke Wren @@ -78045,10 +78045,10 @@ index 0000000000000000000000000000000000000000..f5e7f1ba8fb6f18dee77fad06a17480c +MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace"); +MODULE_AUTHOR("Luke Wren "); -From 6cb24300772167b1c4bb07a7985d025cb508380a Mon Sep 17 00:00:00 2001 +From 34e57fbf898b8a2a78bdc5d072f00c8d09c774c6 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:14:45 +0100 -Subject: [PATCH 048/129] Add SMI driver +Subject: [PATCH 048/134] Add SMI driver Signed-off-by: Luke Wren --- @@ -79999,10 +79999,10 @@ index 0000000000000000000000000000000000000000..ee3a75edfc033eeb0d90a687ffb68b10 + +#endif /* BCM2835_SMI_H */ -From aeb4c4d9a548d638db0b305484e0b764fa20d82d Mon Sep 17 00:00:00 2001 +From 35b24e58b762f62bef4dcc55c779cd6d811c064a Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Tue, 26 Apr 2016 14:59:21 +0000 -Subject: [PATCH 049/129] MISC: bcm2835: smi: use clock manager and fix reload +Subject: [PATCH 049/134] MISC: bcm2835: smi: use clock manager and fix reload issues Use clock manager instead of self-made clockmanager. @@ -80172,10 +80172,10 @@ index 63a4ea08b9930a3a31a985f0a1d969b488ed49ec..1261540703127d1d63b9f3c87042c6e5 return 0; } -From 0597e8bf3e75f13e7cfdc469efe8abe23d01d2b1 Mon Sep 17 00:00:00 2001 +From e9a8264ba1c07ff56076871fe12dac481e909adc Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:16:10 +0100 -Subject: [PATCH 050/129] Add SMI NAND driver +Subject: [PATCH 050/134] Add SMI NAND driver Signed-off-by: Luke Wren --- @@ -80540,10 +80540,10 @@ index 0000000000000000000000000000000000000000..02adda6da18bd0ba9ab19a104975b79d + ("Driver for NAND chips using Broadcom Secondary Memory Interface"); +MODULE_AUTHOR("Luke Wren "); -From 1053b28a97453d1b844f569a035e7a9024087ebe Mon Sep 17 00:00:00 2001 +From ea66e2dd87d561192a5689065f25d5e314be168f Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 051/129] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 051/134] 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 @@ -81403,10 +81403,10 @@ index 0000000000000000000000000000000000000000..fb69624ccef00ddbdccf8256d6baf1b1 + +#endif -From f1a2739582a18d8e0694b78191dc6226473e94e5 Mon Sep 17 00:00:00 2001 +From 4f05b23e7510838b73aeb40dbd2444923a3111f6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 052/129] Add cpufreq driver +Subject: [PATCH 052/134] Add cpufreq driver Signed-off-by: popcornmix @@ -81670,10 +81670,10 @@ index 0000000000000000000000000000000000000000..99345969b0e4d651fd9033d67de2febb +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); -From bdcf2fea9d9494b1bde5be20708639a899caabc4 Mon Sep 17 00:00:00 2001 +From 648b7875938337118b7d4246a937feee0b6ee671 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 15:44:08 +0100 -Subject: [PATCH 053/129] Add Chris Boot's i2c driver +Subject: [PATCH 053/134] Add Chris Boot's i2c driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -82338,10 +82338,10 @@ index 0000000000000000000000000000000000000000..962f2e5c7455d91bf32925d785f5f16b +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); -From b3412fd2008d4fc5ef921840c534e637a6acc44e Mon Sep 17 00:00:00 2001 +From 01d090118e494c2acc2056857fc434629f38eb83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:27:06 +0200 -Subject: [PATCH 054/129] char: broadcom: Add vcio module +Subject: [PATCH 054/134] char: broadcom: Add vcio module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -82566,10 +82566,10 @@ index 0000000000000000000000000000000000000000..c19bc2075c77879563ef5e59038b5a14 +MODULE_DESCRIPTION("Mailbox userspace access"); +MODULE_LICENSE("GPL"); -From 904187645d8f723be83183d949edd5f4934b2962 Mon Sep 17 00:00:00 2001 +From b52a861362a21862fb921466c93558755b06cdec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:25:01 +0200 -Subject: [PATCH 055/129] firmware: bcm2835: Support ARCH_BCM270x +Subject: [PATCH 055/134] firmware: bcm2835: Support ARCH_BCM270x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -82652,10 +82652,10 @@ index dd506cd3a5b874f9e1acd07efb8cd151bb6145d1..3f070bd38a91511c986e3fb114b15bd4 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("Raspberry Pi firmware driver"); -From be3055df75011cc2027acab5bf2f294e0543e02f Mon Sep 17 00:00:00 2001 +From b74bdbc6086750c73838defe0da7cd0591727559 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 May 2015 09:00:42 +0100 -Subject: [PATCH 056/129] scripts: Add mkknlimg and knlinfo scripts from tools +Subject: [PATCH 056/134] scripts: Add mkknlimg and knlinfo scripts from tools repo The Raspberry Pi firmware looks for a trailer on the kernel image to @@ -83182,10 +83182,10 @@ index 0000000000000000000000000000000000000000..84be2593ec1de8f97b0167ff06b3e05d + return $trailer; +} -From c063b1ed6fac8ef79ccb0c14ef662515e93787f5 Mon Sep 17 00:00:00 2001 +From 74bbf306c59e9858db7a1a74fcad6ba478e0b885 Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:46:08 +0200 -Subject: [PATCH 057/129] BCM2708: Add core Device Tree support +Subject: [PATCH 057/134] BCM2708: Add core Device Tree support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -95422,10 +95422,10 @@ index 58c05e5d9870b6c18a72da7dc44ff3112994946d..9842523b225a88505d796cc689c04f40 # Bzip2 -From 7d2419fe14520e8c16bc9774196f876552f1b282 Mon Sep 17 00:00:00 2001 +From 306c8bbe633e204bfe1e8343bb64610f7848d9d7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Feb 2015 13:50:57 +0000 -Subject: [PATCH 058/129] BCM270x_DT: Add pwr_led, and the required "input" +Subject: [PATCH 058/134] BCM270x_DT: Add pwr_led, and the required "input" trigger The "input" trigger makes the associated GPIO an input. This is to support @@ -95600,10 +95600,10 @@ index 64c56d454f7df9f864a5242ce4212df586f66886..3fd74c8737871cb56f0355c858fc135e /* set_brightness_work / blink_timer flags, atomic, private. */ unsigned long work_flags; -From 9a26bfaab4ad8bd052a8f59dc9d8993dbb8b9fed Mon Sep 17 00:00:00 2001 +From 1cc0bcba126845ad37f21ac08457009d669e4c55 Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 059/129] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 059/134] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -95871,10 +95871,10 @@ index fb795c3b3c178ad3cd7c9e9e4547ffd492bac181..703fa8a70574323abe2fb32599254582 __u32 dx; /* screen-relative */ __u32 dy; -From 43d7209556b61a818e15c77d72de6bb7548a5761 Mon Sep 17 00:00:00 2001 +From 72671d1c6e3543337ef5adc95b8c28d43684da2e Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 060/129] Speed up console framebuffer imageblit function +Subject: [PATCH 060/134] 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 @@ -96083,10 +96083,10 @@ index a2bb276a8b2463eee98eb237c4647bc00cd93601..436494fba15abecb400ef28688466faf start_index, pitch_index); } else -From 042d112e55c00d8ae7f286046b57d2ddd1384623 Mon Sep 17 00:00:00 2001 +From e231cb36b0fac4c5c95dd94f11dd8609f560fce4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 061/129] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 061/134] 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 @@ -96336,10 +96336,10 @@ index 90cbe7e65059f6b604a87c6bf39cd9bbeae7684c..a52be51ee0a5511a75d4eaa8dacaec5e u8, w1_slave_found_callback); }; -From 2cc6a69a583cb3acc2d7a2e316fa44ff1c0686b6 Mon Sep 17 00:00:00 2001 +From 9046cc4ffa4b2cc454266b3ccdf1f88bbc641599 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 14 Jul 2014 22:02:09 +0100 -Subject: [PATCH 062/129] hid: Reduce default mouse polling interval to 60Hz +Subject: [PATCH 062/134] hid: Reduce default mouse polling interval to 60Hz Reduces overhead when using X --- @@ -96371,10 +96371,10 @@ index c008847e0b20a2accb00451b10fb1c648f67925b..4a86428a3b4e3d51e9ac6ce9c9c11097 break; case HID_GD_JOYSTICK: -From e150996c934660931e40cfdb468214a6644fa72e Mon Sep 17 00:00:00 2001 +From a398921bfc56fdd8326f03fa6a71d9e4ded33fbb Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Tue, 12 May 2015 14:47:56 +0100 -Subject: [PATCH 063/129] rpi-ft5406: Add touchscreen driver for pi LCD display +Subject: [PATCH 063/134] rpi-ft5406: Add touchscreen driver for pi LCD display Fix driver detection failure Check that the buffer response is non-zero meaning the touchscreen was detected @@ -96732,10 +96732,10 @@ index 30fb37fe175df604a738258a2a632bca3bfff33f..4a3d79d3b48eb483a4e4bf498f617515 RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From c0f35fbee29bc94de57a819bb31ee7f04e819c3d Mon Sep 17 00:00:00 2001 +From bdf51b34fe1b57df673ab6deae87e20970c3e44d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 28 Nov 2016 16:50:04 +0000 -Subject: [PATCH 064/129] Improve __copy_to_user and __copy_from_user +Subject: [PATCH 064/134] Improve __copy_to_user and __copy_from_user performance Provide a __copy_from_user that uses memcpy. On BCM2708, use @@ -98310,10 +98310,10 @@ index 17ec37811c32f09126ed42753037e055c5cec115..c08f81812d0d56a0d90c1eb6777d0622 bool "Broadcom BCM63xx DSL SoC" depends on ARCH_MULTI_V7 -From 3ff9947d7af341718091959a025eab82abfd0d79 Mon Sep 17 00:00:00 2001 +From 01c2edd711a41cc2e8104b27bd8de5c356ba8323 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 25 Jun 2015 12:16:11 +0100 -Subject: [PATCH 065/129] gpio-poweroff: Allow it to work on Raspberry Pi +Subject: [PATCH 065/134] gpio-poweroff: Allow it to work on Raspberry Pi The Raspberry Pi firmware manages the power-down and reboot process. To do this it installs a pm_power_off handler, causing @@ -98348,10 +98348,10 @@ index be3d81ff51cc3f510d85e4eed7a52960e51e7bc1..a030ae9fb1fca325061c093696e82186 "%s: pm_power_off function already registered", __func__); -From d37d450d370dd100442281c2e6c3beae62f29db1 Mon Sep 17 00:00:00 2001 +From 51b10e3316437f7d430fc9ed4a95ea0412f37a04 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 14:32:47 +0100 -Subject: [PATCH 066/129] mfd: Add Raspberry Pi Sense HAT core driver +Subject: [PATCH 066/134] mfd: Add Raspberry Pi Sense HAT core driver --- drivers/input/joystick/Kconfig | 8 + @@ -99216,10 +99216,10 @@ index 0000000000000000000000000000000000000000..56196dc2af10e464a1e3f98b028dca1c + +#endif -From 3f730e36e6c7f445aa3322d256cc1d20e507fb22 Mon Sep 17 00:00:00 2001 +From 3f4cd1b697fc741f6cf21948f4dda3d77033ec0f Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 -Subject: [PATCH 067/129] ASoC: Add support for HifiBerry DAC +Subject: [PATCH 067/134] ASoC: Add support for HifiBerry DAC This adds a machine driver for the HifiBerry DAC. It is a sound card that can @@ -99394,10 +99394,10 @@ index 0000000000000000000000000000000000000000..ee9f133953544629282631e5ef3f73fe +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); -From 822c013b4add8faace26366e5e0b833634a76624 Mon Sep 17 00:00:00 2001 +From a66a4a0097c3c8478933e0b62aa2f3db8170553f Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 25 Jan 2016 15:48:59 +0000 -Subject: [PATCH 068/129] ASoC: Add support for Rpi-DAC +Subject: [PATCH 068/134] ASoC: Add support for Rpi-DAC --- sound/soc/bcm/Kconfig | 7 +++ @@ -99681,10 +99681,10 @@ index 0000000000000000000000000000000000000000..afe1b419582aa40c4b2729d242bb13cd +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From 5b7c196681661799820cbcae36ff74ee4f1c0f16 Mon Sep 17 00:00:00 2001 +From 0b8e2646ac87a6925791a6b7cae3a41d174e4b6f Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 -Subject: [PATCH 069/129] ASoC: wm8804: Implement MCLK configuration options, +Subject: [PATCH 069/134] 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 @@ -99733,10 +99733,10 @@ index af95d648265b3e92e345101542b332aee35191d4..513f56ba132929662802d15cdc653af3 .component_driver = { .dapm_widgets = wm8804_dapm_widgets, -From eb63ac8b4513898b305350779dcd03c5359841cb Mon Sep 17 00:00:00 2001 +From 4ab07494417416c9e5390d051d2b13900ecb7684 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 -Subject: [PATCH 070/129] ASoC: BCM:Add support for HiFiBerry Digi. Driver is +Subject: [PATCH 070/134] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patched WM8804 driver. Signed-off-by: Daniel Matuschek @@ -100080,10 +100080,10 @@ index 0000000000000000000000000000000000000000..7620dd02de40b6d644ff038b445d375d +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); -From 9307ad8fccbfd25cf21b6528985e4826720a10bf Mon Sep 17 00:00:00 2001 +From 344ceb66e32167530e3abc4dd04fcbea14dc56be Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 -Subject: [PATCH 071/129] Add IQaudIO Sound Card support for Raspberry Pi +Subject: [PATCH 071/134] Add IQaudIO Sound Card support for Raspberry Pi Set a limit of 0dB on Digital Volume Control @@ -100418,10 +100418,10 @@ index 0000000000000000000000000000000000000000..1ee4097c846376666775272ed692ca33 +MODULE_DESCRIPTION("ASoC Driver for IQAudio DAC"); +MODULE_LICENSE("GPL v2"); -From fbc0c13553e42eb4bc367d1bd16a53efb934977d Mon Sep 17 00:00:00 2001 +From cfbfb169a19a0323b6506ea7792b6baf7e36549c Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 10:06:56 +0200 -Subject: [PATCH 072/129] Added support for HiFiBerry DAC+ +Subject: [PATCH 072/134] 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. @@ -101051,10 +101051,10 @@ index 72b19e62f6267698aea45d2410d616d91c1825cb..c6839ef6e16754ed9de2698507b8986a dev_err(dev, "No LRCLK?\n"); return -EINVAL; -From 3c656fe05ad94ece55f0300040822d5fa289bf88 Mon Sep 17 00:00:00 2001 +From 51558763d713a81adf2de060981c4163461a48e4 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 11:09:58 +0200 -Subject: [PATCH 073/129] Added driver for HiFiBerry Amp amplifier add-on board +Subject: [PATCH 073/134] 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. @@ -101889,10 +101889,10 @@ index 0000000000000000000000000000000000000000..8f019e04898754d2f87e9630137be9e8 + +#endif /* _TAS5713_H */ -From 82ee4d398b7cabced98ca63a3f70f3473659ac04 Mon Sep 17 00:00:00 2001 +From 37c8b5ebf852302b66b347d6afd212dd41cf2de1 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 25 Mar 2015 09:26:17 +0100 -Subject: [PATCH 074/129] Add driver for rpi-proto +Subject: [PATCH 074/134] Add driver for rpi-proto Forward port of 3.10.x driver from https://github.com/koalo We are using a custom board and would like to use rpi 3.18.x @@ -102107,10 +102107,10 @@ index 0000000000000000000000000000000000000000..fadbfade100228aaafabb0d3bdf35c01 +MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to PROTO board (WM8731)"); +MODULE_LICENSE("GPL"); -From e85b9da26bfa51d7dd014a04aacd8ee686d06af8 Mon Sep 17 00:00:00 2001 +From 9ba3362a63bba609495cf30a581ba475e8fbe6d3 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:03:47 +0100 -Subject: [PATCH 075/129] RaspiDAC3 support +Subject: [PATCH 075/134] RaspiDAC3 support Signed-off-by: Jan Grulich @@ -102353,10 +102353,10 @@ index 0000000000000000000000000000000000000000..ad2b5b89bc8213dc2e277306ef50d6e3 +MODULE_DESCRIPTION("ASoC Driver for RaspiDAC Rev.3x"); +MODULE_LICENSE("GPL v2"); -From 38ef14cf5946a797c88a64ef8360a22cf2c4d278 Mon Sep 17 00:00:00 2001 +From 62b96b01be0b085b5749462ae5c046641d020fa1 Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Thu, 7 Apr 2016 21:26:21 +0100 -Subject: [PATCH 076/129] Add Support for JustBoom Audio boards +Subject: [PATCH 076/134] Add Support for JustBoom Audio boards justboom-dac: Adjust for ALSA API change @@ -102812,10 +102812,10 @@ index 0000000000000000000000000000000000000000..909cf8928f2f4313982316f9c5b8a709 +MODULE_DESCRIPTION("ASoC Driver for JustBoom PI Digi HAT Sound Card"); +MODULE_LICENSE("GPL v2"); -From f629bb3116976c649e97e435797ee09d39ed1e27 Mon Sep 17 00:00:00 2001 +From 1e9479179783c5b7f6b8577d5a25c6ed8b653f82 Mon Sep 17 00:00:00 2001 From: Andrey Grodzovsky Date: Tue, 3 May 2016 22:10:59 -0400 -Subject: [PATCH 077/129] ARM: adau1977-adc: Add basic machine driver for +Subject: [PATCH 077/134] ARM: adau1977-adc: Add basic machine driver for adau1977 codec driver. This commit adds basic support for the codec usage including: Device tree overlay, @@ -102997,10 +102997,10 @@ index 0000000000000000000000000000000000000000..f3d7e5db7bb912e1d7ca6f8e8d42df5f +MODULE_DESCRIPTION("ASoC Driver for ADAU1977 ADC"); +MODULE_LICENSE("GPL v2"); -From 6fbc69ecb541aeeb109dab802385e90efb71b48d Mon Sep 17 00:00:00 2001 +From b976344fb14e41ed13c0cc5fd8d066138be1b770 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Mon, 16 May 2016 21:36:31 +1000 -Subject: [PATCH 078/129] New AudioInjector.net Pi soundcard with low jitter +Subject: [PATCH 078/134] New AudioInjector.net Pi soundcard with low jitter audio in and out. Contains the sound/soc/bcm ALSA machine driver and necessary alterations to the Kconfig and Makefile. @@ -103251,10 +103251,10 @@ index 0000000000000000000000000000000000000000..491906bbf446826e55dd843f28e4860f +MODULE_ALIAS("platform:audioinjector-pi-soundcard"); + -From 69c13c876fb2ba99bb854f858c16b1b03281d586 Mon Sep 17 00:00:00 2001 +From dc47a86a160c9b67158610ad889bbd1980cc4545 Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Thu, 30 Jun 2016 18:38:42 +0100 -Subject: [PATCH 079/129] Add IQAudIO Digi WM8804 board support +Subject: [PATCH 079/134] Add IQAudIO Digi WM8804 board support Support IQAudIO Digi board with iqaudio_digi machine driver and iqaudio-digi-wm8804-audio overlay. @@ -103554,10 +103554,10 @@ index 0000000000000000000000000000000000000000..33aa2be8a43a12a12cfb5d844dd9732c +MODULE_DESCRIPTION("ASoC Driver for IQAudIO WM8804 Digi"); +MODULE_LICENSE("GPL v2"); -From ef454cce0ff5410983c63dd34258226b8ffaf0f1 Mon Sep 17 00:00:00 2001 +From 08573124ed4a7721b842b846588ba45601cdc8cc Mon Sep 17 00:00:00 2001 From: escalator2015 Date: Tue, 24 May 2016 16:20:09 +0100 -Subject: [PATCH 080/129] New driver for RRA DigiDAC1 soundcard using WM8741 + +Subject: [PATCH 080/134] New driver for RRA DigiDAC1 soundcard using WM8741 + WM8804 --- @@ -104030,10 +104030,10 @@ index 0000000000000000000000000000000000000000..f200688bb4ae32b90a0ced555aed94b0 +MODULE_DESCRIPTION("ASoC Driver for RRA DigiDAC1"); +MODULE_LICENSE("GPL v2"); -From f5eda3e4747c90c99ffe1eb29d2abb824e4753bb Mon Sep 17 00:00:00 2001 +From 2990708d446f042abdef3fda0a6ff1ac0574ec95 Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Sat, 2 Jul 2016 16:26:19 +0100 -Subject: [PATCH 081/129] Add support for Dion Audio LOCO DAC-AMP HAT +Subject: [PATCH 081/134] Add support for Dion Audio LOCO DAC-AMP HAT Using dedicated machine driver and pcm5102a codec driver. @@ -104206,10 +104206,10 @@ index 0000000000000000000000000000000000000000..65e03741d349a2dc5bd91f69855ea952 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO"); +MODULE_LICENSE("GPL v2"); -From ebff2709bd934a94f765aff4a361cef4ae03e30e Mon Sep 17 00:00:00 2001 +From 8af2913606da27e4766899c61c7949fb6d831a59 Mon Sep 17 00:00:00 2001 From: Clive Messer Date: Mon, 19 Sep 2016 14:01:04 +0100 -Subject: [PATCH 082/129] Allo Piano DAC boards: Initial 2 channel (stereo) +Subject: [PATCH 082/134] Allo Piano DAC boards: Initial 2 channel (stereo) support (#1645) Add initial 2 channel (stereo) support for Allo Piano DAC (2.0/2.1) boards, @@ -104416,10 +104416,10 @@ index 0000000000000000000000000000000000000000..eaf50fb6dbca1970ae1c6f8662088b0f +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC"); +MODULE_LICENSE("GPL v2"); -From 52875cef71e2bb50bdb71172c5eb4e3f0c7e7db7 Mon Sep 17 00:00:00 2001 +From ef6e845ac3227fb730200a770c15659980cc1231 Mon Sep 17 00:00:00 2001 From: Raashid Muhammed Date: Mon, 27 Mar 2017 12:35:00 +0530 -Subject: [PATCH 083/129] Add support for Allo Piano DAC 2.1 plus add-on board +Subject: [PATCH 083/134] Add support for Allo Piano DAC 2.1 plus add-on board for Raspberry Pi. The Piano DAC 2.1 has support for 4 channels with subwoofer. @@ -105288,10 +105288,10 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC Plus"); +MODULE_LICENSE("GPL v2"); -From e42b4e221249dd728e85fba984ff1cb8347e8be8 Mon Sep 17 00:00:00 2001 +From acd0f3b81b0097904050733dbfbff695d2f919e7 Mon Sep 17 00:00:00 2001 From: BabuSubashChandar Date: Tue, 28 Mar 2017 20:04:42 +0530 -Subject: [PATCH 084/129] Add support for Allo Boss DAC add-on board for +Subject: [PATCH 084/134] Add support for Allo Boss DAC add-on board for Raspberry Pi. (#1924) Signed-off-by: Baswaraj K @@ -105994,10 +105994,10 @@ index 0000000000000000000000000000000000000000..203ab76c7045b081578e23bda1099dd1 +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Boss DAC"); +MODULE_LICENSE("GPL v2"); -From ba9487e8829443e63cd95c00b57492a1170754bf Mon Sep 17 00:00:00 2001 +From 49813172678a0afd74f503a5a0ece339ba5df3d5 Mon Sep 17 00:00:00 2001 From: gtrainavicius Date: Sun, 23 Oct 2016 12:06:53 +0300 -Subject: [PATCH 085/129] Support for Blokas Labs pisound board +Subject: [PATCH 085/134] Support for Blokas Labs pisound board Pisound dynamic overlay (#1760) @@ -107196,10 +107196,10 @@ index 0000000000000000000000000000000000000000..06ff1e53dc9d860946965b6303577762 +MODULE_DESCRIPTION("ASoC Driver for pisound, http://blokas.io/pisound"); +MODULE_LICENSE("GPL v2"); -From c7ccddce5f413a68aaba65d3f3908b41b3e7da0f Mon Sep 17 00:00:00 2001 +From 427d79d7759a252c20ab78b731f6ed0f3c29312b Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 22 Jan 2017 12:49:37 +0100 -Subject: [PATCH 086/129] ASoC: Add driver for Cirrus Logic Audio Card +Subject: [PATCH 086/134] ASoC: Add driver for Cirrus Logic Audio Card Note: due to problems with deferred probing of regulators the following softdep should be added to a modprobe.d file @@ -108264,10 +108264,10 @@ index 0000000000000000000000000000000000000000..ac8651ddff7bd3701dffe22c7fb88352 +MODULE_DESCRIPTION("ASoC driver for Cirrus Logic Audio Card"); +MODULE_LICENSE("GPL"); -From f82b730b26f6626d9f1e261c792feb80c26837de Mon Sep 17 00:00:00 2001 +From 8cff91b2907b06303136b8ef8e58432ddf22dec1 Mon Sep 17 00:00:00 2001 From: Miquel Date: Fri, 24 Feb 2017 20:51:06 +0100 -Subject: [PATCH 087/129] sound: Support for Dion Audio LOCO-V2 DAC-AMP HAT +Subject: [PATCH 087/134] sound: Support for Dion Audio LOCO-V2 DAC-AMP HAT Signed-off-by: Miquel Blauw --- @@ -108462,10 +108462,10 @@ index 0000000000000000000000000000000000000000..a009c49477972a9832175d86f201b035 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO-V2"); +MODULE_LICENSE("GPL v2"); -From c6220b7c4674451da55a209557ebb87b5eaa14b6 Mon Sep 17 00:00:00 2001 +From b857500f7828085bfbd197631e1d961eae5fe596 Mon Sep 17 00:00:00 2001 From: Fe-Pi Date: Wed, 1 Mar 2017 04:42:43 -0700 -Subject: [PATCH 088/129] Add support for Fe-Pi audio sound card. (#1867) +Subject: [PATCH 088/134] Add support for Fe-Pi audio sound card. (#1867) Fe-Pi Audio Sound Card is based on NXP SGTL5000 codec. Mechanical specification of the board is the same the Raspberry Pi Zero. @@ -108679,10 +108679,10 @@ index 0000000000000000000000000000000000000000..015b56fd73cc36be5b5eecd17548fd03 +MODULE_DESCRIPTION("ASoC Driver for Fe-Pi Audio"); +MODULE_LICENSE("GPL v2"); -From afd8236c2f127531902daad63f61afcae95f0a37 Mon Sep 17 00:00:00 2001 +From f2217d118ab429dbbb213b2eace048aa70bf6351 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Mar 2017 20:04:13 +1100 -Subject: [PATCH 089/129] Add support for the AudioInjector.net Octo sound card +Subject: [PATCH 089/134] Add support for the AudioInjector.net Octo sound card AudioInjector Octo: sample rates, regulators, reset @@ -109091,10 +109091,10 @@ index 0000000000000000000000000000000000000000..5e79f4eff93a21ed3495c77a90f73525 +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:audioinjector-octo-soundcard"); -From 08d3e5a0ec754c239219af3f1f3d18913ea8cc35 Mon Sep 17 00:00:00 2001 +From 2b224d902fd312a029931757576a24fb14ee0b4d Mon Sep 17 00:00:00 2001 From: Peter Malkin Date: Mon, 27 Mar 2017 16:38:21 -0700 -Subject: [PATCH 090/129] Driver support for Google voiceHAT soundcard. +Subject: [PATCH 090/134] Driver support for Google voiceHAT soundcard. --- sound/soc/bcm/Kconfig | 7 ++ @@ -109485,10 +109485,10 @@ index 0000000000000000000000000000000000000000..225854b8e5298b3c3018f59a49404354 +MODULE_DESCRIPTION("ASoC Driver for Google voiceHAT SoundCard"); +MODULE_LICENSE("GPL v2"); -From 5926e0d83bb9c5bd15806fd81ea648bc90f3aab3 Mon Sep 17 00:00:00 2001 +From 3e3ecee5d45800aacee162db02a6d63552642912 Mon Sep 17 00:00:00 2001 From: sandeepal Date: Fri, 2 Jun 2017 18:59:46 +0530 -Subject: [PATCH 091/129] Allo Digione Driver (#2048) +Subject: [PATCH 091/134] Allo Digione Driver (#2048) Driver for the Allo Digione soundcard --- @@ -109810,10 +109810,10 @@ index 0000000000000000000000000000000000000000..e3664e44c699d0102120ecf99e8b780a +MODULE_DESCRIPTION("ASoC Driver for Allo DigiOne"); +MODULE_LICENSE("GPL v2"); -From 1ec00318fdec23f1feed3e7972ac8e7ab70d51d5 Mon Sep 17 00:00:00 2001 +From f62f5604fc4f3d0530b6725f163a840eeab926a0 Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 21 Oct 2015 14:55:21 +0100 -Subject: [PATCH 092/129] rpi_display: add backlight driver and overlay +Subject: [PATCH 092/134] rpi_display: add backlight driver and overlay Add a mailbox-driven backlight controller for the Raspberry Pi DSI touchscreen display. Requires updated GPU firmware to recognise the @@ -109982,10 +109982,10 @@ index 0000000000000000000000000000000000000000..14a0d9b037395497c1fdae2961feccd5 +MODULE_DESCRIPTION("Raspberry Pi mailbox based Backlight Driver"); +MODULE_LICENSE("GPL"); -From 8b334bd0404a15a9ef5e1c58075855d2a17220a8 Mon Sep 17 00:00:00 2001 +From 06ee7eb3c38fa1bf0605a65c9e5ec410c54941ab Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 23 Feb 2016 19:56:04 +0000 -Subject: [PATCH 093/129] bcm2835-virtgpio: Virtual GPIO driver +Subject: [PATCH 093/134] bcm2835-virtgpio: Virtual GPIO driver Add a virtual GPIO driver that uses the firmware mailbox interface to request that the VPU toggles LEDs. @@ -110259,10 +110259,10 @@ index 4a3d79d3b48eb483a4e4bf498f617515e3ad158f..5f34e1257117fb48013c9926a8a223d6 RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From e164ee9987147c29263b184bb8358a357003b7e8 Mon Sep 17 00:00:00 2001 +From eb61862909e7b5e435d24563c040c81c01de557d Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 20 Feb 2017 17:01:21 +0000 -Subject: [PATCH 094/129] bcm2835-gpio-exp: Driver for GPIO expander via +Subject: [PATCH 094/134] bcm2835-gpio-exp: Driver for GPIO expander via mailbox service Pi3 and Compute Module 3 have a GPIO expander that the @@ -110588,10 +110588,10 @@ index 5f34e1257117fb48013c9926a8a223d64a598ab7..c819c21b0158a59c1308882e5a40e3f3 /* Dispmanx TAGS */ RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001, -From 9e5f33653205607cacd13a7666eccece3a7d6da4 Mon Sep 17 00:00:00 2001 +From 3fd27dc49e454167ed9de021d3268eabd2cd6c5f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 23 Feb 2016 17:26:48 +0000 -Subject: [PATCH 095/129] amba_pl011: Don't use DT aliases for numbering +Subject: [PATCH 095/134] amba_pl011: Don't use DT aliases for numbering The pl011 driver looks for DT aliases of the form "serial", and if found uses as the device ID. This can cause @@ -110620,10 +110620,10 @@ index 1888d168a41c87c605962da2605df8ab1c02bd20..e22b9e79836a6aeef4c8f9fb618b9595 uap->old_cr = 0; uap->port.dev = dev; -From 6fe7c9b534c7e1aa0cb75d47b27a2f85e7b17aae Mon Sep 17 00:00:00 2001 +From e9093a71a3c5483a3fb929b1ac82ede6672e9a23 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 1 Mar 2017 16:07:39 +0000 -Subject: [PATCH 096/129] amba_pl011: Round input clock up +Subject: [PATCH 096/134] amba_pl011: Round input clock up The UART clock is initialised to be as close to the requested frequency as possible without exceeding it. Now that there is a @@ -110709,10 +110709,10 @@ index e22b9e79836a6aeef4c8f9fb618b9595c551500f..4b815abbf9913075885ee60f4d9ad49d /* unregisters the driver also if no more ports are left */ static void pl011_unregister_port(struct uart_amba_port *uap) -From 768c90f10d2587bd8abc735114c7c853b70310f4 Mon Sep 17 00:00:00 2001 +From 0471231018f0485dcd4849e331327a792e364818 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 3 Dec 2014 13:23:28 +0200 -Subject: [PATCH 097/129] OF: DT-Overlay configfs interface +Subject: [PATCH 097/134] OF: DT-Overlay configfs interface This is a port of Pantelis Antoniou's v3 port that makes use of the new upstreamed configfs support for binary attributes. @@ -111144,10 +111144,10 @@ index 0000000000000000000000000000000000000000..0037e6868a6cda8706c88194c6a4454b +} +late_initcall(of_cfs_init); -From 1540430c40bd65a02de5063f24aaeb908256af91 Mon Sep 17 00:00:00 2001 +From cfabe3c29f7ae581472de2e16d284e94b078ac3a Mon Sep 17 00:00:00 2001 From: Cheong2K Date: Fri, 26 Feb 2016 18:20:10 +0800 -Subject: [PATCH 098/129] brcm: adds support for BCM43341 wifi +Subject: [PATCH 098/134] brcm: adds support for BCM43341 wifi brcmfmac: Disable power management @@ -111279,10 +111279,10 @@ index f3556122c6ace17c419e13023057861957a507fa..f8d4647016a1cde3d51dd43da07a46ce BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43362_CHIP_ID, 0xFFFFFFFE, 43362), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4339_CHIP_ID, 0xFFFFFFFF, 4339), -From 44f82d3decd6bab4e5b05ecb8450bc62affea3a9 Mon Sep 17 00:00:00 2001 +From 67bba3b6a8474c5dc0822063054d5b0e9f4829be Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 17 Feb 2017 15:26:13 +0000 -Subject: [PATCH 099/129] brcmfmac: Mute expected startup 'errors' +Subject: [PATCH 099/134] brcmfmac: Mute expected startup 'errors' The brcmfmac WiFi driver always complains about the '00' country code. Modify the driver to ignore '00' silently. @@ -111306,10 +111306,10 @@ index 508cab2d0817914d454958f92167d350c74d9a5d..987b1f5b999b0ecb68b6ce741b8e3ddb req->alpha2[0], req->alpha2[1]); return; -From 19e8cd50ec3a94a2e12bdc46e58b24f9358dfaf0 Mon Sep 17 00:00:00 2001 +From d80a9e587881277157fbdf386e89160baf7f38fe Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Dec 2015 13:37:07 +0000 -Subject: [PATCH 100/129] hci_h5: Don't send conf_req when ACTIVE +Subject: [PATCH 100/134] hci_h5: Don't send conf_req when ACTIVE Without this patch, a modem and kernel can continuously bombard each other with conf_req and conf_rsp messages, in a demented game of tag. @@ -111332,10 +111332,10 @@ index c0e4e26dc30d7c3c6a771b7b86df88c8cf763646..7308287259eedcaf229f8a496a0e3826 if (H5_HDR_LEN(hdr) > 2) h5->tx_win = (data[2] & 0x07); -From c3bd471961998f57775043a1fd1bd98748eaaa58 Mon Sep 17 00:00:00 2001 +From 5264106254fe4a71f0f6726f41dd2644a7910e43 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 13 Apr 2015 17:16:29 +0100 -Subject: [PATCH 101/129] config: Add default configs +Subject: [PATCH 101/134] config: Add default configs --- arch/arm/configs/bcm2709_defconfig | 1326 +++++++++++++++++++++++++++++++++++ @@ -114014,10 +114014,10 @@ index 0000000000000000000000000000000000000000..e0dd8723047ff488e81a03ef42fdbc68 +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -From 6d6fd6d9179c237acb740832880f1603e019e2cd Mon Sep 17 00:00:00 2001 +From 59cf82303dc194d87fb8b9c968b07c4200d5b262 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Wed, 24 Aug 2016 03:35:56 -0700 -Subject: [PATCH 102/129] Add arm64 configuration and device tree differences. +Subject: [PATCH 102/134] Add arm64 configuration and device tree differences. Disable MMC_BCM2835_SDHOST and MMC_BCM2835 since these drivers are crashing at the moment. @@ -115431,10 +115431,10 @@ index 0000000000000000000000000000000000000000..e6b09fafa27eed2b762e3d53b55041f7 +CONFIG_LIBCRC32C=y +CONFIG_BCM2835_VCHIQ=n -From e9c43898ea8dd00edb15de87acca6c1c63048f1c Mon Sep 17 00:00:00 2001 +From 01de480996cf3d25bde48f6568e23eaff47118b5 Mon Sep 17 00:00:00 2001 From: Electron752 Date: Thu, 12 Jan 2017 07:07:08 -0800 -Subject: [PATCH 103/129] ARM64: Make it work again on 4.9 (#1790) +Subject: [PATCH 103/134] ARM64: Make it work again on 4.9 (#1790) * Invoke the dtc compiler with the same options used in arm mode. * ARM64 now uses the bcm2835 platform just like ARM32. @@ -115846,10 +115846,10 @@ index e6b09fafa27eed2b762e3d53b55041f793683d27..c7e891d72969a388d9b135a36dbfc9c9 CONFIG_LIBCRC32C=y -CONFIG_BCM2835_VCHIQ=n -From fb47b55bed10e44abfe8e21cf6a8d3bf75e54200 Mon Sep 17 00:00:00 2001 +From 1283a8ab4c7d05745d74e7dae2bc4f614a462d5d Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Thu, 12 Jan 2017 19:10:07 -0800 -Subject: [PATCH 104/129] ARM64: Enable HDMI audio and vc04_services in +Subject: [PATCH 104/134] ARM64: Enable HDMI audio and vc04_services in bcmrpi3_defconfig Signed-off-by: Michael Zoran @@ -115878,10 +115878,10 @@ index c7e891d72969a388d9b135a36dbfc9c9cb609bf8..4b90f9b64abe9f089ba56b13d5a00de3 CONFIG_BCM2835_MBOX=y # CONFIG_IOMMU_SUPPORT is not set -From 900935e9cd0fd44dc9f8636308c8c7b421a8c83a Mon Sep 17 00:00:00 2001 +From 67e1133cd0237f3f25c35778be070e25c3b25252 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Thu, 12 Jan 2017 19:14:03 -0800 -Subject: [PATCH 105/129] ARM64: Run bcmrpi3_defconfig through savedefconfig. +Subject: [PATCH 105/134] ARM64: Run bcmrpi3_defconfig through savedefconfig. Signed-off-by: Michael Zoran --- @@ -115926,10 +115926,10 @@ index 4b90f9b64abe9f089ba56b13d5a00de33343bfb9..dac962ca1634662ce7d966f1ffb53b5b CONFIG_FB_TFT_AGM1264K_FL=m CONFIG_FB_TFT_BD663474=m -From ef2764a77908404cd53995df24b1dc7fc66824cd Mon Sep 17 00:00:00 2001 +From 99016d5ee9769ddd7112c5edc8cbd3fea6127d17 Mon Sep 17 00:00:00 2001 From: Electron752 Date: Sat, 14 Jan 2017 02:54:26 -0800 -Subject: [PATCH 106/129] ARM64: Enable Kernel Address Space Randomization +Subject: [PATCH 106/134] ARM64: Enable Kernel Address Space Randomization (#1792) Randomization allows the mapping between virtual addresses and physical @@ -115961,10 +115961,10 @@ index dac962ca1634662ce7d966f1ffb53b5bfa27c506..aae33b4b3c3e736ea7cd3ca242158ad6 CONFIG_BINFMT_MISC=y CONFIG_COMPAT=y -From fe858fcdd237aca3425f4020862fc06a10ca12de Mon Sep 17 00:00:00 2001 +From 53603ba473d74427187d223ea98490d90a4dcb17 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sun, 15 Jan 2017 07:31:59 -0800 -Subject: [PATCH 107/129] ARM64: Enable RTL8187/RTL8192CU wifi in build config +Subject: [PATCH 107/134] ARM64: Enable RTL8187/RTL8192CU wifi in build config These drivers build now, so they can be enabled back in the build configuration just like they are for @@ -115989,10 +115989,10 @@ index aae33b4b3c3e736ea7cd3ca242158ad6ba558aff..b7d762df19b85e369a32cd823dfd0621 CONFIG_ZD1211RW=m CONFIG_MAC80211_HWSIM=m -From f4fca0f5426c2745774afa536c2c4fc9aca8d9c8 Mon Sep 17 00:00:00 2001 +From 9bd92259f6fcc2f7b98e17f5dcb93e2241ea5693 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:33:51 -0800 -Subject: [PATCH 108/129] ARM64/DWC_OTG: Port dwc_otg driver to ARM64 +Subject: [PATCH 108/134] ARM64/DWC_OTG: Port dwc_otg driver to ARM64 In ARM64, the FIQ mechanism used by this driver is not current implemented. As a workaround, reqular IRQ is used instead @@ -116335,10 +116335,10 @@ index 6b2c7d0c93f36a63863ff4b0ecc1f3eab77e058b..d7b700ff17821ad1944e36721fe6b2db /** The OS page size */ #define DWC_OS_PAGE_SIZE PAGE_SIZE -From 167c98d704c7a38aeab88f5005077d4bdc3fcac9 Mon Sep 17 00:00:00 2001 +From 7b259867567b86fcb957f612aca1c8b93a1b4c9c Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:43:57 -0800 -Subject: [PATCH 109/129] ARM64: Round-Robin dispatch IRQs between CPUs. +Subject: [PATCH 109/134] ARM64: Round-Robin dispatch IRQs between CPUs. IRQ-CPU mapping is round robined on ARM64 to increase concurrency and allow multiple interrupts to be serviced @@ -116412,10 +116412,10 @@ index bee4d2d2ebacc3233423bb9d825e076b9f52fccd..014f13f89eb896f5cfc75ed9891787d0 .name = "bcm2836-gpu", .irq_mask = bcm2836_arm_irqchip_mask_gpu_irq, -From 3d387f3c82eb55430bceb4a21b3150e80a7a5a00 Mon Sep 17 00:00:00 2001 +From d14698e1413d811aed43ff3c141476549accb38c Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:45:03 -0800 -Subject: [PATCH 110/129] ARM64: Enable DWC_OTG Driver In ARM64 Build +Subject: [PATCH 110/134] ARM64: Enable DWC_OTG Driver In ARM64 Build Config(bcmrpi3_defconfig) Signed-off-by: Michael Zoran @@ -116436,10 +116436,10 @@ index b7d762df19b85e369a32cd823dfd062145bdefa7..4d85c231c5ea0244e1b05fb4a5e3c8fd CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE_REALTEK=m -From d340cd7493c6124278913e0e0bd1bcd00153f124 Mon Sep 17 00:00:00 2001 +From b1e947f7d0a8f23a1a66948562f4fbd1fc588012 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 11 Feb 2017 01:18:31 -0800 -Subject: [PATCH 111/129] ARM64: Force hardware emulation of deprecated +Subject: [PATCH 111/134] ARM64: Force hardware emulation of deprecated instructions. --- @@ -116467,10 +116467,10 @@ index f0e6d717885b1fcf3b22f64c10c38f19c25f809d..0cb830d30fb6d2bd26ab572efe893649 case INSN_OBSOLETE: insn->current_mode = INSN_UNDEF; -From 4a4a6c4967fe59a4d24117939af272d3b4cc8712 Mon Sep 17 00:00:00 2001 +From ed90e5b9a7c0962eb5a613c0123777f114e5c2f1 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 10 Feb 2017 17:57:08 -0800 -Subject: [PATCH 112/129] build/arm64: Add rules for .dtbo files for dts +Subject: [PATCH 112/134] build/arm64: Add rules for .dtbo files for dts overlays We now create overlays as .dtbo files. @@ -116495,10 +116495,10 @@ index 9b41f1e3b1a039cd45fe842e10abff0181186fdf..dc2859b8eed168ed52e95c503e7a5ce3 dtbs: prepare scripts -From cd741e0be1011d9e7c167cde89efb09f97648c00 Mon Sep 17 00:00:00 2001 +From eee4143a0daae5612cb1cce9c6c9c7d95a91e313 Mon Sep 17 00:00:00 2001 From: Bilal Amarni Date: Wed, 24 May 2017 10:52:50 +0200 -Subject: [PATCH 113/129] enable drivers for GPIO expander and vcio +Subject: [PATCH 113/134] enable drivers for GPIO expander and vcio --- arch/arm64/configs/bcmrpi3_defconfig | 3 +++ @@ -116526,10 +116526,10 @@ index 4d85c231c5ea0244e1b05fb4a5e3c8fd3e651ddf..9dcb58a519d041fadae99c81a7bda621 CONFIG_GPIO_ARIZONA=m CONFIG_GPIO_STMPE=y -From 049d05d668250c8ecd91908177fed22322a7797b Mon Sep 17 00:00:00 2001 +From b1a10c871ec9b24b06b7cb2639da85fd9e82b40e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 24 Feb 2015 13:40:50 +0000 -Subject: [PATCH 114/129] pinctrl-bcm2835: Fix interrupt handling for GPIOs +Subject: [PATCH 114/134] pinctrl-bcm2835: Fix interrupt handling for GPIOs 28-31 and 46-53 Contrary to the documentation, the BCM2835 GPIO controller actually has @@ -116562,10 +116562,10 @@ index a9d480df32562defbf8be0faf0a39bfe06ff71f9..18c92bae3b2e7e9f8208ca0d4487b08b .suppress_bind_attrs = true, }, -From 90aed6ca4d4698fac72196495c38bcfbc2adaaf5 Mon Sep 17 00:00:00 2001 +From 3131a7d4fbf4e9cca64079346f4ed48d9d172855 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 16:34:46 +0000 -Subject: [PATCH 115/129] bcm2835-aux: Add aux interrupt controller +Subject: [PATCH 115/134] bcm2835-aux: Add aux interrupt controller The AUX block has a shared interrupt line with a register indicating which devices have active IRQs. Expose this as a nested interrupt @@ -116729,10 +116729,10 @@ index bd750cf2238d61489811e7d7bd3b5f9950ed53c8..41e0702fae4692221980b0d02aed1ba6 BCM2835_AUX_CLOCK_COUNT, GFP_KERNEL); if (!onecell) -From a2b5db64ae961375981dc9c21230e918e9da1a53 Mon Sep 17 00:00:00 2001 +From da6caedc52a4cbd1daed9fb65cb435db1a8246b7 Mon Sep 17 00:00:00 2001 From: Yasunari Takiguchi Date: Fri, 14 Apr 2017 10:43:57 +0100 -Subject: [PATCH 116/129] This is the driver for Sony CXD2880 DVB-T2/T tuner + +Subject: [PATCH 116/134] This is the driver for Sony CXD2880 DVB-T2/T tuner + demodulator. It includes the CXD2880 driver and the CXD2880 SPI adapter. The current CXD2880 driver version is 1.4.1 - 1.0.1 released on April 13, 2017. @@ -132864,10 +132864,10 @@ index 0000000000000000000000000000000000000000..82e122349055be817eb74ed5bbcd7560 +MODULE_AUTHOR("Sony Semiconductor Solutions Corporation"); +MODULE_LICENSE("GPL v2"); -From 8519c61633549f88e24ec126082a29c176da4253 Mon Sep 17 00:00:00 2001 +From 0ee5fc50855a6c94a49930022363b3b43da3b77a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:18:09 +0100 -Subject: [PATCH 117/129] raspberrypi-firmware: Define the MBOX channel in the +Subject: [PATCH 117/134] raspberrypi-firmware: Define the MBOX channel in the header. Signed-off-by: Eric Anholt @@ -132889,10 +132889,10 @@ index c819c21b0158a59c1308882e5a40e3f3fe73cbdf..de2a3dcd562beb752266eaf0070e5586 enum rpi_firmware_property_status { -From 49686a4d16e39cbe24057dc16ec0cffb0009055f Mon Sep 17 00:00:00 2001 +From c05d145d7c89a1d31075aff507f384d84bb9539e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:16:19 +0100 -Subject: [PATCH 118/129] raspberrypi-firmware: Export the general transaction +Subject: [PATCH 118/134] raspberrypi-firmware: Export the general transaction function. The vc4-firmware-kms module is going to be doing the MBOX FB call. @@ -132936,10 +132936,10 @@ index de2a3dcd562beb752266eaf0070e55861d553f5f..dc7fd58afd5dddebf9b17065bb069a1d #endif /* __SOC_RASPBERRY_FIRMWARE_H__ */ -From 89922ab276b06410d8ef5e78f370a8e13bacfe32 Mon Sep 17 00:00:00 2001 +From 52235d687bedc369bb0f7ff0af0d833c89d5348f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 08:39:33 +0100 -Subject: [PATCH 119/129] drm/vc4: Add a mode for using the closed firmware for +Subject: [PATCH 119/134] drm/vc4: Add a mode for using the closed firmware for display. Signed-off-by: Eric Anholt @@ -133711,10 +133711,10 @@ index 0000000000000000000000000000000000000000..7dd233eed677c1689492ab95bc864753 + }, +}; -From 98157ac6f00edcad39580c8ee8c665a11d89ba08 Mon Sep 17 00:00:00 2001 +From 2f15bf7410a44191260b5c5473a6bd98da49713f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Feb 2017 17:09:18 -0800 -Subject: [PATCH 120/129] drm/vc4: Name the primary and cursor planes in fkms. +Subject: [PATCH 120/134] drm/vc4: Name the primary and cursor planes in fkms. This makes debugging nicer, compared to trying to remember what the IDs are. @@ -133738,10 +133738,10 @@ index 7dd233eed677c1689492ab95bc86475330d2d63b..e6097046fb25361bc61d657083d95b63 if (type == DRM_PLANE_TYPE_PRIMARY) { vc4_plane->fbinfo = -From de225be7df4dcaad443716baf7c4249109adcc0f Mon Sep 17 00:00:00 2001 +From bde5c6279355967d1c2056cbb681e0c3c71ead26 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Feb 2017 17:10:09 -0800 -Subject: [PATCH 121/129] drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of +Subject: [PATCH 121/134] drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of fkms. Trying to debug weston on fkms involved figuring out what calls I was @@ -133811,10 +133811,10 @@ index e6097046fb25361bc61d657083d95b634232aabc..72d0b9cffe3d2997d69040c46f4aee11 RPI_FIRMWARE_SET_CURSOR_STATE, &packet_state, -From f2e9a1b05c7e626085cf93930263e0e9b9154877 Mon Sep 17 00:00:00 2001 +From 9cb56a005fca2860f75fd5e08ddeb97d07867582 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 2 Feb 2017 09:42:18 -0800 -Subject: [PATCH 122/129] drm/vc4: Fix sending of page flip completion events +Subject: [PATCH 122/134] drm/vc4: Fix sending of page flip completion events in FKMS mode. In the rewrite of vc4_crtc.c for fkms, I dropped the part of the @@ -133856,10 +133856,10 @@ index 72d0b9cffe3d2997d69040c46f4aee11e22aa213..185f9bd3c1b2d47d0c1fc5293db4199b static void vc4_crtc_handle_page_flip(struct vc4_crtc *vc4_crtc) -From caeeb7fd92cb6b7225ecf470191983090d4c6ad1 Mon Sep 17 00:00:00 2001 +From 9482524b0d92012326e5118de8df478f1cfc0f03 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 18 Apr 2017 21:43:46 +0100 -Subject: [PATCH 123/129] vc4_fkms: Apply firmware overscan offset to hardware +Subject: [PATCH 123/134] vc4_fkms: Apply firmware overscan offset to hardware cursor --- @@ -133916,10 +133916,10 @@ index 185f9bd3c1b2d47d0c1fc5293db4199bd8963023..072f377b7423ee603d73ace2bf6d620f return 0; -From 703fb6dc2bdb896d92907e25bddbb47c02a95a3f Mon Sep 17 00:00:00 2001 +From eb0e1ed338bbfe0a1fe43c82413ddafa8df35ec6 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 11:34:26 +0200 -Subject: [PATCH 124/129] ASoC: bcm2835: Add support for TDM modes +Subject: [PATCH 124/134] ASoC: bcm2835: Add support for TDM modes bcm2835 supports arbitrary positioning of channel data within a frame and thus is capable of supporting TDM modes. Since @@ -134321,10 +134321,10 @@ index 56df7d8a43d0aac055a91b0d24aca8e1b4e308e4..dcacf7f83c9371df539a788ea33fedcf dev->dev = &pdev->dev; dev_set_drvdata(&pdev->dev, dev); -From dd338425587a3c4d54f218f6b4d8353e1b8e166b Mon Sep 17 00:00:00 2001 +From dc0c30a09ebba5eedf48ad6bd7949a059fa3aea9 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 15:30:50 +0200 -Subject: [PATCH 125/129] ASoC: bcm2835: Support left/right justified and DSP +Subject: [PATCH 125/134] ASoC: bcm2835: Support left/right justified and DSP modes DSP modes and left/right justified modes can be supported @@ -134570,10 +134570,10 @@ index dcacf7f83c9371df539a788ea33fedcf97d64690..3a706fda4f39e42efbe12f19d87af9b1 } -From 129ca2a27effd87c3d6aae09e357cc4f5deb636c Mon Sep 17 00:00:00 2001 +From b643b268b9edf136daf19c12837e5b29feddbe5b Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 16:19:54 +0200 -Subject: [PATCH 126/129] ASoC: bcm2835: Support additional samplerates up to +Subject: [PATCH 126/134] ASoC: bcm2835: Support additional samplerates up to 384kHz Sample rates are only restricted by the capabilities of the @@ -134616,10 +134616,10 @@ index 3a706fda4f39e42efbe12f19d87af9b100a348a5..43f5715a0d5dda851731ecf7ff27e76c | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE -From 21821e1d5caa6534029429200d5488d989f5cb16 Mon Sep 17 00:00:00 2001 +From 4c3cd3aab6d561023760c3997411fe3259705bf5 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 16:24:57 +0200 -Subject: [PATCH 127/129] ASoC: bcm2835: Enforce full symmetry +Subject: [PATCH 127/134] ASoC: bcm2835: Enforce full symmetry bcm2835's configuration registers can't be changed when a stream is running, which means asymmetric configurations aren't supported. @@ -134655,10 +134655,10 @@ index 43f5715a0d5dda851731ecf7ff27e76c48fb6e57..2e449d7173fcecbcd647f90a26bd58b6 static bool bcm2835_i2s_volatile_reg(struct device *dev, unsigned int reg) -From c45671ace023bcf54d977980e66c9ad202bbc3f1 Mon Sep 17 00:00:00 2001 +From 7a8de669f8de95e524046a59f8808916a867dc30 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Mon, 5 Jun 2017 16:40:38 +0100 -Subject: [PATCH 128/129] dma-bcm2708: Fix module compilation of +Subject: [PATCH 128/134] dma-bcm2708: Fix module compilation of CONFIG_DMA_BCM2708 bcm2708-dmaengine.c defines functions like bcm_dma_start which are @@ -134701,10 +134701,10 @@ index c5bfff2765be4606077e6c8af73040ec13ee8974..6ca874d332a8bc666b1c9576ac51f479 #endif /* _PLAT_BCM2708_DMA_H */ -From 574b675abdbbaeb89923f3538c5193bb347a7e33 Mon Sep 17 00:00:00 2001 +From 34a91302aca10fefcd3ddd124403f3fccd25b770 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 25 Aug 2017 19:18:13 +0100 -Subject: [PATCH 129/129] cache: export clean and invalidate +Subject: [PATCH 129/134] cache: export clean and invalidate --- arch/arm/mm/cache-v6.S | 4 ++-- @@ -134755,3 +134755,297 @@ index de78109d002db1a5e7c94a6c1bc8bb94161d07b8..4c850aa3af2b2439fced4e130441329a dcache_line_size r2, r3 sub r3, r2, #1 bic r0, r0, r3 + +From e087f9465609c990f91cb43e7615c84fe5047768 Mon Sep 17 00:00:00 2001 +From: Dan Pasanen +Date: Wed, 20 Sep 2017 10:17:41 -0500 +Subject: [PATCH 130/134] vcsm: fix multi-platform build + +--- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index 034ae2f27f870621af9f49453501f1cde051f32a..b7814d67500b98fcd6f376d526a3d4a4b84fd152 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -223,6 +223,7 @@ typedef void cache_flush_op_fn(const void *, const void *); + #if defined(CONFIG_CPU_CACHE_V7) + extern cache_flush_op_fn v7_dma_inv_range; + extern cache_flush_op_fn v7_dma_clean_range; ++extern cache_flush_op_fn v7_dma_flush_range; + static cache_flush_op_fn * const flushops[4] = + { + 0, +@@ -233,6 +234,7 @@ static cache_flush_op_fn * const flushops[4] = + #elif defined(CONFIG_CPU_CACHE_V6) + extern cache_flush_op_fn v6_dma_inv_range; + extern cache_flush_op_fn v6_dma_clean_range; ++extern cache_flush_op_fn v6_dma_flush_range; + static cache_flush_op_fn * const flushops[4] = + { + 0, + +From d3956be75b49811fb7bd43a11317c925f6a065f1 Mon Sep 17 00:00:00 2001 +From: Dan Pasanen +Date: Thu, 21 Sep 2017 09:55:42 -0500 +Subject: [PATCH 131/134] arm: partially revert + 702b94bff3c50542a6e4ab9a4f4cef093262fe65 + +* Re-expose some dmi APIs for use in VCSM +--- + arch/arm/include/asm/cacheflush.h | 21 +++++++++++++++++++++ + arch/arm/include/asm/glue-cache.h | 2 ++ + arch/arm/mm/proc-macros.S | 2 ++ + arch/arm/mm/proc-syms.c | 3 +++ + 4 files changed, 28 insertions(+) + +diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h +index 74504b154256e36ff4897ed1c7df43eb4d91bdef..8ccb358b7043cabeb3d2b6769ef4eb11827d78ed 100644 +--- a/arch/arm/include/asm/cacheflush.h ++++ b/arch/arm/include/asm/cacheflush.h +@@ -94,6 +94,21 @@ + * DMA Cache Coherency + * =================== + * ++ * dma_inv_range(start, end) ++ * ++ * Invalidate (discard) the specified virtual address range. ++ * May not write back any entries. If 'start' or 'end' ++ * are not cache line aligned, those lines must be written ++ * back. ++ * - start - virtual start address ++ * - end - virtual end address ++ * ++ * dma_clean_range(start, end) ++ * ++ * Clean (write back) the specified virtual address range. ++ * - start - virtual start address ++ * - end - virtual end address ++ * + * dma_flush_range(start, end) + * + * Clean and invalidate the specified virtual address range. +@@ -115,6 +130,8 @@ struct cpu_cache_fns { + void (*dma_map_area)(const void *, size_t, int); + void (*dma_unmap_area)(const void *, size_t, int); + ++ void (*dma_inv_range)(const void *, const void *); ++ void (*dma_clean_range)(const void *, const void *); + void (*dma_flush_range)(const void *, const void *); + } __no_randomize_layout; + +@@ -140,6 +157,8 @@ extern struct cpu_cache_fns cpu_cache; + * is visible to DMA, or data written by DMA to system memory is + * visible to the CPU. + */ ++#define dmac_inv_range cpu_cache.dma_inv_range ++#define dmac_clean_range cpu_cache.dma_clean_range + #define dmac_flush_range cpu_cache.dma_flush_range + + #else +@@ -159,6 +178,8 @@ extern void __cpuc_flush_dcache_area(void *, size_t); + * is visible to DMA, or data written by DMA to system memory is + * visible to the CPU. + */ ++extern void dmac_inv_range(const void *, const void *); ++extern void dmac_clean_range(const void *, const void *); + extern void dmac_flush_range(const void *, const void *); + + #endif +diff --git a/arch/arm/include/asm/glue-cache.h b/arch/arm/include/asm/glue-cache.h +index 01c3d92624e5ed3e0035c4305ca5b6797ba1888b..99f29f1963aec25c0016c5eadeb4a042e75bd4c9 100644 +--- a/arch/arm/include/asm/glue-cache.h ++++ b/arch/arm/include/asm/glue-cache.h +@@ -154,6 +154,8 @@ static inline void nop_dma_unmap_area(const void *s, size_t l, int f) { } + #define __cpuc_coherent_user_range __glue(_CACHE,_coherent_user_range) + #define __cpuc_flush_dcache_area __glue(_CACHE,_flush_kern_dcache_area) + ++#define dmac_inv_range __glue(_CACHE,_dma_inv_range) ++#define dmac_clean_range __glue(_CACHE,_dma_clean_range) + #define dmac_flush_range __glue(_CACHE,_dma_flush_range) + #endif + +diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S +index f944836da8a222cd97c4e29070afa3aa370e0cbb..e6abed8db42b247ac731e49415bdc4fe92826095 100644 +--- a/arch/arm/mm/proc-macros.S ++++ b/arch/arm/mm/proc-macros.S +@@ -323,6 +323,8 @@ ENTRY(\name\()_cache_fns) + .long \name\()_flush_kern_dcache_area + .long \name\()_dma_map_area + .long \name\()_dma_unmap_area ++ .long \name\()_dma_inv_range ++ .long \name\()_dma_clean_range + .long \name\()_dma_flush_range + .size \name\()_cache_fns, . - \name\()_cache_fns + .endm +diff --git a/arch/arm/mm/proc-syms.c b/arch/arm/mm/proc-syms.c +index 054b491ff7649ca067ff821770aec80a4da42102..70e8b7d3443467ae9595924f1a9d043b984e2c93 100644 +--- a/arch/arm/mm/proc-syms.c ++++ b/arch/arm/mm/proc-syms.c +@@ -30,6 +30,9 @@ EXPORT_SYMBOL(__cpuc_flush_user_all); + EXPORT_SYMBOL(__cpuc_flush_user_range); + EXPORT_SYMBOL(__cpuc_coherent_kern_range); + EXPORT_SYMBOL(__cpuc_flush_dcache_area); ++EXPORT_SYMBOL(dmac_inv_range); ++EXPORT_SYMBOL(dmac_clean_range); ++EXPORT_SYMBOL(dmac_flush_range); + #else + EXPORT_SYMBOL(cpu_cache); + #endif + +From 923c44c152c2e60c3b8939eaee4c768ceeaaf617 Mon Sep 17 00:00:00 2001 +From: Dan Pasanen +Date: Thu, 21 Sep 2017 09:57:44 -0500 +Subject: [PATCH 132/134] vcsm: add macros for cache functions + +--- + drivers/char/broadcom/vc_sm/vc_sm_knl.h | 5 +++++ + drivers/char/broadcom/vc_sm/vmcs_sm.c | 11 +++++------ + 2 files changed, 10 insertions(+), 6 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vc_sm_knl.h b/drivers/char/broadcom/vc_sm/vc_sm_knl.h +index f7f74750d8358779c61dfcd6fc841aa1789a2c5e..e50fd8eaecef7a3c8451c040ffc3888cc37e28fc 100644 +--- a/drivers/char/broadcom/vc_sm/vc_sm_knl.h ++++ b/drivers/char/broadcom/vc_sm/vc_sm_knl.h +@@ -27,6 +27,11 @@ enum vc_sm_lock_cache_mode { + VC_SM_LOCK_NON_CACHED, + }; + ++/* Cache functions */ ++#define VCSM_CACHE_OP_INV 0x01 ++#define VCSM_CACHE_OP_FLUSH 0x02 ++#define VCSM_CACHE_OP_CLEAN 0x03 ++ + /* Allocate a shared memory handle and block. */ + int vc_sm_alloc(struct vc_sm_alloc_t *alloc, int *handle); + +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index b7814d67500b98fcd6f376d526a3d4a4b84fd152..32763bd01e2e3831778fbcd1066df3cbf582235d 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -2964,12 +2964,9 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + } + for (i = 0; i < sizeof(ioparam.s) / sizeof(*ioparam.s); i++) { + switch (ioparam.s[i].cmd) { +- default: +- case 0: +- break; /* NOOP */ +- case 1: /* L1/L2 invalidate virtual range */ +- case 2: /* L1/L2 clean physical range */ +- case 3: /* L1/L2 clean+invalidate all */ ++ case VCSM_CACHE_OP_INV: /* L1/L2 invalidate virtual range */ ++ case VCSM_CACHE_OP_FLUSH: /* L1/L2 clean physical range */ ++ case VCSM_CACHE_OP_CLEAN: /* L1/L2 clean+invalidate all */ + /* Locate resource from GUID. */ + resource = + vmcs_sm_acquire_resource(file_data, ioparam.s[i].handle); +@@ -2993,6 +2990,8 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + vmcs_sm_release_resource(resource, 0); + + break; ++ default: ++ break; /* NOOP */ + } + } + } + +From 170a6b92f30841481b77183239390deb059aad1c Mon Sep 17 00:00:00 2001 +From: Dan Pasanen +Date: Thu, 21 Sep 2017 07:41:02 -0500 +Subject: [PATCH 133/134] vcsm: use dma APIs for cache functions + +* Will handle multi-platform builds +--- + drivers/char/broadcom/vc_sm/vmcs_sm.c | 45 +++++++++++++---------------------- + 1 file changed, 16 insertions(+), 29 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c +index 32763bd01e2e3831778fbcd1066df3cbf582235d..cfa4ff747de2a96e03dab995aa54fc80eb880157 100644 +--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c ++++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c +@@ -218,34 +218,6 @@ static const char *const sm_cache_map_vector[] = { + }; + #endif + +-typedef void cache_flush_op_fn(const void *, const void *); +- +-#if defined(CONFIG_CPU_CACHE_V7) +-extern cache_flush_op_fn v7_dma_inv_range; +-extern cache_flush_op_fn v7_dma_clean_range; +-extern cache_flush_op_fn v7_dma_flush_range; +-static cache_flush_op_fn * const flushops[4] = +-{ +- 0, +- v7_dma_inv_range, +- v7_dma_clean_range, +- v7_dma_flush_range, +-}; +-#elif defined(CONFIG_CPU_CACHE_V6) +-extern cache_flush_op_fn v6_dma_inv_range; +-extern cache_flush_op_fn v6_dma_clean_range; +-extern cache_flush_op_fn v6_dma_flush_range; +-static cache_flush_op_fn * const flushops[4] = +-{ +- 0, +- v6_dma_inv_range, +- v6_dma_clean_range, +- v6_dma_flush_range, +-}; +-#else +-#error Unknown cache config +-#endif +- + /* ---- Private Function Prototypes -------------------------------------- */ + + /* ---- Private Functions ------------------------------------------------ */ +@@ -3028,7 +3000,22 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + + for (i = 0; i < ioparam.op_count; i++) { + const struct vmcs_sm_ioctl_clean_invalid_block * const op = block + i; +- cache_flush_op_fn * const op_fn = flushops[op->invalidate_mode & 3]; ++ void (*op_fn)(const void *, const void *); ++ ++ switch(op->invalidate_mode & 3) { ++ case VCSM_CACHE_OP_INV: ++ op_fn = dmac_inv_range; ++ break; ++ case VCSM_CACHE_OP_CLEAN: ++ op_fn = dmac_clean_range; ++ break; ++ case VCSM_CACHE_OP_FLUSH: ++ op_fn = dmac_flush_range; ++ break; ++ default: ++ op_fn = 0; ++ break; ++ } + + if ((op->invalidate_mode & ~3) != 0) { + ret = -EINVAL; + +From aa5b5b1b3234a9b98deb40a9efdf9b40bbd59605 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 29 Sep 2017 16:15:01 +0100 +Subject: [PATCH 134/134] vcsm: Fix up macros to avoid breaking numbers used by + existing apps + +--- + drivers/char/broadcom/vc_sm/vc_sm_knl.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/char/broadcom/vc_sm/vc_sm_knl.h b/drivers/char/broadcom/vc_sm/vc_sm_knl.h +index e50fd8eaecef7a3c8451c040ffc3888cc37e28fc..4f120421c2d11f7ae46752c38b073a4dfdf712c6 100644 +--- a/drivers/char/broadcom/vc_sm/vc_sm_knl.h ++++ b/drivers/char/broadcom/vc_sm/vc_sm_knl.h +@@ -29,8 +29,8 @@ enum vc_sm_lock_cache_mode { + + /* Cache functions */ + #define VCSM_CACHE_OP_INV 0x01 +-#define VCSM_CACHE_OP_FLUSH 0x02 +-#define VCSM_CACHE_OP_CLEAN 0x03 ++#define VCSM_CACHE_OP_CLEAN 0x02 ++#define VCSM_CACHE_OP_FLUSH 0x03 + + /* Allocate a shared memory handle and block. */ + int vc_sm_alloc(struct vc_sm_alloc_t *alloc, int *handle); From 161b070525622618a30413d1785dd9f145e90078 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Fri, 13 Oct 2017 14:16:15 +0100 Subject: [PATCH 11/16] RPi: update firmware to 8c9b9a3 --- packages/graphics/bcm2835-driver/package.mk | 4 ++-- packages/tools/bcm2835-bootloader/package.mk | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/graphics/bcm2835-driver/package.mk b/packages/graphics/bcm2835-driver/package.mk index 9f7f70e016..02e8f57b51 100644 --- a/packages/graphics/bcm2835-driver/package.mk +++ b/packages/graphics/bcm2835-driver/package.mk @@ -17,8 +17,8 @@ ################################################################################ PKG_NAME="bcm2835-driver" -PKG_VERSION="7f7df25" -PKG_SHA256="eb5a677cd0e9c9160ae78bce4bf46cb66d30a20185e0fc1dd31afa5782967afa" +PKG_VERSION="8c9b9a3" +PKG_SHA256="ce67599a389ba2c491bb731294f55226732afa6ab30e961e92d16c409c284979" PKG_ARCH="any" PKG_LICENSE="nonfree" PKG_SITE="http://www.broadcom.com" diff --git a/packages/tools/bcm2835-bootloader/package.mk b/packages/tools/bcm2835-bootloader/package.mk index 9997cd4a07..1ffa0f79a6 100644 --- a/packages/tools/bcm2835-bootloader/package.mk +++ b/packages/tools/bcm2835-bootloader/package.mk @@ -17,8 +17,8 @@ ################################################################################ PKG_NAME="bcm2835-bootloader" -PKG_VERSION="7f7df25" -PKG_SHA256="1a542dddf065d1bf69076b505bcd73a32e5167a29326e9b22d74cec87f304fae" +PKG_VERSION="8c9b9a3" +PKG_SHA256="7a1f3bbec45c679c55ebd856257588d86488f9787cc0819e293a7a7664e90f7e" PKG_ARCH="arm" PKG_LICENSE="nonfree" PKG_SITE="http://www.broadcom.com" From 9474fcf6f4be7c0d862684a2fc185f8c69e1c311 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Fri, 13 Oct 2017 14:16:15 +0100 Subject: [PATCH 12/16] linux: update to linux-4.13.5 --- packages/linux/package.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/linux/package.mk b/packages/linux/package.mk index 6de87f3041..dd0f507768 100644 --- a/packages/linux/package.mk +++ b/packages/linux/package.mk @@ -63,8 +63,8 @@ case "$LINUX" in PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET imx6-status-led imx6-soc-fan irqbalanced" ;; *) - PKG_VERSION="4.13.4" - PKG_SHA256="a09e95eb59de505cec462f3008148bcf7f5b8ed0e9e19f3e129d13a7a8d8f420" + PKG_VERSION="4.13.5" + PKG_SHA256="a9e85ada609d4fc6f21bf1836099259e3634be142abe8208d88de3e257ff25e2" PKG_URL="https://www.kernel.org/pub/linux/kernel/v4.x/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_PATCH_DIRS="default" ;; From f0bfb0efd75c7e2782aae130d36fe350582eee74 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Fri, 13 Oct 2017 14:16:15 +0100 Subject: [PATCH 13/16] RPi: update linux support patch for linux 4.13.5 --- .../patches/linux/linux-01-RPi_support.patch | 268 +++++++++--------- 1 file changed, 134 insertions(+), 134 deletions(-) diff --git a/projects/RPi/patches/linux/linux-01-RPi_support.patch b/projects/RPi/patches/linux/linux-01-RPi_support.patch index 4a3f7ba8bf..c60da13f0b 100644 --- a/projects/RPi/patches/linux/linux-01-RPi_support.patch +++ b/projects/RPi/patches/linux/linux-01-RPi_support.patch @@ -1,4 +1,4 @@ -From c126f85a3ef4bb7a8452acb8302513040ede0232 Mon Sep 17 00:00:00 2001 +From f18123e0d0318a29c8feffd66d291a99ca78343d Mon Sep 17 00:00:00 2001 From: Steve Glendinning Date: Thu, 19 Feb 2015 18:47:12 +0000 Subject: [PATCH 001/134] smsx95xx: fix crimes against truesize @@ -48,7 +48,7 @@ index 340c13484e5cc7dd5001577b7522d5a4318bd5b6..7d3d98f0405ad948f9ab3e035a70e15c usbnet_skb_return(dev, ax_skb); } -From 4dc2f9761aa5b4d60b2537c3ee253de805729347 Mon Sep 17 00:00:00 2001 +From c13705aa5c56b16069f5cee2d001863edef036ca Mon Sep 17 00:00:00 2001 From: Sam Nazarko Date: Fri, 1 Apr 2016 17:27:21 +0100 Subject: [PATCH 002/134] smsc95xx: Experimental: Enable turbo_mode and @@ -94,7 +94,7 @@ index 7d3d98f0405ad948f9ab3e035a70e15c667e4fa1..8d34e517db08d895e6135f785c42bf63 netif_dbg(dev, ifup, dev->net, "rx_urb_size=%ld\n", -From d722d1411b07a9c16fd03e2f032889961b7c1947 Mon Sep 17 00:00:00 2001 +From 744377718ba30d7cf58cb64f9276802c97349e3c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 Subject: [PATCH 003/134] Allow mac address to be set in smsc95xx @@ -193,7 +193,7 @@ index 8d34e517db08d895e6135f785c42bf639671815c..5df7e105c41532c3185e46ee54f43a37 eth_hw_addr_random(dev->net); netif_dbg(dev, ifup, dev->net, "MAC address set to eth_random_addr\n"); -From 28fbd87d522ea5301fda0bc32c1ea3ee0f55de2d Mon Sep 17 00:00:00 2001 +From e197d97ec01f29f77f90be4bfb6d8370d6509550 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 13 Mar 2015 12:43:36 +0000 Subject: [PATCH 004/134] Protect __release_resource against resources without @@ -224,7 +224,7 @@ index 9b5f04404152c296af3a96132f27cfc80ffa9af9..f8a9af6e6b915812be2ba2c1c2b40106 for (;;) { tmp = *p; -From 907887ac7209429cbad9d425f32151875cfa8972 Mon Sep 17 00:00:00 2001 +From 18a4bafafa1611517487896b4be30e3e61641f80 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 4 Dec 2015 17:41:50 +0000 Subject: [PATCH 005/134] irq-bcm2836: Prevent spurious interrupts, and trap @@ -254,7 +254,7 @@ index e7463e3c08143acae3e8cc5682f918c6a0b07ebd..a8db33b50ad9ff83d284fa54fe4d3b65 #endif } else if (stat) { -From 6a232939fcdb81eff16aad43c30d518dcf0ca027 Mon Sep 17 00:00:00 2001 +From bd4b6c65d43d4c700a7d0035cd56f6beb9a54ead Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:33:30 +0000 Subject: [PATCH 006/134] irq-bcm2836: Avoid "Invalid trigger warning" @@ -281,7 +281,7 @@ index a8db33b50ad9ff83d284fa54fe4d3b65f859df0f..c4e151451cf8c8ebde5225515eac2786 static void -From 330b528bfd4a6a88bc68bb7aba5eb68147610eec Mon Sep 17 00:00:00 2001 +From e85701779a1a4891496073d616b58b0ee93afaa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 12 Jun 2015 19:01:05 +0200 Subject: [PATCH 007/134] irqchip: bcm2835: Add FIQ support @@ -413,7 +413,7 @@ index 44d7c38dde479d771f3552e914bf8c1c1f5019f7..42ff5e6a8e0d532f5b60a1e7af7cc4d9 } -From 6de7ad2320b4a3646bd5f0d5bbd0e921e865e54a Mon Sep 17 00:00:00 2001 +From 166d0e6318a64ac69daf9c024906056c6ef6f18b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 23 Oct 2015 16:26:55 +0200 Subject: [PATCH 008/134] irqchip: irq-bcm2835: Add 2836 FIQ support @@ -515,7 +515,7 @@ index 42ff5e6a8e0d532f5b60a1e7af7cc4d941bd5008..eccf6ed025299cb480884f5bcbe77abf for (b = 0; b < NR_BANKS; b++) { for (i = 0; i < bank_irqs[b]; i++) { -From fd64997995b2ddb95e98145f35687ef1e57892ca Mon Sep 17 00:00:00 2001 +From 73580125118ebe5a5040d3598022cfc42fe1c8be Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 8 May 2017 16:43:40 +0100 Subject: [PATCH 009/134] irq_bcm2836: Send event when onlining sleeping cores @@ -554,7 +554,7 @@ index c4e151451cf8c8ebde5225515eac2786d6f61d46..bee4d2d2ebacc3233423bb9d825e076b } -From de643cad38610aa424c804a0fae8590a381d6369 Mon Sep 17 00:00:00 2001 +From d2a3430f6d5c6819167a6bc5b10ff8cfa7b7b104 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 10:26:09 +0100 Subject: [PATCH 010/134] spidev: Add "spidev" compatible string to silence @@ -578,7 +578,7 @@ index cda10719d1d1b21b32866d2b79363faa461ab8e1..4f3779d3aa0960640506725bde918075 }; MODULE_DEVICE_TABLE(of, spidev_dt_ids); -From 8f514d88841d4c243782961ec1968f8f870efcf4 Mon Sep 17 00:00:00 2001 +From bb9d07f7a9c0c68aef2439232578349c130bdc3b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 3 Jan 2017 18:25:01 +0000 Subject: [PATCH 011/134] Revert "pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP" @@ -880,7 +880,7 @@ index 230883168e99a1a3fecc7916ef0a7e0de7e8b3f1..ff3789a11b3c36b922b9d08035abb638 if (IS_ERR(pc->pctl_dev)) { gpiochip_remove(&pc->gpio_chip); -From 82d8e12faf78a22c262275f150331ac0e3ba7e84 Mon Sep 17 00:00:00 2001 +From 80a04a93b6727f3328b3f07ed64bfa0e2dd630bf Mon Sep 17 00:00:00 2001 From: notro Date: Thu, 10 Jul 2014 13:59:47 +0200 Subject: [PATCH 012/134] pinctrl-bcm2835: Set base to 0 give expected gpio @@ -905,7 +905,7 @@ index ff3789a11b3c36b922b9d08035abb638187c2f5a..d2b537572095c86576f78536f737c102 .can_sleep = false, }; -From 4ff754bf83df35759b0f797d8fd4dffeb7cba0ea Mon Sep 17 00:00:00 2001 +From b99b9d618492cd37b9b6170de0a75135f9579b1e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 26 Feb 2015 09:58:22 +0000 Subject: [PATCH 013/134] pinctrl-bcm2835: Only request the interrupts listed @@ -935,7 +935,7 @@ index d2b537572095c86576f78536f737c102487f99f4..a9d480df32562defbf8be0faf0a39bfe pc->irq_data[i].irqgroup = i; -From 3333e460bd62167d9a4d0f2610d16f0d67b58744 Mon Sep 17 00:00:00 2001 +From 34f52b116202ac02b289a149291d1a13b6684c5a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Jun 2015 14:10:44 +0100 Subject: [PATCH 014/134] spi-bcm2835: Support pin groups other than 7-11 @@ -1019,7 +1019,7 @@ index f35cc10772f6670397ea923ad30158270dd68578..5dfe20ffc2866fa6789825016c585175 /* and set up the "mode" and level */ dev_info(&spi->dev, "setting up native-CS%i as GPIO %i\n", -From 564577de10650ebf69c28e7f3529a1438b53cf29 Mon Sep 17 00:00:00 2001 +From 52385a8fd084d52b51ea33f34a939f2d1435ebed Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 1 Jul 2016 22:09:24 +0100 Subject: [PATCH 015/134] spi-bcm2835: Disable forced software CS @@ -1056,7 +1056,7 @@ index 5dfe20ffc2866fa6789825016c585175a29705b6..8493474d286f7a1ac6454a22c61c8c2c return 0; } -From 8ed958150abacb645ccad7ec1261ef68ba76238e Mon Sep 17 00:00:00 2001 +From 279e9b7e6817f26366120c273962c90d2bf0555a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 8 Nov 2016 21:35:38 +0000 Subject: [PATCH 016/134] spi-bcm2835: Remove unused code @@ -1147,7 +1147,7 @@ index 8493474d286f7a1ac6454a22c61c8c2cef9121bf..33d75ad38a7f77d085321ace9101900a } -From e55862ba66142fc0693c2c0a8efcbd61dd02dcc7 Mon Sep 17 00:00:00 2001 +From 1ce3b01a079ed1a0387bb213eb15ecc1615ace5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Wed, 3 Jun 2015 12:26:13 +0200 Subject: [PATCH 017/134] ARM: bcm2835: Set Serial number and Revision @@ -1203,7 +1203,7 @@ index 0c1edfc98696da0e0bb7f4a18cdfbcdd27a9795d..8f152266ba9b470df2eaaed9ebcf158e static const char * const bcm2835_compat[] = { -From a84fe045ee6c945513339d64348108165516242a Mon Sep 17 00:00:00 2001 +From fd07ac398228b4db90ae22647c6453d7fed85b33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 3 Oct 2015 22:22:55 +0200 Subject: [PATCH 018/134] dmaengine: bcm2835: Load driver early and support @@ -1309,7 +1309,7 @@ index 6204cc32d09c5096df8aec304c3c37b3bcb6be44..599c218dc8a73172dd4bd4a058fc8f95 MODULE_ALIAS("platform:bcm2835-dma"); MODULE_DESCRIPTION("BCM2835 DMA engine driver"); -From 230fbc29abc1f87c97c07300ee377979fa940e10 Mon Sep 17 00:00:00 2001 +From 8e0ad87b5f8143c2af3be4898df82ae1cf3358c6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 25 Jan 2016 17:25:12 +0000 Subject: [PATCH 019/134] firmware: Updated mailbox header @@ -1373,7 +1373,7 @@ index cb979ad90401e299344dd5fae38d09c489d8bd58..30fb37fe175df604a738258a2a632bca RPI_FIRMWARE_VCHIQ_INIT = 0x00048010, -From faf484ee4d3b4c212349d473dd9e4392b8cc75c0 Mon Sep 17 00:00:00 2001 +From 33261ce71b6a593ed95808e6d0e3cc7f3b554878 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 15 Jun 2016 16:48:41 +0100 Subject: [PATCH 020/134] rtc: Add SPI alias for pcf2123 driver @@ -1396,7 +1396,7 @@ index 8895f77726e8da5444afcd602dceff8f25a9b3fd..1833b8853ceb0e6147cceb93a00e558c MODULE_LICENSE("GPL"); +MODULE_ALIAS("spi:rtc-pcf2123"); -From 0e188fba7c9e5f26acdb4479143957a592958a76 Mon Sep 17 00:00:00 2001 +From b82bba9e29e14158dddc0a21cbba830a5359285d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 7 Oct 2016 16:50:59 +0200 Subject: [PATCH 021/134] watchdog: bcm2835: Support setting reboot partition @@ -1501,7 +1501,7 @@ index b339e0e67b4c1275fd4992fea4f1e24c0575b783..26b7177573fac2af1cd4ab5488d2686f static int bcm2835_wdt_probe(struct platform_device *pdev) -From 709ae2e131a6a57f5095bc2a8898e0dc5c14c83f Mon Sep 17 00:00:00 2001 +From 90c116f60be9a4e20874dac37b33c0ffe9963320 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 5 Apr 2016 19:40:12 +0100 Subject: [PATCH 022/134] reboot: Use power off rather than busy spinning when @@ -1527,7 +1527,7 @@ index 3b2aa9a9fe268d45335f781c4aa22cf573753a1b..0180d89a34af45c56243fe0f17fbe209 /* -From 39d2393b894dd5c6c2e10cfca375d3312803e2c4 Mon Sep 17 00:00:00 2001 +From a3367d726870a9d0719b37451dcb4b34a616d2d7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 9 Nov 2016 13:02:52 +0000 Subject: [PATCH 023/134] bcm: Make RASPBERRYPI_POWER depend on PM @@ -1549,7 +1549,7 @@ index 49f1e2a75d614bc21db152327c7b425ae2504f8d..dccd2374ed00631abd441e3e9d78ee74 help This enables support for the RPi power domains which can be enabled -From dd56fb2edb2b69c9715bd0f65ec5a4c7245f4356 Mon Sep 17 00:00:00 2001 +From 77aca1e688811bb0222373fb5aaa87e4946b7057 Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Fri, 2 Sep 2016 16:45:27 +0100 Subject: [PATCH 024/134] Register the clocks early during the boot process, so @@ -1597,7 +1597,7 @@ index 58ce6af8452db9ca8b4d3c380a06e448919f6a8d..11d89d106026f15719ea25047d6f357b MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("BCM2835 clock driver"); -From bb124ac8bd0c0aafd3e6d28f5df5cdac6294d74c Mon Sep 17 00:00:00 2001 +From 3fc53150c99084d7777551b3f36b6861ee61d09c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 6 Dec 2016 17:05:39 +0000 Subject: [PATCH 025/134] bcm2835-rng: Avoid initialising if already enabled @@ -1626,7 +1626,7 @@ index 574211a495491d9d6021dcaefe4274a63ed02055..e66c0fca8c6090e32f72796c0877a1cf err = hwrng_register(&bcm2835_rng_ops); if (err) { -From 7626e25dc267151b31d06c04bed9fd924bcd0fa8 Mon Sep 17 00:00:00 2001 +From 5eac392f46d13120ffcba1e13e744634959086ee Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Aug 2016 16:28:44 +0100 Subject: [PATCH 026/134] kbuild: Ignore dtco targets when filtering symbols @@ -1649,7 +1649,7 @@ index 9ffd3dda3889c56a7a72229bed21ff5c49d62856..00da6c9bacbf33334233e22ca5209ade esac | tr ";" "\n" | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/KSYM_\1/p' -From 123c46723868a13728c6e8398691c2ae57932da6 Mon Sep 17 00:00:00 2001 +From c5d2d8d89edb14cde9482a0617ac23d586c11b76 Mon Sep 17 00:00:00 2001 From: Robert Tiemann Date: Mon, 20 Jul 2015 11:01:25 +0200 Subject: [PATCH 027/134] BCM2835_DT: Fix I2S register map @@ -1690,7 +1690,7 @@ index 65783de0aedf3da79adc36fd077b7a89954ddb6b..a89fe4220fdc3f26f75ee66daf187554 dmas = <&dma 2>, <&dma 3>; -From 5c200cdf2569a9dff3ff61769b4707466634bc95 Mon Sep 17 00:00:00 2001 +From 912bfe4678fc031f58f9afa64ebc5028e43913bb Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 Subject: [PATCH 028/134] clk-bcm2835: Mark used PLLs and dividers CRITICAL @@ -1721,7 +1721,7 @@ index 11d89d106026f15719ea25047d6f357b4bfcb2c5..fe8f5d65f2749cb3ddc878df61664826 divider->data = data; -From 769058fcf3c3fbc5d886d793f8146123c1c3a1f5 Mon Sep 17 00:00:00 2001 +From feef6b2cac317c9e841cc2f2644f99aa8395d226 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 Subject: [PATCH 029/134] clk-bcm2835: Add claim-clocks property @@ -1826,7 +1826,7 @@ index fe8f5d65f2749cb3ddc878df616648267441e0ee..92b5e0f5145b32d3bfc3592fe381e8be sizeof(cprman_parent_names)); of_clk_parent_fill(dev->of_node, cprman->real_parent_names, -From 77c9810b13096f46aec90a29f407d9519c7fb41e Mon Sep 17 00:00:00 2001 +From 730f7112ebf2ca263f213e04291ad6c5129ea883 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 6 Mar 2017 09:06:18 +0000 Subject: [PATCH 030/134] clk-bcm2835: Read max core clock from firmware @@ -1944,7 +1944,7 @@ index 92b5e0f5145b32d3bfc3592fe381e8be3cd90c72..336f8c9c44325d0a94e591a8557f7af2 for (i = 0; !of_property_read_u32_index(pdev->dev.of_node, "claim-clocks", -From 6a2711951d54250553e13bf5932a4f0baf57a83f Mon Sep 17 00:00:00 2001 +From d7156eb8b0f4fc656f1af577b04e7770c8fa41e8 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 9 May 2016 17:28:18 -0700 Subject: [PATCH 031/134] clk: bcm2835: Mark GPIO clocks enabled at boot as @@ -1985,7 +1985,7 @@ index 336f8c9c44325d0a94e591a8557f7af246adc857..caa05e5ad0b7b5cd683e04fb3591a3df * rate changes on at least of the parents. */ -From 5a530d71384e36c00a27f1a3faf12cb80f746601 Mon Sep 17 00:00:00 2001 +From bc6f85af220f866ee0c3bf00e0ab1f4c3685acb8 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:36:44 +0000 Subject: [PATCH 032/134] sound: Demote deferral errors to INFO level @@ -2023,7 +2023,7 @@ index 13c875e2392a40ec5651d7c12a28b9ac9f3aab85..23d56057e49b5ff6b6c3c352c150fee8 goto _err_defer; } -From f3df72ebfb8e407402e9de76ce88fe8fe06b64e4 Mon Sep 17 00:00:00 2001 +From fac58d6c415da4e07212c3007189deb1533bfcf4 Mon Sep 17 00:00:00 2001 From: Claggy3 Date: Sat, 11 Feb 2017 14:00:30 +0000 Subject: [PATCH 033/134] Update vfpmodule.c @@ -2163,7 +2163,7 @@ index a71a48e71fffa8626fe90106815376c44bbe679b..d6c0a5a0a5ae3510db3ace5e3f5d3410 /* * Save the userland NEON/VFP state. Under UP, -From 84ee4ee351dd2bd92650cb5f29a757b97d003f52 Mon Sep 17 00:00:00 2001 +From 299109833b45000e763626a6f89fd228312050d9 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Mar 2017 21:13:24 +1100 Subject: [PATCH 034/134] ASoC: bcm2835_i2s.c: relax the ch2 register setting @@ -2187,7 +2187,7 @@ index 6ba20498202ed36906b52096893a88867a79269f..56df7d8a43d0aac055a91b0d24aca8e1 format |= BCM2835_I2S_CH1(BCM2835_I2S_CHPOS(ch1pos)); format |= BCM2835_I2S_CH2(BCM2835_I2S_CHPOS(ch2pos)); -From 44ae1a1c279b95a4c641da34e07eb43005fc48ff Mon Sep 17 00:00:00 2001 +From 5766269728236665eb37b518cb9c8b41da3ccf77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Tue, 1 Nov 2016 15:15:41 +0100 Subject: [PATCH 035/134] i2c: bcm2835: Add debug support @@ -2379,7 +2379,7 @@ index cd07a69e2e9355540442785f95e90823b05c9d10..47167f403cc8329bd811b47c7011c299 if (i2c_dev->msg_err & BCM2835_I2C_S_ERR) return -EREMOTEIO; -From c7e9b4324849ec435b301a53d695d1f998f9fab4 Mon Sep 17 00:00:00 2001 +From 80a72ca46760dd520f61c87e2d32fd9e7a561659 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 18 Dec 2014 16:07:15 -0800 Subject: [PATCH 036/134] mm: Remove the PFN busy warning @@ -2407,7 +2407,7 @@ index 1423da8dd16f5bdc83e20ddf6665b2022a9a6492..6ce930c02160d55dc4eee1e7197a5efa goto done; } -From df94e12cb7dd9a3657dbb1f0e81d98a181f3d8cd Mon Sep 17 00:00:00 2001 +From 644c64397ae843e87722be6556eb3636e0558880 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 10:06:56 +0000 Subject: [PATCH 037/134] ASoC: Add prompt for ICS43432 codec @@ -2435,7 +2435,7 @@ index 6c78b0b49b8145c24740d93c4174c059d91ddae9..d6450d5fc144737f967b8e00678baa9b config SND_SOC_INNO_RK3036 tristate "Inno codec driver for RK3036 SoC" -From 62c4cf83231254d63f7bb205fc8743591072c9ce Mon Sep 17 00:00:00 2001 +From 5f76d96a880b96a0728f57db58f85a6ef0c883d0 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 18 May 2017 15:36:46 +0100 Subject: [PATCH 038/134] staging: bcm2835-audio: Fix memory corruption @@ -2473,7 +2473,7 @@ index 5f3d8f2339e34834d11edfa8de1d5819e3e32b4f..89f96f3c02805f4114ec9b488e18d00e return ret; } -From 0b78c9ffe7de3ea37708d666357e006b6fa02c9d Mon Sep 17 00:00:00 2001 +From e62efd3c0da74a112524273559dfd1bd4bb41081 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 Subject: [PATCH 039/134] Main bcm2708/bcm2709 linux port @@ -2664,7 +2664,7 @@ index cfb4b4496dd9f61362dea012176c146120fada07..d9c6c217c4d6a2408abe2665bf7f2700 MODULE_AUTHOR("Lubomir Rintel "); MODULE_DESCRIPTION("BCM2835 mailbox IPC driver"); -From b614f0993996a586e1067b84dc8c9a3781f7d66e Mon Sep 17 00:00:00 2001 +From ea5bfe9a718e4ad6a9ad5d0e9ba754fcdf1dbaa0 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 Subject: [PATCH 040/134] Add dwc_otg driver @@ -63941,7 +63941,7 @@ index 0000000000000000000000000000000000000000..cdc9963176e5a4a0d5250613b61e26c5 +test_main(); +0; -From d5ec72f68f13ad6aa9698ddefcd74fa29bb148eb Mon Sep 17 00:00:00 2001 +From 1fd19da1f463a9539f87aacc32e76c7eb86c2628 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 17:06:34 +0100 Subject: [PATCH 041/134] bcm2708 framebuffer driver @@ -67403,7 +67403,7 @@ index 3c14e43b82fefe1d32f591d1b2f61d2cd28d0fa8..7626beb6a5bb8df601ddf0f6e6909d1f +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 bb813148e1a0b72a63cd63e30ffd49d6b687b828 Mon Sep 17 00:00:00 2001 +From afdf5dc9e6085f43e14b9c697ff17310163082ce Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 Subject: [PATCH 042/134] dmaengine: Add support for BCM2708 @@ -68037,7 +68037,7 @@ index 0000000000000000000000000000000000000000..c5bfff2765be4606077e6c8af73040ec + +#endif /* _PLAT_BCM2708_DMA_H */ -From db475f46a1d100d823b7f182a271c5b327fe85bd Mon Sep 17 00:00:00 2001 +From a1e0f19539ed7025aeeefaafe4fd20a4533eaa07 Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:06 +0100 Subject: [PATCH 043/134] MMC: added alternative MMC driver @@ -69920,7 +69920,7 @@ index 46c73e97e61f08a41d9753079345f5965caebbc5..388c551ed11e9d06ea1c25b6553d47a8 unsigned int erase_size; /* erase size in sectors */ -From 311a1a2a10fd212784ca55e0a5f9b1cd0990f0f4 Mon Sep 17 00:00:00 2001 +From 995845a72f105455f96c4fdaf7c5a61a3420b550 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Mar 2015 17:49:47 +0000 Subject: [PATCH 044/134] Adding bcm2835-sdhost driver, and an overlay to @@ -72329,7 +72329,7 @@ index 0000000000000000000000000000000000000000..9c6f199a7830959f31012d86bc1f8b1a +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Phil Elwell"); -From 91c2214a554425ca42419323565e772344062e1c Mon Sep 17 00:00:00 2001 +From c82a1ecf39452ef641c625cfee38645eccb7921c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 28 Oct 2016 15:36:43 +0100 Subject: [PATCH 045/134] vc_mem: Add vc_mem driver for querying firmware @@ -72857,7 +72857,7 @@ index 0000000000000000000000000000000000000000..20a475377eb3078ea1ecaef2b24efc35 + +#endif /* _VC_MEM_H */ -From 701ef83b2f016c20884b9faae7cd66d3bd56913d Mon Sep 17 00:00:00 2001 +From 2ab63c04964e4b7af4bb90e8074d5ff4f3174187 Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Tue, 22 Jul 2014 15:41:04 +0100 Subject: [PATCH 046/134] vcsm: VideoCore shared memory service for BCM2835 @@ -77734,7 +77734,7 @@ index 0000000000000000000000000000000000000000..b75729d762f25aace133f7a008633b40 + +#endif /* __VMCS_SM_IOCTL_H__INCLUDED__ */ -From f3a26295cfaebafafe862e4c42dbbe82f7226a31 Mon Sep 17 00:00:00 2001 +From 9c305c4ad85ec449dd04b73a8216090a5934258f Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Fri, 21 Aug 2015 23:14:48 +0100 Subject: [PATCH 047/134] Add /dev/gpiomem device for rootless user GPIO access @@ -78045,7 +78045,7 @@ index 0000000000000000000000000000000000000000..f5e7f1ba8fb6f18dee77fad06a17480c +MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace"); +MODULE_AUTHOR("Luke Wren "); -From 34e57fbf898b8a2a78bdc5d072f00c8d09c774c6 Mon Sep 17 00:00:00 2001 +From 8b26c878e4ee048d8ac1933e999d41d6424391c2 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:14:45 +0100 Subject: [PATCH 048/134] Add SMI driver @@ -79999,7 +79999,7 @@ index 0000000000000000000000000000000000000000..ee3a75edfc033eeb0d90a687ffb68b10 + +#endif /* BCM2835_SMI_H */ -From 35b24e58b762f62bef4dcc55c779cd6d811c064a Mon Sep 17 00:00:00 2001 +From 530a7692ed2faa6ce736d0540e583d94654989e3 Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Tue, 26 Apr 2016 14:59:21 +0000 Subject: [PATCH 049/134] MISC: bcm2835: smi: use clock manager and fix reload @@ -80172,7 +80172,7 @@ index 63a4ea08b9930a3a31a985f0a1d969b488ed49ec..1261540703127d1d63b9f3c87042c6e5 return 0; } -From e9a8264ba1c07ff56076871fe12dac481e909adc Mon Sep 17 00:00:00 2001 +From be2c3360edbd837bb57c54f786001f659d538232 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:16:10 +0100 Subject: [PATCH 050/134] Add SMI NAND driver @@ -80540,7 +80540,7 @@ index 0000000000000000000000000000000000000000..02adda6da18bd0ba9ab19a104975b79d + ("Driver for NAND chips using Broadcom Secondary Memory Interface"); +MODULE_AUTHOR("Luke Wren "); -From ea66e2dd87d561192a5689065f25d5e314be168f Mon Sep 17 00:00:00 2001 +From 2ab2b1daa12485af9f6b762e9534ea40af7a5c0c Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 Subject: [PATCH 051/134] lirc: added support for RaspberryPi GPIO @@ -81403,7 +81403,7 @@ index 0000000000000000000000000000000000000000..fb69624ccef00ddbdccf8256d6baf1b1 + +#endif -From 4f05b23e7510838b73aeb40dbd2444923a3111f6 Mon Sep 17 00:00:00 2001 +From b6ab5c03dfaec67d0bcc3a48fc3a0cca756210af Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 Subject: [PATCH 052/134] Add cpufreq driver @@ -81670,7 +81670,7 @@ index 0000000000000000000000000000000000000000..99345969b0e4d651fd9033d67de2febb +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); -From 648b7875938337118b7d4246a937feee0b6ee671 Mon Sep 17 00:00:00 2001 +From ba42dcfb79745ca96724272d62101bf57eb00da3 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 15:44:08 +0100 Subject: [PATCH 053/134] Add Chris Boot's i2c driver @@ -82338,7 +82338,7 @@ index 0000000000000000000000000000000000000000..962f2e5c7455d91bf32925d785f5f16b +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); -From 01d090118e494c2acc2056857fc434629f38eb83 Mon Sep 17 00:00:00 2001 +From 70e038c82618b3dfe2da28ce3c909b4f82ac6dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:27:06 +0200 Subject: [PATCH 054/134] char: broadcom: Add vcio module @@ -82566,7 +82566,7 @@ index 0000000000000000000000000000000000000000..c19bc2075c77879563ef5e59038b5a14 +MODULE_DESCRIPTION("Mailbox userspace access"); +MODULE_LICENSE("GPL"); -From b52a861362a21862fb921466c93558755b06cdec Mon Sep 17 00:00:00 2001 +From f8c876d91dab72b94ad70b3d8ffd734ea4b5f4b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:25:01 +0200 Subject: [PATCH 055/134] firmware: bcm2835: Support ARCH_BCM270x @@ -82652,7 +82652,7 @@ index dd506cd3a5b874f9e1acd07efb8cd151bb6145d1..3f070bd38a91511c986e3fb114b15bd4 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("Raspberry Pi firmware driver"); -From b74bdbc6086750c73838defe0da7cd0591727559 Mon Sep 17 00:00:00 2001 +From b7251c114610e8aa8ba1e63a9e0c5a959738d8b2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 May 2015 09:00:42 +0100 Subject: [PATCH 056/134] scripts: Add mkknlimg and knlinfo scripts from tools @@ -83182,7 +83182,7 @@ index 0000000000000000000000000000000000000000..84be2593ec1de8f97b0167ff06b3e05d + return $trailer; +} -From 74bbf306c59e9858db7a1a74fcad6ba478e0b885 Mon Sep 17 00:00:00 2001 +From 4b7f2c34e9d0614ac43ca565fede8a525c9998ec Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:46:08 +0200 Subject: [PATCH 057/134] BCM2708: Add core Device Tree support @@ -95422,7 +95422,7 @@ index 58c05e5d9870b6c18a72da7dc44ff3112994946d..9842523b225a88505d796cc689c04f40 # Bzip2 -From 306c8bbe633e204bfe1e8343bb64610f7848d9d7 Mon Sep 17 00:00:00 2001 +From 6e10baca0f4e2753ee68c6f07ca2004f93f5f3ad Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Feb 2015 13:50:57 +0000 Subject: [PATCH 058/134] BCM270x_DT: Add pwr_led, and the required "input" @@ -95600,7 +95600,7 @@ index 64c56d454f7df9f864a5242ce4212df586f66886..3fd74c8737871cb56f0355c858fc135e /* set_brightness_work / blink_timer flags, atomic, private. */ unsigned long work_flags; -From 1cc0bcba126845ad37f21ac08457009d669e4c55 Mon Sep 17 00:00:00 2001 +From 84aab063a2b7a1f0f76024076e1c04a81241b1a1 Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 Subject: [PATCH 059/134] fbdev: add FBIOCOPYAREA ioctl @@ -95871,7 +95871,7 @@ index fb795c3b3c178ad3cd7c9e9e4547ffd492bac181..703fa8a70574323abe2fb32599254582 __u32 dx; /* screen-relative */ __u32 dy; -From 72671d1c6e3543337ef5adc95b8c28d43684da2e Mon Sep 17 00:00:00 2001 +From 8c7d51d2bc4d76a5ae088fad49a997e68522d1d7 Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 Subject: [PATCH 060/134] Speed up console framebuffer imageblit function @@ -96083,7 +96083,7 @@ index a2bb276a8b2463eee98eb237c4647bc00cd93601..436494fba15abecb400ef28688466faf start_index, pitch_index); } else -From e231cb36b0fac4c5c95dd94f11dd8609f560fce4 Mon Sep 17 00:00:00 2001 +From 57851fa2f96f2081d464b4246a89c51d2a1b4fd4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 Subject: [PATCH 061/134] enabling the realtime clock 1-wire chip DS1307 and @@ -96336,7 +96336,7 @@ index 90cbe7e65059f6b604a87c6bf39cd9bbeae7684c..a52be51ee0a5511a75d4eaa8dacaec5e u8, w1_slave_found_callback); }; -From 9046cc4ffa4b2cc454266b3ccdf1f88bbc641599 Mon Sep 17 00:00:00 2001 +From 4e00fcbcab17bb16b4bbcbed85710bc415885a75 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 14 Jul 2014 22:02:09 +0100 Subject: [PATCH 062/134] hid: Reduce default mouse polling interval to 60Hz @@ -96371,7 +96371,7 @@ index c008847e0b20a2accb00451b10fb1c648f67925b..4a86428a3b4e3d51e9ac6ce9c9c11097 break; case HID_GD_JOYSTICK: -From a398921bfc56fdd8326f03fa6a71d9e4ded33fbb Mon Sep 17 00:00:00 2001 +From bcb83898fc77acea099939020bdf111d11f3a51e Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Tue, 12 May 2015 14:47:56 +0100 Subject: [PATCH 063/134] rpi-ft5406: Add touchscreen driver for pi LCD display @@ -96732,7 +96732,7 @@ index 30fb37fe175df604a738258a2a632bca3bfff33f..4a3d79d3b48eb483a4e4bf498f617515 RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From bdf51b34fe1b57df673ab6deae87e20970c3e44d Mon Sep 17 00:00:00 2001 +From ad0c9297e23a427ab816021f8ce337df9ca53720 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 28 Nov 2016 16:50:04 +0000 Subject: [PATCH 064/134] Improve __copy_to_user and __copy_from_user @@ -98310,7 +98310,7 @@ index 17ec37811c32f09126ed42753037e055c5cec115..c08f81812d0d56a0d90c1eb6777d0622 bool "Broadcom BCM63xx DSL SoC" depends on ARCH_MULTI_V7 -From 01c2edd711a41cc2e8104b27bd8de5c356ba8323 Mon Sep 17 00:00:00 2001 +From 18a1f6ebfb0bfc62783eff7abae21ff9af376dc1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 25 Jun 2015 12:16:11 +0100 Subject: [PATCH 065/134] gpio-poweroff: Allow it to work on Raspberry Pi @@ -98348,7 +98348,7 @@ index be3d81ff51cc3f510d85e4eed7a52960e51e7bc1..a030ae9fb1fca325061c093696e82186 "%s: pm_power_off function already registered", __func__); -From 51b10e3316437f7d430fc9ed4a95ea0412f37a04 Mon Sep 17 00:00:00 2001 +From 804aa8b83c716ce0f902372c206bdaa4fcc47b34 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 14:32:47 +0100 Subject: [PATCH 066/134] mfd: Add Raspberry Pi Sense HAT core driver @@ -99216,7 +99216,7 @@ index 0000000000000000000000000000000000000000..56196dc2af10e464a1e3f98b028dca1c + +#endif -From 3f4cd1b697fc741f6cf21948f4dda3d77033ec0f Mon Sep 17 00:00:00 2001 +From e71f808f2a20357bcb2fd48cbc53dd31510a0ab1 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 Subject: [PATCH 067/134] ASoC: Add support for HifiBerry DAC @@ -99394,7 +99394,7 @@ index 0000000000000000000000000000000000000000..ee9f133953544629282631e5ef3f73fe +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); -From a66a4a0097c3c8478933e0b62aa2f3db8170553f Mon Sep 17 00:00:00 2001 +From f2ac7a1fc8bdc0c404d114db53bb9a8771156d5e Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 25 Jan 2016 15:48:59 +0000 Subject: [PATCH 068/134] ASoC: Add support for Rpi-DAC @@ -99681,7 +99681,7 @@ index 0000000000000000000000000000000000000000..afe1b419582aa40c4b2729d242bb13cd +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From 0b8e2646ac87a6925791a6b7cae3a41d174e4b6f Mon Sep 17 00:00:00 2001 +From abd64390111e8f68d7ac460573e1d70c5a044b0d Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 Subject: [PATCH 069/134] ASoC: wm8804: Implement MCLK configuration options, @@ -99733,7 +99733,7 @@ index af95d648265b3e92e345101542b332aee35191d4..513f56ba132929662802d15cdc653af3 .component_driver = { .dapm_widgets = wm8804_dapm_widgets, -From 4ab07494417416c9e5390d051d2b13900ecb7684 Mon Sep 17 00:00:00 2001 +From be9969f66ea2ced8a7979cdf86f69fdca000ccc5 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 Subject: [PATCH 070/134] ASoC: BCM:Add support for HiFiBerry Digi. Driver is @@ -100080,7 +100080,7 @@ index 0000000000000000000000000000000000000000..7620dd02de40b6d644ff038b445d375d +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); -From 344ceb66e32167530e3abc4dd04fcbea14dc56be Mon Sep 17 00:00:00 2001 +From 016724d981370c3affc299396f4cbff51302b4d6 Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 Subject: [PATCH 071/134] Add IQaudIO Sound Card support for Raspberry Pi @@ -100418,7 +100418,7 @@ index 0000000000000000000000000000000000000000..1ee4097c846376666775272ed692ca33 +MODULE_DESCRIPTION("ASoC Driver for IQAudio DAC"); +MODULE_LICENSE("GPL v2"); -From cfbfb169a19a0323b6506ea7792b6baf7e36549c Mon Sep 17 00:00:00 2001 +From 6374c8dbd61b4fb2d126776368c405ca1d16273f Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 10:06:56 +0200 Subject: [PATCH 072/134] Added support for HiFiBerry DAC+ @@ -101051,7 +101051,7 @@ index 72b19e62f6267698aea45d2410d616d91c1825cb..c6839ef6e16754ed9de2698507b8986a dev_err(dev, "No LRCLK?\n"); return -EINVAL; -From 51558763d713a81adf2de060981c4163461a48e4 Mon Sep 17 00:00:00 2001 +From 6a9ec62344a9441047d241558da945626ed2df8a Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 11:09:58 +0200 Subject: [PATCH 073/134] Added driver for HiFiBerry Amp amplifier add-on board @@ -101889,7 +101889,7 @@ index 0000000000000000000000000000000000000000..8f019e04898754d2f87e9630137be9e8 + +#endif /* _TAS5713_H */ -From 37c8b5ebf852302b66b347d6afd212dd41cf2de1 Mon Sep 17 00:00:00 2001 +From a4225b94eb5657317e775842b885dc2b85c62911 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 25 Mar 2015 09:26:17 +0100 Subject: [PATCH 074/134] Add driver for rpi-proto @@ -102107,7 +102107,7 @@ index 0000000000000000000000000000000000000000..fadbfade100228aaafabb0d3bdf35c01 +MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to PROTO board (WM8731)"); +MODULE_LICENSE("GPL"); -From 9ba3362a63bba609495cf30a581ba475e8fbe6d3 Mon Sep 17 00:00:00 2001 +From 57b56219d47ab8c545d65e070c8cd95d36a7c145 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:03:47 +0100 Subject: [PATCH 075/134] RaspiDAC3 support @@ -102353,7 +102353,7 @@ index 0000000000000000000000000000000000000000..ad2b5b89bc8213dc2e277306ef50d6e3 +MODULE_DESCRIPTION("ASoC Driver for RaspiDAC Rev.3x"); +MODULE_LICENSE("GPL v2"); -From 62b96b01be0b085b5749462ae5c046641d020fa1 Mon Sep 17 00:00:00 2001 +From 9acba1e929ccd366a598b918ec9177c34bfb6ddb Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Thu, 7 Apr 2016 21:26:21 +0100 Subject: [PATCH 076/134] Add Support for JustBoom Audio boards @@ -102812,7 +102812,7 @@ index 0000000000000000000000000000000000000000..909cf8928f2f4313982316f9c5b8a709 +MODULE_DESCRIPTION("ASoC Driver for JustBoom PI Digi HAT Sound Card"); +MODULE_LICENSE("GPL v2"); -From 1e9479179783c5b7f6b8577d5a25c6ed8b653f82 Mon Sep 17 00:00:00 2001 +From fbee981d728c3b054f6c17b3c76471279cd1c940 Mon Sep 17 00:00:00 2001 From: Andrey Grodzovsky Date: Tue, 3 May 2016 22:10:59 -0400 Subject: [PATCH 077/134] ARM: adau1977-adc: Add basic machine driver for @@ -102997,7 +102997,7 @@ index 0000000000000000000000000000000000000000..f3d7e5db7bb912e1d7ca6f8e8d42df5f +MODULE_DESCRIPTION("ASoC Driver for ADAU1977 ADC"); +MODULE_LICENSE("GPL v2"); -From b976344fb14e41ed13c0cc5fd8d066138be1b770 Mon Sep 17 00:00:00 2001 +From 857caa3fbfa2bed1837320b97e4dd6897f226d42 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Mon, 16 May 2016 21:36:31 +1000 Subject: [PATCH 078/134] New AudioInjector.net Pi soundcard with low jitter @@ -103251,7 +103251,7 @@ index 0000000000000000000000000000000000000000..491906bbf446826e55dd843f28e4860f +MODULE_ALIAS("platform:audioinjector-pi-soundcard"); + -From dc47a86a160c9b67158610ad889bbd1980cc4545 Mon Sep 17 00:00:00 2001 +From 589b45445aa9079312df87f4a0c801e2f5ea1308 Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Thu, 30 Jun 2016 18:38:42 +0100 Subject: [PATCH 079/134] Add IQAudIO Digi WM8804 board support @@ -103554,7 +103554,7 @@ index 0000000000000000000000000000000000000000..33aa2be8a43a12a12cfb5d844dd9732c +MODULE_DESCRIPTION("ASoC Driver for IQAudIO WM8804 Digi"); +MODULE_LICENSE("GPL v2"); -From 08573124ed4a7721b842b846588ba45601cdc8cc Mon Sep 17 00:00:00 2001 +From f4879fbddc10a173d8fb8005611dbb0713751de8 Mon Sep 17 00:00:00 2001 From: escalator2015 Date: Tue, 24 May 2016 16:20:09 +0100 Subject: [PATCH 080/134] New driver for RRA DigiDAC1 soundcard using WM8741 + @@ -104030,7 +104030,7 @@ index 0000000000000000000000000000000000000000..f200688bb4ae32b90a0ced555aed94b0 +MODULE_DESCRIPTION("ASoC Driver for RRA DigiDAC1"); +MODULE_LICENSE("GPL v2"); -From 2990708d446f042abdef3fda0a6ff1ac0574ec95 Mon Sep 17 00:00:00 2001 +From 9f0c1db56487d9ae37661de28bd01b300c4a5ad8 Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Sat, 2 Jul 2016 16:26:19 +0100 Subject: [PATCH 081/134] Add support for Dion Audio LOCO DAC-AMP HAT @@ -104206,7 +104206,7 @@ index 0000000000000000000000000000000000000000..65e03741d349a2dc5bd91f69855ea952 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO"); +MODULE_LICENSE("GPL v2"); -From 8af2913606da27e4766899c61c7949fb6d831a59 Mon Sep 17 00:00:00 2001 +From dcc9ff00161d0ff429e7367162e0165004000f86 Mon Sep 17 00:00:00 2001 From: Clive Messer Date: Mon, 19 Sep 2016 14:01:04 +0100 Subject: [PATCH 082/134] Allo Piano DAC boards: Initial 2 channel (stereo) @@ -104416,7 +104416,7 @@ index 0000000000000000000000000000000000000000..eaf50fb6dbca1970ae1c6f8662088b0f +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC"); +MODULE_LICENSE("GPL v2"); -From ef6e845ac3227fb730200a770c15659980cc1231 Mon Sep 17 00:00:00 2001 +From 8d3c28274a5dfb6edd53b91d4ebceb4887b21292 Mon Sep 17 00:00:00 2001 From: Raashid Muhammed Date: Mon, 27 Mar 2017 12:35:00 +0530 Subject: [PATCH 083/134] Add support for Allo Piano DAC 2.1 plus add-on board @@ -105288,7 +105288,7 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC Plus"); +MODULE_LICENSE("GPL v2"); -From acd0f3b81b0097904050733dbfbff695d2f919e7 Mon Sep 17 00:00:00 2001 +From 982130ded144f178bf000504c43763d1877527c4 Mon Sep 17 00:00:00 2001 From: BabuSubashChandar Date: Tue, 28 Mar 2017 20:04:42 +0530 Subject: [PATCH 084/134] Add support for Allo Boss DAC add-on board for @@ -105994,7 +105994,7 @@ index 0000000000000000000000000000000000000000..203ab76c7045b081578e23bda1099dd1 +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Boss DAC"); +MODULE_LICENSE("GPL v2"); -From 49813172678a0afd74f503a5a0ece339ba5df3d5 Mon Sep 17 00:00:00 2001 +From 323620c5fe5f7a6193c097e572be6484c884fd8e Mon Sep 17 00:00:00 2001 From: gtrainavicius Date: Sun, 23 Oct 2016 12:06:53 +0300 Subject: [PATCH 085/134] Support for Blokas Labs pisound board @@ -107196,7 +107196,7 @@ index 0000000000000000000000000000000000000000..06ff1e53dc9d860946965b6303577762 +MODULE_DESCRIPTION("ASoC Driver for pisound, http://blokas.io/pisound"); +MODULE_LICENSE("GPL v2"); -From 427d79d7759a252c20ab78b731f6ed0f3c29312b Mon Sep 17 00:00:00 2001 +From c38ce7e67f3c2fd0abe95becb31aa743a86cac40 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 22 Jan 2017 12:49:37 +0100 Subject: [PATCH 086/134] ASoC: Add driver for Cirrus Logic Audio Card @@ -108264,7 +108264,7 @@ index 0000000000000000000000000000000000000000..ac8651ddff7bd3701dffe22c7fb88352 +MODULE_DESCRIPTION("ASoC driver for Cirrus Logic Audio Card"); +MODULE_LICENSE("GPL"); -From 8cff91b2907b06303136b8ef8e58432ddf22dec1 Mon Sep 17 00:00:00 2001 +From fd33abf6ada97f1a5f0a3a25824596ee8378db06 Mon Sep 17 00:00:00 2001 From: Miquel Date: Fri, 24 Feb 2017 20:51:06 +0100 Subject: [PATCH 087/134] sound: Support for Dion Audio LOCO-V2 DAC-AMP HAT @@ -108462,7 +108462,7 @@ index 0000000000000000000000000000000000000000..a009c49477972a9832175d86f201b035 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO-V2"); +MODULE_LICENSE("GPL v2"); -From b857500f7828085bfbd197631e1d961eae5fe596 Mon Sep 17 00:00:00 2001 +From ff4bb96b68bfa7a1c29249f9049824b0f8b28d18 Mon Sep 17 00:00:00 2001 From: Fe-Pi Date: Wed, 1 Mar 2017 04:42:43 -0700 Subject: [PATCH 088/134] Add support for Fe-Pi audio sound card. (#1867) @@ -108679,7 +108679,7 @@ index 0000000000000000000000000000000000000000..015b56fd73cc36be5b5eecd17548fd03 +MODULE_DESCRIPTION("ASoC Driver for Fe-Pi Audio"); +MODULE_LICENSE("GPL v2"); -From f2217d118ab429dbbb213b2eace048aa70bf6351 Mon Sep 17 00:00:00 2001 +From 3a3766c52d3de8092cd50a195f5076f0d260ed41 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Mar 2017 20:04:13 +1100 Subject: [PATCH 089/134] Add support for the AudioInjector.net Octo sound card @@ -109091,7 +109091,7 @@ index 0000000000000000000000000000000000000000..5e79f4eff93a21ed3495c77a90f73525 +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:audioinjector-octo-soundcard"); -From 2b224d902fd312a029931757576a24fb14ee0b4d Mon Sep 17 00:00:00 2001 +From c7aa28782f57a961bb2261ea923572ee786ee425 Mon Sep 17 00:00:00 2001 From: Peter Malkin Date: Mon, 27 Mar 2017 16:38:21 -0700 Subject: [PATCH 090/134] Driver support for Google voiceHAT soundcard. @@ -109485,7 +109485,7 @@ index 0000000000000000000000000000000000000000..225854b8e5298b3c3018f59a49404354 +MODULE_DESCRIPTION("ASoC Driver for Google voiceHAT SoundCard"); +MODULE_LICENSE("GPL v2"); -From 3e3ecee5d45800aacee162db02a6d63552642912 Mon Sep 17 00:00:00 2001 +From 45ba3c3101e994d97cbd60587f6161dd214cef64 Mon Sep 17 00:00:00 2001 From: sandeepal Date: Fri, 2 Jun 2017 18:59:46 +0530 Subject: [PATCH 091/134] Allo Digione Driver (#2048) @@ -109810,7 +109810,7 @@ index 0000000000000000000000000000000000000000..e3664e44c699d0102120ecf99e8b780a +MODULE_DESCRIPTION("ASoC Driver for Allo DigiOne"); +MODULE_LICENSE("GPL v2"); -From f62f5604fc4f3d0530b6725f163a840eeab926a0 Mon Sep 17 00:00:00 2001 +From 77476f233d4e829bb375152dff633e837592702f Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 21 Oct 2015 14:55:21 +0100 Subject: [PATCH 092/134] rpi_display: add backlight driver and overlay @@ -109982,7 +109982,7 @@ index 0000000000000000000000000000000000000000..14a0d9b037395497c1fdae2961feccd5 +MODULE_DESCRIPTION("Raspberry Pi mailbox based Backlight Driver"); +MODULE_LICENSE("GPL"); -From 06ee7eb3c38fa1bf0605a65c9e5ec410c54941ab Mon Sep 17 00:00:00 2001 +From f87fb311b36d6c6e514136f0498a5617d34365e0 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 23 Feb 2016 19:56:04 +0000 Subject: [PATCH 093/134] bcm2835-virtgpio: Virtual GPIO driver @@ -110259,7 +110259,7 @@ index 4a3d79d3b48eb483a4e4bf498f617515e3ad158f..5f34e1257117fb48013c9926a8a223d6 RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From eb61862909e7b5e435d24563c040c81c01de557d Mon Sep 17 00:00:00 2001 +From 9de496d3ce62d74a67f7b30127d7bb2aa97a88ad Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 20 Feb 2017 17:01:21 +0000 Subject: [PATCH 094/134] bcm2835-gpio-exp: Driver for GPIO expander via @@ -110588,7 +110588,7 @@ index 5f34e1257117fb48013c9926a8a223d64a598ab7..c819c21b0158a59c1308882e5a40e3f3 /* Dispmanx TAGS */ RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001, -From 3fd27dc49e454167ed9de021d3268eabd2cd6c5f Mon Sep 17 00:00:00 2001 +From 993c19a028647e82a0654b8a8af3265ae8513da2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 23 Feb 2016 17:26:48 +0000 Subject: [PATCH 095/134] amba_pl011: Don't use DT aliases for numbering @@ -110620,7 +110620,7 @@ index 1888d168a41c87c605962da2605df8ab1c02bd20..e22b9e79836a6aeef4c8f9fb618b9595 uap->old_cr = 0; uap->port.dev = dev; -From e9093a71a3c5483a3fb929b1ac82ede6672e9a23 Mon Sep 17 00:00:00 2001 +From 1843b7e52ddd193ffc5be4c36839bb615ca0c952 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 1 Mar 2017 16:07:39 +0000 Subject: [PATCH 096/134] amba_pl011: Round input clock up @@ -110709,7 +110709,7 @@ index e22b9e79836a6aeef4c8f9fb618b9595c551500f..4b815abbf9913075885ee60f4d9ad49d /* unregisters the driver also if no more ports are left */ static void pl011_unregister_port(struct uart_amba_port *uap) -From 0471231018f0485dcd4849e331327a792e364818 Mon Sep 17 00:00:00 2001 +From c044fbc9dfa21daf7d90b419785b837398b0738e Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 3 Dec 2014 13:23:28 +0200 Subject: [PATCH 097/134] OF: DT-Overlay configfs interface @@ -111144,7 +111144,7 @@ index 0000000000000000000000000000000000000000..0037e6868a6cda8706c88194c6a4454b +} +late_initcall(of_cfs_init); -From cfabe3c29f7ae581472de2e16d284e94b078ac3a Mon Sep 17 00:00:00 2001 +From e812e680a086069527f627c7e37594c945f39971 Mon Sep 17 00:00:00 2001 From: Cheong2K Date: Fri, 26 Feb 2016 18:20:10 +0800 Subject: [PATCH 098/134] brcm: adds support for BCM43341 wifi @@ -111279,7 +111279,7 @@ index f3556122c6ace17c419e13023057861957a507fa..f8d4647016a1cde3d51dd43da07a46ce BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43362_CHIP_ID, 0xFFFFFFFE, 43362), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4339_CHIP_ID, 0xFFFFFFFF, 4339), -From 67bba3b6a8474c5dc0822063054d5b0e9f4829be Mon Sep 17 00:00:00 2001 +From 70e8f0458e70e170d24d5c9f7b5d705fa84cdbe7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 17 Feb 2017 15:26:13 +0000 Subject: [PATCH 099/134] brcmfmac: Mute expected startup 'errors' @@ -111306,7 +111306,7 @@ index 508cab2d0817914d454958f92167d350c74d9a5d..987b1f5b999b0ecb68b6ce741b8e3ddb req->alpha2[0], req->alpha2[1]); return; -From d80a9e587881277157fbdf386e89160baf7f38fe Mon Sep 17 00:00:00 2001 +From b216694e710dafcab4f31951f5e598b07b573c6a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Dec 2015 13:37:07 +0000 Subject: [PATCH 100/134] hci_h5: Don't send conf_req when ACTIVE @@ -111332,7 +111332,7 @@ index c0e4e26dc30d7c3c6a771b7b86df88c8cf763646..7308287259eedcaf229f8a496a0e3826 if (H5_HDR_LEN(hdr) > 2) h5->tx_win = (data[2] & 0x07); -From 5264106254fe4a71f0f6726f41dd2644a7910e43 Mon Sep 17 00:00:00 2001 +From 867c7a2636e9facfb3048aed4d839947f67a0cb2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 13 Apr 2015 17:16:29 +0100 Subject: [PATCH 101/134] config: Add default configs @@ -114014,7 +114014,7 @@ index 0000000000000000000000000000000000000000..e0dd8723047ff488e81a03ef42fdbc68 +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -From 59cf82303dc194d87fb8b9c968b07c4200d5b262 Mon Sep 17 00:00:00 2001 +From a3366618fb47ab7db91963f7f169741ac2d7fb56 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Wed, 24 Aug 2016 03:35:56 -0700 Subject: [PATCH 102/134] Add arm64 configuration and device tree differences. @@ -115431,7 +115431,7 @@ index 0000000000000000000000000000000000000000..e6b09fafa27eed2b762e3d53b55041f7 +CONFIG_LIBCRC32C=y +CONFIG_BCM2835_VCHIQ=n -From 01de480996cf3d25bde48f6568e23eaff47118b5 Mon Sep 17 00:00:00 2001 +From 00829c6aa03328e4466db60a8dced522bd8b500a Mon Sep 17 00:00:00 2001 From: Electron752 Date: Thu, 12 Jan 2017 07:07:08 -0800 Subject: [PATCH 103/134] ARM64: Make it work again on 4.9 (#1790) @@ -115846,7 +115846,7 @@ index e6b09fafa27eed2b762e3d53b55041f793683d27..c7e891d72969a388d9b135a36dbfc9c9 CONFIG_LIBCRC32C=y -CONFIG_BCM2835_VCHIQ=n -From 1283a8ab4c7d05745d74e7dae2bc4f614a462d5d Mon Sep 17 00:00:00 2001 +From bfe91c9caf3a61b82fa84dd1d149581232c44a28 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Thu, 12 Jan 2017 19:10:07 -0800 Subject: [PATCH 104/134] ARM64: Enable HDMI audio and vc04_services in @@ -115878,7 +115878,7 @@ index c7e891d72969a388d9b135a36dbfc9c9cb609bf8..4b90f9b64abe9f089ba56b13d5a00de3 CONFIG_BCM2835_MBOX=y # CONFIG_IOMMU_SUPPORT is not set -From 67e1133cd0237f3f25c35778be070e25c3b25252 Mon Sep 17 00:00:00 2001 +From ea99c7aea8340d05dd7fcf89ab5456ffd65c1245 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Thu, 12 Jan 2017 19:14:03 -0800 Subject: [PATCH 105/134] ARM64: Run bcmrpi3_defconfig through savedefconfig. @@ -115926,7 +115926,7 @@ index 4b90f9b64abe9f089ba56b13d5a00de33343bfb9..dac962ca1634662ce7d966f1ffb53b5b CONFIG_FB_TFT_AGM1264K_FL=m CONFIG_FB_TFT_BD663474=m -From 99016d5ee9769ddd7112c5edc8cbd3fea6127d17 Mon Sep 17 00:00:00 2001 +From e7cffc7f349dec36b78ec335658458bee7fbeac1 Mon Sep 17 00:00:00 2001 From: Electron752 Date: Sat, 14 Jan 2017 02:54:26 -0800 Subject: [PATCH 106/134] ARM64: Enable Kernel Address Space Randomization @@ -115961,7 +115961,7 @@ index dac962ca1634662ce7d966f1ffb53b5bfa27c506..aae33b4b3c3e736ea7cd3ca242158ad6 CONFIG_BINFMT_MISC=y CONFIG_COMPAT=y -From 53603ba473d74427187d223ea98490d90a4dcb17 Mon Sep 17 00:00:00 2001 +From 1ed6812fb12fbe39e40e2e8fb8db57ad87472e02 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sun, 15 Jan 2017 07:31:59 -0800 Subject: [PATCH 107/134] ARM64: Enable RTL8187/RTL8192CU wifi in build config @@ -115989,7 +115989,7 @@ index aae33b4b3c3e736ea7cd3ca242158ad6ba558aff..b7d762df19b85e369a32cd823dfd0621 CONFIG_ZD1211RW=m CONFIG_MAC80211_HWSIM=m -From 9bd92259f6fcc2f7b98e17f5dcb93e2241ea5693 Mon Sep 17 00:00:00 2001 +From 3c8121973a6679759c2fd3bc4712fb819a07c9a9 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:33:51 -0800 Subject: [PATCH 108/134] ARM64/DWC_OTG: Port dwc_otg driver to ARM64 @@ -116335,7 +116335,7 @@ index 6b2c7d0c93f36a63863ff4b0ecc1f3eab77e058b..d7b700ff17821ad1944e36721fe6b2db /** The OS page size */ #define DWC_OS_PAGE_SIZE PAGE_SIZE -From 7b259867567b86fcb957f612aca1c8b93a1b4c9c Mon Sep 17 00:00:00 2001 +From 04d5ac9424fea40dc3e6293525a23ce86240b1e0 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:43:57 -0800 Subject: [PATCH 109/134] ARM64: Round-Robin dispatch IRQs between CPUs. @@ -116412,7 +116412,7 @@ index bee4d2d2ebacc3233423bb9d825e076b9f52fccd..014f13f89eb896f5cfc75ed9891787d0 .name = "bcm2836-gpu", .irq_mask = bcm2836_arm_irqchip_mask_gpu_irq, -From d14698e1413d811aed43ff3c141476549accb38c Mon Sep 17 00:00:00 2001 +From 697787665effa912fa6c2a5f6cfc4447ccea7b3a Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:45:03 -0800 Subject: [PATCH 110/134] ARM64: Enable DWC_OTG Driver In ARM64 Build @@ -116436,7 +116436,7 @@ index b7d762df19b85e369a32cd823dfd062145bdefa7..4d85c231c5ea0244e1b05fb4a5e3c8fd CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE_REALTEK=m -From b1e947f7d0a8f23a1a66948562f4fbd1fc588012 Mon Sep 17 00:00:00 2001 +From 81e7e17fd5b494b85d6b3e7ecc52834a652da8f3 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 11 Feb 2017 01:18:31 -0800 Subject: [PATCH 111/134] ARM64: Force hardware emulation of deprecated @@ -116467,7 +116467,7 @@ index f0e6d717885b1fcf3b22f64c10c38f19c25f809d..0cb830d30fb6d2bd26ab572efe893649 case INSN_OBSOLETE: insn->current_mode = INSN_UNDEF; -From ed90e5b9a7c0962eb5a613c0123777f114e5c2f1 Mon Sep 17 00:00:00 2001 +From 3a1b225d01c66d88545067d9971cd9fbcfe755ed Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 10 Feb 2017 17:57:08 -0800 Subject: [PATCH 112/134] build/arm64: Add rules for .dtbo files for dts @@ -116495,7 +116495,7 @@ index 9b41f1e3b1a039cd45fe842e10abff0181186fdf..dc2859b8eed168ed52e95c503e7a5ce3 dtbs: prepare scripts -From eee4143a0daae5612cb1cce9c6c9c7d95a91e313 Mon Sep 17 00:00:00 2001 +From 80bfd3c31189b0e86ff8bf67725a2015abb65484 Mon Sep 17 00:00:00 2001 From: Bilal Amarni Date: Wed, 24 May 2017 10:52:50 +0200 Subject: [PATCH 113/134] enable drivers for GPIO expander and vcio @@ -116526,7 +116526,7 @@ index 4d85c231c5ea0244e1b05fb4a5e3c8fd3e651ddf..9dcb58a519d041fadae99c81a7bda621 CONFIG_GPIO_ARIZONA=m CONFIG_GPIO_STMPE=y -From b1a10c871ec9b24b06b7cb2639da85fd9e82b40e Mon Sep 17 00:00:00 2001 +From b9d4606c698abfa638dff25fddf02b6f0faecfcd Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 24 Feb 2015 13:40:50 +0000 Subject: [PATCH 114/134] pinctrl-bcm2835: Fix interrupt handling for GPIOs @@ -116562,7 +116562,7 @@ index a9d480df32562defbf8be0faf0a39bfe06ff71f9..18c92bae3b2e7e9f8208ca0d4487b08b .suppress_bind_attrs = true, }, -From 3131a7d4fbf4e9cca64079346f4ed48d9d172855 Mon Sep 17 00:00:00 2001 +From 8d06678ce2edc8277eb48d6aca7ab534d65c4a0c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 16:34:46 +0000 Subject: [PATCH 115/134] bcm2835-aux: Add aux interrupt controller @@ -116729,7 +116729,7 @@ index bd750cf2238d61489811e7d7bd3b5f9950ed53c8..41e0702fae4692221980b0d02aed1ba6 BCM2835_AUX_CLOCK_COUNT, GFP_KERNEL); if (!onecell) -From da6caedc52a4cbd1daed9fb65cb435db1a8246b7 Mon Sep 17 00:00:00 2001 +From 36dca47d5423ec6bd484ebc06608c7d0c7fe4b11 Mon Sep 17 00:00:00 2001 From: Yasunari Takiguchi Date: Fri, 14 Apr 2017 10:43:57 +0100 Subject: [PATCH 116/134] This is the driver for Sony CXD2880 DVB-T2/T tuner + @@ -132864,7 +132864,7 @@ index 0000000000000000000000000000000000000000..82e122349055be817eb74ed5bbcd7560 +MODULE_AUTHOR("Sony Semiconductor Solutions Corporation"); +MODULE_LICENSE("GPL v2"); -From 0ee5fc50855a6c94a49930022363b3b43da3b77a Mon Sep 17 00:00:00 2001 +From d22de7d2b9226b134e7fa4e543b31c037448b420 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:18:09 +0100 Subject: [PATCH 117/134] raspberrypi-firmware: Define the MBOX channel in the @@ -132889,7 +132889,7 @@ index c819c21b0158a59c1308882e5a40e3f3fe73cbdf..de2a3dcd562beb752266eaf0070e5586 enum rpi_firmware_property_status { -From c05d145d7c89a1d31075aff507f384d84bb9539e Mon Sep 17 00:00:00 2001 +From 7cf1207f6f8fc7175e4a17462ddf6edbc5a7df55 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:16:19 +0100 Subject: [PATCH 118/134] raspberrypi-firmware: Export the general transaction @@ -132936,7 +132936,7 @@ index de2a3dcd562beb752266eaf0070e55861d553f5f..dc7fd58afd5dddebf9b17065bb069a1d #endif /* __SOC_RASPBERRY_FIRMWARE_H__ */ -From 52235d687bedc369bb0f7ff0af0d833c89d5348f Mon Sep 17 00:00:00 2001 +From d753dbf9f0303a0c3df72d07ecd8cac8c4bb6559 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 08:39:33 +0100 Subject: [PATCH 119/134] drm/vc4: Add a mode for using the closed firmware for @@ -133711,7 +133711,7 @@ index 0000000000000000000000000000000000000000..7dd233eed677c1689492ab95bc864753 + }, +}; -From 2f15bf7410a44191260b5c5473a6bd98da49713f Mon Sep 17 00:00:00 2001 +From 5daa9867034344f143ab5ba57949d80d71057f9f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Feb 2017 17:09:18 -0800 Subject: [PATCH 120/134] drm/vc4: Name the primary and cursor planes in fkms. @@ -133738,7 +133738,7 @@ index 7dd233eed677c1689492ab95bc86475330d2d63b..e6097046fb25361bc61d657083d95b63 if (type == DRM_PLANE_TYPE_PRIMARY) { vc4_plane->fbinfo = -From bde5c6279355967d1c2056cbb681e0c3c71ead26 Mon Sep 17 00:00:00 2001 +From 4bc944a2adfaf540f80c46613e436d1b9224285d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Feb 2017 17:10:09 -0800 Subject: [PATCH 121/134] drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of @@ -133811,7 +133811,7 @@ index e6097046fb25361bc61d657083d95b634232aabc..72d0b9cffe3d2997d69040c46f4aee11 RPI_FIRMWARE_SET_CURSOR_STATE, &packet_state, -From 9cb56a005fca2860f75fd5e08ddeb97d07867582 Mon Sep 17 00:00:00 2001 +From 5d1e576c0054b57ccf6b3dff64dca417aea79e4c Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 2 Feb 2017 09:42:18 -0800 Subject: [PATCH 122/134] drm/vc4: Fix sending of page flip completion events @@ -133856,7 +133856,7 @@ index 72d0b9cffe3d2997d69040c46f4aee11e22aa213..185f9bd3c1b2d47d0c1fc5293db4199b static void vc4_crtc_handle_page_flip(struct vc4_crtc *vc4_crtc) -From 9482524b0d92012326e5118de8df478f1cfc0f03 Mon Sep 17 00:00:00 2001 +From 36737adea32ccd631d007709bb4c5830be5acef7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 18 Apr 2017 21:43:46 +0100 Subject: [PATCH 123/134] vc4_fkms: Apply firmware overscan offset to hardware @@ -133916,7 +133916,7 @@ index 185f9bd3c1b2d47d0c1fc5293db4199bd8963023..072f377b7423ee603d73ace2bf6d620f return 0; -From eb0e1ed338bbfe0a1fe43c82413ddafa8df35ec6 Mon Sep 17 00:00:00 2001 +From d8521a886b7be6e4bc78d20dab18feabeac2f1d8 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 11:34:26 +0200 Subject: [PATCH 124/134] ASoC: bcm2835: Add support for TDM modes @@ -134321,7 +134321,7 @@ index 56df7d8a43d0aac055a91b0d24aca8e1b4e308e4..dcacf7f83c9371df539a788ea33fedcf dev->dev = &pdev->dev; dev_set_drvdata(&pdev->dev, dev); -From dc0c30a09ebba5eedf48ad6bd7949a059fa3aea9 Mon Sep 17 00:00:00 2001 +From b5fb76aab3d2821f19ccfcfd7c68139d04c049a2 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 15:30:50 +0200 Subject: [PATCH 125/134] ASoC: bcm2835: Support left/right justified and DSP @@ -134570,7 +134570,7 @@ index dcacf7f83c9371df539a788ea33fedcf97d64690..3a706fda4f39e42efbe12f19d87af9b1 } -From b643b268b9edf136daf19c12837e5b29feddbe5b Mon Sep 17 00:00:00 2001 +From b233dbcfff9c912ca95a7c31fe6b4a4e88f07518 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 16:19:54 +0200 Subject: [PATCH 126/134] ASoC: bcm2835: Support additional samplerates up to @@ -134616,7 +134616,7 @@ index 3a706fda4f39e42efbe12f19d87af9b100a348a5..43f5715a0d5dda851731ecf7ff27e76c | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE -From 4c3cd3aab6d561023760c3997411fe3259705bf5 Mon Sep 17 00:00:00 2001 +From d0b829bac9033d748bc6378c170af2929911d728 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 16:24:57 +0200 Subject: [PATCH 127/134] ASoC: bcm2835: Enforce full symmetry @@ -134655,7 +134655,7 @@ index 43f5715a0d5dda851731ecf7ff27e76c48fb6e57..2e449d7173fcecbcd647f90a26bd58b6 static bool bcm2835_i2s_volatile_reg(struct device *dev, unsigned int reg) -From 7a8de669f8de95e524046a59f8808916a867dc30 Mon Sep 17 00:00:00 2001 +From 2ac96d84b6f20bcafab465c8f52284016c08a9f5 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Mon, 5 Jun 2017 16:40:38 +0100 Subject: [PATCH 128/134] dma-bcm2708: Fix module compilation of @@ -134701,7 +134701,7 @@ index c5bfff2765be4606077e6c8af73040ec13ee8974..6ca874d332a8bc666b1c9576ac51f479 #endif /* _PLAT_BCM2708_DMA_H */ -From 34a91302aca10fefcd3ddd124403f3fccd25b770 Mon Sep 17 00:00:00 2001 +From 637430a95c1b6bd60261b6c8b823d1530c8b1334 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 25 Aug 2017 19:18:13 +0100 Subject: [PATCH 129/134] cache: export clean and invalidate @@ -134756,7 +134756,7 @@ index de78109d002db1a5e7c94a6c1bc8bb94161d07b8..4c850aa3af2b2439fced4e130441329a sub r3, r2, #1 bic r0, r0, r3 -From e087f9465609c990f91cb43e7615c84fe5047768 Mon Sep 17 00:00:00 2001 +From 1ca3e87f67c72fa17711ae82b311c2af6a555578 Mon Sep 17 00:00:00 2001 From: Dan Pasanen Date: Wed, 20 Sep 2017 10:17:41 -0500 Subject: [PATCH 130/134] vcsm: fix multi-platform build @@ -134786,7 +134786,7 @@ index 034ae2f27f870621af9f49453501f1cde051f32a..b7814d67500b98fcd6f376d526a3d4a4 { 0, -From d3956be75b49811fb7bd43a11317c925f6a065f1 Mon Sep 17 00:00:00 2001 +From ae5eba9a876661684adf7e837cd4286f4b60fae3 Mon Sep 17 00:00:00 2001 From: Dan Pasanen Date: Thu, 21 Sep 2017 09:55:42 -0500 Subject: [PATCH 131/134] arm: partially revert @@ -134894,7 +134894,7 @@ index 054b491ff7649ca067ff821770aec80a4da42102..70e8b7d3443467ae9595924f1a9d043b EXPORT_SYMBOL(cpu_cache); #endif -From 923c44c152c2e60c3b8939eaee4c768ceeaaf617 Mon Sep 17 00:00:00 2001 +From b33d23ca86c36ccfb38124646d22dd2b1633451a Mon Sep 17 00:00:00 2001 From: Dan Pasanen Date: Thu, 21 Sep 2017 09:57:44 -0500 Subject: [PATCH 132/134] vcsm: add macros for cache functions @@ -134950,7 +134950,7 @@ index b7814d67500b98fcd6f376d526a3d4a4b84fd152..32763bd01e2e3831778fbcd1066df3cb } } -From 170a6b92f30841481b77183239390deb059aad1c Mon Sep 17 00:00:00 2001 +From aad9c1c8f3dc256490c19a8ca405152a43663c86 Mon Sep 17 00:00:00 2001 From: Dan Pasanen Date: Thu, 21 Sep 2017 07:41:02 -0500 Subject: [PATCH 133/134] vcsm: use dma APIs for cache functions @@ -135024,7 +135024,7 @@ index 32763bd01e2e3831778fbcd1066df3cbf582235d..cfa4ff747de2a96e03dab995aa54fc80 if ((op->invalidate_mode & ~3) != 0) { ret = -EINVAL; -From aa5b5b1b3234a9b98deb40a9efdf9b40bbd59605 Mon Sep 17 00:00:00 2001 +From 2769366db52f2c3ed2538b92e2dc8512a898d819 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 29 Sep 2017 16:15:01 +0100 Subject: [PATCH 134/134] vcsm: Fix up macros to avoid breaking numbers used by From 69383c77b5138b74567780a6f07231c62e1fecbe Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Fri, 13 Oct 2017 14:16:15 +0100 Subject: [PATCH 14/16] linux: update to linux-4.13.6 --- packages/linux/package.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/linux/package.mk b/packages/linux/package.mk index dd0f507768..bcfa438aa4 100644 --- a/packages/linux/package.mk +++ b/packages/linux/package.mk @@ -63,8 +63,8 @@ case "$LINUX" in PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET imx6-status-led imx6-soc-fan irqbalanced" ;; *) - PKG_VERSION="4.13.5" - PKG_SHA256="a9e85ada609d4fc6f21bf1836099259e3634be142abe8208d88de3e257ff25e2" + PKG_VERSION="4.13.6" + PKG_SHA256="47d419ceae1d353dad565b858301ac9670c747deb37936c8a935915b3bdd6050" PKG_URL="https://www.kernel.org/pub/linux/kernel/v4.x/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_PATCH_DIRS="default" ;; From eb95c2b372e0327071ed195db00871c0797e61c0 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Fri, 13 Oct 2017 14:16:15 +0100 Subject: [PATCH 15/16] RPi: update linux support patch for linux 4.13.6 --- .../patches/linux/linux-01-RPi_support.patch | 1195 +++++++++++++---- 1 file changed, 918 insertions(+), 277 deletions(-) diff --git a/projects/RPi/patches/linux/linux-01-RPi_support.patch b/projects/RPi/patches/linux/linux-01-RPi_support.patch index c60da13f0b..07d21a7a4f 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 f18123e0d0318a29c8feffd66d291a99ca78343d Mon Sep 17 00:00:00 2001 +From a4db2799cecece0dcb712a6d7589bcad79b37f3b Mon Sep 17 00:00:00 2001 From: Steve Glendinning Date: Thu, 19 Feb 2015 18:47:12 +0000 -Subject: [PATCH 001/134] smsx95xx: fix crimes against truesize +Subject: [PATCH 001/140] smsx95xx: fix crimes against truesize smsc95xx is adjusting truesize when it shouldn't, and following a recent patch from Eric this is now triggering warnings. @@ -48,10 +48,10 @@ index 340c13484e5cc7dd5001577b7522d5a4318bd5b6..7d3d98f0405ad948f9ab3e035a70e15c usbnet_skb_return(dev, ax_skb); } -From c13705aa5c56b16069f5cee2d001863edef036ca Mon Sep 17 00:00:00 2001 +From 7074ad3ab7788c09d9b9750b6e758c45f6ea6dd7 Mon Sep 17 00:00:00 2001 From: Sam Nazarko Date: Fri, 1 Apr 2016 17:27:21 +0100 -Subject: [PATCH 002/134] smsc95xx: Experimental: Enable turbo_mode and +Subject: [PATCH 002/140] smsc95xx: Experimental: Enable turbo_mode and packetsize=2560 by default See: http://forum.kodi.tv/showthread.php?tid=285288 @@ -94,10 +94,10 @@ index 7d3d98f0405ad948f9ab3e035a70e15c667e4fa1..8d34e517db08d895e6135f785c42bf63 netif_dbg(dev, ifup, dev->net, "rx_urb_size=%ld\n", -From 744377718ba30d7cf58cb64f9276802c97349e3c Mon Sep 17 00:00:00 2001 +From 8882b456563f00096ba923d407149f38dd6428f8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 003/134] Allow mac address to be set in smsc95xx +Subject: [PATCH 003/140] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -193,10 +193,10 @@ index 8d34e517db08d895e6135f785c42bf639671815c..5df7e105c41532c3185e46ee54f43a37 eth_hw_addr_random(dev->net); netif_dbg(dev, ifup, dev->net, "MAC address set to eth_random_addr\n"); -From e197d97ec01f29f77f90be4bfb6d8370d6509550 Mon Sep 17 00:00:00 2001 +From 15b39ad8fd596ce3088bfcc755c3db60f0f5975b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 13 Mar 2015 12:43:36 +0000 -Subject: [PATCH 004/134] Protect __release_resource against resources without +Subject: [PATCH 004/140] Protect __release_resource against resources without parents Without this patch, removing a device tree overlay can crash here. @@ -224,10 +224,10 @@ index 9b5f04404152c296af3a96132f27cfc80ffa9af9..f8a9af6e6b915812be2ba2c1c2b40106 for (;;) { tmp = *p; -From 18a4bafafa1611517487896b4be30e3e61641f80 Mon Sep 17 00:00:00 2001 +From b0d1bf48ab3e8b6210c1caa3636ba97ca2ec9509 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 4 Dec 2015 17:41:50 +0000 -Subject: [PATCH 005/134] irq-bcm2836: Prevent spurious interrupts, and trap +Subject: [PATCH 005/140] irq-bcm2836: Prevent spurious interrupts, and trap them early The old arch-specific IRQ macros included a dsb to ensure the @@ -254,10 +254,10 @@ index e7463e3c08143acae3e8cc5682f918c6a0b07ebd..a8db33b50ad9ff83d284fa54fe4d3b65 #endif } else if (stat) { -From bd4b6c65d43d4c700a7d0035cd56f6beb9a54ead Mon Sep 17 00:00:00 2001 +From bcc31be258801d789d9ac084a83d80ffa85a46f9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:33:30 +0000 -Subject: [PATCH 006/134] irq-bcm2836: Avoid "Invalid trigger warning" +Subject: [PATCH 006/140] irq-bcm2836: Avoid "Invalid trigger warning" Initialise the level for each IRQ to avoid a warning from the arm arch timer code. @@ -281,10 +281,10 @@ index a8db33b50ad9ff83d284fa54fe4d3b65f859df0f..c4e151451cf8c8ebde5225515eac2786 static void -From e85701779a1a4891496073d616b58b0ee93afaa4 Mon Sep 17 00:00:00 2001 +From 95f389600967c928a40c822b87ef8bb92481a286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 12 Jun 2015 19:01:05 +0200 -Subject: [PATCH 007/134] irqchip: bcm2835: Add FIQ support +Subject: [PATCH 007/140] irqchip: bcm2835: Add FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -413,10 +413,10 @@ index 44d7c38dde479d771f3552e914bf8c1c1f5019f7..42ff5e6a8e0d532f5b60a1e7af7cc4d9 } -From 166d0e6318a64ac69daf9c024906056c6ef6f18b Mon Sep 17 00:00:00 2001 +From 4e09a1c79699100f0cc1a117544889876b4f1e6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 23 Oct 2015 16:26:55 +0200 -Subject: [PATCH 008/134] irqchip: irq-bcm2835: Add 2836 FIQ support +Subject: [PATCH 008/140] irqchip: irq-bcm2835: Add 2836 FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -515,10 +515,10 @@ index 42ff5e6a8e0d532f5b60a1e7af7cc4d941bd5008..eccf6ed025299cb480884f5bcbe77abf for (b = 0; b < NR_BANKS; b++) { for (i = 0; i < bank_irqs[b]; i++) { -From 73580125118ebe5a5040d3598022cfc42fe1c8be Mon Sep 17 00:00:00 2001 +From 6f38025644e36974fbde019fea47854769f8edbe Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 8 May 2017 16:43:40 +0100 -Subject: [PATCH 009/134] irq_bcm2836: Send event when onlining sleeping cores +Subject: [PATCH 009/140] irq_bcm2836: Send event when onlining sleeping cores In order to reduce power consumption and bus traffic, it is sensible for secondary cores to enter a low-power idle state when waiting to @@ -554,10 +554,10 @@ index c4e151451cf8c8ebde5225515eac2786d6f61d46..bee4d2d2ebacc3233423bb9d825e076b } -From d2a3430f6d5c6819167a6bc5b10ff8cfa7b7b104 Mon Sep 17 00:00:00 2001 +From 383c10f831d02305aaba58197243f2b0db5f740f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 10:26:09 +0100 -Subject: [PATCH 010/134] spidev: Add "spidev" compatible string to silence +Subject: [PATCH 010/140] spidev: Add "spidev" compatible string to silence warning See: https://github.com/raspberrypi/linux/issues/1054 @@ -578,10 +578,10 @@ index cda10719d1d1b21b32866d2b79363faa461ab8e1..4f3779d3aa0960640506725bde918075 }; MODULE_DEVICE_TABLE(of, spidev_dt_ids); -From bb9d07f7a9c0c68aef2439232578349c130bdc3b Mon Sep 17 00:00:00 2001 +From a3cdf4d43fcb42b970d30c589269cfb403d8f83e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 3 Jan 2017 18:25:01 +0000 -Subject: [PATCH 011/134] Revert "pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP" +Subject: [PATCH 011/140] Revert "pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP" This reverts commit 85ae9e512f437cd09bf61564bdba29ab88bab3e3. --- @@ -880,10 +880,10 @@ index 230883168e99a1a3fecc7916ef0a7e0de7e8b3f1..ff3789a11b3c36b922b9d08035abb638 if (IS_ERR(pc->pctl_dev)) { gpiochip_remove(&pc->gpio_chip); -From 80a04a93b6727f3328b3f07ed64bfa0e2dd630bf Mon Sep 17 00:00:00 2001 +From 05643d82a5ad915c6e53b0e04a7c45b2c5e74b17 Mon Sep 17 00:00:00 2001 From: notro Date: Thu, 10 Jul 2014 13:59:47 +0200 -Subject: [PATCH 012/134] pinctrl-bcm2835: Set base to 0 give expected gpio +Subject: [PATCH 012/140] pinctrl-bcm2835: Set base to 0 give expected gpio numbering Signed-off-by: Noralf Tronnes @@ -905,10 +905,10 @@ index ff3789a11b3c36b922b9d08035abb638187c2f5a..d2b537572095c86576f78536f737c102 .can_sleep = false, }; -From b99b9d618492cd37b9b6170de0a75135f9579b1e Mon Sep 17 00:00:00 2001 +From c5d7f73e2afb1c56a96540642db0e30964ffc76f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 26 Feb 2015 09:58:22 +0000 -Subject: [PATCH 013/134] pinctrl-bcm2835: Only request the interrupts listed +Subject: [PATCH 013/140] pinctrl-bcm2835: Only request the interrupts listed in the DTB Although the GPIO controller can generate three interrupts (four counting @@ -935,10 +935,10 @@ index d2b537572095c86576f78536f737c102487f99f4..a9d480df32562defbf8be0faf0a39bfe pc->irq_data[i].irqgroup = i; -From 34f52b116202ac02b289a149291d1a13b6684c5a Mon Sep 17 00:00:00 2001 +From fbe196baa84a1ef4a18df77dcb0a9fc9cf1d6589 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Jun 2015 14:10:44 +0100 -Subject: [PATCH 014/134] spi-bcm2835: Support pin groups other than 7-11 +Subject: [PATCH 014/140] spi-bcm2835: Support pin groups other than 7-11 The spi-bcm2835 driver automatically uses GPIO chip-selects due to some unreliability of the native ones. In doing so it chooses the @@ -1019,10 +1019,10 @@ index f35cc10772f6670397ea923ad30158270dd68578..5dfe20ffc2866fa6789825016c585175 /* and set up the "mode" and level */ dev_info(&spi->dev, "setting up native-CS%i as GPIO %i\n", -From 52385a8fd084d52b51ea33f34a939f2d1435ebed Mon Sep 17 00:00:00 2001 +From 158e33e4448ed3ef822312bbe2beeca6e773f648 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 1 Jul 2016 22:09:24 +0100 -Subject: [PATCH 015/134] spi-bcm2835: Disable forced software CS +Subject: [PATCH 015/140] spi-bcm2835: Disable forced software CS Select software CS in bcm2708_common.dtsi, and disable the automatic conversion in the driver to allow hardware CS to be re-enabled with an @@ -1056,10 +1056,10 @@ index 5dfe20ffc2866fa6789825016c585175a29705b6..8493474d286f7a1ac6454a22c61c8c2c return 0; } -From 279e9b7e6817f26366120c273962c90d2bf0555a Mon Sep 17 00:00:00 2001 +From 34c2649fc5eab3bbfe2750fc9d499206bfe26b73 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 8 Nov 2016 21:35:38 +0000 -Subject: [PATCH 016/134] spi-bcm2835: Remove unused code +Subject: [PATCH 016/140] spi-bcm2835: Remove unused code --- drivers/spi/spi-bcm2835.c | 61 ----------------------------------------------- @@ -1147,10 +1147,10 @@ index 8493474d286f7a1ac6454a22c61c8c2cef9121bf..33d75ad38a7f77d085321ace9101900a } -From 1ce3b01a079ed1a0387bb213eb15ecc1615ace5f Mon Sep 17 00:00:00 2001 +From 97e821d313541c4bff20e0ff30596bcafd1f7568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Wed, 3 Jun 2015 12:26:13 +0200 -Subject: [PATCH 017/134] ARM: bcm2835: Set Serial number and Revision +Subject: [PATCH 017/140] ARM: bcm2835: Set Serial number and Revision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1203,10 +1203,10 @@ index 0c1edfc98696da0e0bb7f4a18cdfbcdd27a9795d..8f152266ba9b470df2eaaed9ebcf158e static const char * const bcm2835_compat[] = { -From fd07ac398228b4db90ae22647c6453d7fed85b33 Mon Sep 17 00:00:00 2001 +From f568285d4cfb1ec5ce2e5cad2751d2c22fac3c14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 3 Oct 2015 22:22:55 +0200 -Subject: [PATCH 018/134] dmaengine: bcm2835: Load driver early and support +Subject: [PATCH 018/140] dmaengine: bcm2835: Load driver early and support legacy API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -1309,10 +1309,10 @@ index 6204cc32d09c5096df8aec304c3c37b3bcb6be44..599c218dc8a73172dd4bd4a058fc8f95 MODULE_ALIAS("platform:bcm2835-dma"); MODULE_DESCRIPTION("BCM2835 DMA engine driver"); -From 8e0ad87b5f8143c2af3be4898df82ae1cf3358c6 Mon Sep 17 00:00:00 2001 +From fa9d4eef7edbd723af6fa91a0177f52bc84b3362 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 25 Jan 2016 17:25:12 +0000 -Subject: [PATCH 019/134] firmware: Updated mailbox header +Subject: [PATCH 019/140] firmware: Updated mailbox header --- include/soc/bcm2835/raspberrypi-firmware.h | 9 +++++++++ @@ -1373,10 +1373,10 @@ index cb979ad90401e299344dd5fae38d09c489d8bd58..30fb37fe175df604a738258a2a632bca RPI_FIRMWARE_VCHIQ_INIT = 0x00048010, -From 33261ce71b6a593ed95808e6d0e3cc7f3b554878 Mon Sep 17 00:00:00 2001 +From dea7ec9177df736cac782b7412c94e2fb699797f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 15 Jun 2016 16:48:41 +0100 -Subject: [PATCH 020/134] rtc: Add SPI alias for pcf2123 driver +Subject: [PATCH 020/140] rtc: Add SPI alias for pcf2123 driver Without this alias, Device Tree won't cause the driver to be loaded. @@ -1396,10 +1396,10 @@ index 8895f77726e8da5444afcd602dceff8f25a9b3fd..1833b8853ceb0e6147cceb93a00e558c MODULE_LICENSE("GPL"); +MODULE_ALIAS("spi:rtc-pcf2123"); -From b82bba9e29e14158dddc0a21cbba830a5359285d Mon Sep 17 00:00:00 2001 +From 27ea0bd00ac33fa11c6027dd71373fb281b6723e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 7 Oct 2016 16:50:59 +0200 -Subject: [PATCH 021/134] watchdog: bcm2835: Support setting reboot partition +Subject: [PATCH 021/140] watchdog: bcm2835: Support setting reboot partition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1501,10 +1501,10 @@ index b339e0e67b4c1275fd4992fea4f1e24c0575b783..26b7177573fac2af1cd4ab5488d2686f static int bcm2835_wdt_probe(struct platform_device *pdev) -From 90c116f60be9a4e20874dac37b33c0ffe9963320 Mon Sep 17 00:00:00 2001 +From 1adc5a8abbbda1ec874d1099c6307bc992469beb Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 5 Apr 2016 19:40:12 +0100 -Subject: [PATCH 022/134] reboot: Use power off rather than busy spinning when +Subject: [PATCH 022/140] reboot: Use power off rather than busy spinning when halt is requested --- @@ -1527,10 +1527,10 @@ index 3b2aa9a9fe268d45335f781c4aa22cf573753a1b..0180d89a34af45c56243fe0f17fbe209 /* -From a3367d726870a9d0719b37451dcb4b34a616d2d7 Mon Sep 17 00:00:00 2001 +From 44d0094da00b84ea95a944810ebd125b8448cf67 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 9 Nov 2016 13:02:52 +0000 -Subject: [PATCH 023/134] bcm: Make RASPBERRYPI_POWER depend on PM +Subject: [PATCH 023/140] bcm: Make RASPBERRYPI_POWER depend on PM --- drivers/soc/bcm/Kconfig | 1 + @@ -1549,10 +1549,10 @@ index 49f1e2a75d614bc21db152327c7b425ae2504f8d..dccd2374ed00631abd441e3e9d78ee74 help This enables support for the RPi power domains which can be enabled -From 77aca1e688811bb0222373fb5aaa87e4946b7057 Mon Sep 17 00:00:00 2001 +From 26f58ea52ccb0a6705e9e2bcf98d0bbb8dbf5d3a Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Fri, 2 Sep 2016 16:45:27 +0100 -Subject: [PATCH 024/134] Register the clocks early during the boot process, so +Subject: [PATCH 024/140] Register the clocks early during the boot process, so that special/critical clocks can get enabled early on in the boot process avoiding the risk of disabling a clock, pll_divider or pll when a claiming driver fails to install propperly - maybe it needs to defer. @@ -1597,10 +1597,10 @@ index 58ce6af8452db9ca8b4d3c380a06e448919f6a8d..11d89d106026f15719ea25047d6f357b MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("BCM2835 clock driver"); -From 3fc53150c99084d7777551b3f36b6861ee61d09c Mon Sep 17 00:00:00 2001 +From bad622a01d58fbaf66102eb7492e68a123ee41d0 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 6 Dec 2016 17:05:39 +0000 -Subject: [PATCH 025/134] bcm2835-rng: Avoid initialising if already enabled +Subject: [PATCH 025/140] bcm2835-rng: Avoid initialising if already enabled Avoids the 0x40000 cycles of warmup again if firmware has already used it --- @@ -1626,10 +1626,10 @@ index 574211a495491d9d6021dcaefe4274a63ed02055..e66c0fca8c6090e32f72796c0877a1cf err = hwrng_register(&bcm2835_rng_ops); if (err) { -From 5eac392f46d13120ffcba1e13e744634959086ee Mon Sep 17 00:00:00 2001 +From b72a5d031240e59db68168b7d5e75612b22121e8 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Aug 2016 16:28:44 +0100 -Subject: [PATCH 026/134] kbuild: Ignore dtco targets when filtering symbols +Subject: [PATCH 026/140] kbuild: Ignore dtco targets when filtering symbols --- scripts/Kbuild.include | 2 +- @@ -1649,10 +1649,10 @@ index 9ffd3dda3889c56a7a72229bed21ff5c49d62856..00da6c9bacbf33334233e22ca5209ade esac | tr ";" "\n" | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/KSYM_\1/p' -From c5d2d8d89edb14cde9482a0617ac23d586c11b76 Mon Sep 17 00:00:00 2001 +From 243fc413d23c221895ffdecac83fe575cc78aad2 Mon Sep 17 00:00:00 2001 From: Robert Tiemann Date: Mon, 20 Jul 2015 11:01:25 +0200 -Subject: [PATCH 027/134] BCM2835_DT: Fix I2S register map +Subject: [PATCH 027/140] BCM2835_DT: Fix I2S register map --- Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt | 4 ++-- @@ -1690,10 +1690,10 @@ index 65783de0aedf3da79adc36fd077b7a89954ddb6b..a89fe4220fdc3f26f75ee66daf187554 dmas = <&dma 2>, <&dma 3>; -From 912bfe4678fc031f58f9afa64ebc5028e43913bb Mon Sep 17 00:00:00 2001 +From 03c7eb1f9221b496436a415d52d07a5b10ced50f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 -Subject: [PATCH 028/134] clk-bcm2835: Mark used PLLs and dividers CRITICAL +Subject: [PATCH 028/140] clk-bcm2835: Mark used PLLs and dividers CRITICAL The VPU configures and relies on several PLLs and dividers. Mark all enabled dividers and their PLLs as CRITICAL to prevent the kernel from @@ -1721,10 +1721,10 @@ index 11d89d106026f15719ea25047d6f357b4bfcb2c5..fe8f5d65f2749cb3ddc878df61664826 divider->data = data; -From feef6b2cac317c9e841cc2f2644f99aa8395d226 Mon Sep 17 00:00:00 2001 +From 297a78d9469ee56d17b38b45ecf2a3204d26bdaf Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 -Subject: [PATCH 029/134] clk-bcm2835: Add claim-clocks property +Subject: [PATCH 029/140] clk-bcm2835: Add claim-clocks property The claim-clocks property can be used to prevent PLLs and dividers from being marked as critical. It contains a vector of clock IDs, @@ -1826,10 +1826,10 @@ index fe8f5d65f2749cb3ddc878df616648267441e0ee..92b5e0f5145b32d3bfc3592fe381e8be sizeof(cprman_parent_names)); of_clk_parent_fill(dev->of_node, cprman->real_parent_names, -From 730f7112ebf2ca263f213e04291ad6c5129ea883 Mon Sep 17 00:00:00 2001 +From eb82e7c98eca02feee2b42d59d5020cd04251bcf Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 6 Mar 2017 09:06:18 +0000 -Subject: [PATCH 030/134] clk-bcm2835: Read max core clock from firmware +Subject: [PATCH 030/140] clk-bcm2835: Read max core clock from firmware The VPU is responsible for managing the core clock, usually under direction from the bcm2835-cpufreq driver but not via the clk-bcm2835 @@ -1944,10 +1944,10 @@ index 92b5e0f5145b32d3bfc3592fe381e8be3cd90c72..336f8c9c44325d0a94e591a8557f7af2 for (i = 0; !of_property_read_u32_index(pdev->dev.of_node, "claim-clocks", -From d7156eb8b0f4fc656f1af577b04e7770c8fa41e8 Mon Sep 17 00:00:00 2001 +From 816b027029ba959826a7135f0dfe3c5285ee0546 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 9 May 2016 17:28:18 -0700 -Subject: [PATCH 031/134] clk: bcm2835: Mark GPIO clocks enabled at boot as +Subject: [PATCH 031/140] clk: bcm2835: Mark GPIO clocks enabled at boot as critical. These divide off of PLLD_PER and are used for the ethernet and wifi @@ -1985,10 +1985,10 @@ index 336f8c9c44325d0a94e591a8557f7af246adc857..caa05e5ad0b7b5cd683e04fb3591a3df * rate changes on at least of the parents. */ -From bc6f85af220f866ee0c3bf00e0ab1f4c3685acb8 Mon Sep 17 00:00:00 2001 +From c5323d71ce36eddbf9885306f7d5cae94380c8c8 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:36:44 +0000 -Subject: [PATCH 032/134] sound: Demote deferral errors to INFO level +Subject: [PATCH 032/140] sound: Demote deferral errors to INFO level At present there is no mechanism to specify driver load order, which can lead to deferrals and repeated retries until successful. @@ -2023,10 +2023,10 @@ index 13c875e2392a40ec5651d7c12a28b9ac9f3aab85..23d56057e49b5ff6b6c3c352c150fee8 goto _err_defer; } -From fac58d6c415da4e07212c3007189deb1533bfcf4 Mon Sep 17 00:00:00 2001 +From 9cd2c24aafc314994938e84beb39d50a4a6ebcdd Mon Sep 17 00:00:00 2001 From: Claggy3 Date: Sat, 11 Feb 2017 14:00:30 +0000 -Subject: [PATCH 033/134] Update vfpmodule.c +Subject: [PATCH 033/140] Update vfpmodule.c Christopher Alexander Tobias Schulze - May 2, 2015, 11:57 a.m. This patch fixes a problem with VFP state save and restore related @@ -2163,10 +2163,10 @@ index a71a48e71fffa8626fe90106815376c44bbe679b..d6c0a5a0a5ae3510db3ace5e3f5d3410 /* * Save the userland NEON/VFP state. Under UP, -From 299109833b45000e763626a6f89fd228312050d9 Mon Sep 17 00:00:00 2001 +From cf5fe7abe9bb28853e72241a1018326c46de0fdc Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Mar 2017 21:13:24 +1100 -Subject: [PATCH 034/134] ASoC: bcm2835_i2s.c: relax the ch2 register setting +Subject: [PATCH 034/140] ASoC: bcm2835_i2s.c: relax the ch2 register setting for 8 channels This patch allows ch2 registers to be set for 8 channels of audio. @@ -2187,10 +2187,10 @@ index 6ba20498202ed36906b52096893a88867a79269f..56df7d8a43d0aac055a91b0d24aca8e1 format |= BCM2835_I2S_CH1(BCM2835_I2S_CHPOS(ch1pos)); format |= BCM2835_I2S_CH2(BCM2835_I2S_CHPOS(ch2pos)); -From 5766269728236665eb37b518cb9c8b41da3ccf77 Mon Sep 17 00:00:00 2001 +From a1afd97cfaea33d38e9aa9018849435658995ff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Tue, 1 Nov 2016 15:15:41 +0100 -Subject: [PATCH 035/134] i2c: bcm2835: Add debug support +Subject: [PATCH 035/140] i2c: bcm2835: Add debug support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2379,10 +2379,10 @@ index cd07a69e2e9355540442785f95e90823b05c9d10..47167f403cc8329bd811b47c7011c299 if (i2c_dev->msg_err & BCM2835_I2C_S_ERR) return -EREMOTEIO; -From 80a72ca46760dd520f61c87e2d32fd9e7a561659 Mon Sep 17 00:00:00 2001 +From 190d35674eb17b66b31ace4ae4fbbc9b0e35f107 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 18 Dec 2014 16:07:15 -0800 -Subject: [PATCH 036/134] mm: Remove the PFN busy warning +Subject: [PATCH 036/140] mm: Remove the PFN busy warning See commit dae803e165a11bc88ca8dbc07a11077caf97bbcb -- the warning is expected sometimes when using CMA. However, that commit still spams @@ -2407,10 +2407,10 @@ index 1423da8dd16f5bdc83e20ddf6665b2022a9a6492..6ce930c02160d55dc4eee1e7197a5efa goto done; } -From 644c64397ae843e87722be6556eb3636e0558880 Mon Sep 17 00:00:00 2001 +From be5a0f9212af4ccccdfec150b3a5d21b0289512f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 10:06:56 +0000 -Subject: [PATCH 037/134] ASoC: Add prompt for ICS43432 codec +Subject: [PATCH 037/140] ASoC: Add prompt for ICS43432 codec Without a prompt string, a config setting can't be included in a defconfig. Give CONFIG_SND_SOC_ICS43432 a prompt so that Pi soundcards @@ -2435,10 +2435,10 @@ index 6c78b0b49b8145c24740d93c4174c059d91ddae9..d6450d5fc144737f967b8e00678baa9b config SND_SOC_INNO_RK3036 tristate "Inno codec driver for RK3036 SoC" -From 5f76d96a880b96a0728f57db58f85a6ef0c883d0 Mon Sep 17 00:00:00 2001 +From 4250ecc6c11e64b42116298be0ef4c82a6348bec Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 18 May 2017 15:36:46 +0100 -Subject: [PATCH 038/134] staging: bcm2835-audio: Fix memory corruption +Subject: [PATCH 038/140] staging: bcm2835-audio: Fix memory corruption I'm all for fixing memory leaks, but freeing a block while it is still being used is a recipe for hard-to-debug kernel exeptions. @@ -2473,10 +2473,10 @@ index 5f3d8f2339e34834d11edfa8de1d5819e3e32b4f..89f96f3c02805f4114ec9b488e18d00e return ret; } -From e62efd3c0da74a112524273559dfd1bd4bb41081 Mon Sep 17 00:00:00 2001 +From 37b132acacac2b951bcae9bb31285dc5daf7b980 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 039/134] Main bcm2708/bcm2709 linux port +Subject: [PATCH 039/140] Main bcm2708/bcm2709 linux port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2664,10 +2664,10 @@ index cfb4b4496dd9f61362dea012176c146120fada07..d9c6c217c4d6a2408abe2665bf7f2700 MODULE_AUTHOR("Lubomir Rintel "); MODULE_DESCRIPTION("BCM2835 mailbox IPC driver"); -From ea5bfe9a718e4ad6a9ad5d0e9ba754fcdf1dbaa0 Mon Sep 17 00:00:00 2001 +From 7eff023dc567fe2c2b4170ab82f6785db8fe7e3b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 040/134] Add dwc_otg driver +Subject: [PATCH 040/140] Add dwc_otg driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -3486,7 +3486,7 @@ index bd3e0c5a6db25e7a162d922c6508de1ad0b68025..15c80079c97bb9eeec478932af88a293 return i; } diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c -index 822f8c50e4233c70d159a4e374ad66b49502c0c1..2b0a828258fd46e05e9dea9a23168cd746b4fe54 100644 +index 78c2aca5b0fc18153aa2715471bd5d2243ca358e..98bea9a4fa9a93bf207715ead68b5dfa4a368ec0 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -5039,7 +5039,7 @@ static void port_event(struct usb_hub *hub, int port1) @@ -3499,7 +3499,7 @@ index 822f8c50e4233c70d159a4e374ad66b49502c0c1..2b0a828258fd46e05e9dea9a23168cd7 USB_PORT_FEAT_C_OVER_CURRENT); msleep(100); /* Cool down */ diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c -index 4c38ea41ae969e6fac8ced209a655957322ba36f..abb0d9b614f469a4fb356f47ca22fb9684fffa2f 100644 +index 371a07d874a370bc70ad6ef1499debac8b34b6fe..30d4879d2d9b1433d71eb6f99aa67f653608e88e 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -1909,6 +1909,85 @@ int usb_set_configuration(struct usb_device *dev, int configuration) @@ -63941,10 +63941,10 @@ index 0000000000000000000000000000000000000000..cdc9963176e5a4a0d5250613b61e26c5 +test_main(); +0; -From 1fd19da1f463a9539f87aacc32e76c7eb86c2628 Mon Sep 17 00:00:00 2001 +From b4a37449c8579db59598df6349e9a67bcde67b4b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 17:06:34 +0100 -Subject: [PATCH 041/134] bcm2708 framebuffer driver +Subject: [PATCH 041/140] bcm2708 framebuffer driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -67403,10 +67403,10 @@ index 3c14e43b82fefe1d32f591d1b2f61d2cd28d0fa8..7626beb6a5bb8df601ddf0f6e6909d1f +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 afdf5dc9e6085f43e14b9c697ff17310163082ce Mon Sep 17 00:00:00 2001 +From 0869ad47982e5ab21d51598327f1e8ff703e269e Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 042/134] dmaengine: Add support for BCM2708 +Subject: [PATCH 042/140] dmaengine: Add support for BCM2708 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -68037,10 +68037,10 @@ index 0000000000000000000000000000000000000000..c5bfff2765be4606077e6c8af73040ec + +#endif /* _PLAT_BCM2708_DMA_H */ -From a1e0f19539ed7025aeeefaafe4fd20a4533eaa07 Mon Sep 17 00:00:00 2001 +From 287c654b110b9abf269be95b6713a944d1c9a0e8 Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:06 +0100 -Subject: [PATCH 043/134] MMC: added alternative MMC driver +Subject: [PATCH 043/140] MMC: added alternative MMC driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -69920,10 +69920,10 @@ index 46c73e97e61f08a41d9753079345f5965caebbc5..388c551ed11e9d06ea1c25b6553d47a8 unsigned int erase_size; /* erase size in sectors */ -From 995845a72f105455f96c4fdaf7c5a61a3420b550 Mon Sep 17 00:00:00 2001 +From 3b1911c2500d518f1a6124f57871dbb5abfd24a1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Mar 2015 17:49:47 +0000 -Subject: [PATCH 044/134] Adding bcm2835-sdhost driver, and an overlay to +Subject: [PATCH 044/140] Adding bcm2835-sdhost driver, and an overlay to enable it BCM2835 has two SD card interfaces. This driver uses the other one. @@ -72329,10 +72329,10 @@ index 0000000000000000000000000000000000000000..9c6f199a7830959f31012d86bc1f8b1a +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Phil Elwell"); -From c82a1ecf39452ef641c625cfee38645eccb7921c Mon Sep 17 00:00:00 2001 +From fa28ef9733c4e9e4587c8a9ecb2e67c13e8b64e4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 28 Oct 2016 15:36:43 +0100 -Subject: [PATCH 045/134] vc_mem: Add vc_mem driver for querying firmware +Subject: [PATCH 045/140] vc_mem: Add vc_mem driver for querying firmware memory addresses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -72857,10 +72857,10 @@ index 0000000000000000000000000000000000000000..20a475377eb3078ea1ecaef2b24efc35 + +#endif /* _VC_MEM_H */ -From 2ab63c04964e4b7af4bb90e8074d5ff4f3174187 Mon Sep 17 00:00:00 2001 +From de3753e80fb6395629f1bdad616b21a761d1241d Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Tue, 22 Jul 2014 15:41:04 +0100 -Subject: [PATCH 046/134] vcsm: VideoCore shared memory service for BCM2835 +Subject: [PATCH 046/140] vcsm: VideoCore shared memory service for BCM2835 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -77734,10 +77734,10 @@ index 0000000000000000000000000000000000000000..b75729d762f25aace133f7a008633b40 + +#endif /* __VMCS_SM_IOCTL_H__INCLUDED__ */ -From 9c305c4ad85ec449dd04b73a8216090a5934258f Mon Sep 17 00:00:00 2001 +From 2a1298a2412032b281b243c87048e2f0ba3b451a Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Fri, 21 Aug 2015 23:14:48 +0100 -Subject: [PATCH 047/134] Add /dev/gpiomem device for rootless user GPIO access +Subject: [PATCH 047/140] Add /dev/gpiomem device for rootless user GPIO access Signed-off-by: Luke Wren @@ -78045,10 +78045,10 @@ index 0000000000000000000000000000000000000000..f5e7f1ba8fb6f18dee77fad06a17480c +MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace"); +MODULE_AUTHOR("Luke Wren "); -From 8b26c878e4ee048d8ac1933e999d41d6424391c2 Mon Sep 17 00:00:00 2001 +From 7a1b32b10f7370ed22a0e9cae747668d06ed74ae Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:14:45 +0100 -Subject: [PATCH 048/134] Add SMI driver +Subject: [PATCH 048/140] Add SMI driver Signed-off-by: Luke Wren --- @@ -79999,10 +79999,10 @@ index 0000000000000000000000000000000000000000..ee3a75edfc033eeb0d90a687ffb68b10 + +#endif /* BCM2835_SMI_H */ -From 530a7692ed2faa6ce736d0540e583d94654989e3 Mon Sep 17 00:00:00 2001 +From 38b5823e839dc18067c264cfd23073ce98aa5fdb Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Tue, 26 Apr 2016 14:59:21 +0000 -Subject: [PATCH 049/134] MISC: bcm2835: smi: use clock manager and fix reload +Subject: [PATCH 049/140] MISC: bcm2835: smi: use clock manager and fix reload issues Use clock manager instead of self-made clockmanager. @@ -80172,10 +80172,10 @@ index 63a4ea08b9930a3a31a985f0a1d969b488ed49ec..1261540703127d1d63b9f3c87042c6e5 return 0; } -From be2c3360edbd837bb57c54f786001f659d538232 Mon Sep 17 00:00:00 2001 +From 893e7ebc479745718ee41edb9d49b2da2d04d198 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:16:10 +0100 -Subject: [PATCH 050/134] Add SMI NAND driver +Subject: [PATCH 050/140] Add SMI NAND driver Signed-off-by: Luke Wren --- @@ -80540,10 +80540,10 @@ index 0000000000000000000000000000000000000000..02adda6da18bd0ba9ab19a104975b79d + ("Driver for NAND chips using Broadcom Secondary Memory Interface"); +MODULE_AUTHOR("Luke Wren "); -From 2ab2b1daa12485af9f6b762e9534ea40af7a5c0c Mon Sep 17 00:00:00 2001 +From b4a7c152d73c353b50086d7edb7406be3000cd7b Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 051/134] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 051/140] 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 @@ -81403,10 +81403,10 @@ index 0000000000000000000000000000000000000000..fb69624ccef00ddbdccf8256d6baf1b1 + +#endif -From b6ab5c03dfaec67d0bcc3a48fc3a0cca756210af Mon Sep 17 00:00:00 2001 +From 2d1050f4cd8b26845e015aed37f84077861790b2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 052/134] Add cpufreq driver +Subject: [PATCH 052/140] Add cpufreq driver Signed-off-by: popcornmix @@ -81670,10 +81670,10 @@ index 0000000000000000000000000000000000000000..99345969b0e4d651fd9033d67de2febb +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); -From ba42dcfb79745ca96724272d62101bf57eb00da3 Mon Sep 17 00:00:00 2001 +From f4e57386232d104bb8ba8e791c7ae9b479fe540e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 15:44:08 +0100 -Subject: [PATCH 053/134] Add Chris Boot's i2c driver +Subject: [PATCH 053/140] Add Chris Boot's i2c driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -82338,10 +82338,10 @@ index 0000000000000000000000000000000000000000..962f2e5c7455d91bf32925d785f5f16b +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); -From 70e038c82618b3dfe2da28ce3c909b4f82ac6dd7 Mon Sep 17 00:00:00 2001 +From 871a760603c56511f1ca2a9c399ea2fec70869c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:27:06 +0200 -Subject: [PATCH 054/134] char: broadcom: Add vcio module +Subject: [PATCH 054/140] char: broadcom: Add vcio module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -82566,10 +82566,10 @@ index 0000000000000000000000000000000000000000..c19bc2075c77879563ef5e59038b5a14 +MODULE_DESCRIPTION("Mailbox userspace access"); +MODULE_LICENSE("GPL"); -From f8c876d91dab72b94ad70b3d8ffd734ea4b5f4b7 Mon Sep 17 00:00:00 2001 +From 2951a142ab1051bf124ac0709c068079576c2082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:25:01 +0200 -Subject: [PATCH 055/134] firmware: bcm2835: Support ARCH_BCM270x +Subject: [PATCH 055/140] firmware: bcm2835: Support ARCH_BCM270x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -82652,10 +82652,10 @@ index dd506cd3a5b874f9e1acd07efb8cd151bb6145d1..3f070bd38a91511c986e3fb114b15bd4 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("Raspberry Pi firmware driver"); -From b7251c114610e8aa8ba1e63a9e0c5a959738d8b2 Mon Sep 17 00:00:00 2001 +From 4ddb6a04d7accb78b8f72ac03c5b3717a5f6b2ca Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 May 2015 09:00:42 +0100 -Subject: [PATCH 056/134] scripts: Add mkknlimg and knlinfo scripts from tools +Subject: [PATCH 056/140] scripts: Add mkknlimg and knlinfo scripts from tools repo The Raspberry Pi firmware looks for a trailer on the kernel image to @@ -83182,10 +83182,10 @@ index 0000000000000000000000000000000000000000..84be2593ec1de8f97b0167ff06b3e05d + return $trailer; +} -From 4b7f2c34e9d0614ac43ca565fede8a525c9998ec Mon Sep 17 00:00:00 2001 +From 41c99cc7a7409f9c6e557c2ded1f97f70ce86d7d Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:46:08 +0200 -Subject: [PATCH 057/134] BCM2708: Add core Device Tree support +Subject: [PATCH 057/140] BCM2708: Add core Device Tree support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -95422,10 +95422,10 @@ index 58c05e5d9870b6c18a72da7dc44ff3112994946d..9842523b225a88505d796cc689c04f40 # Bzip2 -From 6e10baca0f4e2753ee68c6f07ca2004f93f5f3ad Mon Sep 17 00:00:00 2001 +From 21aaf80fa4722da3ab5632c51f2bbd0169497f37 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Feb 2015 13:50:57 +0000 -Subject: [PATCH 058/134] BCM270x_DT: Add pwr_led, and the required "input" +Subject: [PATCH 058/140] BCM270x_DT: Add pwr_led, and the required "input" trigger The "input" trigger makes the associated GPIO an input. This is to support @@ -95600,10 +95600,10 @@ index 64c56d454f7df9f864a5242ce4212df586f66886..3fd74c8737871cb56f0355c858fc135e /* set_brightness_work / blink_timer flags, atomic, private. */ unsigned long work_flags; -From 84aab063a2b7a1f0f76024076e1c04a81241b1a1 Mon Sep 17 00:00:00 2001 +From aca60316476dc6b915c17999236e6a1cea557615 Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 059/134] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 059/140] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -95871,10 +95871,10 @@ index fb795c3b3c178ad3cd7c9e9e4547ffd492bac181..703fa8a70574323abe2fb32599254582 __u32 dx; /* screen-relative */ __u32 dy; -From 8c7d51d2bc4d76a5ae088fad49a997e68522d1d7 Mon Sep 17 00:00:00 2001 +From 86560161d4d90f60ce42ef1990b4eda6179389d1 Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 060/134] Speed up console framebuffer imageblit function +Subject: [PATCH 060/140] 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 @@ -96083,10 +96083,10 @@ index a2bb276a8b2463eee98eb237c4647bc00cd93601..436494fba15abecb400ef28688466faf start_index, pitch_index); } else -From 57851fa2f96f2081d464b4246a89c51d2a1b4fd4 Mon Sep 17 00:00:00 2001 +From 8514030b5c470fe0b6e21e4df43a094a6fff277e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 061/134] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 061/140] 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 @@ -96336,10 +96336,10 @@ index 90cbe7e65059f6b604a87c6bf39cd9bbeae7684c..a52be51ee0a5511a75d4eaa8dacaec5e u8, w1_slave_found_callback); }; -From 4e00fcbcab17bb16b4bbcbed85710bc415885a75 Mon Sep 17 00:00:00 2001 +From 9b7df9fec216cf1c8e3c738b3b9e60227f0109ad Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 14 Jul 2014 22:02:09 +0100 -Subject: [PATCH 062/134] hid: Reduce default mouse polling interval to 60Hz +Subject: [PATCH 062/140] hid: Reduce default mouse polling interval to 60Hz Reduces overhead when using X --- @@ -96371,10 +96371,10 @@ index c008847e0b20a2accb00451b10fb1c648f67925b..4a86428a3b4e3d51e9ac6ce9c9c11097 break; case HID_GD_JOYSTICK: -From bcb83898fc77acea099939020bdf111d11f3a51e Mon Sep 17 00:00:00 2001 +From 5c05748148e215bc4cf0b50779ffb8d460a3e809 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Tue, 12 May 2015 14:47:56 +0100 -Subject: [PATCH 063/134] rpi-ft5406: Add touchscreen driver for pi LCD display +Subject: [PATCH 063/140] rpi-ft5406: Add touchscreen driver for pi LCD display Fix driver detection failure Check that the buffer response is non-zero meaning the touchscreen was detected @@ -96732,10 +96732,10 @@ index 30fb37fe175df604a738258a2a632bca3bfff33f..4a3d79d3b48eb483a4e4bf498f617515 RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From ad0c9297e23a427ab816021f8ce337df9ca53720 Mon Sep 17 00:00:00 2001 +From 4237130a4718221b3641f9aaf1c9841a53168003 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 28 Nov 2016 16:50:04 +0000 -Subject: [PATCH 064/134] Improve __copy_to_user and __copy_from_user +Subject: [PATCH 064/140] Improve __copy_to_user and __copy_from_user performance Provide a __copy_from_user that uses memcpy. On BCM2708, use @@ -98310,10 +98310,10 @@ index 17ec37811c32f09126ed42753037e055c5cec115..c08f81812d0d56a0d90c1eb6777d0622 bool "Broadcom BCM63xx DSL SoC" depends on ARCH_MULTI_V7 -From 18a1f6ebfb0bfc62783eff7abae21ff9af376dc1 Mon Sep 17 00:00:00 2001 +From bfab69cc0d2b83afe083373f00c74223a2e2df7c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 25 Jun 2015 12:16:11 +0100 -Subject: [PATCH 065/134] gpio-poweroff: Allow it to work on Raspberry Pi +Subject: [PATCH 065/140] gpio-poweroff: Allow it to work on Raspberry Pi The Raspberry Pi firmware manages the power-down and reboot process. To do this it installs a pm_power_off handler, causing @@ -98348,10 +98348,10 @@ index be3d81ff51cc3f510d85e4eed7a52960e51e7bc1..a030ae9fb1fca325061c093696e82186 "%s: pm_power_off function already registered", __func__); -From 804aa8b83c716ce0f902372c206bdaa4fcc47b34 Mon Sep 17 00:00:00 2001 +From c3d1e6c32cd18b2897163e47be092f3468234803 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 14:32:47 +0100 -Subject: [PATCH 066/134] mfd: Add Raspberry Pi Sense HAT core driver +Subject: [PATCH 066/140] mfd: Add Raspberry Pi Sense HAT core driver --- drivers/input/joystick/Kconfig | 8 + @@ -99216,10 +99216,10 @@ index 0000000000000000000000000000000000000000..56196dc2af10e464a1e3f98b028dca1c + +#endif -From e71f808f2a20357bcb2fd48cbc53dd31510a0ab1 Mon Sep 17 00:00:00 2001 +From 7d21df3d60fda096368db2c76b6642a8305db1c4 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 -Subject: [PATCH 067/134] ASoC: Add support for HifiBerry DAC +Subject: [PATCH 067/140] ASoC: Add support for HifiBerry DAC This adds a machine driver for the HifiBerry DAC. It is a sound card that can @@ -99394,10 +99394,10 @@ index 0000000000000000000000000000000000000000..ee9f133953544629282631e5ef3f73fe +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); -From f2ac7a1fc8bdc0c404d114db53bb9a8771156d5e Mon Sep 17 00:00:00 2001 +From 9b48466a67640e1174c7edc93cf0c6c57e94d4df Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 25 Jan 2016 15:48:59 +0000 -Subject: [PATCH 068/134] ASoC: Add support for Rpi-DAC +Subject: [PATCH 068/140] ASoC: Add support for Rpi-DAC --- sound/soc/bcm/Kconfig | 7 +++ @@ -99681,10 +99681,10 @@ index 0000000000000000000000000000000000000000..afe1b419582aa40c4b2729d242bb13cd +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From abd64390111e8f68d7ac460573e1d70c5a044b0d Mon Sep 17 00:00:00 2001 +From 830d0cb628a743c59efa452dfcab8607d2791b0a Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 -Subject: [PATCH 069/134] ASoC: wm8804: Implement MCLK configuration options, +Subject: [PATCH 069/140] 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 @@ -99733,10 +99733,10 @@ index af95d648265b3e92e345101542b332aee35191d4..513f56ba132929662802d15cdc653af3 .component_driver = { .dapm_widgets = wm8804_dapm_widgets, -From be9969f66ea2ced8a7979cdf86f69fdca000ccc5 Mon Sep 17 00:00:00 2001 +From 656bc1ebf607d72431109874330b84a0f708595a Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 -Subject: [PATCH 070/134] ASoC: BCM:Add support for HiFiBerry Digi. Driver is +Subject: [PATCH 070/140] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patched WM8804 driver. Signed-off-by: Daniel Matuschek @@ -100080,10 +100080,10 @@ index 0000000000000000000000000000000000000000..7620dd02de40b6d644ff038b445d375d +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); -From 016724d981370c3affc299396f4cbff51302b4d6 Mon Sep 17 00:00:00 2001 +From 9cb797da9370482bcfc0fb542ca5987ee4fb0abe Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 -Subject: [PATCH 071/134] Add IQaudIO Sound Card support for Raspberry Pi +Subject: [PATCH 071/140] Add IQaudIO Sound Card support for Raspberry Pi Set a limit of 0dB on Digital Volume Control @@ -100418,10 +100418,10 @@ index 0000000000000000000000000000000000000000..1ee4097c846376666775272ed692ca33 +MODULE_DESCRIPTION("ASoC Driver for IQAudio DAC"); +MODULE_LICENSE("GPL v2"); -From 6374c8dbd61b4fb2d126776368c405ca1d16273f Mon Sep 17 00:00:00 2001 +From 8426dddb71252f8be2247e89784628918df5e183 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 10:06:56 +0200 -Subject: [PATCH 072/134] Added support for HiFiBerry DAC+ +Subject: [PATCH 072/140] 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. @@ -101051,10 +101051,10 @@ index 72b19e62f6267698aea45d2410d616d91c1825cb..c6839ef6e16754ed9de2698507b8986a dev_err(dev, "No LRCLK?\n"); return -EINVAL; -From 6a9ec62344a9441047d241558da945626ed2df8a Mon Sep 17 00:00:00 2001 +From 983285fb27e7456e7f0f1accdd470619223eb5a8 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 11:09:58 +0200 -Subject: [PATCH 073/134] Added driver for HiFiBerry Amp amplifier add-on board +Subject: [PATCH 073/140] 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. @@ -101889,10 +101889,10 @@ index 0000000000000000000000000000000000000000..8f019e04898754d2f87e9630137be9e8 + +#endif /* _TAS5713_H */ -From a4225b94eb5657317e775842b885dc2b85c62911 Mon Sep 17 00:00:00 2001 +From 123849bba7eaff2461afffafa68638189c7cd693 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 25 Mar 2015 09:26:17 +0100 -Subject: [PATCH 074/134] Add driver for rpi-proto +Subject: [PATCH 074/140] Add driver for rpi-proto Forward port of 3.10.x driver from https://github.com/koalo We are using a custom board and would like to use rpi 3.18.x @@ -102107,10 +102107,10 @@ index 0000000000000000000000000000000000000000..fadbfade100228aaafabb0d3bdf35c01 +MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to PROTO board (WM8731)"); +MODULE_LICENSE("GPL"); -From 57b56219d47ab8c545d65e070c8cd95d36a7c145 Mon Sep 17 00:00:00 2001 +From bdb31e32e880cb3fd0003e25d496d2b583bdd69c Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:03:47 +0100 -Subject: [PATCH 075/134] RaspiDAC3 support +Subject: [PATCH 075/140] RaspiDAC3 support Signed-off-by: Jan Grulich @@ -102353,10 +102353,10 @@ index 0000000000000000000000000000000000000000..ad2b5b89bc8213dc2e277306ef50d6e3 +MODULE_DESCRIPTION("ASoC Driver for RaspiDAC Rev.3x"); +MODULE_LICENSE("GPL v2"); -From 9acba1e929ccd366a598b918ec9177c34bfb6ddb Mon Sep 17 00:00:00 2001 +From c57c9516011dd71f070fbef4a4e3e453e47f5856 Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Thu, 7 Apr 2016 21:26:21 +0100 -Subject: [PATCH 076/134] Add Support for JustBoom Audio boards +Subject: [PATCH 076/140] Add Support for JustBoom Audio boards justboom-dac: Adjust for ALSA API change @@ -102812,10 +102812,10 @@ index 0000000000000000000000000000000000000000..909cf8928f2f4313982316f9c5b8a709 +MODULE_DESCRIPTION("ASoC Driver for JustBoom PI Digi HAT Sound Card"); +MODULE_LICENSE("GPL v2"); -From fbee981d728c3b054f6c17b3c76471279cd1c940 Mon Sep 17 00:00:00 2001 +From 7c70a244a51dd9224698d40a0f3c3f082b1e1eb5 Mon Sep 17 00:00:00 2001 From: Andrey Grodzovsky Date: Tue, 3 May 2016 22:10:59 -0400 -Subject: [PATCH 077/134] ARM: adau1977-adc: Add basic machine driver for +Subject: [PATCH 077/140] ARM: adau1977-adc: Add basic machine driver for adau1977 codec driver. This commit adds basic support for the codec usage including: Device tree overlay, @@ -102997,10 +102997,10 @@ index 0000000000000000000000000000000000000000..f3d7e5db7bb912e1d7ca6f8e8d42df5f +MODULE_DESCRIPTION("ASoC Driver for ADAU1977 ADC"); +MODULE_LICENSE("GPL v2"); -From 857caa3fbfa2bed1837320b97e4dd6897f226d42 Mon Sep 17 00:00:00 2001 +From 9d480be77806328f8c27527fc0c63ba55fb2f7a9 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Mon, 16 May 2016 21:36:31 +1000 -Subject: [PATCH 078/134] New AudioInjector.net Pi soundcard with low jitter +Subject: [PATCH 078/140] New AudioInjector.net Pi soundcard with low jitter audio in and out. Contains the sound/soc/bcm ALSA machine driver and necessary alterations to the Kconfig and Makefile. @@ -103251,10 +103251,10 @@ index 0000000000000000000000000000000000000000..491906bbf446826e55dd843f28e4860f +MODULE_ALIAS("platform:audioinjector-pi-soundcard"); + -From 589b45445aa9079312df87f4a0c801e2f5ea1308 Mon Sep 17 00:00:00 2001 +From 645eaaa24a0d4a54f3c0b04ab4b482d4e581e1b5 Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Thu, 30 Jun 2016 18:38:42 +0100 -Subject: [PATCH 079/134] Add IQAudIO Digi WM8804 board support +Subject: [PATCH 079/140] Add IQAudIO Digi WM8804 board support Support IQAudIO Digi board with iqaudio_digi machine driver and iqaudio-digi-wm8804-audio overlay. @@ -103554,10 +103554,10 @@ index 0000000000000000000000000000000000000000..33aa2be8a43a12a12cfb5d844dd9732c +MODULE_DESCRIPTION("ASoC Driver for IQAudIO WM8804 Digi"); +MODULE_LICENSE("GPL v2"); -From f4879fbddc10a173d8fb8005611dbb0713751de8 Mon Sep 17 00:00:00 2001 +From 68d5b7ce6bd338df8ca9c51207559f014b0263d3 Mon Sep 17 00:00:00 2001 From: escalator2015 Date: Tue, 24 May 2016 16:20:09 +0100 -Subject: [PATCH 080/134] New driver for RRA DigiDAC1 soundcard using WM8741 + +Subject: [PATCH 080/140] New driver for RRA DigiDAC1 soundcard using WM8741 + WM8804 --- @@ -104030,10 +104030,10 @@ index 0000000000000000000000000000000000000000..f200688bb4ae32b90a0ced555aed94b0 +MODULE_DESCRIPTION("ASoC Driver for RRA DigiDAC1"); +MODULE_LICENSE("GPL v2"); -From 9f0c1db56487d9ae37661de28bd01b300c4a5ad8 Mon Sep 17 00:00:00 2001 +From b2982faba369ea6d24ce18592cb800952d55ef0a Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Sat, 2 Jul 2016 16:26:19 +0100 -Subject: [PATCH 081/134] Add support for Dion Audio LOCO DAC-AMP HAT +Subject: [PATCH 081/140] Add support for Dion Audio LOCO DAC-AMP HAT Using dedicated machine driver and pcm5102a codec driver. @@ -104206,10 +104206,10 @@ index 0000000000000000000000000000000000000000..65e03741d349a2dc5bd91f69855ea952 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO"); +MODULE_LICENSE("GPL v2"); -From dcc9ff00161d0ff429e7367162e0165004000f86 Mon Sep 17 00:00:00 2001 +From e4f067be16838b65c22b3bdcd8a9dae216730cb5 Mon Sep 17 00:00:00 2001 From: Clive Messer Date: Mon, 19 Sep 2016 14:01:04 +0100 -Subject: [PATCH 082/134] Allo Piano DAC boards: Initial 2 channel (stereo) +Subject: [PATCH 082/140] Allo Piano DAC boards: Initial 2 channel (stereo) support (#1645) Add initial 2 channel (stereo) support for Allo Piano DAC (2.0/2.1) boards, @@ -104416,10 +104416,10 @@ index 0000000000000000000000000000000000000000..eaf50fb6dbca1970ae1c6f8662088b0f +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC"); +MODULE_LICENSE("GPL v2"); -From 8d3c28274a5dfb6edd53b91d4ebceb4887b21292 Mon Sep 17 00:00:00 2001 +From 487311f6c5b8abef16645206d5e26a63de8c7ad5 Mon Sep 17 00:00:00 2001 From: Raashid Muhammed Date: Mon, 27 Mar 2017 12:35:00 +0530 -Subject: [PATCH 083/134] Add support for Allo Piano DAC 2.1 plus add-on board +Subject: [PATCH 083/140] Add support for Allo Piano DAC 2.1 plus add-on board for Raspberry Pi. The Piano DAC 2.1 has support for 4 channels with subwoofer. @@ -105288,10 +105288,10 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC Plus"); +MODULE_LICENSE("GPL v2"); -From 982130ded144f178bf000504c43763d1877527c4 Mon Sep 17 00:00:00 2001 +From b10d8862688ede1ea743346a337ba147bf55262c Mon Sep 17 00:00:00 2001 From: BabuSubashChandar Date: Tue, 28 Mar 2017 20:04:42 +0530 -Subject: [PATCH 084/134] Add support for Allo Boss DAC add-on board for +Subject: [PATCH 084/140] Add support for Allo Boss DAC add-on board for Raspberry Pi. (#1924) Signed-off-by: Baswaraj K @@ -105994,10 +105994,10 @@ index 0000000000000000000000000000000000000000..203ab76c7045b081578e23bda1099dd1 +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Boss DAC"); +MODULE_LICENSE("GPL v2"); -From 323620c5fe5f7a6193c097e572be6484c884fd8e Mon Sep 17 00:00:00 2001 +From 13b67b30ed00ad876af4b2a195201fe74930a640 Mon Sep 17 00:00:00 2001 From: gtrainavicius Date: Sun, 23 Oct 2016 12:06:53 +0300 -Subject: [PATCH 085/134] Support for Blokas Labs pisound board +Subject: [PATCH 085/140] Support for Blokas Labs pisound board Pisound dynamic overlay (#1760) @@ -107196,10 +107196,10 @@ index 0000000000000000000000000000000000000000..06ff1e53dc9d860946965b6303577762 +MODULE_DESCRIPTION("ASoC Driver for pisound, http://blokas.io/pisound"); +MODULE_LICENSE("GPL v2"); -From c38ce7e67f3c2fd0abe95becb31aa743a86cac40 Mon Sep 17 00:00:00 2001 +From 483300719c269f7f05b57eadfc87f9d58c4682ba Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 22 Jan 2017 12:49:37 +0100 -Subject: [PATCH 086/134] ASoC: Add driver for Cirrus Logic Audio Card +Subject: [PATCH 086/140] ASoC: Add driver for Cirrus Logic Audio Card Note: due to problems with deferred probing of regulators the following softdep should be added to a modprobe.d file @@ -108264,10 +108264,10 @@ index 0000000000000000000000000000000000000000..ac8651ddff7bd3701dffe22c7fb88352 +MODULE_DESCRIPTION("ASoC driver for Cirrus Logic Audio Card"); +MODULE_LICENSE("GPL"); -From fd33abf6ada97f1a5f0a3a25824596ee8378db06 Mon Sep 17 00:00:00 2001 +From 5c7ba9f1a3f7444848bde41f50fcb6d17212f189 Mon Sep 17 00:00:00 2001 From: Miquel Date: Fri, 24 Feb 2017 20:51:06 +0100 -Subject: [PATCH 087/134] sound: Support for Dion Audio LOCO-V2 DAC-AMP HAT +Subject: [PATCH 087/140] sound: Support for Dion Audio LOCO-V2 DAC-AMP HAT Signed-off-by: Miquel Blauw --- @@ -108462,10 +108462,10 @@ index 0000000000000000000000000000000000000000..a009c49477972a9832175d86f201b035 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO-V2"); +MODULE_LICENSE("GPL v2"); -From ff4bb96b68bfa7a1c29249f9049824b0f8b28d18 Mon Sep 17 00:00:00 2001 +From 8b9fbdbd345bccc3a0398d316a92732fab9c78e5 Mon Sep 17 00:00:00 2001 From: Fe-Pi Date: Wed, 1 Mar 2017 04:42:43 -0700 -Subject: [PATCH 088/134] Add support for Fe-Pi audio sound card. (#1867) +Subject: [PATCH 088/140] Add support for Fe-Pi audio sound card. (#1867) Fe-Pi Audio Sound Card is based on NXP SGTL5000 codec. Mechanical specification of the board is the same the Raspberry Pi Zero. @@ -108679,10 +108679,10 @@ index 0000000000000000000000000000000000000000..015b56fd73cc36be5b5eecd17548fd03 +MODULE_DESCRIPTION("ASoC Driver for Fe-Pi Audio"); +MODULE_LICENSE("GPL v2"); -From 3a3766c52d3de8092cd50a195f5076f0d260ed41 Mon Sep 17 00:00:00 2001 +From 6fc099a2fbb15008c3318f0a5905bbac3b90b069 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Mar 2017 20:04:13 +1100 -Subject: [PATCH 089/134] Add support for the AudioInjector.net Octo sound card +Subject: [PATCH 089/140] Add support for the AudioInjector.net Octo sound card AudioInjector Octo: sample rates, regulators, reset @@ -109091,10 +109091,10 @@ index 0000000000000000000000000000000000000000..5e79f4eff93a21ed3495c77a90f73525 +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:audioinjector-octo-soundcard"); -From c7aa28782f57a961bb2261ea923572ee786ee425 Mon Sep 17 00:00:00 2001 +From 36083bf5e2caae3ca21a4b7d2e95bb985f918eca Mon Sep 17 00:00:00 2001 From: Peter Malkin Date: Mon, 27 Mar 2017 16:38:21 -0700 -Subject: [PATCH 090/134] Driver support for Google voiceHAT soundcard. +Subject: [PATCH 090/140] Driver support for Google voiceHAT soundcard. --- sound/soc/bcm/Kconfig | 7 ++ @@ -109485,10 +109485,10 @@ index 0000000000000000000000000000000000000000..225854b8e5298b3c3018f59a49404354 +MODULE_DESCRIPTION("ASoC Driver for Google voiceHAT SoundCard"); +MODULE_LICENSE("GPL v2"); -From 45ba3c3101e994d97cbd60587f6161dd214cef64 Mon Sep 17 00:00:00 2001 +From 09a6a9b29bd6ff6c589c863025122a1a29ffefe4 Mon Sep 17 00:00:00 2001 From: sandeepal Date: Fri, 2 Jun 2017 18:59:46 +0530 -Subject: [PATCH 091/134] Allo Digione Driver (#2048) +Subject: [PATCH 091/140] Allo Digione Driver (#2048) Driver for the Allo Digione soundcard --- @@ -109810,10 +109810,10 @@ index 0000000000000000000000000000000000000000..e3664e44c699d0102120ecf99e8b780a +MODULE_DESCRIPTION("ASoC Driver for Allo DigiOne"); +MODULE_LICENSE("GPL v2"); -From 77476f233d4e829bb375152dff633e837592702f Mon Sep 17 00:00:00 2001 +From 7dd4a5d27937d7ac6c8b19967d1bb7c8c400d546 Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 21 Oct 2015 14:55:21 +0100 -Subject: [PATCH 092/134] rpi_display: add backlight driver and overlay +Subject: [PATCH 092/140] rpi_display: add backlight driver and overlay Add a mailbox-driven backlight controller for the Raspberry Pi DSI touchscreen display. Requires updated GPU firmware to recognise the @@ -109982,10 +109982,10 @@ index 0000000000000000000000000000000000000000..14a0d9b037395497c1fdae2961feccd5 +MODULE_DESCRIPTION("Raspberry Pi mailbox based Backlight Driver"); +MODULE_LICENSE("GPL"); -From f87fb311b36d6c6e514136f0498a5617d34365e0 Mon Sep 17 00:00:00 2001 +From d58cbfb78e4453dfc9bee758e007ef62ec3b61d6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 23 Feb 2016 19:56:04 +0000 -Subject: [PATCH 093/134] bcm2835-virtgpio: Virtual GPIO driver +Subject: [PATCH 093/140] bcm2835-virtgpio: Virtual GPIO driver Add a virtual GPIO driver that uses the firmware mailbox interface to request that the VPU toggles LEDs. @@ -110259,10 +110259,10 @@ index 4a3d79d3b48eb483a4e4bf498f617515e3ad158f..5f34e1257117fb48013c9926a8a223d6 RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From 9de496d3ce62d74a67f7b30127d7bb2aa97a88ad Mon Sep 17 00:00:00 2001 +From e159ad377562e591fd9f325d5c078e3c4c4fbb7e Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 20 Feb 2017 17:01:21 +0000 -Subject: [PATCH 094/134] bcm2835-gpio-exp: Driver for GPIO expander via +Subject: [PATCH 094/140] bcm2835-gpio-exp: Driver for GPIO expander via mailbox service Pi3 and Compute Module 3 have a GPIO expander that the @@ -110588,10 +110588,10 @@ index 5f34e1257117fb48013c9926a8a223d64a598ab7..c819c21b0158a59c1308882e5a40e3f3 /* Dispmanx TAGS */ RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001, -From 993c19a028647e82a0654b8a8af3265ae8513da2 Mon Sep 17 00:00:00 2001 +From 649c6b45bf6bcfe75291df59295fa9b877252cb1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 23 Feb 2016 17:26:48 +0000 -Subject: [PATCH 095/134] amba_pl011: Don't use DT aliases for numbering +Subject: [PATCH 095/140] amba_pl011: Don't use DT aliases for numbering The pl011 driver looks for DT aliases of the form "serial", and if found uses as the device ID. This can cause @@ -110620,10 +110620,10 @@ index 1888d168a41c87c605962da2605df8ab1c02bd20..e22b9e79836a6aeef4c8f9fb618b9595 uap->old_cr = 0; uap->port.dev = dev; -From 1843b7e52ddd193ffc5be4c36839bb615ca0c952 Mon Sep 17 00:00:00 2001 +From 97dea4a3e5882a052896e287c8f5bfdc38124c22 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 1 Mar 2017 16:07:39 +0000 -Subject: [PATCH 096/134] amba_pl011: Round input clock up +Subject: [PATCH 096/140] amba_pl011: Round input clock up The UART clock is initialised to be as close to the requested frequency as possible without exceeding it. Now that there is a @@ -110709,10 +110709,10 @@ index e22b9e79836a6aeef4c8f9fb618b9595c551500f..4b815abbf9913075885ee60f4d9ad49d /* unregisters the driver also if no more ports are left */ static void pl011_unregister_port(struct uart_amba_port *uap) -From c044fbc9dfa21daf7d90b419785b837398b0738e Mon Sep 17 00:00:00 2001 +From 775b6bba8e2bf257cf3eb2a6478d04dd7e5a4f74 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 3 Dec 2014 13:23:28 +0200 -Subject: [PATCH 097/134] OF: DT-Overlay configfs interface +Subject: [PATCH 097/140] OF: DT-Overlay configfs interface This is a port of Pantelis Antoniou's v3 port that makes use of the new upstreamed configfs support for binary attributes. @@ -111144,10 +111144,10 @@ index 0000000000000000000000000000000000000000..0037e6868a6cda8706c88194c6a4454b +} +late_initcall(of_cfs_init); -From e812e680a086069527f627c7e37594c945f39971 Mon Sep 17 00:00:00 2001 +From ccf9d17ab87c0aa8740d1534f9a936389540e74a Mon Sep 17 00:00:00 2001 From: Cheong2K Date: Fri, 26 Feb 2016 18:20:10 +0800 -Subject: [PATCH 098/134] brcm: adds support for BCM43341 wifi +Subject: [PATCH 098/140] brcm: adds support for BCM43341 wifi brcmfmac: Disable power management @@ -111193,10 +111193,10 @@ Signed-off-by: Phil Elwell 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -index 7e689c86d56576cf96ca755b16107216470fccdf..508cab2d0817914d454958f92167d350c74d9a5d 100644 +index f27d6fe4d5c0ef9af4e5f14e45c8abb4cf94d901..2145343c18c91f6a43543eb42ca7bbc7a37f14b5 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -2821,6 +2821,8 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev, +@@ -2810,6 +2810,8 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev, * preference in cfg struct to apply this to * FW later while initializing the dongle */ @@ -111205,7 +111205,7 @@ index 7e689c86d56576cf96ca755b16107216470fccdf..508cab2d0817914d454958f92167d350 cfg->pwr_save = enabled; if (!check_vif_up(ifp->vif)) { -@@ -6851,12 +6853,18 @@ static s32 brcmf_translate_country_code(struct brcmf_pub *drvr, char alpha2[2], +@@ -6852,12 +6854,18 @@ static s32 brcmf_translate_country_code(struct brcmf_pub *drvr, char alpha2[2], struct brcmfmac_pd_cc *country_codes; struct brcmfmac_pd_cc_entry *cc; s32 found_index; @@ -111226,7 +111226,7 @@ index 7e689c86d56576cf96ca755b16107216470fccdf..508cab2d0817914d454958f92167d350 } if ((alpha2[0] == ccreq->country_abbrev[0]) && -@@ -6880,10 +6888,14 @@ static s32 brcmf_translate_country_code(struct brcmf_pub *drvr, char alpha2[2], +@@ -6881,10 +6889,14 @@ static s32 brcmf_translate_country_code(struct brcmf_pub *drvr, char alpha2[2], brcmf_dbg(TRACE, "No country code match found\n"); return -EINVAL; } @@ -111279,10 +111279,10 @@ index f3556122c6ace17c419e13023057861957a507fa..f8d4647016a1cde3d51dd43da07a46ce BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43362_CHIP_ID, 0xFFFFFFFE, 43362), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4339_CHIP_ID, 0xFFFFFFFF, 4339), -From 70e8f0458e70e170d24d5c9f7b5d705fa84cdbe7 Mon Sep 17 00:00:00 2001 +From 73961925dc0b241f5118707237772f00d03dc1c9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 17 Feb 2017 15:26:13 +0000 -Subject: [PATCH 099/134] brcmfmac: Mute expected startup 'errors' +Subject: [PATCH 099/140] brcmfmac: Mute expected startup 'errors' The brcmfmac WiFi driver always complains about the '00' country code. Modify the driver to ignore '00' silently. @@ -111293,10 +111293,10 @@ Signed-off-by: Phil Elwell 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -index 508cab2d0817914d454958f92167d350c74d9a5d..987b1f5b999b0ecb68b6ce741b8e3ddbfab2bcc0 100644 +index 2145343c18c91f6a43543eb42ca7bbc7a37f14b5..0f7b4e6b5ee3485806cd93873f00af347613cdc8 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -6919,6 +6919,8 @@ static void brcmf_cfg80211_reg_notifier(struct wiphy *wiphy, +@@ -6920,6 +6920,8 @@ static void brcmf_cfg80211_reg_notifier(struct wiphy *wiphy, /* ignore non-ISO3166 country codes */ for (i = 0; i < sizeof(req->alpha2); i++) if (req->alpha2[i] < 'A' || req->alpha2[i] > 'Z') { @@ -111306,10 +111306,10 @@ index 508cab2d0817914d454958f92167d350c74d9a5d..987b1f5b999b0ecb68b6ce741b8e3ddb req->alpha2[0], req->alpha2[1]); return; -From b216694e710dafcab4f31951f5e598b07b573c6a Mon Sep 17 00:00:00 2001 +From afd7b2d7e39d1712bf9da1ce86aaa0b261866cc0 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Dec 2015 13:37:07 +0000 -Subject: [PATCH 100/134] hci_h5: Don't send conf_req when ACTIVE +Subject: [PATCH 100/140] hci_h5: Don't send conf_req when ACTIVE Without this patch, a modem and kernel can continuously bombard each other with conf_req and conf_rsp messages, in a demented game of tag. @@ -111332,10 +111332,10 @@ index c0e4e26dc30d7c3c6a771b7b86df88c8cf763646..7308287259eedcaf229f8a496a0e3826 if (H5_HDR_LEN(hdr) > 2) h5->tx_win = (data[2] & 0x07); -From 867c7a2636e9facfb3048aed4d839947f67a0cb2 Mon Sep 17 00:00:00 2001 +From 58c09ea42879034082a369944349310c260a0505 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 13 Apr 2015 17:16:29 +0100 -Subject: [PATCH 101/134] config: Add default configs +Subject: [PATCH 101/140] config: Add default configs --- arch/arm/configs/bcm2709_defconfig | 1326 +++++++++++++++++++++++++++++++++++ @@ -114014,10 +114014,10 @@ index 0000000000000000000000000000000000000000..e0dd8723047ff488e81a03ef42fdbc68 +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -From a3366618fb47ab7db91963f7f169741ac2d7fb56 Mon Sep 17 00:00:00 2001 +From 52692e6fb51071aba67a21dfed7ef26b936b1f5e Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Wed, 24 Aug 2016 03:35:56 -0700 -Subject: [PATCH 102/134] Add arm64 configuration and device tree differences. +Subject: [PATCH 102/140] Add arm64 configuration and device tree differences. Disable MMC_BCM2835_SDHOST and MMC_BCM2835 since these drivers are crashing at the moment. @@ -115431,10 +115431,10 @@ index 0000000000000000000000000000000000000000..e6b09fafa27eed2b762e3d53b55041f7 +CONFIG_LIBCRC32C=y +CONFIG_BCM2835_VCHIQ=n -From 00829c6aa03328e4466db60a8dced522bd8b500a Mon Sep 17 00:00:00 2001 +From 5e6067a57caafa51959926d333bcacf178712847 Mon Sep 17 00:00:00 2001 From: Electron752 Date: Thu, 12 Jan 2017 07:07:08 -0800 -Subject: [PATCH 103/134] ARM64: Make it work again on 4.9 (#1790) +Subject: [PATCH 103/140] ARM64: Make it work again on 4.9 (#1790) * Invoke the dtc compiler with the same options used in arm mode. * ARM64 now uses the bcm2835 platform just like ARM32. @@ -115846,10 +115846,10 @@ index e6b09fafa27eed2b762e3d53b55041f793683d27..c7e891d72969a388d9b135a36dbfc9c9 CONFIG_LIBCRC32C=y -CONFIG_BCM2835_VCHIQ=n -From bfe91c9caf3a61b82fa84dd1d149581232c44a28 Mon Sep 17 00:00:00 2001 +From a58835766a9c4e97a6c772acad04add80c41d2de Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Thu, 12 Jan 2017 19:10:07 -0800 -Subject: [PATCH 104/134] ARM64: Enable HDMI audio and vc04_services in +Subject: [PATCH 104/140] ARM64: Enable HDMI audio and vc04_services in bcmrpi3_defconfig Signed-off-by: Michael Zoran @@ -115878,10 +115878,10 @@ index c7e891d72969a388d9b135a36dbfc9c9cb609bf8..4b90f9b64abe9f089ba56b13d5a00de3 CONFIG_BCM2835_MBOX=y # CONFIG_IOMMU_SUPPORT is not set -From ea99c7aea8340d05dd7fcf89ab5456ffd65c1245 Mon Sep 17 00:00:00 2001 +From bfb1c145e90669e32a6096f18e1a91d207096aed Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Thu, 12 Jan 2017 19:14:03 -0800 -Subject: [PATCH 105/134] ARM64: Run bcmrpi3_defconfig through savedefconfig. +Subject: [PATCH 105/140] ARM64: Run bcmrpi3_defconfig through savedefconfig. Signed-off-by: Michael Zoran --- @@ -115926,10 +115926,10 @@ index 4b90f9b64abe9f089ba56b13d5a00de33343bfb9..dac962ca1634662ce7d966f1ffb53b5b CONFIG_FB_TFT_AGM1264K_FL=m CONFIG_FB_TFT_BD663474=m -From e7cffc7f349dec36b78ec335658458bee7fbeac1 Mon Sep 17 00:00:00 2001 +From 501721a584fac6afc8f6dddbb9459bec0e3c6975 Mon Sep 17 00:00:00 2001 From: Electron752 Date: Sat, 14 Jan 2017 02:54:26 -0800 -Subject: [PATCH 106/134] ARM64: Enable Kernel Address Space Randomization +Subject: [PATCH 106/140] ARM64: Enable Kernel Address Space Randomization (#1792) Randomization allows the mapping between virtual addresses and physical @@ -115961,10 +115961,10 @@ index dac962ca1634662ce7d966f1ffb53b5bfa27c506..aae33b4b3c3e736ea7cd3ca242158ad6 CONFIG_BINFMT_MISC=y CONFIG_COMPAT=y -From 1ed6812fb12fbe39e40e2e8fb8db57ad87472e02 Mon Sep 17 00:00:00 2001 +From f745912853b2650e4599a184bda3e77af92beeb4 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sun, 15 Jan 2017 07:31:59 -0800 -Subject: [PATCH 107/134] ARM64: Enable RTL8187/RTL8192CU wifi in build config +Subject: [PATCH 107/140] ARM64: Enable RTL8187/RTL8192CU wifi in build config These drivers build now, so they can be enabled back in the build configuration just like they are for @@ -115989,10 +115989,10 @@ index aae33b4b3c3e736ea7cd3ca242158ad6ba558aff..b7d762df19b85e369a32cd823dfd0621 CONFIG_ZD1211RW=m CONFIG_MAC80211_HWSIM=m -From 3c8121973a6679759c2fd3bc4712fb819a07c9a9 Mon Sep 17 00:00:00 2001 +From 356a07a55d720520a31fe07517a4056b3458343e Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:33:51 -0800 -Subject: [PATCH 108/134] ARM64/DWC_OTG: Port dwc_otg driver to ARM64 +Subject: [PATCH 108/140] ARM64/DWC_OTG: Port dwc_otg driver to ARM64 In ARM64, the FIQ mechanism used by this driver is not current implemented. As a workaround, reqular IRQ is used instead @@ -116335,10 +116335,10 @@ index 6b2c7d0c93f36a63863ff4b0ecc1f3eab77e058b..d7b700ff17821ad1944e36721fe6b2db /** The OS page size */ #define DWC_OS_PAGE_SIZE PAGE_SIZE -From 04d5ac9424fea40dc3e6293525a23ce86240b1e0 Mon Sep 17 00:00:00 2001 +From a001d835cd9fed5d966f431503535440642c8bf7 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:43:57 -0800 -Subject: [PATCH 109/134] ARM64: Round-Robin dispatch IRQs between CPUs. +Subject: [PATCH 109/140] ARM64: Round-Robin dispatch IRQs between CPUs. IRQ-CPU mapping is round robined on ARM64 to increase concurrency and allow multiple interrupts to be serviced @@ -116412,10 +116412,10 @@ index bee4d2d2ebacc3233423bb9d825e076b9f52fccd..014f13f89eb896f5cfc75ed9891787d0 .name = "bcm2836-gpu", .irq_mask = bcm2836_arm_irqchip_mask_gpu_irq, -From 697787665effa912fa6c2a5f6cfc4447ccea7b3a Mon Sep 17 00:00:00 2001 +From d0b6f242050d6d1fe2deba49d5f456d603d08bee Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:45:03 -0800 -Subject: [PATCH 110/134] ARM64: Enable DWC_OTG Driver In ARM64 Build +Subject: [PATCH 110/140] ARM64: Enable DWC_OTG Driver In ARM64 Build Config(bcmrpi3_defconfig) Signed-off-by: Michael Zoran @@ -116436,10 +116436,10 @@ index b7d762df19b85e369a32cd823dfd062145bdefa7..4d85c231c5ea0244e1b05fb4a5e3c8fd CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE_REALTEK=m -From 81e7e17fd5b494b85d6b3e7ecc52834a652da8f3 Mon Sep 17 00:00:00 2001 +From 69a3ca6d91532168323592b97805c860b194a368 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 11 Feb 2017 01:18:31 -0800 -Subject: [PATCH 111/134] ARM64: Force hardware emulation of deprecated +Subject: [PATCH 111/140] ARM64: Force hardware emulation of deprecated instructions. --- @@ -116447,7 +116447,7 @@ Subject: [PATCH 111/134] ARM64: Force hardware emulation of deprecated 1 file changed, 5 insertions(+) diff --git a/arch/arm64/kernel/armv8_deprecated.c b/arch/arm64/kernel/armv8_deprecated.c -index f0e6d717885b1fcf3b22f64c10c38f19c25f809d..0cb830d30fb6d2bd26ab572efe893649c7a28d3c 100644 +index d06fbe4cd38d7423c900aff64b0e728f995478d3..877b7c90f9555203d5d55d739359a256f16982ad 100644 --- a/arch/arm64/kernel/armv8_deprecated.c +++ b/arch/arm64/kernel/armv8_deprecated.c @@ -183,10 +183,15 @@ static void __init register_insn_emulation(struct insn_emulation_ops *ops) @@ -116467,10 +116467,10 @@ index f0e6d717885b1fcf3b22f64c10c38f19c25f809d..0cb830d30fb6d2bd26ab572efe893649 case INSN_OBSOLETE: insn->current_mode = INSN_UNDEF; -From 3a1b225d01c66d88545067d9971cd9fbcfe755ed Mon Sep 17 00:00:00 2001 +From c58958548bd48497f205f951d42a7bdc02f8128f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 10 Feb 2017 17:57:08 -0800 -Subject: [PATCH 112/134] build/arm64: Add rules for .dtbo files for dts +Subject: [PATCH 112/140] build/arm64: Add rules for .dtbo files for dts overlays We now create overlays as .dtbo files. @@ -116495,10 +116495,10 @@ index 9b41f1e3b1a039cd45fe842e10abff0181186fdf..dc2859b8eed168ed52e95c503e7a5ce3 dtbs: prepare scripts -From 80bfd3c31189b0e86ff8bf67725a2015abb65484 Mon Sep 17 00:00:00 2001 +From 918d12dc6e3643f5ad2f4bc2846314cce3348cc5 Mon Sep 17 00:00:00 2001 From: Bilal Amarni Date: Wed, 24 May 2017 10:52:50 +0200 -Subject: [PATCH 113/134] enable drivers for GPIO expander and vcio +Subject: [PATCH 113/140] enable drivers for GPIO expander and vcio --- arch/arm64/configs/bcmrpi3_defconfig | 3 +++ @@ -116526,10 +116526,10 @@ index 4d85c231c5ea0244e1b05fb4a5e3c8fd3e651ddf..9dcb58a519d041fadae99c81a7bda621 CONFIG_GPIO_ARIZONA=m CONFIG_GPIO_STMPE=y -From b9d4606c698abfa638dff25fddf02b6f0faecfcd Mon Sep 17 00:00:00 2001 +From 1138cc25b0edc65efd20cbfd12aa6e4e96b972ad Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 24 Feb 2015 13:40:50 +0000 -Subject: [PATCH 114/134] pinctrl-bcm2835: Fix interrupt handling for GPIOs +Subject: [PATCH 114/140] pinctrl-bcm2835: Fix interrupt handling for GPIOs 28-31 and 46-53 Contrary to the documentation, the BCM2835 GPIO controller actually has @@ -116562,10 +116562,10 @@ index a9d480df32562defbf8be0faf0a39bfe06ff71f9..18c92bae3b2e7e9f8208ca0d4487b08b .suppress_bind_attrs = true, }, -From 8d06678ce2edc8277eb48d6aca7ab534d65c4a0c Mon Sep 17 00:00:00 2001 +From 78a515655cc24a391bc753eeb6e9e42b7a1d6001 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 16:34:46 +0000 -Subject: [PATCH 115/134] bcm2835-aux: Add aux interrupt controller +Subject: [PATCH 115/140] bcm2835-aux: Add aux interrupt controller The AUX block has a shared interrupt line with a register indicating which devices have active IRQs. Expose this as a nested interrupt @@ -116729,10 +116729,10 @@ index bd750cf2238d61489811e7d7bd3b5f9950ed53c8..41e0702fae4692221980b0d02aed1ba6 BCM2835_AUX_CLOCK_COUNT, GFP_KERNEL); if (!onecell) -From 36dca47d5423ec6bd484ebc06608c7d0c7fe4b11 Mon Sep 17 00:00:00 2001 +From 5f3b8b992711a8e3bbce0d3e75055655b0baaf22 Mon Sep 17 00:00:00 2001 From: Yasunari Takiguchi Date: Fri, 14 Apr 2017 10:43:57 +0100 -Subject: [PATCH 116/134] This is the driver for Sony CXD2880 DVB-T2/T tuner + +Subject: [PATCH 116/140] This is the driver for Sony CXD2880 DVB-T2/T tuner + demodulator. It includes the CXD2880 driver and the CXD2880 SPI adapter. The current CXD2880 driver version is 1.4.1 - 1.0.1 released on April 13, 2017. @@ -132864,10 +132864,10 @@ index 0000000000000000000000000000000000000000..82e122349055be817eb74ed5bbcd7560 +MODULE_AUTHOR("Sony Semiconductor Solutions Corporation"); +MODULE_LICENSE("GPL v2"); -From d22de7d2b9226b134e7fa4e543b31c037448b420 Mon Sep 17 00:00:00 2001 +From 89964c12ef76826e1660d11cbf40efc71b54a8de Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:18:09 +0100 -Subject: [PATCH 117/134] raspberrypi-firmware: Define the MBOX channel in the +Subject: [PATCH 117/140] raspberrypi-firmware: Define the MBOX channel in the header. Signed-off-by: Eric Anholt @@ -132889,10 +132889,10 @@ index c819c21b0158a59c1308882e5a40e3f3fe73cbdf..de2a3dcd562beb752266eaf0070e5586 enum rpi_firmware_property_status { -From 7cf1207f6f8fc7175e4a17462ddf6edbc5a7df55 Mon Sep 17 00:00:00 2001 +From 14d34e161f528106d9ad080515eede60388b8a2b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:16:19 +0100 -Subject: [PATCH 118/134] raspberrypi-firmware: Export the general transaction +Subject: [PATCH 118/140] raspberrypi-firmware: Export the general transaction function. The vc4-firmware-kms module is going to be doing the MBOX FB call. @@ -132936,10 +132936,10 @@ index de2a3dcd562beb752266eaf0070e55861d553f5f..dc7fd58afd5dddebf9b17065bb069a1d #endif /* __SOC_RASPBERRY_FIRMWARE_H__ */ -From d753dbf9f0303a0c3df72d07ecd8cac8c4bb6559 Mon Sep 17 00:00:00 2001 +From 2da4d8717d305d42889b1affc758120434b6d3d9 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 08:39:33 +0100 -Subject: [PATCH 119/134] drm/vc4: Add a mode for using the closed firmware for +Subject: [PATCH 119/140] drm/vc4: Add a mode for using the closed firmware for display. Signed-off-by: Eric Anholt @@ -133711,10 +133711,10 @@ index 0000000000000000000000000000000000000000..7dd233eed677c1689492ab95bc864753 + }, +}; -From 5daa9867034344f143ab5ba57949d80d71057f9f Mon Sep 17 00:00:00 2001 +From f1040b49dd5045284ee7192162b890718771e3e5 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Feb 2017 17:09:18 -0800 -Subject: [PATCH 120/134] drm/vc4: Name the primary and cursor planes in fkms. +Subject: [PATCH 120/140] drm/vc4: Name the primary and cursor planes in fkms. This makes debugging nicer, compared to trying to remember what the IDs are. @@ -133738,10 +133738,10 @@ index 7dd233eed677c1689492ab95bc86475330d2d63b..e6097046fb25361bc61d657083d95b63 if (type == DRM_PLANE_TYPE_PRIMARY) { vc4_plane->fbinfo = -From 4bc944a2adfaf540f80c46613e436d1b9224285d Mon Sep 17 00:00:00 2001 +From 98ce9c60b4f0bd3bea4be160a526ae23871a3861 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Feb 2017 17:10:09 -0800 -Subject: [PATCH 121/134] drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of +Subject: [PATCH 121/140] drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of fkms. Trying to debug weston on fkms involved figuring out what calls I was @@ -133811,10 +133811,10 @@ index e6097046fb25361bc61d657083d95b634232aabc..72d0b9cffe3d2997d69040c46f4aee11 RPI_FIRMWARE_SET_CURSOR_STATE, &packet_state, -From 5d1e576c0054b57ccf6b3dff64dca417aea79e4c Mon Sep 17 00:00:00 2001 +From 832128c3dbbee984fd3a328cd8e342af8f26f7b1 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 2 Feb 2017 09:42:18 -0800 -Subject: [PATCH 122/134] drm/vc4: Fix sending of page flip completion events +Subject: [PATCH 122/140] drm/vc4: Fix sending of page flip completion events in FKMS mode. In the rewrite of vc4_crtc.c for fkms, I dropped the part of the @@ -133856,10 +133856,10 @@ index 72d0b9cffe3d2997d69040c46f4aee11e22aa213..185f9bd3c1b2d47d0c1fc5293db4199b static void vc4_crtc_handle_page_flip(struct vc4_crtc *vc4_crtc) -From 36737adea32ccd631d007709bb4c5830be5acef7 Mon Sep 17 00:00:00 2001 +From 84cea6b060a32d005d61d4d555a87a48ec722547 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 18 Apr 2017 21:43:46 +0100 -Subject: [PATCH 123/134] vc4_fkms: Apply firmware overscan offset to hardware +Subject: [PATCH 123/140] vc4_fkms: Apply firmware overscan offset to hardware cursor --- @@ -133916,10 +133916,10 @@ index 185f9bd3c1b2d47d0c1fc5293db4199bd8963023..072f377b7423ee603d73ace2bf6d620f return 0; -From d8521a886b7be6e4bc78d20dab18feabeac2f1d8 Mon Sep 17 00:00:00 2001 +From fd8ac75172f2c4f3c3ffc00a9dee82e395753039 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 11:34:26 +0200 -Subject: [PATCH 124/134] ASoC: bcm2835: Add support for TDM modes +Subject: [PATCH 124/140] ASoC: bcm2835: Add support for TDM modes bcm2835 supports arbitrary positioning of channel data within a frame and thus is capable of supporting TDM modes. Since @@ -134321,10 +134321,10 @@ index 56df7d8a43d0aac055a91b0d24aca8e1b4e308e4..dcacf7f83c9371df539a788ea33fedcf dev->dev = &pdev->dev; dev_set_drvdata(&pdev->dev, dev); -From b5fb76aab3d2821f19ccfcfd7c68139d04c049a2 Mon Sep 17 00:00:00 2001 +From 5f426708cac0c7c6cd9b235c41b67efc0119c3fd Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 15:30:50 +0200 -Subject: [PATCH 125/134] ASoC: bcm2835: Support left/right justified and DSP +Subject: [PATCH 125/140] ASoC: bcm2835: Support left/right justified and DSP modes DSP modes and left/right justified modes can be supported @@ -134570,10 +134570,10 @@ index dcacf7f83c9371df539a788ea33fedcf97d64690..3a706fda4f39e42efbe12f19d87af9b1 } -From b233dbcfff9c912ca95a7c31fe6b4a4e88f07518 Mon Sep 17 00:00:00 2001 +From 0e3b657011ab7be605f2ffe0599a613bd55576a4 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 16:19:54 +0200 -Subject: [PATCH 126/134] ASoC: bcm2835: Support additional samplerates up to +Subject: [PATCH 126/140] ASoC: bcm2835: Support additional samplerates up to 384kHz Sample rates are only restricted by the capabilities of the @@ -134616,10 +134616,10 @@ index 3a706fda4f39e42efbe12f19d87af9b100a348a5..43f5715a0d5dda851731ecf7ff27e76c | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE -From d0b829bac9033d748bc6378c170af2929911d728 Mon Sep 17 00:00:00 2001 +From 2dc5c8752afdc76d3bd039510a267aa005f0e589 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 16:24:57 +0200 -Subject: [PATCH 127/134] ASoC: bcm2835: Enforce full symmetry +Subject: [PATCH 127/140] ASoC: bcm2835: Enforce full symmetry bcm2835's configuration registers can't be changed when a stream is running, which means asymmetric configurations aren't supported. @@ -134655,10 +134655,10 @@ index 43f5715a0d5dda851731ecf7ff27e76c48fb6e57..2e449d7173fcecbcd647f90a26bd58b6 static bool bcm2835_i2s_volatile_reg(struct device *dev, unsigned int reg) -From 2ac96d84b6f20bcafab465c8f52284016c08a9f5 Mon Sep 17 00:00:00 2001 +From b6efd06f333e14d1f8c48d9a9aca39cb75f4b882 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Mon, 5 Jun 2017 16:40:38 +0100 -Subject: [PATCH 128/134] dma-bcm2708: Fix module compilation of +Subject: [PATCH 128/140] dma-bcm2708: Fix module compilation of CONFIG_DMA_BCM2708 bcm2708-dmaengine.c defines functions like bcm_dma_start which are @@ -134701,10 +134701,10 @@ index c5bfff2765be4606077e6c8af73040ec13ee8974..6ca874d332a8bc666b1c9576ac51f479 #endif /* _PLAT_BCM2708_DMA_H */ -From 637430a95c1b6bd60261b6c8b823d1530c8b1334 Mon Sep 17 00:00:00 2001 +From b22199c4589523501a080d57fe33ce3e129f1531 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 25 Aug 2017 19:18:13 +0100 -Subject: [PATCH 129/134] cache: export clean and invalidate +Subject: [PATCH 129/140] cache: export clean and invalidate --- arch/arm/mm/cache-v6.S | 4 ++-- @@ -134756,10 +134756,10 @@ index de78109d002db1a5e7c94a6c1bc8bb94161d07b8..4c850aa3af2b2439fced4e130441329a sub r3, r2, #1 bic r0, r0, r3 -From 1ca3e87f67c72fa17711ae82b311c2af6a555578 Mon Sep 17 00:00:00 2001 +From ef18bccaf8f722ce25e5cd2bf5d9093abac997c3 Mon Sep 17 00:00:00 2001 From: Dan Pasanen Date: Wed, 20 Sep 2017 10:17:41 -0500 -Subject: [PATCH 130/134] vcsm: fix multi-platform build +Subject: [PATCH 130/140] vcsm: fix multi-platform build --- drivers/char/broadcom/vc_sm/vmcs_sm.c | 2 ++ @@ -134786,10 +134786,10 @@ index 034ae2f27f870621af9f49453501f1cde051f32a..b7814d67500b98fcd6f376d526a3d4a4 { 0, -From ae5eba9a876661684adf7e837cd4286f4b60fae3 Mon Sep 17 00:00:00 2001 +From 7a99631cfabb45b3989be013975dcb69eab868e8 Mon Sep 17 00:00:00 2001 From: Dan Pasanen Date: Thu, 21 Sep 2017 09:55:42 -0500 -Subject: [PATCH 131/134] arm: partially revert +Subject: [PATCH 131/140] arm: partially revert 702b94bff3c50542a6e4ab9a4f4cef093262fe65 * Re-expose some dmi APIs for use in VCSM @@ -134894,10 +134894,10 @@ index 054b491ff7649ca067ff821770aec80a4da42102..70e8b7d3443467ae9595924f1a9d043b EXPORT_SYMBOL(cpu_cache); #endif -From b33d23ca86c36ccfb38124646d22dd2b1633451a Mon Sep 17 00:00:00 2001 +From c704414b4ffa21cbef4af1b91c75dc6d37ca343c Mon Sep 17 00:00:00 2001 From: Dan Pasanen Date: Thu, 21 Sep 2017 09:57:44 -0500 -Subject: [PATCH 132/134] vcsm: add macros for cache functions +Subject: [PATCH 132/140] vcsm: add macros for cache functions --- drivers/char/broadcom/vc_sm/vc_sm_knl.h | 5 +++++ @@ -134950,10 +134950,10 @@ index b7814d67500b98fcd6f376d526a3d4a4b84fd152..32763bd01e2e3831778fbcd1066df3cb } } -From aad9c1c8f3dc256490c19a8ca405152a43663c86 Mon Sep 17 00:00:00 2001 +From 9f042caa5460f06fafb87ce7d2630d3c01be061b Mon Sep 17 00:00:00 2001 From: Dan Pasanen Date: Thu, 21 Sep 2017 07:41:02 -0500 -Subject: [PATCH 133/134] vcsm: use dma APIs for cache functions +Subject: [PATCH 133/140] vcsm: use dma APIs for cache functions * Will handle multi-platform builds --- @@ -135024,10 +135024,10 @@ index 32763bd01e2e3831778fbcd1066df3cbf582235d..cfa4ff747de2a96e03dab995aa54fc80 if ((op->invalidate_mode & ~3) != 0) { ret = -EINVAL; -From 2769366db52f2c3ed2538b92e2dc8512a898d819 Mon Sep 17 00:00:00 2001 +From 81d085df96d1f462c73e1a36bd82f8abd9fdb848 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 29 Sep 2017 16:15:01 +0100 -Subject: [PATCH 134/134] vcsm: Fix up macros to avoid breaking numbers used by +Subject: [PATCH 134/140] vcsm: Fix up macros to avoid breaking numbers used by existing apps --- @@ -135049,3 +135049,644 @@ index e50fd8eaecef7a3c8451c040ffc3888cc37e28fc..4f120421c2d11f7ae46752c38b073a4d /* Allocate a shared memory handle and block. */ int vc_sm_alloc(struct vc_sm_alloc_t *alloc, int *handle); + +From 549e3c459e47777dad7bd5c07809088ba3460995 Mon Sep 17 00:00:00 2001 +From: Chung-Hsien Hsu +Date: Sun, 14 May 2017 20:11:05 -0500 +Subject: [PATCH 135/140] brcmfmac: add CLM download support + +Future firmwares will be provided with minimal built-in CLM - the +NULL region (#n/0) becomes the initial country. It cannot be changed +until downloading a CLM blob file with some other regions. This patch +adds support for CLM blob file download. The blob file should be named +as firmware but with extension .clm_blob (e.g. +brcmfmac43430-sdio.clm_blob) and be placed in /lib/firmware/brcm/. + +Change-Id: I0901a4b38592fe28d0adeb8f3e2402292842f169 + +Signed-off-by: Chung-Hsien Hsu +--- + .../net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 13 ++ + .../wireless/broadcom/brcm80211/brcmfmac/common.c | 175 +++++++++++++++++++++ + .../broadcom/brcm80211/brcmfmac/fwil_types.h | 27 ++++ + .../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 19 +++ + .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 19 +++ + .../net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 18 +++ + 6 files changed, 271 insertions(+) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h +index 163ddc49f95117774f03184b9f0679bd82d086d2..fb60a7c66e2ce70f5b1da75851cdb74e06833760 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h +@@ -71,6 +71,7 @@ struct brcmf_bus_dcmd { + * @wowl_config: specify if dongle is configured for wowl when going to suspend + * @get_ramsize: obtain size of device memory. + * @get_memdump: obtain device memory dump in provided buffer. ++ * @get_fwname: obtain firmware name. + * + * This structure provides an abstract interface towards the + * bus specific driver. For control messages to common driver +@@ -87,6 +88,8 @@ struct brcmf_bus_ops { + void (*wowl_config)(struct device *dev, bool enabled); + size_t (*get_ramsize)(struct device *dev); + int (*get_memdump)(struct device *dev, void *data, size_t len); ++ int (*get_fwname)(struct device *dev, uint chip, uint chiprev, ++ unsigned char *fw_name); + }; + + +@@ -224,6 +227,16 @@ int brcmf_bus_get_memdump(struct brcmf_bus *bus, void *data, size_t len) + return bus->ops->get_memdump(bus->dev, data, len); + } + ++static inline ++int brcmf_bus_get_fwname(struct brcmf_bus *bus, uint chip, uint chiprev, ++ unsigned char *fw_name) ++{ ++ if (!bus->ops->get_fwname) ++ return -EOPNOTSUPP; ++ ++ return bus->ops->get_fwname(bus->dev, chip, chiprev, fw_name); ++} ++ + /* + * interface functions from common layer + */ +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +index df138305217384de2359313bc7d005285388e78e..f0309e039592ba6e388084a13f052c03f99cf1ef 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + #include + #include + #include "core.h" +@@ -28,6 +29,7 @@ + #include "tracepoint.h" + #include "common.h" + #include "of.h" ++#include "firmware.h" + + MODULE_AUTHOR("Broadcom Corporation"); + MODULE_DESCRIPTION("Broadcom 802.11 wireless LAN fullmac driver."); +@@ -104,15 +106,170 @@ void brcmf_c_set_joinpref_default(struct brcmf_if *ifp) + brcmf_err("Set join_pref error (%d)\n", err); + } + ++int brcmf_c_download_2_dongle(struct brcmf_if *ifp, char *dcmd, u16 flag, ++ u16 dload_type, char *dload_buf, u32 len) ++{ ++ struct brcmf_dload_data_le *dload_ptr; ++ u32 dload_data_offset; ++ u16 flags; ++ s32 err; ++ ++ dload_ptr = (struct brcmf_dload_data_le *)dload_buf; ++ dload_data_offset = offsetof(struct brcmf_dload_data_le, data); ++ flags = flag | (DLOAD_HANDLER_VER << DLOAD_FLAG_VER_SHIFT); ++ ++ dload_ptr->flag = cpu_to_le16(flags); ++ dload_ptr->dload_type = cpu_to_le16(dload_type); ++ dload_ptr->len = cpu_to_le32(len - dload_data_offset); ++ dload_ptr->crc = cpu_to_le32(0); ++ len = len + 8 - (len % 8); ++ ++ err = brcmf_fil_iovar_data_set(ifp, dcmd, (void *)dload_buf, len); ++ ++ return err; ++} ++ ++int brcmf_c_get_clm_name(struct brcmf_if *ifp, u8 *clm_name) ++{ ++ struct brcmf_rev_info_le revinfo; ++ struct brcmf_bus *bus = ifp->drvr->bus_if; ++ u8 fw_name[BRCMF_FW_NAME_LEN]; ++ u8 *ptr; ++ size_t len; ++ u32 chipnum; ++ u32 chiprev; ++ s32 err; ++ ++ err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_REVINFO, &revinfo, ++ sizeof(revinfo)); ++ if (err < 0) { ++ brcmf_err("retrieving revision info failed (%d)\n", err); ++ goto done; ++ } ++ ++ chipnum = le32_to_cpu(revinfo.chipnum); ++ chiprev = le32_to_cpu(revinfo.chiprev); ++ ++ memset(fw_name, 0, BRCMF_FW_NAME_LEN); ++ err = brcmf_bus_get_fwname(bus, chipnum, chiprev, fw_name); ++ if (err) { ++ brcmf_err("get firmware name failed (%d)\n", err); ++ goto done; ++ } ++ ++ /* generate CLM blob file name */ ++ ptr = strrchr(fw_name, '.'); ++ len = ptr - fw_name + 1; ++ if (len + strlen(".clm_blob") > BRCMF_FW_NAME_LEN) { ++ err = -E2BIG; ++ } else { ++ strlcpy(clm_name, fw_name, len); ++ strlcat(clm_name, ".clm_blob", BRCMF_FW_NAME_LEN); ++ } ++done: ++ return err; ++} ++ ++int brcmf_c_process_clm_blob(struct brcmf_if *ifp) ++{ ++ struct device *dev = ifp->drvr->bus_if->dev; ++ const struct firmware *clm = NULL; ++ u8 buf[BRCMF_DCMD_SMLEN]; ++ u8 clm_name[BRCMF_FW_NAME_LEN]; ++ u32 data_offset; ++ u32 size2alloc; ++ u8 *chunk_buf; ++ u32 chunk_len; ++ u32 datalen; ++ u32 cumulative_len = 0; ++ u16 dl_flag = DL_BEGIN; ++ s32 err; ++ ++ brcmf_dbg(INFO, "Enter\n"); ++ ++ memset(clm_name, 0, BRCMF_FW_NAME_LEN); ++ err = brcmf_c_get_clm_name(ifp, clm_name); ++ if (err) { ++ brcmf_err("get CLM blob file name failed (%d)\n", err); ++ return err; ++ } ++ ++ err = request_firmware(&clm, clm_name, dev); ++ if (err) { ++ if (err == -ENOENT) ++ return 0; ++ brcmf_err("request CLM blob file failed (%d)\n", err); ++ return err; ++ } ++ ++ datalen = clm->size; ++ data_offset = offsetof(struct brcmf_dload_data_le, data); ++ size2alloc = data_offset + MAX_CHUNK_LEN; ++ ++ chunk_buf = kzalloc(size2alloc, GFP_KERNEL); ++ if (!chunk_buf) { ++ err = -ENOMEM; ++ goto done; ++ } ++ ++ do { ++ if (datalen > MAX_CHUNK_LEN) { ++ chunk_len = MAX_CHUNK_LEN; ++ } else { ++ chunk_len = datalen; ++ dl_flag |= DL_END; ++ } ++ ++ memcpy(chunk_buf + data_offset, clm->data + cumulative_len, ++ chunk_len); ++ ++ err = brcmf_c_download_2_dongle(ifp, "clmload", dl_flag, ++ DL_TYPE_CLM, chunk_buf, ++ data_offset + chunk_len); ++ ++ dl_flag &= ~DL_BEGIN; ++ ++ cumulative_len += chunk_len; ++ datalen -= chunk_len; ++ } while ((datalen > 0) && (err == 0)); ++ ++ if (err) { ++ brcmf_err("clmload (%d byte file) failed (%d); ", ++ (u32)clm->size, err); ++ /* Retrieve clmload_status and print */ ++ memset(buf, 0, BRCMF_DCMD_SMLEN); ++ err = brcmf_fil_iovar_data_get(ifp, "clmload_status", buf, ++ BRCMF_DCMD_SMLEN); ++ if (err) ++ brcmf_err("get clmload_status failed (%d)\n", err); ++ else ++ brcmf_err("clmload_status=%d\n", *((int *)buf)); ++ err = -EIO; ++ } ++ ++ kfree(chunk_buf); ++done: ++ release_firmware(clm); ++ return err; ++} ++ + int brcmf_c_preinit_dcmds(struct brcmf_if *ifp) + { + s8 eventmask[BRCMF_EVENTING_MASK_LEN]; + u8 buf[BRCMF_DCMD_SMLEN]; + struct brcmf_rev_info_le revinfo; + struct brcmf_rev_info *ri; ++ char *clmver; + char *ptr; + s32 err; + ++ /* Do any CLM downloading */ ++ err = brcmf_c_process_clm_blob(ifp); ++ if (err < 0) { ++ brcmf_err("download CLM blob file failed, %d\n", err); ++ goto done; ++ } ++ + /* retreive mac address */ + err = brcmf_fil_iovar_data_get(ifp, "cur_etheraddr", ifp->mac_addr, + sizeof(ifp->mac_addr)); +@@ -167,6 +324,24 @@ int brcmf_c_preinit_dcmds(struct brcmf_if *ifp) + ptr = strrchr(buf, ' ') + 1; + strlcpy(ifp->drvr->fwver, ptr, sizeof(ifp->drvr->fwver)); + ++ /* Query for 'clmver' to get CLM version info from firmware */ ++ memset(buf, 0, sizeof(buf)); ++ err = brcmf_fil_iovar_data_get(ifp, "clmver", buf, sizeof(buf)); ++ if (err) { ++ brcmf_err("retrieving clmver failed, %d\n", err); ++ goto done; ++ } else { ++ clmver = (char *)buf; ++ /* Replace all newline/linefeed characters with space ++ * character ++ */ ++ ptr = clmver; ++ while ((ptr = strchr(ptr, '\n')) != NULL) ++ *ptr = ' '; ++ ++ brcmf_err("CLM version = %s\n", clmver); ++ } ++ + /* set mpc */ + err = brcmf_fil_iovar_int_set(ifp, "mpc", 1); + if (err) { +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h +index e0d22fedb2b45932f04a35458f44408804b23d90..b99dc2b760463fb13747473f1126bea6ad094855 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h +@@ -155,6 +155,22 @@ + #define BRCMF_MFP_CAPABLE 1 + #define BRCMF_MFP_REQUIRED 2 + ++/* MAX_CHUNK_LEN is the amount of the clm file we send in each ioctl. ++ * It is relatively small because dongles (FW) have a small maximum size ++ * input payload restriction for ioctls. ++ */ ++#define MAX_CHUNK_LEN 1400 ++ ++#define DLOAD_HANDLER_VER 1 /* Downloader version */ ++#define DLOAD_FLAG_VER_MASK 0xf000 /* Downloader version mask */ ++#define DLOAD_FLAG_VER_SHIFT 12 /* Downloader version shift */ ++ ++#define DL_CRC_NOT_INUSE 0x0001 ++#define DL_BEGIN 0x0002 ++#define DL_END 0x0004 ++ ++#define DL_TYPE_CLM 2 ++ + /* join preference types for join_pref iovar */ + enum brcmf_join_pref_types { + BRCMF_JOIN_PREF_RSSI = 1, +@@ -932,4 +948,15 @@ struct brcmf_gscan_config { + struct brcmf_gscan_bucket_config bucket[1]; + }; + ++/** ++ * struct brcmf_dload_data_le - data passing to firmware for downloading ++ */ ++struct brcmf_dload_data_le { ++ __le16 flag; ++ __le16 dload_type; ++ __le32 len; ++ __le32 crc; ++ u8 data[1]; ++}; ++ + #endif /* FWIL_TYPES_H_ */ +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +index f878706613e679515410e573eb770f1b1a28ef26..b370ee7f52788d779cf6d14e15a5ee4de3fa6c35 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +@@ -1350,6 +1350,24 @@ static int brcmf_pcie_get_memdump(struct device *dev, void *data, size_t len) + return 0; + } + ++static int brcmf_pcie_get_fwname(struct device *dev, u32 chip, u32 chiprev, ++ u8 *fw_name) ++{ ++ struct brcmf_bus *bus_if = dev_get_drvdata(dev); ++ struct brcmf_pciedev *buspub = bus_if->bus_priv.pcie; ++ struct brcmf_pciedev_info *devinfo = buspub->devinfo; ++ int ret = 0; ++ ++ if (devinfo->fw_name[0] != '\0') ++ strlcpy(fw_name, devinfo->fw_name, BRCMF_FW_NAME_LEN); ++ else ++ ret = brcmf_fw_map_chip_to_name(chip, chiprev, ++ brcmf_pcie_fwnames, ++ ARRAY_SIZE(brcmf_pcie_fwnames), ++ fw_name, NULL); ++ ++ return ret; ++} + + static const struct brcmf_bus_ops brcmf_pcie_bus_ops = { + .txdata = brcmf_pcie_tx, +@@ -1359,6 +1377,7 @@ static const struct brcmf_bus_ops brcmf_pcie_bus_ops = { + .wowl_config = brcmf_pcie_wowl_config, + .get_ramsize = brcmf_pcie_get_ramsize, + .get_memdump = brcmf_pcie_get_memdump, ++ .get_fwname = brcmf_pcie_get_fwname, + }; + + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +index f8d4647016a1cde3d51dd43da07a46ce9771fa18..63f7624ed7f4e0783e9835670a14914585d99f0b 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +@@ -3978,6 +3978,24 @@ brcmf_sdio_watchdog(unsigned long data) + } + } + ++static int brcmf_sdio_get_fwname(struct device *dev, u32 chip, u32 chiprev, ++ u8 *fw_name) ++{ ++ struct brcmf_bus *bus_if = dev_get_drvdata(dev); ++ struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio; ++ int ret = 0; ++ ++ if (sdiodev->fw_name[0] != '\0') ++ strlcpy(fw_name, sdiodev->fw_name, BRCMF_FW_NAME_LEN); ++ else ++ ret = brcmf_fw_map_chip_to_name(chip, chiprev, ++ brcmf_sdio_fwnames, ++ ARRAY_SIZE(brcmf_sdio_fwnames), ++ fw_name, NULL); ++ ++ return ret; ++} ++ + static const struct brcmf_bus_ops brcmf_sdio_bus_ops = { + .stop = brcmf_sdio_bus_stop, + .preinit = brcmf_sdio_bus_preinit, +@@ -3988,6 +4006,7 @@ static const struct brcmf_bus_ops brcmf_sdio_bus_ops = { + .wowl_config = brcmf_sdio_wowl_config, + .get_ramsize = brcmf_sdio_bus_get_ramsize, + .get_memdump = brcmf_sdio_bus_get_memdump, ++ .get_fwname = brcmf_sdio_get_fwname, + }; + + static void brcmf_sdio_firmware_callback(struct device *dev, int err, +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c +index 0eea48e73331d57297099266b1725df2be35a565..f00016f804ac98995369c1e68586a86d5bd310d9 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c +@@ -1126,12 +1126,30 @@ static void brcmf_usb_wowl_config(struct device *dev, bool enabled) + device_set_wakeup_enable(devinfo->dev, false); + } + ++static int brcmf_usb_get_fwname(struct device *dev, u32 chip, u32 chiprev, ++ u8 *fw_name) ++{ ++ struct brcmf_usbdev_info *devinfo = brcmf_usb_get_businfo(dev); ++ int ret = 0; ++ ++ if (devinfo->fw_name[0] != '\0') ++ strlcpy(fw_name, devinfo->fw_name, BRCMF_FW_NAME_LEN); ++ else ++ ret = brcmf_fw_map_chip_to_name(chip, chiprev, ++ brcmf_usb_fwnames, ++ ARRAY_SIZE(brcmf_usb_fwnames), ++ fw_name, NULL); ++ ++ return ret; ++} ++ + static const struct brcmf_bus_ops brcmf_usb_bus_ops = { + .txdata = brcmf_usb_tx, + .stop = brcmf_usb_down, + .txctl = brcmf_usb_tx_ctlpkt, + .rxctl = brcmf_usb_rx_ctlpkt, + .wowl_config = brcmf_usb_wowl_config, ++ .get_fwname = brcmf_usb_get_fwname, + }; + + static int brcmf_usb_bus_setup(struct brcmf_usbdev_info *devinfo) + +From 72cbda0085b603109edc6c8500c7a17ad568b7fd Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 6 Oct 2017 13:23:32 +0100 +Subject: [PATCH 136/140] brcmfmac: request_firmware_direct is quieter + +Since we don't have any CLM-capable firmware yet, silence the warning +of its absence by using request_firmware_direct, which should also +be marginally quicker. + +Signed-off-by: Phil Elwell +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +index f0309e039592ba6e388084a13f052c03f99cf1ef..b5889360da96096775db6425337a72156aab6d73 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +@@ -194,7 +194,7 @@ int brcmf_c_process_clm_blob(struct brcmf_if *ifp) + return err; + } + +- err = request_firmware(&clm, clm_name, dev); ++ err = request_firmware_direct(&clm, clm_name, dev); + if (err) { + if (err == -ENOENT) + return 0; + +From d476c9cd8b92b5d24f6e1ac0f049fd22e99d88fa Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 29 Sep 2017 10:32:19 +0100 +Subject: [PATCH 137/140] amba_pl011: Add cts-event-workaround DT property + +The BCM2835 PL011 implementation seems to have a bug that can lead to a +transmission lockup if CTS changes frequently. A workaround was added to +the driver with a vendor-specific flag to enable it, but this flag is +currently not set for ARM implementations. + +Add a "cts-event-workaround" property to Pi DTBs and use the presence +of that property to force the flag to be enabled in the driver. + +See: https://github.com/raspberrypi/linux/issues/1280 + +Signed-off-by: Phil Elwell +--- + Documentation/devicetree/bindings/serial/pl011.txt | 3 +++ + arch/arm/boot/dts/bcm270x.dtsi | 5 +++++ + drivers/tty/serial/amba-pl011.c | 5 +++++ + 3 files changed, 13 insertions(+) + +diff --git a/Documentation/devicetree/bindings/serial/pl011.txt b/Documentation/devicetree/bindings/serial/pl011.txt +index 77863aefe9ef1eafe648b530c1570333aea7940b..8d65b0ec2828b6abb07589407a5126fde6e49a0e 100644 +--- a/Documentation/devicetree/bindings/serial/pl011.txt ++++ b/Documentation/devicetree/bindings/serial/pl011.txt +@@ -35,6 +35,9 @@ Optional properties: + - poll-timeout-ms: + Poll timeout when auto-poll is set, default + 3000ms. ++- cts-event-workaround: ++ Enables the (otherwise vendor-specific) workaround for the ++ CTS-induced TX lockup. + + See also bindings/arm/primecell.txt + +diff --git a/arch/arm/boot/dts/bcm270x.dtsi b/arch/arm/boot/dts/bcm270x.dtsi +index 81914a615c8b011fe7d70a2e14f16491947c49b7..d312c2739624eca57b218b26e272e187012cb7d1 100644 +--- a/arch/arm/boot/dts/bcm270x.dtsi ++++ b/arch/arm/boot/dts/bcm270x.dtsi +@@ -26,6 +26,11 @@ + interrupts = <2 17>, <2 18>; + }; + ++ serial@7e201000 { /* uart0 */ ++ /* Enable CTS bug workaround */ ++ cts-event-workaround; ++ }; ++ + i2s@7e203000 { /* i2s */ + #sound-dai-cells = <0>; + reg = <0x7e203000 0x24>; +diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c +index 4b815abbf9913075885ee60f4d9ad49d89ec96b2..8c6e495b74ca61b8ff8ee79bc6e9d84d572b990a 100644 +--- a/drivers/tty/serial/amba-pl011.c ++++ b/drivers/tty/serial/amba-pl011.c +@@ -2664,6 +2664,11 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id) + if (IS_ERR(uap->clk)) + return PTR_ERR(uap->clk); + ++ if (of_property_read_bool(dev->dev.of_node, "cts-event-workaround")) { ++ vendor->cts_event_workaround = true; ++ dev_info(&dev->dev, "cts_event_workaround enabled\n"); ++ } ++ + uap->reg_offset = vendor->reg_offset; + uap->vendor = vendor; + uap->fifosize = vendor->get_fifosize(dev); + +From 0cc5b2c76b399a8c25a1bb7eb8bb86a4e68f2a31 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 29 Sep 2017 10:32:19 +0100 +Subject: [PATCH 138/140] amba_pl011: Insert mb() for correct FIFO handling + +The pl011 register accessor functions use the _relaxed versions of the +standard readl() and writel() functions, meaning that there are no +automatic memory barriers. When polling a FIFO status register to check +for fullness, it is necessary to ensure that any outstanding writes have +completed; otherwise the flags are effectively stale, making it possible +that the next write is to a full FIFO. + +Signed-off-by: Phil Elwell +--- + drivers/tty/serial/amba-pl011.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c +index 8c6e495b74ca61b8ff8ee79bc6e9d84d572b990a..f6428446dfc0eb060d18c119d065d85ee6fea18c 100644 +--- a/drivers/tty/serial/amba-pl011.c ++++ b/drivers/tty/serial/amba-pl011.c +@@ -1403,6 +1403,7 @@ static bool pl011_tx_char(struct uart_amba_port *uap, unsigned char c, + return false; /* unable to transmit character */ + + pl011_write(c, uap, REG_DR); ++ mb(); + uap->port.icount.tx++; + + return true; + +From 66d3a2744f7cf19f697ca70f2dacfe05ff4080e0 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 11 Oct 2017 13:48:04 +0100 +Subject: [PATCH 139/140] amba-pl011: Report AUTOCTS capability to framework + +The PL011 has full hardware RTS/CTS support which is enabled by +the driver when flow control is requested. However, it doesn't +notify the UART framework of the fact, causing the software CTS +support to be enabled at the same time. + +Software CTS triggers the sending of another batch of characters +when CTS becomes asserted. The pl011 interrupt handler processes +the CTIS bit before TXIS, which can cause some characters to be +sent between the time that the TXIS bit first becomes asserted +and the time it is handled by a call to px011_tx_chars. This +would be fine were it not for the optimisation in pl011_tx_char +that assumes the FIFO is half-empty if called from the interrupt +handler and skips the checking of the FIFO status register before +sending each character, leading to data loss if the FIFO is more +than half-full. + +Prevent the data loss and improve efficiency by indicating the +AUTOCTS support. + +Signed-off-by: Phil Elwell +--- + drivers/tty/serial/amba-pl011.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c +index f6428446dfc0eb060d18c119d065d85ee6fea18c..aa661160a87330f013879e56a2da2ed6db7ec104 100644 +--- a/drivers/tty/serial/amba-pl011.c ++++ b/drivers/tty/serial/amba-pl011.c +@@ -2047,9 +2047,11 @@ pl011_set_termios(struct uart_port *port, struct ktermios *termios, + + old_cr |= UART011_CR_CTSEN; + uap->autorts = true; ++ port->status |= UPSTAT_AUTOCTS; + } else { + old_cr &= ~(UART011_CR_CTSEN | UART011_CR_RTSEN); + uap->autorts = false; ++ port->status &= ~UPSTAT_AUTOCTS; + } + + if (uap->vendor->oversampling) { + +From e300970d92c387679fb6207ed9737fbdf1bf39b9 Mon Sep 17 00:00:00 2001 +From: neilneil2000 <31366098+neilneil2000@users.noreply.github.com> +Date: Thu, 12 Oct 2017 17:29:43 +0100 +Subject: [PATCH 140/140] GPIO and gpio-poweroff clarifications + +Notes added: +1) All GPIO references use the hardware numbering scheme +2) Enabling gpio-poweroff prevents the ability to boot the pi by driving GPIO3 low +--- + arch/arm/boot/dts/overlays/README | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index e6d777a601c91d192bc5713f9a73e1a2d4d708ef..b34c9a9f115b4d7ac81ef4d9417beaadd62259b2 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -33,6 +33,9 @@ needed. + Configuring additional, optional hardware is done using Device Tree overlays + (see below). + ++GPIO numbering uses the hardware pin numbering scheme (aka BCM scheme) and ++not the physical pin numbers. ++ + raspi-config + ============ + +@@ -496,7 +499,8 @@ Params: gpio_pin Input pin number. Default is 18. + + + Name: gpio-poweroff +-Info: Drives a GPIO high or low on poweroff (including halt) ++Info: Drives a GPIO high or low on poweroff (including halt). Enabling this ++ overlay will prevent the ability to boot by driving GPIO3 low. + Load: dtoverlay=gpio-poweroff,= + Params: gpiopin GPIO for signalling (default 26) + From 29342865f688a2b9801a7202d3a713219be0dcc2 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Fri, 13 Oct 2017 16:38:22 +0100 Subject: [PATCH 16/16] RPi firmware: update to 478d637 --- packages/graphics/bcm2835-driver/package.mk | 4 ++-- packages/tools/bcm2835-bootloader/package.mk | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/graphics/bcm2835-driver/package.mk b/packages/graphics/bcm2835-driver/package.mk index 02e8f57b51..1421bfe7ef 100644 --- a/packages/graphics/bcm2835-driver/package.mk +++ b/packages/graphics/bcm2835-driver/package.mk @@ -17,8 +17,8 @@ ################################################################################ PKG_NAME="bcm2835-driver" -PKG_VERSION="8c9b9a3" -PKG_SHA256="ce67599a389ba2c491bb731294f55226732afa6ab30e961e92d16c409c284979" +PKG_VERSION="478d637" +PKG_SHA256="35954bcd8568b057195c72bbc645d3f74a7201c83486359ce6a29482018706ce" PKG_ARCH="any" PKG_LICENSE="nonfree" PKG_SITE="http://www.broadcom.com" diff --git a/packages/tools/bcm2835-bootloader/package.mk b/packages/tools/bcm2835-bootloader/package.mk index 1ffa0f79a6..eb28a107f4 100644 --- a/packages/tools/bcm2835-bootloader/package.mk +++ b/packages/tools/bcm2835-bootloader/package.mk @@ -17,8 +17,8 @@ ################################################################################ PKG_NAME="bcm2835-bootloader" -PKG_VERSION="8c9b9a3" -PKG_SHA256="7a1f3bbec45c679c55ebd856257588d86488f9787cc0819e293a7a7664e90f7e" +PKG_VERSION="478d637" +PKG_SHA256="d4bc570248d053efa23f8007a154116fdd9053841513e5a59f2cfb1586b42fbb" PKG_ARCH="arm" PKG_LICENSE="nonfree" PKG_SITE="http://www.broadcom.com"