diff --git a/packages/graphics/bcm2835-driver/package.mk b/packages/graphics/bcm2835-driver/package.mk index 93e38b22d5..e9b84fff8c 100644 --- a/packages/graphics/bcm2835-driver/package.mk +++ b/packages/graphics/bcm2835-driver/package.mk @@ -17,7 +17,7 @@ ################################################################################ PKG_NAME="bcm2835-driver" -PKG_VERSION="284e48a" +PKG_VERSION="0f315f8" PKG_ARCH="any" PKG_LICENSE="nonfree" PKG_SITE="http://www.broadcom.com" diff --git a/packages/linux/package.mk b/packages/linux/package.mk index 336431c15e..3518a383c1 100644 --- a/packages/linux/package.mk +++ b/packages/linux/package.mk @@ -59,7 +59,7 @@ case "$LINUX" in PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET imx6-status-led imx6-soc-fan irqbalanced" ;; *) - PKG_VERSION="4.11" + PKG_VERSION="4.11.4" PKG_URL="http://www.kernel.org/pub/linux/kernel/v4.x/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_PATCH_DIRS="default" ;; diff --git a/packages/tools/bcm2835-bootloader/package.mk b/packages/tools/bcm2835-bootloader/package.mk index d999c0315b..c40d0d47e8 100644 --- a/packages/tools/bcm2835-bootloader/package.mk +++ b/packages/tools/bcm2835-bootloader/package.mk @@ -17,7 +17,7 @@ ################################################################################ PKG_NAME="bcm2835-bootloader" -PKG_VERSION="284e48a" +PKG_VERSION="0f315f8" PKG_ARCH="arm" PKG_LICENSE="nonfree" PKG_SITE="http://www.broadcom.com" diff --git a/packages/x11/driver/xf86-video-nvidia/package.mk b/packages/x11/driver/xf86-video-nvidia/package.mk index 2936fc5b7e..a8d22ae13c 100644 --- a/packages/x11/driver/xf86-video-nvidia/package.mk +++ b/packages/x11/driver/xf86-video-nvidia/package.mk @@ -44,9 +44,6 @@ make_target() { unset LDFLAGS cd kernel - # Don't build nvidia-drm with kernel 4.11.0 due to incompatible license - export NV_EXCLUDE_KERNEL_MODULES=nvidia-drm - make module CC=$CC SYSSRC=$(kernel_path) SYSOUT=$(kernel_path) $STRIP --strip-debug nvidia.ko cd .. diff --git a/projects/RPi/patches/linux/linux-01-RPi_support.patch b/projects/RPi/patches/linux/linux-01-RPi_support.patch index 4ad8d9e7eb..05bc09b2fe 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 1271997cdba2766c8e9776d4b5f3cfe6bfa3cba2 Mon Sep 17 00:00:00 2001 +From eec8e82e0a53f77804f6ee7eb7ccee8f12ba5c86 Mon Sep 17 00:00:00 2001 From: Steve Glendinning Date: Thu, 19 Feb 2015 18:47:12 +0000 -Subject: [PATCH 001/150] smsx95xx: fix crimes against truesize +Subject: [PATCH 001/165] 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 5f19fb0f025d9449d0ba20958610e0d1f083f032..ed28f1c3e1d0f2559a62a1c289937944 usbnet_skb_return(dev, ax_skb); } -From a347afc0ccd94c1f7d22b4be89a93729d3482cdb Mon Sep 17 00:00:00 2001 +From 4d6cc78075b1d8ec8459a0e43cadc2b48f236fa5 Mon Sep 17 00:00:00 2001 From: Sam Nazarko Date: Fri, 1 Apr 2016 17:27:21 +0100 -Subject: [PATCH 002/150] smsc95xx: Experimental: Enable turbo_mode and +Subject: [PATCH 002/165] smsc95xx: Experimental: Enable turbo_mode and packetsize=2560 by default See: http://forum.kodi.tv/showthread.php?tid=285288 @@ -94,10 +94,10 @@ index ed28f1c3e1d0f2559a62a1c28993794497730c5d..f758e122c65685799d4aeeb1c3e6ca81 netif_dbg(dev, ifup, dev->net, "rx_urb_size=%ld\n", -From 2ce94c606a1de6371f969ec9806c1d929d539524 Mon Sep 17 00:00:00 2001 +From dd6af616b01ce5699d358823f650d0de1dfbcef8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 003/150] Allow mac address to be set in smsc95xx +Subject: [PATCH 003/165] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -193,10 +193,10 @@ index f758e122c65685799d4aeeb1c3e6ca81df0d7980..f6661e388f6e801c1b88e48a3b71407b eth_hw_addr_random(dev->net); netif_dbg(dev, ifup, dev->net, "MAC address set to eth_random_addr\n"); -From e5fa073af19fea2b4b71dbc10d107f07e726b9ab Mon Sep 17 00:00:00 2001 +From ed0782cf4d891b3dc1258345c6350fd06abe4e20 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 13 Mar 2015 12:43:36 +0000 -Subject: [PATCH 004/150] Protect __release_resource against resources without +Subject: [PATCH 004/165] 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 93ce5d5706abd21583e08a43a8cbe6a5a0608fc6 Mon Sep 17 00:00:00 2001 +From 2cb589e38b396476f7e52e7f91d11f2845000a3c Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 18 Dec 2014 16:07:15 -0800 -Subject: [PATCH 005/150] mm: Remove the PFN busy warning +Subject: [PATCH 005/165] mm: Remove the PFN busy warning See commit dae803e165a11bc88ca8dbc07a11077caf97bbcb -- the warning is expected sometimes when using CMA. However, that commit still spams @@ -239,10 +239,10 @@ Signed-off-by: Eric Anholt 1 file changed, 2 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 07efbc3a86567676986105005f77c64f9f99597a..01988d3cedfd83546df831d7c4f03e1e6aae1360 100644 +index a2019fc9d94df3af9cf2c5ce1a476949c6822efc..5e6e1815923f212f5c1b1d1a213b0b12778997d4 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -7515,8 +7515,6 @@ int alloc_contig_range(unsigned long start, unsigned long end, +@@ -7529,8 +7529,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)) { @@ -252,10 +252,10 @@ index 07efbc3a86567676986105005f77c64f9f99597a..01988d3cedfd83546df831d7c4f03e1e goto done; } -From 623cfba2faa2c010ebaab45171f0a390c306f0f5 Mon Sep 17 00:00:00 2001 +From 100f8ee402a67c4f9bae7712676bbdd437a579b4 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 4 Dec 2015 17:41:50 +0000 -Subject: [PATCH 006/150] irq-bcm2836: Prevent spurious interrupts, and trap +Subject: [PATCH 006/165] irq-bcm2836: Prevent spurious interrupts, and trap them early The old arch-specific IRQ macros included a dsb to ensure the @@ -282,10 +282,10 @@ index e7463e3c08143acae3e8cc5682f918c6a0b07ebd..a8db33b50ad9ff83d284fa54fe4d3b65 #endif } else if (stat) { -From 14a9acffeb577ae7251d0036b367118fc7b42c0d Mon Sep 17 00:00:00 2001 +From 7d209d07c090d5ba5beef2005ca0f6774cef60d7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:33:30 +0000 -Subject: [PATCH 007/150] irq-bcm2836: Avoid "Invalid trigger warning" +Subject: [PATCH 007/165] irq-bcm2836: Avoid "Invalid trigger warning" Initialise the level for each IRQ to avoid a warning from the arm arch timer code. @@ -309,10 +309,10 @@ index a8db33b50ad9ff83d284fa54fe4d3b65f859df0f..c4e151451cf8c8ebde5225515eac2786 static void -From bd516ea1a2695ff2ac13d6332c38b5dd8dc156c0 Mon Sep 17 00:00:00 2001 +From 29d04709a67f6ecd03869b4aae4bb1b1539c873d 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 008/150] irqchip: bcm2835: Add FIQ support +Subject: [PATCH 008/165] irqchip: bcm2835: Add FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -441,10 +441,10 @@ index 44d7c38dde479d771f3552e914bf8c1c1f5019f7..42ff5e6a8e0d532f5b60a1e7af7cc4d9 } -From d79351a2b7599a6e394295c53283d625c1ccb916 Mon Sep 17 00:00:00 2001 +From e7d7541eeb53185497ecf9d5f355c7c734fe6434 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 009/150] irqchip: irq-bcm2835: Add 2836 FIQ support +Subject: [PATCH 009/165] irqchip: irq-bcm2835: Add 2836 FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -543,10 +543,10 @@ index 42ff5e6a8e0d532f5b60a1e7af7cc4d941bd5008..eccf6ed025299cb480884f5bcbe77abf for (b = 0; b < NR_BANKS; b++) { for (i = 0; i < bank_irqs[b]; i++) { -From 1840c980ba21dd87bdfccdb94573fd9f8f881c3b Mon Sep 17 00:00:00 2001 +From 612f126b64884a5e0f5e73b7c236093b4d56612f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 10:26:09 +0100 -Subject: [PATCH 010/150] spidev: Add "spidev" compatible string to silence +Subject: [PATCH 010/165] spidev: Add "spidev" compatible string to silence warning See: https://github.com/raspberrypi/linux/issues/1054 @@ -567,33 +567,10 @@ index 9e2e099baf8ca5cc6510912a36d4ca03daeb8273..e59640942826db2ea14d0bde0ff5ab22 }; MODULE_DEVICE_TABLE(of, spidev_dt_ids); -From fb243008b7d9f06e65045d26ef221d1cb6ff612c Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Tue, 30 Jun 2015 14:12:42 +0100 -Subject: [PATCH 011/150] serial: 8250: Don't crash when nr_uarts is 0 - ---- - drivers/tty/serial/8250/8250_core.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c -index 76e03a7de9cc3d790a230948f599ef2db4b93249..0a172c2e6fa288de1e080463e897ea85aa98399f 100644 ---- a/drivers/tty/serial/8250/8250_core.c -+++ b/drivers/tty/serial/8250/8250_core.c -@@ -509,6 +509,8 @@ static void __init serial8250_isa_init_ports(void) - - if (nr_uarts > UART_NR) - nr_uarts = UART_NR; -+ if (!nr_uarts) -+ return; - - for (i = 0; i < nr_uarts; i++) { - struct uart_8250_port *up = &serial8250_ports[i]; - -From e6fdce6882f36c213a81ac2323a91e57d46b01db Mon Sep 17 00:00:00 2001 +From 5b78423b2e1540634810dac47b48a3d27a83e365 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 3 Jan 2017 18:25:01 +0000 -Subject: [PATCH 012/150] Revert "pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP" +Subject: [PATCH 011/165] Revert "pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP" This reverts commit 85ae9e512f437cd09bf61564bdba29ab88bab3e3. --- @@ -887,10 +864,10 @@ index 85d0091128644c446aed878e87769e82c77c3ebf..4f2621272bfd5cbc0d691d2fabe89e2e if (IS_ERR(pc->pctl_dev)) { gpiochip_remove(&pc->gpio_chip); -From 5fd0d472a1deaab0ad03b9ac0cf03b08c10ad521 Mon Sep 17 00:00:00 2001 +From 0578c862453c7aef2e013996ccf5d3aa9e277793 Mon Sep 17 00:00:00 2001 From: notro Date: Thu, 10 Jul 2014 13:59:47 +0200 -Subject: [PATCH 013/150] pinctrl-bcm2835: Set base to 0 give expected gpio +Subject: [PATCH 012/165] pinctrl-bcm2835: Set base to 0 give expected gpio numbering Signed-off-by: Noralf Tronnes @@ -912,10 +889,10 @@ index 4f2621272bfd5cbc0d691d2fabe89e2ee428d6db..5b7cb4c415e19f98e25b221ab0ad36b6 .can_sleep = false, }; -From 62578c5b8f5e71b089a8fdbe30b970428a47af37 Mon Sep 17 00:00:00 2001 +From 90aa0aad83456a4fa846525d06a4359a95e2bdaa Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 26 Feb 2015 09:58:22 +0000 -Subject: [PATCH 014/150] pinctrl-bcm2835: Only request the interrupts listed +Subject: [PATCH 013/165] pinctrl-bcm2835: Only request the interrupts listed in the DTB Although the GPIO controller can generate three interrupts (four counting @@ -942,10 +919,10 @@ index 5b7cb4c415e19f98e25b221ab0ad36b6885dae4c..6351fe7f8e314ac5ebb102dd20847b38 pc->irq_data[i].irqgroup = i; -From 854432281d9580b79246f64219cd6296e86ded0f Mon Sep 17 00:00:00 2001 +From d51cfb02233abe9c3ccedaffb8332cd0e77ea6c1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Jun 2015 14:10:44 +0100 -Subject: [PATCH 015/150] spi-bcm2835: Support pin groups other than 7-11 +Subject: [PATCH 014/165] 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 @@ -1026,10 +1003,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 98aaea5fb40decc0a296034cbc6c0b93eb4357d8 Mon Sep 17 00:00:00 2001 +From a4aea453b3234e99b5400c631595cc2b1263c016 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 1 Jul 2016 22:09:24 +0100 -Subject: [PATCH 016/150] spi-bcm2835: Disable forced software CS +Subject: [PATCH 015/165] 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 @@ -1063,10 +1040,10 @@ index 5dfe20ffc2866fa6789825016c585175a29705b6..8493474d286f7a1ac6454a22c61c8c2c return 0; } -From bb132b31f99358f990f175c903cfdb2a1236b0f5 Mon Sep 17 00:00:00 2001 +From 2188eefb05bfce482654b99c81a5ed2c09ddeba4 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 8 Nov 2016 21:35:38 +0000 -Subject: [PATCH 017/150] spi-bcm2835: Remove unused code +Subject: [PATCH 016/165] spi-bcm2835: Remove unused code --- drivers/spi/spi-bcm2835.c | 61 ----------------------------------------------- @@ -1154,10 +1131,10 @@ index 8493474d286f7a1ac6454a22c61c8c2cef9121bf..33d75ad38a7f77d085321ace9101900a } -From d22117a61d13599e8f03765a6c0e5c66864b4303 Mon Sep 17 00:00:00 2001 +From d5045f96098752f22cc453bfb16e08e7883e832d 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 018/150] ARM: bcm2835: Set Serial number and Revision +Subject: [PATCH 017/165] ARM: bcm2835: Set Serial number and Revision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1210,10 +1187,10 @@ index 0c1edfc98696da0e0bb7f4a18cdfbcdd27a9795d..8f152266ba9b470df2eaaed9ebcf158e static const char * const bcm2835_compat[] = { -From ab4022f0215c5a52f8125ec25d672ff663c23876 Mon Sep 17 00:00:00 2001 +From fafa0aece974e67ed438e7071e1121afebd49897 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 019/150] dmaengine: bcm2835: Load driver early and support +Subject: [PATCH 018/165] dmaengine: bcm2835: Load driver early and support legacy API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -1316,10 +1293,10 @@ index 6204cc32d09c5096df8aec304c3c37b3bcb6be44..599c218dc8a73172dd4bd4a058fc8f95 MODULE_ALIAS("platform:bcm2835-dma"); MODULE_DESCRIPTION("BCM2835 DMA engine driver"); -From 7e9d1845f9301474cbba920226311defc8f47370 Mon Sep 17 00:00:00 2001 +From b535bf90b53b6bc8a2565781dc8855dfd30494c3 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 25 Jan 2016 17:25:12 +0000 -Subject: [PATCH 020/150] firmware: Updated mailbox header +Subject: [PATCH 019/165] firmware: Updated mailbox header --- include/soc/bcm2835/raspberrypi-firmware.h | 9 +++++++++ @@ -1380,10 +1357,10 @@ index cb979ad90401e299344dd5fae38d09c489d8bd58..30fb37fe175df604a738258a2a632bca RPI_FIRMWARE_VCHIQ_INIT = 0x00048010, -From 792034bb12504f6b73bce102c05767b1eb11145d Mon Sep 17 00:00:00 2001 +From 4f0de8a823dd84a85feec56f089c846fd7655921 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 15 Jun 2016 16:48:41 +0100 -Subject: [PATCH 021/150] rtc: Add SPI alias for pcf2123 driver +Subject: [PATCH 020/165] rtc: Add SPI alias for pcf2123 driver Without this alias, Device Tree won't cause the driver to be loaded. @@ -1403,10 +1380,10 @@ index 8895f77726e8da5444afcd602dceff8f25a9b3fd..1833b8853ceb0e6147cceb93a00e558c MODULE_LICENSE("GPL"); +MODULE_ALIAS("spi:rtc-pcf2123"); -From b8c79631cd26c764d1fe5343a400bb6fb681b5cd Mon Sep 17 00:00:00 2001 +From 3d6b467733ba028155f18a08fd7363a8af229b46 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 022/150] watchdog: bcm2835: Support setting reboot partition +Subject: [PATCH 021/165] watchdog: bcm2835: Support setting reboot partition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1508,10 +1485,10 @@ index b339e0e67b4c1275fd4992fea4f1e24c0575b783..26b7177573fac2af1cd4ab5488d2686f static int bcm2835_wdt_probe(struct platform_device *pdev) -From 77f4bfc67371dba9ee89641d99d765055e4ba0cc Mon Sep 17 00:00:00 2001 +From b6ff9a72e22a51449da7f429ef7c1c711dfce429 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 5 Apr 2016 19:40:12 +0100 -Subject: [PATCH 023/150] reboot: Use power off rather than busy spinning when +Subject: [PATCH 022/165] reboot: Use power off rather than busy spinning when halt is requested --- @@ -1534,10 +1511,10 @@ index 3fa867a2aae672755c6ce6448f4148c989dbf964..80dca8dcd6709034b643c6a3f35729e0 /* -From ba1d8fd9f3886b5927b7b575f24fbf9c12cf0a41 Mon Sep 17 00:00:00 2001 +From 2aeffd4676df97117a35fab502a02460e7626c36 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 9 Nov 2016 13:02:52 +0000 -Subject: [PATCH 024/150] bcm: Make RASPBERRYPI_POWER depend on PM +Subject: [PATCH 023/165] bcm: Make RASPBERRYPI_POWER depend on PM --- drivers/soc/bcm/Kconfig | 1 + @@ -1556,10 +1533,10 @@ index a39b0d58ddd0fdf0ac1cc7295f8aafb12546e226..e037a6dd79d1881a09e3ca9115782709 help This enables support for the RPi power domains which can be enabled -From e93254defaad622fd2f99a7a520973dede9be91d Mon Sep 17 00:00:00 2001 +From 5497f9742cad18a9da304bb8955ef1649c86c12a Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Fri, 2 Sep 2016 16:45:27 +0100 -Subject: [PATCH 025/150] Register the clocks early during the boot process, so +Subject: [PATCH 024/165] 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. @@ -1604,10 +1581,10 @@ index 02585387061967ac9408e18ac1bce67e9e9414c0..283d2de45e4f29406d01f24ab1cae3f9 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("BCM2835 clock driver"); -From b83979886ce6705e91662f7e58566b7eb5595f18 Mon Sep 17 00:00:00 2001 +From f346bb7359bb9ba8fe1b7d0b5aa4e7ff9be41a80 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 6 Dec 2016 17:05:39 +0000 -Subject: [PATCH 026/150] bcm2835-rng: Avoid initialising if already enabled +Subject: [PATCH 025/165] bcm2835-rng: Avoid initialising if already enabled Avoids the 0x40000 cycles of warmup again if firmware has already used it --- @@ -1633,10 +1610,10 @@ index 574211a495491d9d6021dcaefe4274a63ed02055..e66c0fca8c6090e32f72796c0877a1cf err = hwrng_register(&bcm2835_rng_ops); if (err) { -From 63aaaf1a9deb01fb7141b2c48b0e119f9ee3f8f8 Mon Sep 17 00:00:00 2001 +From c49f43e929fdf7b13e8ec2f977a8b29d24fb954c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Aug 2016 16:28:44 +0100 -Subject: [PATCH 027/150] kbuild: Ignore dtco targets when filtering symbols +Subject: [PATCH 026/165] kbuild: Ignore dtco targets when filtering symbols --- scripts/Kbuild.include | 2 +- @@ -1656,10 +1633,10 @@ index afe3fd3af1e40616857b3e6c425be632c1fa2667..b2bbad417f0c4499a5f49081c8f996b9 esac | tr ";" "\n" | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/KSYM_\1/p' -From e297b2cd65a7b9247d44afff8de0efd3b215925c Mon Sep 17 00:00:00 2001 +From 50da0852aa6b9a510915c81336ac77b57f63421e Mon Sep 17 00:00:00 2001 From: Robert Tiemann Date: Mon, 20 Jul 2015 11:01:25 +0200 -Subject: [PATCH 028/150] BCM2835_DT: Fix I2S register map +Subject: [PATCH 027/165] BCM2835_DT: Fix I2S register map --- Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt | 4 ++-- @@ -1697,10 +1674,10 @@ index 65783de0aedf3da79adc36fd077b7a89954ddb6b..a89fe4220fdc3f26f75ee66daf187554 dmas = <&dma 2>, <&dma 3>; -From 97c2818afd6538be920d4e61517384af2a514cca Mon Sep 17 00:00:00 2001 +From 2f491a058d51e143fc7abee21bcfae31b70f3d65 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 -Subject: [PATCH 029/150] clk-bcm2835: Mark used PLLs and dividers CRITICAL +Subject: [PATCH 028/165] 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 @@ -1728,10 +1705,10 @@ index 283d2de45e4f29406d01f24ab1cae3f9f879234a..85df8c74a309f0b877ef65f1c55b086f divider->data = data; -From 7a37dcfcc7e625c1325606058f9d728ecd1163a0 Mon Sep 17 00:00:00 2001 +From 960974f9595315af7d9001558e0d1719dc81788c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 -Subject: [PATCH 030/150] clk-bcm2835: Add claim-clocks property +Subject: [PATCH 029/165] 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, @@ -1833,10 +1810,10 @@ index 85df8c74a309f0b877ef65f1c55b086f1bb774a1..eec6735505c074c0a76ae647bf0e1bb6 sizeof(cprman_parent_names)); of_clk_parent_fill(dev->of_node, cprman->real_parent_names, -From ee9076250d2ae0c8141adbae2ee66c9e2186dcf7 Mon Sep 17 00:00:00 2001 +From 0cf68f6c976dcd94fdc5e9dfcb85514815419a35 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 1 Mar 2017 16:06:53 +0000 -Subject: [PATCH 031/150] clk-bcm2835: Correct the prediv logic +Subject: [PATCH 030/165] clk-bcm2835: Correct the prediv logic If a clock has the prediv flag set, both the integer and fractional parts must be scaled when calculating the resulting frequency. @@ -1863,10 +1840,10 @@ index eec6735505c074c0a76ae647bf0e1bb68ab3a488..e0d28add45efdf70d1eba590282a3a26 return bcm2835_pll_rate_from_divisors(parent_rate, ndiv, fdiv, pdiv); } -From 4bceecaead7ff62990f7b9691d4d01c50bd3f98a Mon Sep 17 00:00:00 2001 +From e99b65bd772d6e42b107a3b149b19d50e3033c41 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 6 Mar 2017 09:06:18 +0000 -Subject: [PATCH 032/150] clk-bcm2835: Read max core clock from firmware +Subject: [PATCH 031/165] 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 @@ -1981,10 +1958,10 @@ index e0d28add45efdf70d1eba590282a3a2654af328d..39f72da6ba1f6ec6ec41d5dc1bf46344 for (i = 0; !of_property_read_u32_index(pdev->dev.of_node, "claim-clocks", -From cea58498fcb31578e0760f043606cf9a05a2caab Mon Sep 17 00:00:00 2001 +From 0c7a2453f1ef27ec31327e904aad8c2bdb6972f6 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:36:44 +0000 -Subject: [PATCH 033/150] sound: Demote deferral errors to INFO level +Subject: [PATCH 032/165] 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. @@ -2019,10 +1996,10 @@ index 2722bb0c557310d97816cfa7857b24d7c9bd4948..c32d3c31f34fc12195baf873a507d0b4 goto _err_defer; } -From 9c3c67b58c61b0307d6eec6bb85560ae80d4031a Mon Sep 17 00:00:00 2001 +From 459069a0909aa7b61395af8d77098a0a411cfbc0 Mon Sep 17 00:00:00 2001 From: Claggy3 Date: Sat, 11 Feb 2017 14:00:30 +0000 -Subject: [PATCH 034/150] Update vfpmodule.c +Subject: [PATCH 033/165] 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 @@ -2159,10 +2136,10 @@ index a71a48e71fffa8626fe90106815376c44bbe679b..d6c0a5a0a5ae3510db3ace5e3f5d3410 /* * Save the userland NEON/VFP state. Under UP, -From c253cc202fd374a01e0673547646fb09bdf692f9 Mon Sep 17 00:00:00 2001 +From b6ed390ff9842f76496a66acb76526eb0e9788b3 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Mar 2017 21:13:24 +1100 -Subject: [PATCH 035/150] ASoC: bcm2835_i2s.c: relax the ch2 register setting +Subject: [PATCH 034/165] 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. @@ -2183,10 +2160,10 @@ index 6ba20498202ed36906b52096893a88867a79269f..56df7d8a43d0aac055a91b0d24aca8e1 format |= BCM2835_I2S_CH1(BCM2835_I2S_CHPOS(ch1pos)); format |= BCM2835_I2S_CH2(BCM2835_I2S_CHPOS(ch2pos)); -From 3ae97a5f1b1763ba259ebcd4be0983611947f9af Mon Sep 17 00:00:00 2001 +From 71504630ad77c40ba0a67c9b540b427ce5d54c43 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 036/150] i2c: bcm2835: Add debug support +Subject: [PATCH 035/165] i2c: bcm2835: Add debug support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2375,10 +2352,10 @@ index cd07a69e2e9355540442785f95e90823b05c9d10..47167f403cc8329bd811b47c7011c299 if (i2c_dev->msg_err & BCM2835_I2C_S_ERR) return -EREMOTEIO; -From 56e119674e6af3bf05fb2df0660c25e8edae61f3 Mon Sep 17 00:00:00 2001 +From 17d3865ea90a1ee124a0e3a64f00c4d448322591 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 037/150] Main bcm2708/bcm2709 linux port +Subject: [PATCH 036/165] Main bcm2708/bcm2709 linux port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2566,10 +2543,10 @@ index cfb4b4496dd9f61362dea012176c146120fada07..d9c6c217c4d6a2408abe2665bf7f2700 MODULE_AUTHOR("Lubomir Rintel "); MODULE_DESCRIPTION("BCM2835 mailbox IPC driver"); -From 926d0ae6ea2e5d7c76900570af6eb64cb4855fda Mon Sep 17 00:00:00 2001 +From 620d2f432aa96efd2f8dcc812b7fc5f8f241123a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 038/150] Add dwc_otg driver +Subject: [PATCH 037/165] Add dwc_otg driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -3277,10 +3254,10 @@ index bd3e0c5a6db25e7a162d922c6508de1ad0b68025..15c80079c97bb9eeec478932af88a293 return i; } diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c -index 5286bf67869a83e1d7e1d3f1ca0ebc87db5cf7a4..509caca9f86d9d43279476ae53bab964c10a9cd0 100644 +index f77a4ebde7d576e9f0fa8a71a13650cd0873dc99..9142813b330302456316b0b80d7e186789e05cf9 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5018,7 +5018,7 @@ static void port_event(struct usb_hub *hub, int port1) +@@ -5036,7 +5036,7 @@ static void port_event(struct usb_hub *hub, int port1) if (portchange & USB_PORT_STAT_C_OVERCURRENT) { u16 status = 0, unused; @@ -63634,10 +63611,34 @@ index 0000000000000000000000000000000000000000..cdc9963176e5a4a0d5250613b61e26c5 +test_main(); +0; -From 5ca9b4aba0e463a01232c6ebf133800b52df2614 Mon Sep 17 00:00:00 2001 +From 87d5ff0f1d9a318cb39e7537e1fa54c9b9f08bb0 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Wed, 10 May 2017 12:47:46 +0100 +Subject: [PATCH 038/165] dwcotg: Allow to build without FIQ on ARM64 + +Signed-off-by: popcornmix +--- + drivers/usb/host/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig +index ed0cd59de37e8f47369f86dba751c78933722abc..53aedbe9727ca5c34e46f5cf998f14c7ee7f0ff6 100644 +--- a/drivers/usb/host/Kconfig ++++ b/drivers/usb/host/Kconfig +@@ -765,7 +765,7 @@ config USB_HWA_HCD + + config USB_DWCOTG + tristate "Synopsis DWC host support" +- depends on USB ++ depends on USB && (FIQ || ARM64) + help + The Synopsis DWC controller is a dual-role + host/peripheral/OTG ("On The Go") USB controllers. + +From cada4595e9a1d65906bc17d1c99fb5780db953ce Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 17:06:34 +0100 -Subject: [PATCH 039/150] bcm2708 framebuffer driver +Subject: [PATCH 039/165] bcm2708 framebuffer driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -67096,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 f220a92de0e2787135019e7601a76a1cff03833b Mon Sep 17 00:00:00 2001 +From 283d3214cafb02aa9fa108d097c3a543ef7804a1 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 040/150] dmaengine: Add support for BCM2708 +Subject: [PATCH 040/165] dmaengine: Add support for BCM2708 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -67730,10 +67731,10 @@ index 0000000000000000000000000000000000000000..c5bfff2765be4606077e6c8af73040ec + +#endif /* _PLAT_BCM2708_DMA_H */ -From bda941c478284aa0effe756e60a02b91017ad274 Mon Sep 17 00:00:00 2001 +From a5a47d3afb09bdd8ca71d041f2d353cfb1ada9a4 Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:06 +0100 -Subject: [PATCH 041/150] MMC: added alternative MMC driver +Subject: [PATCH 041/165] MMC: added alternative MMC driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -69455,10 +69456,10 @@ index 0000000000000000000000000000000000000000..4fe8d1fe44578fbefcd48f8c327ba3d0 +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Gellert Weisz"); -From 834ade8254834159be9ae2ba41dfb4722efd9c8c Mon Sep 17 00:00:00 2001 +From 77af5cd04e4661813eeea9e3fbf9a1b3670e449c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Mar 2015 17:49:47 +0000 -Subject: [PATCH 042/150] Adding bcm2835-sdhost driver, and an overlay to +Subject: [PATCH 042/165] Adding bcm2835-sdhost driver, and an overlay to enable it BCM2835 has two SD card interfaces. This driver uses the other one. @@ -71854,10 +71855,10 @@ index 0000000000000000000000000000000000000000..a9bc79bfdbb71807819dfe2d8f165144 +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Phil Elwell"); -From 480910587a44789d33027900a719c50df96eaa1c Mon Sep 17 00:00:00 2001 +From e8e26b13ffabd5f0cd7a41d9dcf74fa830eb0301 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 28 Oct 2016 15:36:43 +0100 -Subject: [PATCH 043/150] vc_mem: Add vc_mem driver for querying firmware +Subject: [PATCH 043/165] vc_mem: Add vc_mem driver for querying firmware memory addresses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -72382,10 +72383,10 @@ index 0000000000000000000000000000000000000000..20a475377eb3078ea1ecaef2b24efc35 + +#endif /* _VC_MEM_H */ -From f5d2418eee21b196ab7126b8bab88916272bae35 Mon Sep 17 00:00:00 2001 +From 6f1fd408d70ead65d08c7dec9652c609cffa36c1 Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Tue, 22 Jul 2014 15:41:04 +0100 -Subject: [PATCH 044/150] vcsm: VideoCore shared memory service for BCM2835 +Subject: [PATCH 044/165] vcsm: VideoCore shared memory service for BCM2835 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -76822,10 +76823,10 @@ index 0000000000000000000000000000000000000000..334f36d0d697b047df2922b5f2db67f3 + +#endif /* __VMCS_SM_IOCTL_H__INCLUDED__ */ -From ee23b1d598c89bf23f8a887f67fb3965c7df3bb8 Mon Sep 17 00:00:00 2001 +From a9db5311f8bb4d8e98dbc0bdf9b11355cd1ac2c0 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Fri, 21 Aug 2015 23:14:48 +0100 -Subject: [PATCH 045/150] Add /dev/gpiomem device for rootless user GPIO access +Subject: [PATCH 045/165] Add /dev/gpiomem device for rootless user GPIO access Signed-off-by: Luke Wren @@ -77133,10 +77134,10 @@ index 0000000000000000000000000000000000000000..f5e7f1ba8fb6f18dee77fad06a17480c +MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace"); +MODULE_AUTHOR("Luke Wren "); -From b19936f231a9a2c6f8e970159f8c9b7db7ad5f60 Mon Sep 17 00:00:00 2001 +From b80eb5aed096c03128cc352589904395d4412dc9 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:14:45 +0100 -Subject: [PATCH 046/150] Add SMI driver +Subject: [PATCH 046/165] Add SMI driver Signed-off-by: Luke Wren --- @@ -79087,10 +79088,10 @@ index 0000000000000000000000000000000000000000..ee3a75edfc033eeb0d90a687ffb68b10 + +#endif /* BCM2835_SMI_H */ -From 7647b4071e3940d12461bb01739ff3085e3fcff6 Mon Sep 17 00:00:00 2001 +From ed1271f9bdf6d76e0cfee8c8b0a36359aaa98a8d Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Tue, 26 Apr 2016 14:59:21 +0000 -Subject: [PATCH 047/150] MISC: bcm2835: smi: use clock manager and fix reload +Subject: [PATCH 047/165] MISC: bcm2835: smi: use clock manager and fix reload issues Use clock manager instead of self-made clockmanager. @@ -79260,10 +79261,10 @@ index 63a4ea08b9930a3a31a985f0a1d969b488ed49ec..1261540703127d1d63b9f3c87042c6e5 return 0; } -From e382f780c6077aaad6c7ce1e87bf81bacf1bde1e Mon Sep 17 00:00:00 2001 +From 304eafe4049385c58b42dcfdbef18cc9fca2a98e Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:16:10 +0100 -Subject: [PATCH 048/150] Add SMI NAND driver +Subject: [PATCH 048/165] Add SMI NAND driver Signed-off-by: Luke Wren --- @@ -79628,10 +79629,10 @@ index 0000000000000000000000000000000000000000..02adda6da18bd0ba9ab19a104975b79d + ("Driver for NAND chips using Broadcom Secondary Memory Interface"); +MODULE_AUTHOR("Luke Wren "); -From 1509c0159348716d5b37b1b30d3105a5fcd07ec9 Mon Sep 17 00:00:00 2001 +From 361deb5cddea99fac7f43cab2fdb408efd9d910c Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 049/150] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 049/165] 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 @@ -80494,10 +80495,10 @@ index 0000000000000000000000000000000000000000..fb69624ccef00ddbdccf8256d6baf1b1 + +#endif -From 6dfad5b352106011fe51f3e2e9013ff643363b51 Mon Sep 17 00:00:00 2001 +From 22b652cf091213d42d68bc030e327de206541581 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 050/150] Add cpufreq driver +Subject: [PATCH 050/165] Add cpufreq driver Signed-off-by: popcornmix --- @@ -80764,10 +80765,10 @@ index 0000000000000000000000000000000000000000..414fbdc10dfbfc6e4bb47870a7af3fd5 +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); -From 15130f6e27b5f8eb4f691a304cb50f6efc255844 Mon Sep 17 00:00:00 2001 +From 0944045dd011420aadd23ca441f7ddfe312a82ef Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 19:24:24 +0000 -Subject: [PATCH 051/150] Added hwmon/thermal driver for reporting core +Subject: [PATCH 051/165] Added hwmon/thermal driver for reporting core temperature. Thanks Dorian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -80933,10 +80934,10 @@ index 0000000000000000000000000000000000000000..c63fb9f9d143e19612a18fe530c7b2b3 +MODULE_DESCRIPTION("Thermal driver for bcm2835 chip"); +MODULE_LICENSE("GPL"); -From 1acc6899f4a96fe0a524d0e61090ed0b911a7373 Mon Sep 17 00:00:00 2001 +From 3f9efad37966f2c1b6ff738e046c0176a192cce7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 15:44:08 +0100 -Subject: [PATCH 052/150] Add Chris Boot's i2c driver +Subject: [PATCH 052/165] Add Chris Boot's i2c driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -81601,10 +81602,10 @@ index 0000000000000000000000000000000000000000..962f2e5c7455d91bf32925d785f5f16b +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); -From bb70ba5b144109a5622dd1f0ff5de103b4195e4d Mon Sep 17 00:00:00 2001 +From 8876c932d6563079055f340a31d84b827d405c3d 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 053/150] char: broadcom: Add vcio module +Subject: [PATCH 053/165] char: broadcom: Add vcio module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -81829,10 +81830,10 @@ index 0000000000000000000000000000000000000000..c19bc2075c77879563ef5e59038b5a14 +MODULE_DESCRIPTION("Mailbox userspace access"); +MODULE_LICENSE("GPL"); -From 8b423788b13ba0db9c3fd7272244efeef84d4c58 Mon Sep 17 00:00:00 2001 +From 1dfdb36a2391125d8fafa49ea19813f135fe1053 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 054/150] firmware: bcm2835: Support ARCH_BCM270x +Subject: [PATCH 054/165] firmware: bcm2835: Support ARCH_BCM270x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -81915,10 +81916,10 @@ index dd506cd3a5b874f9e1acd07efb8cd151bb6145d1..3f070bd38a91511c986e3fb114b15bd4 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("Raspberry Pi firmware driver"); -From 25e0dc791a0d0019588d8018960ffa4e871c4fbe Mon Sep 17 00:00:00 2001 +From c6605ccd47162385d7a23dbbdf405dace67904ab Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 May 2015 09:00:42 +0100 -Subject: [PATCH 055/150] scripts: Add mkknlimg and knlinfo scripts from tools +Subject: [PATCH 055/165] scripts: Add mkknlimg and knlinfo scripts from tools repo The Raspberry Pi firmware looks for a trailer on the kernel image to @@ -82438,10 +82439,10 @@ index 0000000000000000000000000000000000000000..60206de7fa9a49bd027c635306674a29 + return $trailer; +} -From 67d0ae429b8998ff33a858f118934bb4b49a8254 Mon Sep 17 00:00:00 2001 +From 70c91958bd15ee39b973b2ac6540dbdde55f2e51 Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:46:08 +0200 -Subject: [PATCH 056/150] BCM2708: Add core Device Tree support +Subject: [PATCH 056/165] BCM2708: Add core Device Tree support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -93740,10 +93741,10 @@ index 7234e61e7ce370a775ec6981b391b6d102a01770..1b53cd59e4875d388e4974a3399d5f07 # Bzip2 -From bb58274a2b2b00ffe65d2521dbfdd61b76074da1 Mon Sep 17 00:00:00 2001 +From 86e429ede242de1e764cfcaf0a81bf7970745da7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Feb 2015 13:50:57 +0000 -Subject: [PATCH 057/150] BCM270x_DT: Add pwr_led, and the required "input" +Subject: [PATCH 057/165] BCM270x_DT: Add pwr_led, and the required "input" trigger The "input" trigger makes the associated GPIO an input. This is to support @@ -93919,10 +93920,10 @@ index 38c0bd7ca1074af234d516275791d05f945ce1f0..2f026646d24bad617c73aa79db30c9aa /* set_brightness_work / blink_timer flags, atomic, private. */ unsigned long work_flags; -From 19b0f43669b73b6a011edb71ce88eaab3b1d93ee Mon Sep 17 00:00:00 2001 +From 217263cee115ee506f81005c377199f0fc8a924e Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 058/150] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 058/165] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -94174,10 +94175,10 @@ index fb795c3b3c178ad3cd7c9e9e4547ffd492bac181..703fa8a70574323abe2fb32599254582 __u32 dx; /* screen-relative */ __u32 dy; -From 3f80968f502506472c21fb2a2fbf291ec9a05297 Mon Sep 17 00:00:00 2001 +From a6204ae1aa4ec42e8712b978bb1861d6a86a7579 Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 059/150] Speed up console framebuffer imageblit function +Subject: [PATCH 059/165] 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 @@ -94386,10 +94387,10 @@ index a2bb276a8b2463eee98eb237c4647bc00cd93601..436494fba15abecb400ef28688466faf start_index, pitch_index); } else -From 70a3c50a638d2ef7bac56c6e89684625b8c9d78d Mon Sep 17 00:00:00 2001 +From f1700c6ad46b4119d0fb8266ebc281fd7f41a252 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 060/150] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 060/165] 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 @@ -94639,10 +94640,10 @@ index d58594a3232492e33f1dd4babd3798b03e0f0203..feae94256256316fd9d850c3d83325af unsigned int ext_pullup_enable_pin; unsigned int pullup_duration; -From e4163aac85eb2d5aa1bf0b4b9afbfbfe2db7c8c6 Mon Sep 17 00:00:00 2001 +From 1d79f813e2a452b627e0959a3dae26d5fc546df2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 14 Jul 2014 22:02:09 +0100 -Subject: [PATCH 061/150] hid: Reduce default mouse polling interval to 60Hz +Subject: [PATCH 061/165] hid: Reduce default mouse polling interval to 60Hz Reduces overhead when using X --- @@ -94678,10 +94679,10 @@ index 961bc6fdd2d908835fa9a07d169a4746fb44189d..c595188a1156a27aa79f111d81636b6d ret = -ENOMEM; if (usb_endpoint_dir_in(endpoint)) { -From 89bf0e2488d1b059a2e6ff9fc64c8ab00fef7f43 Mon Sep 17 00:00:00 2001 +From 79655397b4bbc80f8d05ff0fddd3f98f19950eba Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Tue, 12 May 2015 14:47:56 +0100 -Subject: [PATCH 062/150] rpi-ft5406: Add touchscreen driver for pi LCD display +Subject: [PATCH 062/165] 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 @@ -95039,10 +95040,10 @@ index 30fb37fe175df604a738258a2a632bca3bfff33f..4a3d79d3b48eb483a4e4bf498f617515 RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From 12dbdcc2fc0f3a2a190f7a96fd32e3cae2b06fbe Mon Sep 17 00:00:00 2001 +From 5818708586c901f066d91d8b56ad0cb77bbf4690 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 28 Nov 2016 16:50:04 +0000 -Subject: [PATCH 063/150] Improve __copy_to_user and __copy_from_user +Subject: [PATCH 063/165] Improve __copy_to_user and __copy_from_user performance Provide a __copy_from_user that uses memcpy. On BCM2708, use @@ -96617,10 +96618,10 @@ index 333dc3c2e5ffbb2c5ab8fcfb6115b6162643cf20..46b787a6474ffa857da9b663948863ec bool "Broadcom BCM63xx DSL SoC" depends on ARCH_MULTI_V7 -From 0db5a9c2c3f24c992b0a8b09c4f9875aff9e8706 Mon Sep 17 00:00:00 2001 +From 6b1b3a3ef75add34389b359f40c1940fc7cd63fe Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 25 Jun 2015 12:16:11 +0100 -Subject: [PATCH 064/150] gpio-poweroff: Allow it to work on Raspberry Pi +Subject: [PATCH 064/165] 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 @@ -96655,10 +96656,10 @@ index be3d81ff51cc3f510d85e4eed7a52960e51e7bc1..a030ae9fb1fca325061c093696e82186 "%s: pm_power_off function already registered", __func__); -From dadaf95138bf3fd42d3028f94b006143132c0191 Mon Sep 17 00:00:00 2001 +From f314149d428e7a455693fc1083dbec50946deea2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 14:32:47 +0100 -Subject: [PATCH 065/150] mfd: Add Raspberry Pi Sense HAT core driver +Subject: [PATCH 065/165] mfd: Add Raspberry Pi Sense HAT core driver --- drivers/input/joystick/Kconfig | 8 + @@ -97523,10 +97524,10 @@ index 0000000000000000000000000000000000000000..56196dc2af10e464a1e3f98b028dca1c + +#endif -From 879ce76fe0a8184a9db36e7092544ab3d5b1b9e6 Mon Sep 17 00:00:00 2001 +From 49bcd5a2235a3263cb1eadcc2c8341bbb5ced3f7 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 -Subject: [PATCH 066/150] ASoC: Add support for HifiBerry DAC +Subject: [PATCH 066/165] ASoC: Add support for HifiBerry DAC This adds a machine driver for the HifiBerry DAC. It is a sound card that can @@ -97701,10 +97702,10 @@ index 0000000000000000000000000000000000000000..ee9f133953544629282631e5ef3f73fe +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); -From 7e921e79cd61712157fc89f006c0a4abfa540696 Mon Sep 17 00:00:00 2001 +From 1bda67aead6bdf783fba311a76a8c7bc89998f1e Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 25 Jan 2016 15:48:59 +0000 -Subject: [PATCH 067/150] ASoC: Add support for Rpi-DAC +Subject: [PATCH 067/165] ASoC: Add support for Rpi-DAC --- sound/soc/bcm/Kconfig | 7 +++ @@ -97988,10 +97989,10 @@ index 0000000000000000000000000000000000000000..afe1b419582aa40c4b2729d242bb13cd +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From 1e09cfdb073d536b57e5dc774d0e4141f26dcffa Mon Sep 17 00:00:00 2001 +From 1b6f27f9343dde5378cc30d5ac8e6d5188b6434d Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 -Subject: [PATCH 068/150] ASoC: wm8804: Implement MCLK configuration options, +Subject: [PATCH 068/165] 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 @@ -98040,10 +98041,10 @@ index af95d648265b3e92e345101542b332aee35191d4..513f56ba132929662802d15cdc653af3 .component_driver = { .dapm_widgets = wm8804_dapm_widgets, -From 52195477c717b4447a30950e0ecadb6e5b023fe8 Mon Sep 17 00:00:00 2001 +From 4203d8a7ecc11940a0ee32e252a4e8eb1e300be9 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 -Subject: [PATCH 069/150] ASoC: BCM:Add support for HiFiBerry Digi. Driver is +Subject: [PATCH 069/165] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patched WM8804 driver. Signed-off-by: Daniel Matuschek @@ -98387,10 +98388,10 @@ index 0000000000000000000000000000000000000000..7620dd02de40b6d644ff038b445d375d +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); -From 9167d661cd7dfffc95466047de1da73649acef65 Mon Sep 17 00:00:00 2001 +From ec2fa327814dd534f249f561f4b7733474018e08 Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 -Subject: [PATCH 070/150] Add IQaudIO Sound Card support for Raspberry Pi +Subject: [PATCH 070/165] Add IQaudIO Sound Card support for Raspberry Pi Set a limit of 0dB on Digital Volume Control @@ -98725,10 +98726,10 @@ index 0000000000000000000000000000000000000000..1ee4097c846376666775272ed692ca33 +MODULE_DESCRIPTION("ASoC Driver for IQAudio DAC"); +MODULE_LICENSE("GPL v2"); -From 301e8327c483088177bceb0321009ec323859493 Mon Sep 17 00:00:00 2001 +From 98d8d9f0157769a6accc0f9a97c0858c049ce420 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 10:06:56 +0200 -Subject: [PATCH 071/150] Added support for HiFiBerry DAC+ +Subject: [PATCH 071/165] 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. @@ -99358,10 +99359,10 @@ index 72b19e62f6267698aea45d2410d616d91c1825cb..c6839ef6e16754ed9de2698507b8986a dev_err(dev, "No LRCLK?\n"); return -EINVAL; -From f11eecb7b64146142b5ec4743eff96ad07deb6c4 Mon Sep 17 00:00:00 2001 +From 7bb18adf89ee8b0c875e00b2656258e81e8cfb46 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 11:09:58 +0200 -Subject: [PATCH 072/150] Added driver for HiFiBerry Amp amplifier add-on board +Subject: [PATCH 072/165] 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. @@ -100196,10 +100197,10 @@ index 0000000000000000000000000000000000000000..8f019e04898754d2f87e9630137be9e8 + +#endif /* _TAS5713_H */ -From a6100cc973f3a03a8f5ca3ee907a42f9a1bc8517 Mon Sep 17 00:00:00 2001 +From 4a149107af657bdcc1af318bf22aa07d81575bd2 Mon Sep 17 00:00:00 2001 From: Ryan Coe Date: Sat, 31 Jan 2015 18:25:49 -0700 -Subject: [PATCH 073/150] Update ds1307 driver for device-tree support +Subject: [PATCH 073/165] Update ds1307 driver for device-tree support Signed-off-by: Ryan Coe --- @@ -100226,10 +100227,10 @@ index 4ad97be480430babc3321075f2739114eaad8f04..2ac1c265dc9cea56a5949eb537949a1f .driver = { .name = "rtc-ds1307", -From 89ce5a9ebf767d4fdec28695b9a7414bfa347258 Mon Sep 17 00:00:00 2001 +From d386b7729bf018e7af5d2c9d97d9cae64b7ca7ed Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 25 Mar 2015 09:26:17 +0100 -Subject: [PATCH 074/150] Add driver for rpi-proto +Subject: [PATCH 074/165] 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 @@ -100444,10 +100445,10 @@ index 0000000000000000000000000000000000000000..fadbfade100228aaafabb0d3bdf35c01 +MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to PROTO board (WM8731)"); +MODULE_LICENSE("GPL"); -From b56677c7d2f69587c080bb827e912c94e0317622 Mon Sep 17 00:00:00 2001 +From 50df58347caf99a91c63ec69fbabc478c05be006 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:03:47 +0100 -Subject: [PATCH 075/150] RaspiDAC3 support +Subject: [PATCH 075/165] RaspiDAC3 support Signed-off-by: Jan Grulich @@ -100690,10 +100691,10 @@ index 0000000000000000000000000000000000000000..ad2b5b89bc8213dc2e277306ef50d6e3 +MODULE_DESCRIPTION("ASoC Driver for RaspiDAC Rev.3x"); +MODULE_LICENSE("GPL v2"); -From fda8de87fe56328e0c2db342aba4d22141b3d6ab Mon Sep 17 00:00:00 2001 +From 01d97e660859bbaf61ec25005d26327106eb7c1b Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Thu, 7 Apr 2016 21:26:21 +0100 -Subject: [PATCH 076/150] Add Support for JustBoom Audio boards +Subject: [PATCH 076/165] Add Support for JustBoom Audio boards justboom-dac: Adjust for ALSA API change @@ -101149,10 +101150,10 @@ index 0000000000000000000000000000000000000000..909cf8928f2f4313982316f9c5b8a709 +MODULE_DESCRIPTION("ASoC Driver for JustBoom PI Digi HAT Sound Card"); +MODULE_LICENSE("GPL v2"); -From 19304e17350389cf286834b934fb0a16e234db67 Mon Sep 17 00:00:00 2001 +From ac95f6f251a9c713127de621c82fda3e232ae663 Mon Sep 17 00:00:00 2001 From: Andrey Grodzovsky Date: Tue, 3 May 2016 22:10:59 -0400 -Subject: [PATCH 077/150] ARM: adau1977-adc: Add basic machine driver for +Subject: [PATCH 077/165] ARM: adau1977-adc: Add basic machine driver for adau1977 codec driver. This commit adds basic support for the codec usage including: Device tree overlay, @@ -101334,10 +101335,10 @@ index 0000000000000000000000000000000000000000..f3d7e5db7bb912e1d7ca6f8e8d42df5f +MODULE_DESCRIPTION("ASoC Driver for ADAU1977 ADC"); +MODULE_LICENSE("GPL v2"); -From 9c11e69322957bbf2493eb225fa9e758462979e6 Mon Sep 17 00:00:00 2001 +From f18cd7471ca951c2b19a6078d27d7e3401aa6e11 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Mon, 16 May 2016 21:36:31 +1000 -Subject: [PATCH 078/150] New AudioInjector.net Pi soundcard with low jitter +Subject: [PATCH 078/165] 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. @@ -101588,10 +101589,10 @@ index 0000000000000000000000000000000000000000..ef54e0f07ea03f59e9957b5d98f3e7fd +MODULE_ALIAS("platform:audioinjector-pi-soundcard"); + -From 00bf028d6bde5775143388b29684a94a3fcd3cb8 Mon Sep 17 00:00:00 2001 +From 16b653a5097cd5a1c04febf4bc0f5e3bd362b4e5 Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Thu, 30 Jun 2016 18:38:42 +0100 -Subject: [PATCH 079/150] Add IQAudIO Digi WM8804 board support +Subject: [PATCH 079/165] Add IQAudIO Digi WM8804 board support Support IQAudIO Digi board with iqaudio_digi machine driver and iqaudio-digi-wm8804-audio overlay. @@ -101891,10 +101892,10 @@ index 0000000000000000000000000000000000000000..33aa2be8a43a12a12cfb5d844dd9732c +MODULE_DESCRIPTION("ASoC Driver for IQAudIO WM8804 Digi"); +MODULE_LICENSE("GPL v2"); -From c232845bec8b96e703a5fa4df769a7eeb043d5e9 Mon Sep 17 00:00:00 2001 +From b6dae67e4cad0b02c1a96724fb64a582050b28d1 Mon Sep 17 00:00:00 2001 From: escalator2015 Date: Tue, 24 May 2016 16:20:09 +0100 -Subject: [PATCH 080/150] New driver for RRA DigiDAC1 soundcard using WM8741 + +Subject: [PATCH 080/165] New driver for RRA DigiDAC1 soundcard using WM8741 + WM8804 --- @@ -102367,10 +102368,10 @@ index 0000000000000000000000000000000000000000..f200688bb4ae32b90a0ced555aed94b0 +MODULE_DESCRIPTION("ASoC Driver for RRA DigiDAC1"); +MODULE_LICENSE("GPL v2"); -From 87b7e9ed0dcb29a656cab2edc17c650d9fa1f709 Mon Sep 17 00:00:00 2001 +From 70c86519d56cecf0d2a737618d38473cbb3e244c Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Sat, 2 Jul 2016 16:26:19 +0100 -Subject: [PATCH 081/150] Add support for Dion Audio LOCO DAC-AMP HAT +Subject: [PATCH 081/165] Add support for Dion Audio LOCO DAC-AMP HAT Using dedicated machine driver and pcm5102a codec driver. @@ -102543,10 +102544,10 @@ index 0000000000000000000000000000000000000000..65e03741d349a2dc5bd91f69855ea952 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO"); +MODULE_LICENSE("GPL v2"); -From fe2aefea2964c92668d7b70130fed4e2ccbd6537 Mon Sep 17 00:00:00 2001 +From e1693ecb2428bbfed103e59500c4b4025e4c7812 Mon Sep 17 00:00:00 2001 From: Clive Messer Date: Mon, 19 Sep 2016 14:01:04 +0100 -Subject: [PATCH 082/150] Allo Piano DAC boards: Initial 2 channel (stereo) +Subject: [PATCH 082/165] 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, @@ -102753,10 +102754,10 @@ index 0000000000000000000000000000000000000000..eaf50fb6dbca1970ae1c6f8662088b0f +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC"); +MODULE_LICENSE("GPL v2"); -From 8a499717a13372304fd7a0368cff9c0c888384fb Mon Sep 17 00:00:00 2001 +From b995663e0332cb0daa1463dba5f64619ae94ffcb Mon Sep 17 00:00:00 2001 From: gtrainavicius Date: Sun, 23 Oct 2016 12:06:53 +0300 -Subject: [PATCH 083/150] Support for Blokas Labs pisound board +Subject: [PATCH 083/165] Support for Blokas Labs pisound board Pisound dynamic overlay (#1760) @@ -103955,10 +103956,10 @@ index 0000000000000000000000000000000000000000..06ff1e53dc9d860946965b6303577762 +MODULE_DESCRIPTION("ASoC Driver for pisound, http://blokas.io/pisound"); +MODULE_LICENSE("GPL v2"); -From d292bce15d11c21458b30b2b4e4eaa992a33c653 Mon Sep 17 00:00:00 2001 +From e77c3d78825e40c441047887d354f7525a19a611 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 22 Jan 2017 12:49:37 +0100 -Subject: [PATCH 084/150] ASoC: Add driver for Cirrus Logic Audio Card +Subject: [PATCH 084/165] 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 @@ -105023,10 +105024,10 @@ index 0000000000000000000000000000000000000000..ac8651ddff7bd3701dffe22c7fb88352 +MODULE_DESCRIPTION("ASoC driver for Cirrus Logic Audio Card"); +MODULE_LICENSE("GPL"); -From b4da1986d0050504f716cfad4489d5dcef68dafd Mon Sep 17 00:00:00 2001 +From 64a469b73e0b90f821ef39c74e683a5ddac3f8f0 Mon Sep 17 00:00:00 2001 From: Miquel Date: Fri, 24 Feb 2017 20:51:06 +0100 -Subject: [PATCH 085/150] sound: Support for Dion Audio LOCO-V2 DAC-AMP HAT +Subject: [PATCH 085/165] sound: Support for Dion Audio LOCO-V2 DAC-AMP HAT Signed-off-by: Miquel Blauw --- @@ -105220,10 +105221,10 @@ index 0000000000000000000000000000000000000000..a009c49477972a9832175d86f201b035 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO-V2"); +MODULE_LICENSE("GPL v2"); -From 0376755222b69df9cca27cd54d32f979ecb0cc00 Mon Sep 17 00:00:00 2001 +From a6bdc87e9ccb8f8cd1973767c81610720b0da45f Mon Sep 17 00:00:00 2001 From: Fe-Pi Date: Wed, 1 Mar 2017 04:42:43 -0700 -Subject: [PATCH 086/150] Add support for Fe-Pi audio sound card. (#1867) +Subject: [PATCH 086/165] 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. @@ -105437,10 +105438,10 @@ index 0000000000000000000000000000000000000000..015b56fd73cc36be5b5eecd17548fd03 +MODULE_DESCRIPTION("ASoC Driver for Fe-Pi Audio"); +MODULE_LICENSE("GPL v2"); -From f0f57e2ed20bfbcefec27f37fba372024594563b Mon Sep 17 00:00:00 2001 +From 70d336fd5ba0a544056a791c279983ab7da6036d Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Mar 2017 20:04:13 +1100 -Subject: [PATCH 087/150] Add support for the AudioInjector.net Octo sound card +Subject: [PATCH 087/165] Add support for the AudioInjector.net Octo sound card --- sound/soc/bcm/Kconfig | 7 + @@ -105780,10 +105781,10 @@ index 0000000000000000000000000000000000000000..9effea725798640887755dfa688da453 +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:audioinjector-octo-soundcard"); -From d7f19796cf4d8fbabe08e0e779ace4b513b30829 Mon Sep 17 00:00:00 2001 +From f68eb19ebf3a0566d9d80bbb055a8bc28e073b7b Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 21 Oct 2015 14:55:21 +0100 -Subject: [PATCH 088/150] rpi_display: add backlight driver and overlay +Subject: [PATCH 088/165] 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 @@ -105952,10 +105953,10 @@ index 0000000000000000000000000000000000000000..14a0d9b037395497c1fdae2961feccd5 +MODULE_DESCRIPTION("Raspberry Pi mailbox based Backlight Driver"); +MODULE_LICENSE("GPL"); -From 712257d81b5d923d9292739401a624cbe14313b4 Mon Sep 17 00:00:00 2001 +From 0fb6a814bc3b9507464eb8a046adf37a30debc3e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 23 Feb 2016 19:56:04 +0000 -Subject: [PATCH 089/150] bcm2835-virtgpio: Virtual GPIO driver +Subject: [PATCH 089/165] bcm2835-virtgpio: Virtual GPIO driver Add a virtual GPIO driver that uses the firmware mailbox interface to request that the VPU toggles LEDs. @@ -106229,10 +106230,10 @@ index 4a3d79d3b48eb483a4e4bf498f617515e3ad158f..5f34e1257117fb48013c9926a8a223d6 RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From b1176c31fd12cf6bcd755eda12ea4eebe89d47c5 Mon Sep 17 00:00:00 2001 +From 0fa4ceb300a845b20a199b3dae01047477736c13 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 20 Feb 2017 17:01:21 +0000 -Subject: [PATCH 090/150] bcm2835-gpio-exp: Driver for GPIO expander via +Subject: [PATCH 090/165] bcm2835-gpio-exp: Driver for GPIO expander via mailbox service Pi3 and Compute Module 3 have a GPIO expander that the @@ -106560,10 +106561,10 @@ index 5f34e1257117fb48013c9926a8a223d64a598ab7..c819c21b0158a59c1308882e5a40e3f3 /* Dispmanx TAGS */ RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001, -From 419172a262c4c982a893c17d398036a72213c46f Mon Sep 17 00:00:00 2001 +From d73039233e0664fa7d0207d2ad318891d3cb4872 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 23 Feb 2016 17:26:48 +0000 -Subject: [PATCH 091/150] amba_pl011: Don't use DT aliases for numbering +Subject: [PATCH 091/165] 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 @@ -106575,10 +106576,10 @@ use the same logic. 1 file changed, 5 insertions(+) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c -index b0a377725d636c11cddad62470d821a31f1fff96..5c18e1c2851cd8b20f7a32328def14b209490d9a 100644 +index f2503d862f3aee25396ef002ba69968896316779..a85e81245004e928fc52ec59044e151b7f183496 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -2567,7 +2567,12 @@ static int pl011_setup_port(struct device *dev, struct uart_amba_port *uap, +@@ -2582,7 +2582,12 @@ static int pl011_setup_port(struct device *dev, struct uart_amba_port *uap, if (IS_ERR(base)) return PTR_ERR(base); @@ -106592,10 +106593,10 @@ index b0a377725d636c11cddad62470d821a31f1fff96..5c18e1c2851cd8b20f7a32328def14b2 uap->old_cr = 0; uap->port.dev = dev; -From 1a2cd91875178015847c0a0b99e694b55025a5af Mon Sep 17 00:00:00 2001 +From 8a8978e045b1b1a2553f467e461914348d9478c6 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 1 Mar 2017 16:07:39 +0000 -Subject: [PATCH 092/150] amba_pl011: Round input clock up +Subject: [PATCH 092/165] 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 @@ -106619,7 +106620,7 @@ Signed-off-by: Phil Elwell 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c -index 5c18e1c2851cd8b20f7a32328def14b209490d9a..bf58c13d9894a8bed333c35774dcb4736970b760 100644 +index a85e81245004e928fc52ec59044e151b7f183496..380d2c2e19ae3720924e906261b487adcf39835c 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -1674,6 +1674,23 @@ static void pl011_put_poll_char(struct uart_port *port, @@ -106664,7 +106665,7 @@ index 5c18e1c2851cd8b20f7a32328def14b209490d9a..bf58c13d9894a8bed333c35774dcb473 if (uap->vendor->fixed_options) { baud = uap->fixed_baud; -@@ -2498,6 +2515,7 @@ static struct uart_driver amba_reg = { +@@ -2513,6 +2530,7 @@ static struct uart_driver amba_reg = { .cons = AMBA_CONSOLE, }; @@ -106672,7 +106673,7 @@ index 5c18e1c2851cd8b20f7a32328def14b209490d9a..bf58c13d9894a8bed333c35774dcb473 static int pl011_probe_dt_alias(int index, struct device *dev) { struct device_node *np; -@@ -2529,6 +2547,7 @@ static int pl011_probe_dt_alias(int index, struct device *dev) +@@ -2544,6 +2562,7 @@ static int pl011_probe_dt_alias(int index, struct device *dev) return ret; } @@ -106681,10 +106682,10 @@ index 5c18e1c2851cd8b20f7a32328def14b209490d9a..bf58c13d9894a8bed333c35774dcb473 /* unregisters the driver also if no more ports are left */ static void pl011_unregister_port(struct uart_amba_port *uap) -From 3b145a52aef8960ee624c1083b25d11933f94022 Mon Sep 17 00:00:00 2001 +From 74c653d482da42e6aba7f99cc823b2d01dc02aaa Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 3 Dec 2014 13:23:28 +0200 -Subject: [PATCH 093/150] OF: DT-Overlay configfs interface +Subject: [PATCH 093/165] 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. @@ -107116,10 +107117,10 @@ index 0000000000000000000000000000000000000000..0037e6868a6cda8706c88194c6a4454b +} +late_initcall(of_cfs_init); -From 00a50a6f23613422da91288be618b3654b800b92 Mon Sep 17 00:00:00 2001 +From effcd07f73d479a6511ee68707de719220e99823 Mon Sep 17 00:00:00 2001 From: Cheong2K Date: Fri, 26 Feb 2016 18:20:10 +0800 -Subject: [PATCH 094/150] brcm: adds support for BCM43341 wifi +Subject: [PATCH 094/165] brcm: adds support for BCM43341 wifi brcmfmac: Disable power management @@ -107270,10 +107271,10 @@ index 65689469c5a12e2fcfd6123ca584944da79ec184..4886dc29ad36705210bed20757ce09ed BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43362_CHIP_ID, 0xFFFFFFFE, 43362), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4339_CHIP_ID, 0xFFFFFFFF, 4339), -From 8a8ebc0a1b37bd58daec6ccc63d7166824fa3c98 Mon Sep 17 00:00:00 2001 +From 1320537ec6b1f68a2d2c98a5a021af072bfe52b4 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 17 Feb 2017 15:26:13 +0000 -Subject: [PATCH 095/150] brcmfmac: Mute expected startup 'errors' +Subject: [PATCH 095/165] brcmfmac: Mute expected startup 'errors' The brcmfmac WiFi driver always complains about the '00' country code and the firmware version is reported as an error. Modify the driver to @@ -107312,10 +107313,10 @@ index 6221b046bca44211e2dfac24119097f7ac09e829..634602e0c44f91da06db7aa803dbee69 /* locate firmware version number for ethtool */ ptr = strrchr(buf, ' ') + 1; -From 86f421cf81c7921553471c46c9baa0ef9c1065cc Mon Sep 17 00:00:00 2001 +From cc7b61dbf910489fbc3eafab91dc3885b04e6121 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Dec 2015 13:37:07 +0000 -Subject: [PATCH 096/150] hci_h5: Don't send conf_req when ACTIVE +Subject: [PATCH 096/165] 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. @@ -107338,24 +107339,24 @@ index 90d0456b67446bcc624fab4b1542c4eaf21531b1..f9adeac3bbba6418dcca298c55706356 if (H5_HDR_LEN(hdr) > 2) h5->tx_win = (data[2] & 0x07); -From e8ae5637fb688a82e30db4ce2308ba728274cd12 Mon Sep 17 00:00:00 2001 +From 74f96671805d1329a6f032906d2671c2a678e053 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 13 Apr 2015 17:16:29 +0100 -Subject: [PATCH 097/150] config: Add default configs +Subject: [PATCH 097/165] config: Add default configs --- - arch/arm/configs/bcm2709_defconfig | 1310 +++++++++++++++++++++++++++++++++++ + arch/arm/configs/bcm2709_defconfig | 1309 +++++++++++++++++++++++++++++++++++ arch/arm/configs/bcmrpi_defconfig | 1317 ++++++++++++++++++++++++++++++++++++ - 2 files changed, 2627 insertions(+) + 2 files changed, 2626 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..4f038004cb7ae7b6d9a54d9a743686e92d0e6389 +index 0000000000000000000000000000000000000000..667755d0d8bcf6dd39fc80e19696a120ea61fe01 --- /dev/null +++ b/arch/arm/configs/bcm2709_defconfig -@@ -0,0 +1,1310 @@ +@@ -0,0 +1,1309 @@ +CONFIG_LOCALVERSION="-v7" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_SYSVIPC=y @@ -107923,7 +107924,6 @@ index 0000000000000000000000000000000000000000..4f038004cb7ae7b6d9a54d9a743686e9 +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ADS7846=m +CONFIG_TOUCHSCREEN_EGALAX=m -+CONFIG_TOUCHSCREEN_EKTF2127=m +CONFIG_TOUCHSCREEN_RPI_FT5406=m +CONFIG_TOUCHSCREEN_USB_COMPOSITE=m +CONFIG_TOUCHSCREEN_STMPE=m @@ -109990,10 +109990,10 @@ index 0000000000000000000000000000000000000000..046f3e8757ef0f794c802171690528d3 +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -From 13f4a2a2d8ee275ae22f3c50a948576a359ac15a Mon Sep 17 00:00:00 2001 +From 7108a6c4ae059e0eb29be9b135245bf3f2d09840 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Wed, 24 Aug 2016 03:35:56 -0700 -Subject: [PATCH 098/150] Add arm64 configuration and device tree differences. +Subject: [PATCH 098/165] Add arm64 configuration and device tree differences. Disable MMC_BCM2835_SDHOST and MMC_BCM2835 since these drivers are crashing at the moment. @@ -111408,10 +111408,10 @@ index 0000000000000000000000000000000000000000..e6b09fafa27eed2b762e3d53b55041f7 +CONFIG_LIBCRC32C=y +CONFIG_BCM2835_VCHIQ=n -From 0174ff8893ec2735faf31817b7d45f3e9388d57c Mon Sep 17 00:00:00 2001 +From b90de4bf27dc5f62e60dad127169218c6d830649 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:18:09 +0100 -Subject: [PATCH 099/150] raspberrypi-firmware: Define the MBOX channel in the +Subject: [PATCH 099/165] raspberrypi-firmware: Define the MBOX channel in the header. Signed-off-by: Eric Anholt @@ -111433,10 +111433,10 @@ index c819c21b0158a59c1308882e5a40e3f3fe73cbdf..de2a3dcd562beb752266eaf0070e5586 enum rpi_firmware_property_status { -From 4f19018f654367defc2dee4e39dd594937710091 Mon Sep 17 00:00:00 2001 +From fbcb1aa2507b4d4b0e47310e79c16ced1d3c36c2 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:16:19 +0100 -Subject: [PATCH 100/150] raspberrypi-firmware: Export the general transaction +Subject: [PATCH 100/165] raspberrypi-firmware: Export the general transaction function. The vc4-firmware-kms module is going to be doing the MBOX FB call. @@ -111480,10 +111480,10 @@ index de2a3dcd562beb752266eaf0070e55861d553f5f..dc7fd58afd5dddebf9b17065bb069a1d #endif /* __SOC_RASPBERRY_FIRMWARE_H__ */ -From 0d6908b0f4d26a9df9e5d2ea547f3249ac43941c Mon Sep 17 00:00:00 2001 +From b1ee95c4f890ff8efedd86c367d8e33133eb6dcd Mon Sep 17 00:00:00 2001 From: Electron752 Date: Thu, 12 Jan 2017 07:07:08 -0800 -Subject: [PATCH 101/150] ARM64: Make it work again on 4.9 (#1790) +Subject: [PATCH 101/165] 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. @@ -111887,10 +111887,10 @@ index e6b09fafa27eed2b762e3d53b55041f793683d27..c7e891d72969a388d9b135a36dbfc9c9 CONFIG_LIBCRC32C=y -CONFIG_BCM2835_VCHIQ=n -From cebe1d060056bff98ee836be6b7faa90e7fcfa6c Mon Sep 17 00:00:00 2001 +From 6d08a630ee3d0f12214ebc127b923e7b45143d5b Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Thu, 12 Jan 2017 19:10:07 -0800 -Subject: [PATCH 102/150] ARM64: Enable HDMI audio and vc04_services in +Subject: [PATCH 102/165] ARM64: Enable HDMI audio and vc04_services in bcmrpi3_defconfig Signed-off-by: Michael Zoran @@ -111919,10 +111919,10 @@ index c7e891d72969a388d9b135a36dbfc9c9cb609bf8..4b90f9b64abe9f089ba56b13d5a00de3 CONFIG_BCM2835_MBOX=y # CONFIG_IOMMU_SUPPORT is not set -From ac08f600d8a937c85c2c68cef986c9235929aec6 Mon Sep 17 00:00:00 2001 +From d53026029509dbe88b1b77064fbeb5d4a2537a28 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Thu, 12 Jan 2017 19:14:03 -0800 -Subject: [PATCH 103/150] ARM64: Run bcmrpi3_defconfig through savedefconfig. +Subject: [PATCH 103/165] ARM64: Run bcmrpi3_defconfig through savedefconfig. Signed-off-by: Michael Zoran --- @@ -111967,10 +111967,10 @@ index 4b90f9b64abe9f089ba56b13d5a00de33343bfb9..dac962ca1634662ce7d966f1ffb53b5b CONFIG_FB_TFT_AGM1264K_FL=m CONFIG_FB_TFT_BD663474=m -From ff55f87bbb33fec296221f71a5bb6ac1b5b76ebf Mon Sep 17 00:00:00 2001 +From bf7dcc1e405a45a9fff42eccb14725ce6f7f1a5b Mon Sep 17 00:00:00 2001 From: Electron752 Date: Sat, 14 Jan 2017 02:54:26 -0800 -Subject: [PATCH 104/150] ARM64: Enable Kernel Address Space Randomization +Subject: [PATCH 104/165] ARM64: Enable Kernel Address Space Randomization (#1792) Randomization allows the mapping between virtual addresses and physical @@ -112002,10 +112002,10 @@ index dac962ca1634662ce7d966f1ffb53b5bfa27c506..aae33b4b3c3e736ea7cd3ca242158ad6 CONFIG_BINFMT_MISC=y CONFIG_COMPAT=y -From 65c410c8488b1450345fc2b93886cdc2c95b0445 Mon Sep 17 00:00:00 2001 +From f887a82633699721d6bf9b19e321ee5b8afccee3 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sun, 15 Jan 2017 07:31:59 -0800 -Subject: [PATCH 105/150] ARM64: Enable RTL8187/RTL8192CU wifi in build config +Subject: [PATCH 105/165] 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 @@ -112030,10 +112030,10 @@ index aae33b4b3c3e736ea7cd3ca242158ad6ba558aff..b7d762df19b85e369a32cd823dfd0621 CONFIG_ZD1211RW=m CONFIG_MAC80211_HWSIM=m -From 1c77f8fe78ddbb323a13efd25fa9ae01f8e3e021 Mon Sep 17 00:00:00 2001 +From 763f1f03048de2c892e60be3c36142386744eba9 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:33:51 -0800 -Subject: [PATCH 106/150] ARM64/DWC_OTG: Port dwc_otg driver to ARM64 +Subject: [PATCH 106/165] 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 @@ -112376,10 +112376,10 @@ index 6b2c7d0c93f36a63863ff4b0ecc1f3eab77e058b..d7b700ff17821ad1944e36721fe6b2db /** The OS page size */ #define DWC_OS_PAGE_SIZE PAGE_SIZE -From e26cb3242b62036bcb045f0d106be2a56201c481 Mon Sep 17 00:00:00 2001 +From 407532599b884cc5524844efe873f76e291183a9 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:43:57 -0800 -Subject: [PATCH 107/150] ARM64: Round-Robin dispatch IRQs between CPUs. +Subject: [PATCH 107/165] 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 @@ -112453,10 +112453,10 @@ index c4e151451cf8c8ebde5225515eac2786d6f61d46..9a7ee04ee0d9b7aa734cf3159ed59c19 .name = "bcm2836-gpu", .irq_mask = bcm2836_arm_irqchip_mask_gpu_irq, -From 339cdc462b3a88cb9277df7ee3348e279d3c50e6 Mon Sep 17 00:00:00 2001 +From ee5f155c70f0b5cf2582896f7a728229a082b2b2 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:45:03 -0800 -Subject: [PATCH 108/150] ARM64: Enable DWC_OTG Driver In ARM64 Build +Subject: [PATCH 108/165] ARM64: Enable DWC_OTG Driver In ARM64 Build Config(bcmrpi3_defconfig) Signed-off-by: Michael Zoran @@ -112477,10 +112477,10 @@ index b7d762df19b85e369a32cd823dfd062145bdefa7..4d85c231c5ea0244e1b05fb4a5e3c8fd CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE_REALTEK=m -From 6a50b889780771cd02cf0e89cb17f1465ce697e3 Mon Sep 17 00:00:00 2001 +From 2c94c421e3c873bc0addf7a67b5ff0eaeae84e9d Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 11 Feb 2017 01:18:31 -0800 -Subject: [PATCH 109/150] ARM64: Force hardware emulation of deprecated +Subject: [PATCH 109/165] ARM64: Force hardware emulation of deprecated instructions. --- @@ -112488,7 +112488,7 @@ Subject: [PATCH 109/150] 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 657977e77ec8fa49e55fc9cacc1415db81a7cc2d..d16c807fd8c0728262b9495aab9948b626270b5b 100644 +index f0e6d717885b1fcf3b22f64c10c38f19c25f809d..0cb830d30fb6d2bd26ab572efe893649c7a28d3c 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) @@ -112508,10 +112508,10 @@ index 657977e77ec8fa49e55fc9cacc1415db81a7cc2d..d16c807fd8c0728262b9495aab9948b6 case INSN_OBSOLETE: insn->current_mode = INSN_UNDEF; -From 617d2ad61db426cb29c450bbab85126c3cb6b3fe Mon Sep 17 00:00:00 2001 +From d1316547f577d065c35731dc77ea0ce490dbf9ff Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 10 Feb 2017 17:57:08 -0800 -Subject: [PATCH 110/150] build/arm64: Add rules for .dtbo files for dts +Subject: [PATCH 110/165] build/arm64: Add rules for .dtbo files for dts overlays We now create overlays as .dtbo files. @@ -112536,36 +112536,10 @@ index b9a4a934ca057623e0ea436fd9b2c7c0f675fced..54e3c38d6fd877827541cdc798de035c dtbs: prepare scripts -From 9211fc5fc35fe77328ed0c7185a9318ff2b35f36 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Sun, 12 Mar 2017 20:34:54 +0000 -Subject: [PATCH 111/150] bcm2835-sdhost: Hack fix build - ---- - drivers/mmc/host/bcm2835-sdhost.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index a9bc79bfdbb71807819dfe2d8f1651445997f92a..3ed754f8903bbf8ee5a810f20d96bc633168e4b3 100644 ---- a/drivers/mmc/host/bcm2835-sdhost.c -+++ b/drivers/mmc/host/bcm2835-sdhost.c -@@ -53,6 +53,11 @@ - #include - #include - -+#include -+#define MMC_STATE_BLOCKADDR (1<<2) /* card uses block-addressing */ -+#define mmc_card_blockaddr(c) ((c)->state & MMC_STATE_BLOCKADDR) -+ -+ - #define DRIVER_NAME "sdhost-bcm2835" - - #define SDCMD 0x00 /* Command to SD card - 16 R/W */ - -From 5af8d437f88f917e92e867c6f18a0ad9e7bddca6 Mon Sep 17 00:00:00 2001 +From 4a20e8d76e9a40c89826b5c941d262bf8b2b5b72 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 9 May 2016 17:28:18 -0700 -Subject: [PATCH 112/150] clk: bcm2835: Mark GPIO clocks enabled at boot as +Subject: [PATCH 111/165] clk: bcm2835: Mark GPIO clocks enabled at boot as critical. These divide off of PLLD_PER and are used for the ethernet and wifi @@ -112603,10 +112577,10 @@ index 39f72da6ba1f6ec6ec41d5dc1bf46344aab008da..fe3298b54cdfb96bd90fb4f39e13921d * rate changes on at least of the parents. */ -From d98c728510542ee2b74a664bbef167224e48c894 Mon Sep 17 00:00:00 2001 +From fee1a777a468454a1a0c17e9a82a343e85d82d51 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 24 Feb 2015 13:40:50 +0000 -Subject: [PATCH 113/150] pinctrl-bcm2835: Fix interrupt handling for GPIOs +Subject: [PATCH 112/165] pinctrl-bcm2835: Fix interrupt handling for GPIOs 28-31 and 46-53 Contrary to the documentation, the BCM2835 GPIO controller actually has @@ -112639,10 +112613,10 @@ index 6351fe7f8e314ac5ebb102dd20847b383fd5b857..28745af5aadf3cb91fa7ff39118385c3 }, }; -From bdd7790b38da33f87061c06c2e5f4cfe50ddd2fe Mon Sep 17 00:00:00 2001 +From c7ce6e634f4a0d1b3d0d1d166713180902839087 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 7 Mar 2017 12:18:20 +0000 -Subject: [PATCH 114/150] BCM270X_DT: Invert Pi3 power LED to match fw change +Subject: [PATCH 113/165] BCM270X_DT: Invert Pi3 power LED to match fw change Firmware expgpio driver reworked due to complaint over hotplug detect. @@ -112668,10 +112642,10 @@ index 616cfd5c7094596b497101e8feca25e25e77c3e8..9f001bccb8261563dcddd8dec94b056b }; -From 2789ac0dbf80b6df42974e3bbacc723cb5a3ba39 Mon Sep 17 00:00:00 2001 +From 75f8b9a38b6624dde4b999cbc83bbe19130739a4 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 14 Mar 2017 14:23:06 +0000 -Subject: [PATCH 115/150] bcm2835-gpio-exp: Copy/paste error adding base twice +Subject: [PATCH 114/165] bcm2835-gpio-exp: Copy/paste error adding base twice brcmexp_gpio_set was adding gpio->gc.base to the offset twice, so passing an invalid number to the mailbox service. @@ -112697,10 +112671,10 @@ index 681a91492d4c33bdfd42416e069218e8611cc4d9..d68adafaee4ad406f45f4ff0d6b7c1ad set.state = val; /* Output state */ -From e72aaca7d8ef75c9335eb7e8c9aefd345f6f03c6 Mon Sep 17 00:00:00 2001 +From d24c80387cf67b7ffcbcc639565e96ce7c356463 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 17 Mar 2017 13:40:41 +0000 -Subject: [PATCH 116/150] config: disable MMC driver temporarily for now. +Subject: [PATCH 115/165] config: disable MMC driver temporarily for now. Currently causes a breakage to sdhost driver. However when MMC is disabled Pi3 wifi will not work --- @@ -112709,10 +112683,10 @@ Currently causes a breakage to sdhost driver. However when MMC is disabled Pi3 w 2 files changed, 4 deletions(-) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 4f038004cb7ae7b6d9a54d9a743686e92d0e6389..324788beab7412a22fcaefc9de43b9f144f218eb 100644 +index 667755d0d8bcf6dd39fc80e19696a120ea61fe01..b6ef78d6af1b21758d82e8e906ec33b71426ab98 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig -@@ -1047,8 +1047,6 @@ CONFIG_USB_XUSBATM=m +@@ -1046,8 +1046,6 @@ CONFIG_USB_XUSBATM=m CONFIG_USB_GADGET=m CONFIG_MMC=y CONFIG_MMC_BLOCK_MINORS=32 @@ -112735,10 +112709,10 @@ index 046f3e8757ef0f794c802171690528d31fee9deb..f2e0a58a96c8550f110c5940bf65f4d0 CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_PLTFM=y -From 226d6e3cd55ed7d78155f5f42553f42ab2c07222 Mon Sep 17 00:00:00 2001 +From 96f2d1a55e0bdb62f286b18e8f5e461da921babc Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 17 Mar 2017 12:24:41 +0000 -Subject: [PATCH 117/150] config: Make spidev a loadable module +Subject: [PATCH 116/165] config: Make spidev a loadable module spidev isn't required early in the boot process, and not all users need it (spi_bcm2835 is a module), so make it a loadable module. @@ -112752,10 +112726,10 @@ Signed-off-by: Phil Elwell 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 324788beab7412a22fcaefc9de43b9f144f218eb..f969170c4d1d693795c1662d0271eba763ddc0df 100644 +index b6ef78d6af1b21758d82e8e906ec33b71426ab98..8198d4f73e231e49204b344ac296f818a8ae765b 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig -@@ -616,7 +616,7 @@ CONFIG_I2C_GPIO=m +@@ -615,7 +615,7 @@ CONFIG_I2C_GPIO=m CONFIG_SPI=y CONFIG_SPI_BCM2835=m CONFIG_SPI_BCM2835AUX=m @@ -112778,10 +112752,10 @@ index f2e0a58a96c8550f110c5940bf65f4d022cc4548..9eb7084f440c8aac0c6257ee678007c2 CONFIG_PPS_CLIENT_LDISC=m CONFIG_PPS_CLIENT_GPIO=m -From 9e4faee7474a829888a11aa72bdb1c7e06730b42 Mon Sep 17 00:00:00 2001 +From cff63b8e6aae76ad600b7dc0a46b9f409ebff536 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 10:06:56 +0000 -Subject: [PATCH 118/150] ASoC: Add prompt for ICS43432 codec +Subject: [PATCH 117/165] 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 @@ -112806,10 +112780,10 @@ index 55812b0b884cf4fc4e86680b11fedd11c863db7a..428dc05edbb99f50560b7f89e45501c5 config SND_SOC_INNO_RK3036 tristate "Inno codec driver for RK3036 SoC" -From 6a7e09fdc26bd7f00523840e15292f6af4e3e6e9 Mon Sep 17 00:00:00 2001 +From 38ce30a9437d8a22e0f8fbbcc6770802861a3b0d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 16:34:46 +0000 -Subject: [PATCH 119/150] bcm2835-aux: Add aux interrupt controller +Subject: [PATCH 118/165] 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 @@ -112973,10 +112947,10 @@ index bd750cf2238d61489811e7d7bd3b5f9950ed53c8..41e0702fae4692221980b0d02aed1ba6 BCM2835_AUX_CLOCK_COUNT, GFP_KERNEL); if (!onecell) -From be8eaf036332239887bfad01d222b487008877ed Mon Sep 17 00:00:00 2001 +From aefd0ad73439c7f093795d1a0c5729dcf55f0bf4 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 17:08:44 +0000 -Subject: [PATCH 120/150] BCM270X_DT: Enable AUX interrupt controller in DT +Subject: [PATCH 119/165] BCM270X_DT: Enable AUX interrupt controller in DT See: https://github.com/raspberrypi/linux/issues/1484 https://github.com/raspberrypi/linux/issues/1573 @@ -113029,10 +113003,10 @@ index 72cb9dc60ca9ad9aa2813972a299c50dcea7cd89..ca47b23ffbcd06063e0fb7072dc8a843 #address-cells = <1>; #size-cells = <0>; -From d5d03ebbdedd9932ca36d53b66ad281014677734 Mon Sep 17 00:00:00 2001 +From 9483134d159f1a7fa177df11bbb4f1d797c572eb Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 27 Mar 2017 17:40:45 +0100 -Subject: [PATCH 121/150] mkknlimg: Find some more downstream-only strings +Subject: [PATCH 120/165] mkknlimg: Find some more downstream-only strings See: https://github.com/raspberrypi/linux/issues/1920 @@ -113063,10 +113037,10 @@ index 60206de7fa9a49bd027c635306674a29a568652f..84be2593ec1de8f97b0167ff06b3e05d my $res = try_extract($kernel_file, $tmpfile1); -From a9d358fb540f0651536eb9f1b33d32a87157fca6 Mon Sep 17 00:00:00 2001 +From a410a7341c5993a2d7fa70a7608d2a5e51ed7023 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 29 Apr 2016 10:32:17 -0700 -Subject: [PATCH 122/150] mmc: read mmc alias from device tree +Subject: [PATCH 121/165] mmc: read mmc alias from device tree To get the SD/MMC host device ID, read the alias from the device tree. @@ -113123,10 +113097,10 @@ index 3f8c85d5aa094b43666904c7dbbe5e62c9763c19..4dbd0e8e27a496bfbe67d188cf795ecc kfree(host); return NULL; -From 713dc34bfd04c1e490fa139ae729198a9db8a41c Mon Sep 17 00:00:00 2001 +From 3bc30d8fa9cee67d3dc95bba2822c043ede22fff Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 29 Mar 2017 14:30:42 +0100 -Subject: [PATCH 123/150] BCM270X_DT: Add numbered aliases for SD/MMC devices +Subject: [PATCH 122/165] BCM270X_DT: Add numbered aliases for SD/MMC devices In order to force a specific ID assignment to SD/MMC devices, add numbered aliases to the DT: sdhost -> mmc0, mmc -> mmc1 @@ -113157,10 +113131,10 @@ index ef14e9ac6cd2092efb1681682dd2d3c52b8abfd5..693d4c04a36d2a7883cc3d8916bf0efb i2c2 = &i2c2; usb = &usb; -From b226cc10d1e62ca1d0b82d24392a14a5b2c69cce Mon Sep 17 00:00:00 2001 +From 314cc6a4ff0bee2460656e652230c96bb3a2365f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 29 Mar 2017 14:28:53 +0100 -Subject: [PATCH 124/150] config: Re-enable the bcm2835-mmc driver +Subject: [PATCH 123/165] config: Re-enable the bcm2835-mmc driver With the patch to assign mmc device IDs based on DT aliases and appropriate aliases in the rpi DTBs, it is now safe to re-enable @@ -113173,10 +113147,10 @@ Signed-off-by: Phil Elwell 2 files changed, 2 insertions(+) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index f969170c4d1d693795c1662d0271eba763ddc0df..1940c88c303dd644163195e13e865877d3cfe830 100644 +index 8198d4f73e231e49204b344ac296f818a8ae765b..8163d3cf93032b78fd90af7335b2d1d046a626ff 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig -@@ -1047,6 +1047,7 @@ CONFIG_USB_XUSBATM=m +@@ -1046,6 +1046,7 @@ CONFIG_USB_XUSBATM=m CONFIG_USB_GADGET=m CONFIG_MMC=y CONFIG_MMC_BLOCK_MINORS=32 @@ -113197,10 +113171,10 @@ index 9eb7084f440c8aac0c6257ee678007c23990a8ae..021c38a909e71baa135cbcd4f3fb80fa CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_PLTFM=y -From 845ebe4a7a5f89fda702be8ec72ac98ce9f3a248 Mon Sep 17 00:00:00 2001 +From 9b1b3ce0dc7c7f27cef3dba25ad955cb22194360 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 11 May 2016 12:50:33 +0100 -Subject: [PATCH 125/150] mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards +Subject: [PATCH 124/165] 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, @@ -113342,37 +113316,10 @@ index 77e61e0a216a2728dd5cfecf55299402ac03c384..d12e8ddd22cb96e38b30f1ac3f9a6bd0 unsigned int erase_shift; /* if erase unit is power 2 */ unsigned int pref_erase; /* in sectors */ -From a9a22a98903f6f2a2f92a780ac50e536b0b46533 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Wed, 29 Mar 2017 16:03:24 +0100 -Subject: [PATCH 126/150] Revert "bcm2835-sdhost: Hack fix build" - -This reverts commit e4e60ec9ccede5e084a74e65d206daf17dc1d0b1. ---- - drivers/mmc/host/bcm2835-sdhost.c | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index 3ed754f8903bbf8ee5a810f20d96bc633168e4b3..a9bc79bfdbb71807819dfe2d8f1651445997f92a 100644 ---- a/drivers/mmc/host/bcm2835-sdhost.c -+++ b/drivers/mmc/host/bcm2835-sdhost.c -@@ -53,11 +53,6 @@ - #include - #include - --#include --#define MMC_STATE_BLOCKADDR (1<<2) /* card uses block-addressing */ --#define mmc_card_blockaddr(c) ((c)->state & MMC_STATE_BLOCKADDR) -- -- - #define DRIVER_NAME "sdhost-bcm2835" - - #define SDCMD 0x00 /* Command to SD card - 16 R/W */ - -From 1a015a31bf89daad820bd634d8f4338265999a1f Mon Sep 17 00:00:00 2001 +From dc28578444c1a6061b5b2e955ea6c72dded34d79 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 29 Mar 2017 16:08:29 +0100 -Subject: [PATCH 127/150] bcm2835-sdhost: mmc_card_blockaddr fix +Subject: [PATCH 125/165] bcm2835-sdhost: mmc_card_blockaddr fix Get the definition of mmc_card_blockaddr from drivers/mmc/core/card.h. @@ -113399,10 +113346,10 @@ index a9bc79bfdbb71807819dfe2d8f1651445997f92a..9c6f199a7830959f31012d86bc1f8b1a #define SDCMD 0x00 /* Command to SD card - 16 R/W */ -From 95fc4c9a9ad573f2b4e3b6ec4c9ea65602f61a6e Mon Sep 17 00:00:00 2001 +From a490d319e2a4b625f43ef951e813ef7e55a61ece Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Mar 2017 12:30:37 +0000 -Subject: [PATCH 128/150] thermal: Compatible strings for bcm2836, bcm2837 +Subject: [PATCH 126/165] thermal: Compatible strings for bcm2836, bcm2837 The upstream dt-bindings documentation for bcm2835-thermal (which exists even though the driver isn't upstreamed) says to use @@ -113434,10 +113381,10 @@ index c63fb9f9d143e19612a18fe530c7b2b3518a22a4..25b78c3eac1503fbc9e679b963a6284b }; MODULE_DEVICE_TABLE(of, bcm2835_thermal_of_match_table); -From c0886a1ea925fbea9d548dacadce871b731173d0 Mon Sep 17 00:00:00 2001 +From f5e7579e3e30c30aa51c2656fb5b14c4340632db Mon Sep 17 00:00:00 2001 From: John Greb Date: Wed, 8 Mar 2017 15:12:29 +0000 -Subject: [PATCH 129/150] Match dwc2 device-tree fifo sizes to the hardware +Subject: [PATCH 127/165] Match dwc2 device-tree fifo sizes to the hardware values. Since commit aa381a7259c3f53727bcaa8c5f9359e940a0e3fd was reverted with 3fa9538539ac737096c81f3315a14670b1609092 the g-tx-fifo-size array in the device-tree needs to match the preset values in the bcm2835. @@ -113468,10 +113415,10 @@ index 527abc9f0ddf71f4dc7d58336d87684c931cc2f3..265a16bab008453edba198cf2366c423 }; }; -From cb03323c7dad8191cf043fe69917a61a55f78574 Mon Sep 17 00:00:00 2001 +From 57ef2ba796633d357d715589a6e6aa1caf0102b7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Mar 2017 09:10:05 +0000 -Subject: [PATCH 130/150] BCM270X_DT: Add lm75 to i2c-sensor overlay +Subject: [PATCH 128/165] BCM270X_DT: Add lm75 to i2c-sensor overlay See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=177236 @@ -113534,10 +113481,10 @@ index 31bda8da4cb6a56bfe493a81b918900995fb0589..606b2d5012abf2e85712be631c42ea40 }; }; -From c1f3635861a33abc98a784f184a6c6f9fb1e0764 Mon Sep 17 00:00:00 2001 +From 918e0a02e223d772231d38cc2548001ada0786ca Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 28 Mar 2017 14:22:20 +0100 -Subject: [PATCH 131/150] BCM270X_DT: Allow multiple instances of w1-gpio +Subject: [PATCH 129/165] BCM270X_DT: Allow multiple instances of w1-gpio overlays Upcoming firmware will modify the address portion of node names when @@ -113602,10 +113549,10 @@ index 66a98f6c9601f51483f27803995bec772bb3350e..ef8bfbcabdb31231075d5c281df3b38b <&w1_pins>,"brcm,pins:4"; pullup = <&w1>,"rpi,parasitic-power:0"; -From c974f348bff39d3b78e36401d1447d16979898f6 Mon Sep 17 00:00:00 2001 +From 6b1c9efba585009739f685193ec574217cc09844 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 28 Mar 2017 17:41:30 +0100 -Subject: [PATCH 132/150] leds-gpio: Remove stray assignment to brightness_set +Subject: [PATCH 130/165] leds-gpio: Remove stray assignment to brightness_set The brightness_set method is intended for use cases that must not block, and can only be used if the GPIO provider can never sleep. @@ -113631,10 +113578,10 @@ index 934cdb1d7bc7f12a4fb06a5c458ad76727c7b7c7..a4df27f6af35ba7f7b34c2a4b7b22ee7 if (template->default_state == LEDS_GPIO_DEFSTATE_KEEP) { state = gpiod_get_value_cansleep(led_dat->gpiod); -From 078fbe8618880de1a6790b9aafae43c55b6d1979 Mon Sep 17 00:00:00 2001 +From 230abfd651ae2522ea9d93f5c7b11a601039d350 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 29 Mar 2017 17:41:04 +0100 -Subject: [PATCH 133/150] config: Add back MMC_BCM2835_DMA +Subject: [PATCH 131/165] config: Add back MMC_BCM2835_DMA --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -113642,10 +113589,10 @@ Subject: [PATCH 133/150] config: Add back MMC_BCM2835_DMA 2 files changed, 2 insertions(+) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 1940c88c303dd644163195e13e865877d3cfe830..bd3ba38e69cfc0bdc70961298afb63dcd38f133b 100644 +index 8163d3cf93032b78fd90af7335b2d1d046a626ff..e565c344016c0bf87640853dc81cda074e3ab2ee 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig -@@ -1048,6 +1048,7 @@ CONFIG_USB_GADGET=m +@@ -1047,6 +1047,7 @@ CONFIG_USB_GADGET=m CONFIG_MMC=y CONFIG_MMC_BLOCK_MINORS=32 CONFIG_MMC_BCM2835=y @@ -113666,10 +113613,10 @@ index 021c38a909e71baa135cbcd4f3fb80fad2151647..a8fc96ef674be476d10e59aef2367def CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_PLTFM=y -From f4c24637c2e582891d11511e39c25f2f1e1b6066 Mon Sep 17 00:00:00 2001 +From 9f138eaa1f13ec6cfa8038041be38b866c5ec041 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Mon, 27 Mar 2017 22:26:49 +1100 -Subject: [PATCH 134/150] AudioInjector Octo: sample rates, regulators, reset +Subject: [PATCH 132/165] AudioInjector Octo: sample rates, regulators, reset This patch adds new sample rates to the Audioinjector Octo sound card. The new supported rates are (in kHz) : @@ -113835,10 +113782,10 @@ index 9effea725798640887755dfa688da45338718afc..dcf403ab37639ba79e38278d7e4b1ade dai->cpu_dai_name = NULL; dai->cpu_of_node = i2s_node; -From 5bcde3681658b147da8a2afebe3fc8cc7bc57e1e Mon Sep 17 00:00:00 2001 +From d70d42d5abbda9774fc9111950c64c5f802c4216 Mon Sep 17 00:00:00 2001 From: Peter Malkin Date: Mon, 27 Mar 2017 16:38:21 -0700 -Subject: [PATCH 135/150] Driver support for Google voiceHAT soundcard. +Subject: [PATCH 133/165] Driver support for Google voiceHAT soundcard. --- arch/arm/boot/dts/overlays/Makefile | 1 + @@ -113940,10 +113887,10 @@ index 0000000000000000000000000000000000000000..9a9e9a0ca28cf774a868b2882ae57b00 + }; +}; diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index bd3ba38e69cfc0bdc70961298afb63dcd38f133b..be903e66e95c97b16399ebfac8f6bedbeeb29663 100644 +index e565c344016c0bf87640853dc81cda074e3ab2ee..f68fc97d2a9c28154880b5d55ce90b0b0974acc6 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig -@@ -877,6 +877,7 @@ CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m +@@ -876,6 +876,7 @@ CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m CONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI=m CONFIG_SND_BCM2708_SOC_RASPIDAC3=m CONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m @@ -114343,10 +114290,10 @@ index 0000000000000000000000000000000000000000..225854b8e5298b3c3018f59a49404354 +MODULE_DESCRIPTION("ASoC Driver for Google voiceHAT SoundCard"); +MODULE_LICENSE("GPL v2"); -From b226f121085149815b6e1dcd13b9aebfb5615ad3 Mon Sep 17 00:00:00 2001 +From 9f310cc4f5cfde4c6ff8326feb26f3b2c20f4e97 Mon Sep 17 00:00:00 2001 From: Raashid Muhammed Date: Mon, 27 Mar 2017 12:35:00 +0530 -Subject: [PATCH 136/150] Add support for Allo Piano DAC 2.1 plus add-on board +Subject: [PATCH 134/165] 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. @@ -114974,10 +114921,10 @@ index 0000000000000000000000000000000000000000..f66f42abadbd5f9d3fe000676e8297ed +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC Plus"); +MODULE_LICENSE("GPL v2"); -From 1775bcc2f147f18b22073a324c02cb2dffd89fe8 Mon Sep 17 00:00:00 2001 +From 4ef968342060e85928c03805c3d746039378edc2 Mon Sep 17 00:00:00 2001 From: BabuSubashChandar Date: Tue, 28 Mar 2017 20:04:42 +0530 -Subject: [PATCH 137/150] Add support for Allo Boss DAC add-on board for +Subject: [PATCH 135/165] Add support for Allo Boss DAC add-on board for Raspberry Pi. (#1924) Signed-off-by: Baswaraj K @@ -115707,10 +115654,10 @@ index 0000000000000000000000000000000000000000..c080e31065d99ab309ab3bdf41a44adf +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Boss DAC"); +MODULE_LICENSE("GPL v2"); -From 7f74117a6a7676dd26754cbcafea47d7066e29ee Mon Sep 17 00:00:00 2001 +From 2a42e7fae332b63d97c8bd47367d0398116eeee7 Mon Sep 17 00:00:00 2001 From: BabuSubashChandar C Date: Thu, 30 Mar 2017 20:17:27 +0530 -Subject: [PATCH 138/150] Add support for new clock rate and mute gpios. +Subject: [PATCH 136/165] Add support for new clock rate and mute gpios. Signed-off-by: Baswaraj K Reviewed-by: Deepak @@ -115740,10 +115687,10 @@ index 7df335a3d82f7043d31ba69331cdf3185264d78c..ac1cfe093d9aa8a77ef25cc62a9d8100 }; }; diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index be903e66e95c97b16399ebfac8f6bedbeeb29663..515369e43b2c819a82670366582971ab26eaf532 100644 +index f68fc97d2a9c28154880b5d55ce90b0b0974acc6..f8c97a20611f3f6688a0de4f5c0c167a0fa0bcd6 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig -@@ -883,6 +883,7 @@ CONFIG_SND_AUDIOINJECTOR_OCTO_SOUNDCARD=m +@@ -882,6 +882,7 @@ CONFIG_SND_AUDIOINJECTOR_OCTO_SOUNDCARD=m CONFIG_SND_DIGIDAC1_SOUNDCARD=m CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2=m @@ -116363,10 +116310,10 @@ index c080e31065d99ab309ab3bdf41a44adfdd8f8039..203ab76c7045b081578e23bda1099dd1 } -From 95f6f3118dd6c08134335e35714d2ccbfa4388dc Mon Sep 17 00:00:00 2001 +From b44b82a8f0206c77c6b632faf0ed627c08c2c464 Mon Sep 17 00:00:00 2001 From: BabuSubashChandar Date: Sat, 1 Apr 2017 00:46:52 +0530 -Subject: [PATCH 139/150] Add clock changes and mute gpios (#1938) +Subject: [PATCH 137/165] Add clock changes and mute gpios (#1938) Also improve code style and adhere to ALSA coding conventions. @@ -116437,10 +116384,10 @@ index 6943b55ca5f96097668e2d10c05f56a26be62b0a..5c1c81c427a8b396ca9e9c903e97f271 }; }; diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 515369e43b2c819a82670366582971ab26eaf532..2e4b164b118e053c6d1e7d7898b60f3dd50e91dc 100644 +index f8c97a20611f3f6688a0de4f5c0c167a0fa0bcd6..94227b4a4f8a9b3a4627dceaf7c654da4f2f87df 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig -@@ -885,6 +885,7 @@ CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m +@@ -884,6 +884,7 @@ CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2=m CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m @@ -117059,32 +117006,10 @@ index f66f42abadbd5f9d3fe000676e8297ed91630e47..56e43f98846b41e487b3089813f7edc3 } -From c33e97a120e0d1e543568ed6d303939a1130bd76 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Sun, 2 Apr 2017 15:33:25 +0100 -Subject: [PATCH 140/150] config: remove CONFIG_TOUCHSCREEN_EKTF2127 - ---- - arch/arm/configs/bcm2709_defconfig | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 2e4b164b118e053c6d1e7d7898b60f3dd50e91dc..94227b4a4f8a9b3a4627dceaf7c654da4f2f87df 100644 ---- a/arch/arm/configs/bcm2709_defconfig -+++ b/arch/arm/configs/bcm2709_defconfig -@@ -565,7 +565,6 @@ CONFIG_JOYSTICK_RPISENSE=m - CONFIG_INPUT_TOUCHSCREEN=y - CONFIG_TOUCHSCREEN_ADS7846=m - CONFIG_TOUCHSCREEN_EGALAX=m --CONFIG_TOUCHSCREEN_EKTF2127=m - CONFIG_TOUCHSCREEN_RPI_FT5406=m - CONFIG_TOUCHSCREEN_USB_COMPOSITE=m - CONFIG_TOUCHSCREEN_STMPE=m - -From 1e9582d8eab3bfb89c6bb771c1293f984a6ac4ae Mon Sep 17 00:00:00 2001 +From 1264d706e16346c126b08c6b1e29d122a2f1496c Mon Sep 17 00:00:00 2001 From: Yasunari Takiguchi Date: Fri, 14 Apr 2017 10:43:57 +0100 -Subject: [PATCH 141/150] This is the driver for Sony CXD2880 DVB-T2/T tuner + +Subject: [PATCH 138/165] 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. @@ -133216,10 +133141,10 @@ index 0000000000000000000000000000000000000000..82e122349055be817eb74ed5bbcd7560 +MODULE_AUTHOR("Sony Semiconductor Solutions Corporation"); +MODULE_LICENSE("GPL v2"); -From 7fd92d0e9cd9b95549e61fca461e85a3147837d2 Mon Sep 17 00:00:00 2001 +From 79d8d433d4c86597de41706ef58ba6b75ff76ecf Mon Sep 17 00:00:00 2001 From: Yasunari Takiguchi Date: Thu, 22 Dec 2016 15:34:12 +0900 -Subject: [PATCH 142/150] BCM2708: Add Raspberry Pi TV HAT Device Tree Support +Subject: [PATCH 139/165] BCM2708: Add Raspberry Pi TV HAT Device Tree Support This is an EXAMPLE CODE of Raspberry Pi TV HAT device tree overlay. Although this is not a part of our release code, it has been used to verify @@ -133315,10 +133240,10 @@ index 0000000000000000000000000000000000000000..a68f6f793d8efd8b2e2adf9f2fb6426f + +}; -From 54e1e47427d952f05c9671da9ec11aa83776dce6 Mon Sep 17 00:00:00 2001 +From 1c76190ebca5746f6e6b8e50e2cc3265d72a5c5c Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 27 Apr 2017 16:24:34 +0100 -Subject: [PATCH 143/150] dwc_otg: make nak_holdoff work as intended with empty +Subject: [PATCH 140/165] dwc_otg: make nak_holdoff work as intended with empty queues If URBs reading from non-periodic split endpoints were dequeued and @@ -133402,10 +133327,10 @@ index c2dff94e8e6edd22e4427aaa1eac7aad972cb6bd..85a6d431ca54b47dc10573aa72d1ad69 } else { uint16_t frame_number = dwc_otg_hcd_get_frame_number(hcd); -From 9e758da8dc0f4b319c7907533872ff8c525064b6 Mon Sep 17 00:00:00 2001 +From dc7df0e8583992a9bfd5bf494800cbca37ac823f Mon Sep 17 00:00:00 2001 From: P33M Date: Tue, 2 May 2017 16:31:15 +0100 -Subject: [PATCH 144/150] dwc_otg: fix split transaction data toggle handling +Subject: [PATCH 141/165] dwc_otg: fix split transaction data toggle handling around dequeues See https://github.com/raspberrypi/linux/issues/1709 @@ -133493,10 +133418,10 @@ index 608e036be2c9484465ab836de70129335d3d2d96..718a1accc0c219a1764ce53d291de6a2 } qtd = DWC_CIRCLEQ_FIRST(&hc->qh->qtd_list); -From 41da1375f8be3a5feac94d6b37558258dd6b1ed6 Mon Sep 17 00:00:00 2001 +From 415467640d5ad5ec32bd1292995dd3e4c2b5e412 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 2 May 2017 16:36:05 +0100 -Subject: [PATCH 145/150] vcsm: Treat EBUSY as success rather than SIGBUS +Subject: [PATCH 142/165] vcsm: Treat EBUSY as success rather than SIGBUS Currently if two cores access the same page concurrently one will return VM_FAULT_NOPAGE and the other VM_FAULT_SIGBUS crashing the user code. @@ -133534,126 +133459,10 @@ index fd71d9fbb400d71bb8cfb8672080e7c3053e3ae9..fd2ca788dcd56b1702454d71b7bedd42 } } -From 260c755a02f02f1294d0e32d0f0812a480c94dee Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Wed, 3 May 2017 10:34:36 +0100 -Subject: [PATCH 146/150] staging: vc04_services: Fix bulk cache maintenance - -vchiq_arm supports transfers less than one page and at arbitrary -alignment, using the dma-mapping API to perform its cache maintenance -(even though the VPU drives the DMA hardware). Read (DMA_FROM_DEVICE) -operations use cache invalidation for speed, falling back to -clean+invalidate on partial cache lines, with writes (DMA_TO_DEVICE) -using flushes. - -If a read transfer has ends which aren't page-aligned, performing cache -maintenance as if they were whole pages can lead to memory corruption -since the partial cache lines at the ends (and any cache lines before or -after the transfer area) will be invalidated. This bug was masked until -the disabling of the cache flush in flush_dcache_page(). - -Honouring the requested transfer start- and end-points prevents the -corruption. - -See: https://github.com/raspberrypi/linux/issues/1977 - -Signed-off-by: Phil Elwell ---- - .../interface/vchiq_arm/vchiq_2835_arm.c | 31 +++++++++++++--------- - 1 file changed, 19 insertions(+), 12 deletions(-) - -diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c -index 3aeffcb9c87e91d0be902bf851d38bb8b2550ebb..18f2f529687b60750a6a8e0f422d60af21be4a8f 100644 ---- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c -+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c -@@ -501,8 +501,15 @@ create_pagelist(char __user *buf, size_t count, unsigned short type, - */ - sg_init_table(scatterlist, num_pages); - /* Now set the pages for each scatterlist */ -- for (i = 0; i < num_pages; i++) -- sg_set_page(scatterlist + i, pages[i], PAGE_SIZE, 0); -+ for (i = 0; i < num_pages; i++) { -+ unsigned int len = PAGE_SIZE - offset; -+ -+ if (len > count) -+ len = count; -+ sg_set_page(scatterlist + i, pages[i], len, offset); -+ offset = 0; -+ count -= len; -+ } - - dma_buffers = dma_map_sg(g_dev, - scatterlist, -@@ -523,20 +530,20 @@ create_pagelist(char __user *buf, size_t count, unsigned short type, - u32 addr = sg_dma_address(sg); - - /* Note: addrs is the address + page_count - 1 -- * The firmware expects the block to be page -+ * The firmware expects blocks after the first to be page- - * aligned and a multiple of the page size - */ - WARN_ON(len == 0); -- WARN_ON(len & ~PAGE_MASK); -- WARN_ON(addr & ~PAGE_MASK); -+ WARN_ON(k && (k != (dma_buffers - 1)) && (len & ~PAGE_MASK)); -+ WARN_ON(k && (addr & ~PAGE_MASK)); - if (k > 0 && -- ((addrs[k - 1] & PAGE_MASK) | -- ((addrs[k - 1] & ~PAGE_MASK) + 1) << PAGE_SHIFT) -- == addr) { -- addrs[k - 1] += (len >> PAGE_SHIFT); -- } else { -- addrs[k++] = addr | ((len >> PAGE_SHIFT) - 1); -- } -+ ((addrs[k - 1] & PAGE_MASK) + -+ (((addrs[k - 1] & ~PAGE_MASK) + 1) << PAGE_SHIFT)) -+ == (addr & PAGE_MASK)) -+ addrs[k - 1] += ((len + PAGE_SIZE - 1) >> PAGE_SHIFT); -+ else -+ addrs[k++] = (addr & PAGE_MASK) | -+ (((len + PAGE_SIZE - 1) >> PAGE_SHIFT) - 1); - } - - /* Partial cache lines (fragments) require special measures */ - -From df03005ed1fb257c4f8a0e073d47027267bdca97 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Thu, 4 May 2017 09:55:34 +0100 -Subject: [PATCH 147/150] SQUASH: staging: vc04_services: Fix warnings - -create_pagelist uses a number of WARNs to sanity-check check the input -user pages, verifying that only the first and last entries in the -array are not integral pages. These WARNs use the output array index -when it should be input array index. Although the difference is only -significant in one instance, change all the indices for consistency. - -See: https://github.com/raspberrypi/linux/pull/1987 - -Signed-off-by: Phil Elwell ---- - drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c -index 18f2f529687b60750a6a8e0f422d60af21be4a8f..02e97367cb88129793bab6b02f474a6abaeac722 100644 ---- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c -+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c -@@ -534,8 +534,8 @@ create_pagelist(char __user *buf, size_t count, unsigned short type, - * aligned and a multiple of the page size - */ - WARN_ON(len == 0); -- WARN_ON(k && (k != (dma_buffers - 1)) && (len & ~PAGE_MASK)); -- WARN_ON(k && (addr & ~PAGE_MASK)); -+ WARN_ON(i && (i != (dma_buffers - 1)) && (len & ~PAGE_MASK)); -+ WARN_ON(i && (addr & ~PAGE_MASK)); - if (k > 0 && - ((addrs[k - 1] & PAGE_MASK) + - (((addrs[k - 1] & ~PAGE_MASK) + 1) << PAGE_SHIFT)) - -From b66403cf963b8bb8dbbbc1445e475a6fbbdb2d3f Mon Sep 17 00:00:00 2001 +From 86773aa7d30014a4976566d01278c02ccd8de19b Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 4 May 2017 12:58:11 +0100 -Subject: [PATCH 148/150] fiq_fsm: Use correct states when starting isoc OUT +Subject: [PATCH 143/165] fiq_fsm: Use correct states when starting isoc OUT transfers In fiq_fsm_start_next_periodic() if an isochronous OUT transfer @@ -133690,10 +133499,10 @@ index 9304279592cb5b388086ef91cb52f1e9f94868ce..208252645c09d1d17bf07673989f91b7 break; } -From 5255c20a5cd584dbed1c4beb7648435f4d54547e Mon Sep 17 00:00:00 2001 +From 79dff587b5aa18748b62070d8124dfa06f84856d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 4 May 2017 17:38:22 +0100 -Subject: [PATCH 149/150] bcm2708_fb: Avoid firmware mbox call in vc_mem_copy +Subject: [PATCH 144/165] bcm2708_fb: Avoid firmware mbox call in vc_mem_copy If firmware has locked up it is useful to get vcdbg log out without a firmware mbox response. Issue the mbox call at probe time instead. @@ -133757,26 +133566,2279 @@ index 53c5a0bdadb4be9251affdabed66305842a08e72..612293cf9f1bd93ad2f2aefdd7ca0f5e if (ret == 0) { platform_set_drvdata(dev, fb); -From a4b4cfb22b78871aeb2450b043082534ee4a1d60 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Fri, 5 May 2017 13:23:56 +0100 -Subject: [PATCH 150/150] Revert "serial: 8250: Don't crash when nr_uarts is 0" +From ef237d3d91ba7ff5c991561fcb02106c3fb5ea48 Mon Sep 17 00:00:00 2001 +From: Nisar Sayed +Date: Tue, 9 May 2017 18:51:42 +0100 +Subject: [PATCH 145/165] According to RFC 2460, IPv6 UDP calculated checksum + yields a result of zero must be changed to 0xffff, however this feature is + not supported by smsc95xx family hence enable csum offload only for IPv4 + TCP/UDP packets. -This reverts commit 88e2058979b7b95417a05f2a3fcd637b3f1e09f8. +Signed-off-by: Nisar Sayed + +Reported-by: popcorn mix --- - drivers/tty/serial/8250/8250_core.c | 2 -- - 1 file changed, 2 deletions(-) + drivers/net/usb/smsc95xx.c | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) -diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c -index 0a172c2e6fa288de1e080463e897ea85aa98399f..76e03a7de9cc3d790a230948f599ef2db4b93249 100644 ---- a/drivers/tty/serial/8250/8250_core.c -+++ b/drivers/tty/serial/8250/8250_core.c -@@ -509,8 +509,6 @@ static void __init serial8250_isa_init_ports(void) +diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c +index f6661e388f6e801c1b88e48a3b71407bd70cf56e..b84e98508b5d97165b68dfc30240950e78bb14c3 100644 +--- a/drivers/net/usb/smsc95xx.c ++++ b/drivers/net/usb/smsc95xx.c +@@ -694,7 +694,7 @@ static int smsc95xx_set_features(struct net_device *netdev, + if (ret < 0) + return ret; - if (nr_uarts > UART_NR) - nr_uarts = UART_NR; -- if (!nr_uarts) -- return; +- if (features & NETIF_F_HW_CSUM) ++ if (features & NETIF_F_IP_CSUM) + read_buf |= Tx_COE_EN_; + else + read_buf &= ~Tx_COE_EN_; +@@ -1342,12 +1342,16 @@ static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf) - for (i = 0; i < nr_uarts; i++) { - struct uart_8250_port *up = &serial8250_ports[i]; + spin_lock_init(&pdata->mac_cr_lock); + ++ /* RFC 2460, IPv6 UDP calculated checksum yields a result of zero must be ++ * changed to 0xffff, this feature is not supported by smsc95xx family, ++ * hence enable csum offload only for IPv4 TCP/UDP packets. ++ */ + if (DEFAULT_TX_CSUM_ENABLE) +- dev->net->features |= NETIF_F_HW_CSUM; ++ dev->net->features |= NETIF_F_IP_CSUM; + if (DEFAULT_RX_CSUM_ENABLE) + dev->net->features |= NETIF_F_RXCSUM; + +- dev->net->hw_features = NETIF_F_HW_CSUM | NETIF_F_RXCSUM; ++ dev->net->hw_features = NETIF_F_IP_CSUM | NETIF_F_RXCSUM; + + smsc95xx_init_mac_address(dev); + + +From cbab0a0f8479d691dad18ad093b830773940a53e Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Wed, 14 Sep 2016 08:39:33 +0100 +Subject: [PATCH 146/165] drm/vc4: Add a mode for using the closed firmware for + display. + +Signed-off-by: Eric Anholt +--- + drivers/gpu/drm/vc4/Makefile | 1 + + drivers/gpu/drm/vc4/vc4_crtc.c | 13 + + drivers/gpu/drm/vc4/vc4_drv.c | 1 + + drivers/gpu/drm/vc4/vc4_drv.h | 7 + + drivers/gpu/drm/vc4/vc4_firmware_kms.c | 660 +++++++++++++++++++++++++++++++++ + 5 files changed, 682 insertions(+) + create mode 100644 drivers/gpu/drm/vc4/vc4_firmware_kms.c + +diff --git a/drivers/gpu/drm/vc4/Makefile b/drivers/gpu/drm/vc4/Makefile +index 61f45d122bd0f73b04d4e6aefd0b7ec6f607d04e..897f658bee287f84f7dde8dca43090ad5541495b 100644 +--- a/drivers/gpu/drm/vc4/Makefile ++++ b/drivers/gpu/drm/vc4/Makefile +@@ -9,6 +9,7 @@ vc4-y := \ + vc4_drv.o \ + vc4_dpi.o \ + vc4_dsi.o \ ++ vc4_firmware_kms.o \ + vc4_kms.o \ + vc4_gem.o \ + vc4_hdmi.o \ +diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c +index 9fcf05ca492b0c065a323f69be32ed3cc93b630f..0ed39e6b9bae3d5dd3d578a3e4400f12e8a56a53 100644 +--- a/drivers/gpu/drm/vc4/vc4_crtc.c ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c +@@ -163,6 +163,9 @@ int vc4_crtc_get_scanoutpos(struct drm_device *dev, unsigned int crtc_id, + int vblank_lines; + int ret = 0; + ++ if (vc4->firmware_kms) ++ return 0; ++ + /* preempt_disable_rt() should go right here in PREEMPT_RT patchset. */ + + /* Get optional system timestamp before query. */ +@@ -659,6 +662,11 @@ int vc4_enable_vblank(struct drm_device *dev, unsigned int crtc_id) + struct drm_crtc *crtc = drm_crtc_from_index(dev, crtc_id); + struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); + ++ if (vc4->firmware_kms) { ++ /* XXX: Can we mask the SMI interrupt? */ ++ return 0; ++ } ++ + CRTC_WRITE(PV_INTEN, PV_INT_VFP_START); + + return 0; +@@ -669,6 +677,11 @@ void vc4_disable_vblank(struct drm_device *dev, unsigned int crtc_id) + struct drm_crtc *crtc = drm_crtc_from_index(dev, crtc_id); + struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); + ++ if (vc4->firmware_kms) { ++ /* XXX: Can we mask the SMI interrupt? */ ++ return; ++ } ++ + CRTC_WRITE(PV_INTEN, 0); + } + +diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c +index a459745e96f7bb1f81b24077042da4c0c0063525..6661655bd19950e3d530ed6ae826af424fa23466 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.c ++++ b/drivers/gpu/drm/vc4/vc4_drv.c +@@ -298,6 +298,7 @@ static struct platform_driver *const component_drivers[] = { + &vc4_dsi_driver, + &vc4_hvs_driver, + &vc4_crtc_driver, ++ &vc4_firmware_kms_driver, + &vc4_v3d_driver, + }; + +diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h +index 0e59f3ee1b8344505a8f9d1e3abd478cee3dd37a..5042d5e024ce73b4b83f2c8fda80402300441f27 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.h ++++ b/drivers/gpu/drm/vc4/vc4_drv.h +@@ -14,6 +14,9 @@ + struct vc4_dev { + struct drm_device *dev; + ++ bool firmware_kms; ++ struct rpi_firmware *firmware; ++ + struct vc4_hdmi *hdmi; + struct vc4_hvs *hvs; + struct vc4_v3d *v3d; +@@ -470,6 +473,10 @@ int vc4_dpi_debugfs_regs(struct seq_file *m, void *unused); + extern struct platform_driver vc4_dsi_driver; + int vc4_dsi_debugfs_regs(struct seq_file *m, void *unused); + ++/* vc4_firmware_kms.c */ ++extern struct platform_driver vc4_firmware_kms_driver; ++void vc4_fkms_cancel_page_flip(struct drm_crtc *crtc, struct drm_file *file); ++ + /* vc4_gem.c */ + void vc4_gem_init(struct drm_device *dev); + void vc4_gem_destroy(struct drm_device *dev); +diff --git a/drivers/gpu/drm/vc4/vc4_firmware_kms.c b/drivers/gpu/drm/vc4/vc4_firmware_kms.c +new file mode 100644 +index 0000000000000000000000000000000000000000..d18a1dae51a2275846c9826b5bf1ba57ae97b55c +--- /dev/null ++++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c +@@ -0,0 +1,660 @@ ++/* ++ * Copyright (C) 2016 Broadcom ++ * ++ * 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. ++ */ ++ ++/** ++ * DOC: VC4 firmware KMS module. ++ * ++ * As a hack to get us from the current closed source driver world ++ * toward a totally open stack, implement KMS on top of the Raspberry ++ * Pi's firmware display stack. ++ */ ++ ++#include "drm_atomic.h" ++#include "drm_atomic_helper.h" ++#include "drm_plane_helper.h" ++#include "drm_crtc_helper.h" ++#include "linux/clk.h" ++#include "linux/debugfs.h" ++#include "drm_fb_cma_helper.h" ++#include "linux/component.h" ++#include "linux/of_device.h" ++#include "vc4_drv.h" ++#include "vc4_regs.h" ++#include ++ ++/* The firmware delivers a vblank interrupt to us through the SMI ++ * hardware, which has only this one register. ++ */ ++#define SMICS 0x0 ++#define SMICS_INTERRUPTS (BIT(9) | BIT(10) | BIT(11)) ++ ++struct vc4_crtc { ++ struct drm_crtc base; ++ struct drm_encoder *encoder; ++ struct drm_connector *connector; ++ void __iomem *regs; ++ ++ struct drm_pending_vblank_event *event; ++}; ++ ++static inline struct vc4_crtc *to_vc4_crtc(struct drm_crtc *crtc) ++{ ++ return container_of(crtc, struct vc4_crtc, base); ++} ++ ++struct vc4_fkms_encoder { ++ struct drm_encoder base; ++}; ++ ++static inline struct vc4_fkms_encoder * ++to_vc4_fkms_encoder(struct drm_encoder *encoder) ++{ ++ return container_of(encoder, struct vc4_fkms_encoder, base); ++} ++ ++/* VC4 FKMS connector KMS struct */ ++struct vc4_fkms_connector { ++ struct drm_connector base; ++ ++ /* Since the connector is attached to just the one encoder, ++ * this is the reference to it so we can do the best_encoder() ++ * hook. ++ */ ++ struct drm_encoder *encoder; ++}; ++ ++static inline struct vc4_fkms_connector * ++to_vc4_fkms_connector(struct drm_connector *connector) ++{ ++ return container_of(connector, struct vc4_fkms_connector, base); ++} ++ ++/* Firmware's structure for making an FB mbox call. */ ++struct fbinfo_s { ++ u32 xres, yres, xres_virtual, yres_virtual; ++ u32 pitch, bpp; ++ u32 xoffset, yoffset; ++ u32 base; ++ u32 screen_size; ++ u16 cmap[256]; ++}; ++ ++struct vc4_fkms_plane { ++ struct drm_plane base; ++ struct fbinfo_s *fbinfo; ++ dma_addr_t fbinfo_bus_addr; ++ u32 pitch; ++}; ++ ++static inline struct vc4_fkms_plane *to_vc4_fkms_plane(struct drm_plane *plane) ++{ ++ return (struct vc4_fkms_plane *)plane; ++} ++ ++/* Turns the display on/off. */ ++static int vc4_plane_set_primary_blank(struct drm_plane *plane, bool blank) ++{ ++ struct vc4_dev *vc4 = to_vc4_dev(plane->dev); ++ ++ u32 packet = blank; ++ return rpi_firmware_property(vc4->firmware, ++ RPI_FIRMWARE_FRAMEBUFFER_BLANK, ++ &packet, sizeof(packet)); ++} ++ ++static void vc4_primary_plane_atomic_update(struct drm_plane *plane, ++ struct drm_plane_state *old_state) ++{ ++ struct vc4_dev *vc4 = to_vc4_dev(plane->dev); ++ struct vc4_fkms_plane *vc4_plane = to_vc4_fkms_plane(plane); ++ struct drm_plane_state *state = plane->state; ++ struct drm_framebuffer *fb = state->fb; ++ struct drm_gem_cma_object *bo = drm_fb_cma_get_gem_obj(fb, 0); ++ volatile struct fbinfo_s *fbinfo = vc4_plane->fbinfo; ++ u32 bpp = 32; ++ int ret; ++ ++ vc4_plane_set_primary_blank(plane, false); ++ ++ fbinfo->xres = state->crtc_w; ++ fbinfo->yres = state->crtc_h; ++ fbinfo->xres_virtual = state->crtc_w; ++ fbinfo->yres_virtual = state->crtc_h; ++ fbinfo->bpp = bpp; ++ fbinfo->xoffset = state->crtc_x; ++ fbinfo->yoffset = state->crtc_y; ++ fbinfo->base = bo->paddr + fb->offsets[0]; ++ fbinfo->pitch = fb->pitches[0]; ++ /* A bug in the firmware makes it so that if the fb->base is ++ * set to nonzero, the configured pitch gets overwritten with ++ * the previous pitch. So, to get the configured pitch ++ * recomputed, we have to make it allocate itself a new buffer ++ * in VC memory, first. ++ */ ++ if (vc4_plane->pitch != fb->pitches[0]) { ++ u32 saved_base = fbinfo->base; ++ fbinfo->base = 0; ++ ++ ret = rpi_firmware_transaction(vc4->firmware, ++ RPI_FIRMWARE_CHAN_FB, ++ vc4_plane->fbinfo_bus_addr); ++ fbinfo->base = saved_base; ++ ++ vc4_plane->pitch = fbinfo->pitch; ++ WARN_ON_ONCE(vc4_plane->pitch != fb->pitches[0]); ++ } ++ ++ ret = rpi_firmware_transaction(vc4->firmware, ++ RPI_FIRMWARE_CHAN_FB, ++ vc4_plane->fbinfo_bus_addr); ++ WARN_ON_ONCE(fbinfo->pitch != fb->pitches[0]); ++ WARN_ON_ONCE(fbinfo->base != bo->paddr + fb->offsets[0]); ++} ++ ++static void vc4_primary_plane_atomic_disable(struct drm_plane *plane, ++ struct drm_plane_state *old_state) ++{ ++ vc4_plane_set_primary_blank(plane, true); ++} ++ ++static void vc4_cursor_plane_atomic_update(struct drm_plane *plane, ++ struct drm_plane_state *old_state) ++{ ++ struct vc4_dev *vc4 = to_vc4_dev(plane->dev); ++ struct drm_plane_state *state = plane->state; ++ struct drm_framebuffer *fb = state->fb; ++ struct drm_gem_cma_object *bo = drm_fb_cma_get_gem_obj(fb, 0); ++ int ret; ++ u32 packet_state[] = { true, state->crtc_x, state->crtc_y, 0 }; ++ u32 packet_info[] = { state->crtc_w, state->crtc_h, ++ 0, /* unused */ ++ bo->paddr + fb->offsets[0], ++ 0, 0, /* hotx, hoty */}; ++ WARN_ON_ONCE(fb->pitches[0] != state->crtc_w * 4); ++ WARN_ON_ONCE(fb->bits_per_pixel != 32); ++ ++ ret = rpi_firmware_property(vc4->firmware, ++ RPI_FIRMWARE_SET_CURSOR_STATE, ++ &packet_state, ++ sizeof(packet_state)); ++ if (ret || packet_state[0] != 0) ++ DRM_ERROR("Failed to set cursor state: 0x%08x\n", packet_state[0]); ++ ++ ret = rpi_firmware_property(vc4->firmware, ++ RPI_FIRMWARE_SET_CURSOR_INFO, ++ &packet_info, ++ sizeof(packet_info)); ++ if (ret || packet_info[0] != 0) ++ DRM_ERROR("Failed to set cursor info: 0x%08x\n", packet_info[0]); ++} ++ ++static void vc4_cursor_plane_atomic_disable(struct drm_plane *plane, ++ struct drm_plane_state *old_state) ++{ ++ struct vc4_dev *vc4 = to_vc4_dev(plane->dev); ++ u32 packet_state[] = { false, 0, 0, 0 }; ++ int ret; ++ ++ ret = rpi_firmware_property(vc4->firmware, ++ RPI_FIRMWARE_SET_CURSOR_STATE, ++ &packet_state, ++ sizeof(packet_state)); ++ if (ret || packet_state[0] != 0) ++ DRM_ERROR("Failed to set cursor state: 0x%08x\n", packet_state[0]); ++} ++ ++static int vc4_plane_atomic_check(struct drm_plane *plane, ++ struct drm_plane_state *state) ++{ ++ return 0; ++} ++ ++static void vc4_plane_destroy(struct drm_plane *plane) ++{ ++ drm_plane_helper_disable(plane); ++ drm_plane_cleanup(plane); ++} ++ ++static const struct drm_plane_funcs vc4_plane_funcs = { ++ .update_plane = drm_atomic_helper_update_plane, ++ .disable_plane = drm_atomic_helper_disable_plane, ++ .destroy = vc4_plane_destroy, ++ .set_property = NULL, ++ .reset = drm_atomic_helper_plane_reset, ++ .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, ++ .atomic_destroy_state = drm_atomic_helper_plane_destroy_state, ++}; ++ ++static const struct drm_plane_helper_funcs vc4_primary_plane_helper_funcs = { ++ .prepare_fb = NULL, ++ .cleanup_fb = NULL, ++ .atomic_check = vc4_plane_atomic_check, ++ .atomic_update = vc4_primary_plane_atomic_update, ++ .atomic_disable = vc4_primary_plane_atomic_disable, ++}; ++ ++static const struct drm_plane_helper_funcs vc4_cursor_plane_helper_funcs = { ++ .prepare_fb = NULL, ++ .cleanup_fb = NULL, ++ .atomic_check = vc4_plane_atomic_check, ++ .atomic_update = vc4_cursor_plane_atomic_update, ++ .atomic_disable = vc4_cursor_plane_atomic_disable, ++}; ++ ++static struct drm_plane *vc4_fkms_plane_init(struct drm_device *dev, ++ enum drm_plane_type type) ++{ ++ struct drm_plane *plane = NULL; ++ struct vc4_fkms_plane *vc4_plane; ++ u32 xrgb8888 = DRM_FORMAT_XRGB8888; ++ u32 argb8888 = DRM_FORMAT_ARGB8888; ++ int ret = 0; ++ bool primary = (type == DRM_PLANE_TYPE_PRIMARY); ++ ++ vc4_plane = devm_kzalloc(dev->dev, sizeof(*vc4_plane), ++ GFP_KERNEL); ++ if (!vc4_plane) { ++ ret = -ENOMEM; ++ goto fail; ++ } ++ ++ plane = &vc4_plane->base; ++ ret = drm_universal_plane_init(dev, plane, 0xff, ++ &vc4_plane_funcs, ++ primary ? &xrgb8888 : &argb8888, 1, ++ type, NULL); ++ ++ if (type == DRM_PLANE_TYPE_PRIMARY) { ++ vc4_plane->fbinfo = ++ dma_alloc_coherent(dev->dev, ++ sizeof(*vc4_plane->fbinfo), ++ &vc4_plane->fbinfo_bus_addr, ++ GFP_KERNEL); ++ memset(vc4_plane->fbinfo, 0, sizeof(*vc4_plane->fbinfo)); ++ ++ drm_plane_helper_add(plane, &vc4_primary_plane_helper_funcs); ++ } else { ++ drm_plane_helper_add(plane, &vc4_cursor_plane_helper_funcs); ++ } ++ ++ return plane; ++fail: ++ if (plane) ++ vc4_plane_destroy(plane); ++ ++ return ERR_PTR(ret); ++} ++ ++static void vc4_crtc_mode_set_nofb(struct drm_crtc *crtc) ++{ ++ /* Everyting is handled in the planes. */ ++} ++ ++static void vc4_crtc_disable(struct drm_crtc *crtc) ++{ ++} ++ ++static void vc4_crtc_enable(struct drm_crtc *crtc) ++{ ++} ++ ++static int vc4_crtc_atomic_check(struct drm_crtc *crtc, ++ struct drm_crtc_state *state) ++{ ++ return 0; ++} ++ ++static void vc4_crtc_atomic_flush(struct drm_crtc *crtc, ++ struct drm_crtc_state *old_state) ++{ ++} ++ ++static void vc4_crtc_handle_page_flip(struct vc4_crtc *vc4_crtc) ++{ ++ struct drm_crtc *crtc = &vc4_crtc->base; ++ struct drm_device *dev = crtc->dev; ++ unsigned long flags; ++ ++ spin_lock_irqsave(&dev->event_lock, flags); ++ if (vc4_crtc->event) { ++ drm_crtc_send_vblank_event(crtc, vc4_crtc->event); ++ vc4_crtc->event = NULL; ++ drm_crtc_vblank_put(crtc); ++ } ++ spin_unlock_irqrestore(&dev->event_lock, flags); ++} ++ ++static irqreturn_t vc4_crtc_irq_handler(int irq, void *data) ++{ ++ struct vc4_crtc *vc4_crtc = data; ++ u32 stat = readl(vc4_crtc->regs + SMICS); ++ irqreturn_t ret = IRQ_NONE; ++ ++ if (stat & SMICS_INTERRUPTS) { ++ writel(0, vc4_crtc->regs + SMICS); ++ drm_crtc_handle_vblank(&vc4_crtc->base); ++ vc4_crtc_handle_page_flip(vc4_crtc); ++ ret = IRQ_HANDLED; ++ } ++ ++ return ret; ++} ++ ++static int vc4_page_flip(struct drm_crtc *crtc, ++ struct drm_framebuffer *fb, ++ struct drm_pending_vblank_event *event, ++ uint32_t flags) ++{ ++ if (flags & DRM_MODE_PAGE_FLIP_ASYNC) { ++ DRM_ERROR("Async flips aren't allowed\n"); ++ return -EINVAL; ++ } ++ ++ return drm_atomic_helper_page_flip(crtc, fb, event, flags); ++} ++ ++static const struct drm_crtc_funcs vc4_crtc_funcs = { ++ .set_config = drm_atomic_helper_set_config, ++ .destroy = drm_crtc_cleanup, ++ .page_flip = vc4_page_flip, ++ .set_property = NULL, ++ .cursor_set = NULL, /* handled by drm_mode_cursor_universal */ ++ .cursor_move = NULL, /* handled by drm_mode_cursor_universal */ ++ .reset = drm_atomic_helper_crtc_reset, ++ .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, ++ .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, ++}; ++ ++static const struct drm_crtc_helper_funcs vc4_crtc_helper_funcs = { ++ .mode_set_nofb = vc4_crtc_mode_set_nofb, ++ .disable = vc4_crtc_disable, ++ .enable = vc4_crtc_enable, ++ .atomic_check = vc4_crtc_atomic_check, ++ .atomic_flush = vc4_crtc_atomic_flush, ++}; ++ ++/* Frees the page flip event when the DRM device is closed with the ++ * event still outstanding. ++ */ ++void vc4_fkms_cancel_page_flip(struct drm_crtc *crtc, struct drm_file *file) ++{ ++ struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); ++ struct drm_device *dev = crtc->dev; ++ unsigned long flags; ++ ++ spin_lock_irqsave(&dev->event_lock, flags); ++ ++ if (vc4_crtc->event && vc4_crtc->event->base.file_priv == file) { ++ kfree(&vc4_crtc->event->base); ++ drm_crtc_vblank_put(crtc); ++ vc4_crtc->event = NULL; ++ } ++ ++ spin_unlock_irqrestore(&dev->event_lock, flags); ++} ++ ++static const struct of_device_id vc4_firmware_kms_dt_match[] = { ++ { .compatible = "raspberrypi,rpi-firmware-kms" }, ++ {} ++}; ++ ++static enum drm_connector_status ++vc4_fkms_connector_detect(struct drm_connector *connector, bool force) ++{ ++ return connector_status_connected; ++} ++ ++static int vc4_fkms_connector_get_modes(struct drm_connector *connector) ++{ ++ struct drm_device *dev = connector->dev; ++ struct vc4_dev *vc4 = to_vc4_dev(dev); ++ u32 wh[2] = {0, 0}; ++ int ret; ++ struct drm_display_mode *mode; ++ ++ ret = rpi_firmware_property(vc4->firmware, ++ RPI_FIRMWARE_FRAMEBUFFER_GET_PHYSICAL_WIDTH_HEIGHT, ++ &wh, sizeof(wh)); ++ if (ret) { ++ DRM_ERROR("Failed to get screen size: %d (0x%08x 0x%08x)\n", ++ ret, wh[0], wh[1]); ++ return 0; ++ } ++ ++ mode = drm_cvt_mode(dev, wh[0], wh[1], 60 /* vrefresh */, ++ 0, 0, false); ++ drm_mode_probed_add(connector, mode); ++ ++ return 1; ++} ++ ++static struct drm_encoder * ++vc4_fkms_connector_best_encoder(struct drm_connector *connector) ++{ ++ struct vc4_fkms_connector *fkms_connector = ++ to_vc4_fkms_connector(connector); ++ return fkms_connector->encoder; ++} ++ ++static void vc4_fkms_connector_destroy(struct drm_connector *connector) ++{ ++ drm_connector_unregister(connector); ++ drm_connector_cleanup(connector); ++} ++ ++static const struct drm_connector_funcs vc4_fkms_connector_funcs = { ++ .dpms = drm_atomic_helper_connector_dpms, ++ .detect = vc4_fkms_connector_detect, ++ .fill_modes = drm_helper_probe_single_connector_modes, ++ .destroy = vc4_fkms_connector_destroy, ++ .reset = drm_atomic_helper_connector_reset, ++ .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, ++ .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, ++}; ++ ++static const struct drm_connector_helper_funcs vc4_fkms_connector_helper_funcs = { ++ .get_modes = vc4_fkms_connector_get_modes, ++ .best_encoder = vc4_fkms_connector_best_encoder, ++}; ++ ++static struct drm_connector *vc4_fkms_connector_init(struct drm_device *dev, ++ struct drm_encoder *encoder) ++{ ++ struct drm_connector *connector = NULL; ++ struct vc4_fkms_connector *fkms_connector; ++ int ret = 0; ++ ++ fkms_connector = devm_kzalloc(dev->dev, sizeof(*fkms_connector), ++ GFP_KERNEL); ++ if (!fkms_connector) { ++ ret = -ENOMEM; ++ goto fail; ++ } ++ connector = &fkms_connector->base; ++ ++ fkms_connector->encoder = encoder; ++ ++ drm_connector_init(dev, connector, &vc4_fkms_connector_funcs, ++ DRM_MODE_CONNECTOR_HDMIA); ++ drm_connector_helper_add(connector, &vc4_fkms_connector_helper_funcs); ++ ++ connector->polled = (DRM_CONNECTOR_POLL_CONNECT | ++ DRM_CONNECTOR_POLL_DISCONNECT); ++ ++ connector->interlace_allowed = 0; ++ connector->doublescan_allowed = 0; ++ ++ drm_mode_connector_attach_encoder(connector, encoder); ++ ++ return connector; ++ ++ fail: ++ if (connector) ++ vc4_fkms_connector_destroy(connector); ++ ++ return ERR_PTR(ret); ++} ++ ++static void vc4_fkms_encoder_destroy(struct drm_encoder *encoder) ++{ ++ drm_encoder_cleanup(encoder); ++} ++ ++static const struct drm_encoder_funcs vc4_fkms_encoder_funcs = { ++ .destroy = vc4_fkms_encoder_destroy, ++}; ++ ++static void vc4_fkms_encoder_enable(struct drm_encoder *encoder) ++{ ++} ++ ++static void vc4_fkms_encoder_disable(struct drm_encoder *encoder) ++{ ++} ++ ++static const struct drm_encoder_helper_funcs vc4_fkms_encoder_helper_funcs = { ++ .enable = vc4_fkms_encoder_enable, ++ .disable = vc4_fkms_encoder_disable, ++}; ++ ++static int vc4_fkms_bind(struct device *dev, struct device *master, void *data) ++{ ++ struct platform_device *pdev = to_platform_device(dev); ++ struct drm_device *drm = dev_get_drvdata(master); ++ struct vc4_dev *vc4 = to_vc4_dev(drm); ++ struct vc4_crtc *vc4_crtc; ++ struct vc4_fkms_encoder *vc4_encoder; ++ struct drm_crtc *crtc; ++ struct drm_plane *primary_plane, *cursor_plane, *destroy_plane, *temp; ++ struct device_node *firmware_node; ++ int ret; ++ ++ vc4->firmware_kms = true; ++ ++ vc4_crtc = devm_kzalloc(dev, sizeof(*vc4_crtc), GFP_KERNEL); ++ if (!vc4_crtc) ++ return -ENOMEM; ++ crtc = &vc4_crtc->base; ++ ++ firmware_node = of_parse_phandle(dev->of_node, "brcm,firmware", 0); ++ vc4->firmware = rpi_firmware_get(firmware_node); ++ if (!vc4->firmware) { ++ DRM_DEBUG("Failed to get Raspberry Pi firmware reference.\n"); ++ return -EPROBE_DEFER; ++ } ++ of_node_put(firmware_node); ++ ++ /* Map the SMI interrupt reg */ ++ vc4_crtc->regs = vc4_ioremap_regs(pdev, 0); ++ if (IS_ERR(vc4_crtc->regs)) ++ return PTR_ERR(vc4_crtc->regs); ++ ++ /* For now, we create just the primary and the legacy cursor ++ * planes. We should be able to stack more planes on easily, ++ * but to do that we would need to compute the bandwidth ++ * requirement of the plane configuration, and reject ones ++ * that will take too much. ++ */ ++ primary_plane = vc4_fkms_plane_init(drm, DRM_PLANE_TYPE_PRIMARY); ++ if (IS_ERR(primary_plane)) { ++ dev_err(dev, "failed to construct primary plane\n"); ++ ret = PTR_ERR(primary_plane); ++ goto err; ++ } ++ ++ cursor_plane = vc4_fkms_plane_init(drm, DRM_PLANE_TYPE_CURSOR); ++ if (IS_ERR(cursor_plane)) { ++ dev_err(dev, "failed to construct cursor plane\n"); ++ ret = PTR_ERR(cursor_plane); ++ goto err; ++ } ++ ++ drm_crtc_init_with_planes(drm, crtc, primary_plane, cursor_plane, ++ &vc4_crtc_funcs, NULL); ++ drm_crtc_helper_add(crtc, &vc4_crtc_helper_funcs); ++ primary_plane->crtc = crtc; ++ cursor_plane->crtc = crtc; ++ vc4->crtc[drm_crtc_index(crtc)] = vc4_crtc; ++ ++ vc4_encoder = devm_kzalloc(dev, sizeof(*vc4_encoder), GFP_KERNEL); ++ if (!vc4_encoder) ++ return -ENOMEM; ++ vc4_crtc->encoder = &vc4_encoder->base; ++ vc4_encoder->base.possible_crtcs |= drm_crtc_mask(crtc) ; ++ drm_encoder_init(drm, &vc4_encoder->base, &vc4_fkms_encoder_funcs, ++ DRM_MODE_ENCODER_TMDS, NULL); ++ drm_encoder_helper_add(&vc4_encoder->base, ++ &vc4_fkms_encoder_helper_funcs); ++ ++ vc4_crtc->connector = vc4_fkms_connector_init(drm, &vc4_encoder->base); ++ if (IS_ERR(vc4_crtc->connector)) { ++ ret = PTR_ERR(vc4_crtc->connector); ++ goto err_destroy_encoder; ++ } ++ ++ writel(0, vc4_crtc->regs + SMICS); ++ ret = devm_request_irq(dev, platform_get_irq(pdev, 0), ++ vc4_crtc_irq_handler, 0, "vc4 firmware kms", ++ vc4_crtc); ++ if (ret) ++ goto err_destroy_connector; ++ ++ platform_set_drvdata(pdev, vc4_crtc); ++ ++ return 0; ++ ++err_destroy_connector: ++ vc4_fkms_connector_destroy(vc4_crtc->connector); ++err_destroy_encoder: ++ vc4_fkms_encoder_destroy(vc4_crtc->encoder); ++ list_for_each_entry_safe(destroy_plane, temp, ++ &drm->mode_config.plane_list, head) { ++ if (destroy_plane->possible_crtcs == 1 << drm_crtc_index(crtc)) ++ destroy_plane->funcs->destroy(destroy_plane); ++ } ++err: ++ return ret; ++} ++ ++static void vc4_fkms_unbind(struct device *dev, struct device *master, ++ void *data) ++{ ++ struct platform_device *pdev = to_platform_device(dev); ++ struct vc4_crtc *vc4_crtc = dev_get_drvdata(dev); ++ ++ vc4_fkms_connector_destroy(vc4_crtc->connector); ++ vc4_fkms_encoder_destroy(vc4_crtc->encoder); ++ drm_crtc_cleanup(&vc4_crtc->base); ++ ++ platform_set_drvdata(pdev, NULL); ++} ++ ++static const struct component_ops vc4_fkms_ops = { ++ .bind = vc4_fkms_bind, ++ .unbind = vc4_fkms_unbind, ++}; ++ ++static int vc4_fkms_probe(struct platform_device *pdev) ++{ ++ return component_add(&pdev->dev, &vc4_fkms_ops); ++} ++ ++static int vc4_fkms_remove(struct platform_device *pdev) ++{ ++ component_del(&pdev->dev, &vc4_fkms_ops); ++ return 0; ++} ++ ++struct platform_driver vc4_firmware_kms_driver = { ++ .probe = vc4_fkms_probe, ++ .remove = vc4_fkms_remove, ++ .driver = { ++ .name = "vc4_firmware_kms", ++ .of_match_table = vc4_firmware_kms_dt_match, ++ }, ++}; + +From 9ab72e1fe7d0178f89b6e5f2e1d28a22fe2dead9 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Wed, 1 Feb 2017 17:09:18 -0800 +Subject: [PATCH 147/165] drm/vc4: Name the primary and cursor planes in fkms. + +This makes debugging nicer, compared to trying to remember what the +IDs are. + +Signed-off-by: Eric Anholt +--- + drivers/gpu/drm/vc4/vc4_firmware_kms.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_firmware_kms.c b/drivers/gpu/drm/vc4/vc4_firmware_kms.c +index d18a1dae51a2275846c9826b5bf1ba57ae97b55c..e49ce68b607a7ffc2329e3235362f3bc21ed5cbb 100644 +--- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c ++++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c +@@ -267,7 +267,7 @@ static struct drm_plane *vc4_fkms_plane_init(struct drm_device *dev, + ret = drm_universal_plane_init(dev, plane, 0xff, + &vc4_plane_funcs, + primary ? &xrgb8888 : &argb8888, 1, +- type, NULL); ++ type, primary ? "primary" : "cursor"); + + if (type == DRM_PLANE_TYPE_PRIMARY) { + vc4_plane->fbinfo = + +From 8f4a88cdf13682bb527a8a4348b45af537723ed9 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Wed, 1 Feb 2017 17:10:09 -0800 +Subject: [PATCH 148/165] drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of + fkms. + +Trying to debug weston on fkms involved figuring out what calls I was +making to the firmware. + +Signed-off-by: Eric Anholt +--- + drivers/gpu/drm/vc4/vc4_firmware_kms.c | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_firmware_kms.c b/drivers/gpu/drm/vc4/vc4_firmware_kms.c +index e49ce68b607a7ffc2329e3235362f3bc21ed5cbb..dbf065677202fbebf8e3a0cffbe880aa42daef3f 100644 +--- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c ++++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c +@@ -102,6 +102,11 @@ static int vc4_plane_set_primary_blank(struct drm_plane *plane, bool blank) + struct vc4_dev *vc4 = to_vc4_dev(plane->dev); + + u32 packet = blank; ++ ++ DRM_DEBUG_ATOMIC("[PLANE:%d:%s] primary plane %s", ++ plane->base.id, plane->name, ++ blank ? "blank" : "unblank"); ++ + return rpi_firmware_property(vc4->firmware, + RPI_FIRMWARE_FRAMEBUFFER_BLANK, + &packet, sizeof(packet)); +@@ -149,6 +154,16 @@ static void vc4_primary_plane_atomic_update(struct drm_plane *plane, + WARN_ON_ONCE(vc4_plane->pitch != fb->pitches[0]); + } + ++ DRM_DEBUG_ATOMIC("[PLANE:%d:%s] primary update %dx%d@%d +%d,%d 0x%08x/%d\n", ++ plane->base.id, plane->name, ++ state->crtc_w, ++ state->crtc_h, ++ bpp, ++ state->crtc_x, ++ state->crtc_y, ++ bo->paddr + fb->offsets[0], ++ fb->pitches[0]); ++ + ret = rpi_firmware_transaction(vc4->firmware, + RPI_FIRMWARE_CHAN_FB, + vc4_plane->fbinfo_bus_addr); +@@ -178,6 +193,15 @@ static void vc4_cursor_plane_atomic_update(struct drm_plane *plane, + WARN_ON_ONCE(fb->pitches[0] != state->crtc_w * 4); + WARN_ON_ONCE(fb->bits_per_pixel != 32); + ++ DRM_DEBUG_ATOMIC("[PLANE:%d:%s] update %dx%d cursor at %d,%d (0x%08x/%d)", ++ plane->base.id, plane->name, ++ state->crtc_w, ++ state->crtc_h, ++ state->crtc_x, ++ state->crtc_y, ++ bo->paddr + fb->offsets[0], ++ fb->pitches[0]); ++ + ret = rpi_firmware_property(vc4->firmware, + RPI_FIRMWARE_SET_CURSOR_STATE, + &packet_state, +@@ -200,6 +224,8 @@ static void vc4_cursor_plane_atomic_disable(struct drm_plane *plane, + u32 packet_state[] = { false, 0, 0, 0 }; + int ret; + ++ DRM_DEBUG_ATOMIC("[PLANE:%d:%s] disabling cursor", plane->base.id, plane->name); ++ + ret = rpi_firmware_property(vc4->firmware, + RPI_FIRMWARE_SET_CURSOR_STATE, + &packet_state, + +From eb8450cbd90b185b2c8454b9b169af0ae518b996 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Thu, 2 Feb 2017 09:42:18 -0800 +Subject: [PATCH 149/165] 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 +CRTC's atomic flush handler that moved the completion event from the +proposed atomic state change to the CRTC's current state. That meant +that when full screen pageflipping happened (glxgears -fullscreen in +X, compton, por weston), the app would end up blocked firever waiting +to draw its next frame. + +Signed-off-by: Eric Anholt +--- + drivers/gpu/drm/vc4/vc4_firmware_kms.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_firmware_kms.c b/drivers/gpu/drm/vc4/vc4_firmware_kms.c +index dbf065677202fbebf8e3a0cffbe880aa42daef3f..da818a207bfa639b8cea48d94bcf4566f97db816 100644 +--- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c ++++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c +@@ -338,6 +338,21 @@ static int vc4_crtc_atomic_check(struct drm_crtc *crtc, + static void vc4_crtc_atomic_flush(struct drm_crtc *crtc, + struct drm_crtc_state *old_state) + { ++ struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); ++ struct drm_device *dev = crtc->dev; ++ ++ if (crtc->state->event) { ++ unsigned long flags; ++ ++ crtc->state->event->pipe = drm_crtc_index(crtc); ++ ++ WARN_ON(drm_crtc_vblank_get(crtc) != 0); ++ ++ spin_lock_irqsave(&dev->event_lock, flags); ++ vc4_crtc->event = crtc->state->event; ++ crtc->state->event = NULL; ++ spin_unlock_irqrestore(&dev->event_lock, flags); ++ } + } + + static void vc4_crtc_handle_page_flip(struct vc4_crtc *vc4_crtc) + +From 37d49e37d1e667467d5ab024e259839665949967 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Wed, 10 May 2017 21:39:45 +0100 +Subject: [PATCH 150/165] squash: vc4_firmware_kms fixups + +--- + drivers/gpu/drm/vc4/vc4_crtc.c | 2 ++ + drivers/gpu/drm/vc4/vc4_firmware_kms.c | 4 ++-- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c +index 0ed39e6b9bae3d5dd3d578a3e4400f12e8a56a53..a0e2a33e8b8cd61a0c2e9ae030a323e208ad4169 100644 +--- a/drivers/gpu/drm/vc4/vc4_crtc.c ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c +@@ -659,6 +659,7 @@ static void vc4_crtc_atomic_flush(struct drm_crtc *crtc, + + int vc4_enable_vblank(struct drm_device *dev, unsigned int crtc_id) + { ++ struct vc4_dev *vc4 = to_vc4_dev(dev); + struct drm_crtc *crtc = drm_crtc_from_index(dev, crtc_id); + struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); + +@@ -674,6 +675,7 @@ int vc4_enable_vblank(struct drm_device *dev, unsigned int crtc_id) + + void vc4_disable_vblank(struct drm_device *dev, unsigned int crtc_id) + { ++ struct vc4_dev *vc4 = to_vc4_dev(dev); + struct drm_crtc *crtc = drm_crtc_from_index(dev, crtc_id); + struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); + +diff --git a/drivers/gpu/drm/vc4/vc4_firmware_kms.c b/drivers/gpu/drm/vc4/vc4_firmware_kms.c +index da818a207bfa639b8cea48d94bcf4566f97db816..35425063cca47a33936c4853f7cc320c3630fdb2 100644 +--- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c ++++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c +@@ -191,7 +191,7 @@ static void vc4_cursor_plane_atomic_update(struct drm_plane *plane, + bo->paddr + fb->offsets[0], + 0, 0, /* hotx, hoty */}; + WARN_ON_ONCE(fb->pitches[0] != state->crtc_w * 4); +- WARN_ON_ONCE(fb->bits_per_pixel != 32); ++ //WARN_ON_ONCE(fb->bits_per_pixel != 32); + + DRM_DEBUG_ATOMIC("[PLANE:%d:%s] update %dx%d cursor at %d,%d (0x%08x/%d)", + plane->base.id, plane->name, +@@ -620,7 +620,7 @@ static int vc4_fkms_bind(struct device *dev, struct device *master, void *data) + drm_crtc_helper_add(crtc, &vc4_crtc_helper_funcs); + primary_plane->crtc = crtc; + cursor_plane->crtc = crtc; +- vc4->crtc[drm_crtc_index(crtc)] = vc4_crtc; ++ //vc4->crtc[drm_crtc_index(crtc)] = vc4_crtc; + + vc4_encoder = devm_kzalloc(dev, sizeof(*vc4_encoder), GFP_KERNEL); + if (!vc4_encoder) + +From a1a1c64c65f30f6bd6ac9cc191314656716f9722 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 18 Apr 2017 21:43:46 +0100 +Subject: [PATCH 151/165] vc4_fkms: Apply firmware overscan offset to hardware + cursor + +--- + drivers/gpu/drm/vc4/vc4_firmware_kms.c | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_firmware_kms.c b/drivers/gpu/drm/vc4/vc4_firmware_kms.c +index 35425063cca47a33936c4853f7cc320c3630fdb2..ca03b85f27d8c0966acd977cba9c758dab4ffb5f 100644 +--- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c ++++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c +@@ -40,6 +40,7 @@ struct vc4_crtc { + void __iomem *regs; + + struct drm_pending_vblank_event *event; ++ u32 overscan[4]; + }; + + static inline struct vc4_crtc *to_vc4_crtc(struct drm_crtc *crtc) +@@ -181,6 +182,7 @@ static void vc4_cursor_plane_atomic_update(struct drm_plane *plane, + struct drm_plane_state *old_state) + { + struct vc4_dev *vc4 = to_vc4_dev(plane->dev); ++ struct vc4_crtc *vc4_crtc = to_vc4_crtc(plane->crtc); + struct drm_plane_state *state = plane->state; + struct drm_framebuffer *fb = state->fb; + struct drm_gem_cma_object *bo = drm_fb_cma_get_gem_obj(fb, 0); +@@ -202,6 +204,12 @@ static void vc4_cursor_plane_atomic_update(struct drm_plane *plane, + bo->paddr + fb->offsets[0], + fb->pitches[0]); + ++ /* add on the top/left offsets when overscan is active */ ++ if (vc4_crtc) { ++ packet_state[1] += vc4_crtc->overscan[0]; ++ packet_state[2] += vc4_crtc->overscan[1]; ++ } ++ + ret = rpi_firmware_property(vc4->firmware, + RPI_FIRMWARE_SET_CURSOR_STATE, + &packet_state, +@@ -645,6 +653,15 @@ static int vc4_fkms_bind(struct device *dev, struct device *master, void *data) + if (ret) + goto err_destroy_connector; + ++ ret = rpi_firmware_property(vc4->firmware, ++ RPI_FIRMWARE_FRAMEBUFFER_GET_OVERSCAN, ++ &vc4_crtc->overscan, ++ sizeof(vc4_crtc->overscan)); ++ if (ret) { ++ DRM_ERROR("Failed to get overscan state: 0x%08x\n", vc4_crtc->overscan[0]); ++ memset(&vc4_crtc->overscan, 0, sizeof(vc4_crtc->overscan)); ++ } ++ + platform_set_drvdata(pdev, vc4_crtc); + + return 0; + +From d1df3da3aeb7d9ca4c544f92b64daf7885ce1c2c Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 11 May 2017 16:58:16 +0100 +Subject: [PATCH 152/165] BCM270X_DT: Tidy up mmc, sdhost, sdio overlays + +The mmc, sdhost, sdio and sdio-1bit overlays had a few +anachronisms and oddities which were overdue for fixing. +The new versions should be functionally equivalent. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/mmc-overlay.dts | 1 + + arch/arm/boot/dts/overlays/sdhost-overlay.dts | 1 - + arch/arm/boot/dts/overlays/sdio-1bit-overlay.dts | 11 ++++++----- + arch/arm/boot/dts/overlays/sdio-overlay.dts | 11 ++++++----- + 4 files changed, 13 insertions(+), 11 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/mmc-overlay.dts b/arch/arm/boot/dts/overlays/mmc-overlay.dts +index d32b02ca01ced5ab3de00d66d5412c8fda4bc510..88251ad653917674f80c2975de2e425fca00b71f 100644 +--- a/arch/arm/boot/dts/overlays/mmc-overlay.dts ++++ b/arch/arm/boot/dts/overlays/mmc-overlay.dts +@@ -21,6 +21,7 @@ + mmc_pins: mmc_pins { + brcm,pins = <48 49 50 51 52 53>; + brcm,function = <7>; /* alt3 */ ++ brcm,pull = <0 2 2 2 2 2>; + }; + }; + }; +diff --git a/arch/arm/boot/dts/overlays/sdhost-overlay.dts b/arch/arm/boot/dts/overlays/sdhost-overlay.dts +index a431177a1c9d320d5432ea448ad4d0f696c34525..de3d1b0a5e403057a8e94f85695de4076d77e31f 100644 +--- a/arch/arm/boot/dts/overlays/sdhost-overlay.dts ++++ b/arch/arm/boot/dts/overlays/sdhost-overlay.dts +@@ -11,7 +11,6 @@ + frag0: __overlay__ { + brcm,overclock-50 = <0>; + brcm,pio-limit = <1>; +- brcm,debug-flags = <0>; + status = "okay"; + }; + }; +diff --git a/arch/arm/boot/dts/overlays/sdio-1bit-overlay.dts b/arch/arm/boot/dts/overlays/sdio-1bit-overlay.dts +index 46d453859b31f5c700a8a2e39a2c209330bc108f..0b7f2c6f2603b631e1985df7fbf66749149566d6 100644 +--- a/arch/arm/boot/dts/overlays/sdio-1bit-overlay.dts ++++ b/arch/arm/boot/dts/overlays/sdio-1bit-overlay.dts +@@ -1,11 +1,12 @@ +-/* Enable 1-bit SDIO from MMC interface via GPIOs 22-25. Includes sdhost overlay. */ ++/dts-v1/; ++/plugin/; + +-/include/ "sdhost-overlay.dts" ++/* Enable 1-bit SDIO from MMC interface via GPIOs 22-25. Includes sdhost overlay. */ + + /{ + compatible = "brcm,bcm2708"; + +- fragment@3 { ++ fragment@0 { + target = <&mmc>; + sdio_mmc: __overlay__ { + compatible = "brcm,bcm2835-mmc"; +@@ -18,12 +19,12 @@ + }; + }; + +- fragment@4 { ++ fragment@1 { + target = <&gpio>; + __overlay__ { + sdio_pins: sdio_pins { + brcm,pins = <22 23 24 25>; +- brcm,function = <7 7 7 7>; /* ALT3 = SD1 */ ++ brcm,function = <7>; /* ALT3 = SD1 */ + brcm,pull = <0 2 2 2>; + }; + }; +diff --git a/arch/arm/boot/dts/overlays/sdio-overlay.dts b/arch/arm/boot/dts/overlays/sdio-overlay.dts +index 398bd812c716c9e472fbac5aba4fe882114c65d1..215d5e3e8a8ca4363457fed1f7425427bb5086d7 100644 +--- a/arch/arm/boot/dts/overlays/sdio-overlay.dts ++++ b/arch/arm/boot/dts/overlays/sdio-overlay.dts +@@ -1,11 +1,12 @@ +-/* Enable SDIO from MMC interface via GPIOs 22-27. Includes sdhost overlay. */ ++/dts-v1/; ++/plugin/; + +-/include/ "sdhost-overlay.dts" ++/* Enable SDIO from MMC interface via GPIOs 22-27. Includes sdhost overlay. */ + + /{ + compatible = "brcm,bcm2708"; + +- fragment@3 { ++ fragment@0 { + target = <&mmc>; + sdio_mmc: __overlay__ { + pinctrl-names = "default"; +@@ -17,12 +18,12 @@ + }; + }; + +- fragment@4 { ++ fragment@1 { + target = <&gpio>; + __overlay__ { + sdio_pins: sdio_pins { + brcm,pins = <22 23 24 25 26 27>; +- brcm,function = <7 7 7 7 7 7>; /* ALT3 = SD1 */ ++ brcm,function = <7>; /* ALT3 = SD1 */ + brcm,pull = <0 2 2 2 2 2>; + }; + }; + +From 3d075ae0ebb40409adcd8b7a8c72f0c7e3e2aa0e Mon Sep 17 00:00:00 2001 +From: P33M +Date: Fri, 12 May 2017 12:24:00 +0100 +Subject: [PATCH 153/165] dwc_otg: fix several potential crash sources + +On root port disconnect events, the host driver state is cleared and +in-progress host channels are forcibly stopped. This doesn't play +well with the FIQ running in the background, so: +- Guard the disconnect callback with both the host spinlock and FIQ + spinlock +- Move qtd dereference in dwc_otg_handle_hc_fsm() after the early-out + so we don't dereference a qtd that has gone away +- Turn catch-all BUG()s in dwc_otg_handle_hc_fsm() into warnings. +--- + drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c | 2 ++ + drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 27 +++++++++++++++++++---- + drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 33 +++++++++++++++++++---------- + 3 files changed, 47 insertions(+), 15 deletions(-) + +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c +index 96c76e38cd372b8ca8c375ae8d8653f32a3faf80..9fb7229f43ae4561c9dc1980065381a48711ae41 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c +@@ -973,7 +973,9 @@ int32_t dwc_otg_handle_disconnect_intr(dwc_otg_core_if_t * core_if) + } else { + if (core_if->op_state == A_HOST) { + /* A-Cable still connected but device disconnected. */ ++ DWC_SPINUNLOCK(core_if->lock); + cil_hcd_disconnect(core_if); ++ DWC_SPINLOCK(core_if->lock); + if (core_if->adp_enable) { + gpwrdn_data_t gpwrdn = { .d32 = 0 }; + cil_hcd_stop(core_if); +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index 37c9d7d38287b616fcd335e80aa4110521fa98ca..9a647b75027378e25eef00b5fc2a9166514b5c59 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +@@ -290,13 +290,16 @@ static int32_t dwc_otg_hcd_disconnect_cb(void *p) + gintsts_data_t intr; + dwc_otg_hcd_t *dwc_otg_hcd = p; + ++ DWC_SPINLOCK(dwc_otg_hcd->lock); + /* + * Set status flags for the hub driver. + */ + dwc_otg_hcd->flags.b.port_connect_status_change = 1; + dwc_otg_hcd->flags.b.port_connect_status = 0; +- if(fiq_enable) ++ if(fiq_enable) { + local_fiq_disable(); ++ fiq_fsm_spin_lock(&dwc_otg_hcd->fiq_state->lock); ++ } + /* + * Shutdown any transfers in process by clearing the Tx FIFO Empty + * interrupt mask and status bits and disabling subsequent host +@@ -389,7 +392,8 @@ static int32_t dwc_otg_hcd_disconnect_cb(void *p) + * in release_channel_ddma(). Which called from ep_disable + * when device disconnect. + */ +- channel->qh = NULL; ++ if (dwc_otg_hcd->core_if->dma_desc_enable) ++ channel->qh = NULL; + } + } + if(fiq_fsm_enable) { +@@ -400,13 +404,16 @@ static int32_t dwc_otg_hcd_disconnect_cb(void *p) + + } + +- if(fiq_enable) ++ if(fiq_enable) { ++ fiq_fsm_spin_unlock(&dwc_otg_hcd->fiq_state->lock); + local_fiq_enable(); ++ } + + if (dwc_otg_hcd->fops->disconnect) { + dwc_otg_hcd->fops->disconnect(dwc_otg_hcd); + } + ++ DWC_SPINUNLOCK(dwc_otg_hcd->lock); + return 1; + } + +@@ -1750,8 +1757,20 @@ int fiq_fsm_queue_split_transaction(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) + int hub_addr, port_addr, frame, uframe; + struct fiq_channel_state *st = &hcd->fiq_state->channel[hc->hc_num]; + +- if (st->fsm != FIQ_PASSTHROUGH) ++ /* ++ * Non-periodic channel assignments stay in the non_periodic_active queue. ++ * Therefore we get repeatedly called until the FIQ's done processing this channel. ++ */ ++ if (qh->channel->xfer_started == 1) + return 0; ++ ++ if (st->fsm != FIQ_PASSTHROUGH) { ++ pr_warn_ratelimited("%s:%d: Queue called for an active channel\n", __func__, __LINE__); ++ return 0; ++ } ++ ++ qh->channel->xfer_started = 1; ++ + st->nr_errors = 0; + + st->hcchar_copy.d32 = 0; +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 718a1accc0c219a1764ce53d291de6a2b6f93608..cf23baaa388562b5843be4cfa6c206cbdc4e780d 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +@@ -2374,8 +2374,7 @@ void dwc_otg_hcd_handle_hc_fsm(dwc_otg_hcd_t *hcd, uint32_t num) + { + struct fiq_channel_state *st = &hcd->fiq_state->channel[num]; + dwc_hc_t *hc = hcd->hc_ptr_array[num]; +- dwc_otg_qtd_t *qtd = DWC_CIRCLEQ_FIRST(&hc->qh->qtd_list); +- dwc_otg_qh_t *qh = hc->qh; ++ dwc_otg_qtd_t *qtd; + dwc_otg_hc_regs_t *hc_regs = hcd->core_if->host_if->hc_regs[num]; + hcint_data_t hcint = hcd->fiq_state->channel[num].hcint_copy; + hctsiz_data_t hctsiz = hcd->fiq_state->channel[num].hctsiz_copy; +@@ -2385,16 +2384,19 @@ void dwc_otg_hcd_handle_hc_fsm(dwc_otg_hcd_t *hcd, uint32_t num) + hostchannels = hcd->available_host_channels; + if (hc->halt_pending) { + /* Dequeue: The FIQ was allowed to complete the transfer but state has been cleared. */ +- if (st->fsm == FIQ_NP_SPLIT_DONE && hcint.b.xfercomp && qh->ep_type == UE_BULK) { ++ if (hc->qh && st->fsm == FIQ_NP_SPLIT_DONE && ++ hcint.b.xfercomp && hc->qh->ep_type == UE_BULK) { + if (hctsiz.b.pid == DWC_HCTSIZ_DATA0) { +- qh->data_toggle = DWC_OTG_HC_PID_DATA1; ++ hc->qh->data_toggle = DWC_OTG_HC_PID_DATA1; + } else { +- qh->data_toggle = DWC_OTG_HC_PID_DATA0; ++ hc->qh->data_toggle = DWC_OTG_HC_PID_DATA0; + } + } + release_channel(hcd, hc, NULL, hc->halt_status); + return; + } ++ ++ qtd = DWC_CIRCLEQ_FIRST(&hc->qh->qtd_list); + switch (st->fsm) { + case FIQ_TEST: + break; +@@ -2413,6 +2415,11 @@ void dwc_otg_hcd_handle_hc_fsm(dwc_otg_hcd_t *hcd, uint32_t num) + handle_hc_xfercomp_intr(hcd, hc, hc_regs, qtd); + } else if (hcint.b.nak) { + handle_hc_nak_intr(hcd, hc, hc_regs, qtd); ++ } else { ++ DWC_WARN("Unexpected IRQ state on FSM transaction:" ++ "dev_addr=%d ep=%d fsm=%d, hcint=0x%08x\n", ++ hc->dev_addr, hc->ep_num, st->fsm, hcint.d32); ++ release_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_NO_HALT_STATUS); + } + break; + +@@ -2428,8 +2435,10 @@ void dwc_otg_hcd_handle_hc_fsm(dwc_otg_hcd_t *hcd, uint32_t num) + } else if (hcint.b.ahberr) { + handle_hc_ahberr_intr(hcd, hc, hc_regs, qtd); + } else { +- local_fiq_disable(); +- BUG(); ++ DWC_WARN("Unexpected IRQ state on FSM transaction:" ++ "dev_addr=%d ep=%d fsm=%d, hcint=0x%08x\n", ++ hc->dev_addr, hc->ep_num, st->fsm, hcint.d32); ++ release_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_NO_HALT_STATUS); + } + break; + +@@ -2445,8 +2454,10 @@ void dwc_otg_hcd_handle_hc_fsm(dwc_otg_hcd_t *hcd, uint32_t num) + } else if (hcint.b.ahberr) { + handle_hc_ahberr_intr(hcd, hc, hc_regs, qtd); + } else { +- local_fiq_disable(); +- BUG(); ++ DWC_WARN("Unexpected IRQ state on FSM transaction:" ++ "dev_addr=%d ep=%d fsm=%d, hcint=0x%08x\n", ++ hc->dev_addr, hc->ep_num, st->fsm, hcint.d32); ++ release_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_NO_HALT_STATUS); + } + break; + +@@ -2504,7 +2515,7 @@ void dwc_otg_hcd_handle_hc_fsm(dwc_otg_hcd_t *hcd, uint32_t num) + } else { + frame_desc->status = 0; + /* Unswizzle dma */ +- len = dwc_otg_fiq_unsetup_per_dma(hcd, qh, qtd, num); ++ len = dwc_otg_fiq_unsetup_per_dma(hcd, hc->qh, qtd, num); + frame_desc->actual_length = len; + } + qtd->isoc_frame_index++; +@@ -2566,7 +2577,7 @@ void dwc_otg_hcd_handle_hc_fsm(dwc_otg_hcd_t *hcd, uint32_t num) + * The status is recorded as the interrupt state should the transaction + * fail. + */ +- dwc_otg_fiq_unmangle_isoc(hcd, qh, qtd, num); ++ dwc_otg_fiq_unmangle_isoc(hcd, hc->qh, qtd, num); + hcd->fops->complete(hcd, qtd->urb->priv, qtd->urb, 0); + release_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_URB_COMPLETE); + break; + +From 68be9076e548897ace4b352c5de07e0e06e98647 Mon Sep 17 00:00:00 2001 +From: P33M +Date: Mon, 15 May 2017 14:27:48 +0100 +Subject: [PATCH 154/165] dwc_otg: delete hcd->channel_lock + +The lock serves no purpose as it is only held while the HCD spinlock +is already being held. +--- + drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 15 --------------- + drivers/usb/host/dwc_otg/dwc_otg_hcd.h | 1 - + drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c | 5 ----- + drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 4 ---- + 4 files changed, 25 deletions(-) + +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index 9a647b75027378e25eef00b5fc2a9166514b5c59..5ec991624c7865901b22ea01b9f2c58c8535ecfd 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +@@ -938,7 +938,6 @@ static void dwc_otg_hcd_free(dwc_otg_hcd_t * dwc_otg_hcd) + } else if (dwc_otg_hcd->status_buf != NULL) { + DWC_FREE(dwc_otg_hcd->status_buf); + } +- DWC_SPINLOCK_FREE(dwc_otg_hcd->channel_lock); + DWC_SPINLOCK_FREE(dwc_otg_hcd->lock); + /* Set core_if's lock pointer to NULL */ + dwc_otg_hcd->core_if->lock = NULL; +@@ -969,10 +968,8 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd, dwc_otg_core_if_t * core_if) + + #if (defined(DWC_LINUX) && defined(CONFIG_DEBUG_SPINLOCK)) + DWC_SPINLOCK_ALLOC_LINUX_DEBUG(hcd->lock); +- DWC_SPINLOCK_ALLOC_LINUX_DEBUG(hcd->channel_lock); + #else + hcd->lock = DWC_SPINLOCK_ALLOC(); +- hcd->channel_lock = DWC_SPINLOCK_ALLOC(); + #endif + DWC_DEBUGPL(DBG_HCDV, "init of HCD %p given core_if %p\n", + hcd, core_if); +@@ -1997,7 +1994,6 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) + dwc_otg_qh_t *qh; + int num_channels; + dwc_irqflags_t flags; +- dwc_spinlock_t *channel_lock = hcd->channel_lock; + dwc_otg_transaction_type_e ret_val = DWC_OTG_TRANSACTION_NONE; + + #ifdef DEBUG_HOST_CHANNELS +@@ -2016,13 +2012,10 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) + + if (microframe_schedule) { + // Make sure we leave one channel for non periodic transactions. +- DWC_SPINLOCK_IRQSAVE(channel_lock, &flags); + if (hcd->available_host_channels <= 1) { +- DWC_SPINUNLOCK_IRQRESTORE(channel_lock, flags); + break; + } + hcd->available_host_channels--; +- DWC_SPINUNLOCK_IRQRESTORE(channel_lock, flags); + #ifdef DEBUG_HOST_CHANNELS + last_sel_trans_num_per_scheduled++; + #endif /* DEBUG_HOST_CHANNELS */ +@@ -2035,10 +2028,8 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) + * periodic assigned schedule. + */ + qh_ptr = DWC_LIST_NEXT(qh_ptr); +- DWC_SPINLOCK_IRQSAVE(channel_lock, &flags); + DWC_LIST_MOVE_HEAD(&hcd->periodic_sched_assigned, + &qh->qh_list_entry); +- DWC_SPINUNLOCK_IRQRESTORE(channel_lock, flags); + } + + /* +@@ -2076,13 +2067,10 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) + } + + if (microframe_schedule) { +- DWC_SPINLOCK_IRQSAVE(channel_lock, &flags); + if (hcd->available_host_channels < 1) { +- DWC_SPINUNLOCK_IRQRESTORE(channel_lock, flags); + break; + } + hcd->available_host_channels--; +- DWC_SPINUNLOCK_IRQRESTORE(channel_lock, flags); + #ifdef DEBUG_HOST_CHANNELS + last_sel_trans_num_nonper_scheduled++; + #endif /* DEBUG_HOST_CHANNELS */ +@@ -2095,11 +2083,8 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) + * non-periodic active schedule. + */ + qh_ptr = DWC_LIST_NEXT(qh_ptr); +- DWC_SPINLOCK_IRQSAVE(channel_lock, &flags); + DWC_LIST_MOVE_HEAD(&hcd->non_periodic_sched_active, + &qh->qh_list_entry); +- DWC_SPINUNLOCK_IRQRESTORE(channel_lock, flags); +- + + if (!microframe_schedule) + hcd->non_periodic_channels++; +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +index 4539cd7b802d3e49ac9a6cb3f1d88b475a1ace16..7f7e9eaffd6a3c3d898855562fbec11289f77f53 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h ++++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +@@ -568,7 +568,6 @@ struct dwc_otg_hcd { + + /* */ + dwc_spinlock_t *lock; +- dwc_spinlock_t *channel_lock; + /** + * Private data that could be used by OS wrapper. + */ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c +index 126e99ab2fc43f11d89a08ff0476181ead84029f..bd8a20403713442f6748137d6b5de67e94c3893f 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c +@@ -279,17 +279,12 @@ void dump_frame_list(dwc_otg_hcd_t * hcd) + + static void release_channel_ddma(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) + { +- dwc_irqflags_t flags; +- dwc_spinlock_t *channel_lock = hcd->channel_lock; +- + dwc_hc_t *hc = qh->channel; + if (dwc_qh_is_non_per(qh)) { +- DWC_SPINLOCK_IRQSAVE(channel_lock, &flags); + if (!microframe_schedule) + hcd->non_periodic_channels--; + else + hcd->available_host_channels++; +- DWC_SPINUNLOCK_IRQRESTORE(channel_lock, flags); + } else + update_frame_list(hcd, qh, 0); + +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 cf23baaa388562b5843be4cfa6c206cbdc4e780d..a4355afc77b68718fdaba6c5d4be257dadc75036 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +@@ -945,7 +945,6 @@ static void release_channel(dwc_otg_hcd_t * hcd, + dwc_otg_transaction_type_e tr_type; + int free_qtd; + dwc_irqflags_t flags; +- dwc_spinlock_t *channel_lock = hcd->channel_lock; + + int hog_port = 0; + +@@ -1034,11 +1033,8 @@ static void release_channel(dwc_otg_hcd_t * hcd, + break; + } + } else { +- +- DWC_SPINLOCK_IRQSAVE(channel_lock, &flags); + hcd->available_host_channels++; + fiq_print(FIQDBG_INT, hcd->fiq_state, "AHC = %d ", hcd->available_host_channels); +- DWC_SPINUNLOCK_IRQRESTORE(channel_lock, flags); + } + + /* Try to queue more transfers now that there's a free channel. */ + +From 6a4e96243d237ccb48c533af77829c80c46b3575 Mon Sep 17 00:00:00 2001 +From: P33M +Date: Mon, 15 May 2017 14:51:42 +0100 +Subject: [PATCH 155/165] dwc_otg: remove unnecessary dma-mode channel halts on + disconnect interrupt + +Host channels are already halted in kill_urbs_in_qh_list() with the +subsequent interrupt processing behaving as if the URB was dequeued +via HCD callback. + +There's no need to clobber the host channel registers a second time +as this exposes races between the driver and host channel resulting +in hcd->free_hc_list becoming corrupted. +--- + drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 30 ------------------------------ + 1 file changed, 30 deletions(-) + +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index 5ec991624c7865901b22ea01b9f2c58c8535ecfd..a2dc6337836b2719f4c954edeeb2a71301931b04 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +@@ -200,8 +200,6 @@ static void kill_urbs_in_qh_list(dwc_otg_hcd_t * hcd, dwc_list_link_t * qh_list) + dwc_otg_hc_halt(hcd->core_if, qh->channel, + DWC_OTG_HC_XFER_URB_DEQUEUE); + } +- if(microframe_schedule) +- hcd->available_host_channels++; + qh->channel = NULL; + } + dwc_otg_hcd_qh_remove(hcd, qh); +@@ -369,39 +367,11 @@ static int32_t dwc_otg_hcd_disconnect_cb(void *p) + } + } + +- for (i = 0; i < num_channels; i++) { +- channel = dwc_otg_hcd->hc_ptr_array[i]; +- if (DWC_CIRCLEQ_EMPTY_ENTRY(channel, hc_list_entry)) { +- hc_regs = +- dwc_otg_hcd->core_if->host_if->hc_regs[i]; +- hcchar.d32 = DWC_READ_REG32(&hc_regs->hcchar); +- if (hcchar.b.chen) { +- /* Halt the channel. */ +- hcchar.b.chdis = 1; +- DWC_WRITE_REG32(&hc_regs->hcchar, +- hcchar.d32); +- } +- +- dwc_otg_hc_cleanup(dwc_otg_hcd->core_if, +- channel); +- DWC_CIRCLEQ_INSERT_TAIL +- (&dwc_otg_hcd->free_hc_list, channel, +- hc_list_entry); +- /* +- * Added for Descriptor DMA to prevent channel double cleanup +- * in release_channel_ddma(). Which called from ep_disable +- * when device disconnect. +- */ +- if (dwc_otg_hcd->core_if->dma_desc_enable) +- channel->qh = NULL; +- } +- } + if(fiq_fsm_enable) { + for(i=0; i < 128; i++) { + dwc_otg_hcd->hub_port[i] = 0; + } + } +- + } + + if(fiq_enable) { + +From 0be3655e1ef6461e38ef31ecdf35cfd99e44e3ac Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Mon, 15 May 2017 16:40:05 +0100 +Subject: [PATCH 156/165] config: Add CONFIG_TOUCHSCREEN_GOODIX + +--- + 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 94227b4a4f8a9b3a4627dceaf7c654da4f2f87df..268ac2b47d3fac00e3e53c19c44d5a30b16b3101 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -565,6 +565,7 @@ CONFIG_JOYSTICK_RPISENSE=m + CONFIG_INPUT_TOUCHSCREEN=y + CONFIG_TOUCHSCREEN_ADS7846=m + CONFIG_TOUCHSCREEN_EGALAX=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 db6589288b6abd6b76b934de07e8976456e14e61..88072e3b55eb230be44f6d23012428eda3de3453 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -561,6 +561,7 @@ CONFIG_JOYSTICK_RPISENSE=m + CONFIG_INPUT_TOUCHSCREEN=y + CONFIG_TOUCHSCREEN_ADS7846=m + CONFIG_TOUCHSCREEN_EGALAX=m ++CONFIG_TOUCHSCREEN_GOODIX=m + CONFIG_TOUCHSCREEN_RPI_FT5406=m + CONFIG_TOUCHSCREEN_USB_COMPOSITE=m + CONFIG_TOUCHSCREEN_STMPE=m + +From ec225ab9eb5f50e990f33514fb42201d663b2032 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Thu, 18 May 2017 11:40:43 +0100 +Subject: [PATCH 157/165] 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 268ac2b47d3fac00e3e53c19c44d5a30b16b3101..4b1321172dc050ee4a172f8d410b35472f2ae29e 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -1143,6 +1143,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 88072e3b55eb230be44f6d23012428eda3de3453..65e3676b48ab0c0f54375ecf875fc2552c457e09 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -1150,6 +1150,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 48b3930f538bbf573de3308159989b9f0901f639 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 16 May 2017 15:58:00 +0100 +Subject: [PATCH 158/165] 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 4b1321172dc050ee4a172f8d410b35472f2ae29e..589ca1cb499e288fc36a00db251970110a7be053 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_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 65e3676b48ab0c0f54375ecf875fc2552c457e09..7381eeba83ecd4a2c956ab2093ece4f8a57c6ea4 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -562,6 +562,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 07ec924f089da1e85958e82c77323d294ecb79b2 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 16 May 2017 19:34:52 +0100 +Subject: [PATCH 159/165] 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 589ca1cb499e288fc36a00db251970110a7be053..12157f209bc0a503c1bc3f04224784451c03f964 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 7381eeba83ecd4a2c956ab2093ece4f8a57c6ea4..35dc0b5084256f2ae755703edc3eb67cab0759ec 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 37db614838890f9d3851fd8a44231a2e1aa4bd61 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 26 Apr 2017 17:28:47 +0100 +Subject: [PATCH 160/165] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER + +It is unwise to use sources other than the oscillator and PLLD_PER for +the PCM peripheral (and perhaps others - TBD) because their rate can +change and they may even be switched off, so explicitly restrict the +choice using dummy entries in the list of potential parents (item index +is significant). + +See: https://github.com/raspberrypi/linux/issues/1949 + +Signed-off-by: Phil Elwell +--- + drivers/clk/bcm/clk-bcm2835.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index fe3298b54cdfb96bd90fb4f39e13921d2e1d4356..c24b4defb2b046e4ecdc109befc2b22497060647 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1562,6 +1562,16 @@ static const char *const bcm2835_clock_per_parents[] = { + "pllh_aux", + }; + ++static const char *const bcm2835_pcm_per_parents[] = { ++ "-", ++ "xosc", ++ "-", ++ "-", ++ "-", ++ "-", ++ "plld_per", ++}; ++ + #define REGISTER_PER_CLK(...) REGISTER_CLK( \ + .num_mux_parents = ARRAY_SIZE(bcm2835_clock_per_parents), \ + .parents = bcm2835_clock_per_parents, \ +@@ -2051,6 +2061,7 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .int_bits = 12, + .frac_bits = 12, + .is_mash_clock = true, ++ .parents = bcm2835_pcm_per_parents, + .tcnt_mux = 23), + [BCM2835_CLOCK_PWM] = REGISTER_PER_CLK( + .name = "pwm", + +From 621ee8308fbc211d0813037897daa8dff325812b Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 22 May 2017 13:56:41 +0100 +Subject: [PATCH 161/165] clk: bcm2835: Minimise clock jitter for PCM clock + +Fractional clock dividers generate accurate average frequencies but +with jitter, particularly when the integer divisor is small. + +Introduce a new metric of clock accuracy to penalise clocks with a good +average but worse jitter compared to clocks with an average which is no +better but with lower jitter. The metric is the ideal rate minus the +worse deviation from that ideal using the nearest integer divisors. + +Use this metric for parent selection for clocks requiring low jitter +(currently just PCM). + +Signed-off-by: Phil Elwell +--- + drivers/clk/bcm/clk-bcm2835.c | 39 ++++++++++++++++++++++++++++++++++----- + 1 file changed, 34 insertions(+), 5 deletions(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index c24b4defb2b046e4ecdc109befc2b22497060647..db3ba74acf78f4dfec0d2206b58bc7c3a09f72fe 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -534,6 +534,7 @@ struct bcm2835_clock_data { + + bool is_vpu_clock; + bool is_mash_clock; ++ bool low_jitter; + + u32 tcnt_mux; + }; +@@ -1154,7 +1155,8 @@ static unsigned long bcm2835_clock_choose_div_and_prate(struct clk_hw *hw, + int parent_idx, + unsigned long rate, + u32 *div, +- unsigned long *prate) ++ unsigned long *prate, ++ unsigned long *avgrate) + { + struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); + struct bcm2835_cprman *cprman = clock->cprman; +@@ -1166,11 +1168,33 @@ static unsigned long bcm2835_clock_choose_div_and_prate(struct clk_hw *hw, + parent = clk_hw_get_parent_by_index(hw, parent_idx); + + if (!(BIT(parent_idx) & data->set_rate_parent)) { ++ unsigned long tmp_rate; ++ + *prate = clk_hw_get_rate(parent); + *div = bcm2835_clock_choose_div(hw, rate, *prate, true); + +- return bcm2835_clock_rate_from_divisor(clock, *prate, +- *div); ++ tmp_rate = bcm2835_clock_rate_from_divisor(clock, *prate, *div); ++ *avgrate = tmp_rate; ++ ++ if (data->low_jitter && (*div & CM_DIV_FRAC_MASK)) { ++ unsigned long high, low; ++ u32 idiv = *div & ~CM_DIV_FRAC_MASK; ++ ++ high = bcm2835_clock_rate_from_divisor(clock, *prate, ++ idiv); ++ idiv += CM_DIV_FRAC_MASK + 1; ++ low = bcm2835_clock_rate_from_divisor(clock, *prate, ++ idiv); ++ ++ /* Return a value which is the maximum deviation ++ * below the ideal rate, for use as a metric. ++ */ ++ if ((tmp_rate - low) < (high - tmp_rate)) ++ tmp_rate = low; ++ else ++ tmp_rate -= high - tmp_rate; ++ } ++ return tmp_rate; + } + + if (data->frac_bits) +@@ -1197,6 +1221,7 @@ static unsigned long bcm2835_clock_choose_div_and_prate(struct clk_hw *hw, + + *div = curdiv << CM_DIV_FRAC_BITS; + *prate = curdiv * best_rate; ++ *avgrate = best_rate; + + return best_rate; + } +@@ -1208,6 +1233,7 @@ static int bcm2835_clock_determine_rate(struct clk_hw *hw, + bool current_parent_is_pllc; + unsigned long rate, best_rate = 0; + unsigned long prate, best_prate = 0; ++ unsigned long avgrate, best_avgrate = 0; + size_t i; + u32 div; + +@@ -1232,11 +1258,13 @@ static int bcm2835_clock_determine_rate(struct clk_hw *hw, + continue; + + rate = bcm2835_clock_choose_div_and_prate(hw, i, req->rate, +- &div, &prate); ++ &div, &prate, ++ &avgrate); + if (rate > best_rate && rate <= req->rate) { + best_parent = parent; + best_prate = prate; + best_rate = rate; ++ best_avgrate = avgrate; + } + } + +@@ -1246,7 +1274,7 @@ static int bcm2835_clock_determine_rate(struct clk_hw *hw, + req->best_parent_hw = best_parent; + req->best_parent_rate = best_prate; + +- req->rate = best_rate; ++ req->rate = best_avgrate; + + return 0; + } +@@ -2061,6 +2089,7 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .int_bits = 12, + .frac_bits = 12, + .is_mash_clock = true, ++ .low_jitter = true, + .parents = bcm2835_pcm_per_parents, + .tcnt_mux = 23), + [BCM2835_CLOCK_PWM] = REGISTER_PER_CLK( + +From 55047cb2049b576b353dee6de20f5c6b0e66fff5 Mon Sep 17 00:00:00 2001 +From: Bilal Amarni +Date: Wed, 24 May 2017 10:52:50 +0200 +Subject: [PATCH 162/165] [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 447e78fed3772de6db4653f68df6d7ac512476a3 Mon Sep 17 00:00:00 2001 +From: P33M +Date: Thu, 25 May 2017 16:04:53 +0100 +Subject: [PATCH 163/165] 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 081070763c748cf66b954b430e3021e221bffe0c Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 19 May 2017 16:07:23 +0100 +Subject: [PATCH 164/165] serial: 8250: Add CAP_MINI, set for bcm2835aux + +commit d087e7a991f1f61ee2c07db1be7c5cc2aa373f5d upstream. + +The AUX/mini-UART in the BCM2835 family of procesors is a cut-down +8250 clone. In particular it is lacking support for the following +features: CSTOPB PARENB PARODD CMSPAR CS5 CS6 + +Add a new capability (UART_CAP_MINI) that exposes the restrictions to +the user of the termios API by turning off the unsupported features in +the request. + +N.B. It is almost possible to automatically discover the missing +features by reading back the LCR register, but the CSIZE bits don't +cooperate (contrary to the documentation, both bits are significant, +but CS5 and CS6 are mapped to CS7) and the code is much longer. + +See: https://github.com/raspberrypi/linux/issues/1561 + +Signed-off-by: Phil Elwell +Acked-by: Eric Anholt +Signed-off-by: Greg Kroah-Hartman +--- + drivers/tty/serial/8250/8250.h | 3 +++ + drivers/tty/serial/8250/8250_bcm2835aux.c | 2 +- + drivers/tty/serial/8250/8250_port.c | 6 ++++++ + 3 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h +index ce8d4ffcc425b045377305f176aa8fa85af0068f..b2bdc35f74955fe134606ad9103811d227de8abf 100644 +--- a/drivers/tty/serial/8250/8250.h ++++ b/drivers/tty/serial/8250/8250.h +@@ -81,6 +81,9 @@ struct serial8250_config { + #define UART_CAP_HFIFO (1 << 14) /* UART has a "hidden" FIFO */ + #define UART_CAP_RPM (1 << 15) /* Runtime PM is active while idle */ + #define UART_CAP_IRDA (1 << 16) /* UART supports IrDA line discipline */ ++#define UART_CAP_MINI (1 << 17) /* Mini UART on BCM283X family lacks: ++ * STOP PARITY EPAR SPAR WLEN5 WLEN6 ++ */ + + #define UART_BUG_QUOT (1 << 0) /* UART has buggy quot LSB */ + #define UART_BUG_TXEN (1 << 1) /* UART has buggy TX IIR status */ +diff --git a/drivers/tty/serial/8250/8250_bcm2835aux.c b/drivers/tty/serial/8250/8250_bcm2835aux.c +index e10f1244409b344b850ffbbd4af5757a66c875f1..a23c7da42ea81342efc26fb35a92a69d535b7cd0 100644 +--- a/drivers/tty/serial/8250/8250_bcm2835aux.c ++++ b/drivers/tty/serial/8250/8250_bcm2835aux.c +@@ -39,7 +39,7 @@ static int bcm2835aux_serial_probe(struct platform_device *pdev) + + /* initialize data */ + spin_lock_init(&data->uart.port.lock); +- data->uart.capabilities = UART_CAP_FIFO; ++ data->uart.capabilities = UART_CAP_FIFO | UART_CAP_MINI; + data->uart.port.dev = &pdev->dev; + data->uart.port.regshift = 2; + data->uart.port.type = PORT_16550; +diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c +index 4c26d15ad7d91602aec507b881e6950119587f44..0d12bbe6ce4e9665fef9c3fb0b64d4c4095117bd 100644 +--- a/drivers/tty/serial/8250/8250_port.c ++++ b/drivers/tty/serial/8250/8250_port.c +@@ -2584,6 +2584,12 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, + unsigned long flags; + unsigned int baud, quot, frac = 0; + ++ if (up->capabilities & UART_CAP_MINI) { ++ termios->c_cflag &= ~(CSTOPB | PARENB | PARODD | CMSPAR); ++ if ((termios->c_cflag & CSIZE) == CS5 || ++ (termios->c_cflag & CSIZE) == CS6) ++ termios->c_cflag = (termios->c_cflag & ~CSIZE) | CS7; ++ } + cval = serial8250_compute_lcr(up, termios->c_cflag); + + baud = serial8250_get_baud_rate(port, termios, old); + +From 6a6634d22a77d1e7628ce664eec7bc319772f588 Mon Sep 17 00:00:00 2001 +From: P33M +Date: Fri, 26 May 2017 12:50:31 +0100 +Subject: [PATCH 165/165] 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; + }