From 6f0c1abffbd87177a302a44868a7f25623641097 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Wed, 7 Jun 2017 21:21:12 +0100 Subject: [PATCH] RPi: update linux support patch for linux 4.11.1 --- .../patches/linux/linux-01-RPi_support.patch | 2435 +++++++++++++---- 1 file changed, 1975 insertions(+), 460 deletions(-) diff --git a/projects/RPi/patches/linux/linux-01-RPi_support.patch b/projects/RPi/patches/linux/linux-01-RPi_support.patch index 4ad8d9e7eb..38de633c6e 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 88745f13edd41fa82f24b6cb60f5b9f56fbba153 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/157] 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 d97b8a1cf5ba4d3563ef5f11a2dde1015a9da5f1 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/157] 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 58b477bc0088fdfa572344a5f6c0c0a24deeb6db 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/157] 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 9f58921c4d8dd497e9966796469abf0227e1e35d 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/157] 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 f0ee6ab435ae8ab69f112752db57b64ed91888ea 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/157] mm: Remove the PFN busy warning See commit dae803e165a11bc88ca8dbc07a11077caf97bbcb -- the warning is expected sometimes when using CMA. However, that commit still spams @@ -252,10 +252,10 @@ index 07efbc3a86567676986105005f77c64f9f99597a..01988d3cedfd83546df831d7c4f03e1e goto done; } -From 623cfba2faa2c010ebaab45171f0a390c306f0f5 Mon Sep 17 00:00:00 2001 +From 045c05a0594e6ab4e05632bd61faf45ee52b8fa8 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/157] 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 8cdb52184f3593faea9303b7a5c32d83ddb26d9d 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/157] 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 f361f11d34c4aaeb6757894a6a0b3f162af53827 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/157] 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 5dd446266cfac361e98d5a6f81f496346238015d 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/157] 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 07266b3360ca5148492c288b937c124a5d0f7700 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/157] 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 73f5dfc98c9f76cb92bd99343e124ce3aae62dcf 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/157] 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 60a8694b757c6abe05415f5dfc950606c94035c5 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/157] 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 57fb0e3e530ceca7b89a7cc43f31451b189e2294 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/157] 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 963d3f167fe2c51f0160952bf42bc599a70e0b8a 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/157] 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 3a56b504421be450e1b8963521dc767abb79541e 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/157] 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 df40fca4e62bd94d1bbe27c3598423901d918dbf 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/157] 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 b52203ff6d43a2fbe9afef878b63f4ab4d715b8e 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/157] 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 779ce27aea7730b9f130aaa6982905427b4b88bb 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/157] 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 b01b0239a41ad16313a147e1fc59d846ed631cea 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/157] 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 597f65734718e5c647c81bb6b2048c942253b451 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/157] 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 a68d95b4fdb7b708536a5c814c1300072c958ed6 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/157] 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 5e0a37695a3b894b7fd29167bc437b8adc66b3e2 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/157] 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 9318b334386bec5766e5e7cc1320d5a76334c08c 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/157] 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 d946712ea3d4cc18a605a242900f6e4b629f06e2 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/157] 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 de2755a848f1142e664c1679c4b3c0b90c605545 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/157] 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 1758ca40b8ea0b03b51e38d392e7521145e7615e 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/157] 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 fa855b71a3ad9d7705c871afab016dbbc6cd55d6 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/157] 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 118d954430af4ce459950c07b1db6ef1a3e37241 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/157] 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 6faf63287a294b439c58d33d307c2c569553e50a 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/157] 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 19c5f4ed95950705d1d02517bbaa4b0ce9f25287 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/157] 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 9e4ecba9dd7dc108d8af9ca8ecbb92c0f2f32ad0 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/157] 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 fe90156e7f8020201a89a2d1eba64a74dd77cd6e 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/157] 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 8f56b59666c77b0edf0cd2d4e91f2f67164394c4 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/157] 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 353439a6cddf2bd15cf4528e9a45f2699a30709e 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/157] 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 a82f5077e493762d8064d9fe8db78982021d970f 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/157] 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 54fc5d24ced8bb669fc5d886db4e0b39519ec9f6 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/157] 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 da6c906d825f9afdf76d936ad88777c66d18321b 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/157] Add dwc_otg driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -63634,10 +63611,34 @@ index 0000000000000000000000000000000000000000..cdc9963176e5a4a0d5250613b61e26c5 +test_main(); +0; -From 5ca9b4aba0e463a01232c6ebf133800b52df2614 Mon Sep 17 00:00:00 2001 +From 58734b45a8c59b821ea6ffacdd099024267fbee5 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Wed, 10 May 2017 12:47:46 +0100 +Subject: [PATCH 038/157] 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 42341c15d6e59aa34679ef44af5bd49e593a9200 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/157] 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 2b130fcb18c75846b750dc2cf62923cd22893a50 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/157] 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 1ad247bb7deb186ce3bd7ce53eef618c96db92d5 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/157] 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 8b1b1acc50b5766acdcfb50548c3b05933afe13f 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/157] 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 954b2709ce3e4efdac84fa11deb294b462032af6 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/157] 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 679fc6bb6bad457d98a775e8a35af1ea8ec45f95 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/157] 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 c66894f4bbea405be832a732b76c512523c6f7c0 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/157] 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 d9ac1920cf3300d2e8603039aa010b4750372608 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/157] 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 38821bf95205773b87946966cf6834129302de08 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/157] 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 b9d7217079ac7b630fda4d5ba84dfc48b4272f18 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/157] 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 8095d93f23e0f7eb2f49b84544b63f9c62b529d4 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/157] 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 944c2099f03bf4a8ff4ff6929a1a2dd7acb670b3 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/157] 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 7afb8386b48080169e899451be4c2124aaca847c 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/157] 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 62c586c6421b6c146a08158697c07094ff38ca7d 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/157] 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 dbedd2e1a647150bb6584db6a0b84cfe2a1d07e3 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/157] 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 91596735514606e82de6af2315997e84c5a8c274 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/157] 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 aca61b2b936f1bd2b9d9062b398cf589c2baca44 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/157] 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 2116e7404e259cff2cbc9f8ace898fc4ee36c7eb 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/157] 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 ed5ba169e10a765144216c23ab1d7973515335ab 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/157] 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 e6913a16a8ef07778c3df485ce6cd1e63cf92503 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/157] 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 d38f93e5d393f9d31fbe7553c3b433cd18495268 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/157] 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 e34965f3dc9ec60a181b297ae7a138e8ddea34d0 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/157] 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 e6f14bac22f0d8fad7a3f7b0de23a05713959f31 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/157] 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 96cd8b217ebf339ef7ecaee8c65d013af4f7c4a4 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/157] 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 5df57a5fea83aae3f58b387a9f55a356311d48e6 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/157] 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 b730a67da9e0acaef5381203e3c9449bcac0f6d2 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/157] 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 d7124b6eeb13c7fe1939b153e33f988ede5c0f6f 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/157] 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 32c99c0bb0a5502eabb16188d254e0384b396ecb 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/157] 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 f2b105fd3cf6f0218661c867f173ae4d7bca9f14 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/157] 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 dea8f96009930316d1e4b7969679de8bb08335d3 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/157] 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 baac066d85033dead0d3122bd1ac4f0b409192cb 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/157] 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 1ec047af10804bc3203ef24c7cc180f67c450fed 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/157] 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 f07084ed2198ba578d85221d26c8982925593ea5 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/157] 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 f87103d736773d18ce2ade572c0467a1fbd72c1d 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/157] 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 927a533f7ea550791b1933d14b140516503f03dc 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/157] 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 7cab59f677a8673fc220699c44c0d68f8ed79514 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/157] 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 edb7f57b088598d9d8c841b012f7def3650e3dc2 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/157] 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 bb36286dc97adb41bace1c0a7635511198ac4740 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/157] 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 a07fecd6374a9131cb474e61d424ca3de94a8534 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/157] 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 0cf70c9c66d47ac35aa06f288267b7e2b8085c38 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/157] 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 c0649246f7241f5497d8fb9de6429599bc4c5f06 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/157] 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 210da724edd9900551a1cf21ed8f864985d04df2 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/157] 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 8bd462f738842fce21d928d5700b5602b82312dc 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/157] 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 35996f4879e38668b3673a9209ffdc55fa7f1305 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/157] 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 d8de3ba53fbf66acb85a81046088fbfd2dafbeb5 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/157] 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 2f15e2766e0e01a7c86e86f8977ca0b326b2e026 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/157] 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 7c6d662f4157fbbf37c4964820c963c3889b2965 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/157] 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 8c76ce5bb259eb7ce2fe85b9f0bafb1bfdb5b48c 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/157] 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 f41f1571a88d83a043b5db05914655dc1b5246e5 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/157] 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 61255ba896e8515b4c55f9d8dda9f70f0db38e2b 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/157] 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 6eab6e3fc065b1f7de880fac65b7f4aefdb49142 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/157] 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 debdb5e78f95ca59c03607cbb875450cccd23704 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/157] 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 cf439fdc3890dcc65f677c33dc3e55f470190899 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/157] 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 @@ -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 6dd2ceab12489afdbbc39af34d20321a581ca7f9 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/157] 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 @@ -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 3b5ef7d1235bc93c7f4163ec032c8fb997743ebc 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/157] 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 958bc2ad44f1cbd143143c92c875a3acb9b44a4d 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/157] 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 af0bff2058a6d1bed1fb4bfdb5a47dec95435a18 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/157] 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 3c5df87b7a57900d7cbb918f5ea09230272514de 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/157] 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 17870649959e34f78861222ff1d3ca6bf0cbca2b 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/157] 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 362dea7d071b9c7c83eaa4fce944291d9edb33d2 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/157] 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 e9d842aa4e4d0c1292c048317ca0234529e38058 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/157] 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 6dfd4f76cbfb86e39ec6ff5e7bd6930d65f105f9 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/157] 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 0c40ec88cbcd56eb24beffff48b8c1f7dbcbe44b 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/157] 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 897edae208988fb8021c435cfb1030744e6b6cf7 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/157] 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 e85d3e7210027ca09fbc59fabbbe8b3a19efe9ad 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/157] 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 62b9fca20248f1a8a615193c61fffe6bc28e2d5d 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/157] 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 085abb3de9a215063c9d632bc14a3a6ee2290770 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/157] 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 c83e8a65bb7836ed74249c1606206abd5f40ca5b 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/157] 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 654d1b4d346d5bf5b4b12850f832a3c2c7d0497a 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/157] 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 096c2488f757b0dc9cbda5c51d456af4c11ed00b 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/157] 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 886cfa613cb1289e033d0ace8d83893c11ede616 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/157] ARM64: Force hardware emulation of deprecated instructions. --- @@ -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 12d6629a2ac253862d7999dd9521c8b5e757ce14 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/157] 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 ed89ee81308cae4867605cbf712f54be476d0f07 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/157] 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 1e0a2b11cf6bb7c78dff0a46836cfd251e942f65 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/157] 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 154238baeee8b4475c313b8bdef1ced624ad2241 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/157] 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 7f39e861ebc658133fce66d12e7ed6aad5b95495 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/157] 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 6c3594cd9b78458fa92737847e8d0f18dada1fda 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/157] 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 8123f38fb4a106f9e3a528c065177933e5e9325e 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/157] 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 79d28691457dee9d803fca4c2df8a1051458885f 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/157] 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 5c5714ef74437e0878104bcfe1cf16e93b27625b 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/157] 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 31212ba2f3b22113e925e36c75fe040983e98f28 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/157] 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 ecc0af9ab7263b1f3a49f08e420048d4a76460f7 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/157] 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 31b22ba985fa8e6d2767cfd1f4c21cc47b2fbb6c 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/157] 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 05c61d2416340926b27f89d7be5e4e89537f33e4 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/157] 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 530e43517f639ef0f65f26c8f917434834b09eb0 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/157] 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 04b6f02a1ef00517e406af7b9bae59c07872e230 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/157] 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 e99b8b200b48c1cf4ae47f4ded1100892bd87e77 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/157] 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 b44b714f1c0437d594dfe8a830c180dc9fb48459 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/157] 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 116a3e95b43150604aaffb4dfe4ffc0eaf644806 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/157] 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 367ecc5ded458ce1a1c8eac2aa4571d19503b1df 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/157] 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 2209e233b04f1a8f8f3c8a3eba4b70cb14f1845c 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/157] 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 668d3666eff593b088cd2b47cc485fd0c7c7d59b 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/157] 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 3604c72f107d90922e76a23436c10350f434a820 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/157] 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 0a71656f8a73d8899afd38ffc7f2e7168ca2911d 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/157] 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 ec03322f17d06b7b74e185a286f105b39e9b6859 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/157] 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 db40d50850c3b1a77bd5d3c9adec62d5cb2db6cc 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/157] 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 46979df3ea5bb8f6d889e2a65e71b631dc837b61 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/157] 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 81f2773acce63f407677f6a459b91b91e40c6068 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/157] 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 aac0eb933980c9cd437e597eab35151695e72c38 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/157] 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 999e231b524da3e2e153acc3db37ff0d749068a6 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/157] 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 ec2ebd2573bf2528c5a982a51a39ddd6518a9d69 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/157] 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 5e70cdb0efd7cc82229c6e9fa58a796eff3165e4 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/157] 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 71df6a963cc036eee8446cec92820994274a9539 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/157] 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 56d5a5acc82d4131812cd9e294acc2feed6d118c 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/157] 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,10 +133459,10 @@ index fd71d9fbb400d71bb8cfb8672080e7c3053e3ae9..fd2ca788dcd56b1702454d71b7bedd42 } } -From 260c755a02f02f1294d0e32d0f0812a480c94dee Mon Sep 17 00:00:00 2001 +From 50de60f95b0bf87081daa9ad88c6abe167312466 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 +Subject: [PATCH 143/157] 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 @@ -133563,7 +133488,7 @@ Signed-off-by: Phil Elwell 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 +index 3aeffcb9c87e91d0be902bf851d38bb8b2550ebb..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 @@ -501,8 +501,15 @@ create_pagelist(char __user *buf, size_t count, unsigned short type, @@ -133595,8 +133520,8 @@ index 3aeffcb9c87e91d0be902bf851d38bb8b2550ebb..18f2f529687b60750a6a8e0f422d60af 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)); ++ 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) @@ -133616,44 +133541,10 @@ index 3aeffcb9c87e91d0be902bf851d38bb8b2550ebb..18f2f529687b60750a6a8e0f422d60af /* 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 ea89b9480e39bc8c94fd767fd6af267b8baab115 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 144/157] fiq_fsm: Use correct states when starting isoc OUT transfers In fiq_fsm_start_next_periodic() if an isochronous OUT transfer @@ -133690,10 +133581,10 @@ index 9304279592cb5b388086ef91cb52f1e9f94868ce..208252645c09d1d17bf07673989f91b7 break; } -From 5255c20a5cd584dbed1c4beb7648435f4d54547e Mon Sep 17 00:00:00 2001 +From b592e2be09d138f5fff04f37313aed1486f0d9c4 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 145/157] 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 +133648,1650 @@ 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 74896caecbfd28f544d67f6ac91044ad8c722047 Mon Sep 17 00:00:00 2001 +From: Nisar Sayed +Date: Tue, 9 May 2017 18:51:42 +0100 +Subject: [PATCH 146/157] 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 48519296c301d6f083dafad3a25eb8aa2b6335fc Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Wed, 14 Sep 2016 08:39:33 +0100 +Subject: [PATCH 147/157] 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 bbbcfd330797360d2e7e4f0f7718bda2a5d4184e Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Wed, 1 Feb 2017 17:09:18 -0800 +Subject: [PATCH 148/157] 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 3bbd12649e3de5d15eb2b25116ef7c38f1a5a303 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Wed, 1 Feb 2017 17:10:09 -0800 +Subject: [PATCH 149/157] 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 19dc72a17f0eb3818a181b79c4ee446db95b68c2 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Thu, 2 Feb 2017 09:42:18 -0800 +Subject: [PATCH 150/157] 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 68c681ab52b0b2b23840f1fb7d51710bd8cc3884 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Wed, 10 May 2017 21:39:45 +0100 +Subject: [PATCH 151/157] 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 e839ff8b8d1668a8ca860684190a03e6c870c3bc Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 18 Apr 2017 21:43:46 +0100 +Subject: [PATCH 152/157] 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 d2dcc185eb7371ab942b32f501fd9384aae78e44 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 11 May 2017 16:58:16 +0100 +Subject: [PATCH 153/157] 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 d2d11899fce41b48217408539d9b374f5a5c84fa Mon Sep 17 00:00:00 2001 +From: P33M +Date: Fri, 12 May 2017 12:24:00 +0100 +Subject: [PATCH 154/157] 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 f18c371d70d8b9485e124cff819ecd402c734598 Mon Sep 17 00:00:00 2001 +From: P33M +Date: Mon, 15 May 2017 14:27:48 +0100 +Subject: [PATCH 155/157] 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 3bb075a7e695cd67999d250147e6b72f2de515ba Mon Sep 17 00:00:00 2001 +From: P33M +Date: Mon, 15 May 2017 14:51:42 +0100 +Subject: [PATCH 156/157] 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 aeb743c4f0f661798f3bcf5a104922cf0ad04d55 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Mon, 15 May 2017 16:40:05 +0100 +Subject: [PATCH 157/157] 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