From 9a366c2a8498487c8c75407ada5b6e016ea9a320 Mon Sep 17 00:00:00 2001 From: Pablo Greco Date: Dec 20 2020 14:15:46 +0000 Subject: Update to 5.4.84 --- diff --git a/.raspberrypi2.metadata b/.raspberrypi2.metadata index 00c9db1..7e37574 100644 --- a/.raspberrypi2.metadata +++ b/.raspberrypi2.metadata @@ -1,3 +1,3 @@ 98ae49ad49397d5a4dcb3ff9a082223edf7c5bbd SOURCES/linux-5.4.tar.xz -be269d3a672fdaea40a9d0b2f39fbe4ea686cdc4 SOURCES/b0f9870274333af93ecc5e779619bf51c092364d.tar.gz -8d06345619804d1c13016d22d28606af24d052b2 SOURCES/patch-5.4.72.xz +5c44721d2e366f1ac21b1937b3826a36de578696 SOURCES/d016a6eb01c8c7326a89cb42809fed2a21525de5.tar.gz +a1314c96a2397fd8cf78ed43705774d5431676eb SOURCES/patch-5.4.84.xz diff --git a/SOURCES/rpi-5.4.x.patch b/SOURCES/rpi-5.4.x.patch index f53ee99..820a7a5 100644 --- a/SOURCES/rpi-5.4.x.patch +++ b/SOURCES/rpi-5.4.x.patch @@ -1,7 +1,7 @@ -From d562de11863e3d470f7d506ee706a83e1a9a6103 Mon Sep 17 00:00:00 2001 +From 3322ef349eeb1f81224d394831f25b43fa7736ed Mon Sep 17 00:00:00 2001 From: Dan Pasanen Date: Thu, 21 Sep 2017 09:55:42 -0500 -Subject: [PATCH 0001/1148] arm: partially revert +Subject: [PATCH 0001/1209] arm: partially revert 702b94bff3c50542a6e4ab9a4f4cef093262fe65 * Re-expose some dmi APIs for use in VCSM @@ -109,10 +109,10 @@ index e21249548e9f..33e4a9b8f1ba 100644 2.18.4 -From 99577bd99a9e9e7bcdea9fa45312081ee2ba8dd9 Mon Sep 17 00:00:00 2001 +From 9b65350c8498e600be9f85af6fd9e180766290ac Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 29 Oct 2018 14:45:45 +0000 -Subject: [PATCH 0002/1148] Revert "rtc: pcf8523: properly handle oscillator +Subject: [PATCH 0002/1209] Revert "rtc: pcf8523: properly handle oscillator stop bit" This reverts commit ede44c908d44b166a5b6bd7caacd105c2ff5a70f. @@ -171,10 +171,10 @@ index 2f435e533b10..c85abf77ab50 100644 2.18.4 -From a26521b1d2bd5581ee47810d42498221dcd5a3df Mon Sep 17 00:00:00 2001 +From ca1d70c1410b29a8055d8ef3e413fbddf90e0afd Mon Sep 17 00:00:00 2001 From: Steve Glendinning Date: Thu, 19 Feb 2015 18:47:12 +0000 -Subject: [PATCH 0003/1148] smsx95xx: fix crimes against truesize +Subject: [PATCH 0003/1209] 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. @@ -224,10 +224,10 @@ index bb4ccbda031a..dedebce4b2d9 100644 2.18.4 -From b25119d234ee011b972e893a86f013351eae1372 Mon Sep 17 00:00:00 2001 +From 1cf7e16ef10a8061a9669822d1209b31488d3b82 Mon Sep 17 00:00:00 2001 From: Sam Nazarko Date: Fri, 1 Apr 2016 17:27:21 +0100 -Subject: [PATCH 0004/1148] smsc95xx: Experimental: Enable turbo_mode and +Subject: [PATCH 0004/1209] smsc95xx: Experimental: Enable turbo_mode and packetsize=2560 by default See: http://forum.kodi.tv/showthread.php?tid=285288 @@ -273,10 +273,10 @@ index dedebce4b2d9..c5ebcb114309 100644 2.18.4 -From 978138ed2f41dfc557ea7dbdd5c3b777a3640515 Mon Sep 17 00:00:00 2001 +From 3f37fbded4631e4c206159dca6b0cb21179ed47a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 0005/1148] Allow mac address to be set in smsc95xx +Subject: [PATCH 0005/1209] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -375,10 +375,10 @@ index c5ebcb114309..510f4d410f69 100644 2.18.4 -From 33da235d59f0af76f5e4c3ae70894dd1011b9a27 Mon Sep 17 00:00:00 2001 +From f5a2144da6e3dcfdf1a8e70b154f637fe4e1ace2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 13 Mar 2015 12:43:36 +0000 -Subject: [PATCH 0006/1148] Protect __release_resource against resources +Subject: [PATCH 0006/1209] Protect __release_resource against resources without parents Without this patch, removing a device tree overlay can crash here. @@ -409,10 +409,10 @@ index 841737bbda9e..6877c789c5f6 100644 2.18.4 -From e9c2f31e350c11ec56839bafae52508524278585 Mon Sep 17 00:00:00 2001 +From 964fe43c3ef8eb2e1f99f7f264553a6eb6255947 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 4 Dec 2015 17:41:50 +0000 -Subject: [PATCH 0007/1148] irq-bcm2836: Prevent spurious interrupts, and trap +Subject: [PATCH 0007/1209] irq-bcm2836: Prevent spurious interrupts, and trap them early The old arch-specific IRQ macros included a dsb to ensure the @@ -442,10 +442,10 @@ index 2038693f074c..597d36ba601e 100644 2.18.4 -From d99617440373a493bdcd4c01d8478312923e3e02 Mon Sep 17 00:00:00 2001 +From e8e486f2d33875c817bff904bf38abc6952113aa Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:33:30 +0000 -Subject: [PATCH 0008/1148] irq-bcm2836: Avoid "Invalid trigger warning" +Subject: [PATCH 0008/1209] irq-bcm2836: Avoid "Invalid trigger warning" Initialise the level for each IRQ to avoid a warning from the arm arch timer code. @@ -472,10 +472,10 @@ index 597d36ba601e..c006a8ac10d5 100644 2.18.4 -From c03745bcb2ca46ed37854d0697f838f79815c46f Mon Sep 17 00:00:00 2001 +From ff6ae418c0bd6b84f789c9d777b4036462f09536 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 0009/1148] irqchip: bcm2835: Add FIQ support +Subject: [PATCH 0009/1209] irqchip: bcm2835: Add FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -607,10 +607,10 @@ index 418245d31921..64472b25d0b4 100644 2.18.4 -From 1205c452b41ba98ff9f296b72b0213124ff28684 Mon Sep 17 00:00:00 2001 +From 9fd6d75b2b9bfa5f4628afc2a225fe55c549a442 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 0010/1148] irqchip: irq-bcm2835: Add 2836 FIQ support +Subject: [PATCH 0010/1209] irqchip: irq-bcm2835: Add 2836 FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -712,10 +712,10 @@ index 64472b25d0b4..2fccc5cfe9f3 100644 2.18.4 -From 8e33b25bce806c2826012d57494c375550b5dab0 Mon Sep 17 00:00:00 2001 +From e7aba647390873df24be0b8aa2b1aacf91b9cd7b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 10:26:09 +0100 -Subject: [PATCH 0011/1148] spi: spidev: Completely disable the spidev warning +Subject: [PATCH 0011/1209] spi: spidev: Completely disable the spidev warning An alternative strategy would be to use "rpi,spidev" instead, but that would require many Raspberry Pi Device Tree changes. @@ -742,10 +742,10 @@ index be503a0e6ef7..736af270d7a1 100644 2.18.4 -From 252e8c92adcb64d9b54e8d0f61c54e68c7517182 Mon Sep 17 00:00:00 2001 +From d2a6ea353560439ca4fde7dd8dec5a0cd1d75000 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 0012/1148] dmaengine: bcm2835: Load driver early and support +Subject: [PATCH 0012/1209] dmaengine: bcm2835: Load driver early and support legacy API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -851,10 +851,10 @@ index e4c593f48575..6860131b02d9 100644 2.18.4 -From 6608217c24a092d321d4427de4102c3ea9fbca97 Mon Sep 17 00:00:00 2001 +From debda15764d98b7fc32ee1af1ccceabb9b067f16 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 25 Jan 2016 17:25:12 +0000 -Subject: [PATCH 0013/1148] firmware: Updated mailbox header +Subject: [PATCH 0013/1209] firmware: Updated mailbox header --- include/soc/bcm2835/raspberrypi-firmware.h | 3 +++ @@ -884,10 +884,10 @@ index 7800e12ee042..3f357c05788e 100644 2.18.4 -From b1bd9fa444b5d9a565c156876f4f50cfce81edc2 Mon Sep 17 00:00:00 2001 +From a1c6b44a2eafa650a71bc73c7e02883ef5d57fd5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 15 Jun 2016 16:48:41 +0100 -Subject: [PATCH 0014/1148] rtc: Add SPI alias for pcf2123 driver +Subject: [PATCH 0014/1209] rtc: Add SPI alias for pcf2123 driver Without this alias, Device Tree won't cause the driver to be loaded. @@ -910,10 +910,10 @@ index c3691fa4210e..ead1fd376d2d 100644 2.18.4 -From 6a1ca295ba0229c60a2d6e80693b80a228c43c17 Mon Sep 17 00:00:00 2001 +From cf42563f0c142c3dbb2da91872f90abf12f6fb27 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 0015/1148] watchdog: bcm2835: Support setting reboot partition +Subject: [PATCH 0015/1209] watchdog: bcm2835: Support setting reboot partition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1018,10 +1018,10 @@ index dec6ca019bea..62937e6f83ca 100644 2.18.4 -From 33ad90696eaf23c8341cf67a67e986dfc78b58c2 Mon Sep 17 00:00:00 2001 +From 2dfdca5abc1d9fbcec13ab4cb6bb43030bc2b390 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 5 Apr 2016 19:40:12 +0100 -Subject: [PATCH 0016/1148] reboot: Use power off rather than busy spinning +Subject: [PATCH 0016/1209] reboot: Use power off rather than busy spinning when halt is requested --- @@ -1047,10 +1047,10 @@ index bb18ed0539f4..a8595ab97e5b 100644 2.18.4 -From 0941f4b817a26661f3a8acaf149abd6d8785464a Mon Sep 17 00:00:00 2001 +From d2e4d1d352d4901756b4c12b75b1ef40c926c118 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 9 Nov 2016 13:02:52 +0000 -Subject: [PATCH 0017/1148] bcm: Make RASPBERRYPI_POWER depend on PM +Subject: [PATCH 0017/1209] bcm: Make RASPBERRYPI_POWER depend on PM --- drivers/soc/bcm/Kconfig | 1 + @@ -1072,10 +1072,10 @@ index 648e32693b7e..f204562996e2 100644 2.18.4 -From 67f55546db3adba9ee40038c3106c0c7778003d4 Mon Sep 17 00:00:00 2001 +From 488583873bf37cc23c45f90fefd848f97435c081 Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Fri, 2 Sep 2016 16:45:27 +0100 -Subject: [PATCH 0018/1148] Register the clocks early during the boot process, +Subject: [PATCH 0018/1209] 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. @@ -1086,10 +1086,10 @@ Signed-off-by: Martin Sperl 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c -index 45420b514149..519cc8791d89 100644 +index c5486537b928..5c2eb7f66887 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -2265,8 +2265,15 @@ static int bcm2835_clk_probe(struct platform_device *pdev) +@@ -2267,8 +2267,15 @@ static int bcm2835_clk_probe(struct platform_device *pdev) if (ret) return ret; @@ -1106,7 +1106,7 @@ index 45420b514149..519cc8791d89 100644 } static const struct cprman_plat_data cprman_bcm2835_plat_data = { -@@ -2292,7 +2299,11 @@ static struct platform_driver bcm2835_clk_driver = { +@@ -2294,7 +2301,11 @@ static struct platform_driver bcm2835_clk_driver = { .probe = bcm2835_clk_probe, }; @@ -1123,10 +1123,10 @@ index 45420b514149..519cc8791d89 100644 2.18.4 -From 2ddfcb75333a2986ca71a56c20d9518704d8f286 Mon Sep 17 00:00:00 2001 +From 5faab42a6bc89b4da646b2a95002e9b5962179ae Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 6 Dec 2016 17:05:39 +0000 -Subject: [PATCH 0019/1148] bcm2835-rng: Avoid initialising if already enabled +Subject: [PATCH 0019/1209] bcm2835-rng: Avoid initialising if already enabled Avoids the 0x40000 cycles of warmup again if firmware has already used it --- @@ -1154,10 +1154,10 @@ index f759790c3cdb..1b85ebcbca80 100644 2.18.4 -From fc7163b44dfba221d73b1a97b2e2ef345076be4e Mon Sep 17 00:00:00 2001 +From e4db4ae93bb713bb03a6000fd369de7bddd2092d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 -Subject: [PATCH 0020/1148] clk-bcm2835: Mark used PLLs and dividers CRITICAL +Subject: [PATCH 0020/1209] 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 @@ -1169,10 +1169,10 @@ Signed-off-by: Phil Elwell 1 file changed, 5 insertions(+) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c -index 519cc8791d89..028ee18e5dfe 100644 +index 5c2eb7f66887..7f6e174107d1 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1379,6 +1379,11 @@ bcm2835_register_pll_divider(struct bcm2835_cprman *cprman, +@@ -1381,6 +1381,11 @@ bcm2835_register_pll_divider(struct bcm2835_cprman *cprman, divider->div.hw.init = &init; divider->div.table = NULL; @@ -1188,10 +1188,10 @@ index 519cc8791d89..028ee18e5dfe 100644 2.18.4 -From c071778c1b95a12a09572d45a11f7f085416789c Mon Sep 17 00:00:00 2001 +From 88862f88e340dcda91f28f99c54f1c895d247bf6 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 -Subject: [PATCH 0021/1148] clk-bcm2835: Add claim-clocks property +Subject: [PATCH 0021/1209] 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, @@ -1206,7 +1206,7 @@ Signed-off-by: Phil Elwell 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c -index 028ee18e5dfe..e9fd48c0ba21 100644 +index 7f6e174107d1..70b545652933 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c @@ -1311,6 +1311,8 @@ static const struct clk_ops bcm2835_vpu_clock_clk_ops = { @@ -1228,7 +1228,7 @@ index 028ee18e5dfe..e9fd48c0ba21 100644 pll = kzalloc(sizeof(*pll), GFP_KERNEL); if (!pll) return NULL; -@@ -1380,8 +1385,10 @@ bcm2835_register_pll_divider(struct bcm2835_cprman *cprman, +@@ -1382,8 +1387,10 @@ bcm2835_register_pll_divider(struct bcm2835_cprman *cprman, divider->div.table = NULL; if (!(cprman_read(cprman, data->cm_reg) & data->hold_mask)) { @@ -1241,7 +1241,7 @@ index 028ee18e5dfe..e9fd48c0ba21 100644 } divider->cprman = cprman; -@@ -2189,6 +2196,8 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { +@@ -2191,6 +2198,8 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { .ctl_reg = CM_PERIICTL), }; @@ -1250,7 +1250,7 @@ index 028ee18e5dfe..e9fd48c0ba21 100644 /* * Permanently take a reference on the parent of the SDRAM clock. * -@@ -2208,6 +2217,19 @@ static int bcm2835_mark_sdc_parent_critical(struct clk *sdc) +@@ -2210,6 +2219,19 @@ static int bcm2835_mark_sdc_parent_critical(struct clk *sdc) return clk_prepare_enable(parent); } @@ -1270,7 +1270,7 @@ index 028ee18e5dfe..e9fd48c0ba21 100644 static int bcm2835_clk_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; -@@ -2218,6 +2240,7 @@ static int bcm2835_clk_probe(struct platform_device *pdev) +@@ -2220,6 +2242,7 @@ static int bcm2835_clk_probe(struct platform_device *pdev) const size_t asize = ARRAY_SIZE(clk_desc_array); const struct cprman_plat_data *pdata; size_t i; @@ -1278,7 +1278,7 @@ index 028ee18e5dfe..e9fd48c0ba21 100644 int ret; pdata = of_device_get_match_data(&pdev->dev); -@@ -2237,6 +2260,13 @@ static int bcm2835_clk_probe(struct platform_device *pdev) +@@ -2239,6 +2262,13 @@ static int bcm2835_clk_probe(struct platform_device *pdev) if (IS_ERR(cprman->regs)) return PTR_ERR(cprman->regs); @@ -1296,10 +1296,10 @@ index 028ee18e5dfe..e9fd48c0ba21 100644 2.18.4 -From c6d1ae1947f27a60a4e04cbc6c67950be4144685 Mon Sep 17 00:00:00 2001 +From 60865dbfe2f70375f075114144b30b2712720f9a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 6 Mar 2017 09:06:18 +0000 -Subject: [PATCH 0022/1148] clk-bcm2835: Read max core clock from firmware +Subject: [PATCH 0022/1209] 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 @@ -1322,7 +1322,7 @@ Signed-off-by: Phil Elwell 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c -index e9fd48c0ba21..0c83c356faf1 100644 +index 70b545652933..9b9d17e9ad5c 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c @@ -35,6 +35,7 @@ @@ -1390,7 +1390,7 @@ index e9fd48c0ba21..0c83c356faf1 100644 .set_rate = bcm2835_clock_set_rate, .determine_rate = bcm2835_clock_determine_rate, .set_parent = bcm2835_clock_set_parent, -@@ -2239,6 +2267,7 @@ static int bcm2835_clk_probe(struct platform_device *pdev) +@@ -2241,6 +2269,7 @@ static int bcm2835_clk_probe(struct platform_device *pdev) const struct bcm2835_clk_desc *desc; const size_t asize = ARRAY_SIZE(clk_desc_array); const struct cprman_plat_data *pdata; @@ -1398,7 +1398,7 @@ index e9fd48c0ba21..0c83c356faf1 100644 size_t i; u32 clk_id; int ret; -@@ -2260,6 +2289,14 @@ static int bcm2835_clk_probe(struct platform_device *pdev) +@@ -2262,6 +2291,14 @@ static int bcm2835_clk_probe(struct platform_device *pdev) if (IS_ERR(cprman->regs)) return PTR_ERR(cprman->regs); @@ -1417,10 +1417,10 @@ index e9fd48c0ba21..0c83c356faf1 100644 2.18.4 -From 3393416c8f4283bbb1b81af0c8a14ed22e0db549 Mon Sep 17 00:00:00 2001 +From aab32b3561e2c06248a3c532d68c306c0d5d40e6 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 9 May 2016 17:28:18 -0700 -Subject: [PATCH 0023/1148] clk: bcm2835: Mark GPIO clocks enabled at boot as +Subject: [PATCH 0023/1209] clk: bcm2835: Mark GPIO clocks enabled at boot as critical. These divide off of PLLD_PER and are used for the ethernet and wifi @@ -1438,10 +1438,10 @@ Signed-off-by: Eric Anholt 1 file changed, 9 insertions(+) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c -index 0c83c356faf1..868ada45db28 100644 +index 9b9d17e9ad5c..db1df40271c0 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1470,6 +1470,15 @@ static struct clk_hw *bcm2835_register_clock(struct bcm2835_cprman *cprman, +@@ -1472,6 +1472,15 @@ static struct clk_hw *bcm2835_register_clock(struct bcm2835_cprman *cprman, init.name = data->name; init.flags = data->flags | CLK_IGNORE_UNUSED; @@ -1461,10 +1461,10 @@ index 0c83c356faf1..868ada45db28 100644 2.18.4 -From 45d2e9add5cd9fd27d101a54647dc3d45ab6e992 Mon Sep 17 00:00:00 2001 +From 4ec2c55a999df3ac5dd91ccaf7ea6bfe3eb90708 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:36:44 +0000 -Subject: [PATCH 0024/1148] sound: Demote deferral errors to INFO level +Subject: [PATCH 0024/1209] 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. @@ -1502,10 +1502,10 @@ index 9df20768a8f2..0b9f9a06bdb5 100644 2.18.4 -From cf3ff9bceb3ae8e207393ad0a7b0d969d6e6a29e Mon Sep 17 00:00:00 2001 +From ba14fa0089545ffa7a0cefe06ce48e885a37d273 Mon Sep 17 00:00:00 2001 From: Claggy3 Date: Sat, 11 Feb 2017 14:00:30 +0000 -Subject: [PATCH 0025/1148] Update vfpmodule.c +Subject: [PATCH 0025/1209] 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 @@ -1645,10 +1645,10 @@ index 8c9e7f9f0277..f0ceb1975964 100644 2.18.4 -From 8a268b378dc29c5062a3ec8c0d7102356a3762ae Mon Sep 17 00:00:00 2001 +From b8d0ac19949a96982101534037d328ffe28743e1 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 0026/1148] i2c: bcm2835: Add debug support +Subject: [PATCH 0026/1209] i2c: bcm2835: Add debug support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1840,10 +1840,10 @@ index 5ab901ad615d..beb67afa6a3c 100644 2.18.4 -From 0a67c8833520f651544f7f6ffce248e243dce5db Mon Sep 17 00:00:00 2001 +From 914fc3fe3c47ea7cc4f02a0ebbaeade92c60533b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 18 Dec 2014 16:07:15 -0800 -Subject: [PATCH 0027/1148] mm: Remove the PFN busy warning +Subject: [PATCH 0027/1209] mm: Remove the PFN busy warning See commit dae803e165a11bc88ca8dbc07a11077caf97bbcb -- the warning is expected sometimes when using CMA. However, that commit still spams @@ -1855,10 +1855,10 @@ Signed-off-by: Eric Anholt 1 file changed, 2 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index aff0bb4629bd..d8125f338fe1 100644 +index 1c869c6b825f..0b884567c2ec 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -8489,8 +8489,6 @@ int alloc_contig_range(unsigned long start, unsigned long end, +@@ -8511,8 +8511,6 @@ int alloc_contig_range(unsigned long start, unsigned long end, /* Make sure the range is really isolated. */ if (test_pages_isolated(outer_start, end, false)) { @@ -1871,10 +1871,10 @@ index aff0bb4629bd..d8125f338fe1 100644 2.18.4 -From d66a47c19208e8c1cdd152f1fd56f4ea830ba5cc Mon Sep 17 00:00:00 2001 +From 0d9ed498a2ad60f817b5212446a3994c34e925df Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 10:06:56 +0000 -Subject: [PATCH 0028/1148] ASoC: Add prompt for ICS43432 codec +Subject: [PATCH 0028/1209] 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 @@ -1902,10 +1902,10 @@ index 229cc89f8c5a..080a2cec3fa8 100644 2.18.4 -From 87beaa1645f9591469c30a1018a744a313c218a9 Mon Sep 17 00:00:00 2001 +From 5c0c970f58bb3a4eecde370382e40e3d2435c765 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 23 Jan 2018 16:52:45 +0000 -Subject: [PATCH 0029/1148] irqchip: irq-bcm2836: Remove regmap and syscon use +Subject: [PATCH 0029/1209] irqchip: irq-bcm2836: Remove regmap and syscon use The syscon node defines a register range that duplicates that used by the local_intc node on bcm2836/7. Since irq-bcm2835 and irq-bcm2836 are @@ -2022,10 +2022,10 @@ index c006a8ac10d5..49642bcd0b75 100644 2.18.4 -From 1696559fad778d61a4b400544543fc93cc1ff1fb Mon Sep 17 00:00:00 2001 +From 47a8b6b6a2655d9a8f88a2bd2984cf8d9abd7de9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 17 Oct 2017 15:04:29 +0100 -Subject: [PATCH 0030/1148] lan78xx: Enable LEDs and auto-negotiation +Subject: [PATCH 0030/1209] lan78xx: Enable LEDs and auto-negotiation For applications of the LAN78xx that don't have valid programmed EEPROMs or OTPs, enabling both LEDs and auto-negotiation by default @@ -2076,10 +2076,10 @@ index 71cc5b63d8ce..ba42568316f1 100644 2.18.4 -From dc7dc5bbe65caeb69d6f6cb5b76ac366e48026f4 Mon Sep 17 00:00:00 2001 +From 21b3a602ae3a050280d447858d934ff7e76cf9ab Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 23 Feb 2016 17:26:48 +0000 -Subject: [PATCH 0031/1148] amba_pl011: Don't use DT aliases for numbering +Subject: [PATCH 0031/1209] 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 @@ -2091,10 +2091,10 @@ use the same logic. 1 file changed, 5 insertions(+) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c -index a8a538b34b53..ce77f5c4ca4c 100644 +index 16720c97a4dd..35dc702fad87 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -2575,7 +2575,12 @@ static int pl011_setup_port(struct device *dev, struct uart_amba_port *uap, +@@ -2578,7 +2578,12 @@ static int pl011_setup_port(struct device *dev, struct uart_amba_port *uap, if (IS_ERR(base)) return PTR_ERR(base); @@ -2111,10 +2111,10 @@ index a8a538b34b53..ce77f5c4ca4c 100644 2.18.4 -From 2c317ae2dcd6638db1e251113339c2743d094e5d Mon Sep 17 00:00:00 2001 +From 21828f16663f362aa9872c3088fc4fc4533eb63f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 1 Mar 2017 16:07:39 +0000 -Subject: [PATCH 0032/1148] amba_pl011: Round input clock up +Subject: [PATCH 0032/1209] 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 @@ -2138,10 +2138,10 @@ Signed-off-by: Phil Elwell 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c -index ce77f5c4ca4c..1ceddb9182ec 100644 +index 35dc702fad87..b3e24efac6d8 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -1650,6 +1650,23 @@ static void pl011_put_poll_char(struct uart_port *port, +@@ -1653,6 +1653,23 @@ static void pl011_put_poll_char(struct uart_port *port, #endif /* CONFIG_CONSOLE_POLL */ @@ -2165,7 +2165,7 @@ index ce77f5c4ca4c..1ceddb9182ec 100644 static int pl011_hwinit(struct uart_port *port) { struct uart_amba_port *uap = -@@ -1666,7 +1683,7 @@ static int pl011_hwinit(struct uart_port *port) +@@ -1669,7 +1686,7 @@ static int pl011_hwinit(struct uart_port *port) if (retval) return retval; @@ -2174,7 +2174,7 @@ index ce77f5c4ca4c..1ceddb9182ec 100644 /* Clear pending error and receive interrupts */ pl011_write(UART011_OEIS | UART011_BEIS | UART011_PEIS | -@@ -2321,7 +2338,7 @@ static int pl011_console_setup(struct console *co, char *options) +@@ -2324,7 +2341,7 @@ static int pl011_console_setup(struct console *co, char *options) plat->init(); } @@ -2183,7 +2183,7 @@ index ce77f5c4ca4c..1ceddb9182ec 100644 if (uap->vendor->fixed_options) { baud = uap->fixed_baud; -@@ -2506,6 +2523,7 @@ static struct uart_driver amba_reg = { +@@ -2509,6 +2526,7 @@ static struct uart_driver amba_reg = { .cons = AMBA_CONSOLE, }; @@ -2191,7 +2191,7 @@ index ce77f5c4ca4c..1ceddb9182ec 100644 static int pl011_probe_dt_alias(int index, struct device *dev) { struct device_node *np; -@@ -2537,6 +2555,7 @@ static int pl011_probe_dt_alias(int index, struct device *dev) +@@ -2540,6 +2558,7 @@ static int pl011_probe_dt_alias(int index, struct device *dev) return ret; } @@ -2203,10 +2203,10 @@ index ce77f5c4ca4c..1ceddb9182ec 100644 2.18.4 -From 9e2df6c06de23e01e0c4fa7d33ee57c5eda59f42 Mon Sep 17 00:00:00 2001 +From 8391b69d5ddf7cd93099a2976d70d68836cc731f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 29 Sep 2017 10:32:19 +0100 -Subject: [PATCH 0033/1148] amba_pl011: Insert mb() for correct FIFO handling +Subject: [PATCH 0033/1209] amba_pl011: Insert mb() for correct FIFO handling The pl011 register accessor functions use the _relaxed versions of the standard readl() and writel() functions, meaning that there are no @@ -2221,10 +2221,10 @@ Signed-off-by: Phil Elwell 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c -index 1ceddb9182ec..6ce039571057 100644 +index b3e24efac6d8..6d953abd3779 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -1383,6 +1383,7 @@ static bool pl011_tx_char(struct uart_amba_port *uap, unsigned char c, +@@ -1386,6 +1386,7 @@ static bool pl011_tx_char(struct uart_amba_port *uap, unsigned char c, return false; /* unable to transmit character */ pl011_write(c, uap, REG_DR); @@ -2236,10 +2236,10 @@ index 1ceddb9182ec..6ce039571057 100644 2.18.4 -From 128b1a16bdaeae4b466aa6e9f97f0fbcb259aac6 Mon Sep 17 00:00:00 2001 +From fd60fcccef174dae62ac696c2d873da5d70ba253 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 29 Sep 2017 10:32:19 +0100 -Subject: [PATCH 0034/1148] amba_pl011: Add cts-event-workaround DT property +Subject: [PATCH 0034/1209] amba_pl011: Add cts-event-workaround DT property The BCM2835 PL011 implementation seems to have a bug that can lead to a transmission lockup if CTS changes frequently. A workaround was added to @@ -2275,10 +2275,10 @@ index 1a64d59152aa..a4650389eded 100644 - compatible - reg diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c -index 6ce039571057..fb728d006503 100644 +index 6d953abd3779..ba2029bf1e63 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -2662,6 +2662,11 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id) +@@ -2665,6 +2665,11 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id) if (IS_ERR(uap->clk)) return PTR_ERR(uap->clk); @@ -2294,10 +2294,10 @@ index 6ce039571057..fb728d006503 100644 2.18.4 -From 4c370c878d008903cb343efbe42a91a84c801ebe Mon Sep 17 00:00:00 2001 +From e2d12420c84d5613c418c48dfbe39f5d57fa3696 Mon Sep 17 00:00:00 2001 From: notro Date: Thu, 10 Jul 2014 13:59:47 +0200 -Subject: [PATCH 0035/1148] pinctrl-bcm2835: Set base to 0 give expected gpio +Subject: [PATCH 0035/1209] pinctrl-bcm2835: Set base to 0 give expected gpio numbering Signed-off-by: Noralf Tronnes @@ -2322,10 +2322,10 @@ index 0de1a3a96984..76fad11f2ad8 100644 2.18.4 -From 0efec1a40c8baa8292ad002b05769ffed80d04bd Mon Sep 17 00:00:00 2001 +From 2611beaf5a3915040bce8239a47565dee4c91e9b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 0036/1148] Main bcm2708/bcm2709 linux port +Subject: [PATCH 0036/1209] Main bcm2708/bcm2709 linux port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2484,10 +2484,10 @@ index 39761d190545..9766d8b50778 100644 2.18.4 -From 51b85c1f7e803d9c83f3ff950aca6218220fd1ff Mon Sep 17 00:00:00 2001 +From 6d411b756ad0be2d0fa53c174fdd559c9ae428b4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 0037/1148] Add dwc_otg driver +Subject: [PATCH 0037/1209] Add dwc_otg driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -64185,10 +64185,10 @@ index 000000000000..cdc9963176e5 2.18.4 -From 08f028506b97765c6b0f8bd95f0a108f7e1f03df Mon Sep 17 00:00:00 2001 +From cd26d90268e14e12a5bb3ed564ea80ecf3622198 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 17:06:34 +0100 -Subject: [PATCH 0038/1148] bcm2708 framebuffer driver +Subject: [PATCH 0038/1209] bcm2708 framebuffer driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -67767,10 +67767,10 @@ index 3f357c05788e..a5f3fff6773e 100644 2.18.4 -From 9f3b1449e2c5afd834a27c8c67f86a1b9af0a425 Mon Sep 17 00:00:00 2001 +From 19231b120c98e33a5006e8ecc90a67cd3de21c79 Mon Sep 17 00:00:00 2001 From: James Hughes Date: Thu, 14 Mar 2019 13:27:54 +0000 -Subject: [PATCH 0039/1148] Pulled in the multi frame buffer support from the +Subject: [PATCH 0039/1209] Pulled in the multi frame buffer support from the Pi3 repo --- @@ -68616,10 +68616,10 @@ index a5f3fff6773e..25fca695f903 100644 2.18.4 -From a001368b1b8b3e2195d92a37cd761f9c46fcecc9 Mon Sep 17 00:00:00 2001 +From 85a1044b3c65444e8a2e441e06571fe5a3112e15 Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 0040/1148] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 0040/1209] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -68853,10 +68853,10 @@ index a6d0ca46f28b..8234207b1914 100644 static int bcm2708_fb_register(struct bcm2708_fb *fb) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c -index 97abcd497c7e..bfa6ae128ec1 100644 +index bf76dadbed87..b30252ec6722 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c -@@ -1072,6 +1072,30 @@ fb_blank(struct fb_info *info, int blank) +@@ -1076,6 +1076,30 @@ fb_blank(struct fb_info *info, int blank) } EXPORT_SYMBOL(fb_blank); @@ -68887,7 +68887,7 @@ index 97abcd497c7e..bfa6ae128ec1 100644 static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) { -@@ -1080,6 +1104,7 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, +@@ -1084,6 +1108,7 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, struct fb_fix_screeninfo fix; struct fb_cmap cmap_from; struct fb_cmap_user cmap; @@ -68895,7 +68895,7 @@ index 97abcd497c7e..bfa6ae128ec1 100644 void __user *argp = (void __user *)arg; long ret = 0; -@@ -1155,6 +1180,15 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, +@@ -1159,6 +1184,15 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, unlock_fb_info(info); console_unlock(); break; @@ -68911,7 +68911,7 @@ index 97abcd497c7e..bfa6ae128ec1 100644 default: lock_fb_info(info); fb = info->fbops; -@@ -1300,6 +1334,7 @@ static long fb_compat_ioctl(struct file *file, unsigned int cmd, +@@ -1304,6 +1338,7 @@ static long fb_compat_ioctl(struct file *file, unsigned int cmd, case FBIOPAN_DISPLAY: case FBIOGET_CON2FBMAP: case FBIOPUT_CON2FBMAP: @@ -68953,10 +68953,10 @@ index b6aac7ee1f67..212b7d5cb94c 100644 2.18.4 -From 0bb0ab67b5925a049a9c540c4df24edd14790399 Mon Sep 17 00:00:00 2001 +From 7c8554d93b305198040d602de111968fb3ea002a Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 0041/1148] Speed up console framebuffer imageblit function +Subject: [PATCH 0041/1209] 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 @@ -69168,10 +69168,10 @@ index a2bb276a8b24..436494fba15a 100644 2.18.4 -From 7fb5989767c1c81ccfae302924f8c15b58a74bba Mon Sep 17 00:00:00 2001 +From a1db35e51ebbdcd443e2db50bdf2096ae7f66072 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 0042/1148] dmaengine: Add support for BCM2708 +Subject: [PATCH 0042/1209] dmaengine: Add support for BCM2708 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -69822,10 +69822,10 @@ index 000000000000..6ca874d332a8 2.18.4 -From a80b844f22e59e670e17e5cc6780b741142d139e Mon Sep 17 00:00:00 2001 +From dc5ed9f27498e319e3e4b4f4a48915d21ff082c8 Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:06 +0100 -Subject: [PATCH 0043/1148] MMC: added alternative MMC driver +Subject: [PATCH 0043/1209] MMC: added alternative MMC driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -70031,7 +70031,7 @@ Signed-off-by: Yaroslav Rosomakho create mode 100644 drivers/mmc/host/bcm2835-mmc.c diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c -index 7f480c6b1981..51dd5a02e063 100644 +index 63e838ec8af8..91f718cf24cb 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -166,6 +166,13 @@ static DEFINE_MUTEX(open_lock); @@ -71811,10 +71811,10 @@ index cf3780a6ccc4..dc3fedec75d7 100644 2.18.4 -From 8bf130139a3256ba9adf6cacd63e5efbf9968278 Mon Sep 17 00:00:00 2001 +From 2e56e2281a6e190c49809e3c51eff5aa432a3137 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Mar 2015 17:49:47 +0000 -Subject: [PATCH 0044/1148] Adding bcm2835-sdhost driver, and an overlay to +Subject: [PATCH 0044/1209] Adding bcm2835-sdhost driver, and an overlay to enable it BCM2835 has two SD card interfaces. This driver uses the other one. @@ -74304,10 +74304,10 @@ index 000000000000..ba2dd8345fd4 2.18.4 -From db9304c282b70a55a08a4b2e4d3248164874027e Mon Sep 17 00:00:00 2001 +From 997d2aa9d868829c18baf75bcc0f035b5c7c6429 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 28 Oct 2016 15:36:43 +0100 -Subject: [PATCH 0045/1148] vc_mem: Add vc_mem driver for querying firmware +Subject: [PATCH 0045/1209] vc_mem: Add vc_mem driver for querying firmware memory addresses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -74826,10 +74826,10 @@ index 000000000000..3c7079237496 2.18.4 -From 95d38798130b142ea60d1e829c9eb8a87fc16125 Mon Sep 17 00:00:00 2001 +From 6ac7b7899fb6b8aa2020bf75e782e9d58c6c079a Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Tue, 22 Jul 2014 15:41:04 +0100 -Subject: [PATCH 0046/1148] vcsm: VideoCore shared memory service for BCM2835 +Subject: [PATCH 0046/1209] vcsm: VideoCore shared memory service for BCM2835 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -79839,10 +79839,10 @@ index 000000000000..2395ff08c5ce 2.18.4 -From a0a6327c4dfc6bced1b7e987b6ea20e651d1ee87 Mon Sep 17 00:00:00 2001 +From 5fff6a8ecbdf38e3ab6bb4e565262f54b00b22fe Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Fri, 21 Aug 2015 23:14:48 +0100 -Subject: [PATCH 0047/1148] Add /dev/gpiomem device for rootless user GPIO +Subject: [PATCH 0047/1209] Add /dev/gpiomem device for rootless user GPIO access Signed-off-by: Luke Wren @@ -80154,10 +80154,10 @@ index 000000000000..f5e7f1ba8fb6 2.18.4 -From 952c41b6c1bd02d88d8eb1fa8cb518ec214e53e2 Mon Sep 17 00:00:00 2001 +From 4a04bf9f4f68c6b9619b73a49bcb5e5f2550d5af Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:14:45 +0100 -Subject: [PATCH 0048/1148] Add SMI driver +Subject: [PATCH 0048/1209] Add SMI driver Signed-off-by: Luke Wren @@ -82092,10 +82092,10 @@ index 000000000000..ee3a75edfc03 2.18.4 -From b20e267babf18daebe54af096f6cec89de262308 Mon Sep 17 00:00:00 2001 +From 45f3dae47bf97d38a4bcfe5b698eddc31b775772 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 0049/1148] Add cpufreq driver +Subject: [PATCH 0049/1209] Add cpufreq driver Signed-off-by: popcornmix @@ -82363,10 +82363,10 @@ index 000000000000..66184acdae49 2.18.4 -From 91cd558ea014e339d825877e42447436941432f5 Mon Sep 17 00:00:00 2001 +From bd6a9731362f9b2e50f8fc911e314540d9374794 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 15:44:08 +0100 -Subject: [PATCH 0050/1148] Add Chris Boot's i2c driver +Subject: [PATCH 0050/1209] Add Chris Boot's i2c driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -82470,7 +82470,7 @@ both bcm2708_bsc_fifo_fill and ~drain are changed as well. create mode 100644 drivers/i2c/busses/i2c-bcm2708.c diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig -index 146ce40d8e0a..c9ae45f55d2b 100644 +index 2d08a8719506..539f9309f6e6 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -9,6 +9,25 @@ menu "I2C Hardware Bus support" @@ -83034,10 +83034,10 @@ index 000000000000..962f2e5c7455 2.18.4 -From b276713930cd4b91a42fe614729430d0893de566 Mon Sep 17 00:00:00 2001 +From 202046e2b772da1fcad68e16159cd31ae397bc4e 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 0051/1148] char: broadcom: Add vcio module +Subject: [PATCH 0051/1209] char: broadcom: Add vcio module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -83300,10 +83300,10 @@ index 000000000000..d2598663a2b5 2.18.4 -From 379bfcd9d44b46e07e228adc6f813bdb67c03e64 Mon Sep 17 00:00:00 2001 +From f58887b821d0fb50690767ed372b628657082130 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 0052/1148] firmware: bcm2835: Support ARCH_BCM270x +Subject: [PATCH 0052/1209] firmware: bcm2835: Support ARCH_BCM270x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -83389,10 +83389,10 @@ index da26a584dca0..7162f6d6649c 100644 2.18.4 -From 1d8e2c098ea8561b978cdcc77fa072785703c727 Mon Sep 17 00:00:00 2001 +From a959acffa015f8f4a8016c919971b114eec58a99 Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:46:08 +0200 -Subject: [PATCH 0053/1148] BCM2708: Add core Device Tree support +Subject: [PATCH 0053/1209] BCM2708: Add core Device Tree support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -106002,10 +106002,10 @@ index a6d0044328b1..bdec9e50358d 100644 2.18.4 -From b475400d48406a506315f70918719b1e5a0efc23 Mon Sep 17 00:00:00 2001 +From 00c987e4684ac70fea561fc2f685c829bb196c9e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Feb 2015 13:50:57 +0000 -Subject: [PATCH 0054/1148] BCM270x_DT: Add pwr_led, and the required "input" +Subject: [PATCH 0054/1209] BCM270x_DT: Add pwr_led, and the required "input" trigger The "input" trigger makes the associated GPIO an input. This is to support @@ -106186,10 +106186,10 @@ index efb309dba914..f94aa00431fb 100644 2.18.4 -From ccc1fc5493fbbe0a514f1b87a9eb595279b0fe2c Mon Sep 17 00:00:00 2001 +From 659c6f3ca5aaa32762a6e30873992811cb9f2863 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:54:08 +0100 -Subject: [PATCH 0055/1148] Added Device IDs for August DVB-T 205 +Subject: [PATCH 0055/1209] Added Device IDs for August DVB-T 205 --- drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 4 ++++ @@ -106214,10 +106214,10 @@ index 1a36bda28542..9b1cb1908782 100644 2.18.4 -From d5317d91147db99836a7bee103ff1a641c4a06ac Mon Sep 17 00:00:00 2001 +From 45ea17ecf0fce4e69fd903a9da8aa5f2a3a687bf Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 28 Nov 2016 16:50:04 +0000 -Subject: [PATCH 0056/1148] Improve __copy_to_user and __copy_from_user +Subject: [PATCH 0056/1209] Improve __copy_to_user and __copy_from_user performance Provide a __copy_from_user that uses memcpy. On BCM2708, use @@ -107800,10 +107800,10 @@ index 34fb06d1b477..5742092f8c09 100644 2.18.4 -From 553665504343d102af3695dbbc413ff7486414db Mon Sep 17 00:00:00 2001 +From 8704ebbb14d733a071d71849ee6f50f0a6fc0074 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 25 Jun 2015 12:16:11 +0100 -Subject: [PATCH 0057/1148] gpio-poweroff: Allow it to work on Raspberry Pi +Subject: [PATCH 0057/1209] 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 @@ -107841,10 +107841,10 @@ index 6a4bbb506551..beb1df358c8d 100644 2.18.4 -From 79883457735d3f03b6d0336038f8d501e16a73d1 Mon Sep 17 00:00:00 2001 +From 16849f1dd81c169b16ec97fb0f21232265abb4e2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 14:32:47 +0100 -Subject: [PATCH 0058/1148] mfd: Add Raspberry Pi Sense HAT core driver +Subject: [PATCH 0058/1209] mfd: Add Raspberry Pi Sense HAT core driver mfd: Add rpi_sense_core of compatible string --- @@ -108725,10 +108725,10 @@ index 000000000000..56196dc2af10 2.18.4 -From d31805b5a0691ffa75f1407272d0f5ca690dd0c1 Mon Sep 17 00:00:00 2001 +From 87a492d4cdfb561f57733870d66aa4bf30e34b42 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 25 Jan 2016 15:48:59 +0000 -Subject: [PATCH 0059/1148] ASoC: Add support for Rpi-DAC +Subject: [PATCH 0059/1209] ASoC: Add support for Rpi-DAC --- sound/soc/codecs/Kconfig | 5 +++ @@ -108859,10 +108859,10 @@ index 000000000000..36b5b6c26655 2.18.4 -From b97d4e9ad5131994e480b259073317e36030342a Mon Sep 17 00:00:00 2001 +From bce2bc80c23be3bca330474694fe408980cb88db Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 -Subject: [PATCH 0060/1148] Add IQaudIO Sound Card support for Raspberry Pi +Subject: [PATCH 0060/1209] Add IQaudIO Sound Card support for Raspberry Pi Set a limit of 0dB on Digital Volume Control @@ -109164,10 +109164,10 @@ index 000000000000..b98232038616 2.18.4 -From 5601d7e620d20d2dce8916dcd1a62d298e96ff71 Mon Sep 17 00:00:00 2001 +From 29b30e126cda01a42b52cc3a9625d293a1ba1959 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 10:06:56 +0200 -Subject: [PATCH 0061/1148] Added support for HiFiBerry DAC+ +Subject: [PATCH 0061/1209] 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. @@ -109794,10 +109794,10 @@ index 000000000000..fdf6e950abd8 2.18.4 -From 8477ae63ea907f6e3a6d5143e360a822e5983d69 Mon Sep 17 00:00:00 2001 +From 6f92e154cd846c09f8ed8bf6f61a67fdc38e8ef8 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 11:09:58 +0200 -Subject: [PATCH 0062/1148] Added driver for HiFiBerry Amp amplifier add-on +Subject: [PATCH 0062/1209] Added driver for HiFiBerry Amp amplifier add-on board The driver contains a low-level hardware driver for the TAS5713 and the @@ -110456,10 +110456,10 @@ index 000000000000..8f019e048987 2.18.4 -From 3cbe56ca38cbf806051e6d8fc643752475b7a481 Mon Sep 17 00:00:00 2001 +From 65034285f83496e89a388486f4b68627018b5002 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 25 Mar 2015 09:26:17 +0100 -Subject: [PATCH 0063/1148] Add driver for rpi-proto +Subject: [PATCH 0063/1209] 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 @@ -110637,10 +110637,10 @@ index 000000000000..8f3c2ef170ff 2.18.4 -From c324bd901338221a4bfd5e695340aac9a0ca646a Mon Sep 17 00:00:00 2001 +From e9ed05b64f17d13e7cd8c664eef95260909037ac Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Thu, 7 Apr 2016 21:26:21 +0100 -Subject: [PATCH 0064/1148] Add Support for JustBoom Audio boards +Subject: [PATCH 0064/1209] Add Support for JustBoom Audio boards justboom-dac: Adjust for ALSA API change @@ -110823,10 +110823,10 @@ index 000000000000..62bd64cc0928 2.18.4 -From b7a339838fd78f6a3eaa84c3c439a911181b001e Mon Sep 17 00:00:00 2001 +From c75224686457a3af5532a5810c1b20667a1afc5a Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Mon, 16 May 2016 21:36:31 +1000 -Subject: [PATCH 0065/1148] New AudioInjector.net Pi soundcard with low jitter +Subject: [PATCH 0065/1209] 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. @@ -111043,10 +111043,10 @@ index 000000000000..21a46551a1c1 2.18.4 -From bd760520853a9cc91a6242e31544c8ed937b085c Mon Sep 17 00:00:00 2001 +From 6b2410f57261d0ea62a936b63de2db2f860ad7f2 Mon Sep 17 00:00:00 2001 From: escalator2015 Date: Tue, 24 May 2016 16:20:09 +0100 -Subject: [PATCH 0066/1148] New driver for RRA DigiDAC1 soundcard using WM8741 +Subject: [PATCH 0066/1209] New driver for RRA DigiDAC1 soundcard using WM8741 + WM8804 ASoC: digidac1-soundcard: use modern dai_link style @@ -111488,10 +111488,10 @@ index 000000000000..5046f88c496b 2.18.4 -From 433d7d7d89a7957a4f6f634b5cd821d5c9182fc5 Mon Sep 17 00:00:00 2001 +From a137a64fa37bba8740ae19109826ac7392940312 Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Sat, 2 Jul 2016 16:26:19 +0100 -Subject: [PATCH 0067/1148] Add support for Dion Audio LOCO DAC-AMP HAT +Subject: [PATCH 0067/1209] Add support for Dion Audio LOCO DAC-AMP HAT Using dedicated machine driver and pcm5102a codec driver. @@ -111632,10 +111632,10 @@ index 000000000000..06af8363fb0a 2.18.4 -From 574f39911b03afcd13390b9e4afa474dcd12eae3 Mon Sep 17 00:00:00 2001 +From a3c02618671e8bae34109f470684db99903d8c58 Mon Sep 17 00:00:00 2001 From: Clive Messer Date: Mon, 19 Sep 2016 14:01:04 +0100 -Subject: [PATCH 0068/1148] Allo Piano DAC boards: Initial 2 channel (stereo) +Subject: [PATCH 0068/1209] 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, @@ -111802,10 +111802,10 @@ index 000000000000..61640fb95431 2.18.4 -From fb343fc311184d1c576ec8eb1a172054810b2a22 Mon Sep 17 00:00:00 2001 +From 4f7e81ccf6b1d9f0b8d779dbe5a4ff929e50e9a3 Mon Sep 17 00:00:00 2001 From: Raashid Muhammed Date: Mon, 27 Mar 2017 12:35:00 +0530 -Subject: [PATCH 0069/1148] Add support for Allo Piano DAC 2.1 plus add-on +Subject: [PATCH 0069/1209] Add support for Allo Piano DAC 2.1 plus add-on board for Raspberry Pi. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -112887,10 +112887,10 @@ index 000000000000..e910d4a4546d 2.18.4 -From 059555ee985b5d6a036ebcccd02d7a0fbbcdf32d Mon Sep 17 00:00:00 2001 +From d1fba16a5f22125eddb4fa36fd079f7f95fc22b4 Mon Sep 17 00:00:00 2001 From: BabuSubashChandar Date: Tue, 28 Mar 2017 20:04:42 +0530 -Subject: [PATCH 0070/1148] Add support for Allo Boss DAC add-on board for +Subject: [PATCH 0070/1209] Add support for Allo Boss DAC add-on board for Raspberry Pi. (#1924) Signed-off-by: Baswaraj K @@ -113574,10 +113574,10 @@ index 000000000000..cd47413f870c 2.18.4 -From 20e1e4e877d1db6dbb5c7615de6a0d80a26ecb71 Mon Sep 17 00:00:00 2001 +From 324e5275d653db8d86b1eee8eab73aed18b257f5 Mon Sep 17 00:00:00 2001 From: gtrainavicius Date: Sun, 23 Oct 2016 12:06:53 +0300 -Subject: [PATCH 0071/1148] Support for Blokas Labs pisound board +Subject: [PATCH 0071/1209] Support for Blokas Labs pisound board Pisound dynamic overlay (#1760) @@ -115338,10 +115338,10 @@ index 000000000000..6af9921b55c7 2.18.4 -From 1de274df5829dd8d278a4a6daea07b3d5b5254d6 Mon Sep 17 00:00:00 2001 +From 994a5c67fa5cb2d767717323154c1ebc19da5501 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 22 Jan 2017 12:49:37 +0100 -Subject: [PATCH 0072/1148] ASoC: Add driver for Cirrus Logic Audio Card +Subject: [PATCH 0072/1209] 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 @@ -116403,10 +116403,10 @@ index 000000000000..a0a460f787d1 2.18.4 -From 0d08aa2847e7f0db46c2bcb080f94561f345c2e4 Mon Sep 17 00:00:00 2001 +From 73d08d30ed5b68d3486a36a619ec819838db15d0 Mon Sep 17 00:00:00 2001 From: Miquel Date: Fri, 24 Feb 2017 20:51:06 +0100 -Subject: [PATCH 0073/1148] sound: Support for Dion Audio LOCO-V2 DAC-AMP HAT +Subject: [PATCH 0073/1209] sound: Support for Dion Audio LOCO-V2 DAC-AMP HAT Signed-off-by: Miquel Blauw @@ -116554,10 +116554,10 @@ index 000000000000..ca48aef621b6 2.18.4 -From 7613cc0c7b9f95136af616ac7efba7566f07d4ce Mon Sep 17 00:00:00 2001 +From 22580881300f02f7cacd62ff3d4e211aa3f22f4f Mon Sep 17 00:00:00 2001 From: Fe-Pi Date: Wed, 1 Mar 2017 04:42:43 -0700 -Subject: [PATCH 0074/1148] Add support for Fe-Pi audio sound card. (#1867) +Subject: [PATCH 0074/1209] 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. @@ -116737,10 +116737,10 @@ index 000000000000..a58a215820b7 2.18.4 -From 38a7d88bf3108218d07a581695fc550eca87c9e8 Mon Sep 17 00:00:00 2001 +From 80d152429016f0aff45063aeeff7c394dc791d5e Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Mar 2017 20:04:13 +1100 -Subject: [PATCH 0075/1148] Add support for the AudioInjector.net Octo sound +Subject: [PATCH 0075/1209] Add support for the AudioInjector.net Octo sound card AudioInjector Octo: sample rates, regulators, reset @@ -117184,10 +117184,10 @@ index 94b1adb088fd..203e3f368bd5 100644 2.18.4 -From 29f6a4c45ba18e9835e074f62b0fddcae4256222 Mon Sep 17 00:00:00 2001 +From f720996bc22825e03c9b58e8be57316a534dbbb7 Mon Sep 17 00:00:00 2001 From: Peter Malkin Date: Mon, 27 Mar 2017 16:38:21 -0700 -Subject: [PATCH 0076/1148] Driver support for Google voiceHAT soundcard. +Subject: [PATCH 0076/1209] Driver support for Google voiceHAT soundcard. ASoC: googlevoicehat-codec: Use correct device when grabbing GPIO @@ -117445,10 +117445,10 @@ index 000000000000..871a25aa498e 2.18.4 -From a14057fb0101f879cd78c0a5cc75e21bfc2ab675 Mon Sep 17 00:00:00 2001 +From 7e1fab7e5e667c2e89944f6048620f8f167190ae Mon Sep 17 00:00:00 2001 From: allocom Date: Thu, 19 Apr 2018 12:12:26 +0530 -Subject: [PATCH 0077/1148] Driver and overlay for Allo Katana DAC +Subject: [PATCH 0077/1209] Driver and overlay for Allo Katana DAC Allo Katana DAC: Updated default values @@ -117866,10 +117866,10 @@ index 000000000000..b0aebd40fe5e 2.18.4 -From 148f4e04f0289ff4076671e3d946ccde9b674c6c Mon Sep 17 00:00:00 2001 +From 4582f68dc9244383083971bc931fbcc57529121f Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Wed, 27 Jun 2018 15:59:12 +0100 -Subject: [PATCH 0078/1148] ASoC: Add generic RPI driver for simple soundcards. +Subject: [PATCH 0078/1209] ASoC: Add generic RPI driver for simple soundcards. The RPI simple sound card driver provides a generic ALSA SOC card driver supporting a variety of Pi HAT soundcards. The intention is to avoid @@ -118197,10 +118197,10 @@ index 000000000000..2023b0a18a2c 2.18.4 -From 0e442e0392adc858bd7d18cf4b4fd982f82eb73d Mon Sep 17 00:00:00 2001 +From dc4b5c5c8c80c98ff8284109cca13f25599311d6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 3 Sep 2018 17:00:36 +0100 -Subject: [PATCH 0079/1148] ASoC: Add Kconfig and Makefile for sound/soc/bcm +Subject: [PATCH 0079/1209] ASoC: Add Kconfig and Makefile for sound/soc/bcm Signed-off-by: popcornmix --- @@ -118469,10 +118469,10 @@ index b81fa421ec27..522fc73571e4 100644 2.18.4 -From a230c8a099de12031533ef230534511f4dfb2a53 Mon Sep 17 00:00:00 2001 +From d2cab7e0f276c235ad00cf0b4c382c4c18fbf0da Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Sat, 21 Jul 2018 20:07:46 +0100 -Subject: [PATCH 0080/1148] ASoC: Create a generic Pi Hat WM8804 driver +Subject: [PATCH 0080/1209] ASoC: Create a generic Pi Hat WM8804 driver Reduce the amount of duplicated code by creating a generic driver for Pi Hat digi cards using the WM8804 codec. @@ -118946,10 +118946,10 @@ index 000000000000..b3c3c4ea1e75 2.18.4 -From 0501548ed7eedad9f64145ceeca408e526644d2f Mon Sep 17 00:00:00 2001 +From 6161dc97950d04223c478d1c84d26c1dc7d7e8d3 Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 21 Oct 2015 14:55:21 +0100 -Subject: [PATCH 0081/1148] rpi_display: add backlight driver and overlay +Subject: [PATCH 0081/1209] 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 @@ -119129,10 +119129,10 @@ index 000000000000..14a0d9b03739 2.18.4 -From 78dc975d00ae1f6dadc79870c7482e1a2c55d5f2 Mon Sep 17 00:00:00 2001 +From 2bd79a477ca89d240b490da55575a8ed54718884 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 23 Feb 2016 19:56:04 +0000 -Subject: [PATCH 0082/1148] bcm2835-virtgpio: Virtual GPIO driver +Subject: [PATCH 0082/1209] bcm2835-virtgpio: Virtual GPIO driver Add a virtual GPIO driver that uses the firmware mailbox interface to request that the VPU toggles LEDs. @@ -119396,10 +119396,10 @@ index 000000000000..49e28ad9760e 2.18.4 -From 6c913ec9c6c55fa10a13241748676b92f4c77dfe Mon Sep 17 00:00:00 2001 +From eed54563d35c98a68ca3aa042bc300d25422dc7a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 3 Sep 2012 17:10:23 +0100 -Subject: [PATCH 0083/1148] net: Add non-mainline source for rtl8192cu wlan +Subject: [PATCH 0083/1209] net: Add non-mainline source for rtl8192cu wlan We are now syncing with version from: https://github.com/pvaret/rtl8192cu-fixes @@ -292561,10 +292561,10 @@ index 000000000000..24ab3720bef6 2.18.4 -From 850f9c5e82f1a336cbec2207821041e3baddeca6 Mon Sep 17 00:00:00 2001 +From 7e283fed94347580187b70f9f394198b75fbbb9b Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 3 Dec 2014 13:23:28 +0200 -Subject: [PATCH 0084/1148] OF: DT-Overlay configfs interface +Subject: [PATCH 0084/1209] 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. @@ -293002,10 +293002,10 @@ index 000000000000..178f0629b0f0 2.18.4 -From a9bee847e336a5fb053508bfc76629164109113f Mon Sep 17 00:00:00 2001 +From e0bf8fe81bf234398c09e5d3a2bab7e906c14a2a Mon Sep 17 00:00:00 2001 From: Cheong2K Date: Fri, 26 Feb 2016 18:20:10 +0800 -Subject: [PATCH 0085/1148] brcm: adds support for BCM43341 wifi +Subject: [PATCH 0085/1209] brcm: adds support for BCM43341 wifi brcmfmac: Disable power management @@ -293140,10 +293140,10 @@ index 38e6809f16c7..370301ac248b 100644 2.18.4 -From 6685539db878cf675ae02ce4d2202049f1f21ed9 Mon Sep 17 00:00:00 2001 +From f4fbeb6e15c75c876a29e5b82c8eebeaa77ef7e1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Dec 2015 13:37:07 +0000 -Subject: [PATCH 0086/1148] hci_h5: Don't send conf_req when ACTIVE +Subject: [PATCH 0086/1209] 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. @@ -293169,10 +293169,10 @@ index 5df0651b6cd5..06938e0ce8d3 100644 2.18.4 -From 09c869a6580414609b21178034a3bf562ad5ba3d Mon Sep 17 00:00:00 2001 +From d549b4586da8bd71a3aa804173bb656709fab4a0 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 13 Apr 2015 17:16:29 +0100 -Subject: [PATCH 0087/1148] config: Add default configs +Subject: [PATCH 0087/1209] config: Add default configs --- arch/arm/configs/bcm2709_defconfig | 1444 +++++++++++++++++++++++++ @@ -300266,10 +300266,10 @@ index 000000000000..ca7668f549bc 2.18.4 -From 0854150f5881cf731c051dc15999603bf6b6f960 Mon Sep 17 00:00:00 2001 +From 42ea7f5e1e3a8df54342070def2e2fd1225ac008 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:43:57 -0800 -Subject: [PATCH 0088/1148] ARM64: Round-Robin dispatch IRQs between CPUs. +Subject: [PATCH 0088/1209] 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 @@ -300346,10 +300346,10 @@ index 49642bcd0b75..d8ef8f7fee5b 100644 2.18.4 -From 8ad9c5a8979adc91fa8eb0256597a2f61006a601 Mon Sep 17 00:00:00 2001 +From 725a39f742039d58da20aca87646200515a649a7 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 11 Feb 2017 01:18:31 -0800 -Subject: [PATCH 0089/1148] ARM64: Force hardware emulation of deprecated +Subject: [PATCH 0089/1209] ARM64: Force hardware emulation of deprecated instructions. --- @@ -300380,10 +300380,10 @@ index bcb14d11232f..bfa3a069cbf1 100644 2.18.4 -From 286ac025037c2943e4d96f0b5640221888fcdf2c Mon Sep 17 00:00:00 2001 +From 1b878a5990bcd39866a64d705c86cd08ed02a3be Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 10 Feb 2017 17:57:08 -0800 -Subject: [PATCH 0090/1148] build/arm64: Add rules for .dtbo files for dts +Subject: [PATCH 0090/1209] build/arm64: Add rules for .dtbo files for dts overlays We now create overlays as .dtbo files. @@ -300394,7 +300394,7 @@ Signed-off-by: Khem Raj 1 file changed, 14 insertions(+) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile -index 96abe558aea8..05091ca6708b 100644 +index cd8f3cdabfd0..8e9bc1497a59 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -143,6 +143,20 @@ Image.%: Image @@ -300422,10 +300422,10 @@ index 96abe558aea8..05091ca6708b 100644 2.18.4 -From 90b54141f44f206171d75f9af580bb2ec6c32fc0 Mon Sep 17 00:00:00 2001 +From a09d4b600c0fb72021383d3931811fc126dbf3bd Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 26 Nov 2018 21:01:18 +0000 -Subject: [PATCH 0091/1148] Revert "build/arm64: Add rules for .dtbo files for +Subject: [PATCH 0091/1209] Revert "build/arm64: Add rules for .dtbo files for dts overlays" DT build rules are now in the common top-level Makefile. @@ -300436,7 +300436,7 @@ This reverts commit dce5b0fbdd2174f7fc9b27f4e89877a33169239a. 1 file changed, 14 deletions(-) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile -index 05091ca6708b..96abe558aea8 100644 +index 8e9bc1497a59..cd8f3cdabfd0 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -143,20 +143,6 @@ Image.%: Image @@ -300464,10 +300464,10 @@ index 05091ca6708b..96abe558aea8 100644 2.18.4 -From 563a482b13d2cc85500985bcaaa7e29291bccaa1 Mon Sep 17 00:00:00 2001 +From aa514c4d868ac7b7a5d048810e0ae43e4a1626ef Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 25 Aug 2017 19:18:13 +0100 -Subject: [PATCH 0092/1148] cache: export clean and invalidate +Subject: [PATCH 0092/1209] cache: export clean and invalidate hack: cache: Fix linker error --- @@ -300525,10 +300525,10 @@ index 0ee8fc4b4672..8acb1857ff67 100644 2.18.4 -From edda25ff8744174d15fb63708922a58d5f3ea9a3 Mon Sep 17 00:00:00 2001 +From 1677ef1b7ea7fbff1a5df5e85c3df7ce7645c078 Mon Sep 17 00:00:00 2001 From: James Hughes Date: Tue, 14 Nov 2017 15:13:15 +0000 -Subject: [PATCH 0093/1148] AXI performance monitor driver (#2222) +Subject: [PATCH 0093/1209] AXI performance monitor driver (#2222) Uses the debugfs I/F to provide access to the AXI bus performance monitors. @@ -301224,10 +301224,10 @@ index 000000000000..5ae2bdaa88b4 2.18.4 -From 68d00064b05e36480f3225130a18507fea4e9aee Mon Sep 17 00:00:00 2001 +From 02e5fb31d80c51da2f6b024714a938ae859d4c3c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 27 Nov 2017 17:14:54 +0000 -Subject: [PATCH 0094/1148] cgroup: Disable cgroup "memory" by default +Subject: [PATCH 0094/1209] cgroup: Disable cgroup "memory" by default Some Raspberry Pis have limited RAM and most users won't use the cgroup memory support so it is disabled by default. Enable with: @@ -301300,10 +301300,10 @@ index 35faf082a709..9f97b287891b 100644 2.18.4 -From 04cc2b6a3e41c55837ab35112f7d7d3f6716c6d3 Mon Sep 17 00:00:00 2001 +From 0167bc131afb18882d8fd323291ceb07b2bbda13 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 0095/1148] ARM: bcm2835: Set Serial number and Revision +Subject: [PATCH 0095/1209] ARM: bcm2835: Set Serial number and Revision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -301369,10 +301369,10 @@ index bfc556f76720..73ec2427fbcf 100644 2.18.4 -From 2244492f3cdda5031fd6af9532020a0b47d29450 Mon Sep 17 00:00:00 2001 +From 21871d5ff08fe0d334592a87ce548c0359dd6f55 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 16 Jul 2018 14:40:13 +0100 -Subject: [PATCH 0096/1148] dwc-otg: FIQ: Fix "bad mode in data abort handler" +Subject: [PATCH 0096/1209] dwc-otg: FIQ: Fix "bad mode in data abort handler" Create a semi-static mapping for the USB registers early in the boot process, before additional kernel threads are started, so all threads @@ -301491,10 +301491,10 @@ index 73ec2427fbcf..9b6c921106b5 100644 2.18.4 -From 54936f1f1ffdb62c7c091a52ce447f2244451ecb Mon Sep 17 00:00:00 2001 +From 801fc42a2d76a02861b00af30ea7ca41d23f61c4 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 Dec 2017 09:18:32 +0000 -Subject: [PATCH 0097/1148] ARM: Activate FIQs to avoid __irq_startup warnings +Subject: [PATCH 0097/1209] ARM: Activate FIQs to avoid __irq_startup warnings There is a new test in __irq_startup that the IRQ is activated, which hasn't been the case for FIQs since they bypass some of the usual setup. @@ -301533,10 +301533,10 @@ index cd1234c103fc..a0f96e3b8898 100644 2.18.4 -From 0cceb3680a8858b99d0d274f7f3c144822a0fc75 Mon Sep 17 00:00:00 2001 +From 394a9be1fea6a35970cd5b13f6ae4ade3bc137b5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 22 Jan 2018 17:26:38 +0000 -Subject: [PATCH 0098/1148] serial: 8250: bcm2835aux - suppress EPROBE_DEFER +Subject: [PATCH 0098/1209] serial: 8250: bcm2835aux - suppress EPROBE_DEFER Signed-off-by: Phil Elwell --- @@ -301561,10 +301561,10 @@ index 4997c519ebb3..33da68341c3a 100644 2.18.4 -From f0d5cd5072f80b3b63403b4a93c3424acda5c9b8 Mon Sep 17 00:00:00 2001 +From c193e40ee5a9f1f09fa5b0727751fca62851d585 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:16:19 +0100 -Subject: [PATCH 0099/1148] raspberrypi-firmware: Export the general +Subject: [PATCH 0099/1209] raspberrypi-firmware: Export the general transaction function. The vc4-firmware-kms module is going to be doing the MBOX FB call. @@ -301599,10 +301599,10 @@ index 7162f6d6649c..7947e65a22da 100644 2.18.4 -From c4ca551a6be77b98fbf42b2b5fa53c6c3f627f52 Mon Sep 17 00:00:00 2001 +From 9c1dbfb660b67a4a815f57c4ec7c8bc019fd293d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 08:39:33 +0100 -Subject: [PATCH 0100/1148] drm/vc4: Add a mode for using the closed firmware +Subject: [PATCH 0100/1209] drm/vc4: Add a mode for using the closed firmware for display. Signed-off-by: Eric Anholt @@ -301674,10 +301674,10 @@ index f1f0a7c87771..9e51a4e937df 100644 } diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c -index 5e6fb6c2307f..6c6701acfd85 100644 +index 0d78ba017a29..af8df6d328b9 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c -@@ -345,6 +345,7 @@ static struct platform_driver *const component_drivers[] = { +@@ -346,6 +346,7 @@ static struct platform_driver *const component_drivers[] = { &vc4_txp_driver, &vc4_hvs_driver, &vc4_crtc_driver, @@ -302376,10 +302376,10 @@ index 000000000000..78c343059355 2.18.4 -From 57b392cc56f69a45609d4b1ac47cfaff2289474a Mon Sep 17 00:00:00 2001 +From 15afc0b5411095a55b320ca900b0d1c3b2d5f287 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Feb 2017 17:09:18 -0800 -Subject: [PATCH 0101/1148] drm/vc4: Name the primary and cursor planes in +Subject: [PATCH 0101/1209] drm/vc4: Name the primary and cursor planes in fkms. This makes debugging nicer, compared to trying to remember what the @@ -302407,10 +302407,10 @@ index 78c343059355..d9a5551d01a2 100644 2.18.4 -From dfefc802937a3babfb7696dd69f99be558d1b86a Mon Sep 17 00:00:00 2001 +From 9ac8badeed30332322f1b297c4b645b795cc313b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Feb 2017 17:10:09 -0800 -Subject: [PATCH 0102/1148] drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of +Subject: [PATCH 0102/1209] drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of fkms. Trying to debug weston on fkms involved figuring out what calls I was @@ -302483,10 +302483,10 @@ index d9a5551d01a2..e372666af011 100644 2.18.4 -From f8a0f9d65f1399067c4a1419588e0db381384e27 Mon Sep 17 00:00:00 2001 +From c3322dead1f4d396dd87aa427ccf1c942f2f0ab0 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 2 Feb 2017 09:42:18 -0800 -Subject: [PATCH 0103/1148] drm/vc4: Fix sending of page flip completion events +Subject: [PATCH 0103/1209] 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 @@ -302531,10 +302531,10 @@ index e372666af011..4d7b7f218cbb 100644 2.18.4 -From cfbe406a9ea0f63616420ac07f3c23779c79b053 Mon Sep 17 00:00:00 2001 +From 4c92bfa6ee068fb9e14ca0052acc2861c54b673b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 6 Jul 2017 11:45:48 -0700 -Subject: [PATCH 0104/1148] drm/vc4: Add support for setting DPMS in +Subject: [PATCH 0104/1209] drm/vc4: Add support for setting DPMS in firmwarekms. This ensures that the screen goes blank during DPMS (screensaver), @@ -302641,10 +302641,10 @@ index 4d7b7f218cbb..809437cf3215 100644 2.18.4 -From 13f6d53fd011c7abac70113dab9b2b11cbb85a4d Mon Sep 17 00:00:00 2001 +From af44a65a5312c7dbe938e425dc48baccaa06bce0 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 7 Jun 2017 14:39:49 -0700 -Subject: [PATCH 0105/1148] drm/vc4: Add FB modifier support to firmwarekms. +Subject: [PATCH 0105/1209] drm/vc4: Add FB modifier support to firmwarekms. Signed-off-by: Eric Anholt (cherry picked from commit 11752d73488e08aaeb65fe8289a9c016acde26c2) @@ -302679,10 +302679,10 @@ index 809437cf3215..d5066f395b62 100644 2.18.4 -From 844b4c94a3987a77f0715e2422ecc91dd05dcbba Mon Sep 17 00:00:00 2001 +From 27a6a4cbb721d002377f8003fc4afb77704c5be1 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 30 Jan 2018 14:21:02 -0800 -Subject: [PATCH 0106/1148] drm/vc4: Add missing enable/disable vblank handlers +Subject: [PATCH 0106/1209] drm/vc4: Add missing enable/disable vblank handlers in fkms. Fixes hang at boot in 4.14. @@ -302766,10 +302766,10 @@ index d5066f395b62..e3dfc20c404c 100644 2.18.4 -From d53b7cf891ecdfaffe0dead00da008f1d4605dc0 Mon Sep 17 00:00:00 2001 +From 18dc9bf48c8467277722ba95aea3ed8795ad6235 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 18 Apr 2017 21:43:46 +0100 -Subject: [PATCH 0107/1148] vc4_fkms: Apply firmware overscan offset to +Subject: [PATCH 0107/1209] vc4_fkms: Apply firmware overscan offset to hardware cursor --- @@ -302829,10 +302829,10 @@ index e3dfc20c404c..7edb38953a6a 100644 2.18.4 -From 71f206d2a5e24f636e8bd605bfc4a5e22b38f82a Mon Sep 17 00:00:00 2001 +From f2dc43d4f014be9e4769125cd79484f0ba7d5469 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 5 Feb 2018 18:01:02 +0000 -Subject: [PATCH 0108/1148] drm/vc4: Fix warning about vblank interrupts before +Subject: [PATCH 0108/1209] drm/vc4: Fix warning about vblank interrupts before DRM core is ready. The SMICS interrupt fires continuously, but since it's 1/100 the rate @@ -302885,10 +302885,10 @@ index 7edb38953a6a..967a0bf5886b 100644 2.18.4 -From 51fceaa5f77108d7fa07b9c91ff006f03d9eca1e Mon Sep 17 00:00:00 2001 +From 1dcf41fd4141af9972a2721182fd9f1744ea9daa Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 5 Feb 2018 18:02:30 +0000 -Subject: [PATCH 0109/1148] drm/vc4: Skip SET_CURSOR_INFO when the cursor +Subject: [PATCH 0109/1209] drm/vc4: Skip SET_CURSOR_INFO when the cursor contents didn't change. Signed-off-by: Eric Anholt @@ -302948,10 +302948,10 @@ index 967a0bf5886b..462d9084ce53 100644 2.18.4 -From 3c65d7dd0a6cbf0183831708d614acdd523b57f7 Mon Sep 17 00:00:00 2001 +From 4f9247ee436172a5c9117ebdb01111446da2f3b5 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 5 Feb 2018 18:22:03 +0000 -Subject: [PATCH 0110/1148] drm/vc4: Remove duplicate primary/cursor fields +Subject: [PATCH 0110/1209] drm/vc4: Remove duplicate primary/cursor fields from FKMS driver. The CRTC has those fields and we can just use them. @@ -303025,10 +303025,10 @@ index 462d9084ce53..60e9d8fa5511 100644 2.18.4 -From 36c552fdc280d2d25d8b7354eb256b1a6538e803 Mon Sep 17 00:00:00 2001 +From efe7ec1bbe3182cfb3af960d52bd10bd535153a6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 17 Jun 2018 13:22:07 +0100 -Subject: [PATCH 0111/1148] vc4_firmware_kms: fix build +Subject: [PATCH 0111/1209] vc4_firmware_kms: fix build --- drivers/gpu/drm/vc4/vc4_firmware_kms.c | 8 ++++++-- @@ -303090,10 +303090,10 @@ index 60e9d8fa5511..1584f90face0 100644 2.18.4 -From d5202382795bbe27e796c439284e47e12a00ceb5 Mon Sep 17 00:00:00 2001 +From c7f9f52a95597330ff9935d1dce5928863159778 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 19 Feb 2019 15:06:31 +0000 -Subject: [PATCH 0112/1148] gpu:vc4-fkms: Update driver to not use plane->crtc. +Subject: [PATCH 0112/1209] gpu:vc4-fkms: Update driver to not use plane->crtc. Following on from commit 2f958af7fc248 ("drm/vc4: Stop updating plane->fb/crtc") @@ -303132,10 +303132,10 @@ index 1584f90face0..347ad72682dc 100644 2.18.4 -From 662259de84734fc96bd093b1ebdf4f21138085e0 Mon Sep 17 00:00:00 2001 +From b03ccddfbd58cf8f210474ad1c4265381dd8081a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 5 Feb 2018 18:53:18 +0000 -Subject: [PATCH 0113/1148] drm/vc4: Don't wait for vblank on fkms cursor +Subject: [PATCH 0113/1209] drm/vc4: Don't wait for vblank on fkms cursor updates. We don't use the same async update path between fkms and normal kms, @@ -303166,10 +303166,10 @@ index 78d4fb0499e3..75d3e8c6b650 100644 2.18.4 -From 1eb7526cf18eb4b3ed4a2c5336d43289467ab4b0 Mon Sep 17 00:00:00 2001 +From 1fc2f2ac9bc42584c72a4b88eaaf756b5d65cf2e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 20 Feb 2018 10:07:27 +0000 -Subject: [PATCH 0114/1148] i2c-gpio: Also set bus numbers from reg property +Subject: [PATCH 0114/1209] i2c-gpio: Also set bus numbers from reg property I2C busses can be assigned specific bus numbers using aliases in Device Tree - string properties where the name is the alias and the @@ -303207,10 +303207,10 @@ index a4a6825c8758..cfbcf3952ddc 100644 2.18.4 -From 9e5a162734f9e17ddcfe27b8e14dc094271e450b Mon Sep 17 00:00:00 2001 +From eee5c0bc475699b417f89c2ce12270f4f8962f73 Mon Sep 17 00:00:00 2001 From: hdoverobinson Date: Tue, 13 Mar 2018 06:58:39 -0400 -Subject: [PATCH 0115/1148] added capture_clear option to pps-gpio via +Subject: [PATCH 0115/1209] added capture_clear option to pps-gpio via dtoverlay (#2433) --- @@ -303234,10 +303234,10 @@ index e0de1df2ede0..ee7d8f4e7f2e 100644 2.18.4 -From da9b9692aec894aab915cc133755dc5606d4549e Mon Sep 17 00:00:00 2001 +From 7df743da8be62411b1d2d1b577cea975c6a5a294 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 9 Mar 2018 12:01:00 +0000 -Subject: [PATCH 0116/1148] lan78xx: Read initial EEE status from DT +Subject: [PATCH 0116/1209] lan78xx: Read initial EEE status from DT Add two new DT properties: * microchip,eee-enabled - a boolean to enable EEE @@ -303280,10 +303280,10 @@ index ba42568316f1..e266ca2191ed 100644 2.18.4 -From 1e98c73e6b55b97b690f35658137cc36f6e70c05 Mon Sep 17 00:00:00 2001 +From b31ae09b3f2bf609788b022c63d7e4b7198dc447 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 14 Jul 2014 22:02:09 +0100 -Subject: [PATCH 0117/1148] hid: Reduce default mouse polling interval to 60Hz +Subject: [PATCH 0117/1209] hid: Reduce default mouse polling interval to 60Hz Reduces overhead when using X --- @@ -303318,10 +303318,10 @@ index 17a638f15082..ce8ef6930795 100644 2.18.4 -From 2d90ba79d547b4c5d6424b16218a771aaa6f984d Mon Sep 17 00:00:00 2001 +From 75b0cf68f8e607b1f9c901eaf33c84d511c3306b Mon Sep 17 00:00:00 2001 From: Nick Bulleid Date: Thu, 10 May 2018 21:57:02 +0100 -Subject: [PATCH 0118/1148] Add ability to export gpio used by gpio-poweroff +Subject: [PATCH 0118/1209] Add ability to export gpio used by gpio-poweroff Signed-off-by: Nick Bulleid @@ -303383,10 +303383,10 @@ index beb1df358c8d..608d78f0514a 100644 2.18.4 -From a325ffd5f107174c2309c51e598004409e4118ed Mon Sep 17 00:00:00 2001 +From 7fbce80b08677066a3d1e70da63309bc40f1771d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Sat, 12 May 2018 21:35:43 +0100 -Subject: [PATCH 0119/1148] firmware/raspberrypi: Notify firmware of a reboot +Subject: [PATCH 0119/1209] firmware/raspberrypi: Notify firmware of a reboot Register for reboot notifications, sending RPI_FIRMWARE_NOTIFY_REBOOT over the mailbox interface on reception. @@ -303473,10 +303473,10 @@ index 7947e65a22da..9ad10f7e019b 100644 2.18.4 -From ba0f7e25bf85d0090583ff9b74b73ab876f22ad3 Mon Sep 17 00:00:00 2001 +From ff1571d287812f2d655490c67de721c4990bb0a7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 14 Jun 2018 11:21:04 +0100 -Subject: [PATCH 0120/1148] irqchip: irq-bcm2835: Calc. FIQ_START at boot-time +Subject: [PATCH 0120/1209] irqchip: irq-bcm2835: Calc. FIQ_START at boot-time ad83c7cb2f37 ("irqchip/irq-bcm2836: Add support for DT interrupt polarity") changed the way that the BCM2836/7 local interrupts are mapped; instead @@ -303545,10 +303545,10 @@ index 93878d725f26..40c1b38d5db5 100644 2.18.4 -From 402988ad3b82ebfc1fcc6e913964bc3392900163 Mon Sep 17 00:00:00 2001 +From 99af8285974e606d535853ebbe9e5bfb439f8284 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 14 Jun 2018 15:07:26 +0100 -Subject: [PATCH 0121/1148] of: configfs: Use of_overlay_fdt_apply API call +Subject: [PATCH 0121/1209] of: configfs: Use of_overlay_fdt_apply API call The published API to the dynamic overlay application mechanism now takes a Flattened Device Tree blob as input so that it can manage the @@ -303665,10 +303665,10 @@ index 178f0629b0f0..ac04301dabe1 100644 2.18.4 -From 687ab9a43af18dc2d6ec349837a02001626f4b42 Mon Sep 17 00:00:00 2001 +From 90ae6390cbd5a767e50c14a91f3c3804ba587772 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 13 Jun 2018 15:21:10 +0100 -Subject: [PATCH 0122/1148] net: lan78xx: Disable TCP Segmentation Offload +Subject: [PATCH 0122/1209] net: lan78xx: Disable TCP Segmentation Offload (TSO) TSO seems to be having issues when packets are dropped and the @@ -303728,10 +303728,10 @@ index e266ca2191ed..3b904c55a21a 100644 2.18.4 -From 9929ec6cb514f4504c875c315a01f801d8b9ee2f Mon Sep 17 00:00:00 2001 +From 3832adbbdfc30f0922438807414ab54e8f2d7e3c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 20 Jun 2018 12:20:01 +0100 -Subject: [PATCH 0123/1148] brcmfmac: Re-enable firmware roaming support +Subject: [PATCH 0123/1209] brcmfmac: Re-enable firmware roaming support As of 4.18, a firmware that implements the update_connect_params method but doesn't claim to support roaming causes an error. We @@ -303763,10 +303763,10 @@ index 5c2a03d629e4..dec25e415619 100644 2.18.4 -From fdf448d58ae4dc0d6bd12e09f9c3970633cdbe65 Mon Sep 17 00:00:00 2001 +From cf9451b1c309fc2c3b85283feb926a497eca257c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 5 Apr 2018 14:46:11 +0100 -Subject: [PATCH 0124/1148] lan78xx: Move enabling of EEE into PHY init code +Subject: [PATCH 0124/1209] lan78xx: Move enabling of EEE into PHY init code Enable EEE mode as soon as possible after connecting to the PHY, and before phy_start. This avoids a second link negotiation, which speeds @@ -303833,10 +303833,10 @@ index 3b904c55a21a..3bf87542c2ec 100644 2.18.4 -From a00743cd1bd35d58a9e289df2f18ceea0a62ca46 Mon Sep 17 00:00:00 2001 +From 2c890d8daf0405afb3bdca1ca0431fc145a29a1e Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Mon, 9 Jul 2018 12:54:25 +0100 -Subject: [PATCH 0125/1148] Add rpi-poe-fan driver +Subject: [PATCH 0125/1209] Add rpi-poe-fan driver Signed-off-by: Serge Schneider @@ -304427,10 +304427,10 @@ index 000000000000..3effaf2eb86d 2.18.4 -From 8a5050c1607c660f0acdbc9767d504c102b11f5d Mon Sep 17 00:00:00 2001 +From deeba505ae4b76ee679c51542ee0f186a798ee56 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 17 Sep 2018 17:31:18 +0100 -Subject: [PATCH 0126/1148] cxd2880: CXD2880_SPI_DRV should select DVB_CXD2880 +Subject: [PATCH 0126/1209] cxd2880: CXD2880_SPI_DRV should select DVB_CXD2880 with MEDIA_SUBDRV_AUTOSELECT --- @@ -304453,10 +304453,10 @@ index bcc49cb47de6..2068f4b9fc37 100644 2.18.4 -From a8c865d36364f78dac9b128c3679259c97c0bfd7 Mon Sep 17 00:00:00 2001 +From cb3f9af2e4ccd0cdb8c4bf127101a6c5ca230fc6 Mon Sep 17 00:00:00 2001 From: detule Date: Tue, 2 Oct 2018 04:10:08 -0400 -Subject: [PATCH 0127/1148] vchiq_2835_arm: Implement a DMA pool for small bulk +Subject: [PATCH 0127/1209] vchiq_2835_arm: Implement a DMA pool for small bulk transfers (#2699) During a bulk transfer we request a DMA allocation to hold the @@ -304583,10 +304583,10 @@ index 8dc730cfe7a6..dc13c7df8c1c 100644 2.18.4 -From c2f61a2ad2c466b06775b4b8785e6b222292daca Mon Sep 17 00:00:00 2001 +From d8a5ac740aae80afd034e056f5c1671632519401 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sat, 6 Oct 2018 16:46:18 +0200 -Subject: [PATCH 0128/1148] hwmon: raspberrypi: Prevent voltage low warnings +Subject: [PATCH 0128/1209] hwmon: raspberrypi: Prevent voltage low warnings from filling log Although the correct fix for low voltage warnings is to @@ -304664,10 +304664,10 @@ index d3a64a35f7a9..db3b03438dd0 100644 2.18.4 -From e427d0e998812df53d60e7f8ddeab0ee0903d143 Mon Sep 17 00:00:00 2001 +From 7fb0850a32a3d4a09184ff1380a6c5fec44a0bfd Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sat, 13 Oct 2018 13:31:21 +0200 -Subject: [PATCH 0129/1148] firmware: raspberrypi: Add backward compatible +Subject: [PATCH 0129/1209] firmware: raspberrypi: Add backward compatible get_throttled Avoid a hard userspace ABI change by adding a compatible get_throttled @@ -304749,10 +304749,10 @@ index 9ad10f7e019b..e834e300bb6f 100644 2.18.4 -From 375177048cd93c80e9fdd194c4294517cbea0c33 Mon Sep 17 00:00:00 2001 +From d20db60b82ce0eba954762ac3f5b370bc1d79e47 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 6 Nov 2018 12:57:48 +0000 -Subject: [PATCH 0130/1148] sc16is7xx: Don't spin if no data received +Subject: [PATCH 0130/1209] sc16is7xx: Don't spin if no data received See: https://github.com/raspberrypi/linux/issues/2676 @@ -304778,10 +304778,10 @@ index 7d3ae31cc720..fe486498530d 100644 2.18.4 -From cb093d595de33beda967fe4ca7b2cab73f3d8040 Mon Sep 17 00:00:00 2001 +From 42eccafca93b9efecd7948a33069889ca24ffb91 Mon Sep 17 00:00:00 2001 From: Ram Chandrasekar Date: Mon, 7 May 2018 11:54:08 -0600 -Subject: [PATCH 0131/1148] drivers: thermal: step_wise: add support for +Subject: [PATCH 0131/1209] drivers: thermal: step_wise: add support for hysteresis Step wise governor increases the mitigation level when the temperature @@ -304878,10 +304878,10 @@ index 6e051cbd824f..7d30b8d928ab 100644 2.18.4 -From 7500a403192635039aed7413f090bc88245902fb Mon Sep 17 00:00:00 2001 +From 5bb7523c269ecbe9dcc64d461ce4f26a3a395614 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 2 Oct 2018 11:14:15 +0100 -Subject: [PATCH 0132/1148] drivers: thermal: step_wise: avoid throttling at +Subject: [PATCH 0132/1209] drivers: thermal: step_wise: avoid throttling at hysteresis temperature after dropping below it Signed-off-by: Serge Schneider @@ -304906,10 +304906,10 @@ index 7d30b8d928ab..c481ed33810c 100644 2.18.4 -From 24b838439656812faf61671f5132542743bc3063 Mon Sep 17 00:00:00 2001 +From 7f0626d81a3d5741062066f04a953a60469afe9b Mon Sep 17 00:00:00 2001 From: James Hughes Date: Fri, 2 Nov 2018 11:55:49 +0000 -Subject: [PATCH 0133/1148] Update issue templates (#2736) +Subject: [PATCH 0133/1209] Update issue templates (#2736) --- .github/ISSUE_TEMPLATE/bug_report.md | 34 ++++++++++++++++++++++++++++ @@ -304960,10 +304960,10 @@ index 000000000000..09bdc4a96838 2.18.4 -From 2fae135ea3e54e787c88e0e5ec73f5ceec0d197d Mon Sep 17 00:00:00 2001 +From cf874c99dc03109e6c6db3079a3e8c2d86e2d041 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 24 Apr 2018 14:42:27 +0100 -Subject: [PATCH 0134/1148] gpiolib: Don't prevent IRQ usage of output GPIOs +Subject: [PATCH 0134/1209] gpiolib: Don't prevent IRQ usage of output GPIOs Upstream Linux deems using output GPIOs to generate IRQs as a bogus use case, even though the BCM2835 GPIO controller is capable of doing @@ -305016,10 +305016,10 @@ index abdf448b11a3..1e6bc8ecb5dc 100644 2.18.4 -From 64d22b887451d091dfd9889ee187b709fb79512a Mon Sep 17 00:00:00 2001 +From 2db42d2cddff18010486e662aaf6c2474dbf743e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 26 Nov 2018 19:46:58 +0000 -Subject: [PATCH 0135/1148] net: lan78xx: Support auto-downshift to 100Mb/s +Subject: [PATCH 0135/1209] net: lan78xx: Support auto-downshift to 100Mb/s Ethernet cables with faulty or missing pairs (specifically pairs C and D) allow auto-negotiation to 1000Mbs, but do not support the successful @@ -305117,10 +305117,10 @@ index 517288da19fd..626c450d71f4 100644 2.18.4 -From ac6b0e044f47eb93cb63b2f34e2c21c00b6e663b Mon Sep 17 00:00:00 2001 +From 05ae9a47a209601fcf5d209aea2f10873936122a Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 29 Oct 2018 14:21:04 +0000 -Subject: [PATCH 0136/1148] staging: bcm2835-camera: Ensure H264 header bytes +Subject: [PATCH 0136/1209] staging: bcm2835-camera: Ensure H264 header bytes get a sensible timestamp H264 header come from VC with 0 timestamps, which means they get a @@ -305215,10 +305215,10 @@ index b5fce38de038..dcb1b8e1f4e0 100644 2.18.4 -From 7691bf1aeca5ac5037e8dd26088caf7825ae89c8 Mon Sep 17 00:00:00 2001 +From b0a1ba9825b9c78a79a801459b6f48fdb8a904e7 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 10 Jan 2019 17:58:06 +0000 -Subject: [PATCH 0137/1148] firmware: raspberrypi: Report the fw variant during +Subject: [PATCH 0137/1209] firmware: raspberrypi: Report the fw variant during probe The driver already reported the firmware build date during probe. @@ -305334,10 +305334,10 @@ index 25fca695f903..9c6027fc25da 100644 2.18.4 -From 5726bc9aac63437f07d474a5c6390f3b6a9fc278 Mon Sep 17 00:00:00 2001 +From a2194e5f5ccb8b8c55365c9e309cb74cdde885a0 Mon Sep 17 00:00:00 2001 From: Joshua Emele Date: Wed, 7 Nov 2018 16:07:40 -0800 -Subject: [PATCH 0138/1148] lan78xx: Debounce link events to minimize poll +Subject: [PATCH 0138/1209] lan78xx: Debounce link events to minimize poll storm The bInterval is set to 4 (i.e. 8 microframes => 1ms) and the only bit @@ -305386,10 +305386,10 @@ index 3bf87542c2ec..3ce3c651d158 100644 2.18.4 -From 40bdc4578b5810b7822b509880b663b664bbef73 Mon Sep 17 00:00:00 2001 +From 7a9eed627b7563941fcf52ed15a23152013f7435 Mon Sep 17 00:00:00 2001 From: b-ak Date: Thu, 3 Jan 2019 00:01:08 +0530 -Subject: [PATCH 0139/1148] ASoC: Add support for AudioSense-Pi add-on +Subject: [PATCH 0139/1209] ASoC: Add support for AudioSense-Pi add-on soundcard AudioSense-Pi is a RPi HAT based on a TI's TLV320AIC32x4 stereo codec @@ -305724,10 +305724,10 @@ index 000000000000..d247ee8e6127 2.18.4 -From 03db767e20e214d791ca6500628aadd36240e6ff Mon Sep 17 00:00:00 2001 +From 507173761f0ed9836fea7705c1b9d93c56dc650a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 15 Jan 2019 12:39:50 +0000 -Subject: [PATCH 0140/1148] spi: spi-bcm2835: Re-enable HW CS +Subject: [PATCH 0140/1209] spi: spi-bcm2835: Re-enable HW CS Signed-off-by: Phil Elwell --- @@ -305735,7 +305735,7 @@ Signed-off-by: Phil Elwell 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c -index c88f5d99c906..0eb748631f20 100644 +index 56ee84e85bee..b5efa2236b61 100644 --- a/drivers/spi/spi-bcm2835.c +++ b/drivers/spi/spi-bcm2835.c @@ -1169,9 +1169,57 @@ static void bcm2835_spi_handle_err(struct spi_controller *ctlr, @@ -305798,7 +305798,7 @@ index c88f5d99c906..0eb748631f20 100644 } static int bcm2835_spi_setup(struct spi_device *spi) -@@ -1289,6 +1337,7 @@ static int bcm2835_spi_probe(struct platform_device *pdev) +@@ -1276,6 +1324,7 @@ static int bcm2835_spi_probe(struct platform_device *pdev) ctlr->bits_per_word_mask = SPI_BPW_MASK(8); ctlr->num_chipselect = BCM2835_SPI_NUM_CS; ctlr->setup = bcm2835_spi_setup; @@ -305810,75 +305810,10 @@ index c88f5d99c906..0eb748631f20 100644 2.18.4 -From 2af516f282bee5e47d358f764c07e2a1f9bedc98 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Tue, 15 Jan 2019 12:41:15 +0000 -Subject: [PATCH 0141/1148] spi: spi-bcm2835: Disable forced software CS - -With GPIO CS used by the DTBs, allow hardware CS to be selected by an -overlay. - -Signed-off-by: Phil Elwell ---- - drivers/spi/spi-bcm2835.c | 37 ------------------------------------- - 1 file changed, 37 deletions(-) - -diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c -index 0eb748631f20..e5c5146e1d95 100644 ---- a/drivers/spi/spi-bcm2835.c -+++ b/drivers/spi/spi-bcm2835.c -@@ -1279,43 +1279,6 @@ static int bcm2835_spi_setup(struct spi_device *spi) - return -EINVAL; - } - -- /* -- * Translate native CS to GPIO -- * -- * FIXME: poking around in the gpiolib internals like this is -- * not very good practice. Find a way to locate the real problem -- * and fix it. Why is the GPIO descriptor in spi->cs_gpiod -- * sometimes not assigned correctly? Erroneous device trees? -- */ -- -- /* get the gpio chip for the base */ -- chip = gpiochip_find("pinctrl-bcm2835", chip_match_name); -- if (!chip) -- return 0; -- -- /* -- * Retrieve the corresponding GPIO line used for CS. -- * The inversion semantics will be handled by the GPIO core -- * code, so we pass GPIOS_OUT_LOW for "unasserted" and -- * the correct flag for inversion semantics. The SPI_CS_HIGH -- * on spi->mode cannot be checked for polarity in this case -- * as the flag use_gpio_descriptors enforces SPI_CS_HIGH. -- */ -- if (of_property_read_bool(spi->dev.of_node, "spi-cs-high")) -- lflags = GPIO_ACTIVE_HIGH; -- else -- lflags = GPIO_ACTIVE_LOW; -- spi->cs_gpiod = gpiochip_request_own_desc(chip, 8 - spi->chip_select, -- DRV_NAME, -- lflags, -- GPIOD_OUT_LOW); -- if (IS_ERR(spi->cs_gpiod)) -- return PTR_ERR(spi->cs_gpiod); -- -- /* and set up the "mode" and level */ -- dev_info(&spi->dev, "setting up native-CS%i to use GPIO\n", -- spi->chip_select); -- - return 0; - } - --- -2.18.4 - - -From 7abaf4c68825b0c94505a26a5fba65d3009b0fc3 Mon Sep 17 00:00:00 2001 +From 9d97c65616cd257ad140425275499dea78165d3c Mon Sep 17 00:00:00 2001 From: HiFiBerry Date: Mon, 8 Oct 2018 18:10:12 +0200 -Subject: [PATCH 0142/1148] Added driver for the HiFiBerry DAC+ ADC (#2694) +Subject: [PATCH 0141/1209] Added driver for the HiFiBerry DAC+ ADC (#2694) Signed-off-by: Daniel Matuschek @@ -306350,10 +306285,10 @@ index 000000000000..ab454f2ecb17 2.18.4 -From 2577a3d229c8e44bc63ce8b2924cd1fa47c1f623 Mon Sep 17 00:00:00 2001 +From 42c08d1b6f1de566e250ab4595d0f50e69c63cac Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 7 Feb 2019 18:16:25 +0000 -Subject: [PATCH 0143/1148] configs: Enable the AD193x codecs +Subject: [PATCH 0142/1209] configs: Enable the AD193x codecs See: https://github.com/raspberrypi/linux/issues/2850 @@ -306384,10 +306319,10 @@ index 26f2b5b3e968..eea92595d5e1 100644 2.18.4 -From d2984639645ab723e20405f0c6188eb7ee6b447e Mon Sep 17 00:00:00 2001 +From 9a4ff16ae88c02136a8054832dff2270f1b636ef Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 5 Mar 2019 09:51:22 +0000 -Subject: [PATCH 0144/1148] lan78xx: EEE support is now a PHY property +Subject: [PATCH 0143/1209] lan78xx: EEE support is now a PHY property Now that EEE support is a property of the PHY, use the PHY's DT node when querying the EEE-related properties. @@ -306416,10 +306351,10 @@ index 3ce3c651d158..8a197006eb6e 100644 2.18.4 -From 18c5328bca9f59874a97e89ae653936125478152 Mon Sep 17 00:00:00 2001 +From 7d8a1c4415c9143c04aad53da477d46d84f8ea06 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 6 Mar 2019 16:28:09 +0000 -Subject: [PATCH 0145/1148] Revert "staging: vchiq: delete vchiq_killable.h" +Subject: [PATCH 0144/1209] Revert "staging: vchiq: delete vchiq_killable.h" This reverts commit 2da56630b1cc422f58408033102b8f91ae97bc91. --- @@ -306557,10 +306492,10 @@ index 5e6d3035dc05..7b38afd4739d 100644 2.18.4 -From 7b6c31583a7a892adc3e60b320d75717b1304c4a Mon Sep 17 00:00:00 2001 +From 03d61f1f25e77ee8008648171e0e301343444b76 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 15 Mar 2019 21:11:10 +0000 -Subject: [PATCH 0146/1148] Revert "staging: bcm2835-audio: Drop DT dependency" +Subject: [PATCH 0145/1209] Revert "staging: bcm2835-audio: Drop DT dependency" This reverts commit b7491a9fca2dc2535b9dc922550a37c5baae9d3d. --- @@ -306659,10 +306594,10 @@ index cf5f80f5ca6b..86b921030db7 100644 2.18.4 -From 2bd9945e1fe324562e1fb9446da7243c33c038f4 Mon Sep 17 00:00:00 2001 +From d472bfe7fd802d6c8d73e98e8fdb80be6270dcbe Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 28 Jan 2019 14:40:16 +0000 -Subject: [PATCH 0147/1148] gpu: vc4_firmware_kms: Fix up 64 bit compile +Subject: [PATCH 0146/1209] gpu: vc4_firmware_kms: Fix up 64 bit compile warnings. Resolve two build warnings with regard using incorrectly @@ -306731,10 +306666,10 @@ index 347ad72682dc..85e273665836 100644 2.18.4 -From 58f8e28e0314b34e11792a9b106c45017af710b5 Mon Sep 17 00:00:00 2001 +From c62dd916f7728a4ca43d0c35d68f84c336fd3941 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 20 Jul 2018 22:03:41 +0100 -Subject: [PATCH 0148/1148] bcm2835-dma: Add support for per-channel flags +Subject: [PATCH 0147/1209] bcm2835-dma: Add support for per-channel flags Add the ability to interpret the high bits of the dreq specifier as flags to be included in the DMA_CS register. The motivation for this @@ -306785,10 +306720,10 @@ index 6860131b02d9..1e5d6f1bed4e 100644 2.18.4 -From 3126bea6640d10184f564eaca3d6d09da049eee4 Mon Sep 17 00:00:00 2001 +From cc5fda723a0484a81a409bde2f6d80bbad3cdc8c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 19 Feb 2019 15:18:25 +0000 -Subject: [PATCH 0149/1148] drm: vc4: Programming the CTM is conditional on +Subject: [PATCH 0148/1209] drm: vc4: Programming the CTM is conditional on running full KMS vc4_ctm_commit writes to HVS registers, so this is only applicable @@ -306817,10 +306752,10 @@ index 75d3e8c6b650..57124fe94247 100644 2.18.4 -From 67c7446ae3b0899b347f9bd51a28f00c528ad988 Mon Sep 17 00:00:00 2001 +From 33528566eb6fcb59d99966eec8d154976123308a Mon Sep 17 00:00:00 2001 From: Phil Howard Date: Fri, 29 Mar 2019 10:53:14 +0000 -Subject: [PATCH 0150/1148] rtc: rv3028: Add backup switchover mode support +Subject: [PATCH 0149/1209] rtc: rv3028: Add backup switchover mode support Signed-off-by: Phil Howard --- @@ -306873,10 +306808,10 @@ index bbdfebd70644..8b2446909a1b 100644 2.18.4 -From 34e06f2e427ab5adb06a5c2dec1d76e69b40de4f Mon Sep 17 00:00:00 2001 +From b982da5b792a52da153436f5413c5ec08d42d1a0 Mon Sep 17 00:00:00 2001 From: FERHAT Nicolas Date: Fri, 5 Apr 2019 13:06:42 +0100 -Subject: [PATCH 0151/1148] Audiophonics I-Sabre 9038Q2M DAC driver +Subject: [PATCH 0150/1209] Audiophonics I-Sabre 9038Q2M DAC driver Signed-off-by: Audiophonics @@ -307589,10 +307524,10 @@ index 000000000000..9cac5a2446b9 2.18.4 -From 0cda878e32033a4a28bec15fb1c4f258fea75798 Mon Sep 17 00:00:00 2001 +From db4feddca9f3c46198022f75778936cc0a482fe5 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 2 May 2019 11:53:45 +0100 -Subject: [PATCH 0152/1148] lan78xx: use default alignment for rx buffers +Subject: [PATCH 0151/1209] lan78xx: use default alignment for rx buffers The lan78xx uses a 12-byte hardware rx header, so there is no need to allocate SKBs with NET_IP_ALIGN set. Removes alignment faults @@ -307618,10 +307553,10 @@ index 8a197006eb6e..f72ab25e7d06 100644 2.18.4 -From 8c1610578739a2ab5a43f6935aa24f958d35beff Mon Sep 17 00:00:00 2001 +From ed79522f9bac2c94a86008a16f8e3ba34be6e646 Mon Sep 17 00:00:00 2001 From: IQaudIO Date: Mon, 13 May 2019 21:53:05 +0100 -Subject: [PATCH 0153/1148] Added IQaudIO Pi-Codec board support (#2969) +Subject: [PATCH 0152/1209] Added IQaudIO Pi-Codec board support (#2969) Add support for the IQaudIO Pi-Codec board. @@ -307961,10 +307896,10 @@ index 000000000000..83f2dba1f5d6 2.18.4 -From f880466afb95a7d5b62ffcd682f19b908a12eecc Mon Sep 17 00:00:00 2001 +From e52c622ed9a542650179bd7599f437b2ebd24ed1 Mon Sep 17 00:00:00 2001 From: Klaus Schulz Date: Thu, 16 May 2019 13:35:32 +0200 -Subject: [PATCH 0154/1148] sound: pcm512x-codec: Adding 352.8kHz samplerate +Subject: [PATCH 0153/1209] sound: pcm512x-codec: Adding 352.8kHz samplerate support --- @@ -307988,10 +307923,10 @@ index 4cbef9affffd..604b405c81ac 100644 2.18.4 -From 08fd47699cdc80231ec3a2ea56ed810a6ad05a38 Mon Sep 17 00:00:00 2001 +From def6f52090cee34145376f3a41fad6a7d047dc2c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 31 Oct 2018 14:55:37 +0000 -Subject: [PATCH 0155/1148] media: ov5647: Add set_fmt and get_fmt calls. +Subject: [PATCH 0154/1209] media: ov5647: Add set_fmt and get_fmt calls. There's no way to query the subdevice for the supported resolutions. @@ -308041,10 +307976,10 @@ index e7d2e5b4ad4b..3e587eb0a30e 100644 2.18.4 -From a427e5bd7bcd2554ec147e944b2d437bc822a36d Mon Sep 17 00:00:00 2001 +From 9dd3553db055764bc9d2790128760b239cab32e1 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 31 Oct 2018 14:55:59 +0000 -Subject: [PATCH 0156/1148] [media] Documentation: DT: add device tree for PWDN +Subject: [PATCH 0155/1209] [media] Documentation: DT: add device tree for PWDN control Add optional GPIO pwdn to connect to the PWDN line on the sensor. @@ -308080,10 +308015,10 @@ index 22e44945b661..70f06c24f470 100644 2.18.4 -From a91809be57d97b081dc87fb9b492b8fe416bbca0 Mon Sep 17 00:00:00 2001 +From 79e07901c16ec7b2c6d48f56e351a97470e30215 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 31 Oct 2018 14:56:33 +0000 -Subject: [PATCH 0157/1148] media: ov5647: Add support for PWDN GPIO. +Subject: [PATCH 0156/1209] media: ov5647: Add support for PWDN GPIO. Add support for an optional GPIO connected to PWDN on the sensor. @@ -308178,10 +308113,10 @@ index 3e587eb0a30e..c39e3d20e3ef 100644 2.18.4 -From 530aff1517b0a93e816585f58110d228bd1b2dea Mon Sep 17 00:00:00 2001 +From 700a8824fba4ef6f0d1e5891e5a67d40eb59ae95 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 31 Oct 2018 14:56:47 +0000 -Subject: [PATCH 0158/1148] media: ov5647: Add support for non-continuous clock +Subject: [PATCH 0157/1209] media: ov5647: Add support for non-continuous clock mode The driver was only supporting continuous clock mode @@ -308263,10 +308198,10 @@ index c39e3d20e3ef..8a1a515388e0 100644 2.18.4 -From 1ae6dd1583961bd70dd4113fd3aa3a43cc049716 Mon Sep 17 00:00:00 2001 +From dca432ec7dc4b65f89e4504de8cbe2b10fc40b2d Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 31 Oct 2018 14:56:59 +0000 -Subject: [PATCH 0159/1148] media: tc358743: Increase FIFO level to 374. +Subject: [PATCH 0158/1209] media: tc358743: Increase FIFO level to 374. The existing fixed value of 16 worked for UYVY 720P60 over 2 lanes at 594MHz, or UYVY 1080P60 over 4 lanes. (RGB888 @@ -308284,10 +308219,10 @@ Signed-off-by: Dave Stevenson 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c -index dbbab75f135e..1d5a10e8c176 100644 +index cff99cf61ed4..5b40de02f0d1 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c -@@ -1947,7 +1947,7 @@ static int tc358743_probe_of(struct tc358743_state *state) +@@ -1949,7 +1949,7 @@ static int tc358743_probe_of(struct tc358743_state *state) state->pdata.ddc5v_delay = DDC5V_DELAY_100_MS; state->pdata.enable_hdcp = false; /* A FIFO level of 16 should be enough for 2-lane 720p60 at 594 MHz. */ @@ -308300,10 +308235,10 @@ index dbbab75f135e..1d5a10e8c176 100644 2.18.4 -From e6ca711b1ac353b8d2c59ef8d1956f6b7301fa7d Mon Sep 17 00:00:00 2001 +From 1120813d9e8e9b53660bc09ce64fdfac9a389294 Mon Sep 17 00:00:00 2001 From: Philipp Zabel Date: Thu, 21 Sep 2017 17:30:24 +0200 -Subject: [PATCH 0160/1148] media: tc358743: fix connected/active CSI-2 lane +Subject: [PATCH 0159/1209] media: tc358743: fix connected/active CSI-2 lane reporting g_mbus_config was supposed to indicate all supported lane numbers, not @@ -308325,10 +308260,10 @@ Signed-off-by: Philipp Zabel 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c -index 1d5a10e8c176..82e94a59b852 100644 +index 5b40de02f0d1..98cee67005cb 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c -@@ -1606,11 +1606,20 @@ static int tc358743_g_mbus_config(struct v4l2_subdev *sd, +@@ -1608,11 +1608,20 @@ static int tc358743_g_mbus_config(struct v4l2_subdev *sd, struct v4l2_mbus_config *cfg) { struct tc358743_state *state = to_state(sd); @@ -308351,7 +308286,7 @@ index 1d5a10e8c176..82e94a59b852 100644 switch (state->csi_lanes_in_use) { case 1: -@@ -2052,6 +2061,7 @@ static int tc358743_probe(struct i2c_client *client) +@@ -2054,6 +2063,7 @@ static int tc358743_probe(struct i2c_client *client) if (pdata) { state->pdata = *pdata; state->bus.flags = V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; @@ -308382,10 +308317,10 @@ index 45f88f0248c4..9159a7008e3e 100644 2.18.4 -From 63e9486ecbc860e4f63fbcb3294989f4c3ad91b2 Mon Sep 17 00:00:00 2001 +From 1bc7c07af3ff87e2f3de1d794ccac7936c30f3bf Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 31 Oct 2018 14:57:21 +0000 -Subject: [PATCH 0161/1148] media: tc358743: Add support for 972Mbit/s link +Subject: [PATCH 0160/1209] media: tc358743: Add support for 972Mbit/s link freq. Adds register setups for running the CSI lanes at 972Mbit/s, @@ -308397,10 +308332,10 @@ Signed-off-by: Dave Stevenson 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c -index 82e94a59b852..2d7792bcd5ea 100644 +index 98cee67005cb..4a6de85326bf 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c -@@ -1976,6 +1976,7 @@ static int tc358743_probe_of(struct tc358743_state *state) +@@ -1978,6 +1978,7 @@ static int tc358743_probe_of(struct tc358743_state *state) /* * The CSI bps per lane must be between 62.5 Mbps and 1 Gbps. * The default is 594 Mbps for 4-lane 1080p60 or 2-lane 720p60. @@ -308408,7 +308343,7 @@ index 82e94a59b852..2d7792bcd5ea 100644 */ bps_pr_lane = 2 * endpoint.link_frequencies[0]; if (bps_pr_lane < 62500000U || bps_pr_lane > 1000000000U) { -@@ -1988,23 +1989,41 @@ static int tc358743_probe_of(struct tc358743_state *state) +@@ -1990,23 +1991,41 @@ static int tc358743_probe_of(struct tc358743_state *state) state->pdata.refclk_hz * state->pdata.pll_prd; /* @@ -308468,10 +308403,10 @@ index 82e94a59b852..2d7792bcd5ea 100644 2.18.4 -From 447486738a09673abd3a310d0a090eaa78676426 Mon Sep 17 00:00:00 2001 +From 85c664987aa3a171a1f9a5f82b86c537b742a63d Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 31 Oct 2018 14:57:34 +0000 -Subject: [PATCH 0162/1148] media: tc358743: Check I2C succeeded during probe. +Subject: [PATCH 0161/1209] media: tc358743: Check I2C succeeded during probe. The probe for the TC358743 reads the CHIPID register from the device and compares it to the expected value of 0. @@ -308489,7 +308424,7 @@ Signed-off-by: Dave Stevenson 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c -index 2d7792bcd5ea..ba5104e7cbd6 100644 +index 4a6de85326bf..843f341a7eab 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c @@ -110,7 +110,7 @@ static inline struct tc358743_state *to_state(struct v4l2_subdev *sd) @@ -308550,7 +308485,7 @@ index 2d7792bcd5ea..ba5104e7cbd6 100644 static void i2c_wr16(struct v4l2_subdev *sd, u16 reg, u16 val) { i2c_wrreg(sd, reg, val, 2); -@@ -2062,6 +2079,7 @@ static int tc358743_probe(struct i2c_client *client) +@@ -2064,6 +2081,7 @@ static int tc358743_probe(struct i2c_client *client) struct tc358743_platform_data *pdata = client->dev.platform_data; struct v4l2_subdev *sd; u16 irq_mask = MASK_HDMI_MSK | MASK_CSI_MSK; @@ -308558,7 +308493,7 @@ index 2d7792bcd5ea..ba5104e7cbd6 100644 int err; if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) -@@ -2094,7 +2112,8 @@ static int tc358743_probe(struct i2c_client *client) +@@ -2096,7 +2114,8 @@ static int tc358743_probe(struct i2c_client *client) sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS; /* i2c access */ @@ -308572,10 +308507,10 @@ index 2d7792bcd5ea..ba5104e7cbd6 100644 2.18.4 -From ff1ee791596a68d76ffcfb5106d258020692da71 Mon Sep 17 00:00:00 2001 +From 2177a25593f9473d96bbc7f957f7784d151d49f0 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 31 Oct 2018 14:57:46 +0000 -Subject: [PATCH 0163/1148] media: adv7180: Default to the first valid input +Subject: [PATCH 0162/1209] media: adv7180: Default to the first valid input The hardware default is differential CVBS on AIN1 & 2, which isn't very useful. @@ -308623,10 +308558,10 @@ index e780969cc2f2..43229fccf83a 100644 2.18.4 -From 4c9ec28e3fd2c5025c1122e30340ab7961b941f9 Mon Sep 17 00:00:00 2001 +From f048a4e7077780dca001d99468983cd29043f2e2 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 31 Oct 2018 14:57:56 +0000 -Subject: [PATCH 0164/1148] media: adv7180: Add YPrPb support for ADV7282M +Subject: [PATCH 0163/1209] media: adv7180: Add YPrPb support for ADV7282M The ADV7282M can support YPbPr on AIN1-3, but this was not selectable from the driver. Add it to the list of @@ -308653,10 +308588,10 @@ index 43229fccf83a..8e3cf751a5a1 100644 2.18.4 -From d88222675e4818800a198f12a3c61cb931ebcbc5 Mon Sep 17 00:00:00 2001 +From 5224b02ac0895c657052be51bdc4f82a495f5db1 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 31 Oct 2018 14:58:08 +0000 -Subject: [PATCH 0165/1148] media: videodev2: Add helper defines for printing +Subject: [PATCH 0164/1209] media: videodev2: Add helper defines for printing FOURCCs New helper defines that allow printing of a FOURCC using @@ -308668,7 +308603,7 @@ Signed-off-by: Dave Stevenson 1 file changed, 5 insertions(+) diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h -index 530638dffd93..3c05779e2687 100644 +index 3210b3c82a4a..456dfa847ccb 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -82,6 +82,11 @@ @@ -308687,10 +308622,10 @@ index 530638dffd93..3c05779e2687 100644 2.18.4 -From 25c9daffb415aa5e4f572e81ae3d01e42a7c70d4 Mon Sep 17 00:00:00 2001 +From a489b43787fd6535414b490486e38d03daf16272 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 31 Oct 2018 14:59:06 +0000 -Subject: [PATCH 0166/1148] dt-bindings: Document BCM283x CSI2/CCP2 receiver +Subject: [PATCH 0165/1209] dt-bindings: Document BCM283x CSI2/CCP2 receiver Document the DT bindings for the CSI2/CCP2 receiver peripheral (known as Unicam) on BCM283x SoCs. @@ -308797,10 +308732,10 @@ index 000000000000..7714fb374b34 2.18.4 -From 98880445750bd2bc1161dc84c1772bdf444bed27 Mon Sep 17 00:00:00 2001 +From a1b5b105cd39276f4bd8137f060401d8d7e4db05 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 31 Oct 2018 14:59:40 +0000 -Subject: [PATCH 0167/1148] MAINTAINERS: Add entry for BCM2835 Unicam driver +Subject: [PATCH 0166/1209] MAINTAINERS: Add entry for BCM2835 Unicam driver Adds entry for the new BCM2835 Unicam (CSI-2 receiver) driver @@ -308831,10 +308766,10 @@ index 1407008df749..b7685777a806 100644 2.18.4 -From cfaf75bee34b956e9db6cb24369bf3a2e89a4a97 Mon Sep 17 00:00:00 2001 +From f87666480f73f90479e3b61c993370060cefa622 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 22 Nov 2018 17:31:06 +0000 -Subject: [PATCH 0168/1148] media: tc358743: Return an appropriate colorspace +Subject: [PATCH 0167/1209] media: tc358743: Return an appropriate colorspace from tc358743_set_fmt When calling tc358743_set_fmt, the code was calling tc358743_get_fmt @@ -308858,10 +308793,10 @@ Signed-off-by: Dave Stevenson 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c -index ba5104e7cbd6..ad9f7e833243 100644 +index 843f341a7eab..01e255aede50 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c -@@ -1688,12 +1688,23 @@ static int tc358743_enum_mbus_code(struct v4l2_subdev *sd, +@@ -1690,12 +1690,23 @@ static int tc358743_enum_mbus_code(struct v4l2_subdev *sd, return 0; } @@ -308886,7 +308821,7 @@ index ba5104e7cbd6..ad9f7e833243 100644 if (format->pad != 0) return -EINVAL; -@@ -1703,23 +1714,7 @@ static int tc358743_get_fmt(struct v4l2_subdev *sd, +@@ -1705,23 +1716,7 @@ static int tc358743_get_fmt(struct v4l2_subdev *sd, format->format.height = state->timings.bt.height; format->format.field = V4L2_FIELD_NONE; @@ -308911,7 +308846,7 @@ index ba5104e7cbd6..ad9f7e833243 100644 return 0; } -@@ -1734,18 +1729,11 @@ static int tc358743_set_fmt(struct v4l2_subdev *sd, +@@ -1736,18 +1731,11 @@ static int tc358743_set_fmt(struct v4l2_subdev *sd, int ret = tc358743_get_fmt(sd, cfg, format); format->format.code = code; @@ -308935,10 +308870,10 @@ index ba5104e7cbd6..ad9f7e833243 100644 2.18.4 -From 0f2dae1c63733326bb87eb3cc6e2500c847fac1a Mon Sep 17 00:00:00 2001 +From cd1a24b1f134f98ea0d609e10c2148c8ee7de960 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sat, 13 Oct 2018 20:51:23 +0200 -Subject: [PATCH 0169/1148] staging: vchiq_arm: Fix platform device +Subject: [PATCH 0168/1209] staging: vchiq_arm: Fix platform device unregistration In error case platform_device_register_data would return an ERR_PTR @@ -308968,10 +308903,10 @@ index d927c67012b0..006566ae2775 100644 2.18.4 -From 9ad7f772168d199c823673b0261f6ac88552b5da Mon Sep 17 00:00:00 2001 +From 381f06bdfb3fe540f59a6ae1f15134c42c963ae8 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 21 Feb 2018 15:48:54 +0000 -Subject: [PATCH 0170/1148] staging: bcm2835-camera: Fix logical continuation +Subject: [PATCH 0169/1209] staging: bcm2835-camera: Fix logical continuation splits Fix checkpatch errors for "Logical continuations should be @@ -309001,10 +308936,10 @@ index e5f651f78441..d220b2051891 100644 2.18.4 -From 8fb89074aa6bf5cda1eead1ddf2ca795d8533e71 Mon Sep 17 00:00:00 2001 +From f1d3a4f88a912ffa6570c5cdc8851fccb64153af Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 24 Jul 2018 12:08:29 +0100 -Subject: [PATCH 0171/1148] staging: bcm2835-camera: Ensure timestamps never go +Subject: [PATCH 0170/1209] staging: bcm2835-camera: Ensure timestamps never go backwards. There is an awkward situation with H264 header bytes. Currently @@ -309045,10 +308980,10 @@ index d220b2051891..74b7db3204ec 100644 2.18.4 -From 690855ebb0cdc352cf1c7c3edb478f818cf2fccd Mon Sep 17 00:00:00 2001 +From b0c03461e1ff5fa6203bf7b652b9d117776822f9 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 24 Sep 2018 16:30:37 +0100 -Subject: [PATCH 0172/1148] staging: vc04_services: Split vchiq-mmal into a +Subject: [PATCH 0171/1209] staging: vc04_services: Split vchiq-mmal into a module In preparation for adding a video codec V4L2 module which also @@ -309359,10 +309294,10 @@ rename to drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h 2.18.4 -From f75a33d2ab1fefd2d55256d694dad3118cd16976 Mon Sep 17 00:00:00 2001 +From d0010ef8253ccc0b417d742d3217351d03ca7fc2 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 24 Sep 2018 16:51:13 +0100 -Subject: [PATCH 0173/1148] staging: mmal-vchiq: Allocate and free components +Subject: [PATCH 0172/1209] staging: mmal-vchiq: Allocate and free components as required The existing code assumed that there would only ever be 4 components, @@ -309474,10 +309409,10 @@ index 47897e81ec58..4e34728d87e5 100644 2.18.4 -From 88d981e291ff02d103bbded33796dbe3b6f53686 Mon Sep 17 00:00:00 2001 +From 6ed6b4d5d173d7520264ed6861091d0b448c67c4 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 29 Oct 2018 16:20:46 +0000 -Subject: [PATCH 0174/1148] staging: mmal-vchiq: Avoid use of bool in +Subject: [PATCH 0173/1209] staging: mmal-vchiq: Avoid use of bool in structures Fixes up a checkpatch error "Avoid using bool structure members @@ -309505,10 +309440,10 @@ index f619697b09a1..38db20d42e42 100644 2.18.4 -From bad3645504a929d45b619cdce5614b1be223ee05 Mon Sep 17 00:00:00 2001 +From 90812a15bd4b1ba68e00238a18caf8b4f6e66c64 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 24 Sep 2018 16:57:09 +0100 -Subject: [PATCH 0175/1148] staging: mmal-vchiq: Make timeout a defined +Subject: [PATCH 0174/1209] staging: mmal-vchiq: Make timeout a defined parameter The timeout period for VPU communications is a useful thing @@ -309550,10 +309485,10 @@ index 38db20d42e42..9aeb5ac08683 100644 2.18.4 -From 4d1096bb985042b535203e53a44096de37d46ed5 Mon Sep 17 00:00:00 2001 +From 0f9456bcf3d4848f7c18825b771ffc2229a711a5 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 24 Sep 2018 17:33:37 +0100 -Subject: [PATCH 0176/1148] staging: mmal-vchiq: Make a mmal_buf struct for +Subject: [PATCH 0175/1209] staging: mmal-vchiq: Make a mmal_buf struct for passing parameters The callback from vchi_mmal to the client was growing lots of extra @@ -309840,10 +309775,10 @@ index 4e34728d87e5..cca7289761c2 100644 2.18.4 -From 5616793e5367ebfb0dcc1dea1bf50f7534c61745 Mon Sep 17 00:00:00 2001 +From 132a95b41132aacfebc6fe4446f42202612ffe57 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 24 Sep 2018 18:15:38 +0100 -Subject: [PATCH 0177/1148] staging: mmal-vchiq: Add support for event +Subject: [PATCH 0176/1209] staging: mmal-vchiq: Add support for event callbacks. (Preparation for the codec driver). @@ -310209,10 +310144,10 @@ index cca7289761c2..eeef5ee9467a 100644 2.18.4 -From ed3923bfffb219cddae4b4361f448126fd0b97e2 Mon Sep 17 00:00:00 2001 +From 2f2c14693e75292da286f8be3b145a28bf8ac6f1 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 24 Sep 2018 18:26:02 +0100 -Subject: [PATCH 0178/1148] staging: vc04_services: Support sending data to +Subject: [PATCH 0177/1209] staging: vc04_services: Support sending data to MMAL ports Add the ability to send data to ports. This only supports @@ -310257,10 +310192,10 @@ index f66d28ed7c84..a75e9fd8cbe1 100644 2.18.4 -From a49dcda6543ba1bb0f41a35a2f9a8d347c80fc70 Mon Sep 17 00:00:00 2001 +From 6939ca71fb3ac01184c8d44c0dfa047e21c0c2a1 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 25 Sep 2018 16:57:40 +0100 -Subject: [PATCH 0179/1148] staging: vc04_services: Fixup vchiq-mmal include +Subject: [PATCH 0178/1209] staging: vc04_services: Fixup vchiq-mmal include ordering There were dependencies on including the headers in the correct @@ -310301,10 +310236,10 @@ index eeef5ee9467a..7a490f29737a 100644 2.18.4 -From 2822ccad3828779665bb121ca816e3576a5909d9 Mon Sep 17 00:00:00 2001 +From 98b58548f99f82a1d7d5838043f6c09d2e43f24e Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 25 Sep 2018 10:27:11 +0100 -Subject: [PATCH 0180/1148] staging: vc04_services: Add new vc-sm-cma driver +Subject: [PATCH 0179/1209] staging: vc04_services: Add new vc-sm-cma driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -313518,10 +313453,10 @@ index 000000000000..107460ad1be3 2.18.4 -From 28dab6591a1964c4e612b3b2596c598de1b4497f Mon Sep 17 00:00:00 2001 +From 03eb7c27cd524778673e019db1b224167ebf6209 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 25 Sep 2018 16:07:55 +0100 -Subject: [PATCH 0181/1148] staging: vc04_services: Use vc-sm-cma to support +Subject: [PATCH 0180/1209] staging: vc04_services: Use vc-sm-cma to support zero copy With the vc-sm-cma driver we can support zero copy of buffers between @@ -313707,10 +313642,10 @@ index 7a490f29737a..ae6c69ba16ee 100644 2.18.4 -From 6a6492fe2d7577fe3208f4fd3d18c577728b9242 Mon Sep 17 00:00:00 2001 +From 5f9b1eee752313c079f8a7ffd24e486e1a0b53f4 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 29 Oct 2018 17:57:45 +0000 -Subject: [PATCH 0182/1148] media: videobuf2: Allow exporting of a struct +Subject: [PATCH 0181/1209] media: videobuf2: Allow exporting of a struct dmabuf videobuf2 only allowed exporting a dmabuf as a file descriptor, @@ -313799,10 +313734,10 @@ index 640aabe69450..d86d888247a1 100644 2.18.4 -From 8d8a652fc69041a23e0067fa336391f9311177af Mon Sep 17 00:00:00 2001 +From d9e6dd96d9996cd5ccf7fa6c9c2b1a9ee0d5282f Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 25 Sep 2018 14:53:49 +0100 -Subject: [PATCH 0183/1148] staging: vc04_services: Add a V4L2 M2M codec driver +Subject: [PATCH 0182/1209] staging: vc04_services: Add a V4L2 M2M codec driver This adds a V4L2 memory to memory device that wraps the MMAL video decode and video_encode components for H264 and MJPEG encode @@ -316286,10 +316221,10 @@ index 000000000000..4e4e4fb69ade 2.18.4 -From 6e3119eb70e0712226cb1c58c492f96d7ade13a1 Mon Sep 17 00:00:00 2001 +From b3d7cff4d5461def11f1356e1a9b9c12c3b18067 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 22 Jan 2019 12:04:09 +0000 -Subject: [PATCH 0184/1148] staging: mmal-vchiq: Fix client_component for 64 +Subject: [PATCH 0183/1209] staging: mmal-vchiq: Fix client_component for 64 bit kernel The MMAL client_component field is used with the event @@ -316362,10 +316297,10 @@ index ae6c69ba16ee..247521fbcc1d 100644 2.18.4 -From d581ccb832c303fa58a1e3cdbddb3cb90f259d5d Mon Sep 17 00:00:00 2001 +From e8b74c96240d24b90c70bcdec9d282fe3074701c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 24 Jan 2019 15:09:28 +0000 -Subject: [PATCH 0185/1148] clk: clk-bcm2835: Use %zd when printing size_t +Subject: [PATCH 0184/1209] clk: clk-bcm2835: Use %zd when printing size_t The debug text for how many clocks have been registered uses "%d" with a size_t. Correct it to "%zd". @@ -316376,10 +316311,10 @@ Signed-off-by: Dave Stevenson 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c -index 868ada45db28..74f30f1ed798 100644 +index db1df40271c0..d4bf9e376318 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -2352,7 +2352,7 @@ static int bcm2835_clk_probe(struct platform_device *pdev) +@@ -2354,7 +2354,7 @@ static int bcm2835_clk_probe(struct platform_device *pdev) return ret; /* note that we have registered all the clocks */ @@ -316392,10 +316327,10 @@ index 868ada45db28..74f30f1ed798 100644 2.18.4 -From 3b090a99f82e4690fb397d5e3b10eb49340fce83 Mon Sep 17 00:00:00 2001 +From f030d4b8b72b1f7680c9e2782c804a42408e3e3e Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 18 Sep 2018 11:08:51 +0100 -Subject: [PATCH 0186/1148] media: ov5647: Use gpiod_set_value_cansleep +Subject: [PATCH 0185/1209] media: ov5647: Use gpiod_set_value_cansleep All calls to the gpio library are in contexts that can sleep, therefore there is no issue with having those GPIOs controlled @@ -316452,10 +316387,10 @@ index 8a1a515388e0..07550377be2e 100644 2.18.4 -From a64c0bb86a6dfe522c3354ff20ffa154589a23e0 Mon Sep 17 00:00:00 2001 +From 9a8692aaba3f52e33ebc403bf869738ee30d8b83 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 24 Jan 2019 16:40:01 +0000 -Subject: [PATCH 0187/1148] staging: bcm2835-codec: variable vb2 may be used +Subject: [PATCH 0186/1209] staging: bcm2835-codec: variable vb2 may be used uninitialised In op_buffer_cb, the failure path checked whether there was @@ -316495,10 +316430,10 @@ index 4e4e4fb69ade..4ef16379f216 100644 2.18.4 -From f225f0c14780eeb9d1730b79c459c7749a345506 Mon Sep 17 00:00:00 2001 +From cd6a6a187e8ba6a79020fe5c5dedfde8e137e32b Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 24 Jan 2019 16:36:19 +0000 -Subject: [PATCH 0188/1148] staging: bcm2835-codec: Fix potentially +Subject: [PATCH 0187/1209] staging: bcm2835-codec: Fix potentially uninitialised vars src_m2m_buf and dst_m2m_buf were printed in log messages @@ -316526,10 +316461,10 @@ index 4ef16379f216..c26760faae2d 100644 2.18.4 -From c1b426a72705f313e0eacbe47b917db98ea9a36e Mon Sep 17 00:00:00 2001 +From 6e8fe3b4dfd9728ae9665e38558fca4403495e34 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 13 Feb 2019 12:33:29 +0000 -Subject: [PATCH 0189/1148] staging: mmal_vchiq: Add in the Bayer encoding +Subject: [PATCH 0188/1209] staging: mmal_vchiq: Add in the Bayer encoding formats The list of formats was copied before Bayer support was added. @@ -316583,10 +316518,10 @@ index 2be9941a1f30..44ba91aa6d47 100644 2.18.4 -From 66a77b89432ddd7c3fbf285a41ac63320cd4221a Mon Sep 17 00:00:00 2001 +From 78dd9506355302ed41a23e3e0009fddba397cd0c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 13 Feb 2019 12:36:56 +0000 -Subject: [PATCH 0190/1148] staging: mmal-vchiq: Always return the param size +Subject: [PATCH 0189/1209] staging: mmal-vchiq: Always return the param size from param_get mmal-vchiq is a reimplementation of the userland library for MMAL. @@ -316627,10 +316562,10 @@ index 9416cbeae3a3..59a4d2414069 100644 2.18.4 -From db2b147c4cffe4b6814faf4435b1ed998e5c1174 Mon Sep 17 00:00:00 2001 +From 9ea749a3acc4e64417525d71c0eb271754a49b58 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 13 Feb 2019 12:51:03 +0000 -Subject: [PATCH 0191/1148] staging: mmal-vchiq: If the VPU returns an error, +Subject: [PATCH 0190/1209] staging: mmal-vchiq: If the VPU returns an error, don't negate it There is an enum for the errors that the VPU can return. @@ -316662,10 +316597,10 @@ index 59a4d2414069..cfc861d0a214 100644 2.18.4 -From 040157f11bd42cbaf2d3f53d4978cb78925a479b Mon Sep 17 00:00:00 2001 +From 788dae0bca27bd0d5cc4f93b1eb4e58fc72e918f Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 13 Feb 2019 13:44:00 +0000 -Subject: [PATCH 0192/1148] staging: bcm2835_codec: Query supported formats +Subject: [PATCH 0191/1209] staging: bcm2835_codec: Query supported formats from the component The driver was previously working with hard coded tables of @@ -317395,10 +317330,10 @@ index c26760faae2d..7b8de26ca43b 100644 2.18.4 -From 62480ce9043f5c475bcbc09b118835501ee3054a Mon Sep 17 00:00:00 2001 +From a98cb16161be10a2bb25cd5add90fe08acd8f236 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 13 Feb 2019 14:07:52 +0000 -Subject: [PATCH 0193/1148] staging: bcm2835_codec: Add support for the ISP as +Subject: [PATCH 0192/1209] staging: bcm2835_codec: Add support for the ISP as an M2M device The MMAL ISP component can also use this same V4L2 wrapper to @@ -317785,10 +317720,10 @@ index 7b8de26ca43b..f9fd5e8ac914 100644 2.18.4 -From 07c05c278d0de8840b414db4ce73474e46e5e533 Mon Sep 17 00:00:00 2001 +From a1be88b9c85bd0415715921f32cb943e03ac6b32 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 15 Feb 2019 11:36:14 +0000 -Subject: [PATCH 0194/1148] staging: bcm2835_codec: Add an option for ignoring +Subject: [PATCH 0193/1209] staging: bcm2835_codec: Add an option for ignoring Bayer formats. This is a workaround for GStreamer currently not identifying Bayer @@ -317970,10 +317905,10 @@ index f9fd5e8ac914..5141034835ca 100644 2.18.4 -From 62b617d21d70a5d249406f918fbc2d104cfe519d Mon Sep 17 00:00:00 2001 +From 649b46fa0d72318ceb56ea831806dc7e499ab373 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 15 Feb 2019 11:38:45 +0000 -Subject: [PATCH 0195/1148] staging: bcm2835_codec: Fix handling of +Subject: [PATCH 0194/1209] staging: bcm2835_codec: Fix handling of VB2_MEMORY_DMABUF buffers If the queue is configured as VB2_MEMORY_DMABUF then vb2_core_expbuf @@ -318166,10 +318101,10 @@ index 247521fbcc1d..0a75c96f6d58 100644 2.18.4 -From df2d47a0834afaecff794659262ac4e561ba47d0 Mon Sep 17 00:00:00 2001 +From 43917b40fd552e10a0663de256970261d222655d Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 18 Feb 2019 15:52:29 +0000 -Subject: [PATCH 0196/1148] staging: mmal-vchiq: Update mmal_parameters.h with +Subject: [PATCH 0195/1209] staging: mmal-vchiq: Update mmal_parameters.h with recently defined params mmal_parameters.h hasn't been updated to reflect additions made @@ -318228,10 +318163,10 @@ index 80a99128f5f3..926392d754c7 100644 2.18.4 -From 9c8f46371e366d8b7207667fa3bceffb3acffe28 Mon Sep 17 00:00:00 2001 +From e40fc7eca4769526d2d150cf7e43d8efb53dc14b Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 18 Feb 2019 15:56:42 +0000 -Subject: [PATCH 0197/1148] staging: bcm2835_codec: Include timing info in SPS +Subject: [PATCH 0196/1209] staging: bcm2835_codec: Include timing info in SPS headers Inserting timing information into the VUI block of the SPS is @@ -318278,10 +318213,10 @@ index 67d42bf6251b..eb5c07bc73d0 100644 2.18.4 -From 87fb1808938d9000bbff0f3c1c8ae09be7b23ec5 Mon Sep 17 00:00:00 2001 +From d4835f3f883c0779c6eb3b858017c0c400142983 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 19 Mar 2019 17:55:09 +0000 -Subject: [PATCH 0198/1148] staging: bcm2835-codec: NULL component handle on +Subject: [PATCH 0197/1209] staging: bcm2835-codec: NULL component handle on queue_setup failure queue_setup tries creating the relevant MMAL component and configures @@ -318343,10 +318278,10 @@ index eb5c07bc73d0..ad555ceb8f63 100644 2.18.4 -From e4219e66cee247b6961e132a62b9aa17960c88cf Mon Sep 17 00:00:00 2001 +From b7796ba19c1c0178fdc9c16acc23d7719dd64680 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 8 Mar 2019 11:26:00 +0000 -Subject: [PATCH 0199/1148] staging: bcm2835_codec: Clean up logging on +Subject: [PATCH 0198/1209] staging: bcm2835_codec: Clean up logging on unloading the driver The log line was missing a closing \n, so wasn't added to the @@ -318398,10 +318333,10 @@ index ad555ceb8f63..837fbec5ab4f 100644 2.18.4 -From 90d241f9971dc6c95ecd2b3af33694f1d3200edb Mon Sep 17 00:00:00 2001 +From 2bea32954862e19d8209abff3ead83c071bfe28c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 20 Mar 2019 10:06:51 +0000 -Subject: [PATCH 0200/1148] staging: bcm2835-codec: Refactor default resolution +Subject: [PATCH 0199/1209] staging: bcm2835-codec: Refactor default resolution code The default resolution code was different for each role @@ -318558,10 +318493,10 @@ index 837fbec5ab4f..4b67c9ea73e1 100644 2.18.4 -From e88efdca0ce4302d5b00073a50c7ba207345bd66 Mon Sep 17 00:00:00 2001 +From 61887833573dee37ddebf8eae8147739e9ff1e7c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 2 May 2019 14:30:24 +0100 -Subject: [PATCH 0201/1148] staging: bcm2835-codec: Correct port width calc for +Subject: [PATCH 0200/1209] staging: bcm2835-codec: Correct port width calc for truncation The calculation converting from V4L2 bytesperline to MMAL @@ -318593,10 +318528,10 @@ index 4b67c9ea73e1..97b1f2b953ec 100644 2.18.4 -From e8b1314f95ce03b336ba8113eee3dea098a8a0bb Mon Sep 17 00:00:00 2001 +From 057e3c3cfa98203bac1c48b41209b20c28c6e3a9 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 2 May 2019 14:32:21 +0100 -Subject: [PATCH 0202/1148] staging: bcm2835-codec: Remove height padding for +Subject: [PATCH 0201/1209] staging: bcm2835-codec: Remove height padding for ISP role The ISP has no need for heights to be a multiple of macroblock @@ -318660,10 +318595,10 @@ index 97b1f2b953ec..22588f78287e 100644 2.18.4 -From 7eeb525432706e589f2aaab49db764d63216026c Mon Sep 17 00:00:00 2001 +From 4dd29e05e2149786e3b551881d1a73de3644bee0 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 1 May 2019 13:27:23 +0100 -Subject: [PATCH 0203/1148] staging: mmal-vchiq: Free the event context for +Subject: [PATCH 0202/1209] staging: mmal-vchiq: Free the event context for control ports vchiq_mmal_component_init calls init_event_context for the @@ -318694,10 +318629,10 @@ index 2018c28daf68..4d9d7beb9144 100644 2.18.4 -From 68a396a76d61deeca09321d6bb0b852e76cfec0e Mon Sep 17 00:00:00 2001 +From beb105d8dd7bd44475951bc37286139a4c393b94 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 2 May 2019 15:50:01 +0100 -Subject: [PATCH 0204/1148] staging: mmal-vchiq: Fix memory leak in error path +Subject: [PATCH 0203/1209] staging: mmal-vchiq: Fix memory leak in error path On error, vchiq_mmal_component_init could leave the event context allocated for ports. @@ -318776,55 +318711,10 @@ index 4d9d7beb9144..61a3593cdcfc 100644 2.18.4 -From 414f3185857eb635024d850a0e30aefdb4167492 Mon Sep 17 00:00:00 2001 -From: Marcel Holtmann -Date: Wed, 22 May 2019 09:05:40 +0200 -Subject: [PATCH 0205/1148] Bluetooth: Check key sizes only when Secure Simple - Pairing is enabled - -The encryption is only mandatory to be enforced when both sides are using -Secure Simple Pairing and this means the key size check makes only sense -in that case. - -On legacy Bluetooth 2.0 and earlier devices like mice the encryption was -optional and thus causing an issue if the key size check is not bound to -using Secure Simple Pairing. - -Fixes: d5bb334a8e17 ("Bluetooth: Align minimum encryption key size for LE and BR/EDR connections") -Signed-off-by: Marcel Holtmann -Cc: stable@vger.kernel.org ---- - net/bluetooth/hci_conn.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c -index ee57fa20bac3..c58c4d577f29 100644 ---- a/net/bluetooth/hci_conn.c -+++ b/net/bluetooth/hci_conn.c -@@ -1302,8 +1302,13 @@ int hci_conn_check_link_mode(struct hci_conn *conn) - return 0; - } - -- if (hci_conn_ssp_enabled(conn) && -- !test_bit(HCI_CONN_ENCRYPT, &conn->flags)) -+ /* If Secure Simple Pairing is not enabled, then legacy connection -+ * setup is used and no encryption or key sizes can be enforced. -+ */ -+ if (!hci_conn_ssp_enabled(conn)) -+ return 1; -+ -+ if (!test_bit(HCI_CONN_ENCRYPT, &conn->flags)) - return 0; - - return 1; --- -2.18.4 - - -From be5a46565dd5222409c04b35c937cdd152004eec Mon Sep 17 00:00:00 2001 +From 1550ea0c0224ebe48d560b4d5425e08a611f96ab Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 10 May 2019 14:11:58 +0100 -Subject: [PATCH 0206/1148] staging: bcm2835-codec: Convert V4L2 nsec +Subject: [PATCH 0204/1209] staging: bcm2835-codec: Convert V4L2 nsec timestamps to MMAL usec V4L2 uses nsecs, whilst MMAL uses usecs, but the code wasn't converting @@ -318873,10 +318763,10 @@ index 22588f78287e..5c7fc39cd921 100644 2.18.4 -From beeb9ef81a0cb16f9aa4df0b9ff83a1d1e666438 Mon Sep 17 00:00:00 2001 +From 640169c7fd8eb0480f30ba2b81899e209a5c305c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 10 May 2019 14:13:11 +0100 -Subject: [PATCH 0207/1148] staging: bcm2835-codec: Add support for setting +Subject: [PATCH 0205/1209] staging: bcm2835-codec: Add support for setting S_PARM and G_PARM Video encode can use the frame rate for rate control calculations, @@ -318997,10 +318887,10 @@ index 5c7fc39cd921..708f76b7aa92 100644 2.18.4 -From 021a17fccbc1033ae2ad5445c5fcc8b361ab133f Mon Sep 17 00:00:00 2001 +From 26757a41c01d8bee39488a7462f301e8a3422f4d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 12 Jun 2019 17:15:05 +0100 -Subject: [PATCH 0208/1148] w1: w1-gpio: Make GPIO an output for strong pullup +Subject: [PATCH 0206/1209] w1: w1-gpio: Make GPIO an output for strong pullup The logic to drive the data line high to implement a strong pullup assumed that the pin was already an output - setting a value does @@ -319030,10 +318920,10 @@ index d4632aace402..4832cd8c2596 100644 2.18.4 -From 85ef66939bbd474454cd553386465e22a5b21fa1 Mon Sep 17 00:00:00 2001 +From 01fa1bd456ec61a4a1d475c65c46ae236300cb21 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 20 Feb 2019 08:49:39 +0000 -Subject: [PATCH 0209/1148] arm: bcm2835: Fix FIQ early ioremap +Subject: [PATCH 0207/1209] arm: bcm2835: Fix FIQ early ioremap The ioremapping creates mappings within the vmalloc area. The equivalent early function, create_mapping, now checks that the @@ -319109,10 +318999,10 @@ index 9b6c921106b5..9bd9842da59f 100644 2.18.4 -From 92f318947e684259a7304f0c2bac71239c272f65 Mon Sep 17 00:00:00 2001 +From 20f4ba01b3df69585d27a5c8e035dbf67e20fb79 Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Thu, 14 Mar 2019 10:16:02 +0000 -Subject: [PATCH 0210/1148] Fix copy_from_user if BCM2835_FAST_MEMCPY=n +Subject: [PATCH 0208/1209] Fix copy_from_user if BCM2835_FAST_MEMCPY=n The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally changed the behaviour of arm_copy_from_user. The page pinning code @@ -319154,10 +319044,10 @@ index 296c2985ac17..ab150e8281f3 100644 2.18.4 -From 4c3ef122d45045ffd1de5173890567f488c2f3f3 Mon Sep 17 00:00:00 2001 +From 82142796c0699f8e3ccfbd64d22865bcdcdfe578 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 19 Feb 2019 22:06:59 +0000 -Subject: [PATCH 0211/1148] PCI: brcmstb: Add Broadcom STB PCIe host controller +Subject: [PATCH 0209/1209] PCI: brcmstb: Add Broadcom STB PCIe host controller driver This commit adds the basic Broadcom STB PCIe controller. Missing is @@ -320355,10 +320245,10 @@ index 000000000000..d92290679067 2.18.4 -From a9cb137a2fab3ece6cb594ab3b47899280f8fc3e Mon Sep 17 00:00:00 2001 +From ea89b82b5db86c42cb69b82bba45f0b8b3100f09 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 19 Feb 2019 22:06:59 +0000 -Subject: [PATCH 0212/1148] PCI: brcmstb: Add dma-range mapping for inbound +Subject: [PATCH 0210/1209] PCI: brcmstb: Add dma-range mapping for inbound traffic The Broadcom STB PCIe host controller is intimately related to the @@ -320930,10 +320820,10 @@ index babef9191e88..27bcf83c99d7 100644 2.18.4 -From 3b7c58b6f301daa9f9f957f98baf735f0fb7c0f4 Mon Sep 17 00:00:00 2001 +From b4e99ed662394f4cb051b4d317482c666a24a3ff Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 19 Feb 2019 22:06:59 +0000 -Subject: [PATCH 0213/1148] PCI: brcmstb: Add MSI capability +Subject: [PATCH 0211/1209] PCI: brcmstb: Add MSI capability This commit adds MSI to the Broadcom STB PCIe host controller. It does not add MSIX since that functionality is not in the HW. The MSI @@ -321479,10 +321369,10 @@ index 27bcf83c99d7..b028d4be81a2 100644 2.18.4 -From 8ea51b34e6f34832fc5bd854bf36a18ca242a488 Mon Sep 17 00:00:00 2001 +From a0ea32a571b59a0c37f26e6f9cd734c70f33cd75 Mon Sep 17 00:00:00 2001 From: Jim Quinlan Date: Mon, 15 Jan 2018 18:28:39 -0500 -Subject: [PATCH 0214/1148] dt-bindings: pci: Add DT docs for Brcmstb PCIe +Subject: [PATCH 0212/1209] dt-bindings: pci: Add DT docs for Brcmstb PCIe device The DT bindings description of the Brcmstb PCIe device is described. This @@ -321564,10 +321454,10 @@ index 000000000000..a1a9ad5e70ca 2.18.4 -From c8ed0765e4d43ac395c04cfed17486c7aeedcb16 Mon Sep 17 00:00:00 2001 +From 6cf7bd7e81fccfca106dc538a509f9c90f7fa403 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 19 Feb 2019 22:06:59 +0000 -Subject: [PATCH 0215/1148] pcie-brcmstb: Changes for BCM2711 +Subject: [PATCH 0213/1209] pcie-brcmstb: Changes for BCM2711 The initial brcmstb PCIe driver - originally taken from the V3(?) patch set - has been modified significantly for the BCM2711. @@ -323013,10 +322903,10 @@ index 000000000000..254783d1065f 2.18.4 -From c4f453f209a52a0f5a4c2cfac416c90dc27000d2 Mon Sep 17 00:00:00 2001 +From 3e32e29dba78d3b182918d76ecadd06fe2746d59 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 29 May 2019 15:47:42 +0100 -Subject: [PATCH 0216/1148] arm: bcm2835: DMA can only address 1GB +Subject: [PATCH 0214/1209] arm: bcm2835: DMA can only address 1GB The legacy peripherals can only address the first gigabyte of RAM, so ensure that DMA allocations are restricted to that region. @@ -323044,10 +322934,10 @@ index 9bd9842da59f..7d59a9364175 100644 2.18.4 -From 5ebe017112dbc581fe66d38c8be086ce3ad32705 Mon Sep 17 00:00:00 2001 +From caed2b0cec91e29ad017eb7be94e2105725476fd Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 28 Sep 2018 16:24:05 +0100 -Subject: [PATCH 0217/1148] mmc: sdhci: Mask "spurious" interrupts +Subject: [PATCH 0215/1209] mmc: sdhci: Mask "spurious" interrupts Add a filter for "spurious" Transfer Complete interrupts, attempting to make it as specific as possible: @@ -323061,10 +322951,10 @@ Signed-off-by: Phil Elwell 1 file changed, 4 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c -index 136f9737713d..07af68d5afa0 100644 +index a1aeb2e10564..c140c8dfd56e 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c -@@ -3104,6 +3104,10 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) +@@ -3106,6 +3106,10 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) result = IRQ_WAKE_THREAD; } @@ -323079,10 +322969,10 @@ index 136f9737713d..07af68d5afa0 100644 2.18.4 -From 98a764f3c001203361df96949f189b01968200cc Mon Sep 17 00:00:00 2001 +From ed6d2eb637667a9af8e1dfab13e96272b3444821 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sat, 4 May 2019 17:06:15 +0200 -Subject: [PATCH 0218/1148] hwrng: iproc-rng200: Add BCM2838 support +Subject: [PATCH 0216/1209] hwrng: iproc-rng200: Add BCM2838 support The HWRNG on the BCM2838 is compatible to iproc-rng200, so add the support to this driver instead of bcm2835-rng. @@ -323245,10 +323135,10 @@ index 92be1c0ab99f..f971a4cb8951 100644 2.18.4 -From ee68a4b1efdff08cee5710950268139c9fcc91b8 Mon Sep 17 00:00:00 2001 +From cd8213501752d4d3f665679fab06e7277277cc23 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sat, 18 May 2019 12:26:11 +0200 -Subject: [PATCH 0219/1148] thermal: brcmstb_thermal: Add BCM2838 support +Subject: [PATCH 0217/1209] thermal: brcmstb_thermal: Add BCM2838 support The BCM2838 has an AVS TMON hardware block. This adds the necessary support to the brcmstb_thermal driver ( no trip handling ). @@ -323405,10 +323295,10 @@ index 680f1a070606..7a7c6ad7b8a0 100644 2.18.4 -From 55843f68c7b4a44668d5afebaaaed2b2c43d1b86 Mon Sep 17 00:00:00 2001 +From 2bfd5e47576a6e58b51c6297dcdb43a712bcc369 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 1 Nov 2018 17:31:37 +0000 -Subject: [PATCH 0220/1148] vchiq: Add 36-bit address support +Subject: [PATCH 0218/1209] vchiq: Add 36-bit address support Conditional on a new compatible string, change the pagelist encoding such that the top 24 bits are the pfn, leaving 8 bits for run length @@ -323611,10 +323501,10 @@ index b424323e9613..5448918f0f36 100644 2.18.4 -From fb33af8ea86bf92db4ee2e1938a9d983e3837dcd Mon Sep 17 00:00:00 2001 +From 54c9d9e87c1ff306ec290a004db8bccfb473145c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 30 Apr 2019 19:15:30 +0100 -Subject: [PATCH 0221/1148] bcm2835-pcm.c: Support multichannel audio +Subject: [PATCH 0219/1209] bcm2835-pcm.c: Support multichannel audio --- .../vc04_services/bcm2835-audio/bcm2835-pcm.c | 17 +++++++++-------- @@ -323663,10 +323553,10 @@ index 826016c3431a..e4603ba742e4 100644 2.18.4 -From 9b356398e60e795a7c4a34fcf767adc603d6435b Mon Sep 17 00:00:00 2001 +From be2d5716ca8e50b33c714636f6ffe81753e93932 Mon Sep 17 00:00:00 2001 From: Jonathan Bell Date: Wed, 12 Sep 2018 14:44:53 +0100 -Subject: [PATCH 0222/1148] bcmgenet: constrain max DMA burst length +Subject: [PATCH 0220/1209] bcmgenet: constrain max DMA burst length --- drivers/net/ethernet/broadcom/genet/bcmgenet.h | 2 +- @@ -323689,10 +323579,10 @@ index 5b7c2f9241d0..e59f53c582ca 100644 2.18.4 -From ee9a0aed388b0a9090234f8985d449697f164805 Mon Sep 17 00:00:00 2001 +From 77d8e9faca55a8d66d6673c24404de2da1709cef Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 27 Mar 2019 13:45:46 +0000 -Subject: [PATCH 0223/1148] bcmgenet: Better coalescing parameter defaults +Subject: [PATCH 0221/1209] bcmgenet: Better coalescing parameter defaults Set defaults for TX and RX packet coalescing to be equivalent to: @@ -323738,10 +323628,10 @@ index 03f82786c0b9..88315e542214 100644 2.18.4 -From ea4bbd1c60bffc4074fc380622f1817c2421ea03 Mon Sep 17 00:00:00 2001 +From 5d351c76e5af692e48f5c4f252f35036dce1c146 Mon Sep 17 00:00:00 2001 From: Jonathan Bell Date: Tue, 14 May 2019 17:17:59 +0100 -Subject: [PATCH 0224/1148] net: genet: enable link energy detect powerdown for +Subject: [PATCH 0222/1209] net: genet: enable link energy detect powerdown for external PHYs There are several warts surrounding bcmgenet_mii_probe() as this @@ -323775,10 +323665,10 @@ index dbe18cdf6c1b..3ba733295718 100644 2.18.4 -From 10cbedbdde169aaf628e04d8fda3fb3d0cf4f0ab Mon Sep 17 00:00:00 2001 +From 445de58860cfb6c88f4c37beed1ab0f15e439091 Mon Sep 17 00:00:00 2001 From: Jonathan Bell Date: Tue, 14 May 2019 17:00:41 +0100 -Subject: [PATCH 0225/1148] phy: broadcom: split out the BCM54213PE from the +Subject: [PATCH 0223/1209] phy: broadcom: split out the BCM54213PE from the BCM54210E IDs The last nibble is a revision ID, and the 54213pe is a later rev @@ -323853,10 +323743,10 @@ index 6db2d9a6e503..bfb37218f435 100644 2.18.4 -From 49cc07e43893deb932615e78fb6c04e21feb3f09 Mon Sep 17 00:00:00 2001 +From 6b214f42cd1c3966aed54162bb2c13afb3a9e32d Mon Sep 17 00:00:00 2001 From: Jonathan Bell Date: Fri, 17 May 2019 13:31:21 +0100 -Subject: [PATCH 0226/1148] phy: bcm54213pe: configure the LED outputs to be +Subject: [PATCH 0224/1209] phy: bcm54213pe: configure the LED outputs to be more user-friendly The default state was both LEDs indicating link speed. @@ -323925,10 +323815,10 @@ index bfb37218f435..d7ebafbb3221 100644 2.18.4 -From 12bfb9627a3679d41d44e9b1c0585aeb6a188274 Mon Sep 17 00:00:00 2001 +From 1230c0264a4b7a604a93b10217b3977d038b42e8 Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Fri, 22 Mar 2019 09:47:14 +0000 -Subject: [PATCH 0227/1148] usb: xhci: Disable the XHCI 5 second timeout +Subject: [PATCH 0225/1209] usb: xhci: Disable the XHCI 5 second timeout If the VL805 EEPROM has not been programmed then boot will hang for five seconds. The timeout seems to be arbitrary and is an unecessary @@ -323942,7 +323832,7 @@ on the first boot. 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c -index bad154f446f8..0c8d87cada30 100644 +index 7123ab44671b..1754f9e6248f 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -196,8 +196,9 @@ int xhci_reset(struct xhci_hcd *xhci) @@ -323960,10 +323850,10 @@ index bad154f446f8..0c8d87cada30 100644 2.18.4 -From 0ff86655375c32bec62c2b7555ce6ebc383724ee Mon Sep 17 00:00:00 2001 +From 83f6b838494c355901d8039858b181ec7b883a67 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 May 2019 15:08:30 +0100 -Subject: [PATCH 0228/1148] usb: xhci: Show that the VIA VL805 supports LPM +Subject: [PATCH 0226/1209] usb: xhci: Show that the VIA VL805 supports LPM Signed-off-by: Phil Elwell --- @@ -323971,10 +323861,10 @@ Signed-off-by: Phil Elwell 1 file changed, 4 insertions(+) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c -index bbd616324faa..24003b1fcd26 100644 +index 3c90c14390d6..373319401726 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -247,6 +247,10 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) +@@ -252,6 +252,10 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) pdev->device == 0x3432) xhci->quirks |= XHCI_BROKEN_STREAMS; @@ -323989,10 +323879,10 @@ index bbd616324faa..24003b1fcd26 100644 2.18.4 -From db59992dc3ecccd7f2856a2517360d797dd210f2 Mon Sep 17 00:00:00 2001 +From 84caa01660ffc27065acbd70cc66452285ef1371 Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Mon, 13 May 2019 11:05:27 +0000 -Subject: [PATCH 0229/1148] spi: bcm2835: enable shared interrupt support +Subject: [PATCH 0227/1209] spi: bcm2835: enable shared interrupt support Add shared interrupt support for this driver. @@ -324002,7 +323892,7 @@ Signed-off-by: Martin Sperl 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c -index e5c5146e1d95..c2e7a2dbbcc7 100644 +index b5efa2236b61..7ac3563f458b 100644 --- a/drivers/spi/spi-bcm2835.c +++ b/drivers/spi/spi-bcm2835.c @@ -379,6 +379,10 @@ static irqreturn_t bcm2835_spi_interrupt(int irq, void *dev_id) @@ -324016,7 +323906,7 @@ index e5c5146e1d95..c2e7a2dbbcc7 100644 /* Read as many bytes as possible from FIFO */ bcm2835_rd_fifo(bs); /* Write as many bytes as possible to FIFO */ -@@ -1335,7 +1339,8 @@ static int bcm2835_spi_probe(struct platform_device *pdev) +@@ -1355,7 +1359,8 @@ static int bcm2835_spi_probe(struct platform_device *pdev) bcm2835_wr(bs, BCM2835_SPI_CS, BCM2835_SPI_CS_CLEAR_RX | BCM2835_SPI_CS_CLEAR_TX); @@ -324030,10 +323920,10 @@ index e5c5146e1d95..c2e7a2dbbcc7 100644 2.18.4 -From 100582929b995671d129d99fd60600905ce1888e Mon Sep 17 00:00:00 2001 +From 8dc66b75235d98a47462d96f4c9884d732df9e88 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 23 Jan 2019 16:11:50 +0000 -Subject: [PATCH 0230/1148] clk-bcm2835: Don't wait for pllh lock +Subject: [PATCH 0228/1209] clk-bcm2835: Don't wait for pllh lock Signed-off-by: Phil Elwell --- @@ -324041,7 +323931,7 @@ Signed-off-by: Phil Elwell 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c -index 74f30f1ed798..d68892b536c6 100644 +index d4bf9e376318..b83a963eceab 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c @@ -643,15 +643,17 @@ static int bcm2835_pll_on(struct clk_hw *hw) @@ -324074,10 +323964,10 @@ index 74f30f1ed798..d68892b536c6 100644 2.18.4 -From f3bfa6b076deab43e7446634f7749d81b570ea8c Mon Sep 17 00:00:00 2001 +From 88753011657f355c981793718fced05ab61960b7 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 11 Jan 2019 17:31:07 -0800 -Subject: [PATCH 0231/1148] soc: bcm: bcm2835-pm: Add support for 2711. +Subject: [PATCH 0229/1209] soc: bcm: bcm2835-pm: Add support for 2711. Without the actual power management part any more, there's a lot less to set up for V3D. We just need to clear the RSTN field for the power @@ -324186,10 +324076,10 @@ index ed37dc40e82a..b2d157091e12 100644 2.18.4 -From ddb85300cecd52e7842fad1d5bbf5fb45a9853a1 Mon Sep 17 00:00:00 2001 +From 44068158b609458680bf6fbddace6204175eb3f1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 4 Sep 2018 11:50:25 +0100 -Subject: [PATCH 0232/1148] config: Permit LPAE and PCIE_BRCMSTB on BCM2835 +Subject: [PATCH 0230/1209] config: Permit LPAE and PCIE_BRCMSTB on BCM2835 --- arch/arm/mach-bcm/Kconfig | 4 ++++ @@ -324238,10 +324128,10 @@ index e57bbd0ec9a7..650b3b56153c 100644 2.18.4 -From 04b43ec09f42b914b57cc121d27986bfaac2f0f6 Mon Sep 17 00:00:00 2001 +From e1ca722fba38f670c6bfe4a700e1c9afe7d8be45 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 2 May 2019 15:11:05 -0700 -Subject: [PATCH 0233/1148] clk: bcm2835: Add support for setting leaf clock +Subject: [PATCH 0231/1209] clk: bcm2835: Add support for setting leaf clock rates while running. As long as you wait for !BUSY, you can do glitch-free updates of clock @@ -324253,7 +324143,7 @@ Signed-off-by: Eric Anholt 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c -index d68892b536c6..aded6d01d941 100644 +index b83a963eceab..47ead0f239d6 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c @@ -1114,15 +1114,19 @@ static int bcm2835_clock_set_rate(struct clk_hw *hw, @@ -324284,7 +324174,7 @@ index d68892b536c6..aded6d01d941 100644 ctl |= (div & CM_DIV_FRAC_MASK) ? CM_FRAC : 0; cprman_write(cprman, data->ctl_reg, ctl); -@@ -1492,7 +1496,7 @@ static struct clk_hw *bcm2835_register_clock(struct bcm2835_cprman *cprman, +@@ -1494,7 +1498,7 @@ static struct clk_hw *bcm2835_register_clock(struct bcm2835_cprman *cprman, init.ops = &bcm2835_vpu_clock_clk_ops; } else { init.ops = &bcm2835_clock_clk_ops; @@ -324297,10 +324187,10 @@ index d68892b536c6..aded6d01d941 100644 2.18.4 -From 9a80a670f34d2937d15638939e91fd8871c3c582 Mon Sep 17 00:00:00 2001 +From 0f7c8d45d0ae4fced00303e7c5d9580336a022d2 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 2 May 2019 15:24:04 -0700 -Subject: [PATCH 0234/1148] clk: bcm2835: Allow reparenting leaf clocks while +Subject: [PATCH 0232/1209] clk: bcm2835: Allow reparenting leaf clocks while they're running. This falls under the same "we can reprogram glitch-free as long as we @@ -324313,7 +324203,7 @@ Signed-off-by: Eric Anholt 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c -index aded6d01d941..43dd58f5468c 100644 +index 47ead0f239d6..079748e68686 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c @@ -1103,8 +1103,10 @@ static int bcm2835_clock_on(struct clk_hw *hw) @@ -324362,7 +324252,7 @@ index aded6d01d941..43dd58f5468c 100644 .determine_rate = bcm2835_clock_determine_rate, .set_parent = bcm2835_clock_set_parent, .get_parent = bcm2835_clock_get_parent, -@@ -1496,7 +1510,6 @@ static struct clk_hw *bcm2835_register_clock(struct bcm2835_cprman *cprman, +@@ -1498,7 +1512,6 @@ static struct clk_hw *bcm2835_register_clock(struct bcm2835_cprman *cprman, init.ops = &bcm2835_vpu_clock_clk_ops; } else { init.ops = &bcm2835_clock_clk_ops; @@ -324374,10 +324264,10 @@ index aded6d01d941..43dd58f5468c 100644 2.18.4 -From 181709952fbd4cac974f49f0bedb085104f4057a Mon Sep 17 00:00:00 2001 +From af6a42b774e2ae348df08624f4266d90fbecdaba Mon Sep 17 00:00:00 2001 From: Jonathan Bell Date: Tue, 11 Jun 2019 10:55:00 +0100 -Subject: [PATCH 0235/1148] usb: add plumbing for updating interrupt endpoint +Subject: [PATCH 0233/1209] usb: add plumbing for updating interrupt endpoint interval state xHCI caches device and endpoint data after the interface is configured, @@ -324490,10 +324380,10 @@ index 712b2a603645..879b59e4f013 100644 2.18.4 -From 1de13aa6a53bdbb3cef5cc4fed59f5296903940c Mon Sep 17 00:00:00 2001 +From 58093bd67faf7311a86655f303373d909e95979a Mon Sep 17 00:00:00 2001 From: Jonathan Bell Date: Tue, 11 Jun 2019 11:33:39 +0100 -Subject: [PATCH 0236/1148] xhci: implement xhci_fixup_endpoint for interval +Subject: [PATCH 0234/1209] xhci: implement xhci_fixup_endpoint for interval adjustments Must be called in a non-atomic context, after the endpoint @@ -324506,10 +324396,10 @@ Signed-off-by: Jonathan Bell 1 file changed, 98 insertions(+) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c -index 0c8d87cada30..fad5206fd307 100644 +index 1754f9e6248f..e9f02fc28a26 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -1452,6 +1452,103 @@ static int xhci_check_maxpacket(struct xhci_hcd *xhci, unsigned int slot_id, +@@ -1455,6 +1455,103 @@ static int xhci_check_maxpacket(struct xhci_hcd *xhci, unsigned int slot_id, return ret; } @@ -324613,7 +324503,7 @@ index 0c8d87cada30..fad5206fd307 100644 /* * non-error returns are a promise to giveback() the urb later * we drop ownership so next owner (or urb unlink) can get it -@@ -5335,6 +5432,7 @@ static const struct hc_driver xhci_hc_driver = { +@@ -5337,6 +5434,7 @@ static const struct hc_driver xhci_hc_driver = { .endpoint_reset = xhci_endpoint_reset, .check_bandwidth = xhci_check_bandwidth, .reset_bandwidth = xhci_reset_bandwidth, @@ -324625,10 +324515,10 @@ index 0c8d87cada30..fad5206fd307 100644 2.18.4 -From ecd4b70742ca98897323fc275bfb89b8f6b7b40e Mon Sep 17 00:00:00 2001 +From f2e07b9ae5915463840aa443f4f11008a9112edb Mon Sep 17 00:00:00 2001 From: Jonathan Bell Date: Tue, 11 Jun 2019 11:42:03 +0100 -Subject: [PATCH 0237/1148] usbhid: call usb_fixup_endpoint after mangling +Subject: [PATCH 0235/1209] usbhid: call usb_fixup_endpoint after mangling intervals Lets the mousepoll override mechanism work with xhci. @@ -324654,10 +324544,10 @@ index ce8ef6930795..4b73a15fdfae 100644 2.18.4 -From f0460332fd7e206be26274f3065fdc0773023aa2 Mon Sep 17 00:00:00 2001 +From de81e27ba1c2b306a4ba282788ad1342762661e0 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 11 Jun 2019 17:38:28 +0100 -Subject: [PATCH 0238/1148] arm: bcm2835: Add bcm2838 compatible string. +Subject: [PATCH 0236/1209] arm: bcm2835: Add bcm2838 compatible string. Signed-off-by: Phil Elwell --- @@ -324680,10 +324570,10 @@ index 7d59a9364175..282a023027fc 100644 2.18.4 -From 8f2175573b0d841c6f89836cabc6b6dfd4696789 Mon Sep 17 00:00:00 2001 +From 08c3780e6c953400ea195a2f82064d034fb738e2 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 4 Mar 2019 11:59:34 -0800 -Subject: [PATCH 0239/1148] drm/vc4: Fix oops at boot with firmwarekms on 4.19. +Subject: [PATCH 0237/1209] drm/vc4: Fix oops at boot with firmwarekms on 4.19. Signed-off-by: Eric Anholt --- @@ -324708,10 +324598,10 @@ index 57124fe94247..92aafec3d57a 100644 2.18.4 -From 620992ab325e0d35e243e61aa0028f364280e5fb Mon Sep 17 00:00:00 2001 +From 765ecbfeb8669f6141045f8c5b328256542f05cd Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 4 Oct 2018 17:22:43 -0700 -Subject: [PATCH 0240/1148] drm/v3d: Add support for 2711. +Subject: [PATCH 0238/1209] drm/v3d: Add support for 2711. Signed-off-by: Eric Anholt --- @@ -324734,10 +324624,10 @@ index 3506ae2723ae..cb60018f799e 100644 2.18.4 -From 89b886047bea42d3726199793d877bb8deabce06 Mon Sep 17 00:00:00 2001 +From d772a3e8d190e44fe09392c724e41d7e7a9e1be1 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 14 Jan 2019 12:35:43 -0800 -Subject: [PATCH 0241/1148] drm/v3d: Skip MMU flush if the device is currently +Subject: [PATCH 0239/1209] drm/v3d: Skip MMU flush if the device is currently off. If it's off, we know it will be reset on poweron, so the MMU won't @@ -324792,10 +324682,10 @@ index 395e81d97163..6cc67cab320e 100644 2.18.4 -From 3abb85260a965745072276a3e8cefcdb6de89959 Mon Sep 17 00:00:00 2001 +From af90dbd9919c2bb31568f3ef792598c86669fe60 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 14 Jan 2019 14:47:57 -0800 -Subject: [PATCH 0242/1148] drm/v3d: Hook up the runtime PM ops. +Subject: [PATCH 0240/1209] drm/v3d: Hook up the runtime PM ops. In translating the runtime PM code from vc4, I missed the ".pm" assignment to actually connect them up. Fixes missing MMU setup if @@ -324832,10 +324722,10 @@ index cb60018f799e..d225152e7e36 100644 2.18.4 -From 216d7e18e710e18fc94a6582a2bf5ebbb17d8d3d Mon Sep 17 00:00:00 2001 +From dfdb36beda90fcf73a4c8c4d52205df16004879b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 28 Mar 2019 11:58:51 -0700 -Subject: [PATCH 0243/1148] drm/vc4: Fix synchronization firmwarekms against GL +Subject: [PATCH 0241/1209] drm/vc4: Fix synchronization firmwarekms against GL rendering. We would present the framebuffer immediately without waiting for @@ -324882,10 +324772,10 @@ index 85e273665836..ee0e6afa211b 100644 2.18.4 -From ed5c4d694a09282bfd88bb845bee0e62466f2a79 Mon Sep 17 00:00:00 2001 +From 0f854b219c194469bf98f3ffb97c8a6c7fe1c206 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 18 Mar 2019 16:38:32 -0700 -Subject: [PATCH 0244/1148] drm/vc4: Expose the format modifiers for firmware +Subject: [PATCH 0242/1209] drm/vc4: Expose the format modifiers for firmware kms. This should technically not expose VC4_T_TILED on pi4. However, if we @@ -324968,10 +324858,10 @@ index ee0e6afa211b..93bf71f98313 100644 2.18.4 -From 25e47644bd77e4f6c7e32530c321a59107356c76 Mon Sep 17 00:00:00 2001 +From 270f20f96a1eef62451ad4e26aa32f08467873be Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 2 Apr 2019 13:29:00 -0700 -Subject: [PATCH 0245/1148] drm/vc4: Fix vblank timestamping for firmwarekms. +Subject: [PATCH 0243/1209] drm/vc4: Fix vblank timestamping for firmwarekms. The core doesn't expect a false return from the scanoutpos function in normal usage, so we were doing the precise vblank timestamping path @@ -325029,10 +324919,10 @@ index 93bf71f98313..eb5eb67b70f5 100644 2.18.4 -From d2e2aa884ba8a61873a8c738c66165d985ecb896 Mon Sep 17 00:00:00 2001 +From 654f1f6f4ab0cb3e0287fdd4e3cce17f202fb9c9 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 26 Mar 2019 14:43:06 +0000 -Subject: [PATCH 0246/1148] gpu: vc4-fkms: Switch to the newer mailbox frame +Subject: [PATCH 0244/1209] gpu: vc4-fkms: Switch to the newer mailbox frame buffer API. The old mailbox FB API was ideally deprecated but still used by @@ -325214,10 +325104,10 @@ index eb5eb67b70f5..512036c82db0 100644 2.18.4 -From 1d10478808a79333a734d579ad6dbc9cb44b0735 Mon Sep 17 00:00:00 2001 +From fdbe7eed4c3d63b51e830260eee0c06810e146a1 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 27 Mar 2019 17:45:01 +0000 -Subject: [PATCH 0247/1148] drm: vc4: Add an overlay plane to vc4-firmware-kms +Subject: [PATCH 0245/1209] drm: vc4: Add an overlay plane to vc4-firmware-kms This uses a new API that is exposed via the mailbox service to stick an element straight on the screen using DispmanX. @@ -326080,10 +325970,10 @@ index 9c6027fc25da..f0c15eefa3aa 100644 2.18.4 -From b6e056f07b51ccfe407d74825d040ce49979a2c2 Mon Sep 17 00:00:00 2001 +From ba36794a4b0840ef25d77965d89de467c02f40d1 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 3 Apr 2019 15:20:05 +0100 -Subject: [PATCH 0248/1148] drm: vc4: Increase max screen size to 4096x4096. +Subject: [PATCH 0246/1209] drm: vc4: Increase max screen size to 4096x4096. We now should support 4k screens, therefore this limit needs to be increased. @@ -326112,10 +326002,10 @@ index cd3720969442..9e20e1ac77f8 100644 2.18.4 -From ab369bd2201909373edf333af8c7f2f2865110e7 Mon Sep 17 00:00:00 2001 +From 9cbe29949d70bfb60ce82074578faf84a9d8e156 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 3 Apr 2019 17:15:45 +0100 -Subject: [PATCH 0249/1148] drm: vc4: Add support for multiple displays to fkms +Subject: [PATCH 0247/1209] drm: vc4: Add support for multiple displays to fkms There is a slightly nasty hack in that all crtcs share the same SMI interrupt from the firmware. This seems to currently @@ -326400,10 +326290,10 @@ index 54bb885a86dc..d8e278a0b789 100644 2.18.4 -From e4ae8731f70ab0d39814859f8bd8341f70f0f885 Mon Sep 17 00:00:00 2001 +From c2bea97f8f2c13c669c68601ac907b332333be1e Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 5 Apr 2019 17:21:56 +0100 -Subject: [PATCH 0250/1148] drm: vc4: Fix build warning +Subject: [PATCH 0248/1209] drm: vc4: Fix build warning Signed-off-by: Dave Stevenson --- @@ -326427,10 +326317,10 @@ index d8e278a0b789..b952f27e4168 100644 2.18.4 -From 43d9b23d76e2c064bb67163dedb9eeabb7fbc1f5 Mon Sep 17 00:00:00 2001 +From f61c8044e496fa0d4fa856d8193129bdac4ca7fc Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 5 Apr 2019 17:23:15 +0100 -Subject: [PATCH 0251/1148] drm: vc4: Select display to blank during +Subject: [PATCH 0249/1209] drm: vc4: Select display to blank during initialisation Otherwise the rainbow splash screen remained in the display list @@ -326487,10 +326377,10 @@ index b952f27e4168..099124575435 100644 2.18.4 -From beaa5797d0b48d4cc22a3223d568c494a979e9da Mon Sep 17 00:00:00 2001 +From 34771057736abdc82e9045b226e5c9ae3f6d0e1c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 5 Apr 2019 17:24:20 +0100 -Subject: [PATCH 0252/1148] drm: vc4: Remove now unused structure. +Subject: [PATCH 0250/1209] drm: vc4: Remove now unused structure. Cleaning up structure that was unused after fbb59a2 drm: vc4: Add an overlay plane to vc4-firmware-kms @@ -326534,10 +326424,10 @@ index 099124575435..1155680fdfc6 100644 2.18.4 -From 645e8c8fd8284cfab1ee15d5a999b9356e3ad901 Mon Sep 17 00:00:00 2001 +From 8d73524493018213d1fafef3a86e19e711b59ebe Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 9 Apr 2019 12:37:28 +0100 -Subject: [PATCH 0253/1148] drm: vc4: Query the display ID for each display in +Subject: [PATCH 0251/1209] drm: vc4: Query the display ID for each display in FKMS Replace the hard coded list of display IDs for a mailbox call @@ -326600,10 +326490,10 @@ index f0c15eefa3aa..10f5dc53fd34 100644 2.18.4 -From 73c65752dd5b897dbdf001ceea134a3bfea410f7 Mon Sep 17 00:00:00 2001 +From 67a3388cd18715dc3991edb9cdb2239bf6eb4ef5 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 9 Apr 2019 14:00:07 +0100 -Subject: [PATCH 0254/1148] drm/vc4: Set the display number when querying the +Subject: [PATCH 0252/1209] drm/vc4: Set the display number when querying the display resolution Without this the two displays got set to the same resolution. @@ -326709,10 +326599,10 @@ index 38b09f5ad2b2..b15c001621d8 100644 2.18.4 -From 2ad4776811f766eb135e74ae7cf39aa7e46c8d81 Mon Sep 17 00:00:00 2001 +From 9758114a82af988f37c909c7f01ac43697091d01 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 9 Apr 2019 18:14:44 +0100 -Subject: [PATCH 0255/1148] drm: vc4: Need to call drm_crtc_vblank_[on|off] +Subject: [PATCH 0253/1209] drm: vc4: Need to call drm_crtc_vblank_[on|off] from vc4_crtc_[en|dis]able vblank needs to be enabled and disabled by the driver to avoid the @@ -326769,10 +326659,10 @@ index b15c001621d8..b86c9d98df4d 100644 2.18.4 -From 4eb043707e82a206b68585b3218b1c936a1065ba Mon Sep 17 00:00:00 2001 +From 861793b685b828fb11d5ca33ed7b50a092ea8682 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 9 Apr 2019 17:19:51 +0100 -Subject: [PATCH 0256/1148] drm: vc4: Add support for H & V flips on each plane +Subject: [PATCH 0254/1209] drm: vc4: Add support for H & V flips on each plane for FKMS They are near zero cost options for the HVS, therefore they @@ -326861,10 +326751,10 @@ index b86c9d98df4d..bb98a8a71555 100644 2.18.4 -From 34742381f2782525f8fe191912967df7872cb7e9 Mon Sep 17 00:00:00 2001 +From 6b0ce4d44cfb3d257aac8a85a6ea33439f7704ad Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 10 Apr 2019 17:35:05 +0100 -Subject: [PATCH 0257/1148] drm: vc4: Remove unused vc4_fkms_cancel_page_flip +Subject: [PATCH 0255/1209] drm: vc4: Remove unused vc4_fkms_cancel_page_flip function "32a3dbe drm/vc4: Nuke preclose hook" removed vc4_cancel_page_flip, @@ -326925,10 +326815,10 @@ index bb98a8a71555..fe966ebb045a 100644 2.18.4 -From d591f41c0b630af9dc73d96526889acb9d973be8 Mon Sep 17 00:00:00 2001 +From 17490ae8934bf82f142a553b5d681884c973cc19 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 10 Apr 2019 17:42:37 +0100 -Subject: [PATCH 0258/1148] drm: vc4: Iterate over all planes in +Subject: [PATCH 0256/1209] drm: vc4: Iterate over all planes in vc4_crtc_[dis|en]able Fixes a FIXME where the overlay plane wouldn't be restored. @@ -326988,10 +326878,10 @@ index fe966ebb045a..81afd7782f65 100644 2.18.4 -From 17ef872cba95b4995297db531ac6d33835eec6db Mon Sep 17 00:00:00 2001 +From 36fcc857c0135ccc5eb1bf17774fceaebd5cb4ab Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 10 Apr 2019 17:43:57 +0100 -Subject: [PATCH 0259/1148] drm: vc4: Bring fkms into line with kms in blocking +Subject: [PATCH 0257/1209] drm: vc4: Bring fkms into line with kms in blocking doublescan modes Implement vc4_crtc_mode_valid so that it blocks doublescan modes @@ -327041,10 +326931,10 @@ index 81afd7782f65..97ab24d0cbde 100644 2.18.4 -From 6be1fb3c270e7ece179aea8f5d6f821b688fe2d5 Mon Sep 17 00:00:00 2001 +From 798a12df879d2d30a92e16076d9c9b93a9e999b1 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 29 Apr 2019 18:45:00 +0100 -Subject: [PATCH 0260/1148] drm: vc4: Increase max_width/height to 7680. +Subject: [PATCH 0258/1209] drm: vc4: Increase max_width/height to 7680. There are some limits still being investigated that stop us going up to 8192, but 7680 is sufficient for dual 4k @@ -327074,10 +326964,10 @@ index 9e20e1ac77f8..8b4bec771a14 100644 2.18.4 -From 1067af97c4cbaf1832e4d0a77669af9edf039f0b Mon Sep 17 00:00:00 2001 +From ca4df4441743da89266d86fdf7c6c598902b912d Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 9 Apr 2019 18:23:41 +0100 -Subject: [PATCH 0261/1148] drm: vc4: FKMS reads the EDID from fw, and supports +Subject: [PATCH 0259/1209] drm: vc4: FKMS reads the EDID from fw, and supports mode setting This extends FKMS to read the EDID from the display, and support @@ -327639,10 +327529,10 @@ index 10f5dc53fd34..1a5dd091dfd9 100644 2.18.4 -From 2ffcba6d7f3828d8c24c97bd25ba168b5331fa8d Mon Sep 17 00:00:00 2001 +From 146e42d18fcc35a68147f12c8ac20f00ff8a29b3 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 3 May 2019 13:58:03 +0100 -Subject: [PATCH 0262/1148] drm: vc4-firmware-kms: Remove incorrect overscan +Subject: [PATCH 0260/1209] drm: vc4-firmware-kms: Remove incorrect overscan support. The overscan support was required for the old mailbox API @@ -327700,10 +327590,10 @@ index e4b978ce85ef..71889e0e334a 100644 2.18.4 -From e17181f337462f66a95231b922deef313c8c9e2f Mon Sep 17 00:00:00 2001 +From 96acc03d98d3109ede79e6d4b0fb77f519694a1b Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 7 May 2019 12:13:34 +0100 -Subject: [PATCH 0263/1148] drm: vc4: Log flags in fkms mode set +Subject: [PATCH 0261/1209] drm: vc4: Log flags in fkms mode set The flags contain info such as limited/full range RGB, aspect ratio, and a fwe other useful things. @@ -327737,10 +327627,10 @@ index 71889e0e334a..b18cb9d5e345 100644 2.18.4 -From 5255b2ba5a250650e0c7a943862246ac5044a8c6 Mon Sep 17 00:00:00 2001 +From 497e4a85ca671d37735fe442b2f05295b2a7c422 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 16 May 2019 17:49:42 +0100 -Subject: [PATCH 0264/1148] drm: vc4-firmware-kms: Fix DSI display support +Subject: [PATCH 0262/1209] drm: vc4-firmware-kms: Fix DSI display support The mode was incorrectly listed as interlaced, which was then rejected. @@ -327768,10 +327658,10 @@ index b18cb9d5e345..9fbdcd3538b3 100644 2.18.4 -From d9f4247ee9637e6253a69da224ca46e562a38d3d Mon Sep 17 00:00:00 2001 +From a31281a065c18206a96893e4e3c4d2372636c7ee Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 21 May 2019 11:50:00 +0100 -Subject: [PATCH 0265/1148] drm: vc4: Probe DPI/DSI timings from the firmware +Subject: [PATCH 0263/1209] drm: vc4: Probe DPI/DSI timings from the firmware For DPI and DSI displays query the firmware as to the configuration and add it as the only mode for DRM. @@ -327914,10 +327804,10 @@ index 1a5dd091dfd9..ca1344c957ea 100644 2.18.4 -From 6ff4b5562a2304affbc9ea22d62c51c234657df4 Mon Sep 17 00:00:00 2001 +From f2d839fe9d2f5dd482d8a3f00faedf188d5f3551 Mon Sep 17 00:00:00 2001 From: Jonathan Bell Date: Tue, 28 May 2019 13:56:06 +0100 -Subject: [PATCH 0266/1148] drm: vc4: handle the case where there are no +Subject: [PATCH 0264/1209] drm: vc4: handle the case where there are no available displays It's reasonable for the firmware to return zero as the number of @@ -327987,10 +327877,10 @@ index 0b0a155bc3b5..04b929a6cb0f 100644 2.18.4 -From 7b9565b3fa4a53fcebc7eb429792ed629a9b7ba2 Mon Sep 17 00:00:00 2001 +From 756d868336198322b6f6302e002274792bbdad6d Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 24 May 2019 17:59:01 +0100 -Subject: [PATCH 0267/1148] drm/vc4: Support the VEC in FKMS +Subject: [PATCH 0265/1209] drm/vc4: Support the VEC in FKMS Extends the DPI/DSI support to also report the VEC output which supports interlacing too. @@ -328055,10 +327945,10 @@ index 04b929a6cb0f..f1306752da3d 100644 2.18.4 -From a58456bef4e59995d69b39f7465bfba5e9f7cd16 Mon Sep 17 00:00:00 2001 +From c59e1d54eab652efc436a9b7e628a82d4338b53c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 7 May 2019 15:00:02 +0100 -Subject: [PATCH 0268/1148] drm: vc4: Fixup typo when setting HDMI aspect ratio +Subject: [PATCH 0266/1209] drm: vc4: Fixup typo when setting HDMI aspect ratio Assignment was to the wrong structure. @@ -328100,10 +327990,10 @@ index f1306752da3d..1081878ecfdd 100644 2.18.4 -From 39396eb5564fee138af6cb881ad8d994e9b7978b Mon Sep 17 00:00:00 2001 +From 87262422d2dd8a1d0c7b9942d31ccda24ea514d7 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 29 May 2019 15:44:11 +0100 -Subject: [PATCH 0269/1148] drm/vc4: Correct SAND support for FKMS. +Subject: [PATCH 0267/1209] drm/vc4: Correct SAND support for FKMS. It was accepting NV21 which doesn't map through, but also wasn't advertising the modifier so nothing would know @@ -328146,10 +328036,10 @@ index 1081878ecfdd..3b9dc3e892bb 100644 2.18.4 -From a8373a4c37137c7c2c8c00a3f87eb819fb50cba6 Mon Sep 17 00:00:00 2001 +From 51b470a46b36fb0199ace02690cd330ede6819d2 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 30 May 2019 13:56:15 +0100 -Subject: [PATCH 0270/1148] drm/vc4: fkms to query the VPU for HDMI clock +Subject: [PATCH 0268/1209] drm/vc4: fkms to query the VPU for HDMI clock limits The VPU has configured clocks for 4k (or not) via config.txt, @@ -328291,10 +328181,10 @@ index ca1344c957ea..102c2e5dd2f2 100644 2.18.4 -From ca6a86d92d90e74ec370f8df8ba6a4651021f04a Mon Sep 17 00:00:00 2001 +From d1fa17479aa0e8407bc1be48f309580d42b10364 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 30 May 2019 15:55:15 +0100 -Subject: [PATCH 0271/1148] drm/vc4: Max resolution of 7680 is conditional on +Subject: [PATCH 0269/1209] drm/vc4: Max resolution of 7680 is conditional on being Pi4 The max resolution had been increased from 2048 to 7680 for all @@ -328343,10 +328233,10 @@ index 8b4bec771a14..7e31e2ca726c 100644 2.18.4 -From ed5cefb49161593854d3abea3fa4f1cf6f11f237 Mon Sep 17 00:00:00 2001 +From 2ca417c68ef6928713ae2b47283f30b9b4fb2d52 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 7 Jun 2019 11:31:21 +0100 -Subject: [PATCH 0272/1148] drm/vc4: Fix T-format modifiers in FKMS. +Subject: [PATCH 0270/1209] drm/vc4: Fix T-format modifiers in FKMS. The wrong vc_image formats were being checked for in the switch statement. Correct these. @@ -328377,10 +328267,10 @@ index cb2f24dece9f..339c8768f446 100644 2.18.4 -From 312aab76434eb0d4464a984c31d976f0b26e88a4 Mon Sep 17 00:00:00 2001 +From 070590590ee2b322d02a448f53b0caf36bee3823 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 10 Jun 2019 16:32:51 +0100 -Subject: [PATCH 0273/1148] drm/vc4: Remove 340MHz clock limit from FKMS now +Subject: [PATCH 0271/1209] drm/vc4: Remove 340MHz clock limit from FKMS now scrambling issues resolved Firmware TMDS scrambling is now being correctly configured, so @@ -328412,10 +328302,10 @@ index 339c8768f446..fdbd1d1cf796 100644 2.18.4 -From 829a69e4a380a0bbe62b4eb0e275a46f45d58fd5 Mon Sep 17 00:00:00 2001 +From b4d13d9b1e54f33e4fcfc2bc6f19c8a9504248a4 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 4 Jun 2019 12:14:30 +0100 -Subject: [PATCH 0274/1148] drm: vc4: Add status of which display is updated +Subject: [PATCH 0272/1209] drm: vc4: Add status of which display is updated through vblank Previously multiple displays were slaved off the same SMI @@ -328503,10 +328393,10 @@ index fdbd1d1cf796..8ca9cb202f5e 100644 2.18.4 -From b52699948639fd9c7ca2a79b889e9b9b631d9912 Mon Sep 17 00:00:00 2001 +From dc0b7781e1be0e3614e53dcabac1ef74e1027f0b Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 12 Jun 2019 17:13:21 +0100 -Subject: [PATCH 0275/1148] drm/vc4: In FKMS look at the modifiers correctly +Subject: [PATCH 0273/1209] drm/vc4: In FKMS look at the modifiers correctly for SAND Incorrect masking was used in the switch for the modifier, @@ -328545,10 +328435,10 @@ index 8ca9cb202f5e..4fd2629e430a 100644 2.18.4 -From 74aa1fe5de967537e0da7af97536fd62f12c66eb Mon Sep 17 00:00:00 2001 +From ad52f63aa3f01245b6d68a9dc60883b46370473f Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 18 Jun 2019 21:37:45 +0100 -Subject: [PATCH 0276/1148] drm/vc4: Limit fkms to modes <= 85Hz +Subject: [PATCH 0274/1209] drm/vc4: Limit fkms to modes <= 85Hz Selecting 1080p100 and 120 has very limited gain, but don't want to block VGA85 and similar. @@ -328577,10 +328467,10 @@ index 4fd2629e430a..b97798c82371 100644 2.18.4 -From 85c8a773b32efb522197ed6285ea8548e6607d4f Mon Sep 17 00:00:00 2001 +From 59cb750eea3481f8273178fe2350840c48ffbd25 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 19 Jul 2019 14:29:28 +0100 -Subject: [PATCH 0277/1148] drm/vc4: Ignore HVS unless initialised +Subject: [PATCH 0275/1209] drm/vc4: Ignore HVS unless initialised An upstream commit to report HVS underruns causes VC4 in firmware KMS mode to cross into the HVS side, where it crashes due to a NULL hvs @@ -328628,10 +328518,10 @@ index 7e31e2ca726c..1b921e114c03 100644 2.18.4 -From 2dfd324d2daa06d29e3e65db2352cbadead04dc4 Mon Sep 17 00:00:00 2001 +From 3a33f148792c66695785e1a02311511e07b39e8c Mon Sep 17 00:00:00 2001 From: Chris Miller Date: Wed, 26 Jun 2019 10:40:30 +0100 -Subject: [PATCH 0278/1148] drm: vc4_dsi: Fix DMA channel and memory leak in +Subject: [PATCH 0276/1209] drm: vc4_dsi: Fix DMA channel and memory leak in vc4 (#3012) Signed-off-by: Chris G Miller @@ -328769,10 +328659,10 @@ index c78fa8144776..3448b314d361 100644 2.18.4 -From ed949dd1d59d6f838d6db822b7caddb27981c97a Mon Sep 17 00:00:00 2001 +From 646b28a152df459aa4b4d10310943677b4bd4389 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 24 Jun 2019 02:29:40 +0100 -Subject: [PATCH 0279/1148] drm/vc4: Add support for color encoding on YUV +Subject: [PATCH 0277/1209] drm/vc4: Add support for color encoding on YUV planes Adds signalling for BT601/709/2020, and limited/full range @@ -328888,10 +328778,10 @@ index 669a70fdb891..0bdffe5dd1e9 100644 2.18.4 -From 77366fb0b3b5f0c279410e2fedc42713c0878e55 Mon Sep 17 00:00:00 2001 +From 4ee012d4c88ac86c17ae06e61e577298a8d49805 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 11 Jul 2019 13:13:39 +0100 -Subject: [PATCH 0280/1148] tty: amba-pl011: Make TX optimisation conditional +Subject: [PATCH 0278/1209] tty: amba-pl011: Make TX optimisation conditional pl011_tx_chars takes a "from_irq" parameter to reduce the number of register accesses. When from_irq is true the function assumes that the @@ -328923,7 +328813,7 @@ Signed-off-by: Phil Elwell 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c -index fb728d006503..46ec9073a00b 100644 +index ba2029bf1e63..83676bc79a19 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -270,6 +270,7 @@ struct uart_amba_port { @@ -328934,7 +328824,7 @@ index fb728d006503..46ec9073a00b 100644 #ifdef CONFIG_DMA_ENGINE /* DMA stuff */ bool using_tx_dma; -@@ -813,6 +814,7 @@ __acquires(&uap->port.lock) +@@ -816,6 +817,7 @@ __acquires(&uap->port.lock) if (!uap->using_tx_dma) return; @@ -328942,7 +328832,7 @@ index fb728d006503..46ec9073a00b 100644 dmaengine_terminate_async(uap->dmatx.chan); if (uap->dmatx.queued) { -@@ -939,6 +941,7 @@ static void pl011_dma_rx_chars(struct uart_amba_port *uap, +@@ -942,6 +944,7 @@ static void pl011_dma_rx_chars(struct uart_amba_port *uap, fifotaken = pl011_fifo_to_tty(uap); } @@ -328950,7 +328840,7 @@ index fb728d006503..46ec9073a00b 100644 spin_unlock(&uap->port.lock); dev_vdbg(uap->port.dev, "Took %d chars from DMA buffer and %d chars from the FIFO\n", -@@ -1347,6 +1350,7 @@ __acquires(&uap->port.lock) +@@ -1350,6 +1353,7 @@ __acquires(&uap->port.lock) { pl011_fifo_to_tty(uap); @@ -328958,7 +328848,7 @@ index fb728d006503..46ec9073a00b 100644 spin_unlock(&uap->port.lock); tty_flip_buffer_push(&uap->port.state->port); /* -@@ -1482,6 +1486,7 @@ static irqreturn_t pl011_int(int irq, void *dev_id) +@@ -1485,6 +1489,7 @@ static irqreturn_t pl011_int(int irq, void *dev_id) int handled = 0; spin_lock_irqsave(&uap->port.lock, flags); @@ -328966,7 +328856,7 @@ index fb728d006503..46ec9073a00b 100644 status = pl011_read(uap, REG_RIS) & uap->im; if (status) { do { -@@ -1501,7 +1506,7 @@ static irqreturn_t pl011_int(int irq, void *dev_id) +@@ -1504,7 +1509,7 @@ static irqreturn_t pl011_int(int irq, void *dev_id) UART011_CTSMIS|UART011_RIMIS)) pl011_modem_status(uap); if (status & UART011_TXIS) @@ -328979,10 +328869,10 @@ index fb728d006503..46ec9073a00b 100644 2.18.4 -From 7cb7febf0fd39b42cbbeebab5e4b4b6833f564d2 Mon Sep 17 00:00:00 2001 +From cfa0138597336ebab02e7186f369d7e7365a94d7 Mon Sep 17 00:00:00 2001 From: Jonathan Bell Date: Thu, 11 Jul 2019 17:55:43 +0100 -Subject: [PATCH 0281/1148] xhci: add quirk for host controllers that don't +Subject: [PATCH 0279/1209] xhci: add quirk for host controllers that don't update endpoint DCS Seen on a VLI VL805 PCIe to USB controller. For non-stream endpoints @@ -329003,10 +328893,10 @@ Signed-off-by: Jonathan Bell 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c -index 24003b1fcd26..5238fa29ea97 100644 +index 373319401726..6bf5e13e0325 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -248,8 +248,10 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) +@@ -253,8 +253,10 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) xhci->quirks |= XHCI_BROKEN_STREAMS; if (pdev->vendor == PCI_VENDOR_ID_VIA && @@ -329064,7 +328954,7 @@ index 49894541ea9a..d99e636f3844 100644 /* diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h -index c656b41b57b5..8a202d9b856d 100644 +index b483317bcb17..4ded7bc60d99 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1873,6 +1873,7 @@ struct xhci_hcd { @@ -329072,17 +328962,17 @@ index c656b41b57b5..8a202d9b856d 100644 #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35) +#define XHCI_EP_CTX_BROKEN_DCS BIT_ULL(36) + #define XHCI_DISABLE_SPARSE BIT_ULL(38) unsigned int num_active_eps; - unsigned int limit_active_eps; -- 2.18.4 -From cf2f660242ef60bb1edca73f520592774318f676 Mon Sep 17 00:00:00 2001 +From 6d88da62c0a9edc9fc4dede22032c314705844dc Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 12 Jul 2019 15:38:35 +0100 -Subject: [PATCH 0282/1148] i2c: bcm2835: Set clock-stretch timeout to 35ms +Subject: [PATCH 0280/1209] i2c: bcm2835: Set clock-stretch timeout to 35ms The BCM2835 I2C blocks have a register to set the clock-stretch timeout - how long the device is allowed to hold SCL low - in bus @@ -329132,10 +329022,10 @@ index beb67afa6a3c..9f4f4964a507 100644 2.18.4 -From 551f685720c999848678f6d1dc43805c6c1159bc Mon Sep 17 00:00:00 2001 +From cf278bf8a6df80804208f850a2557f708a495d1d Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Tue, 16 Jul 2019 13:28:22 +0100 -Subject: [PATCH 0283/1148] arm64/mm: Limit the DMA zone for arm64 +Subject: [PATCH 0281/1209] arm64/mm: Limit the DMA zone for arm64 On RaspberryPi, only the first 1Gb can be used for DMA[1]. @@ -329163,10 +329053,10 @@ index 45c00a54909c..1b15656c96db 100644 2.18.4 -From 00c1bc9619c636219209f0318caaeeb296f933f3 Mon Sep 17 00:00:00 2001 +From 4a1efcf5c30da5ba9a6696e6693a90fca436adf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Beh=C3=BAn?= Date: Sat, 3 Aug 2019 14:34:59 +0200 -Subject: [PATCH 0284/1148] staging: vc04_services: fix compiling in separate +Subject: [PATCH 0282/1209] staging: vc04_services: fix compiling in separate directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -329197,10 +329087,10 @@ index 5820ec1f89ec..7fb908d824b2 100644 2.18.4 -From 9f2fa307a45db092be5c1824565d2793d036e096 Mon Sep 17 00:00:00 2001 +From cf5ec96c32a2191f8ae49f8005c62cbfb42882fe Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 4 Apr 2019 13:33:47 +0100 -Subject: [PATCH 0285/1148] bcm2835-dma: Add proper 40-bit DMA support +Subject: [PATCH 0283/1209] bcm2835-dma: Add proper 40-bit DMA support The 40-bit additions are not fully tested, but it should be capable of supporting both 40-bit memcpy on BCM2711 and regular @@ -330153,10 +330043,10 @@ index 782725e3adad..746cfb405ad3 100644 2.18.4 -From 2f5cf9902b838a41642b1587f3ce0a714b435830 Mon Sep 17 00:00:00 2001 +From 646c2bb5664503ce604105798e10d54af7d2a831 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 6 Aug 2019 15:23:14 +0100 -Subject: [PATCH 0286/1148] clk-bcm2835: Avoid null pointer exception +Subject: [PATCH 0284/1209] clk-bcm2835: Avoid null pointer exception clk_desc_array[BCM2835_PLLB] doesn't exist so we dereference null when iterating @@ -330166,10 +330056,10 @@ Signed-off-by: popcornmix 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c -index 43dd58f5468c..57f306e31883 100644 +index 079748e68686..f1d73d83ee16 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -2278,9 +2278,11 @@ static bool bcm2835_clk_is_claimed(const char *name) +@@ -2280,9 +2280,11 @@ static bool bcm2835_clk_is_claimed(const char *name) int i; for (i = 0; i < ARRAY_SIZE(clk_desc_array); i++) { @@ -330188,10 +330078,10 @@ index 43dd58f5468c..57f306e31883 100644 2.18.4 -From b3b0f6fde53077031766862387f343f8bbed33eb Mon Sep 17 00:00:00 2001 +From b6b34c54cd8fb0e250ed890cb2723f1f413e0094 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 7 Aug 2019 17:19:33 +0100 -Subject: [PATCH 0287/1148] pcie-brcmstb: Don't set DMA ops for root complex +Subject: [PATCH 0285/1209] pcie-brcmstb: Don't set DMA ops for root complex A change to arm_get_dma_map_ops has stopped get_dma_ops from working on the root complex, causing an error to be logged. However, there is @@ -330221,10 +330111,10 @@ index 746cfb405ad3..87fd40ae3140 100644 2.18.4 -From d73cae43998ebc71e7377e63302322a45c8050db Mon Sep 17 00:00:00 2001 +From 8f2c7797010255b739fd37158f3a8f85413fef4e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 15 Aug 2019 08:39:08 +0100 -Subject: [PATCH 0288/1148] drm/vc4: Prevent load tracking from breaking FKMS +Subject: [PATCH 0286/1209] drm/vc4: Prevent load tracking from breaking FKMS Firmware KMS uses a mixture of VC4 processing and dedicated code. The load tracking support in VC4 assumes it is dealing with vc4_plane_state @@ -330301,10 +330191,10 @@ index 862e89b8c478..ff96ba01144d 100644 2.18.4 -From a1b55d4a42d62c01372aa8ccd8037afba896f79e Mon Sep 17 00:00:00 2001 +From 1b0e46d5e8e5c483c2f950a1ba75a1bb61a0de4d Mon Sep 17 00:00:00 2001 From: Hui Wang Date: Thu, 22 Aug 2019 23:32:46 +0800 -Subject: [PATCH 0289/1148] rtl8192cu: Let it support to build in the non-src +Subject: [PATCH 0287/1209] rtl8192cu: Let it support to build in the non-src folder If we build the kernel with "-O=$non-src-folder", this driver will @@ -330332,10 +330222,10 @@ index c399011a3e37..ef6156c0f368 100644 2.18.4 -From 50db4e6c40b5efbf502abe0d55ebdb15837c1083 Mon Sep 17 00:00:00 2001 +From 09d000bf875938c76243d8e6a2ddc0ed49fd1a85 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 14 Jan 2019 15:13:17 -0800 -Subject: [PATCH 0290/1148] drm/v3d: HACK: gut runtime pm for now. +Subject: [PATCH 0288/1209] drm/v3d: HACK: gut runtime pm for now. Something is still unstable -- on starting a new glxgears from an idle X11, I get an MMU violation in high addresses. The CTS also failed @@ -330449,10 +330339,10 @@ index d225152e7e36..15a5f92aa7b4 100644 2.18.4 -From b84aebb1232cc88705331bbb684ec1d93a5d3a8c Mon Sep 17 00:00:00 2001 +From 0eb459b1d2c28c16b0965b9a7e5c42a66a134f94 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 2 May 2019 13:22:53 -0700 -Subject: [PATCH 0291/1148] drm/v3d: Clock V3D down when not in use. +Subject: [PATCH 0289/1209] drm/v3d: Clock V3D down when not in use. My various attempts at re-enabling runtime PM have failed, so just crank the clock down when V3D is idle to reduce power consumption. @@ -330620,10 +330510,10 @@ index 19c092d75266..28f8eb664a58 100644 2.18.4 -From 6d2b244d72ee88c6f6d83405c9f318bd2b7c8478 Mon Sep 17 00:00:00 2001 +From fb9dffe27bb79e3a8e405d08d0c902b1c6634ac3 Mon Sep 17 00:00:00 2001 From: Hermann Lauer Date: Thu, 8 Aug 2019 15:40:37 +0200 -Subject: [PATCH 0292/1148] According to 5713 pdf doc CLOCK_CTRL is a readonly +Subject: [PATCH 0290/1209] According to 5713 pdf doc CLOCK_CTRL is a readonly status register, and it behaves so. Remove useless setting --- @@ -330657,10 +330547,10 @@ index 9c1c92e57bbf..53acd2b355d6 100644 2.18.4 -From 7bbe88aa508364474c317c4707af7cfff097af7d Mon Sep 17 00:00:00 2001 +From 6cc505ecb05431c52761d277cd7b7e8341face59 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 28 Jun 2018 15:57:25 +0100 -Subject: [PATCH 0293/1148] staging: bcm2835_camera: Ensure all buffers are +Subject: [PATCH 0291/1209] staging: bcm2835_camera: Ensure all buffers are returned on disable With the recent change to match MMAL and V4L2 buffers there @@ -330690,10 +330580,10 @@ index 61a3593cdcfc..341594ab669f 100644 2.18.4 -From ff7cb19b63bf7ba07173d14f714fcaac6c63cccd Mon Sep 17 00:00:00 2001 +From 786f60620d85db21b2217e5a817e4002cd4faf88 Mon Sep 17 00:00:00 2001 From: yaroslavros Date: Wed, 14 Aug 2019 15:22:55 +0100 -Subject: [PATCH 0294/1148] Ported pcie-brcmstb bounce buffer implementation to +Subject: [PATCH 0292/1209] Ported pcie-brcmstb bounce buffer implementation to ARM64. (#3144) Ported pcie-brcmstb bounce buffer implementation to ARM64. @@ -331418,10 +331308,10 @@ index 87fd40ae3140..e8c8b355548a 100644 2.18.4 -From afb2836aa05a88e69596e56af1cf15ffca6ab7c7 Mon Sep 17 00:00:00 2001 +From e0368f5fa445124237d91bd59b04cfacca16d3af Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 3 Jul 2019 17:44:53 +0100 -Subject: [PATCH 0295/1148] drm/vc4: Query firmware for custom HDMI mode +Subject: [PATCH 0293/1209] drm/vc4: Query firmware for custom HDMI mode Allow custom HDMI modes to be specified from config.txt, and these then override EDID parsing. @@ -331603,10 +331493,10 @@ index ff96ba01144d..3ea7974a4ed3 100644 2.18.4 -From f59fed66b69fadda93811eb44a9522bbf379cd88 Mon Sep 17 00:00:00 2001 +From e9140f7ffd8902a3b07ec838309b0e52bddd004f Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 11 Jul 2019 15:12:05 +0100 -Subject: [PATCH 0296/1148] drm/vc4: Pass the drm vrefresh to the firmware on +Subject: [PATCH 0294/1209] drm/vc4: Pass the drm vrefresh to the firmware on mode set More for completeness than need, but use drm_mode_vrefresh @@ -331646,10 +331536,10 @@ index 3ea7974a4ed3..6bf51f45cadb 100644 2.18.4 -From 2e0296285a6cea22627dfbe989b428be414c27bd Mon Sep 17 00:00:00 2001 +From 747cd1146b65eda1b3ae27a22820d77b5f57b0aa Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 19 Jul 2019 15:35:13 +0100 -Subject: [PATCH 0297/1148] drm/vc4: Add support for margins to fkms +Subject: [PATCH 0295/1209] drm/vc4: Add support for margins to fkms Allows for overscan to be configured under FKMS. NB This is rescaling the planes, not reducing the size of the @@ -331980,10 +331870,10 @@ index 6bf51f45cadb..5526b7dd52ee 100644 2.18.4 -From ec30053a4ab7412bbb960bc4761541653d558b6a Mon Sep 17 00:00:00 2001 +From f9fc496072afc0207e4c6db091473d2477e3401b Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 19 Jul 2019 17:49:00 +0100 -Subject: [PATCH 0298/1148] drm/vc4: Ensure zpos is always initialised +Subject: [PATCH 0296/1209] drm/vc4: Ensure zpos is always initialised The compiler is warning that default_zpos can be used uninitialised as there is no default case to catch all plane @@ -332012,10 +331902,10 @@ index 5526b7dd52ee..653c9f6d5ce5 100644 2.18.4 -From 8b4e9b8a4719a5b7e894985d4d62058c14a8b2ae Mon Sep 17 00:00:00 2001 +From c7f6a2ab9f83657635e44d122bf73143b966a51e Mon Sep 17 00:00:00 2001 From: Joerg Schambacher Date: Tue, 23 Jul 2019 16:57:35 +0200 -Subject: [PATCH 0299/1148] adds the Hifiberry DAC+ADC PRO version +Subject: [PATCH 0297/1209] adds the Hifiberry DAC+ADC PRO version This adds the driver for the DAC+ADC PRO version of the Hifiberry soundcard with software controlled PCM1863 ADC Signed-off-by: Joerg Schambacher joerg@i2audio.com @@ -332621,10 +332511,10 @@ index 000000000000..ed080b24eb49 2.18.4 -From 0169e52b270c11dc08085afde5acfc2dcde75885 Mon Sep 17 00:00:00 2001 +From 44d551f6e5ae256e0e5caa0cd6f5b9330467aeaa Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 31 Jul 2019 17:36:34 +0100 -Subject: [PATCH 0300/1148] drm/vc4: A present but empty dmas disables audio +Subject: [PATCH 0298/1209] drm/vc4: A present but empty dmas disables audio Overlays are unable to remove properties in the base DTB, but they can overwrite them. Allow a present but empty 'dmas' property @@ -332660,10 +332550,10 @@ index 54435b72b761..d59fd8714c5d 100644 2.18.4 -From 68c63d2799a74a22b07256e0b3872740749fead2 Mon Sep 17 00:00:00 2001 +From 79836ce62f57ef7f2fec3e2d887092e1a7f986be Mon Sep 17 00:00:00 2001 From: James Hughes Date: Mon, 29 Jul 2019 12:02:59 +0100 -Subject: [PATCH 0301/1148] Fixup FKMS interrupt handing for non-existent +Subject: [PATCH 0299/1209] Fixup FKMS interrupt handing for non-existent display If an errant interrupt flag was received from a non-existent display, @@ -332706,10 +332596,10 @@ index 653c9f6d5ce5..14d660add41c 100644 2.18.4 -From 1dc45ee0710642541e55f757ec736aebab1e1ece Mon Sep 17 00:00:00 2001 +From 5ba9df4a60610918825f8ac638ae619c0a6bdda3 Mon Sep 17 00:00:00 2001 From: Jonathan Bell Date: Thu, 9 May 2019 14:30:37 +0100 -Subject: [PATCH 0302/1148] drivers: char: add chardev for mmap'ing the RPiVid +Subject: [PATCH 0300/1209] drivers: char: add chardev for mmap'ing the RPiVid control registers Based on the gpiomem driver, allow mapping of the decoder register @@ -333110,10 +333000,10 @@ index b2d157091e12..f70a810c55f7 100644 2.18.4 -From 95ea3fd84da4341de17c175aa2262d37c02bbfab Mon Sep 17 00:00:00 2001 +From c2e1f689c969e2b884bf1ee47b0b5f7b069bde23 Mon Sep 17 00:00:00 2001 From: Jonathan Bell Date: Thu, 1 Aug 2019 16:41:20 +0100 -Subject: [PATCH 0303/1148] hid: usb: Add device quirks for Freeway Airmouse T3 +Subject: [PATCH 0301/1209] hid: usb: Add device quirks for Freeway Airmouse T3 and MX3 These wireless mouse/keyboard combo remote control devices specify @@ -333134,7 +333024,7 @@ Signed-off-by: Jonathan Bell 2 files changed, 8 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h -index e03a4d794240..242309130dea 100644 +index 2aa810665a78..8acacdd477cb 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -223,6 +223,9 @@ @@ -333147,7 +333037,7 @@ index e03a4d794240..242309130dea 100644 #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1244,6 +1247,9 @@ +@@ -1253,6 +1256,9 @@ #define USB_VENDOR_ID_XAT 0x2505 #define USB_DEVICE_ID_XAT_CSR 0x0220 @@ -333158,7 +333048,7 @@ index e03a4d794240..242309130dea 100644 #define USB_DEVICE_ID_XIN_MO_DUAL_ARCADE 0x05e1 #define USB_DEVICE_ID_THT_2P_ARCADE 0x75e1 diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c -index 0440e2f6e8a3..9af43ad92d87 100644 +index 60d188a704e5..3f4b7416dcbf 100644 --- a/drivers/hid/hid-quirks.c +++ b/drivers/hid/hid-quirks.c @@ -41,6 +41,7 @@ static const struct hid_device_id hid_quirks[] = { @@ -333169,7 +333059,7 @@ index 0440e2f6e8a3..9af43ad92d87 100644 { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL }, -@@ -185,6 +186,7 @@ static const struct hid_device_id hid_quirks[] = { +@@ -190,6 +191,7 @@ static const struct hid_device_id hid_quirks[] = { { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_GROUP_AUDIO), HID_QUIRK_NOGET }, @@ -333181,10 +333071,10 @@ index 0440e2f6e8a3..9af43ad92d87 100644 2.18.4 -From c5d1054c427e78dcebcec30078900e0283b86e18 Mon Sep 17 00:00:00 2001 +From e28a46849c2f171445742cb03184d5bf7ca8e2e8 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 14 Jun 2019 10:12:07 +0100 -Subject: [PATCH 0304/1148] drm/vc4: Add "Broadcast RGB" connector property +Subject: [PATCH 0302/1209] drm/vc4: Add "Broadcast RGB" connector property Some HDMI monitors do not abide by the full or limited (16-235) range RGB flags in the AVI infoframe. This can @@ -333489,10 +333379,10 @@ index 14d660add41c..bf882b38830a 100644 2.18.4 -From 44aa8dfd034d9147f885eb9e74902de0f60e2f71 Mon Sep 17 00:00:00 2001 +From bfa2ebaa35c9202f50c704759e5956604398948b Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 23 Jul 2019 11:09:26 +0100 -Subject: [PATCH 0305/1148] drm/vc4: fkms: Set default state margin at reset +Subject: [PATCH 0303/1209] drm/vc4: fkms: Set default state margin at reset Now that the TV margins are properly parsed and filled into drm_cmdline_mode, we just need to initialise the first state at reset to @@ -333529,10 +333419,10 @@ index bf882b38830a..fa8a538f5d66 100644 2.18.4 -From 7984a95626de9d6fecf03fdca625145e7065d875 Mon Sep 17 00:00:00 2001 +From fdba228ef4cd25c0a67021ba0bb24268d4f32798 Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Thu, 18 Jul 2019 17:07:05 +0800 -Subject: [PATCH 0306/1148] staging: bcm2835-codec: switch to multi-planar API +Subject: [PATCH 0304/1209] staging: bcm2835-codec: switch to multi-planar API There are two APIs for mem2mem devices, the older single-planar API and the newer multi-planar one. Without making things overly complex, the @@ -333882,10 +333772,10 @@ index 708f76b7aa92..0ecf3e5c59a8 100644 2.18.4 -From d5557f9836c0964badcc984f78ca51f1e2e22bc5 Mon Sep 17 00:00:00 2001 +From 8ec63f831d93e5792bb3b0f6796dc2b92a2c6396 Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Mon, 22 Jul 2019 22:13:30 +0800 -Subject: [PATCH 0307/1148] staging: bcm2835-codec: implement +Subject: [PATCH 0305/1209] staging: bcm2835-codec: implement V4L2_CID_MIN_BUFFERS_FOR_CAPTURE The stateful decoder specification shows an optional step for retrieving @@ -333934,10 +333824,10 @@ index 0ecf3e5c59a8..d515bc75d5cb 100644 2.18.4 -From aa89d871565ecbf3b63ef6df90d39ca62e74489d Mon Sep 17 00:00:00 2001 +From 5c67a9a955e1ed8957991c52349ea5fe54282bb6 Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Mon, 22 Jul 2019 22:20:55 +0800 -Subject: [PATCH 0308/1148] staging: bcm2835-codec: set device_caps in struct +Subject: [PATCH 0306/1209] staging: bcm2835-codec: set device_caps in struct video_device Instead of filling in the struct v4l2_capability device_caps @@ -333980,10 +333870,10 @@ index d515bc75d5cb..47e79a0f0c3e 100644 2.18.4 -From ed8d1bb30d08a9b5c98975baa20f4fea80b8e3c1 Mon Sep 17 00:00:00 2001 +From e7b71433800e9df21211ab7215b501697dbd39eb Mon Sep 17 00:00:00 2001 From: James Hughes Date: Tue, 16 Jul 2019 12:18:21 +0100 -Subject: [PATCH 0309/1148] Add HDMI1 facility to the driver. +Subject: [PATCH 0307/1209] Add HDMI1 facility to the driver. For generic ALSA, all you need is the bcm2835.h change, but have also added structures for IEC958 HDMI. Not sure how to @@ -334073,10 +333963,10 @@ index ed0feb34b6c8..1a25cdad94dc 100644 2.18.4 -From 062853c1e4d7d00a317716c8dcc773a6d18ab221 Mon Sep 17 00:00:00 2001 +From 03f3b08fa9f192a7f6d05e7ead0d8c7866283f9d Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 25 Jul 2019 17:27:44 +0100 -Subject: [PATCH 0310/1148] drm/vc4: Resolve the vblank warnings on mode +Subject: [PATCH 0308/1209] drm/vc4: Resolve the vblank warnings on mode switching The details over when and how a driver is to service the @@ -334179,10 +334069,10 @@ index fa8a538f5d66..d9779b993c39 100644 2.18.4 -From 553e08eee56913c213996f87d1cc8f9f7619e8bd Mon Sep 17 00:00:00 2001 +From 427c9eede8aa02e0d39746a974d213235023b67b Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 25 Jul 2019 17:34:29 +0100 -Subject: [PATCH 0311/1148] drm/vc4: Remove unused mode variable +Subject: [PATCH 0309/1209] drm/vc4: Remove unused mode variable "89d1376 drm/vc4: Add support for margins to fkms" removed the requirement for having the mode structure from vc4_plane_to_mb, @@ -334212,10 +334102,10 @@ index d9779b993c39..8b1838919377 100644 2.18.4 -From c61b2adb0bf13d5d73822f31a63ed110e02a24be Mon Sep 17 00:00:00 2001 +From 7fd9570bd7d499eefa613f2e2670c4a92945b511 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 11 Jul 2019 14:57:09 +0100 -Subject: [PATCH 0312/1148] staging:bcm2835-codec: Expand logging on format +Subject: [PATCH 0310/1209] staging:bcm2835-codec: Expand logging on format setting Adds some more useful logging during format changed events and @@ -334260,10 +334150,10 @@ index 47e79a0f0c3e..eadc0fab2fb9 100644 2.18.4 -From 5495de61b283186192e2ba1146d7543ee0c594fa Mon Sep 17 00:00:00 2001 +From f5e2f9dace821ba302f04e076f691e0103c68858 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 11 Jul 2019 14:58:35 +0100 -Subject: [PATCH 0313/1148] staging: bcm2835-codec: Correct bytesperline on +Subject: [PATCH 0311/1209] staging: bcm2835-codec: Correct bytesperline on format changed The handling of format changed events incorrectly set bytesperline @@ -334296,10 +334186,10 @@ index eadc0fab2fb9..24a8e7cc7de7 100644 2.18.4 -From f7b8d575890bfcdac7e35e90f07147b467f16d47 Mon Sep 17 00:00:00 2001 +From 1bccb249975d58e80ede3b0a59c3b4f2ead40340 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 7 Aug 2019 11:31:08 +0100 -Subject: [PATCH 0314/1148] drm/vc4: Add missing NULL check to +Subject: [PATCH 0312/1209] drm/vc4: Add missing NULL check to vc4_crtc_consume_event vc4_crtc_consume_event wasn't checking crtc->state->event was @@ -334330,10 +334220,10 @@ index 8b1838919377..004a0bce94ac 100644 2.18.4 -From 4f6bcf1832d5b0b9e14f5ee05bb9a0297bf836ba Mon Sep 17 00:00:00 2001 +From 954b82318e8f2bdb6a4a0d68712531bba722ada0 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 9 Aug 2019 08:51:43 +0100 -Subject: [PATCH 0315/1148] net: bcmgenet: Workaround #2 for Pi4 Ethernet fail +Subject: [PATCH 0313/1209] net: bcmgenet: Workaround #2 for Pi4 Ethernet fail Some combinations of Pi 4Bs and Ethernet switches don't reliably get a DCHP-assigned IP address, leaving the unit with a self=assigned 169.254 @@ -334387,10 +334277,10 @@ index 88315e542214..b9d7a088c336 100644 2.18.4 -From 67221941aa1f2b50eae4b668b6a01a7dd7bcc8ac Mon Sep 17 00:00:00 2001 +From ba8abcb5eb953a621bbe5784b8ae300c0eb5577d Mon Sep 17 00:00:00 2001 From: Jonathan Bell Date: Tue, 13 Aug 2019 15:53:29 +0100 -Subject: [PATCH 0316/1148] xhci: Use more event ring segment table entries +Subject: [PATCH 0314/1209] xhci: Use more event ring segment table entries Users have reported log spam created by "Event Ring Full" xHC event TRBs. These are caused by interrupt latency in conjunction with a very @@ -334437,7 +334327,7 @@ index 9764122c9cdf..ff6004b3f6b9 100644 "// Write ERST size = %i to ir_set 0 (some bits preserved)", val); diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h -index 8a202d9b856d..2033bb868303 100644 +index 4ded7bc60d99..1bd165cbd74f 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1649,8 +1649,8 @@ struct urb_priv { @@ -334455,10 +334345,10 @@ index 8a202d9b856d..2033bb868303 100644 2.18.4 -From 14a873d2d11233fa92a97b637512e9e8fc431795 Mon Sep 17 00:00:00 2001 +From eda67c2fbe4516810dc9684cedd4b8ca9a31b38e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 15 Aug 2019 12:02:34 +0100 -Subject: [PATCH 0317/1148] configs: arm64/bcm2711: Enable V3D +Subject: [PATCH 0315/1209] configs: arm64/bcm2711: Enable V3D Enable the V3D driver, which depends on BCM2835_POWER. @@ -334502,10 +334392,10 @@ index 9a5c44606337..b0e048697964 100644 2.18.4 -From 4fe902568cf7acd3ae0ef698520eab8f359bde1f Mon Sep 17 00:00:00 2001 +From b536008808134eba270b3bc4212d9b36cbb77c83 Mon Sep 17 00:00:00 2001 From: Aman Gupta Date: Thu, 22 Aug 2019 22:31:37 +0000 -Subject: [PATCH 0318/1148] staging: bcm2835-codec: add support for +Subject: [PATCH 0316/1209] staging: bcm2835-codec: add support for V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME fixes #3171 @@ -334563,10 +334453,10 @@ index 24a8e7cc7de7..1a384e70eb98 100644 2.18.4 -From 21e6657537853afefe6614e6b2b46921748c7fb3 Mon Sep 17 00:00:00 2001 +From fb2949861716bc70d94346f0772ef2927bf9cdc4 Mon Sep 17 00:00:00 2001 From: Aman Gupta Date: Fri, 23 Aug 2019 16:29:07 -0700 -Subject: [PATCH 0319/1148] staging: bcm2835-codec: remove unnecessary padding +Subject: [PATCH 0317/1209] staging: bcm2835-codec: remove unnecessary padding on encoder input The ISP and ENCODE roles have the same underlying hardware. Neither requires vertical alignment. @@ -334599,10 +334489,10 @@ index 1a384e70eb98..a82d7345389d 100644 2.18.4 -From fa963228e851645899dfa1cdcf84be7825d599c5 Mon Sep 17 00:00:00 2001 +From aaf0f1d6e94ebd74746378a37d609758e1098f20 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 3 Sep 2019 18:16:56 +0100 -Subject: [PATCH 0320/1148] arch/arm: Add model string to cpuinfo +Subject: [PATCH 0318/1209] arch/arm: Add model string to cpuinfo Signed-off-by: Phil Elwell --- @@ -334641,10 +334531,10 @@ index d0a464e317ea..d658d022f6a7 100644 2.18.4 -From 4707b8f48b8fadeddea1557094288a3e41fdd371 Mon Sep 17 00:00:00 2001 +From 2456b5bb668e705cd483336120b019ff273750f2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 3 Sep 2019 18:17:25 +0100 -Subject: [PATCH 0321/1148] arch/arm64: Add Revision, Serial, Model to cpuinfo +Subject: [PATCH 0319/1209] arch/arm64: Add Revision, Serial, Model to cpuinfo Signed-off-by: Phil Elwell --- @@ -334705,10 +334595,10 @@ index 05933c065732..86bbf8762dc9 100644 2.18.4 -From 623a72da4040abdd0ab7504bc9bdc8f9d5a8bec7 Mon Sep 17 00:00:00 2001 +From 4a5fd47907ceb504f41a66f1839ac388a113ef39 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 28 Aug 2019 13:34:30 +0100 -Subject: [PATCH 0322/1148] media: dt-bindings: Add binding for the Sony IMX219 +Subject: [PATCH 0320/1209] media: dt-bindings: Add binding for the Sony IMX219 sensor The IMX219 is an 8MPix CSI2 sensor, supporting 2 or 4 data lanes. @@ -334789,10 +334679,10 @@ index 000000000000..a02f1ce1e120 2.18.4 -From a242cd53f2fb1cbf258e18056936cc5bd304420a Mon Sep 17 00:00:00 2001 +From ea6ee64077948761b07cc2fec4a9a4aa0eb70206 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 28 Aug 2019 13:34:49 +0100 -Subject: [PATCH 0323/1148] media: i2c: Add driver for Sony IMX219 sensor +Subject: [PATCH 0321/1209] media: i2c: Add driver for Sony IMX219 sensor Adds a driver for the 8MPix Sony IMX219 CSI2 sensor. Whilst the sensor supports 2 or 4 CSI2 data lanes, this driver @@ -335946,10 +335836,10 @@ index 000000000000..682397a48492 2.18.4 -From 1cb767dbdd178ea52af55b4946149d95c95a5c96 Mon Sep 17 00:00:00 2001 +From e2c215f6e11158f41753c786a7cf46a5d2182836 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Sun, 28 Apr 2019 12:15:35 +0200 -Subject: [PATCH 0324/1148] staging: bcm2835-codec: Fix non-documentation +Subject: [PATCH 0322/1209] staging: bcm2835-codec: Fix non-documentation comment block The job_ready comment is incorrectly using the documentation prefix @@ -335979,10 +335869,10 @@ index a82d7345389d..4c69087328c0 100644 2.18.4 -From 6c60ee307159c4459f9f8dbdffdf12e37dd0e6d7 Mon Sep 17 00:00:00 2001 +From 6097294c9f0ee2e7f24cff736161bf990db18709 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Wed, 20 Mar 2019 11:42:39 +0000 -Subject: [PATCH 0325/1148] staging: bcm2835-codec: Fix declaration of roles +Subject: [PATCH 0323/1209] staging: bcm2835-codec: Fix declaration of roles The static role text is declared incorrectly. The static should be first, and the roles should also be constified. @@ -336011,10 +335901,10 @@ index 4c69087328c0..1a00c8d25370 100644 2.18.4 -From 6abaf06bc5b3a642a18de47d5b75033043b8f519 Mon Sep 17 00:00:00 2001 +From 9aabb1bfe021355116cf9cfde790d3e8037361a2 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Wed, 20 Mar 2019 11:55:43 +0000 -Subject: [PATCH 0326/1148] staging: bcm2835-codec: Add role to device name +Subject: [PATCH 0324/1209] staging: bcm2835-codec: Add role to device name Three entities are created, Decode, Encode and ISP but all of the video nodes use the same video name string "bcm2835-codec" which makes it @@ -336062,10 +335952,10 @@ index 1a00c8d25370..46b8dd782c46 100644 2.18.4 -From c3a22c1c9418e8db92bbbbb0ced22f650affdbc4 Mon Sep 17 00:00:00 2001 +From aa428fb1d886da89f9846fc021c7843287685bc0 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Wed, 20 Mar 2019 11:35:26 +0000 -Subject: [PATCH 0327/1148] staging: bcm2835-codec: Pass driver context to +Subject: [PATCH 0325/1209] staging: bcm2835-codec: Pass driver context to create entities Pass the bcm2835_codec_driver driver context directly into the @@ -336129,10 +336019,10 @@ index 46b8dd782c46..a08a75d3ff88 100644 2.18.4 -From 3e25162950d0debcf2ba0fb7260622821324073c Mon Sep 17 00:00:00 2001 +From 31992dd7ed45988ddb6d4147a2cbf46d54d8460a Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Wed, 20 Mar 2019 12:54:15 +0000 -Subject: [PATCH 0328/1148] staging: bcm2835-codec: add media controller +Subject: [PATCH 0326/1209] staging: bcm2835-codec: add media controller support Provide a single media device to contain all of the bcm2835_codec @@ -336301,10 +336191,10 @@ index a08a75d3ff88..fb99bfb5bc1d 100644 2.18.4 -From 38f84306c956e4cccffb5de51ec8a47fe2d0b6b3 Mon Sep 17 00:00:00 2001 +From 6c1fd2b2b7d46cf34e93488ce49f864be0633987 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 6 Sep 2019 15:04:51 +0100 -Subject: [PATCH 0329/1148] v4l2: Add a Greyworld AWB mode. +Subject: [PATCH 0327/1209] v4l2: Add a Greyworld AWB mode. Adds a simple greyworld white balance preset, mainly for use with cameras without an IR filter (eg Raspberry Pi NoIR) @@ -336343,10 +336233,10 @@ index a2669b79b294..616a7c64c4d2 100644 2.18.4 -From 3fe8ce79b9fd114f10e985fb9163986b1ab157ae Mon Sep 17 00:00:00 2001 +From 227d5852f52b08b7ef163446db20698089851b1d Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 6 Sep 2019 15:13:06 +0100 -Subject: [PATCH 0330/1148] staging: bcm2835-camera: Add greyworld AWB mode +Subject: [PATCH 0328/1209] staging: bcm2835-camera: Add greyworld AWB mode This is mainly used for the NoIR camera which has no IR filter and can completely confuse normal AWB presets. @@ -336399,10 +336289,10 @@ index 926392d754c7..d3d7828d1e56 100644 2.18.4 -From c5dcdfecbac5456c7b6da6678112ed8ec3eca58d Mon Sep 17 00:00:00 2001 +From 1cd339c072f695c17dc3b573290ed30697cbb592 Mon Sep 17 00:00:00 2001 From: James Hughes Date: Wed, 11 Sep 2019 14:57:18 +0100 -Subject: [PATCH 0331/1148] drm/vc4: Fix for margins in composite/SDTV mode +Subject: [PATCH 0329/1209] drm/vc4: Fix for margins in composite/SDTV mode (#3223) Margins were incorrectly assumed to be setup in SDTV mode, but were @@ -336439,11 +336329,11 @@ index 004a0bce94ac..a487fcf1eaf3 100644 2.18.4 -From 2da7d85546bbc4a553163d1aad5b97baeb2b0ae6 Mon Sep 17 00:00:00 2001 +From f6263156217ab9cd3927f3699600a795cdaca9e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Schambacher?= Date: Thu, 12 Sep 2019 14:57:32 +0200 -Subject: [PATCH 0332/1148] Add Hifiberry DAC+DSP soundcard driver (#3224) +Subject: [PATCH 0330/1209] Add Hifiberry DAC+DSP soundcard driver (#3224) Adds the driver for the Hifiberry DAC+DSP. It supports capture and playback depending on the DSP firmware. @@ -336692,10 +336582,10 @@ index 2023b0a18a2c..133b6d98f515 100644 2.18.4 -From 2ba603e16aa30ecf789c1ada949008ce51d31a3e Mon Sep 17 00:00:00 2001 +From 676fb0f7268176af62b9787f16c64ba238ebc4bf Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 6 Sep 2019 17:24:55 +0100 -Subject: [PATCH 0333/1148] staging: bcm2835-codec: Allow height of 1920. +Subject: [PATCH 0331/1209] staging: bcm2835-codec: Allow height of 1920. The codec is happy with video up to 1920 high if the width is suitably reduced to stay within level limits. eg 1080x1920 @@ -336725,10 +336615,10 @@ index fb99bfb5bc1d..19d046767dbb 100644 2.18.4 -From 6d5621ffa26915405c8a1f55fd3146a65f6950b7 Mon Sep 17 00:00:00 2001 +From 66bd5652ac4b3333e140cae88a53e59552316e48 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 13 Sep 2019 15:11:47 +0100 -Subject: [PATCH 0334/1148] staging: bcm2835-codec: Correct g/s_selection API +Subject: [PATCH 0332/1209] staging: bcm2835-codec: Correct g/s_selection API MPLANE support The g_selection and s_selection API is messed up and requires @@ -336838,10 +336728,10 @@ index 19d046767dbb..ce6364322266 100644 2.18.4 -From c615260b631013963859b4346be91f01e13771f0 Mon Sep 17 00:00:00 2001 +From 7f7082885af22c509b7ed55f2e3e7ad48511aa81 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 18 Sep 2019 17:22:36 +0100 -Subject: [PATCH 0335/1148] drm/v3d: Delete pm_runtime support +Subject: [PATCH 0333/1209] drm/v3d: Delete pm_runtime support The pm_runtime was blocking changelist submission, so delete it as a temporary workaround. @@ -336908,10 +336798,10 @@ index 6cc67cab320e..5294dd884867 100644 2.18.4 -From 776675a41b272a116949176711dcd66ed35940ed Mon Sep 17 00:00:00 2001 +From d883e18d23b34c9e6de66d8b2b010653f09f1f7a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 19 Sep 2019 13:39:15 +0100 -Subject: [PATCH 0336/1148] configs: Regenerate defconfigs +Subject: [PATCH 0334/1209] configs: Regenerate defconfigs Signed-off-by: Phil Elwell --- @@ -336934,10 +336824,10 @@ index 33686cf34ff9..4719d38c4b4e 100644 2.18.4 -From 1ed688d9824435ac2bfdf87c197644ae8a5167ab Mon Sep 17 00:00:00 2001 +From 70755ec90b4f7ada01dc987a843f06922c79b05a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 18 Sep 2019 09:02:10 +0100 -Subject: [PATCH 0337/1148] dts: Add DTS for Pi 2B rev 1.2 with BCM2837 (#3235) +Subject: [PATCH 0335/1209] dts: Add DTS for Pi 2B rev 1.2 with BCM2837 (#3235) Signed-off-by: Phil Elwell --- @@ -336973,10 +336863,10 @@ index 000000000000..116cdbf94b9b 2.18.4 -From aa063f635174627797813b4de85f3288ddc958b5 Mon Sep 17 00:00:00 2001 +From 150b226bb23e9e94a1a94e3aecdf759065f1937e Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Tue, 3 Sep 2019 08:45:24 +0200 -Subject: [PATCH 0338/1148] drm/v3d: clean caches at the end of render jobs on +Subject: [PATCH 0336/1209] drm/v3d: clean caches at the end of render jobs on request from user space Extends the user space ioctl for CL submissions so it can include a request @@ -337147,10 +337037,10 @@ index 58fbe48c91e9..b8c6f9d90942 100644 2.18.4 -From b4cd830d809824b754e5f4650fad9da9e5e350b2 Mon Sep 17 00:00:00 2001 +From 1186d6e891935085371ed3ad6f7a2f8d8d966312 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 23 Sep 2019 09:26:41 +0100 -Subject: [PATCH 0339/1148] kbuild: Allow .dtbo overlays to be built piecemeal +Subject: [PATCH 0337/1209] kbuild: Allow .dtbo overlays to be built piecemeal Before 4.20, it was possible to build an arbitrary overlay by copying it to arm/boot/dts/overlays/mytest-overlay.dts and running: @@ -337172,10 +337062,10 @@ Signed-off-by: Phil Elwell 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile -index 8db75cc76ed1..79843dd0993c 100644 +index fe0ab15cfd83..098315e0a4d4 100644 --- a/Makefile +++ b/Makefile -@@ -1264,6 +1264,9 @@ ifneq ($(dtstree),) +@@ -1267,6 +1267,9 @@ ifneq ($(dtstree),) %.dtb: include/config/kernel.release scripts_dtc $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ @@ -337189,10 +337079,10 @@ index 8db75cc76ed1..79843dd0993c 100644 2.18.4 -From 436d7966a76fda37443fb0f518f1e6af49010723 Mon Sep 17 00:00:00 2001 +From a5fbc406966ae60d0a3cbfefcf7ef6d911e7a617 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Sep 2019 09:49:58 +0100 -Subject: [PATCH 0340/1148] dma-direct: Temporary DMA fix on arm64 +Subject: [PATCH 0338/1209] dma-direct: Temporary DMA fix on arm64 See: https://github.com/raspberrypi/linux/issues/3251 @@ -337218,10 +337108,10 @@ index 0a093a675b63..d2b462835469 100644 2.18.4 -From a26892b744c43e3bcefa7d79234ed190bca76afd Mon Sep 17 00:00:00 2001 +From 4c996cbbf145cd5827baae3b3e848e3ee2565599 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Thu, 19 Sep 2019 20:45:30 +0200 -Subject: [PATCH 0341/1148] ARM: bcm: Switch board, clk and pinctrl to bcm2711 +Subject: [PATCH 0339/1209] ARM: bcm: Switch board, clk and pinctrl to bcm2711 compatible After the decision to use bcm2711 compatible for upstream, we should @@ -337250,10 +337140,10 @@ index 282a023027fc..e538e0f899a5 100644 2.18.4 -From 0033b3144366b378e489352800715bb9bd54c557 Mon Sep 17 00:00:00 2001 +From b0d829669b03193443891798c075cf5bd4c25429 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sun, 21 Jul 2019 16:01:36 +0200 -Subject: [PATCH 0342/1148] pinctrl: bcm2835: Add support for BCM2711 pull-up +Subject: [PATCH 0340/1209] pinctrl: bcm2835: Add support for BCM2711 pull-up functionality commit e38a9a437fb93ddafab5030165e4c6a3a5021669 upstream. @@ -337296,10 +337186,10 @@ index 76fad11f2ad8..3cd4c4f1a47c 100644 2.18.4 -From 4aab84ef01f468feb8c5d4ab3a634f07970d9cdb Mon Sep 17 00:00:00 2001 +From cb10d4ac92d9c067b5bbe6209c09874c76b88151 Mon Sep 17 00:00:00 2001 From: Matteo Croce Date: Sun, 6 Oct 2019 03:23:15 +0200 -Subject: [PATCH 0343/1148] vchiq_2835_arm: suppress warning +Subject: [PATCH 0341/1209] vchiq_2835_arm: suppress warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -337334,10 +337224,10 @@ index 230e1b1144a9..2dfdee1f814f 100644 2.18.4 -From 10a299fb71969fc08d17499b3d4d9dc4d2d4fd67 Mon Sep 17 00:00:00 2001 +From 4aa9866f98dce602df95d93e71d90a71850193ee Mon Sep 17 00:00:00 2001 From: James Hughes Date: Tue, 24 Sep 2019 18:26:55 +0100 -Subject: [PATCH 0344/1148] Rename HDMI ALSA device names, check for enable +Subject: [PATCH 0342/1209] Rename HDMI ALSA device names, check for enable state HDMI Alsa devices renamed to match names used by DRM, to @@ -337480,10 +337370,10 @@ index 4d5b99d8ae9d..2f465dba54bf 100644 2.18.4 -From 24e2620803949657fc0027b77c4ca7b73269d568 Mon Sep 17 00:00:00 2001 +From 5cd380704a2c804dfb7da4c521cda0aa110bca6b Mon Sep 17 00:00:00 2001 From: Floris Bos Date: Fri, 4 Oct 2019 16:41:30 +0200 -Subject: [PATCH 0345/1148] pcie-brcmstb-bounce64.c: dev_err() -> dev_info() +Subject: [PATCH 0343/1209] pcie-brcmstb-bounce64.c: dev_err() -> dev_info() for info messages "dmabounce: initialised" is not an error, so do not log it as such. @@ -337511,10 +337401,10 @@ index 6a872975ba9e..ac8dde3c030b 100644 2.18.4 -From bcf0af66346fd5ce40ce786259d93fe4e494c3b0 Mon Sep 17 00:00:00 2001 +From 26f24b0a7bb5c6c0a6991961d8056bb7885a9f45 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 17 Sep 2019 18:28:17 +0100 -Subject: [PATCH 0346/1148] drm/vc4: Add support for YUV color encodings and +Subject: [PATCH 0344/1209] drm/vc4: Add support for YUV color encodings and ranges The BT601/BT709 color encoding and limited vs full @@ -337657,10 +337547,10 @@ index b5a6b4cdd332..8416fdaf2ec4 100644 2.18.4 -From 01a427be179a960d4c5629aee80de60e9355f46d Mon Sep 17 00:00:00 2001 +From da410be79210ea0296538e9ac04eb22a35e441bb Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 17 Sep 2019 18:36:32 +0100 -Subject: [PATCH 0347/1148] drm/vc4: Add support for H & V flips +Subject: [PATCH 0345/1209] drm/vc4: Add support for H & V flips The HVS supports horizontal and vertical flips whilst composing. @@ -337769,10 +337659,10 @@ index 1c5eef3ac441..f21c03f550e5 100644 2.18.4 -From 5bd4b286dc3e0c0f533e73ccd944010d4f4d6a87 Mon Sep 17 00:00:00 2001 +From df5aa3ed10af17d930cdbcccf6f786bf5c8a00a9 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 18 Sep 2019 15:49:13 +0100 -Subject: [PATCH 0348/1148] drm/vc4: Correct handling of rotation parameter in +Subject: [PATCH 0346/1209] drm/vc4: Correct handling of rotation parameter in fkms One bit within DRM_MODE_ROTATE_MASK will always be set to @@ -337861,10 +337751,10 @@ index a487fcf1eaf3..f3ec265a9798 100644 2.18.4 -From 4d18ce994811c5f69e1805ff70254499f07ab631 Mon Sep 17 00:00:00 2001 +From 3d70c89252a9b969f481009b36c991e4f065faf6 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 9 Oct 2019 17:22:07 +0100 -Subject: [PATCH 0349/1148] bcm2711: Retain support for old dtbs +Subject: [PATCH 0347/1209] bcm2711: Retain support for old dtbs The recent series switching to bcm2711 as the DT identifier broke Pis running with old DTBs. Add some bcm2838 compatible strings as a @@ -337894,10 +337784,10 @@ index e538e0f899a5..0ec49d857134 100644 NULL }; diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c -index 57f306e31883..30e548c0031c 100644 +index f1d73d83ee16..3921480d89fd 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -2389,6 +2389,8 @@ static const struct cprman_plat_data cprman_bcm2711_plat_data = { +@@ -2391,6 +2391,8 @@ static const struct cprman_plat_data cprman_bcm2711_plat_data = { static const struct of_device_id bcm2835_clk_of_match[] = { { .compatible = "brcm,bcm2835-cprman", .data = &cprman_bcm2835_plat_data }, { .compatible = "brcm,bcm2711-cprman", .data = &cprman_bcm2711_plat_data }, @@ -337926,10 +337816,10 @@ index 3cd4c4f1a47c..e77c3ea15fde 100644 2.18.4 -From 5a0c677727029f921a28e46f89db2fdc595df690 Mon Sep 17 00:00:00 2001 +From fff58ee43241b4940eb14c36a7b9eb244cdb06fe Mon Sep 17 00:00:00 2001 From: Markus Proeller Date: Thu, 10 Oct 2019 19:12:08 +0200 -Subject: [PATCH 0350/1148] dt-bindings: Add binding for the Infineon IRS1125 +Subject: [PATCH 0348/1209] dt-bindings: Add binding for the Infineon IRS1125 sensor Adds a binding for the Infineon IRS1125 time-of-flight depth @@ -337999,10 +337889,10 @@ index 000000000000..25a48028c957 2.18.4 -From 98716e56a705a3c087a6f7c9424e03651e304e3b Mon Sep 17 00:00:00 2001 +From fb78c3f5ef870fd4a38df9288fc9a694e998aa9b Mon Sep 17 00:00:00 2001 From: Markus Proeller Date: Thu, 10 Oct 2019 19:12:36 +0200 -Subject: [PATCH 0351/1148] media: i2c: Add a driver for the Infineon IRS1125 +Subject: [PATCH 0349/1209] media: i2c: Add a driver for the Infineon IRS1125 depth sensor The Infineon IRS1125 is a time of flight depth sensor that @@ -339244,10 +339134,10 @@ index 000000000000..dccaca23aa76 2.18.4 -From 32b63984b79fb7892160082dfa753201d62f1140 Mon Sep 17 00:00:00 2001 +From 61201003e3511d12f8c6b18fbaf04433baaa0181 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 13 Sep 2019 17:19:33 +0100 -Subject: [PATCH 0352/1148] staging:bcm2835-codec: Add support for +Subject: [PATCH 0350/1209] staging:bcm2835-codec: Add support for ENUM_FRAMESIZES Required for compliance testing for the encoder. @@ -339348,10 +339238,10 @@ index ce6364322266..09d662d1dee3 100644 2.18.4 -From 08d4400124ba7f8d2d64aa2147fd575038fd06d4 Mon Sep 17 00:00:00 2001 +From c865caddc19359a9607ffd6eab7805bbe67dbcd8 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 13 Sep 2019 17:22:08 +0100 -Subject: [PATCH 0353/1148] staging: bcm2835-codec: Correct buffer type check +Subject: [PATCH 0351/1209] staging: bcm2835-codec: Correct buffer type check on G_PARM The output queue buffer type is now OUTPUT_MPLANE. @@ -339379,10 +339269,10 @@ index 09d662d1dee3..a0d4b0d006c6 100644 2.18.4 -From 7c783762dc69495a269f23be04f663c6e3e9f48a Mon Sep 17 00:00:00 2001 +From e737401ac5ed41e2290fe18dad0c5b847024f385 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 13 Sep 2019 17:23:26 +0100 -Subject: [PATCH 0354/1148] staging: bcm2835-codec: Set default and error check +Subject: [PATCH 0352/1209] staging: bcm2835-codec: Set default and error check timeperframe G_PARM default was invalid as 0/0, and the driver didn't check @@ -339422,10 +339312,10 @@ index a0d4b0d006c6..41fca575b395 100644 2.18.4 -From e931c9e09982520d0c91d0ea9317fdc9e0d35139 Mon Sep 17 00:00:00 2001 +From eac29a9f8faa8787a50dc9fc2c68d0cebce99106 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 7 Oct 2019 14:02:57 +0100 -Subject: [PATCH 0355/1148] staging: bcm2835-codec: Fix imbalance in +Subject: [PATCH 0353/1209] staging: bcm2835-codec: Fix imbalance in dma_buf_get/dma_buf_put When represented with a dmabuf buffer that had previously been @@ -339458,10 +339348,10 @@ index 41fca575b395..f5adaac765cd 100644 2.18.4 -From 3c0da03bd5d9cf7534a495ff52dc752606c909ef Mon Sep 17 00:00:00 2001 +From b484cdffa530efe89dc48461c8d510a6d69b3b1d Mon Sep 17 00:00:00 2001 From: James Hughes Date: Wed, 16 Oct 2019 14:49:23 +0100 -Subject: [PATCH 0356/1148] drm:vc4 Added calls for firmware display +Subject: [PATCH 0354/1209] drm:vc4 Added calls for firmware display blank/unblank Requires new display power mailbox call to be present. @@ -339554,10 +339444,10 @@ index 102c2e5dd2f2..ae71820af8e5 100644 2.18.4 -From cc434a1a11d6918788b015ac3ab60164f5220243 Mon Sep 17 00:00:00 2001 +From bb59b2d8450a15b191a7960abb6d4d1614c2b26f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 4 Nov 2019 00:52:35 +0000 -Subject: [PATCH 0357/1148] configs: Rebuild with savedefconfig +Subject: [PATCH 0355/1209] configs: Rebuild with savedefconfig --- arch/arm/configs/bcm2711_defconfig | 8 -------- @@ -339628,10 +339518,10 @@ index ec25f919fe4b..0775637872ca 100644 2.18.4 -From 74bb4a7a736f030237d902907491db77e2b4e976 Mon Sep 17 00:00:00 2001 +From 596706e5f956b91b8e90ab9d7994182940211a99 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 5 Nov 2019 11:28:19 +0000 -Subject: [PATCH 0358/1148] Revert "pinctrl: bcm2835: Pass irqchip when adding +Subject: [PATCH 0356/1209] Revert "pinctrl: bcm2835: Pass irqchip when adding gpiochip" This reverts commit 73345a18d464b1b945b29f54f630ace6873344e2. @@ -339741,10 +339631,10 @@ index e77c3ea15fde..4ce2dd704c13 100644 2.18.4 -From 63d3a422defbe827f359938b0f9fe6408bbe2929 Mon Sep 17 00:00:00 2001 +From 2a2fb3cbf59e526ff473a908a2a60f728e04b482 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 Nov 2019 14:01:41 +0000 -Subject: [PATCH 0359/1148] drm/v3d: Don't clear MMU control bits on exception +Subject: [PATCH 0357/1209] drm/v3d: Don't clear MMU control bits on exception MMU exception conditions are reported in the V3D_MMU_CTRL register as write-1-to-clear (W1C) bits. The MMU interrupt handling code clears any @@ -339781,10 +339671,10 @@ index 662e67279a7b..fe2060c6b495 100644 2.18.4 -From 6785b3bb35555ca735f1619bf2b4ee517379e0ff Mon Sep 17 00:00:00 2001 +From e935d88ce58e8fad02be13aa85e00f61f804e703 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 Nov 2019 20:18:08 +0000 -Subject: [PATCH 0360/1148] drm/v3d: Suppress all but the first MMU error +Subject: [PATCH 0358/1209] drm/v3d: Suppress all but the first MMU error The v3d driver currently encounters a lot of MMU PTE exceptions, so only log the first to avoid swamping the kernel log. @@ -339826,10 +339716,10 @@ index fe2060c6b495..7dde90d846f1 100644 2.18.4 -From aec5e4d930d8dbe0899ec96b5f19aea67a4b2999 Mon Sep 17 00:00:00 2001 +From e5dcfbd0ec5e7375fc5fefc5dacf57a0a816b6fa Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 12 Nov 2019 16:41:21 +0000 -Subject: [PATCH 0361/1148] drm/v3d: Plug dma_fence leak +Subject: [PATCH 0359/1209] drm/v3d: Plug dma_fence leak The irq_fence and done_fence are given a reference that is never released. The necessary dma_fence_put()s seem to have been @@ -339860,10 +339750,10 @@ index 035de14066d0..8b5dc2b20e38 100644 2.18.4 -From 1a96e91c983e0bd6fae1b5b53bb3e7547fb5e0b7 Mon Sep 17 00:00:00 2001 +From b52754bcc391bacf755df3572d506f47470c76e5 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 6 Nov 2019 13:57:48 +0000 -Subject: [PATCH 0362/1148] staging: vchiq_arm: Register vcsm-cma as a platform +Subject: [PATCH 0360/1209] staging: vchiq_arm: Register vcsm-cma as a platform driver Following the same pattern as bcm2835-camera and bcm2835-audio, @@ -339906,10 +339796,10 @@ index 4e684ccd9346..2b859b98e17b 100644 2.18.4 -From 7bfe409dba043b8a8f4f44a0563cf57177103e85 Mon Sep 17 00:00:00 2001 +From 490960f0ea718fa98bf3045f2078675b5f4cbdec Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 6 Nov 2019 13:57:58 +0000 -Subject: [PATCH 0363/1148] staging: vchiq_arm: Register bcm2835-codec as a +Subject: [PATCH 0361/1209] staging: vchiq_arm: Register bcm2835-codec as a platform driver Following the same pattern as bcm2835-camera and bcm2835-audio, @@ -339952,10 +339842,10 @@ index 2b859b98e17b..1e8b2c460783 100644 2.18.4 -From 00838b718f22aa33af6d2a4757e5af7143a95314 Mon Sep 17 00:00:00 2001 +From 0fb4f5cd2c9b95a7977f3fc88ec27346e4e4b2f1 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 6 Nov 2019 13:58:08 +0000 -Subject: [PATCH 0364/1148] staging: bcm2835-codec: Fix potential memory leak +Subject: [PATCH 0362/1209] staging: bcm2835-codec: Fix potential memory leak of isp instance "d867785 staging: bcm2835-codec: add media controller support" added @@ -339987,10 +339877,10 @@ index f5adaac765cd..50395795c3db 100644 2.18.4 -From 2476eccdd7663d20a91a7d3d11213f6f517c80b2 Mon Sep 17 00:00:00 2001 +From 131e7819b4a1dbb939d87fb0a7a9c14eaed2c55e Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 6 Nov 2019 13:58:18 +0000 -Subject: [PATCH 0365/1148] staging: vchiq_arm: Unify the unload handling of +Subject: [PATCH 0363/1209] staging: vchiq_arm: Unify the unload handling of platform devs A helper function vchiq_register_child was added to deal with @@ -340022,10 +339912,10 @@ index 1e8b2c460783..d9492e24e07d 100644 2.18.4 -From d7f01b7dd7ee78b432bcfdf35eb2acfe91947b42 Mon Sep 17 00:00:00 2001 +From 5748c32113e5584ab0dc066ec2cc95323edd9160 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 14 Nov 2019 11:59:01 +0000 -Subject: [PATCH 0366/1148] net: bcmgenet: The second IRQ is optional +Subject: [PATCH 0364/1209] net: bcmgenet: The second IRQ is optional As of 5.4, the kernel logs errors for absent IRQs unless requested with platform_get_irq_optional. @@ -340052,10 +339942,10 @@ index 7dde90d846f1..586fb850f00f 100644 2.18.4 -From 2e938a76240ae505add103a32b71e381d8f0dd9c Mon Sep 17 00:00:00 2001 +From fe6a365576b42cce3471b6c629cbc2c0646c3f7c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 14 Nov 2019 12:00:43 +0000 -Subject: [PATCH 0367/1148] drm/v3d: The third IRQ is optional +Subject: [PATCH 0365/1209] drm/v3d: The third IRQ is optional As of 5.4, the kernel logs errors for absent IRQs unless requested with platform_get_irq_optional. @@ -340082,10 +339972,10 @@ index b9d7a088c336..0cb19a1120b6 100644 2.18.4 -From 1a81c466a83b1a7204a8edadf4c2b2e0521e4c68 Mon Sep 17 00:00:00 2001 +From eb2ddd47359423163b1de3c5ec905dcbfc301ca1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 15 Nov 2019 08:48:08 +0000 -Subject: [PATCH 0368/1148] dwc_otg: Declare DMA capability with HCD_DMA flag +Subject: [PATCH 0366/1209] dwc_otg: Declare DMA capability with HCD_DMA flag Following [1], USB controllers have to declare DMA capabilities in order for them to be used by adding the HCD_DMA flag to their hc_driver @@ -340115,10 +340005,10 @@ index 9a150d6fdeb4..70cce7abfb8d 100644 2.18.4 -From 30652550b6b1418ac895d924c94f3e0315798e0d Mon Sep 17 00:00:00 2001 +From fff5ebc1b7a9270e55ea8118890997398ac47d07 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 31 Oct 2019 13:37:16 +0000 -Subject: [PATCH 0369/1148] rpi-poe-fan: fix def_pwm1 writes +Subject: [PATCH 0367/1209] rpi-poe-fan: fix def_pwm1 writes Signed-off-by: Serge Schneider --- @@ -340142,10 +340032,10 @@ index 3effaf2eb86d..c9654e9e9f2d 100644 2.18.4 -From 30104b1abfaf22c59c2a5b4911d45c2f199ddfda Mon Sep 17 00:00:00 2001 +From 4ba677f15c531061ea8eb82c4a4de28638cd3c95 Mon Sep 17 00:00:00 2001 From: James Hughes Date: Thu, 31 Oct 2019 14:39:44 +0000 -Subject: [PATCH 0370/1148] net:phy:2711 Allow ethernet LED mode to be set via +Subject: [PATCH 0368/1209] net:phy:2711 Allow ethernet LED mode to be set via device tree Add device tree entries and code to allow the specification of @@ -340273,10 +340163,10 @@ index f5881fb95a5b..8f26eaf2280c 100644 2.18.4 -From a525e6ba3c1d764ee332a450d672ebd7d7b46206 Mon Sep 17 00:00:00 2001 +From c0d889117a279378ee9a607ffc368ba7cd30a257 Mon Sep 17 00:00:00 2001 From: Pierre-jean Texier Date: Wed, 6 Nov 2019 10:00:43 +0100 -Subject: [PATCH 0371/1148] overlays: smi: fix typo in comment (#3320) +Subject: [PATCH 0369/1209] overlays: smi: fix typo in comment (#3320) 5 represent alt1 function not alt0. @@ -340302,10 +340192,10 @@ index 70104c11627c..bb8c7830df23 100644 2.18.4 -From 2eaeb93ce95f72dc4bf2e40753bdc5c6b31abb04 Mon Sep 17 00:00:00 2001 +From fe56a5d2ffd4d229b54ececacaf089959a5daaca Mon Sep 17 00:00:00 2001 From: James Hughes Date: Thu, 7 Nov 2019 14:59:59 +0000 -Subject: [PATCH 0372/1148] net:phy:2711 Change the default ethernet LED +Subject: [PATCH 0370/1209] net:phy:2711 Change the default ethernet LED actions This should return default behaviour back to that of previous @@ -340342,10 +340232,10 @@ index 8f26eaf2280c..ed394d48ea24 100644 2.18.4 -From d7ceeb35194d83e90717abc67e60308a8d85f8dd Mon Sep 17 00:00:00 2001 +From f9aafe9cf2a563bb3dc697b1980b2a01b2bb6345 Mon Sep 17 00:00:00 2001 From: Michael Kaplan Date: Fri, 8 Nov 2019 10:35:57 +0100 -Subject: [PATCH 0373/1148] overlays: Add apds9960 overlay +Subject: [PATCH 0371/1209] overlays: Add apds9960 overlay Add an overlay for the AVAGO APDS9960 digital proximity, ambient light, rgb and gesture sensor. Also update overlay README and Makefile. @@ -340456,10 +340346,10 @@ index 000000000000..c216932278ab 2.18.4 -From d6c07efa84b810bc389056f4253bf604230395c6 Mon Sep 17 00:00:00 2001 +From fb9bf5b21a2306da7ffc80f5f1941d7938791959 Mon Sep 17 00:00:00 2001 From: Michael Kaplan Date: Fri, 8 Nov 2019 11:13:25 +0100 -Subject: [PATCH 0374/1148] configs: apds9960: add module to defconfigs +Subject: [PATCH 0372/1209] configs: apds9960: add module to defconfigs Signed-off-by: Michael Kaplan --- @@ -340541,10 +340431,10 @@ index ca7668f549bc..d87831d79a03 100644 2.18.4 -From 1ee74f9df087aa5639443f0dc37d9860fb1f9137 Mon Sep 17 00:00:00 2001 +From 09e79b20f6428605909eeefbe270b8749f551c82 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 1 Oct 2019 10:19:50 +0100 -Subject: [PATCH 0375/1148] overlays: Remove hack from uart0 overlay +Subject: [PATCH 0373/1209] overlays: Remove hack from uart0 overlay The uart0 overlay contained a hack to return GPIOs 14 and 15 to inputs when the UART0 function was moved to alternative pins. This has the @@ -340592,10 +340482,10 @@ index 57ba7745d023..73d563bbaabf 100755 2.18.4 -From c84016dba9b0883d400308c5d720fef9e0199ccb Mon Sep 17 00:00:00 2001 +From 302b57b34eef768ce32ad5e4b35298a9eb74df95 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 13 Nov 2019 16:28:10 +0000 -Subject: [PATCH 0376/1148] Revert "brcmfmac: Disable power management" +Subject: [PATCH 0374/1209] Revert "brcmfmac: Disable power management" Shortly after the release of the Pi 3B, a loss of SSH connectivity over WiFi was traced to the power management handling, so power @@ -340637,10 +340527,10 @@ index 4b97dfcda3cd..4beef16e328f 100644 2.18.4 -From 5c566d305888d261ac0b2035301e7468f8a7460e Mon Sep 17 00:00:00 2001 +From d6cbe931df0d240c64f4d626a510e85754b90256 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 17 Nov 2019 16:20:24 +0000 -Subject: [PATCH 0377/1148] arm: dts: overlays: pitft35-resistive: add upstream +Subject: [PATCH 0375/1209] arm: dts: overlays: pitft35-resistive: add upstream compatible The upstream hx8357d driver uses "adafruit,yx350hv15" for the compatible @@ -340670,10 +340560,10 @@ index a69b6c2c7608..37629f18a740 100644 2.18.4 -From 91b55f198824eca5b243799e9a850df0a902f2c9 Mon Sep 17 00:00:00 2001 +From db0a30a645d453e2a30f6b26bc2218de54ddd61d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 23 Aug 2019 16:34:38 +0100 -Subject: [PATCH 0378/1148] v3d_drv: Handle missing clock more gracefully +Subject: [PATCH 0376/1209] v3d_drv: Handle missing clock more gracefully Signed-off-by: popcornmix --- @@ -340701,10 +340591,10 @@ index 72da17e4963e..8b08ad828fe7 100644 2.18.4 -From da4e2b66f5049027834ee171df167c1dbb00bcac Mon Sep 17 00:00:00 2001 +From 9d17ae4fc7217b4c4f66925a2d69286162573959 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 9 Sep 2019 23:50:44 +0100 -Subject: [PATCH 0379/1148] v3d_drv: Allow clock retrieval by name +Subject: [PATCH 0377/1209] v3d_drv: Allow clock retrieval by name Signed-off-by: Phil Elwell --- @@ -340730,10 +340620,10 @@ index 8b08ad828fe7..2f50268c0159 100644 2.18.4 -From 50d946b6fba64e2046280dfb1b154dcd01558fea Mon Sep 17 00:00:00 2001 +From 76c6ace9b74999ccb3eb26ee3ba15a087bf65f40 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 5 Sep 2019 17:59:14 +0100 -Subject: [PATCH 0380/1148] v3d_gem: Kick the clock so firmware knows we are +Subject: [PATCH 0378/1209] v3d_gem: Kick the clock so firmware knows we are using firmware clock interface Setting the v3d clock to low value allows firmware to handle dvfs in case @@ -340763,10 +340653,10 @@ index 8b5dc2b20e38..2d0626a52706 100644 2.18.4 -From df9e85be98479056c36d45216f0259c9b586242e Mon Sep 17 00:00:00 2001 +From 033622879133909afa6fdc5b1e0d507c307bf64f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 9 Sep 2019 15:49:56 +0100 -Subject: [PATCH 0381/1148] clk-raspberrypi: Allow cpufreq driver to also +Subject: [PATCH 0379/1209] clk-raspberrypi: Allow cpufreq driver to also adjust gpu clocks For performance/power it is beneficial to adjust gpu clocks with arm clock. @@ -340794,10 +340684,10 @@ index 1654fd0eedc9..e4e139240340 100644 2.18.4 -From 4c09b53c5630ec13667cb398399399de8ede6e80 Mon Sep 17 00:00:00 2001 +From 1eeac094f89ded316cd1a7ee97b6c8bb32fd0440 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 21 Aug 2019 14:55:56 +0100 -Subject: [PATCH 0382/1148] clk-raspberrypi: Also support v3d clock +Subject: [PATCH 0380/1209] clk-raspberrypi: Also support v3d clock Signed-off-by: popcornmix --- @@ -341447,10 +341337,10 @@ index e4e139240340..8daf26df5430 100644 2.18.4 -From b7ab08bc2d49d1392cfb17a7fccf2c2cedf5dec2 Mon Sep 17 00:00:00 2001 +From 5b4883f4c0aee5e3bebb00564a60d794f6389e3a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 3 Sep 2019 20:28:00 +0100 -Subject: [PATCH 0383/1148] clk-bcm2835: Disable v3d clock +Subject: [PATCH 0381/1209] clk-bcm2835: Disable v3d clock This is controlled by firmware, see clk-raspberrypi.c @@ -341460,10 +341350,10 @@ Signed-off-by: popcornmix 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c -index 30e548c0031c..e544e476bf84 100644 +index 3921480d89fd..8175ecea0fd9 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1732,16 +1732,12 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { +@@ -1734,16 +1734,12 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { .hold_mask = CM_PLLA_HOLDCORE, .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), @@ -341486,7 +341376,7 @@ index 30e548c0031c..e544e476bf84 100644 [BCM2835_PLLA_DSI0] = REGISTER_PLL_DIV( SOC_ALL, .name = "plla_dsi0", -@@ -2019,14 +2015,12 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { +@@ -2021,14 +2017,12 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { .int_bits = 6, .frac_bits = 0, .tcnt_mux = 3), @@ -341511,10 +341401,10 @@ index 30e548c0031c..e544e476bf84 100644 2.18.4 -From fea353c3a927cb1bb2b53478b34b3af3a6bb0ade Mon Sep 17 00:00:00 2001 +From 55b83e9a7e4f28f87c2a22ff31466968c8cb0d85 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 20 Aug 2019 17:53:47 +0100 -Subject: [PATCH 0384/1148] config: Switch to upstream cpufreq driver +Subject: [PATCH 0382/1209] config: Switch to upstream cpufreq driver Signed-off-by: popcornmix --- @@ -341547,10 +341437,10 @@ index 5f08fcdb02b1..3d437a331698 100644 2.18.4 -From 6a2d51c2af7d4e18431a145d9cd6bfddfa4b9f0a Mon Sep 17 00:00:00 2001 +From 895cb88a1f5ed40c518bd361cc64a71cddaadde8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 13 Sep 2019 13:45:11 +0100 -Subject: [PATCH 0385/1148] raspberrypi-cpufreq: Only report integer pll +Subject: [PATCH 0383/1209] raspberrypi-cpufreq: Only report integer pll divisor frequencies --- @@ -341593,10 +341483,10 @@ index 2bc7d9734272..8bcfab2749a8 100644 2.18.4 -From ea3114a55f2c34963f62f5d752eb663dd2a18c84 Mon Sep 17 00:00:00 2001 +From 65184f3bf3b35a7c504468003d0f09ddfcfcc86d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 22 Nov 2019 11:38:09 +0000 -Subject: [PATCH 0386/1148] configs: Regenerate defconfigs +Subject: [PATCH 0384/1209] configs: Regenerate defconfigs Signed-off-by: Phil Elwell --- @@ -341830,10 +341720,10 @@ index d87831d79a03..7a29553d08d6 100644 2.18.4 -From d297eb0b44fb8235fef4d060ca3d36d83c3a6212 Mon Sep 17 00:00:00 2001 +From f1a9b7e0d7e850517e9b31d93c2bd8309fc24c53 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 22 Nov 2019 11:44:30 +0000 -Subject: [PATCH 0387/1148] configs:2711: Add V3D clock support on arm64 +Subject: [PATCH 0385/1209] configs:2711: Add V3D clock support on arm64 The V3D driver now depends on the CLK_RASPBERRYPI and ARM_RASPBERRYPI_CPUFREQ drivers for dynamic clock control. Without @@ -341869,10 +341759,10 @@ index edab9acd21c8..cbdad7c47bf3 100644 2.18.4 -From 44a3a2498e16dcdc64f2dafacd2b0f8cea15b4ef Mon Sep 17 00:00:00 2001 +From 314e16c3d4e1c99646510ee946ca7ad889b18c05 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 22 Nov 2019 15:08:25 +0000 -Subject: [PATCH 0388/1148] arm/dts: Correct Pi 4B LED values +Subject: [PATCH 0386/1209] arm/dts: Correct Pi 4B LED values The initial PHY LED settings are wrong Pi 4B (the correct values got dropped somewhere along the way). The PHY declaration should arguably @@ -341916,10 +341806,10 @@ index bacebaaac9d3..d9a09e129656 100644 2.18.4 -From 30db632c58c74ae33aea4013fbaf1052bd640666 Mon Sep 17 00:00:00 2001 +From b6441eed76a3337814f92726289c007411dbf1b1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 22 Nov 2019 16:23:32 +0000 -Subject: [PATCH 0389/1148] drm/v3d: Set dma_mask as well as coherent_dma_mask +Subject: [PATCH 0387/1209] drm/v3d: Set dma_mask as well as coherent_dma_mask Both coherent_dma_mask and dma_mask act as constraints on allocations and bounce buffer usage, so be sure to set dma_mask to the appropriate @@ -341949,10 +341839,10 @@ index 2f50268c0159..87ce683f3c04 100644 2.18.4 -From d877f11b5c4dc06c12a060de9f2657c1b3f09777 Mon Sep 17 00:00:00 2001 +From dbe43be8e0ecdefbed30b771582654aa41fb35b7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 28 Nov 2019 15:49:08 +0000 -Subject: [PATCH 0390/1148] arm/dts: 2711: Add 'pcie0' alias +Subject: [PATCH 0388/1209] arm/dts: 2711: Add 'pcie0' alias It is useful for the firmware to be able to locate the pcie DT node, so add an alias pointing to it in the same way that "ethernet0" @@ -341979,10 +341869,10 @@ index 6ce9a58a6ed5..a967a7b86f2c 100644 2.18.4 -From a84de0ad8c7e2052510028dbb5485f3a04facdf7 Mon Sep 17 00:00:00 2001 +From d9f895d5e19c47a27b5f181332e4853e5e94f57c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 28 Nov 2019 15:51:58 +0000 -Subject: [PATCH 0391/1148] Revert "drm/vc4: Add support for H & V flips" +Subject: [PATCH 0389/1209] Revert "drm/vc4: Add support for H & V flips" This reverts commit 3293cb5284bf7c80217cba8e7c3f67fba1953e1d. This functionality has already been added via @@ -342093,10 +341983,10 @@ index f21c03f550e5..1c5eef3ac441 100644 2.18.4 -From e55ade7141b791ffa161831cf5cddfd56c881115 Mon Sep 17 00:00:00 2001 +From 9d5b3b296282bdbd5e880e100a790a4237a07c8f Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sat, 30 Nov 2019 23:10:26 +0100 -Subject: [PATCH 0392/1148] rpi-cirrus-wm5102-overlay: fix pinctrl +Subject: [PATCH 0390/1209] rpi-cirrus-wm5102-overlay: fix pinctrl configuration Separate GPIOs connected to wm5102 and wm8804 into 2 pinctrl @@ -342223,10 +342113,10 @@ index e2c25a0535e6..1cbf5812af35 100644 2.18.4 -From 5934aeeceb809fdc76d8dc4fe1400cd100fcdb80 Mon Sep 17 00:00:00 2001 +From 8e35a7bce89eb22e4540fb4be68d9b87503dbc58 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 29 Jan 2019 16:13:25 +0000 -Subject: [PATCH 0393/1148] staging: vchiq_arm: Set up dma ranges on child +Subject: [PATCH 0391/1209] staging: vchiq_arm: Set up dma ranges on child devices The VCHIQ driver now loads the audio, camera, codec, and vc-sm @@ -342262,10 +342152,10 @@ index d9492e24e07d..d556f42f575a 100644 2.18.4 -From cdcbf2af562a13cb8fcc8c95d6ed164e0203483a Mon Sep 17 00:00:00 2001 +From 156173e7d14eddd0b05930eed3c4e2b3f93745c0 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 18 Jun 2019 12:15:50 +0100 -Subject: [PATCH 0394/1148] staging: vchiq: Use the old dma controller for OF +Subject: [PATCH 0392/1209] staging: vchiq: Use the old dma controller for OF config on platform devices vchiq on Pi4 is no longer under the soc node, therefore it @@ -342319,10 +342209,10 @@ index d556f42f575a..d84f7324fe14 100644 2.18.4 -From 728e893ef8f498d58622d8662137026cf47f865d Mon Sep 17 00:00:00 2001 +From 902593ec595b0ea41a12ce4f3161b5e3b4f5ad81 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 5 Dec 2019 16:34:39 +0000 -Subject: [PATCH 0395/1148] Revert "staging: bcm2835_camera: Ensure all buffers +Subject: [PATCH 0393/1209] Revert "staging: bcm2835_camera: Ensure all buffers are returned on disable" This reverts commit d70c57a7c6a069977a0d827e1d5e2de53fb87e6d. @@ -342352,10 +342242,10 @@ index 341594ab669f..61a3593cdcfc 100644 2.18.4 -From 10166cc311296cc4d4d51ed315fbd0880daaa2aa Mon Sep 17 00:00:00 2001 +From f9aebac2075e8694e01678f4d6e7db301967d5ac Mon Sep 17 00:00:00 2001 From: Hui Wang Date: Sun, 17 Nov 2019 10:31:46 +0800 -Subject: [PATCH 0396/1148] dwc_otg: checking the urb->transfer_buffer too +Subject: [PATCH 0394/1209] dwc_otg: checking the urb->transfer_buffer too early (#3332) After enable the HIGHMEM and VMSPLIT_3G, the dwc_otg driver doesn't @@ -342417,10 +342307,10 @@ index 70cce7abfb8d..eda7a33908b3 100644 2.18.4 -From 676620091504eb1c1b480b93f4d7532a50e84f86 Mon Sep 17 00:00:00 2001 +From 59e0f24ba2be7dc2415d46a23a51bd9090841fbd Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 9 Dec 2019 12:32:20 +0000 -Subject: [PATCH 0397/1148] overlays: Make mcp342x run-time compatible +Subject: [PATCH 0395/1209] overlays: Make mcp342x run-time compatible The order of processing of run-time overlays differs from that done by the firmware. This means that certain parameter processing techniques @@ -342632,10 +342522,10 @@ index 7bbb528f804f..714eca5a4b5e 100644 2.18.4 -From 76db7c11f90a905fcb69f62e38322e3ac72d066b Mon Sep 17 00:00:00 2001 +From da3f40231cbaf187105c4ac832265bd74bc1a622 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 29 Nov 2019 16:37:26 +0000 -Subject: [PATCH 0398/1148] config: arm64: Switch to upstream cpufreq driver +Subject: [PATCH 0396/1209] config: arm64: Switch to upstream cpufreq driver Signed-off-by: popcornmix --- @@ -342660,10 +342550,10 @@ index cbdad7c47bf3..7c14f88445a8 100644 2.18.4 -From 4bab2425a8b906b61d5c3243aefd657aec660e69 Mon Sep 17 00:00:00 2001 +From 38e4126aa8d8c059697bd87cc74e325e3e20621a Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Mon, 16 Dec 2019 23:25:44 +0100 -Subject: [PATCH 0399/1148] rpi-cirrus-wm5102-overlay: use reset-gpios instead +Subject: [PATCH 0397/1209] rpi-cirrus-wm5102-overlay: use reset-gpios instead of wlf,reset wlf,reset has been deprecated in favour of the standard reset-gpios @@ -342692,10 +342582,10 @@ index 1cbf5812af35..ed0c2745399f 100644 2.18.4 -From 9ae36de01339d1113ea43d5c824b8409b5b20751 Mon Sep 17 00:00:00 2001 +From ebd3977edb25d7498683dff8cfdf65fd817fc011 Mon Sep 17 00:00:00 2001 From: Johannes Krude Date: Sat, 16 Nov 2019 12:41:06 +0100 -Subject: [PATCH 0400/1148] sound/soc: only first codec is master in multicodec +Subject: [PATCH 0398/1209] sound/soc: only first codec is master in multicodec setup When using multiple codecs, at most one codec should generate the master @@ -342732,10 +342622,10 @@ index 0b9f9a06bdb5..dd7fdb53cd64 100644 2.18.4 -From 4184c1fff6362f7b8ceb30e8535af7d50b2a9d51 Mon Sep 17 00:00:00 2001 +From 03d3632250d510a5963ab08612ea948b97991485 Mon Sep 17 00:00:00 2001 From: Johannes Krude Date: Sat, 16 Nov 2019 13:14:43 +0100 -Subject: [PATCH 0401/1148] Allow simultaneous use of JustBoom DAC and Digi +Subject: [PATCH 0399/1209] Allow simultaneous use of JustBoom DAC and Digi Signed-off-by: Johannes Krude --- @@ -343247,10 +343137,10 @@ index 000000000000..3d0194c1cab8 2.18.4 -From 5e9a557a01ff64dc561ce4fcf1dea1dd402a22b9 Mon Sep 17 00:00:00 2001 +From 6678a544b591fd6b5bfb3a499cb9cbc097f98656 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 18 Dec 2019 10:41:33 +0000 -Subject: [PATCH 0402/1148] overlays: dht11: Allow multiple instantiation +Subject: [PATCH 0400/1209] overlays: dht11: Allow multiple instantiation Add addresses to the dht11 and dht11_pins nodes to allow unique names to be generated by assigning to the "reg" property. @@ -343287,10 +343177,10 @@ index 8de67527e317..6feeeb402493 100644 2.18.4 -From a6c493ca1caa6af64363880e5215778f50688220 Mon Sep 17 00:00:00 2001 +From 7c961b60728839eb818ceb1155141e1a89e79851 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 20 Dec 2019 15:50:19 +0000 -Subject: [PATCH 0403/1148] configs: Add CONFIG_NET_SCH_CAKE=m +Subject: [PATCH 0401/1209] configs: Add CONFIG_NET_SCH_CAKE=m See: https://github.com/raspberrypi/linux/issues/3180 @@ -343367,10 +343257,10 @@ index cfef51db953a..10cf5ac4b833 100644 2.18.4 -From 28fa9ca8bf9b0a975da6e6c36d983adb7894058b Mon Sep 17 00:00:00 2001 +From c380be70f397f3cf2d44c52f9222206e64674e1f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Sun, 22 Dec 2019 15:13:37 +0000 -Subject: [PATCH 0404/1148] configs: Add RTS_DRV_PCF85363 +Subject: [PATCH 0402/1209] configs: Add RTS_DRV_PCF85363 See: https://github.com/raspberrypi/firmware/issues/1309 @@ -343447,10 +343337,10 @@ index 10cf5ac4b833..d8efa2d79d10 100644 2.18.4 -From 9e3a486f33ec548bc16c1f085c62cdd3443056c1 Mon Sep 17 00:00:00 2001 +From 227a4eaaaeb13e8627b5ffe300ffe848b9d92e76 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Sun, 22 Dec 2019 15:29:40 +0000 -Subject: [PATCH 0405/1148] overlays: i2c-rtc: Add pcf85363 support +Subject: [PATCH 0403/1209] overlays: i2c-rtc: Add pcf85363 support See: https://github.com/raspberrypi/firmware/issues/1309 @@ -343511,10 +343401,10 @@ index af5ca042de75..5df390b52a7b 100644 2.18.4 -From 6f37e021a1f0cd8c8ddfbf84457b413b352f1f18 Mon Sep 17 00:00:00 2001 +From ee4a1fdc181b3d8152b79c3da5120855587b746e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 6 Jan 2020 16:04:30 +0000 -Subject: [PATCH 0406/1148] pinctrl: bcm2835: Remove gpiochip on error +Subject: [PATCH 0404/1209] pinctrl: bcm2835: Remove gpiochip on error A failure in gpiochip_irqchip_add leads to a leak of a gpiochip. Fix the leak with the use of devm_gpiochip_add_data. @@ -343542,10 +343432,10 @@ index 4ce2dd704c13..c8db202f239d 100644 2.18.4 -From 0f01cc80613bab879532cc7a83a50dc8d68d29e5 Mon Sep 17 00:00:00 2001 +From 8d2b50683a7a6b05365124eb026ab991ea5a432f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 6 Jan 2020 14:05:42 +0000 -Subject: [PATCH 0407/1148] pinctrl: bcm2835: Change init order for gpio hogs +Subject: [PATCH 0405/1209] pinctrl: bcm2835: Change init order for gpio hogs pinctrl-bcm2835 is a combined pinctrl/gpio driver. Currently the gpio side is registered first, but this breaks gpio hogs (which are @@ -343636,10 +343526,10 @@ index c8db202f239d..cf308212feca 100644 2.18.4 -From a1e547b3449d2d6cf2125f707d76309423eb5f0a Mon Sep 17 00:00:00 2001 +From ae7e20cb963bfe6a2a423b9903aab7791124c6e4 Mon Sep 17 00:00:00 2001 From: Giedrius Date: Tue, 7 Jan 2020 11:04:21 +0200 -Subject: [PATCH 0408/1148] Pisound: MIDI communication fixes for scaled down +Subject: [PATCH 0406/1209] Pisound: MIDI communication fixes for scaled down CPU. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -343742,10 +343632,10 @@ index 6af9921b55c7..c9a881cf8f7c 100644 2.18.4 -From 9ed3b9b37c19e80ef639acb1d0fc70f205234032 Mon Sep 17 00:00:00 2001 +From 7294d237638f3ecab2140e066e71a0342d6c4642 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 8 Jan 2020 17:21:09 +0000 -Subject: [PATCH 0409/1148] pcie-brcmstb: Eliminate arch_dma_ops error message +Subject: [PATCH 0407/1209] pcie-brcmstb: Eliminate arch_dma_ops error message The driver attempts to set the dma_ops for the root complex, but doing so causes an error message and only the end points need it. Fix the @@ -343896,10 +343786,10 @@ index e8c8b355548a..e646818ff21c 100644 2.18.4 -From 698ad9c575cdad0364a54931a05ec128057c11a5 Mon Sep 17 00:00:00 2001 +From dac201e1f06b778f208cb1c65d732015fe5f1f71 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Jan 2020 14:15:39 +0000 -Subject: [PATCH 0410/1148] brcmfmac: Disable power management +Subject: [PATCH 0408/1209] brcmfmac: Disable power management Disable power management in the brcmfmac driver again as it is still causing problems for some users. @@ -343933,10 +343823,10 @@ index 4beef16e328f..4b97dfcda3cd 100644 2.18.4 -From e8589cb359d291e79b8a798e56f47eeb081720f4 Mon Sep 17 00:00:00 2001 +From 6d71c2ee9b0ef01f30edb265b22414fdfa55ef6e Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sun, 8 Dec 2019 14:45:14 +0100 -Subject: [PATCH 0411/1148] Revert "mmc: sdhci: Mask "spurious" interrupts" +Subject: [PATCH 0409/1209] Revert "mmc: sdhci: Mask "spurious" interrupts" This reverts commit adac895210b88770190e9a501462f2100ab40ac8, because this issue is already addressed by commit 19ec6bb80290e496021488084944b77f03a87dd7. @@ -343947,10 +343837,10 @@ Signed-off-by: Stefan Wahren 1 file changed, 4 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c -index 07af68d5afa0..136f9737713d 100644 +index c140c8dfd56e..a1aeb2e10564 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c -@@ -3104,10 +3104,6 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) +@@ -3106,10 +3106,6 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) result = IRQ_WAKE_THREAD; } @@ -343965,10 +343855,10 @@ index 07af68d5afa0..136f9737713d 100644 2.18.4 -From 0d98c6cf283ac7c74e1174ee0b4404622c05f0cc Mon Sep 17 00:00:00 2001 +From f62b6b6de8ee1b31bae9d1b1048620d49ce116bb Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Fri, 16 Aug 2019 22:32:02 +0200 -Subject: [PATCH 0412/1148] ARM: dts: bcm283x: Remove simple-bus from fixed +Subject: [PATCH 0410/1209] ARM: dts: bcm283x: Remove simple-bus from fixed clocks commit 4b2d24662126b1e2a6b95c9dfe9e9044e105e5bd upstream. @@ -344022,10 +343912,10 @@ index f0dbd6af90fa..701123c5f6ee 100644 2.18.4 -From 32b0e8f654dd84425638488db275006e645c3d52 Mon Sep 17 00:00:00 2001 +From 1168ccc544584d5af7a3b0960dace532584dd965 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Fri, 27 Dec 2019 11:15:00 +0100 -Subject: [PATCH 0413/1148] ARM: dts: bcm283x: Move system timer back to +Subject: [PATCH 0411/1209] ARM: dts: bcm283x: Move system timer back to bcm283x.dtsi During Raspberry Pi 4 upstream discussion Tim Gover confirmed that the @@ -344105,10 +343995,10 @@ index 701123c5f6ee..c9f405a0f5ec 100644 2.18.4 -From c257a2697cd6f777bf81ed45002b1bf82bdcd93f Mon Sep 17 00:00:00 2001 +From eb0a377bcabf44f2bbd396a54ba549dfe05351bb Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Fri, 27 Dec 2019 16:06:13 +0100 -Subject: [PATCH 0414/1148] ARM: dts: bcm283x: Move pixelvalve to +Subject: [PATCH 0412/1209] ARM: dts: bcm283x: Move pixelvalve to bcm2835-common.dtsi According to Eric Anholt the pixelvalves doesn't exists on BCM2711. @@ -344227,10 +344117,10 @@ index c9f405a0f5ec..1a78bd08c19e 100644 2.18.4 -From 07712998439f8c02e5b98a5ad71f5658756f5dd3 Mon Sep 17 00:00:00 2001 +From 07cc8653f65a260ff951fc5144aa91532e3f50b8 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Wed, 25 Dec 2019 15:32:29 +0100 -Subject: [PATCH 0415/1148] ARM: dts: bcm2838-rpi-4-b: Fix memory node +Subject: [PATCH 0413/1209] ARM: dts: bcm2838-rpi-4-b: Fix memory node We need to declare the proper device type, otherwise U-Boot won't boot with this devicetree. While we are this let the bootloader set the actual @@ -344259,10 +344149,10 @@ index 7170a97bd3e4..35502763882e 100644 2.18.4 -From aa4e8d4a893c7a6452a76392e825dd2db369cb3e Mon Sep 17 00:00:00 2001 +From a506376b3a56d1bdbeefe12215c50c34f92a2b42 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Wed, 25 Dec 2019 15:43:41 +0100 -Subject: [PATCH 0416/1148] ARM: dts: bcm2838-rpi-4-b: Backport BT part from +Subject: [PATCH 0414/1209] ARM: dts: bcm2838-rpi-4-b: Backport BT part from upstream The CYW43455 on the Raspberry Pi 4 doesn't use an external pin as lower @@ -344292,10 +344182,10 @@ index 35502763882e..e65f924e1fd2 100644 2.18.4 -From 9cc66bea1d9a5fc814f9b7a830ef284336ca284c Mon Sep 17 00:00:00 2001 +From 7e8e7a122353134d0318c53eb6a12799ed5b0321 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Wed, 25 Dec 2019 15:55:29 +0100 -Subject: [PATCH 0417/1148] ARM: dts: bcm2838: Backport node names from +Subject: [PATCH 0415/1209] ARM: dts: bcm2838: Backport node names from upstream According to devicetree specification the node name should describe @@ -344341,10 +344231,10 @@ index f7b64e077043..9b6edd6af4f2 100644 2.18.4 -From cd6a18744098134a08431b2348cf11c30f9eccbc Mon Sep 17 00:00:00 2001 +From 566b75b5ee73cc6eacaba459033b13db93fd7e8a Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Wed, 25 Dec 2019 18:01:57 +0100 -Subject: [PATCH 0418/1148] ARM: dts: bcm283x: Move intc label to +Subject: [PATCH 0416/1209] ARM: dts: bcm283x: Move intc label to bcm2835-common.dtsi The intc label isn't defined in bcm283x.dtsi, so we cannot use it there. @@ -344385,10 +344275,10 @@ index 1a78bd08c19e..3706a795b586 100644 2.18.4 -From 6b74f8f959b1e69f2a3e55024de0d923c92e671f Mon Sep 17 00:00:00 2001 +From 80336b687098c3fbbc5662c9876919d1855564aa Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Wed, 25 Dec 2019 18:19:28 +0100 -Subject: [PATCH 0419/1148] ARM: dts: bcm2838: Remove always-on from +Subject: [PATCH 0417/1209] ARM: dts: bcm2838: Remove always-on from armv7-timer After moving bcm2835-system-timer to bcm283x.dtsi there is no need for @@ -344415,10 +344305,10 @@ index 9b6edd6af4f2..bfde2a2ad3d0 100644 2.18.4 -From 1c0c38ad75bcfa7b335c5bc688078277aacd0389 Mon Sep 17 00:00:00 2001 +From dd2f37a083e27ff4a6862e43b3f2f0b5eede5097 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Fri, 27 Dec 2019 13:48:08 +0100 -Subject: [PATCH 0420/1148] Revert "phy: bcm54213pe: configure the LED outputs +Subject: [PATCH 0418/1209] Revert "phy: bcm54213pe: configure the LED outputs to be more user-friendly" This reverts commit 0f6693225eee62ee01c479c86fff76442979f906. @@ -344481,10 +344371,10 @@ index d7ebafbb3221..bfb37218f435 100644 2.18.4 -From 2ce43cf9d0efc91fec21c063ce11c24d2281df5b Mon Sep 17 00:00:00 2001 +From 40ee7045b8c59b269b5857fda282cd96a16d9c82 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Fri, 27 Dec 2019 13:48:32 +0100 -Subject: [PATCH 0421/1148] Revert "phy: broadcom: split out the BCM54213PE +Subject: [PATCH 0419/1209] Revert "phy: broadcom: split out the BCM54213PE from the BCM54210E IDs" This reverts commit a377688aa4f69ebfe75c9dfc986e7d19605eb39f. @@ -344555,10 +344445,10 @@ index bfb37218f435..6db2d9a6e503 100644 2.18.4 -From 940289ed6d47691d3c697e281c48d2aeecb37688 Mon Sep 17 00:00:00 2001 +From 55613aa67c19cc82197ba2643d3bfd4f8cad5f1d Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Wed, 25 Dec 2019 16:35:54 +0100 -Subject: [PATCH 0422/1148] net: bcmgenet: Add RGMII_RXID support +Subject: [PATCH 0420/1209] net: bcmgenet: Add RGMII_RXID support This adds the missing support for the PHY mode RGMII_RXID. It's necessary for the Raspberry Pi 4. @@ -344589,10 +344479,10 @@ index 3ba733295718..0516d14f4703 100644 2.18.4 -From 8f5306e60037b7c69a84eab30cb37eda1715b79b Mon Sep 17 00:00:00 2001 +From 5cfc2ea1ef1a3e5d27803070fabd5141280db6df Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Wed, 25 Dec 2019 16:40:47 +0100 -Subject: [PATCH 0423/1148] ARM: dts: bcm2838: Backport genet from upstream +Subject: [PATCH 0421/1209] ARM: dts: bcm2838: Backport genet from upstream This backport all genet differences (different compatible, right PHY mode, board specific stuff) from upstream. @@ -344696,10 +344586,10 @@ index bfde2a2ad3d0..e6c79a2949e5 100644 2.18.4 -From 70b0e0f46c1bf72c18ae90d9f81fa54b2d041744 Mon Sep 17 00:00:00 2001 +From 0f8ee9591d684f044816f9edbb1c3a254e7f6d49 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Fri, 27 Dec 2019 11:40:56 +0100 -Subject: [PATCH 0424/1148] ARM: bcm: Backport BCM2711 support from upstream +Subject: [PATCH 0422/1209] ARM: bcm: Backport BCM2711 support from upstream Make the BCM2711 a different machine, but keep it in board_bcm2835. @@ -344772,7 +344662,7 @@ index 0ec49d857134..b7491ddb6841 100644 .smp = smp_ops(bcm2836_smp_ops), MACHINE_END diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms -index 16d761475a86..63b463b88040 100644 +index 9dccf4db319b..a65d89ff6a37 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -37,11 +37,12 @@ config ARCH_BCM2835 @@ -344794,10 +344684,10 @@ index 16d761475a86..63b463b88040 100644 2.18.4 -From 09fae8e9b93957235eeb4d51d175c8b0b5032818 Mon Sep 17 00:00:00 2001 +From 8c2c3244a16a79871278dff73427399e4d0c8345 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Fri, 27 Dec 2019 11:55:59 +0100 -Subject: [PATCH 0425/1148] hwrng: iproc-rng200 - Add support for BCM2711 +Subject: [PATCH 0423/1209] hwrng: iproc-rng200 - Add support for BCM2711 commit 0f95b09a5f624964d520c8f6a2674090fb98ae25 upstream. @@ -344829,10 +344719,10 @@ index f971a4cb8951..7b6966b7f602 100644 2.18.4 -From dc2c3bb43382fdd511bff6cfc2aacc67fd7d29c3 Mon Sep 17 00:00:00 2001 +From 42d2cf903ad8a21d06b23c8481fe598b74137c28 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Fri, 27 Dec 2019 12:01:17 +0100 -Subject: [PATCH 0426/1148] ARM: dts: bcm2838: Add upstream RNG compatible +Subject: [PATCH 0424/1209] ARM: dts: bcm2838: Add upstream RNG compatible This adds the ability to use the RNG with an upstream kernel. Keep the old one for backward compatibility. @@ -344859,10 +344749,10 @@ index e6c79a2949e5..60c706b4def0 100644 2.18.4 -From ceb9499fab562c2650f5b686b461ae8656253284 Mon Sep 17 00:00:00 2001 +From 75601ffdf774aab99b5a5a94bd54adf866a951a0 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 15 Jan 2020 13:59:57 +0000 -Subject: [PATCH 0427/1148] driver: char: rpivid: Destroy the legacy device on +Subject: [PATCH 0425/1209] driver: char: rpivid: Destroy the legacy device on remove The legacy name support created a new device that was never destroyed. @@ -344891,10 +344781,10 @@ index e4e5fb1fb820..f69047d6f964 100644 2.18.4 -From 1c047c7d29d44d6e96af86ac0e3f9aa88e06c6ce Mon Sep 17 00:00:00 2001 +From a3364075be7d685e76aab1f64d52170a6135a254 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 21 Jan 2020 16:24:45 +0000 -Subject: [PATCH 0428/1148] driver: char: rpivid: Clean up error handling use +Subject: [PATCH 0426/1209] driver: char: rpivid: Clean up error handling use of ERR_PTR/IS_ERR The driver used an unnecessary intermediate void* variable so it @@ -344959,10 +344849,10 @@ index f69047d6f964..ab42526ea8cf 100644 2.18.4 -From a1aca4c0dfa6a0999d961d79624fd8d454aa3c7b Mon Sep 17 00:00:00 2001 +From fcf0704ead5470b2331e6189ededec1b61085ba5 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 15 Jan 2020 14:02:43 +0000 -Subject: [PATCH 0429/1148] driver: char: rpivid: Add error handling to the +Subject: [PATCH 0427/1209] driver: char: rpivid: Add error handling to the legacy device load The return value from device_create for the legacy device was never @@ -345007,10 +344897,10 @@ index ab42526ea8cf..331e2e72aa4b 100644 2.18.4 -From 6b7a18240ec0bc69c039adbf1d0313c52d34e222 Mon Sep 17 00:00:00 2001 +From 00a7be83f6f300ccbe8b33578862c05749482c33 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 15 Jan 2020 14:05:45 +0000 -Subject: [PATCH 0430/1148] driver: char: rpivid: Fix coding style whitespace +Subject: [PATCH 0428/1209] driver: char: rpivid: Fix coding style whitespace issues. Makes checkpatch happier. @@ -345044,10 +344934,10 @@ index 331e2e72aa4b..432fb05944f2 100644 2.18.4 -From 2d23709b6df4dfcc24fe7de0c39c3d727c8ccec6 Mon Sep 17 00:00:00 2001 +From 59baed40a22d09abb368f4beaff09b347804cae5 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 15 Jan 2020 14:07:16 +0000 -Subject: [PATCH 0431/1148] driver: char: rpimem: Add SPDX licence header. +Subject: [PATCH 0429/1209] driver: char: rpimem: Add SPDX licence header. Stops checkpatch complaining. @@ -345069,10 +344959,10 @@ index 432fb05944f2..fa97649b86c0 100644 2.18.4 -From de9a7e8234d803b013e27dfa102c6c3b9d1519fd Mon Sep 17 00:00:00 2001 +From 6eafce90565373a320547ac7c64799900d6e11fa Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 21 Jan 2020 16:44:14 +0000 -Subject: [PATCH 0432/1148] driver: char: rpivid: Fix access to freed memory +Subject: [PATCH 0430/1209] driver: char: rpivid: Fix access to freed memory The error path during probe frees the private memory block, and then promptly dereferences it to log an error message. @@ -345102,10 +344992,10 @@ index fa97649b86c0..fbf3d4f3fe0c 100644 2.18.4 -From 5ab4921d9a88f13b93be1a6e762ed1893fcb9664 Mon Sep 17 00:00:00 2001 +From 32a59acfc1d560b45c4c81a3d56c5305fd8104dd Mon Sep 17 00:00:00 2001 From: Willem Remie Date: Thu, 9 Jan 2020 21:16:49 +0100 -Subject: [PATCH 0433/1148] add BME680 to i2c-sensor overlay +Subject: [PATCH 0431/1209] add BME680 to i2c-sensor overlay --- arch/arm/boot/dts/overlays/README | 7 +++++-- @@ -345177,10 +345067,10 @@ index 777e4a68190a..40881d72a157 100644 2.18.4 -From 41e635aa4f20d60223f0476c878b26e4f1d96854 Mon Sep 17 00:00:00 2001 +From cef33fac7527eb88f823b1b25ad1a4ae7f9ba01b Mon Sep 17 00:00:00 2001 From: Willem Remie Date: Thu, 9 Jan 2020 21:54:11 +0100 -Subject: [PATCH 0434/1148] configs: Add BME680 +Subject: [PATCH 0432/1209] configs: Add BME680 --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -345254,10 +345144,10 @@ index d8efa2d79d10..48eb2e6e342b 100644 2.18.4 -From 83267a3aca2f788e8ab08f864cb7170aa01b2594 Mon Sep 17 00:00:00 2001 +From 3b6f8b9a9b71ae3f6fbeb8849edb4b1740f0e11d Mon Sep 17 00:00:00 2001 From: Jonathan Bell Date: Tue, 7 Jan 2020 10:08:19 +0000 -Subject: [PATCH 0435/1148] dwc_otg: constrain endpoint max packet and transfer +Subject: [PATCH 0433/1209] dwc_otg: constrain endpoint max packet and transfer size on split IN The hcd would unconditionally set the transfer length to the endpoint @@ -345303,10 +345193,10 @@ index 9f2cd510c301..cba2aa07e8b8 100644 2.18.4 -From 0ce9abee0ac15fd95f23e22e91ab61930b64a45a Mon Sep 17 00:00:00 2001 +From fa550d7dd7324c6f0b15577db8958d8546c2002e Mon Sep 17 00:00:00 2001 From: Jonathan Bell Date: Wed, 8 Jan 2020 12:48:09 +0000 -Subject: [PATCH 0436/1148] dwc_otg: fiq_fsm: pause when cancelling split +Subject: [PATCH 0434/1209] dwc_otg: fiq_fsm: pause when cancelling split transactions Non-periodic splits will DMA to/from the driver-provided transfer_buffer, @@ -345406,10 +345296,10 @@ index 0e9a34fe3a5c..7a77977c9ddf 100644 2.18.4 -From 1b821bb02cad86a71a570c1b1e0d3d8e38ade4a8 Mon Sep 17 00:00:00 2001 +From c3c9e0092293cf141c9abf0ce0ef6eeb1451d5f5 Mon Sep 17 00:00:00 2001 From: Jonathan Bell Date: Mon, 13 Jan 2020 15:54:55 +0000 -Subject: [PATCH 0437/1148] dwc_otg: fiq_fsm: add a barrier on entry into FIQ +Subject: [PATCH 0435/1209] dwc_otg: fiq_fsm: add a barrier on entry into FIQ handler(s) On BCM2835, there is no hardware guarantee that multiple outstanding @@ -345461,10 +345351,10 @@ index a86d8ed77140..490a7801e737 100644 2.18.4 -From f6c6fcc1bc958693f82ba42ae95b6db1a8e299a4 Mon Sep 17 00:00:00 2001 +From 2ec2a030cbd4984c9f432ef97e52853443495c74 Mon Sep 17 00:00:00 2001 From: Ed Spiridonov Date: Tue, 10 Dec 2019 22:45:04 +0300 -Subject: [PATCH 0438/1148] Add universal device tree overlay for SPI devices +Subject: [PATCH 0436/1209] Add universal device tree overlay for SPI devices Just specify the SPI address and device name ("compatible" property). This overlay lacks any device-specific parameter support! @@ -345745,11 +345635,11 @@ index 000000000000..87523dcca318 2.18.4 -From 1839147568f33433060519bdd963bc530eb97edb Mon Sep 17 00:00:00 2001 +From 90414e262615101060c4f4a283fec8ac4c28d40e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Schambacher?= Date: Tue, 21 Jan 2020 15:58:39 +0100 -Subject: [PATCH 0439/1148] sound: Add the HiFiBerry DAC+HD version +Subject: [PATCH 0437/1209] sound: Add the HiFiBerry DAC+HD version This adds the driver for the DAC+HD version supporting HiFiBerry's PCM179x based DACs. It also adds PLL control for clock generation. @@ -346636,10 +346526,10 @@ index 000000000000..79436dd0e06d 2.18.4 -From f7cadfc40e23b2e9ef13b040e376727dbd538523 Mon Sep 17 00:00:00 2001 +From 4925568f559e4f81377f1757933912187b274f94 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 21 Jan 2020 15:02:05 +0000 -Subject: [PATCH 0440/1148] configs: Add missing HIFIBERRYs to +Subject: [PATCH 0438/1209] configs: Add missing HIFIBERRYs to bcmrpi3_defconfig Signed-off-by: Phil Elwell @@ -346665,10 +346555,10 @@ index 3adf9e47b802..ff65bc543f61 100644 2.18.4 -From 90489a52611c834325239ede5345d56ae76cb929 Mon Sep 17 00:00:00 2001 +From 0d3863ed75c79a4485c094b4500370133439e4f2 Mon Sep 17 00:00:00 2001 From: Luke Hinds <7058938+lukehinds@users.noreply.github.com> Date: Wed, 22 Jan 2020 16:03:00 +0000 -Subject: [PATCH 0441/1148] Initialise rpi-firmware before clk-bcm2835 +Subject: [PATCH 0439/1209] Initialise rpi-firmware before clk-bcm2835 The IMA (Integrity Measurement Architecture) looks for a TPM (Trusted Platform Module) having been registered when it initialises; otherwise @@ -346691,10 +346581,10 @@ Co-authored-by: Phil Elwell 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c -index e544e476bf84..3f6edf0a3263 100644 +index 8175ecea0fd9..b12c63aa2b0b 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -2401,7 +2401,7 @@ static int __init __bcm2835_clk_driver_init(void) +@@ -2403,7 +2403,7 @@ static int __init __bcm2835_clk_driver_init(void) { return platform_driver_register(&bcm2835_clk_driver); } @@ -346720,11 +346610,11 @@ index 6ab3bec57532..4f3ab14d275a 100644 2.18.4 -From 7d62fb71bc612897d160ccfbf7236ad8f563603f Mon Sep 17 00:00:00 2001 +From 0426c313897a9af7adee57fe04225db9c26e7d58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Schambacher?= Date: Thu, 23 Jan 2020 13:32:13 +0100 -Subject: [PATCH 0442/1148] Fix master mode settings of HiFiBerry DAC+ADC PRO +Subject: [PATCH 0440/1209] Fix master mode settings of HiFiBerry DAC+ADC PRO card (#3424) This patch fixes the board DAI setting when in master-mode. @@ -346752,10 +346642,10 @@ index cc33d4174839..06e0b6a8fda6 100644 2.18.4 -From 56c9a2e29ec1622ee7a4e17c510a82325634241d Mon Sep 17 00:00:00 2001 +From e75837ff4384db1985cec600d454f5f31b0f815e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 24 Jan 2020 09:02:37 +0000 -Subject: [PATCH 0443/1148] overlays: Use preferred compatible strings +Subject: [PATCH 0441/1209] overlays: Use preferred compatible strings Make sure all overlays have correct compatible strings before enabling the automated checking. @@ -346838,10 +346728,10 @@ index b610d8283608..bafab6c92506 100644 2.18.4 -From cb628700204377671e7e16a17fc96a842da0b88f Mon Sep 17 00:00:00 2001 +From dbe90f1fcb912940332f0bda503e7befaa95e77c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 24 Jan 2020 11:38:28 +0000 -Subject: [PATCH 0444/1148] tty: amba-pl011: Add un/throttle support +Subject: [PATCH 0442/1209] tty: amba-pl011: Add un/throttle support The PL011 driver lacks throttle and unthrottle methods. As a result, sending more data to the Pi than it can immediately sink while CRTSCTS @@ -346856,10 +346746,10 @@ Signed-off-by: Phil Elwell 1 file changed, 28 insertions(+) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c -index 46ec9073a00b..823a530ccda0 100644 +index 83676bc79a19..6d90ee44036b 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -1323,6 +1323,32 @@ static void pl011_start_tx(struct uart_port *port) +@@ -1326,6 +1326,32 @@ static void pl011_start_tx(struct uart_port *port) pl011_start_tx_pio(uap); } @@ -346892,7 +346782,7 @@ index 46ec9073a00b..823a530ccda0 100644 static void pl011_stop_rx(struct uart_port *port) { struct uart_amba_port *uap = -@@ -2164,6 +2190,8 @@ static const struct uart_ops amba_pl011_pops = { +@@ -2167,6 +2193,8 @@ static const struct uart_ops amba_pl011_pops = { .stop_tx = pl011_stop_tx, .start_tx = pl011_start_tx, .stop_rx = pl011_stop_rx, @@ -346905,10 +346795,10 @@ index 46ec9073a00b..823a530ccda0 100644 2.18.4 -From 4624ee295cc62205ef01c2314c19917b49dcc3e4 Mon Sep 17 00:00:00 2001 +From 9a34ee8ca2e9ae440dc7ef743a2b3794e69f2933 Mon Sep 17 00:00:00 2001 From: MikeDK Date: Sun, 26 Jan 2020 23:33:54 +0100 -Subject: [PATCH 0445/1148] Fix i2c-pwm-pca9685a overlay +Subject: [PATCH 0443/1209] Fix i2c-pwm-pca9685a overlay --- arch/arm/boot/dts/overlays/i2c-pwm-pca9685a-overlay.dts | 2 +- @@ -346931,10 +346821,10 @@ index 108165df165e..9bb16465a50e 100644 2.18.4 -From 153097e4159a8d83613b14f0096f60f3525a057f Mon Sep 17 00:00:00 2001 +From d9c7b9edf7f3272ab26a2cf85f3f0ec2c640c9f5 Mon Sep 17 00:00:00 2001 From: j-schambacher Date: Mon, 27 Jan 2020 17:45:51 +0100 -Subject: [PATCH 0446/1148] adds LED OFF feature to HiFiBerry DAC+ADC PRO sound +Subject: [PATCH 0444/1209] adds LED OFF feature to HiFiBerry DAC+ADC PRO sound card This adds a DT overlay parameter 'leds_off' which allows @@ -347030,10 +346920,10 @@ index 06e0b6a8fda6..2883c3ce9488 100644 2.18.4 -From f888e737a3ebae8f7a60e4d0e071367176cd232c Mon Sep 17 00:00:00 2001 +From c983717688a6b3dd2718111f9eb586aba47201ea Mon Sep 17 00:00:00 2001 From: j-schambacher Date: Mon, 27 Jan 2020 20:37:34 +0100 -Subject: [PATCH 0447/1148] adds LED OFF feature to HiFiBerry DAC+ADC sound +Subject: [PATCH 0445/1209] adds LED OFF feature to HiFiBerry DAC+ADC sound card This adds a DT overlay parameter 'leds_off' which allows @@ -347117,10 +347007,10 @@ index ab454f2ecb17..ca763fea1d82 100644 2.18.4 -From 1cdc7a609a9c1a44c4ab23d1979a0d7c5803a2e8 Mon Sep 17 00:00:00 2001 +From a3fe23b5a98e45cba19b5f02a413c0b2d2a452a6 Mon Sep 17 00:00:00 2001 From: j-schambacher Date: Mon, 27 Jan 2020 20:58:24 +0100 -Subject: [PATCH 0448/1148] adds LED OFF feature to HiFiBerry DAC+/DAC+PRO +Subject: [PATCH 0446/1209] adds LED OFF feature to HiFiBerry DAC+/DAC+PRO sound cards This adds a DT overlay parameter 'leds_off' which allows @@ -347204,10 +347094,10 @@ index fdf6e950abd8..4cde60a5b6f6 100644 2.18.4 -From 5e30368b73e40032292b46934ec7e6e2e17004ae Mon Sep 17 00:00:00 2001 +From d6b9cefcd7375e41c6a1c3273bf2aad07498f69d Mon Sep 17 00:00:00 2001 From: gtrainavicius Date: Tue, 28 Jan 2020 14:16:37 +0200 -Subject: [PATCH 0449/1148] pisound: Added reading Pisound board hardware +Subject: [PATCH 0447/1209] pisound: Added reading Pisound board hardware revision and exposing it (#3425) pisound: Added reading Pisound board hardware revision and exposing it in kernel log and sysfs file: @@ -347411,10 +347301,10 @@ index c9a881cf8f7c..3d0861082c83 100644 2.18.4 -From 978e2c84aba5d2067a0bfac8d4e6e4cc0569a7e8 Mon Sep 17 00:00:00 2001 +From d5c30751ee5fc4ea86130f2e7bd804809ded0bc1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 2 Aug 2019 15:20:11 +0100 -Subject: [PATCH 0450/1148] mmc: sdhci-iproc: Fix vmmc regulators on iProc +Subject: [PATCH 0448/1209] mmc: sdhci-iproc: Fix vmmc regulators on iProc The Linux support for controlling card power via regulators appears to be contentious. I would argue that the default behaviour is contrary to @@ -347463,10 +347353,10 @@ index f4f5f0a70cda..203940fd2900 100644 2.18.4 -From ae2332dc0a2fc3db2cff71f46382ed94ab54984b Mon Sep 17 00:00:00 2001 +From 9dae9e75de5afbbb7bcf920ab2a9caf1fee02abf Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 30 Jul 2019 12:37:02 +0100 -Subject: [PATCH 0451/1148] ARM: dts: Declare RPi 4B SD card power regulator +Subject: [PATCH 0449/1209] ARM: dts: Declare RPi 4B SD card power regulator Later revisions of the Raspberry Pi 4B have a separate control over the SD card power. Expose that control to Linux as a fixed regulator with @@ -347538,10 +347428,10 @@ index a0605e2480af..315576a5b957 100644 2.18.4 -From a439ebf893e340f2149d5a16b376fc274300113e Mon Sep 17 00:00:00 2001 +From 68e08058be7f708d5ef3a482869a7aeca970a4b1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 12 Jul 2019 11:41:25 +0100 -Subject: [PATCH 0452/1148] pcie-brcmstb: Bounce buffer support is for +Subject: [PATCH 0450/1209] pcie-brcmstb: Bounce buffer support is for BCM2711B0 Add a new compatible string to identify BCM2711B0, as later revisions @@ -347633,10 +347523,10 @@ index e646818ff21c..fb777a4e4750 100644 2.18.4 -From adefbfb7ee1c157ac20e11414c1ad170a7a63128 Mon Sep 17 00:00:00 2001 +From bc78ae0303c8ee865e36ddddba67e98a9ec594fe Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 12 Jul 2019 11:43:03 +0100 -Subject: [PATCH 0453/1148] bcm2838.dtsi: Use BCM2711 PCIe compatible string +Subject: [PATCH 0451/1209] bcm2838.dtsi: Use BCM2711 PCIe compatible string The BCM2711 PCIe controller has a limited address range in the B0 silicon, and the driver uses a compatible string to identify the @@ -347668,10 +347558,10 @@ index 60c706b4def0..847dc7e35c94 100644 2.18.4 -From c8b4b90a77f35b80244317268831cab0d77a6a5c Mon Sep 17 00:00:00 2001 +From c98c70427017937bc72ecadf956e47ad0a610583 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 29 Jan 2020 11:29:06 +0000 -Subject: [PATCH 0454/1148] ARM: dts: Remove bcm2838-rpi-4-b.dts +Subject: [PATCH 0452/1209] ARM: dts: Remove bcm2838-rpi-4-b.dts Upstream are not going to use the bcm2838 identifier, so begin the cleanup by removing the suggested upstream Pi 4 .dts file. @@ -347839,10 +347729,10 @@ index 7c3fc83fe66e..000000000000 2.18.4 -From fd36afc310e66729ea5012cfe84bdc47d7c94082 Mon Sep 17 00:00:00 2001 +From 683ae7cc42a3b8cd26f52f8a69f08109ae3161fe Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 29 Jan 2020 09:35:19 +0000 -Subject: [PATCH 0455/1148] tty: amba-pl011: Avoid rare write-when-full error +Subject: [PATCH 0453/1209] tty: amba-pl011: Avoid rare write-when-full error Under some circumstances on BCM283x processors data loss can be observed - a single byte missing from the TX output stream. These bytes @@ -347869,10 +347759,10 @@ Signed-off-by: Phil Elwell 1 file changed, 4 insertions(+) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c -index 823a530ccda0..72184fe62eec 100644 +index 6d90ee44036b..3cd3028827d2 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -1444,6 +1444,10 @@ static bool pl011_tx_chars(struct uart_amba_port *uap, bool from_irq) +@@ -1447,6 +1447,10 @@ static bool pl011_tx_chars(struct uart_amba_port *uap, bool from_irq) if (likely(from_irq) && count-- == 0) break; @@ -347887,10 +347777,10 @@ index 823a530ccda0..72184fe62eec 100644 2.18.4 -From 7efc455b5adabff6e9e78ac7751ac90a7317f66c Mon Sep 17 00:00:00 2001 +From c8b07bf656d3bc791a40508eb1149ac22d1e0243 Mon Sep 17 00:00:00 2001 From: Tim Gover <990920+timg236@users.noreply.github.com> Date: Wed, 15 Jan 2020 11:26:19 +0000 -Subject: [PATCH 0456/1148] usb: xhci: Raspberry Pi FW loader for VIA VL805 +Subject: [PATCH 0454/1209] usb: xhci: Raspberry Pi FW loader for VIA VL805 The VL805 FW may either be loaded from an SPI EEPROM or alternatively loaded directly by the VideoCore firmware. A PCI reset will reset @@ -347979,10 +347869,10 @@ index ae71820af8e5..05c6989ec4c6 100644 2.18.4 -From 3753f8f7ba5a4012dc8412cbba2300ef7298e0c6 Mon Sep 17 00:00:00 2001 +From 336eb725bf9873d6f4600142f9266cd522d9c773 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 29 Jan 2020 14:32:51 +0000 -Subject: [PATCH 0457/1148] overlays: Correct the eth_led* colour assignments +Subject: [PATCH 0455/1209] overlays: Correct the eth_led* colour assignments See: https://github.com/raspberrypi/firmware/issues/1311 @@ -348036,10 +347926,10 @@ index 3f324380a9f2..4032e1120d03 100644 2.18.4 -From 3d29020887dc94f5c666042979b91fb3bf76d538 Mon Sep 17 00:00:00 2001 +From 36176242cd801eaf5fd5b5c4ee5df54ef3a212e6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 30 Jan 2020 12:42:07 +0000 -Subject: [PATCH 0458/1148] Revert "staging: vchiq_arm: Register a platform +Subject: [PATCH 0456/1209] Revert "staging: vchiq_arm: Register a platform device for audio" This reverts commit 25c7597af20d2b1d042bafd9be84eaa69c1690b7. @@ -348071,10 +347961,10 @@ index d84f7324fe14..7a9de9d0193c 100644 2.18.4 -From 34f9a5f4558b2cacc7c4176bd26fb3355494b3a3 Mon Sep 17 00:00:00 2001 +From 876d8caea97dde53a7a2743eb435bb793d330d6d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 30 Jan 2020 09:47:00 +0000 -Subject: [PATCH 0459/1148] ARM: dts: Add sd_poll_once dtparam to bcm283x/2711 +Subject: [PATCH 0457/1209] ARM: dts: Add sd_poll_once dtparam to bcm283x/2711 The old sdtweak overlay allowed the SD interface to be effectively disabled unless there was a card present at boot time, but that @@ -348140,10 +348030,10 @@ index 4032e1120d03..699bf9a2fa85 100644 2.18.4 -From c76b327baa48a9e05ceab71fabb6e4aeb1c43247 Mon Sep 17 00:00:00 2001 +From 52e5ae0351947d21a97ca7a59c552f938de8831d Mon Sep 17 00:00:00 2001 From: MikeDK Date: Fri, 31 Jan 2020 10:57:21 +0100 -Subject: [PATCH 0460/1148] overlays: Add ssd1306-spi, ssh1106-spi, +Subject: [PATCH 0458/1209] overlays: Add ssd1306-spi, ssh1106-spi, ssd-1351-spi Add overlays for SSD1306, SH1106 and SSD1351 based OLED displays. @@ -348511,10 +348401,10 @@ index 000000000000..0eb1451b36c0 2.18.4 -From b87d5d05cbf942f070496f189c3c2b81a0d363e9 Mon Sep 17 00:00:00 2001 +From e717d539d1bad074bf9bc572942cd37294d417a9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 4 Feb 2020 12:42:27 +0000 -Subject: [PATCH 0461/1148] configs: Add NFS 4.2 support +Subject: [PATCH 0459/1209] configs: Add NFS 4.2 support See: https://github.com/raspberrypi/linux/issues/3397 @@ -348592,10 +348482,10 @@ index ff65bc543f61..4688da5d2e64 100644 2.18.4 -From 90816750f3757b296583002cdf8f8c238156a5a1 Mon Sep 17 00:00:00 2001 +From 8bd62f5245d2ca933cded5d4eb84791c942e8aa1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 4 Feb 2020 13:03:21 +0000 -Subject: [PATCH 0462/1148] overlays: dwc2: Increase RX FIFO size +Subject: [PATCH 0460/1209] overlays: dwc2: Increase RX FIFO size The previous version of the dwc2 overlay set the RX FIFO size to 256 4-byte words. This sounds large enough for a 1024 byte packet (the @@ -348646,10 +348536,10 @@ index 6112640837fc..96837d962188 100644 2.18.4 -From 8ca0af5a796562470f9eae32b35716989341aa40 Mon Sep 17 00:00:00 2001 +From 08d85e19b113b8a49568085aa7930a6c599b5b87 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 4 Feb 2020 15:22:55 +0000 -Subject: [PATCH 0463/1148] overlays: Fix mcp23017's addr parameter +Subject: [PATCH 0461/1209] overlays: Fix mcp23017's addr parameter The addr parameter of the mcp23017 overlay was broken by the addition of the noints parameter; splitting the mcp node in two without also @@ -348698,39 +348588,10 @@ index 16af971c3bdb..c546d8ba7e6d 100644 2.18.4 -From bac4298db2d71dc76d55749eafaa59370a162302 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Tue, 4 Feb 2020 16:35:12 +0000 -Subject: [PATCH 0464/1148] SQUASH: Fix spi driver compiler warnings - -Squash with "spi: spi-bcm2835: Disable forced software CS" - -Signed-off-by: Phil Elwell ---- - drivers/spi/spi-bcm2835.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c -index c2e7a2dbbcc7..dc759de7124b 100644 ---- a/drivers/spi/spi-bcm2835.c -+++ b/drivers/spi/spi-bcm2835.c -@@ -1230,8 +1230,6 @@ static int bcm2835_spi_setup(struct spi_device *spi) - { - struct spi_controller *ctlr = spi->controller; - struct bcm2835_spi *bs = spi_controller_get_devdata(ctlr); -- struct gpio_chip *chip; -- enum gpio_lookup_flags lflags; - u32 cs; - - /* --- -2.18.4 - - -From 00770d7c624151afdf458a0d0e433eaa5bbfebac Mon Sep 17 00:00:00 2001 +From 9d544eb1886d5d0fcb4452c80c62585e2032524e Mon Sep 17 00:00:00 2001 From: Michael Kaplan Date: Wed, 5 Feb 2020 10:27:23 +0100 -Subject: [PATCH 0465/1148] overlays: add hdmi-backlight-hwhack-gpio-overlay +Subject: [PATCH 0462/1209] overlays: add hdmi-backlight-hwhack-gpio-overlay This is a Devicetree overlay for GPIO based backlight on/off capability. @@ -348844,10 +348705,10 @@ index 000000000000..50b9a2665c80 2.18.4 -From 140b7c54f91111102200d515b45a86040e28a42b Mon Sep 17 00:00:00 2001 +From f6082dcba62dee773f034de89264fb6d0ea3888d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 13 Nov 2019 16:28:10 +0000 -Subject: [PATCH 0466/1148] Revert "brcmfmac: Disable power management" +Subject: [PATCH 0463/1209] Revert "brcmfmac: Disable power management" Shortly after the release of the Pi 3B, a loss of SSH connectivity over WiFi was traced to the power management handling, so power @@ -348889,10 +348750,10 @@ index 4b97dfcda3cd..4beef16e328f 100644 2.18.4 -From 527de7ef6bbccf57314b2b5f84bf3261cd2bae8e Mon Sep 17 00:00:00 2001 +From cbf6a2ee1d939e88bcd8132f014c5e922ea454bc Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 3 Feb 2020 09:32:22 +0000 -Subject: [PATCH 0467/1148] brcmfmac: Increase power saving delay to 2s +Subject: [PATCH 0464/1209] brcmfmac: Increase power saving delay to 2s Increase the delay before entering the lower power state to 2 seconds (the maximum allowed) in order to reduce the packet latencies, @@ -348920,10 +348781,10 @@ index 4beef16e328f..16bfcbe191c2 100644 2.18.4 -From 098322ca5f90fc4b4c74c50f14b97b2bba4507c8 Mon Sep 17 00:00:00 2001 +From 6b40a902b1c961836905a8d0565f20963168f998 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 30 Jan 2020 11:39:39 +0000 -Subject: [PATCH 0468/1148] ARM: dts: Revert all changes to upstream dts files +Subject: [PATCH 0465/1209] ARM: dts: Revert all changes to upstream dts files With the possible exception of bcm2711* files where there is a name clash, we should not be modifying upstream DTS files. @@ -350881,10 +350742,10 @@ index 3706a795b586..202a61f574c7 100644 2.18.4 -From 963cfaaadaec38d7437666026b64d198d0b23f78 Mon Sep 17 00:00:00 2001 +From 45b206a89f5881b868c5642d9fb9e7d540320f25 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 31 Jan 2020 16:53:13 +0000 -Subject: [PATCH 0469/1148] ARM: dts: Clean out downstream BCM2711/2838 files +Subject: [PATCH 0466/1209] ARM: dts: Clean out downstream BCM2711/2838 files Signed-off-by: Phil Elwell --- @@ -352746,10 +352607,10 @@ index 847dc7e35c94..000000000000 2.18.4 -From 967cd475482952c86d337bc6dc6ffae357b5d236 Mon Sep 17 00:00:00 2001 +From 0da5c8e21f5e433db635fb7c93d6835fba9a8227 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sun, 6 Oct 2019 15:41:25 +0200 -Subject: [PATCH 0470/1148] ARM: dts: Add minimal Raspberry Pi 4 support +Subject: [PATCH 0467/1209] ARM: dts: Add minimal Raspberry Pi 4 support This adds minimal support for the new Raspberry Pi 4 without the fancy stuff like GENET, PCIe, xHCI, 40 bit DMA and V3D. The RPi 4 is @@ -353785,10 +353646,10 @@ index 000000000000..0ff0e9e25327 2.18.4 -From 10951ebddf106a1070c0dafad31237beebbe5017 Mon Sep 17 00:00:00 2001 +From 6f4e535bef4ca899af7c37296d798822a6ed8c00 Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Wed, 6 Nov 2019 10:59:44 +0100 -Subject: [PATCH 0471/1148] ARM: dts: bcm2711: force CMA into first GB of +Subject: [PATCH 0468/1209] ARM: dts: bcm2711: force CMA into first GB of memory arm64 places the CMA in ZONE_DMA32, which is not good enough for the @@ -353837,10 +353698,10 @@ index ac83dac2e6ba..34d24fe272e2 100644 2.18.4 -From d685fd1a367ef743431863730f408581bdd1ebbc Mon Sep 17 00:00:00 2001 +From 23a59e59e5634b2701c88e5724874a92f07e8452 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Mon, 11 Nov 2019 20:49:26 +0100 -Subject: [PATCH 0472/1148] ARM: dts: bcm2711-rpi-4: Enable GENET support +Subject: [PATCH 0469/1209] ARM: dts: bcm2711-rpi-4: Enable GENET support This enables the Gigabit Ethernet support on the Raspberry Pi 4. The defined PHY mode is equivalent to the default register settings @@ -353931,10 +353792,10 @@ index 34d24fe272e2..961bed832755 100644 2.18.4 -From 911247bd022895a8e9d7a750786e196c0b5fed64 Mon Sep 17 00:00:00 2001 +From 72bdf6e1aff0e535981e44ed77cfab8081114075 Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Wed, 4 Dec 2019 13:56:33 +0100 -Subject: [PATCH 0473/1148] ARM: dts: bcm2711: fix soc's node dma-ranges +Subject: [PATCH 0470/1209] ARM: dts: bcm2711: fix soc's node dma-ranges Raspberry Pi's firmware has a feature to select how much memory to reserve for its GPU called 'gpu_mem'. The possible values go from 16MB @@ -353977,10 +353838,10 @@ index 961bed832755..e2f6ffb00aa9 100644 2.18.4 -From 4af5aa91216f7795f9f94bff1e6f298efb94cde7 Mon Sep 17 00:00:00 2001 +From 67a1b3975e40a9d2b78c983b67751d1381f920f8 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 30 Jan 2020 15:48:00 +0000 -Subject: [PATCH 0474/1148] ARM: dts: Rebuild downstream DTS files +Subject: [PATCH 0471/1209] ARM: dts: Rebuild downstream DTS files Refactor the tree of downstream DTS files to achieve approximately the same end result but wihout modifying upstream files (except for @@ -355077,10 +354938,10 @@ index 000000000000..6c8b26388229 2.18.4 -From 2c735fe4c20745da558dba07a53bcb7a31ce7a78 Mon Sep 17 00:00:00 2001 +From c86b18091b1055f46ba7041694634fab885fd817 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 31 Jan 2020 15:47:43 +0000 -Subject: [PATCH 0475/1148] Revert "bcm2711: Retain support for old dtbs" +Subject: [PATCH 0472/1209] Revert "bcm2711: Retain support for old dtbs" This reverts commit 61a505c739150c8dbb57a73db5c6c720d5160157. --- @@ -355103,10 +354964,10 @@ index b7491ddb6841..91a758c61f48 100644 NULL }; diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c -index 3f6edf0a3263..3e6192237db9 100644 +index b12c63aa2b0b..a592fe8ec07d 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -2383,8 +2383,6 @@ static const struct cprman_plat_data cprman_bcm2711_plat_data = { +@@ -2385,8 +2385,6 @@ static const struct cprman_plat_data cprman_bcm2711_plat_data = { static const struct of_device_id bcm2835_clk_of_match[] = { { .compatible = "brcm,bcm2835-cprman", .data = &cprman_bcm2835_plat_data }, { .compatible = "brcm,bcm2711-cprman", .data = &cprman_bcm2711_plat_data }, @@ -355135,10 +354996,10 @@ index cf308212feca..43e3127e25cd 100644 2.18.4 -From 519304c1805f32869ba4865f4f069dbb5c16b995 Mon Sep 17 00:00:00 2001 +From 5d035a1c77ecacbea4de5a5487ccf6eddbc00035 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 31 Jan 2020 09:26:18 +0000 -Subject: [PATCH 0476/1148] staging/vchiq_arm: Fix bcm2711 compatible string +Subject: [PATCH 0473/1209] staging/vchiq_arm: Fix bcm2711 compatible string Fixes: "vchiq: Add 36-bit address support" @@ -355173,10 +355034,10 @@ index 7a9de9d0193c..3a120f3b33ad 100644 2.18.4 -From ffce27d9f02ac529ed0c5ffbcb2e872999891a00 Mon Sep 17 00:00:00 2001 +From af6dc27ade043324258fa8b5867768aa2ae83a1c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 31 Jan 2020 09:28:57 +0000 -Subject: [PATCH 0477/1148] bcm2835-dma: Correct SoC name +Subject: [PATCH 0474/1209] bcm2835-dma: Correct SoC name The Pi 4 SoC is called BCM2711, not BCM2838. @@ -355668,10 +355529,10 @@ index 87fd58272e95..8d7c80536aa4 100644 2.18.4 -From 86c738ec609fd6b351661b5d8fd7ef9d6880f1a6 Mon Sep 17 00:00:00 2001 +From 525375331b83134c56fbe83260e54194204488c3 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 31 Jan 2020 09:33:40 +0000 -Subject: [PATCH 0478/1148] thermal: brcmstb_thermal: Correct SoC name +Subject: [PATCH 0475/1209] thermal: brcmstb_thermal: Correct SoC name The Pi 4 SoC is called BCM2711, not BCM2838. @@ -355721,10 +355582,10 @@ index 7a7c6ad7b8a0..08f71fec5152 100644 2.18.4 -From 56a6878a2905cd29fbabfb68eae537088aff09c3 Mon Sep 17 00:00:00 2001 +From 74eb98173c3ac20073ecacb9404b2ef0c65b1b9e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 31 Jan 2020 09:36:57 +0000 -Subject: [PATCH 0479/1148] hwrng: iproc-rng200: Correct SoC name +Subject: [PATCH 0476/1209] hwrng: iproc-rng200: Correct SoC name The Pi 4 SoC is called BCM2711, not BCM2838. @@ -355796,10 +355657,10 @@ index 7b6966b7f602..857dacd49c3b 100644 2.18.4 -From 964fc16c727e30a569d9c23e91241ba383fbd82f Mon Sep 17 00:00:00 2001 +From 7872282fede376d1aeea6cdf233d0d2579b2765e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 31 Jan 2020 09:39:40 +0000 -Subject: [PATCH 0480/1148] pcie-brcmstb: Correct SoC name +Subject: [PATCH 0477/1209] pcie-brcmstb: Correct SoC name The Pi 4 SoC is called BCM2711, not BCM2838. @@ -355900,10 +355761,10 @@ index ac8dde3c030b..dec65992902e 100644 2.18.4 -From de0e77a7f3182ed92b012391a26dbf589f945207 Mon Sep 17 00:00:00 2001 +From 57fd2cd9c004e29899dacc8b6821bea691468b52 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 31 Jan 2020 15:24:59 +0000 -Subject: [PATCH 0481/1148] ARM: dts: Correct SoC name +Subject: [PATCH 0478/1209] ARM: dts: Correct SoC name The Pi 4 SoC is called BCM2711, not BCM2838. @@ -355956,10 +355817,10 @@ index 6c8b26388229..29e7aa15d5a3 100644 2.18.4 -From 621a66fc6c76eb95609866565c09157f5b245fdb Mon Sep 17 00:00:00 2001 +From 5be3c293ecd573b21fd7bb661470204776480795 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Sat, 1 Feb 2020 08:58:11 +0000 -Subject: [PATCH 0482/1148] ARM: dts: Remove CMA allocation from Pi 4 dts +Subject: [PATCH 0479/1209] ARM: dts: Remove CMA allocation from Pi 4 dts The 5.5 tree includes a patch to disable the CMA command line parameter and replace it with properties from a DT node. @@ -355994,10 +355855,10 @@ index 2013cf832567..f5bd44ea2bf1 100644 2.18.4 -From ff59e8895a0abc885012a4eb57d2557b0741241e Mon Sep 17 00:00:00 2001 +From cb0e579a02975fe20d7bc368c25b15866b3b2667 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Thu, 6 Dec 2018 19:28:55 +0100 -Subject: [PATCH 0483/1148] staging: vchiq_arm: Register a platform device for +Subject: [PATCH 0480/1209] staging: vchiq_arm: Register a platform device for audio Following Eric's commit 37b7b3087a2f ("staging/vc04_services: Register a @@ -356035,10 +355896,10 @@ index 3a120f3b33ad..57867b75d61a 100644 2.18.4 -From 1760d4a01c86aa6852e3da39f43f95c94493ac72 Mon Sep 17 00:00:00 2001 +From da371a536ad1994bfe43eebf99211ddb3fa74553 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 3 Feb 2020 17:30:46 +0000 -Subject: [PATCH 0484/1148] staging: vchiq_arm: Give vchiq children DT nodes +Subject: [PATCH 0481/1209] staging: vchiq_arm: Give vchiq children DT nodes vchiq kernel clients are now instantiated as platform drivers rather than using DT, but the children of the vchiq interface may still @@ -356080,10 +355941,10 @@ index 57867b75d61a..a3fcb1830995 100644 2.18.4 -From 7ca21775fa1605391ce381dae6dbd82560675601 Mon Sep 17 00:00:00 2001 +From e1e1b6a68a1a1513f6a64901b577b241f735185e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 3 Feb 2020 17:03:29 +0000 -Subject: [PATCH 0485/1148] ARM: dts: Move audio node under the vchiq parent +Subject: [PATCH 0482/1209] ARM: dts: Move audio node under the vchiq parent VCHIQ kernel clients are now instantiated as platform drivers rather than using DT, but the children of the vchiq device can optionally be @@ -356167,10 +356028,10 @@ index 29e7aa15d5a3..a71b2eb74723 100644 2.18.4 -From 9782b06c2703d7ee655c55742a9300bc63184fd7 Mon Sep 17 00:00:00 2001 +From 387fa3b32519fe29841c8aa983ba9c7d6895023f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 27 Feb 2020 13:34:08 +0000 -Subject: [PATCH 0486/1148] ARM: dts: bcm283x: Restore simple-bus to /clocks +Subject: [PATCH 0483/1209] ARM: dts: bcm283x: Restore simple-bus to /clocks Commit [1] ([2] upstream) removed the "simple-bus" compatible string, "#address-cells" and "#size-cells" to fix some DT scheme warnings. In @@ -356208,10 +356069,10 @@ index 202a61f574c7..18a95aaca191 100644 2.18.4 -From 7f7c24a7c7651de2920049c9a001187146bbd480 Mon Sep 17 00:00:00 2001 +From 8f85b3aded114c8774e199079fe17e8db8e6f459 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 28 Feb 2020 10:22:48 +0000 -Subject: [PATCH 0487/1148] Revert "ARM: dts: bcm283x: Restore simple-bus to +Subject: [PATCH 0484/1209] Revert "ARM: dts: bcm283x: Restore simple-bus to /clocks" This reverts commit 894dece014e4df68c9f6a11a0761fba1fcfc844f. @@ -356238,10 +356099,10 @@ index 18a95aaca191..202a61f574c7 100644 2.18.4 -From f498554013012ec34b77d6b36237c46ee067dd0f Mon Sep 17 00:00:00 2001 +From b5c981acf7da95798b5e85235ee8f67f637356f2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 28 Feb 2020 11:22:40 +0000 -Subject: [PATCH 0488/1148] ARM: dts: overlays: Create custom clocks in / +Subject: [PATCH 0485/1209] ARM: dts: overlays: Create custom clocks in / Change [1] removes the simple-bus compatible string from the "/clocks" node, preventing any custom clocks placed there from being initialised. @@ -356331,10 +356192,10 @@ index 7bf0317ea83b..c5583e010339 100644 2.18.4 -From f1a03c5fe5875d33db2c03072db7049f1fd329a3 Mon Sep 17 00:00:00 2001 +From d88780bb1695c21237717b72c74b1bb0de67c2c4 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Thu, 30 Jan 2020 12:35:44 +0000 -Subject: [PATCH 0489/1148] staging: vc04_services: Fix vcsm overflow bug when +Subject: [PATCH 0486/1209] staging: vc04_services: Fix vcsm overflow bug when counting transactions The response block and local state were using u16 and u32 respectively @@ -356363,10 +356224,10 @@ index 83110c55f440..c87b964abb31 100644 2.18.4 -From 2ed6e29eb683a892b61d920c9d30d48566c3d91f Mon Sep 17 00:00:00 2001 +From bc26b368efec8b104ec0b3e4f7363daa361b5e34 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 7 Feb 2020 09:51:31 +0000 -Subject: [PATCH 0490/1148] overlays: Add timeout_ms parameter to gpio-poweroff +Subject: [PATCH 0487/1209] overlays: Add timeout_ms parameter to gpio-poweroff The timeout_ms parameter specifies in milliseconds how long the kernel waits for power-down before issuing a WARN. The default value is 3000 ms. @@ -356405,10 +356266,10 @@ index bb8cd3bf264d..416aa2bc797a 100644 2.18.4 -From 86d4461068f43289ddd09bc05c51a8ff6885b166 Mon Sep 17 00:00:00 2001 +From 5e9e5feef5fc538ed65a3339a0a4c1aba26cd6b8 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Mon, 10 Feb 2020 15:47:07 +0100 -Subject: [PATCH 0491/1148] defconfigs: enable CONFIG_BPF_LIRC_MODE2 +Subject: [PATCH 0488/1209] defconfigs: enable CONFIG_BPF_LIRC_MODE2 This enables support for IR decoding via BPF programs. @@ -356472,10 +356333,10 @@ index 6b4eae39fee6..894168aeef61 100644 2.18.4 -From cbfd4cdad0140e470b646be84924348dccc5aa1a Mon Sep 17 00:00:00 2001 +From 768bc7e13e6e6ff9e83ee94588b16c7ede54653f Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Mon, 10 Feb 2020 18:21:02 +0100 -Subject: [PATCH 0492/1148] bcmrpi3_defconfig: align RC config with +Subject: [PATCH 0489/1209] bcmrpi3_defconfig: align RC config with bcm2711_defconfig Signed-off-by: Matthias Reichl @@ -356524,10 +356385,10 @@ index 4688da5d2e64..1dad7bcb579a 100644 2.18.4 -From f80463d80b80c34fda6fcb4573c885ccba2ff83f Mon Sep 17 00:00:00 2001 +From 3e736df7b88a66dea113bcbda53c9890393964fc Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 6 Feb 2020 12:23:15 +0000 -Subject: [PATCH 0493/1148] of: overlay: Correct symbol path fixups +Subject: [PATCH 0490/1209] of: overlay: Correct symbol path fixups When symbols from overlays are added to the live tree their paths must be rebased. The translated symbol is normally the result of joining @@ -356567,10 +356428,10 @@ index 1688f576ee8a..bef83edca195 100644 2.18.4 -From 5db68bcce73e247a2351505c1e6014de7ae7314b Mon Sep 17 00:00:00 2001 +From f7cbbceaf742ae75ba97613642ff13f9b07a5ea9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 24 Feb 2020 11:13:09 +0000 -Subject: [PATCH 0494/1148] configs: Add CONFIG_HID_STEAM=m +Subject: [PATCH 0491/1209] configs: Add CONFIG_HID_STEAM=m See: https://github.com/raspberrypi/linux/issues/3344 @@ -356647,10 +356508,10 @@ index 1dad7bcb579a..fa691991528f 100644 2.18.4 -From d01e74cb227328efe2de2716172a509e12e8de17 Mon Sep 17 00:00:00 2001 +From d76dcfa97abdbf2fcfa634ed0334e90c08cf59ca Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 27 Feb 2020 11:23:09 +0000 -Subject: [PATCH 0495/1148] configs: Add CONFIG_EXT4_ENCRYPTION=y +Subject: [PATCH 0492/1209] configs: Add CONFIG_EXT4_ENCRYPTION=y Enable EXT4 encryption support for all configurations except those based on the original BCM2835, i.e. not on B+, Zero, etc. This @@ -356759,10 +356620,10 @@ index fa691991528f..b40477e1553b 100644 2.18.4 -From 62ad161b75c3553221c6494ae14542322cf48249 Mon Sep 17 00:00:00 2001 +From cf70826d369671b35c54a9d3198d2733d3e252b1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 5 Feb 2020 17:25:52 +0000 -Subject: [PATCH 0496/1148] configs: Add KVM support to arm64 bcm2711_defconfig +Subject: [PATCH 0493/1209] configs: Add KVM support to arm64 bcm2711_defconfig See: https://github.com/raspberrypi/linux/issues/3035 @@ -356790,10 +356651,10 @@ index 6be7a169eac1..bf0551437fd7 100644 2.18.4 -From 9898be07cf5684cac2a92ba50cb3b8591ee1d6f0 Mon Sep 17 00:00:00 2001 +From b62ed127b2a56c4697c6adcec249a22005d4f8fc Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 3 Mar 2020 09:43:41 +0000 -Subject: [PATCH 0497/1148] overlays: sc16ic750-i2c: Fix xtal parameter +Subject: [PATCH 0494/1209] overlays: sc16ic750-i2c: Fix xtal parameter The xtal parameter is targetting the wrong node - fix it. @@ -356821,10 +356682,10 @@ index 5fbff2e6c02d..16fe0d08cef1 100644 2.18.4 -From 3b6a75b13ea03e5af7a0e4af932d83d6c3abef27 Mon Sep 17 00:00:00 2001 +From fe1a71da5596bcfbe0095f6973e9ef05ba30f551 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Mar 2020 16:59:11 +0000 -Subject: [PATCH 0498/1148] Revert "pcie-brcmstb: Correct SoC name" +Subject: [PATCH 0495/1209] Revert "pcie-brcmstb: Correct SoC name" This reverts commit 900b4ad0814df7dbacb01318bf49af5bab605fa0. --- @@ -356920,10 +356781,10 @@ index dec65992902e..ac8dde3c030b 100644 2.18.4 -From 1c9ce990e8a08d13c41d102d4be4646f8e44e387 Mon Sep 17 00:00:00 2001 +From 89383bffe90863f6f168ba7f67537dbfe1214db1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Mar 2020 16:59:23 +0000 -Subject: [PATCH 0499/1148] Revert "pcie-brcmstb: Bounce buffer support is for +Subject: [PATCH 0496/1209] Revert "pcie-brcmstb: Bounce buffer support is for BCM2711B0" This reverts commit 58ac2d4474e531300f9f83773aa4d09e95ee2626. @@ -357012,10 +356873,10 @@ index fb777a4e4750..e646818ff21c 100644 2.18.4 -From 7fb9a62c08368d8c5e6fef866dee80f8b60c408f Mon Sep 17 00:00:00 2001 +From d0735ee41b6c5638d97598efc9f77f03c5db71c1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Mar 2020 16:59:39 +0000 -Subject: [PATCH 0500/1148] Revert "pcie-brcmstb: Eliminate arch_dma_ops error +Subject: [PATCH 0497/1209] Revert "pcie-brcmstb: Eliminate arch_dma_ops error message" This reverts commit 27cf0ad95cdf30f52a5fc6c69014a0d7bf5a1222. @@ -357161,10 +357022,10 @@ index e646818ff21c..e8c8b355548a 100644 2.18.4 -From 52880f143ef9cf5b798a49e4a1fd42482cddb365 Mon Sep 17 00:00:00 2001 +From 589e07695078ac5b80522982d9f64febe7c009df Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Mar 2020 16:59:51 +0000 -Subject: [PATCH 0501/1148] Revert "pcie-brcmstb-bounce64.c: dev_err() -> +Subject: [PATCH 0498/1209] Revert "pcie-brcmstb-bounce64.c: dev_err() -> dev_info() for info messages" This reverts commit 2340a88a493d750dc3fcfa48de880fc4b8e479d2. @@ -357189,10 +357050,10 @@ index ac8dde3c030b..6a872975ba9e 100644 2.18.4 -From d09f6d672a1a3fb83749f2de560a3cde77b3bcb8 Mon Sep 17 00:00:00 2001 +From 93cc2676d3656b7ecca96c45e2eb964b5de23a33 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Mar 2020 17:00:01 +0000 -Subject: [PATCH 0502/1148] Revert "Ported pcie-brcmstb bounce buffer +Subject: [PATCH 0499/1209] Revert "Ported pcie-brcmstb bounce buffer implementation to ARM64. (#3144)" This reverts commit 60f3db31d4cb785befed715b80c430f60f647701. @@ -357914,10 +357775,10 @@ index e8c8b355548a..87fd40ae3140 100644 2.18.4 -From c35c6ce1bd883d4740b2e7d8bf8ad7a68726ef07 Mon Sep 17 00:00:00 2001 +From 998a1bc844a2d31b1a3af22abe42cb7f2557a70b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Mar 2020 17:00:16 +0000 -Subject: [PATCH 0503/1148] Revert "pcie-brcmstb: Don't set DMA ops for root +Subject: [PATCH 0500/1209] Revert "pcie-brcmstb: Don't set DMA ops for root complex" This reverts commit 510a127017a0aada2734dbf57d25aaa0189198ff. @@ -357943,10 +357804,10 @@ index 87fd40ae3140..746cfb405ad3 100644 2.18.4 -From 47a987a4f6fda0e2d7dd9639a8a0fba030f538a1 Mon Sep 17 00:00:00 2001 +From fb0249c6b787243e87e9b84f3319c12518176800 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 9 Mar 2020 10:06:59 +0000 -Subject: [PATCH 0504/1148] Revert "bcm2835-dma: Correct SoC name" +Subject: [PATCH 0501/1209] Revert "bcm2835-dma: Correct SoC name" This reverts commit f498861a16d0b9a189a329080da1aa64d6e9bda7. --- @@ -358436,10 +358297,10 @@ index 8d7c80536aa4..87fd58272e95 100644 2.18.4 -From a82f21091c1f0edd4f5c5bbff359115887a7de09 Mon Sep 17 00:00:00 2001 +From 7fb4a6dd20a0ba66917289c7fe2b97f61de97ac3 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 9 Mar 2020 10:07:15 +0000 -Subject: [PATCH 0505/1148] Revert "bcm2835-dma: Add proper 40-bit DMA support" +Subject: [PATCH 0502/1209] Revert "bcm2835-dma: Add proper 40-bit DMA support" This reverts commit 773a2db89ad2785d72b215673d87c0a51d769f61. --- @@ -359388,10 +359249,10 @@ index 746cfb405ad3..782725e3adad 100644 2.18.4 -From 08119020ebc36fe8113a173affcf4f73162b6c29 Mon Sep 17 00:00:00 2001 +From 3f8c916e1a85d8901c4d770beca6138babf0a257 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 9 Mar 2020 10:07:39 +0000 -Subject: [PATCH 0506/1148] Revert "pcie-brcmstb: Changes for BCM2711" +Subject: [PATCH 0503/1209] Revert "pcie-brcmstb: Changes for BCM2711" This reverts commit 1dab5ded41ed07adc12f26e529aa64209a7c44b6. --- @@ -360834,10 +360695,10 @@ index 254783d1065f..000000000000 2.18.4 -From a4ccb4ff835a277531693b1784447ee471d68bf5 Mon Sep 17 00:00:00 2001 +From f4f68f0e4aa20718a0d4628d71930ea7c071dd18 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 9 Mar 2020 10:08:35 +0000 -Subject: [PATCH 0507/1148] Revert "PCI: brcmstb: Add MSI capability" +Subject: [PATCH 0504/1209] Revert "PCI: brcmstb: Add MSI capability" This reverts commit b1619c83208e7b804e2c3547dbf24bb02b3be239. --- @@ -361373,10 +361234,10 @@ index b028d4be81a2..27bcf83c99d7 100644 2.18.4 -From 398244604a7d0a9ea2f5566b1e0e633e3284ef6c Mon Sep 17 00:00:00 2001 +From 6a3d13fc6888e9bd5e9084bd2f556db456612db9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 9 Mar 2020 10:08:49 +0000 -Subject: [PATCH 0508/1148] Revert "PCI: brcmstb: Add dma-range mapping for +Subject: [PATCH 0505/1209] Revert "PCI: brcmstb: Add dma-range mapping for inbound traffic" This reverts commit d45590eb858ac7a2578d477791881ba7ffb1e615. @@ -361881,10 +361742,10 @@ index 27bcf83c99d7..babef9191e88 100644 2.18.4 -From d27cf269e781b7be6c8dd158ed7b9bfc3e15c3f1 Mon Sep 17 00:00:00 2001 +From a377420013c8e16fc422e7d595907f41193e9fcc Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 9 Mar 2020 10:10:54 +0000 -Subject: [PATCH 0509/1148] Revert "PCI: brcmstb: Add Broadcom STB PCIe host +Subject: [PATCH 0506/1209] Revert "PCI: brcmstb: Add Broadcom STB PCIe host controller driver" This reverts commit 79624ca23c53064fefee774a89952a587b72cc01. @@ -363071,10 +362932,10 @@ index d92290679067..000000000000 2.18.4 -From 2b29396b15bcb9c6efa1c9cfa5aa26aedd16b981 Mon Sep 17 00:00:00 2001 +From 635c012a3925c0de415a40a429ae7eecfe458342 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 12 Mar 2020 12:16:18 +0000 -Subject: [PATCH 0510/1148] Revert "arm64/mm: Limit the DMA zone for arm64" +Subject: [PATCH 0507/1209] Revert "arm64/mm: Limit the DMA zone for arm64" This reverts commit 47fec0dcefa53f44985e95785021447d646daa2b. --- @@ -363098,10 +362959,10 @@ index 1b15656c96db..45c00a54909c 100644 2.18.4 -From 26a800c30e7f9e4fc1e2f77fb77f4798c96a844d Mon Sep 17 00:00:00 2001 +From 737c4b9f50d058b426e19f5be0f03136acbbf3f1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 12 Mar 2020 14:06:04 +0000 -Subject: [PATCH 0511/1148] Revert "dma-direct: check for overflows on 32 bit +Subject: [PATCH 0508/1209] Revert "dma-direct: check for overflows on 32 bit DMA addresses" This reverts commit e44850bd4205a8cf17f23c44668c0f8d28ad40b1. @@ -363148,10 +363009,10 @@ index 6a18a97b76a8..adf993a3bd58 100644 2.18.4 -From 669abca4cbe07c6ba946ec3c6fc5a78984e814cf Mon Sep 17 00:00:00 2001 +From 62331883c99a0e9677f30fd535e8350caab8dee8 Mon Sep 17 00:00:00 2001 From: Robin Murphy Date: Wed, 3 Jul 2019 18:23:01 +0100 -Subject: [PATCH 0512/1148] of/address: Introduce of_get_next_dma_parent() +Subject: [PATCH 0509/1209] of/address: Introduce of_get_next_dma_parent() helper commit 862ab5578f754117742c8b8c8e5ddf98bdb190ba upstream. @@ -363170,7 +363031,7 @@ Signed-off-by: Rob Herring 1 file changed, 10 insertions(+) diff --git a/drivers/of/address.c b/drivers/of/address.c -index 8f74c4626e0e..02d235ed202c 100644 +index 5abb056b2b51..b2a86049c423 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -695,6 +695,16 @@ static struct device_node *__of_get_dma_parent(const struct device_node *np) @@ -363194,10 +363055,10 @@ index 8f74c4626e0e..02d235ed202c 100644 2.18.4 -From 0f37bc3123c8cff1ecdb124f31af6bfcf928f106 Mon Sep 17 00:00:00 2001 +From b394cb889134bf12e09d9d4ac445e37350ad30cb Mon Sep 17 00:00:00 2001 From: Robin Murphy Date: Wed, 3 Jul 2019 14:47:31 +0100 -Subject: [PATCH 0513/1148] of: address: Follow DMA parent for "dma-coherent" +Subject: [PATCH 0510/1209] of: address: Follow DMA parent for "dma-coherent" commit c60bf3eb888a362100aa1bdbea351dab681e262a upstream. @@ -363214,10 +363075,10 @@ Signed-off-by: Rob Herring 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/address.c b/drivers/of/address.c -index 02d235ed202c..fa2098983b33 100644 +index b2a86049c423..42269c8a308b 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c -@@ -1023,7 +1023,7 @@ bool of_dma_is_coherent(struct device_node *np) +@@ -1025,7 +1025,7 @@ bool of_dma_is_coherent(struct device_node *np) of_node_put(node); return true; } @@ -363230,10 +363091,10 @@ index 02d235ed202c..fa2098983b33 100644 2.18.4 -From c98351706cc8633232932b2f52985b142ca186a9 Mon Sep 17 00:00:00 2001 +From 342fd1a0c9bd387aaff323301743db68f82326b5 Mon Sep 17 00:00:00 2001 From: Robin Murphy Date: Tue, 2 Jul 2019 18:42:39 +0100 -Subject: [PATCH 0514/1148] of: Factor out #{addr,size}-cells parsing +Subject: [PATCH 0511/1209] of: Factor out #{addr,size}-cells parsing In some cases such as PCI host controllers, we may have a "parent bus" which is an OF leaf node, but still need to correctly parse ranges from @@ -363257,7 +363118,7 @@ Signed-off-by: Rob Herring 3 files changed, 38 insertions(+), 10 deletions(-) diff --git a/drivers/of/address.c b/drivers/of/address.c -index fa2098983b33..8f4f655e571f 100644 +index 42269c8a308b..104617bffcc8 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -14,6 +14,8 @@ @@ -363357,10 +363218,10 @@ index 24786818e32e..66294d29942a 100644 2.18.4 -From 48529d962b21b9bbb151d5f6f9c0c4f6e9ee50c4 Mon Sep 17 00:00:00 2001 +From 0119498584fc73c8da53dfb1f135b1722a7d134a Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 4 Sep 2019 11:43:30 +0100 -Subject: [PATCH 0515/1148] of/address: Translate 'dma-ranges' for parent nodes +Subject: [PATCH 0512/1209] of/address: Translate 'dma-ranges' for parent nodes missing 'dma-ranges' commit 81db12ee15cb83926e290a8a3654a2dfebc80935 upstream. @@ -363381,7 +363242,7 @@ Signed-off-by: Rob Herring 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/of/address.c b/drivers/of/address.c -index 8f4f655e571f..924ceb1ba773 100644 +index 104617bffcc8..4e41ab740fc3 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -519,9 +519,13 @@ static int of_translate_one(struct device_node *parent, struct of_bus *bus, @@ -363403,10 +363264,10 @@ index 8f4f655e571f..924ceb1ba773 100644 2.18.4 -From 49543ee17a77c42031a5188515c55b4258c9a743 Mon Sep 17 00:00:00 2001 +From f1c3bc1b9e81593abb079c97d9c82dc880eeaf3b Mon Sep 17 00:00:00 2001 From: Robin Murphy Date: Wed, 3 Jul 2019 18:42:20 +0100 -Subject: [PATCH 0516/1148] of: Make of_dma_get_range() work on bus nodes +Subject: [PATCH 0513/1209] of: Make of_dma_get_range() work on bus nodes commit 951d48855d86e72e0d6de73440fe09d363168064 upstream. @@ -363435,7 +363296,7 @@ Tested-by: Nicolas Saenz Julienne 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/drivers/of/address.c b/drivers/of/address.c -index 924ceb1ba773..4632f912efa4 100644 +index 4e41ab740fc3..100b762ac080 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -940,47 +940,39 @@ int of_dma_get_range(struct device_node *np, u64 *dma_addr, u64 *paddr, u64 *siz @@ -363516,10 +363377,10 @@ index 924ceb1ba773..4632f912efa4 100644 2.18.4 -From 0989abda3372b27166b2891c9f4d3d60bd3652b7 Mon Sep 17 00:00:00 2001 +From 95b22cd31de4d0088be13c034ad1f20fcbdb2dda Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Wed, 11 Sep 2019 20:25:43 +0200 -Subject: [PATCH 0517/1148] arm64: mm: use arm64_dma_phys_limit instead of +Subject: [PATCH 0514/1209] arm64: mm: use arm64_dma_phys_limit instead of calling max_zone_dma_phys() commit ae970dc096b2d39f65f2e18d142e3978dc9ee1c7 upstream. @@ -363552,10 +363413,10 @@ index 45c00a54909c..098c0f5bedf6 100644 2.18.4 -From 58a13297ff20862b355c97f97362dada7b3d0c3f Mon Sep 17 00:00:00 2001 +From a8b522f68e62a8d5fb5f9cb917553cfe0e16466b Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Wed, 11 Sep 2019 20:25:44 +0200 -Subject: [PATCH 0518/1148] arm64: rename variables used to calculate +Subject: [PATCH 0515/1209] arm64: rename variables used to calculate ZONE_DMA32's size commit a573cdd7973dedd87e62196c400332896bb236c8 upstream. @@ -363675,10 +363536,10 @@ index 098c0f5bedf6..8e9bc64c5878 100644 2.18.4 -From e349af9d315661aa2aa32775f3a2d806456d3760 Mon Sep 17 00:00:00 2001 +From 8e40b08afa487b21521f2398677db9763496fdbb Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Wed, 11 Sep 2019 20:25:45 +0200 -Subject: [PATCH 0519/1148] arm64: use both ZONE_DMA and ZONE_DMA32 +Subject: [PATCH 0516/1209] arm64: use both ZONE_DMA and ZONE_DMA32 commit 1a8e1cef7603e218339ac63cb3178b25554524e5 upstream. @@ -363859,10 +363720,10 @@ index 8e9bc64c5878..44f07fdf7a59 100644 2.18.4 -From 0823e4f6c5c9bb3baa401bd2a5ee711233a9fbc5 Mon Sep 17 00:00:00 2001 +From 42a8e7b8dba4b678a5205263d1d9c7c151073d5a Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Wed, 11 Sep 2019 20:25:46 +0200 -Subject: [PATCH 0520/1148] mm: refresh ZONE_DMA and ZONE_DMA32 comments in +Subject: [PATCH 0517/1209] mm: refresh ZONE_DMA and ZONE_DMA32 comments in 'enum zone_type' commit 734f9246e791d8da278957b2c326d7709b2a97c0 upstream. @@ -363947,10 +363808,10 @@ index a90aba3d6afb..6d8ea64eeb28 100644 2.18.4 -From cb9bc761c3c6ef38d1951c3d7eecc344c50b85a3 Mon Sep 17 00:00:00 2001 +From 853f4e59bae30ea86f36e14e554671387e7135b6 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 28 Oct 2019 11:32:32 -0500 -Subject: [PATCH 0521/1148] resource: Add a resource_list_first_type helper +Subject: [PATCH 0518/1209] resource: Add a resource_list_first_type helper commit 494f8b10d832456a96be4ee7317425f6936cabc8 upstream. @@ -363989,10 +363850,10 @@ index 06da59b23b79..ff0339df56af 100644 2.18.4 -From 1db4b3746b027181973110a819f8149d5554cf96 Mon Sep 17 00:00:00 2001 +From f4f9b406c049811e61daf762f59ed332fdd6448f Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Mon, 14 Oct 2019 20:31:03 +0200 -Subject: [PATCH 0522/1148] dma/direct: turn ARCH_ZONE_DMA_BITS into a variable +Subject: [PATCH 0519/1209] dma/direct: turn ARCH_ZONE_DMA_BITS into a variable commit 8b5369ea580964dbc982781bfb9fb93459fc5e8d upstream. @@ -364204,10 +364065,10 @@ index d2b462835469..947823f1ccdf 100644 2.18.4 -From 9e1e1ec1f20443b22db3e301ee9951f2410236d9 Mon Sep 17 00:00:00 2001 +From e989019892b2c6fc19da8cc769cb3554a2439f5e Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Thu, 7 Nov 2019 16:06:44 +0100 -Subject: [PATCH 0523/1148] dma-direct: check for overflows on 32 bit DMA +Subject: [PATCH 0520/1209] dma-direct: check for overflows on 32 bit DMA addresses As seen on the new Raspberry Pi 4 and sta2x11's DMA implementation it is @@ -364274,10 +364135,10 @@ index d03af3605460..7aadb776924d 100644 2.18.4 -From f727f6e45de1fd623d66c28ccf8b1bfb4384f7fd Mon Sep 17 00:00:00 2001 +From 87b469840fb2e1e1856c59ac756fe18014d01d22 Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Thu, 7 Nov 2019 16:06:45 +0100 -Subject: [PATCH 0524/1148] x86/PCI: sta2x11: use default DMA address +Subject: [PATCH 0521/1209] x86/PCI: sta2x11: use default DMA address translation commit e380a0394c36a3a878c858418d5dd7f5f195b6fc upstream. @@ -364546,10 +364407,10 @@ index 6269a175385d..4a631264b809 100644 2.18.4 -From 6551b837afcc794804ee45135db508a19be9736e Mon Sep 17 00:00:00 2001 +From 025dc7a33c92cd577397e5747961972a9954f0ec Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 30 Oct 2019 17:30:57 -0500 -Subject: [PATCH 0525/1148] PCI: of: Add inbound resource parsing to helpers +Subject: [PATCH 0522/1209] PCI: of: Add inbound resource parsing to helpers Extend devm_of_pci_get_host_bridge_resources() and pci_parse_request_of_pci_ranges() helpers to also parse the inbound @@ -364631,10 +364492,10 @@ index fbcb211cceb4..d421555fc786 100644 return ret; diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c -index f2481e80e272..7878e77a2630 100644 +index d0e60441dc8f..e8c97cdd22bf 100644 --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c -@@ -1019,7 +1019,8 @@ static int advk_pcie_probe(struct platform_device *pdev) +@@ -1018,7 +1018,8 @@ static int advk_pcie_probe(struct platform_device *pdev) return ret; } @@ -364985,10 +364846,10 @@ index a5adc2e2c351..3dcd031118dd 100644 return -EINVAL; } diff --git a/include/linux/pci.h b/include/linux/pci.h -index e92bd9b32f36..bca14457c44b 100644 +index 6a6a819c5b49..df23d3517545 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h -@@ -2277,6 +2277,7 @@ struct irq_domain; +@@ -2278,6 +2278,7 @@ struct irq_domain; struct irq_domain *pci_host_bridge_of_msi_domain(struct pci_bus *bus); int pci_parse_request_of_pci_ranges(struct device *dev, struct list_head *resources, @@ -364996,7 +364857,7 @@ index e92bd9b32f36..bca14457c44b 100644 struct resource **bus_range); /* Arch may override this (weak) */ -@@ -2285,9 +2286,11 @@ struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus); +@@ -2286,9 +2287,11 @@ struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus); #else /* CONFIG_OF */ static inline struct irq_domain * pci_host_bridge_of_msi_domain(struct pci_bus *bus) { return NULL; } @@ -365015,10 +364876,10 @@ index e92bd9b32f36..bca14457c44b 100644 2.18.4 -From 261581d601187f1f87e628bd9be97b0dd36499d9 Mon Sep 17 00:00:00 2001 +From e391d93bbfadb468acd726b61203a996d1c2c620 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 12 Nov 2019 17:06:04 +0100 -Subject: [PATCH 0526/1148] dma-direct: unify the dma_capable definitions +Subject: [PATCH 0523/1209] dma-direct: unify the dma_capable definitions commit 130c1ccbf55330b55e82612a6e54eebb82c9d746 upstream. @@ -365130,10 +364991,10 @@ index 7aadb776924d..9e2e3d37b15c 100644 2.18.4 -From 39d7434d34a750725af2077f8fc9030544485c8a Mon Sep 17 00:00:00 2001 +From 417ad0c418a83c8e346c9840dd9340b7d3171068 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 12 Nov 2019 17:07:43 +0100 -Subject: [PATCH 0527/1148] dma-direct: avoid a forward declaration for +Subject: [PATCH 0524/1209] dma-direct: avoid a forward declaration for phys_to_dma Move dma_capable down a bit so that we don't need a forward declaration @@ -365205,10 +365066,10 @@ index 9e2e3d37b15c..f812ea2459f1 100644 2.18.4 -From 28db8684599b077ce7af3d8874d68778f69efb2c Mon Sep 17 00:00:00 2001 +From 87f8e2f9bd2b623b2c4f294468123b36488a6d07 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 19 Nov 2019 17:38:58 +0100 -Subject: [PATCH 0528/1148] dma-direct: exclude dma_direct_map_resource from +Subject: [PATCH 0525/1209] dma-direct: exclude dma_direct_map_resource from the min_low_pfn check commit 68a33b1794665ba8a1d1ef1d3bfcc7c587d380a6 upstream. @@ -365318,10 +365179,10 @@ index 947823f1ccdf..803bb857aa1b 100644 return DMA_MAPPING_ERROR; } diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c -index 673a2cdb2656..9280d6f8271e 100644 +index f99b79d7e123..8d230ee47e12 100644 --- a/kernel/dma/swiotlb.c +++ b/kernel/dma/swiotlb.c -@@ -678,7 +678,7 @@ bool swiotlb_map(struct device *dev, phys_addr_t *phys, dma_addr_t *dma_addr, +@@ -682,7 +682,7 @@ bool swiotlb_map(struct device *dev, phys_addr_t *phys, dma_addr_t *dma_addr, /* Ensure that the address returned is DMA'ble */ *dma_addr = __phys_to_dma(dev, *phys); @@ -365334,10 +365195,10 @@ index 673a2cdb2656..9280d6f8271e 100644 2.18.4 -From 4df995767345c748531fcb1c2a5b471d1e4afdfe Mon Sep 17 00:00:00 2001 +From a8a49be96cb6053d97c8f6e99e827c258fa169c1 Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Thu, 21 Nov 2019 10:26:44 +0100 -Subject: [PATCH 0529/1148] dma-mapping: treat dev->bus_dma_mask as a DMA limit +Subject: [PATCH 0526/1209] dma-mapping: treat dev->bus_dma_mask as a DMA limit commit a7ba70f1787f977f970cd116076c6fce4b9e01cc upstream. @@ -365730,10 +365591,10 @@ index 803bb857aa1b..085a0db545c7 100644 2.18.4 -From 315093de7f0dba89427940ace140c1bf92e01385 Mon Sep 17 00:00:00 2001 +From d6427c2f469938761cb07fcf94d4d000f70c6a88 Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Mon, 16 Dec 2019 12:01:08 +0100 -Subject: [PATCH 0530/1148] ARM: dts: bcm2711: Enable PCIe controller +Subject: [PATCH 0527/1209] ARM: dts: bcm2711: Enable PCIe controller commit d5c8dc0d4c880fbde5293cc186b1ab23466254c4 upstream. @@ -365792,10 +365653,10 @@ index e2f6ffb00aa9..b56388ce1216 100644 2.18.4 -From ff5900b51e92d9d6bbd1160287df87bc74bf39a9 Mon Sep 17 00:00:00 2001 +From ce75606e4f0ac1ceb90bddb8122716a9b96e5b52 Mon Sep 17 00:00:00 2001 From: Jim Quinlan Date: Mon, 16 Dec 2019 12:01:09 +0100 -Subject: [PATCH 0531/1148] PCI: brcmstb: Add Broadcom STB PCIe host controller +Subject: [PATCH 0528/1209] PCI: brcmstb: Add Broadcom STB PCIe host controller driver commit c0452137034bda8f686dd9a2e167949bfffd6776 upstream. @@ -366613,10 +366474,10 @@ index 000000000000..3250a2e6b1b4 2.18.4 -From 03a1d9d287d0cd352d2afff704af07032a3c220a Mon Sep 17 00:00:00 2001 +From 6c3ca70a40d4ad88618a833966042f5b5a2780a0 Mon Sep 17 00:00:00 2001 From: Jim Quinlan Date: Mon, 16 Dec 2019 12:01:10 +0100 -Subject: [PATCH 0532/1148] PCI: brcmstb: Add MSI support +Subject: [PATCH 0529/1209] PCI: brcmstb: Add MSI support commit 40ca1bf580ef24df30702032ba5e40dfdcaa200b upstream. @@ -367004,10 +366865,10 @@ index 3250a2e6b1b4..d20aabc26273 100644 2.18.4 -From 3ff28154fffc04b42839edbb4acc726ba2a02af1 Mon Sep 17 00:00:00 2001 +From abfce711fa19c448c3feec3b8ac0c6fe4e9ba429 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Thu, 27 Feb 2020 12:51:46 +0100 -Subject: [PATCH 0533/1148] PCI: brcmstb: Fix build on 32bit ARM platforms with +Subject: [PATCH 0530/1209] PCI: brcmstb: Fix build on 32bit ARM platforms with older compilers commit 73a7a271b3eee7b83f29b13866163776f1cbef89 upstream. @@ -367048,10 +366909,10 @@ index d20aabc26273..3a10e678c7f4 100644 2.18.4 -From 6bdd30b7edf087313f886d2ff8874e60886452cd Mon Sep 17 00:00:00 2001 +From 511e8aefd438a3c0ed89539cf13798c88b478b65 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 2 Mar 2020 15:05:25 +0000 -Subject: [PATCH 0534/1148] bcm2711-rpi.dtsi: Use upstream pcie node +Subject: [PATCH 0531/1209] bcm2711-rpi.dtsi: Use upstream pcie node Now that the upstream bcm2711 DT has a pcie DT node there's no need to define one downstream. @@ -367131,10 +366992,10 @@ index a71b2eb74723..18ba012413aa 100644 2.18.4 -From e1abbf28ed981dc8da91507e44de0cbc8b3a71dd Mon Sep 17 00:00:00 2001 +From 74f479f336aa15f63d56d946e01880409abd26b1 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 11 Mar 2020 12:14:49 +0000 -Subject: [PATCH 0535/1148] Revert "media: i2c: Add driver for Sony IMX219 +Subject: [PATCH 0532/1209] Revert "media: i2c: Add driver for Sony IMX219 sensor" This reverts commit 39d484cb87cbe5da5035199fbdec1f3c0b71d2ea. @@ -368282,10 +368143,10 @@ index 682397a48492..000000000000 2.18.4 -From 8337104f6bff51fe17446ee769e1e55e8d7bca45 Mon Sep 17 00:00:00 2001 +From f9992d892e44a5a7e56b0519af6290d7d86a0005 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 11 Mar 2020 12:14:58 +0000 -Subject: [PATCH 0536/1148] Revert "media: dt-bindings: Add binding for the +Subject: [PATCH 0533/1209] Revert "media: dt-bindings: Add binding for the Sony IMX219 sensor" This reverts commit e3dca865875b345a2fa45e8295e32d701c666334. @@ -368363,10 +368224,10 @@ index a02f1ce1e120..000000000000 2.18.4 -From 5b5cdacc896555c903015b50b3698917a9107319 Mon Sep 17 00:00:00 2001 +From 3090be2d186db19dd3d9214ddafbef48855923fa Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Mon, 20 Jan 2020 05:15:57 -0300 -Subject: [PATCH 0537/1148] media: dt-bindings: media: i2c: Add IMX219 CMOS +Subject: [PATCH 0534/1209] media: dt-bindings: media: i2c: Add IMX219 CMOS sensor binding Commit 9d730f2cf4c0391785855dd231577d2de2594df9 upstream. @@ -368528,10 +368389,10 @@ index b7685777a806..d99bdf934705 100644 2.18.4 -From 5e02093be0c580b7842fa972fa47481f2c2d895e Mon Sep 17 00:00:00 2001 +From e51aebe479328e7da42f3e2c822d1c06bd3eb52d Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 20 Jan 2020 05:15:58 -0300 -Subject: [PATCH 0538/1148] media: i2c: Add driver for Sony IMX219 sensor +Subject: [PATCH 0535/1209] media: i2c: Add driver for Sony IMX219 sensor Commit 1283b3b8f82b9004fbb94398cade5c8e797a2c8d upstream. (Currently on linux-media/master, queued for 5.7) @@ -369911,10 +369772,10 @@ index 000000000000..f1effb5a5f66 2.18.4 -From 90915c18be86159df28e4f02889b42c1409dad60 Mon Sep 17 00:00:00 2001 +From 909163bb2d51eb5e2290aa802ed39034c1c88d55 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 11 Mar 2020 12:07:57 +0000 -Subject: [PATCH 0539/1148] overlays: imx219: Correct link frequency to match +Subject: [PATCH 0536/1209] overlays: imx219: Correct link frequency to match the upstream driver The upstream driver is checking the link frequency parameter, and @@ -369942,10 +369803,10 @@ index 2a1500d07b68..b9e3d9e5730d 100644 2.18.4 -From 509e171a1b8f657abcefd3ccab51cfb0fa2a9567 Mon Sep 17 00:00:00 2001 +From fa0309f6db6f47959811b182ecdd4216ec62fdcf Mon Sep 17 00:00:00 2001 From: Nataliya Korovkina Date: Thu, 12 Mar 2020 17:22:53 -0400 -Subject: [PATCH 0540/1148] Kbuild: Allow .dtbo overlays to be built, adjust. +Subject: [PATCH 0537/1209] Kbuild: Allow .dtbo overlays to be built, adjust. This is adjustment to commit d368ceaacdccd7732dc97d1d7987bdf7149d62e3 "kbuild: Allow .dtbo overlays to be built piecemeal" @@ -369958,10 +369819,10 @@ Signed-off-by: Nataliya Korovkina 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile -index 79843dd0993c..30dc5fb5f4e8 100644 +index 098315e0a4d4..020319c9316d 100644 --- a/Makefile +++ b/Makefile -@@ -1264,7 +1264,7 @@ ifneq ($(dtstree),) +@@ -1267,7 +1267,7 @@ ifneq ($(dtstree),) %.dtb: include/config/kernel.release scripts_dtc $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ @@ -369974,10 +369835,10 @@ index 79843dd0993c..30dc5fb5f4e8 100644 2.18.4 -From 42651e566c899ead3110cbe7187724904551d51b Mon Sep 17 00:00:00 2001 +From 88895292db7f20ab236143fb1a980d8a997ce5f5 Mon Sep 17 00:00:00 2001 From: David Plowman Date: Wed, 15 Jan 2020 13:40:38 +0000 -Subject: [PATCH 0541/1148] media: ov5647: Fix return codes from +Subject: [PATCH 0538/1209] media: ov5647: Fix return codes from ov5647_write/ov5647_read functions. Previously they were returning positive non-zero codes for success, @@ -370054,10 +369915,10 @@ index 07550377be2e..6ecc018ac431 100644 2.18.4 -From 998c3b26233977cab04b17d57a16b978144dd657 Mon Sep 17 00:00:00 2001 +From 61d142b3a7f2ef5dca6ebd93930bf61522087af6 Mon Sep 17 00:00:00 2001 From: David Plowman Date: Wed, 29 Jan 2020 15:30:53 +0000 -Subject: [PATCH 0542/1148] media: ov5647: Add basic support for multiple +Subject: [PATCH 0539/1209] media: ov5647: Add basic support for multiple sensor modes. Specifically: @@ -370467,10 +370328,10 @@ index 6ecc018ac431..0d84b7640cf3 100644 2.18.4 -From 07923a2e14e7f193b67d4a426d808dfdc76d4af3 Mon Sep 17 00:00:00 2001 +From 7100f39c484c04dd42a7adb6d6e1d9a1108a788c Mon Sep 17 00:00:00 2001 From: David Plowman Date: Wed, 29 Jan 2020 15:31:23 +0000 -Subject: [PATCH 0543/1148] media: ov5647: Add V4L2 controls for analogue gain, +Subject: [PATCH 0540/1209] media: ov5647: Add V4L2 controls for analogue gain, exposure and AWB Added basic v4l2_ctrl_handler infrastructure (there was none @@ -370750,10 +370611,10 @@ index 0d84b7640cf3..16cfafc9cf9c 100644 2.18.4 -From 0e4024c4d10c8e1b92ca1bf6efcb24e8c391a681 Mon Sep 17 00:00:00 2001 +From 397c4241c2fa42f4f88ea44bd2a4dfb03a0f7b31 Mon Sep 17 00:00:00 2001 From: David Plowman Date: Wed, 29 Jan 2020 15:31:28 +0000 -Subject: [PATCH 0544/1148] media: ov5647: Add extra 10-bit sensor modes. +Subject: [PATCH 0541/1209] media: ov5647: Add extra 10-bit sensor modes. The 8-bit VGA mode remains, we add the following 10-bit modes: @@ -371305,10 +371166,10 @@ index 16cfafc9cf9c..fc6c5d9c4532 100644 2.18.4 -From 2a61f56646cdb46a50c53e5796aa4bff86aac81f Mon Sep 17 00:00:00 2001 +From 340fc0459cbf8d008c4235f6f38848c754f0554f Mon Sep 17 00:00:00 2001 From: David Plowman Date: Wed, 29 Jan 2020 15:31:32 +0000 -Subject: [PATCH 0545/1148] media: ov5647: change defaults to better match raw +Subject: [PATCH 0542/1209] media: ov5647: change defaults to better match raw camera applications. Specifically: @@ -371370,10 +371231,10 @@ index fc6c5d9c4532..66b3ee5cc190 100644 2.18.4 -From acf129548c086b8b1734ef86f93000924db40fd8 Mon Sep 17 00:00:00 2001 +From e80aeb8706c53fbd50ec6841da4270827049891f Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 26 Dec 2019 15:44:31 +0100 -Subject: [PATCH 0546/1148] drm/vc4: fkms: Change crtc_state structure name to +Subject: [PATCH 0543/1209] drm/vc4: fkms: Change crtc_state structure name to avoid conflict Signed-off-by: Maxime Ripard @@ -371455,10 +371316,10 @@ index b0c1096efbe5..2bfa10660fe0 100644 2.18.4 -From 9d2c6c920ce2a66c3fe8e3c7322396ddbf8b9392 Mon Sep 17 00:00:00 2001 +From 088327bde4632e7222ae648ce280d49fdaea6833 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 24 Jan 2020 14:22:06 +0000 -Subject: [PATCH 0547/1148] drm/fourcc: Add packed 10bit YUV 4:2:0 format +Subject: [PATCH 0544/1209] drm/fourcc: Add packed 10bit YUV 4:2:0 format Adds a format that is 3 10bit YUV 4:2:0 samples packed into a 32bit work (with 2 spare bits). @@ -371518,10 +371379,10 @@ index 3feeaa3f987a..9847286609a8 100644 2.18.4 -From 97eb28786341e9440cc04f8465694493c3293071 Mon Sep 17 00:00:00 2001 +From cf5765d2f4538d3bfa8141a82febdac22ec60fda Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 24 Jan 2020 14:24:33 +0000 -Subject: [PATCH 0548/1148] drm/vc4: Add DRM_FORMAT_P030 support to +Subject: [PATCH 0545/1209] drm/vc4: Add DRM_FORMAT_P030 support to firmware-kms Adds support for this format which is 3 10bit samples packed into @@ -371598,10 +371459,10 @@ index 0bdffe5dd1e9..8e76576733ef 100644 2.18.4 -From 59ddc24965d1e1e12a9bb28fa85c02dc454dda08 Mon Sep 17 00:00:00 2001 +From d6a6725f32c2100664025bc605c002ca44f29549 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Fri, 6 Mar 2020 11:08:10 +0100 -Subject: [PATCH 0549/1148] gpio-ir-overlay: add parameter to configure signal +Subject: [PATCH 0546/1209] gpio-ir-overlay: add parameter to configure signal polarity (#3490) Standard IR receivers use inverted / active-low signalling @@ -371651,10 +371512,10 @@ index 58f588498d68..162b6ce07dc9 100644 2.18.4 -From d042bbefe6d96f2e17ffe7f87da22802c790877e Mon Sep 17 00:00:00 2001 +From 4caa607de1fab537264e392464c7734ec0fa8189 Mon Sep 17 00:00:00 2001 From: AMuszkat Date: Mon, 24 Feb 2020 22:56:59 +0100 -Subject: [PATCH 0550/1148] Add support for merus-amp soundcard and ma120x0p +Subject: [PATCH 0547/1209] Add support for merus-amp soundcard and ma120x0p codec correct checkpatch warnings and errors @@ -373260,10 +373121,10 @@ index 000000000000..39c74b17e007 2.18.4 -From b70ded7fb6d924c517c20cd0a2aa8d6326b7db51 Mon Sep 17 00:00:00 2001 +From 26cd049fd1b51a74860beea10182e53f59e20bf5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 17 Mar 2020 16:39:07 +0000 -Subject: [PATCH 0551/1148] ARM: dts: bcm2711: Add 32-bit PMU compatibility +Subject: [PATCH 0548/1209] ARM: dts: bcm2711: Add 32-bit PMU compatibility The "arm" architecture has no support for the cortex-a72 as such, but the performance and measurement unit from the cortex-a15 seems to be @@ -373293,10 +373154,10 @@ index 18ba012413aa..b434b8392e9e 100644 2.18.4 -From e061d9817cf612a94e83ce8cd44c2f74b0b283c5 Mon Sep 17 00:00:00 2001 +From 703bd36025d706bc37bd25b96b585cfd3f5f0d0c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 19 Mar 2020 10:04:46 +0000 -Subject: [PATCH 0552/1148] ARM: dts: bcm271x: Use a53 pmu, drop RPI364 +Subject: [PATCH 0549/1209] ARM: dts: bcm271x: Use a53 pmu, drop RPI364 The upstream bcm2837.dtsi uses cortex-a53-pmu, so we can do the same but with a fallback to the cortex-a7-pmu which is supported by the @@ -373376,10 +373237,10 @@ index 1fd86f81f542..bf69a4b0b172 100644 2.18.4 -From 3a3dafe42cd1beb10c29aaf6be7a51f098dfbe4c Mon Sep 17 00:00:00 2001 +From dd0a75b84339b6610361da50c10283c7039979a9 Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Tue, 25 Feb 2020 14:11:59 +0100 -Subject: [PATCH 0553/1148] net: bcmgenet: Clear ID_MODE_DIS in +Subject: [PATCH 0550/1209] net: bcmgenet: Clear ID_MODE_DIS in EXT_RGMII_OOB_CTRL when not needed commit 402482a6a78e5c61d8a2ec6311fc5b4aca392cd6 upstream. @@ -373414,10 +373275,10 @@ index 0516d14f4703..942ee7cc8266 100644 2.18.4 -From 87241b010e4412b3ab8595533664947bf6ad1c5b Mon Sep 17 00:00:00 2001 +From 9af745b07f049bb9046c03e9e8eeffac0b147ec7 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 18 Nov 2019 16:51:22 +0100 -Subject: [PATCH 0554/1148] drm/modes: parse_cmdline: Fix possible reference +Subject: [PATCH 0551/1209] drm/modes: parse_cmdline: Fix possible reference past end of string Commit 8582e244e5fe72d2e9ace186fa8f3ed3bb4122e1 upstream. @@ -373561,10 +373422,10 @@ index 3fd35e6b9d53..86fb462a8ca1 100644 2.18.4 -From cf52fddde820a1f3c8f4b5c078538ff29bde43e7 Mon Sep 17 00:00:00 2001 +From 6ff46733c018930cb8c7d9c3c8b5edcb92691d0c Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 18 Nov 2019 16:51:23 +0100 -Subject: [PATCH 0555/1148] drm/modes: parse_cmdline: Make various char +Subject: [PATCH 0552/1209] drm/modes: parse_cmdline: Make various char pointers const Commit 83e14ea3a64f00897cc31974d3ae4e27e5a7405b upstream. @@ -373617,10 +373478,10 @@ index 86fb462a8ca1..342fe8076ee7 100644 2.18.4 -From ac082bf3ebe8644a8a9fb344887b9b9f74dbbef1 Mon Sep 17 00:00:00 2001 +From 3fa55a6a28bc44fe33c6c4e72cfc90acef4afd15 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 18 Nov 2019 16:51:24 +0100 -Subject: [PATCH 0556/1148] drm/modes: parse_cmdline: Stop parsing extras after +Subject: [PATCH 0553/1209] drm/modes: parse_cmdline: Stop parsing extras after bpp / refresh at ', ' Commit c2ed3e941901810ad3d55ce1935fa22c5007fee4 upstream. @@ -373722,10 +373583,10 @@ index 035f86c5d648..7b199acaf292 100644 2.18.4 -From d6b2198d504979ebc2a1d4b8dff8704538e3f20c Mon Sep 17 00:00:00 2001 +From e9032cf121ec1bfcc70fc1ded1fba72a0ef0fb7f Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 18 Nov 2019 16:51:25 +0100 -Subject: [PATCH 0557/1148] drm/modes: parse_cmdline: Accept extras directly +Subject: [PATCH 0554/1209] drm/modes: parse_cmdline: Accept extras directly after mode combined with options Commit cfb0881b8f621b656a9e23b31944a5db94cf5842 upstream. @@ -373809,10 +373670,10 @@ index 7b199acaf292..a1210b7bf937 100644 2.18.4 -From 3afd891ef91bb438c60470d55e9f4c73a163ba47 Mon Sep 17 00:00:00 2001 +From 50d034f5aa6aa0383cf8b7934511826fd7929f01 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 18 Nov 2019 16:51:26 +0100 -Subject: [PATCH 0558/1148] drm/modes: parse_cmdline: Rework +Subject: [PATCH 0555/1209] drm/modes: parse_cmdline: Rework drm_mode_parse_cmdline_options() Commit 739b200c2edcaaa7a86f37b0c11db57956433dfb upstream. @@ -373891,10 +373752,10 @@ index ff9d9daf2631..0d7de6f4dec0 100644 2.18.4 -From 6aff260bbd48a9a93442ec5939ea55dfd49f9744 Mon Sep 17 00:00:00 2001 +From 9369aa8084e3a3c82f564e679c1eadefe28a6528 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 18 Nov 2019 16:51:27 +0100 -Subject: [PATCH 0559/1148] drm/modes: parse_cmdline: Add freestanding argument +Subject: [PATCH 0556/1209] drm/modes: parse_cmdline: Add freestanding argument to drm_mode_parse_cmdline_options() Commit 99e2716e053734b70434502867be24d20a3e2d84 upstream. @@ -373946,10 +373807,10 @@ index 0d7de6f4dec0..d4b9e7ed6dfe 100644 2.18.4 -From 7fe469b122630791ff58d9b9c7881bf6288ec321 Mon Sep 17 00:00:00 2001 +From 44bdc5fd5ac7491668a7ca3f97c9aef41570fba9 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 18 Nov 2019 16:51:28 +0100 -Subject: [PATCH 0560/1148] drm/modes: parse_cmdline: Set bpp/refresh_specified +Subject: [PATCH 0557/1209] drm/modes: parse_cmdline: Set bpp/refresh_specified after successful parsing Commit 6a2d163756545aa3180d7851d5f8322b865e72be upstream. @@ -374016,10 +373877,10 @@ index d4b9e7ed6dfe..7b9f067a8898 100644 2.18.4 -From f6beed693845769c61667fb44ce30053520da4da Mon Sep 17 00:00:00 2001 +From 886605378da014a314cff1499222aacf4845913f Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 18 Nov 2019 16:51:29 +0100 -Subject: [PATCH 0561/1148] drm/modes: parse_cmdline: Allow specifying +Subject: [PATCH 0558/1209] drm/modes: parse_cmdline: Allow specifying stand-alone options Commit 7b1cce760afe38b40f0989cdf10b2190dccf9815 upstream. @@ -374272,10 +374133,10 @@ index a1210b7bf937..9835dd329cfc 100644 2.18.4 -From abe292b6217308a95fee19da74fe3a840639cf29 Mon Sep 17 00:00:00 2001 +From 266c9ebf283ae2a20e48983058ce6a4a9894161d Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 18 Nov 2019 16:51:30 +0100 -Subject: [PATCH 0562/1148] drm/modes: parse_cmdline: Add support for +Subject: [PATCH 0559/1209] drm/modes: parse_cmdline: Add support for specifying panel_orientation (v2) Commit 4e7a4a6fbdc669c44e6079f9d5eb25673749455f upstream. @@ -374443,10 +374304,10 @@ index 681cb590f952..3fbcf7d3fcaf 100644 2.18.4 -From 096e2d5e7fd744605236be607ccb9e937f664654 Mon Sep 17 00:00:00 2001 +From 35c3e1949e90ba842d5df40abe8bd8c6ab582805 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 18 Nov 2019 16:51:31 +0100 -Subject: [PATCH 0563/1148] drm/modes: parse_cmdline: Remove some unnecessary +Subject: [PATCH 0560/1209] drm/modes: parse_cmdline: Remove some unnecessary code (v2) Commit 5b926617cdef41ce0696e09834991194b1759e28 upstream. @@ -374487,10 +374348,10 @@ index 378a915b81dd..99149616fce0 100644 2.18.4 -From 1e2ff3a68a85c5c4a49f95794950da1ea86b9d7c Mon Sep 17 00:00:00 2001 +From 9f33fd4ce192ec42b19808d49316b78f5795888e Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 18 Nov 2019 16:51:32 +0100 -Subject: [PATCH 0564/1148] drm/modes: parse_cmdline: Explicitly memset the +Subject: [PATCH 0561/1209] drm/modes: parse_cmdline: Explicitly memset the passed in drm_cmdline_mode struct Commit d1fe276b5115f0d581c3cfe6154633b3547e8aab upstream. @@ -374534,10 +374395,10 @@ index 99149616fce0..afc0ee99b138 100644 2.18.4 -From ca3f1a2dd2a1c5f88b820d929f338953525fc959 Mon Sep 17 00:00:00 2001 +From 3fcb90d974c7e57bd4e4d7f875f627dabf6f3053 Mon Sep 17 00:00:00 2001 From: Yukimasa Sugizaki <4298265+Terminus-IMRC@users.noreply.github.com> Date: Fri, 20 Mar 2020 19:01:23 +0900 -Subject: [PATCH 0565/1148] drm/v3d: Replace wait_for macros to remove use of +Subject: [PATCH 0562/1209] drm/v3d: Replace wait_for macros to remove use of msleep (#3510) commit 9daee6141cc9c75b09659b02b1cb9eeb2f5e16cc upstream. @@ -374629,10 +374490,10 @@ index 15bc4e28b6cc..197dd4a8a7e1 100644 2.18.4 -From e1a58febe3450736138795e78269a07b9ab460e9 Mon Sep 17 00:00:00 2001 +From dee8ebe50175fd00dfa2370807bab73ba9426279 Mon Sep 17 00:00:00 2001 From: Nick B Date: Mon, 9 Mar 2020 09:05:39 -0400 -Subject: [PATCH 0566/1148] Reduce noise from rpi poe hat fan +Subject: [PATCH 0563/1209] Reduce noise from rpi poe hat fan This adds 2 extra states, at 40c and 45c, with PWM of 31 and 63 (out of 255) for the rpi poe hat fan. This significantly improves user @@ -374731,10 +374592,10 @@ index 21f8fe6f1229..544038b614e1 100644 2.18.4 -From 00c95d6e38b0a0c1ec96f7bfccdeeaba015831be Mon Sep 17 00:00:00 2001 +From ca3f33b078884e715e9fdca87259915d6692eaaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Sat, 7 Mar 2020 22:37:52 +0100 -Subject: [PATCH 0567/1148] add Sensirion SPS30 to i2c-sensor overlay +Subject: [PATCH 0564/1209] add Sensirion SPS30 to i2c-sensor overlay MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -374798,10 +374659,10 @@ index 40881d72a157..ce97837b0db5 100644 2.18.4 -From 7bf25e3c9f790f5bd16c33d7d700b3314e476f7d Mon Sep 17 00:00:00 2001 +From 8ee1bac2624588749e51cf286cd07dbacb457dd7 Mon Sep 17 00:00:00 2001 From: Ricardo Ribalda Delgado Date: Mon, 7 Oct 2019 12:06:31 -0300 -Subject: [PATCH 0568/1148] media: add V4L2_CTRL_TYPE_AREA control type +Subject: [PATCH 0565/1209] media: add V4L2_CTRL_TYPE_AREA control type Commit d1dc49370f8371b00e682ac409aa1987ce641e93 upstream. @@ -374938,10 +374799,10 @@ index 570ff4b0205a..e7f93109e4a4 100644 extern const struct v4l2_subscribed_event_ops v4l2_ctrl_sub_ev_ops; diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h -index 3c05779e2687..7b673d92b54f 100644 +index 456dfa847ccb..0ffaad82040d 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h -@@ -427,6 +427,11 @@ struct v4l2_fract { +@@ -426,6 +426,11 @@ struct v4l2_fract { __u32 denominator; }; @@ -374953,7 +374814,7 @@ index 3c05779e2687..7b673d92b54f 100644 /** * struct v4l2_capability - Describes V4L2 device caps returned by VIDIOC_QUERYCAP * -@@ -1725,6 +1730,7 @@ enum v4l2_ctrl_type { +@@ -1724,6 +1729,7 @@ enum v4l2_ctrl_type { V4L2_CTRL_TYPE_U8 = 0x0100, V4L2_CTRL_TYPE_U16 = 0x0101, V4L2_CTRL_TYPE_U32 = 0x0102, @@ -374965,10 +374826,10 @@ index 3c05779e2687..7b673d92b54f 100644 2.18.4 -From dd815be692b63af937ecf2ea8c07f2381a084c5d Mon Sep 17 00:00:00 2001 +From 443cc6a52c8ab026a50dc275fabaf240f0173dee Mon Sep 17 00:00:00 2001 From: Ricardo Ribalda Delgado Date: Mon, 7 Oct 2019 12:06:33 -0300 -Subject: [PATCH 0569/1148] media: add V4L2_CID_UNIT_CELL_SIZE control +Subject: [PATCH 0566/1209] media: add V4L2_CID_UNIT_CELL_SIZE control Commit 61fd036d01111679b01e4b92e6bd0cdd33809aea upstream. @@ -375025,10 +374886,10 @@ index 616a7c64c4d2..d21ac7545626 100644 2.18.4 -From 1e2c6a393be8e36248b444c1209b0370ee7aa202 Mon Sep 17 00:00:00 2001 +From 97d4c7af37a46417157519938023a317166acae6 Mon Sep 17 00:00:00 2001 From: Benoit Parrot Date: Mon, 7 Oct 2019 12:10:07 -0300 -Subject: [PATCH 0570/1148] media: v4l2-common: add pixel encoding support +Subject: [PATCH 0567/1209] media: v4l2-common: add pixel encoding support Commit d5a897c8428b38053df4b427a4277b1a0722bfa0 upstream. @@ -375262,10 +375123,10 @@ index c070d8ae11e5..d8c29e089000 100644 2.18.4 -From efca9eaec4fa5aadc5a8d367317fc18a18088956 Mon Sep 17 00:00:00 2001 +From 0a408b94928d123cea2a16cfc68a46b8cc2af4fe Mon Sep 17 00:00:00 2001 From: Benoit Parrot Date: Mon, 7 Oct 2019 12:10:08 -0300 -Subject: [PATCH 0571/1148] media: v4l2-common: add RGB565 and RGB55 to +Subject: [PATCH 0568/1209] media: v4l2-common: add RGB565 and RGB55 to v4l2_format_info Commit b373f84d77e1c409aacb4ff5bb5726c45fc8b166 upstream. @@ -375296,10 +375157,10 @@ index 09a3915b98a3..d0e5ebc736f9 100644 2.18.4 -From 94063b9b4da488752f5923b14de15f13ed301f27 Mon Sep 17 00:00:00 2001 +From db84315a255960a40931bc7884a1668ea27aff85 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Fri, 11 Oct 2019 06:32:40 -0300 -Subject: [PATCH 0572/1148] media: vb2: add V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF +Subject: [PATCH 0569/1209] media: vb2: add V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF This patch adds support for the V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF flag. @@ -375462,10 +375323,10 @@ index 8a10889dc2fd..59bf33a12648 100644 * to_vb2_v4l2_buffer() - cast struct vb2_buffer * to struct vb2_v4l2_buffer * */ diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h -index 7b673d92b54f..bccfa30d264c 100644 +index 0ffaad82040d..a3fc685be514 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h -@@ -925,11 +925,12 @@ struct v4l2_requestbuffers { +@@ -924,11 +924,12 @@ struct v4l2_requestbuffers { }; /* capabilities for struct v4l2_requestbuffers and v4l2_create_buffers */ @@ -375483,7 +375344,7 @@ index 7b673d92b54f..bccfa30d264c 100644 /** * struct v4l2_plane - plane info for multi-planar buffers -@@ -1051,6 +1052,8 @@ static inline __u64 v4l2_timeval_to_ns(const struct timeval *tv) +@@ -1050,6 +1051,8 @@ static inline __u64 v4l2_timeval_to_ns(const struct timeval *tv) #define V4L2_BUF_FLAG_IN_REQUEST 0x00000080 /* timecode field is valid */ #define V4L2_BUF_FLAG_TIMECODE 0x00000100 @@ -375496,10 +375357,10 @@ index 7b673d92b54f..bccfa30d264c 100644 2.18.4 -From 0f27e16bf98249c4b759195a4c50fc1b01da6b30 Mon Sep 17 00:00:00 2001 +From 4a405fd3662021e102c9759e82a9b056c2411c12 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Fri, 11 Oct 2019 06:32:41 -0300 -Subject: [PATCH 0573/1148] media: v4l2-mem2mem: support held capture buffers +Subject: [PATCH 0570/1209] media: v4l2-mem2mem: support held capture buffers Commit f8cca8c97a63d77f48334cde81d15014f43530ef upstream. @@ -375764,10 +375625,10 @@ index 0b9c3a287061..229d9f5d4370 100644 2.18.4 -From f746f7a53b01d2ece69f612395772937390ddd6e Mon Sep 17 00:00:00 2001 +From e997cb5ff851d55cd8e5d0af976b1358cf9bc6c7 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Fri, 11 Oct 2019 06:32:42 -0300 -Subject: [PATCH 0574/1148] media: videodev2.h: add V4L2_DEC_CMD_FLUSH +Subject: [PATCH 0571/1209] media: videodev2.h: add V4L2_DEC_CMD_FLUSH Add this new V4L2_DEC_CMD_FLUSH decoder command and document it. @@ -375816,10 +375677,10 @@ index adeb6b7a15cb..a79028e4d929 100644 replace define V4L2_DEC_CMD_START_MUTE_AUDIO decoder-cmds replace define V4L2_DEC_CMD_PAUSE_TO_BLACK decoder-cmds diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h -index bccfa30d264c..f5687e5063c2 100644 +index a3fc685be514..05ed1aaf0e9e 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h -@@ -1989,6 +1989,7 @@ struct v4l2_encoder_cmd { +@@ -1988,6 +1988,7 @@ struct v4l2_encoder_cmd { #define V4L2_DEC_CMD_STOP (1) #define V4L2_DEC_CMD_PAUSE (2) #define V4L2_DEC_CMD_RESUME (3) @@ -375831,10 +375692,10 @@ index bccfa30d264c..f5687e5063c2 100644 2.18.4 -From adf5cc7ae21ae3937c834768ced5c99300c306ed Mon Sep 17 00:00:00 2001 +From b4342fbd20d439d3bb114bd3ea3cad08aaf22ce7 Mon Sep 17 00:00:00 2001 From: Jernej Skrabec Date: Fri, 11 Oct 2019 06:32:43 -0300 -Subject: [PATCH 0575/1148] media: v4l2-mem2mem: add +Subject: [PATCH 0572/1209] media: v4l2-mem2mem: add stateless_(try_)decoder_cmd ioctl helpers Commit bef41d93aac64b54c3008ca6170bec54f85784f5 upstream. @@ -375935,10 +375796,10 @@ index 229d9f5d4370..3d9e48ed8817 100644 2.18.4 -From 6ce1a41b41ae4f9528eab66dd3e9b3decab26405 Mon Sep 17 00:00:00 2001 +From 3f997fd559829a0b252e974afe1ace60527b6805 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Fri, 11 Oct 2019 06:32:44 -0300 -Subject: [PATCH 0576/1148] media: v4l2-mem2mem: add new_frame detection +Subject: [PATCH 0573/1209] media: v4l2-mem2mem: add new_frame detection Commit f07602ac388723233e9e3c5a05b54baf34e0a3e9 upstream. @@ -376012,10 +375873,10 @@ index 3d9e48ed8817..1d85e24791e4 100644 2.18.4 -From 3a949310bea7aee1fb96689a6334acf9937b56bf Mon Sep 17 00:00:00 2001 +From d8f76950947ab260707bb7f57611c38be931a741 Mon Sep 17 00:00:00 2001 From: Ricardo Ribalda Delgado Date: Mon, 7 Oct 2019 12:06:32 -0300 -Subject: [PATCH 0577/1148] media: Documentation: media: Document +Subject: [PATCH 0574/1209] media: Documentation: media: Document V4L2_CTRL_TYPE_AREA Commit 8ae3a0862993c09a8ef0f9abb379553370c517e3 upstream. @@ -376066,10 +375927,10 @@ index a79028e4d929..c23e5ef30c78 100644 2.18.4 -From be2b978a30f8b706c091ce1e655e16659c5072b4 Mon Sep 17 00:00:00 2001 +From 1bb30c97193cf85dfbe1d5df0489c641af33edf4 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Tue, 22 Oct 2019 12:26:52 -0300 -Subject: [PATCH 0578/1148] media: v4l: Add definitions for HEVC stateless +Subject: [PATCH 0575/1209] media: v4l: Add definitions for HEVC stateless decoding This introduces the required definitions for HEVC decoding support with @@ -377180,10 +377041,10 @@ index e7f93109e4a4..65575e9b5a2b 100644 2.18.4 -From f3cd1616bdea6433dac29588a08e899e4990f59b Mon Sep 17 00:00:00 2001 +From 5dc3c1ed8b300933700d3842255281dd494adce5 Mon Sep 17 00:00:00 2001 From: Jernej Skrabec Date: Wed, 6 Nov 2019 08:02:53 +0100 -Subject: [PATCH 0579/1148] media: v4l2-mem2mem: Fix hold buf flag checks +Subject: [PATCH 0576/1209] media: v4l2-mem2mem: Fix hold buf flag checks Commit 1076df3a77b490d33429560a9e0603b3673223e2 upstream. @@ -377223,10 +377084,10 @@ index 5867d81f3d2c..cc34c5ab7009 100644 2.18.4 -From 91a0f7237b59165cbe42378a6d576545f9ae85b9 Mon Sep 17 00:00:00 2001 +From b8d0b6ac827b163f9cee65b79ae1927df85abf67 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Tue, 22 Oct 2019 12:26:53 -0300 -Subject: [PATCH 0580/1148] media: pixfmt: Document the HEVC slice pixel format +Subject: [PATCH 0577/1209] media: pixfmt: Document the HEVC slice pixel format Commit de06f289283298e2938445019999cec46435375c upstream. @@ -377279,10 +377140,10 @@ index 292fdc116c77..7e9b2b939e59 100644 2.18.4 -From b339e988d6b937cb5a601aecceb40ad17f4170e5 Mon Sep 17 00:00:00 2001 +From ba89ead0fa16d257a5cc411d95ed969aaf6fabb5 Mon Sep 17 00:00:00 2001 From: Jernej Skrabec Date: Fri, 13 Dec 2019 17:04:25 +0100 -Subject: [PATCH 0581/1148] media: uapi: hevc: Add scaling matrix control +Subject: [PATCH 0578/1209] media: uapi: hevc: Add scaling matrix control Taken from https://patchwork.linuxtv.org/patch/60728/ Changes (mainly documentation) have been requested. @@ -377441,10 +377302,10 @@ index 1009cf0891cc..1592e52c3614 100644 2.18.4 -From 2d0d1a8a73891f5d649daf88bdc49026e462894a Mon Sep 17 00:00:00 2001 +From 7cd6ba58a7329b5861bfa6af4d098e322ed261e9 Mon Sep 17 00:00:00 2001 From: Jernej Skrabec Date: Fri, 13 Dec 2019 17:04:27 +0100 -Subject: [PATCH 0582/1148] media: uapi: hevc: Add segment address field +Subject: [PATCH 0579/1209] media: uapi: hevc: Add segment address field From https://patchwork.linuxtv.org/patch/60725/ Changes requested, but mainly docs. @@ -377510,10 +377371,10 @@ index 1592e52c3614..3e2e32098312 100644 2.18.4 -From f76d716bc88fd9a6d0afe5fe34e30a85534d42f8 Mon Sep 17 00:00:00 2001 +From 931979acdce73071b20acf2735a4c2b2b08fa59c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 23 Mar 2020 18:34:01 +0000 -Subject: [PATCH 0583/1148] media: hevc_ctrls: Add slice param dependent slice +Subject: [PATCH 0580/1209] media: hevc_ctrls: Add slice param dependent slice segment Adds V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT define. @@ -377539,10 +377400,10 @@ index 3e2e32098312..0ba7735465a2 100644 2.18.4 -From 9f0e6445be63855bc46c96c06400705bffc3f114 Mon Sep 17 00:00:00 2001 +From 784c19a4cd744a25cbd97814c48e73b012f242a0 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 23 Mar 2020 19:00:17 +0000 -Subject: [PATCH 0584/1148] media: uapi: Add hevc ctrls for WPP decoding +Subject: [PATCH 0581/1209] media: uapi: Add hevc ctrls for WPP decoding WPP can allow greater parallelism within the decode, but needs offset information to be passed in. @@ -377585,10 +377446,10 @@ index 0ba7735465a2..9c976b3cf092 100644 2.18.4 -From 353f379225085e2101d97e419a1c80a7837c71c5 Mon Sep 17 00:00:00 2001 +From 29dd969187548340e56bd193ffd08d175a49b3bf Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 24 Jan 2020 14:28:21 +0000 -Subject: [PATCH 0585/1148] media: videodev2.h: Add a format for column +Subject: [PATCH 0582/1209] media: videodev2.h: Add a format for column YUV4:2:0 modes Some of the Broadcom codec blocks use a column based YUV4:2:0 image @@ -377884,10 +377745,10 @@ index 6081072b55db..360200ed4f08 100644 case V4L2_PIX_FMT_YVU420M: descr = "Planar YVU 4:2:0 (N-C)"; break; case V4L2_PIX_FMT_YUV422M: descr = "Planar YUV 4:2:2 (N-C)"; break; diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h -index f5687e5063c2..f927a77cb2f1 100644 +index 05ed1aaf0e9e..5d28d8ef6c0c 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h -@@ -737,6 +737,10 @@ struct v4l2_pix_format { +@@ -736,6 +736,10 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */ #define V4L2_PIX_FMT_SUNXI_TILED_NV12 v4l2_fourcc('S', 'T', '1', '2') /* Sunxi Tiled NV12 Format */ #define V4L2_PIX_FMT_CNF4 v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */ @@ -377902,10 +377763,10 @@ index f5687e5063c2..f927a77cb2f1 100644 2.18.4 -From 70b750ba3814e3684d0f340a1ad56190164c21da Mon Sep 17 00:00:00 2001 +From b483226bca7dc9147c278f9cbc22e86830c2eb1c Mon Sep 17 00:00:00 2001 From: John Cox Date: Thu, 5 Mar 2020 14:46:54 +0000 -Subject: [PATCH 0586/1148] media: v4l2-mem2mem: allow request job buffer +Subject: [PATCH 0583/1209] media: v4l2-mem2mem: allow request job buffer processing after job finish Allow the capture buffer to be detached from a v4l2 request job such @@ -378186,10 +378047,10 @@ index 59bf33a12648..b5b5fad97de7 100644 2.18.4 -From eadd10b82b1514dff6f6fe90a779330b6d2e7fea Mon Sep 17 00:00:00 2001 +From d3f24d5e0b4e092e20c01ac3a12cd395cb732f59 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 17 Mar 2020 10:53:16 +0000 -Subject: [PATCH 0587/1148] media: dt-bindings: media: Add binding for the +Subject: [PATCH 0584/1209] media: dt-bindings: media: Add binding for the Raspberry PI HEVC decoder Adds a binding for the HEVC decoder found on the BCM2711 / Raspberry Pi 4. @@ -378301,10 +378162,10 @@ index d99bdf934705..9a76a6de3e98 100644 2.18.4 -From 393ef6c779a746308ac5b78ed976f84253d1368a Mon Sep 17 00:00:00 2001 +From 0e8f358318e42342bc0d305a717cc570cb53d493 Mon Sep 17 00:00:00 2001 From: John Cox Date: Thu, 5 Mar 2020 18:30:41 +0000 -Subject: [PATCH 0588/1148] staging: media: Add Raspberry Pi V4L2 H265 decoder +Subject: [PATCH 0585/1209] staging: media: Add Raspberry Pi V4L2 H265 decoder This driver is for the HEVC/H265 decoder block on the Raspberry Pi 4, and conforms to the V4L2 stateless decoder API. @@ -382704,10 +382565,10 @@ index 000000000000..9c4f3fb2f9f6 2.18.4 -From 3588fecdcf9510dc12d79718e5876c7fcfd6a47f Mon Sep 17 00:00:00 2001 +From 5068ed5b4259407ed3291fbc5a75345715fbbeb6 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 13 Mar 2020 16:52:55 +0000 -Subject: [PATCH 0589/1148] dtoverlays: Add overlay to enable the HEVC V4L2 +Subject: [PATCH 0586/1209] dtoverlays: Add overlay to enable the HEVC V4L2 driver This replaces the rpivid_mem register mapping driver. @@ -382838,10 +382699,10 @@ index e4ea63553dc0..5fe23a0bf27f 100644 2.18.4 -From 1a19cbe90f7106e695b3794dc0bd6db3d42d8ca2 Mon Sep 17 00:00:00 2001 +From bc3cebfb3ad268a1416127353d9c5b0dd8c2b6af Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 13 Mar 2020 16:55:32 +0000 -Subject: [PATCH 0590/1148] defconfig: Add V4L2 HEVC driver to +Subject: [PATCH 0587/1209] defconfig: Add V4L2 HEVC driver to bcm2711_defconfig This replaces the register mapped driver. @@ -382875,10 +382736,10 @@ index 5fe23a0bf27f..e4ea63553dc0 100644 2.18.4 -From 1a37a9d75cc44fc3bf3e4cf81bff183badecb650 Mon Sep 17 00:00:00 2001 +From f116319c9c6f8ac02dd380e28d08c270e85766d4 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 6 Dec 2019 13:05:27 +0100 -Subject: [PATCH 0591/1148] mmc: sdhci: Silence MMC warnings +Subject: [PATCH 0588/1209] mmc: sdhci: Silence MMC warnings When the MMC isn't plugged in, the driver will spam the console which is pretty annoying when using NFS. @@ -382889,7 +382750,7 @@ Signed-off-by: Maxime Ripard 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c -index 136f9737713d..ee270043d59e 100644 +index a1aeb2e10564..86586f08a853 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -39,7 +39,7 @@ @@ -382901,7 +382762,7 @@ index 136f9737713d..ee270043d59e 100644 #define MAX_TUNING_LOOP 40 -@@ -2754,7 +2754,7 @@ static void sdhci_timeout_timer(struct timer_list *t) +@@ -2756,7 +2756,7 @@ static void sdhci_timeout_timer(struct timer_list *t) spin_lock_irqsave(&host->lock, flags); if (host->cmd && !sdhci_data_line_cmd(host->cmd)) { @@ -382910,7 +382771,7 @@ index 136f9737713d..ee270043d59e 100644 mmc_hostname(host->mmc)); sdhci_dumpregs(host); -@@ -2776,7 +2776,7 @@ static void sdhci_timeout_data_timer(struct timer_list *t) +@@ -2778,7 +2778,7 @@ static void sdhci_timeout_data_timer(struct timer_list *t) if (host->data || host->data_cmd || (host->cmd && sdhci_data_line_cmd(host->cmd))) { @@ -382923,10 +382784,10 @@ index 136f9737713d..ee270043d59e 100644 2.18.4 -From f98bc90ffe2571c08e152123f8551427c1597d2a Mon Sep 17 00:00:00 2001 +From 941bb65e3bbe8964ac8eda696543ac5fc68dfaf2 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 17 Feb 2020 16:20:27 +0100 -Subject: [PATCH 0592/1148] Revert "v3d_drv: Allow clock retrieval by name" +Subject: [PATCH 0589/1209] Revert "v3d_drv: Allow clock retrieval by name" This reverts commit 229fbb896ca6e0a40272cc846e41eeb0c29a551f. --- @@ -382952,10 +382813,10 @@ index 87ce683f3c04..91b0769b69ef 100644 2.18.4 -From 19b0ab98057ae0749b3d35b41ac04be27b215e21 Mon Sep 17 00:00:00 2001 +From af7d9487bfd3dfe9babf2cb6e2cb8138dd1904d2 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Wed, 12 Feb 2020 09:33:51 +0100 -Subject: [PATCH 0593/1148] Revert "clk-raspberrypi: Also support v3d clock" +Subject: [PATCH 0590/1209] Revert "clk-raspberrypi: Also support v3d clock" This reverts commit 54354f31352ca1e058b029abd384819435c9ef47. --- @@ -383605,10 +383466,10 @@ index 8daf26df5430..e4e139240340 100644 2.18.4 -From 2af1d90bdd73c250294cbe744268509c9fe1080f Mon Sep 17 00:00:00 2001 +From ef3b4c3e651222ee94e4ff978871face28f2b680 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Wed, 12 Feb 2020 09:33:59 +0100 -Subject: [PATCH 0594/1148] Revert "clk-raspberrypi: Allow cpufreq driver to +Subject: [PATCH 0591/1209] Revert "clk-raspberrypi: Allow cpufreq driver to also adjust gpu clocks" This reverts commit 60dc4841efc8fe97b710b49d37d50bd719e8ca07. @@ -383633,10 +383494,10 @@ index e4e139240340..1654fd0eedc9 100644 2.18.4 -From 3d6a470190296a58ce4da800d5b21e196ba8955e Mon Sep 17 00:00:00 2001 +From 2d0a1a85c8ceaf5446139d007a0951ac620a81a5 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 13 Feb 2020 16:55:01 +0100 -Subject: [PATCH 0595/1148] dt-bindings: i2c: brcmstb: Convert the BRCMSTB +Subject: [PATCH 0592/1209] dt-bindings: i2c: brcmstb: Convert the BRCMSTB binding to a schema Switch the DT binding to a YAML schema to enable the DT validation. @@ -383771,10 +383632,10 @@ index 9a76a6de3e98..faa83d7e339f 100644 2.18.4 -From d643fd3aface26a87f7d5c91e2b4c0b0fe23477a Mon Sep 17 00:00:00 2001 +From 2ec0fee0cd9924bd4e5ce3286e42da27eab82b63 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Tue, 17 Dec 2019 09:58:34 +0100 -Subject: [PATCH 0596/1148] dt-bindings: i2c: brcmstb: Add BCM2711 BSC/AUTO-I2C +Subject: [PATCH 0593/1209] dt-bindings: i2c: brcmstb: Add BCM2711 BSC/AUTO-I2C binding The HDMI blocks in the BCM2771 have an i2c controller to retrieve the @@ -383873,10 +383734,10 @@ index 3189d74096e8..edbca2476128 100644 2.18.4 -From 97fcfbdf93d002a006382fb0be5990a3578f59de Mon Sep 17 00:00:00 2001 +From cf010b5ebb8451d72d8e0f0d5aec1765204710d7 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Tue, 17 Dec 2019 09:58:34 +0100 -Subject: [PATCH 0597/1148] i2c: brcmstb: Support BCM2711 HDMI BSC controllers +Subject: [PATCH 0594/1209] i2c: brcmstb: Support BCM2711 HDMI BSC controllers The HDMI blocks in the BCM2771 have an i2c controller to retrieve the EDID. This block is split into two parts, the BSC and the AUTO_I2C, @@ -383966,10 +383827,10 @@ index 506991596b68..169a2836922d 100644 2.18.4 -From 7ea687788c5611d2276a89d23646cf8ec57e6282 Mon Sep 17 00:00:00 2001 +From 8ba1dc83a9094874f43ddc52576e3732d061a16f Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Tue, 14 Jan 2020 13:36:42 +0100 -Subject: [PATCH 0598/1148] i2c: brcmstb: Allow to compile it on BCM2835 +Subject: [PATCH 0595/1209] i2c: brcmstb: Allow to compile it on BCM2835 The BCM2711, supported by ARCH_BCM2835, also has a controller by the brcmstb driver so let's allow it to be compiled on that platform. @@ -383985,7 +383846,7 @@ Signed-off-by: Maxime Ripard 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig -index c9ae45f55d2b..1291bda7e6f1 100644 +index 539f9309f6e6..f82da9d5c0f9 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -491,8 +491,8 @@ config I2C_BCM_KONA @@ -384003,10 +383864,10 @@ index c9ae45f55d2b..1291bda7e6f1 100644 2.18.4 -From 2688fc1f9f04bd12824ac7a53b17b381d0412b0a Mon Sep 17 00:00:00 2001 +From 5cf1098895715fac674b3199bb68889c9cbd5ab1 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 13 Feb 2020 17:51:09 +0100 -Subject: [PATCH 0599/1148] dt-bindings: clock: Add a binding for the RPi +Subject: [PATCH 0596/1209] dt-bindings: clock: Add a binding for the RPi Firmware clocks The firmare running on the RPi VideoCore can be used to discover and @@ -384073,10 +383934,10 @@ index 000000000000..d37bc311321d 2.18.4 -From 7d60ed73990019525a2784132f2274bc9fac0389 Mon Sep 17 00:00:00 2001 +From d846d26d76671511cc8855dc3aaac2fd3917b592 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 23 Dec 2019 19:58:08 +0100 -Subject: [PATCH 0600/1148] clk: bcm: rpi: Allow the driver to be probed by DT +Subject: [PATCH 0597/1209] clk: bcm: rpi: Allow the driver to be probed by DT The current firmware clock driver for the RaspberryPi can only be probed by manually registering an associated platform_device. @@ -384139,10 +384000,10 @@ index 1654fd0eedc9..94870234824c 100644 2.18.4 -From 664039ed758fee82e1f1ab12d1ad847913cc9a3c Mon Sep 17 00:00:00 2001 +From 764ace7b29ff82216da7b3ff314c9fc70c32f6a0 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 7 Feb 2020 14:17:54 +0100 -Subject: [PATCH 0601/1148] clk: bcm: rpi: Statically init clk_init_data +Subject: [PATCH 0598/1209] clk: bcm: rpi: Statically init clk_init_data Instead of declaring the clk_init_data and then calling memset on it, just initialise properly. @@ -384177,10 +384038,10 @@ index 94870234824c..64fd91b5ffe9 100644 2.18.4 -From d73dbe8fcf47b1bbbf01ed8f3336ce799d8071b7 Mon Sep 17 00:00:00 2001 +From b5ffe36582c539d622418abc1fa48b3cce2adec9 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 7 Feb 2020 15:40:00 +0100 -Subject: [PATCH 0602/1148] clk: bcm: rpi: Use clk_hw_register for pllb_arm +Subject: [PATCH 0599/1209] clk: bcm: rpi: Use clk_hw_register for pllb_arm The pllb_arm clock is defined as a fixed factor clock with the pllb clock as a parent. However, all its configuration is entirely static, and thus we @@ -384239,10 +384100,10 @@ index 64fd91b5ffe9..48cffa44db64 100644 2.18.4 -From ac3ce34753b4664fe77df1cc9d5f292b89a1eb57 Mon Sep 17 00:00:00 2001 +From f6a2f44d0eefe094d945f311377876ae5193376b Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 7 Feb 2020 15:41:37 +0100 -Subject: [PATCH 0603/1148] clk: bcm: rpi: Remove global pllb_arm clock pointer +Subject: [PATCH 0600/1209] clk: bcm: rpi: Remove global pllb_arm clock pointer The pllb_arm clk_hw pointer in the raspberry_clk structure isn't used anywhere but in the raspberrypi_register_pllb_arm. @@ -384290,10 +384151,10 @@ index 48cffa44db64..61a942f9a6a2 100644 2.18.4 -From 3e21f77375e64ec551188913496e3bf23da1baaa Mon Sep 17 00:00:00 2001 +From 4dd75fcc01adcfc037a18b8f5b487b16f1876009 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 7 Feb 2020 15:42:40 +0100 -Subject: [PATCH 0604/1148] clk: bcm: rpi: Make sure pllb_arm is removed +Subject: [PATCH 0601/1209] clk: bcm: rpi: Make sure pllb_arm is removed The pllb_arm clock was created at probe time, but was never removed if something went wrong later in probe, or if the driver was ever removed from @@ -384336,10 +384197,10 @@ index 61a942f9a6a2..783c8c5e5373 100644 2.18.4 -From 31a0ce3fb53039ed76947f374e3198a86b137812 Mon Sep 17 00:00:00 2001 +From 2baf5db502d0e001979899d285ae808085725c8b Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 7 Feb 2020 15:46:24 +0100 -Subject: [PATCH 0605/1148] clk: bcm: rpi: Remove pllb_arm_lookup global +Subject: [PATCH 0602/1209] clk: bcm: rpi: Remove pllb_arm_lookup global pointer The pllb_arm_lookup pointer in the struct raspberrypi_clk is not used for @@ -384394,10 +384255,10 @@ index 783c8c5e5373..0c1d6c292302 100644 2.18.4 -From 2bd65a2204a4493a20101148c8bb9e8c891ef369 Mon Sep 17 00:00:00 2001 +From aaa140039b2f10975974b54f11919685fb58f3dc Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Wed, 12 Feb 2020 14:21:45 +0100 -Subject: [PATCH 0606/1148] clk: bcm: rpi: Switch to clk_hw_register_clkdev +Subject: [PATCH 0603/1209] clk: bcm: rpi: Switch to clk_hw_register_clkdev Since we don't care about retrieving the clk_lookup structure pointer returned by clkdev_hw_create, we can just use the clk_hw_register_clkdev @@ -384445,10 +384306,10 @@ index 0c1d6c292302..b97c7ec61376 100644 2.18.4 -From cbaf9f7b60eaead7e8a226a5503801d3d5e82a98 Mon Sep 17 00:00:00 2001 +From 1b0bd6110e31006c39b505074a56456df8c39aa0 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 7 Feb 2020 15:47:13 +0100 -Subject: [PATCH 0607/1148] clk: bcm: rpi: Make sure the clkdev lookup is +Subject: [PATCH 0604/1209] clk: bcm: rpi: Make sure the clkdev lookup is removed The clkdev lookup created for the cpufreq device is never removed if @@ -384486,10 +384347,10 @@ index b97c7ec61376..b8b55134ba3f 100644 2.18.4 -From f4dce94284073d2527a6cb06030aebc8dba7172a Mon Sep 17 00:00:00 2001 +From 50eec6c01abecffb59deab3db26b75891f711c34 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 7 Feb 2020 16:01:33 +0100 -Subject: [PATCH 0608/1148] clk: bcm: rpi: Create a data structure for the +Subject: [PATCH 0605/1209] clk: bcm: rpi: Create a data structure for the clocks So far the driver has really only been providing a single clock, and stored @@ -384619,10 +384480,10 @@ index b8b55134ba3f..964fc8f792cc 100644 2.18.4 -From 2ca0db1295c9dd39498d97fe5491441ed91c4cfc Mon Sep 17 00:00:00 2001 +From c4bbabe4942e78e40e3be8cace6a7fef016cd87f Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 7 Feb 2020 16:04:16 +0100 -Subject: [PATCH 0609/1148] clk: bcm: rpi: Add clock id to data +Subject: [PATCH 0606/1209] clk: bcm: rpi: Add clock id to data The driver has really only supported one clock so far and has hardcoded the ID used in communications with the firmware in all the functions @@ -384711,10 +384572,10 @@ index 964fc8f792cc..e796dabbc641 100644 2.18.4 -From e128ccc69a10b00b117f00d5d5b4121a24a761c2 Mon Sep 17 00:00:00 2001 +From 2e020b6d6d1e178182f74330df9f1d7c4e53abc7 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 7 Feb 2020 16:08:17 +0100 -Subject: [PATCH 0610/1148] clk: bcm: rpi: Pass the clocks data to the firmware +Subject: [PATCH 0607/1209] clk: bcm: rpi: Pass the clocks data to the firmware function The raspberry_clock_property only takes the clock ID as an argument, but @@ -384813,10 +384674,10 @@ index e796dabbc641..055dd34c5acc 100644 2.18.4 -From 008e49541020e15317ac8b6d62d2deb339cb14ad Mon Sep 17 00:00:00 2001 +From ba6a3f6ddf0a507ad0c0abe147e8e6034f335cfe Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 20 Feb 2020 12:45:47 +0100 -Subject: [PATCH 0611/1148] clk: bcm: rpi: Rename is_prepared function +Subject: [PATCH 0608/1209] clk: bcm: rpi: Rename is_prepared function The raspberrypi_fw_pll_is_on function doesn't only apply to PLL registered in the driver, but any clock exposed by the firmware. @@ -384859,10 +384720,10 @@ index 055dd34c5acc..2f10bccf03a5 100644 2.18.4 -From 31a825affde4fdbc20c342c9fc62b7bd525c903d Mon Sep 17 00:00:00 2001 +From 5307dfa97ab5a1c8acdcca64207575917b5a30d3 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 7 Feb 2020 16:14:18 +0100 -Subject: [PATCH 0612/1148] clk: bcm: rpi: Split pllb clock hooks +Subject: [PATCH 0609/1209] clk: bcm: rpi: Split pllb clock hooks The driver only supports the pllb for now and all the clock framework hooks are a mix of the generic firmware interface and the specifics of the pllb. @@ -384945,10 +384806,10 @@ index 2f10bccf03a5..d1b5826c95bb 100644 2.18.4 -From d65deacef974e431c1725fb81ca8b61e3d86ca29 Mon Sep 17 00:00:00 2001 +From 311964b12c0f114c526f3982c2f3ecfcc959498c Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 7 Feb 2020 16:30:01 +0100 -Subject: [PATCH 0613/1148] clk: bcm: rpi: Make the PLLB registration function +Subject: [PATCH 0610/1209] clk: bcm: rpi: Make the PLLB registration function return a clk_hw The raspberrypi_register_pllb has been returning an integer so far to @@ -385095,10 +384956,10 @@ index d1b5826c95bb..05ed2f2cde31 100644 2.18.4 -From 448833c0d06c2a8a44c21bd8d55d4b704d6d77f2 Mon Sep 17 00:00:00 2001 +From 406ee6c5df5e563c78ebb3420dce6910196a6ef8 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 7 Feb 2020 17:03:46 +0100 -Subject: [PATCH 0614/1148] clk: bcm: rpi: Add DT provider for the clocks +Subject: [PATCH 0611/1209] clk: bcm: rpi: Add DT provider for the clocks For the upcoming registration of the clocks provided by the firmware, make sure it's exposed to the device tree providers. @@ -385168,10 +385029,10 @@ index 05ed2f2cde31..f2fbcef54c9c 100644 2.18.4 -From e5c2390643856cf1467397dd212a64c268c69ba7 Mon Sep 17 00:00:00 2001 +From c63edebd178e42a0b402fb129ad6af72c59e0d87 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 10 Feb 2020 14:06:09 +0100 -Subject: [PATCH 0615/1148] clk: bcm: rpi: Discover the firmware clocks +Subject: [PATCH 0612/1209] clk: bcm: rpi: Discover the firmware clocks The RaspberryPi4 firmware actually exposes more clocks than are currently handled by the driver and we will need to change some of them directly @@ -385349,10 +385210,10 @@ index 05c6989ec4c6..3335c2a2993c 100644 2.18.4 -From 688cdd4950696466ea2e45e31c66b27f85f5bbee Mon Sep 17 00:00:00 2001 +From ceb638b335400cba51ee490af5c3b1e1b66ab260 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 23 Dec 2019 19:58:30 +0100 -Subject: [PATCH 0616/1148] ARM: dts: bcm2711: Add firmware clocks node +Subject: [PATCH 0613/1209] ARM: dts: bcm2711: Add firmware clocks node Now that we have a clock driver for the clocks exposed by the firmware, let's add the device tree nodes for it. @@ -385396,10 +385257,10 @@ index b56388ce1216..7acd4a3cf1e5 100644 2.18.4 -From 365718639643612846e87cb6923d9ecd3bfde38e Mon Sep 17 00:00:00 2001 +From fe0ac6869b000204d8f01a1ef580132dab3a3ae8 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Tue, 28 Jan 2020 09:33:52 +0100 -Subject: [PATCH 0617/1148] reset: Move reset-simple header out of +Subject: [PATCH 0614/1209] reset: Move reset-simple header out of drivers/reset The reset-simple code can be useful for drivers outside of drivers/reset @@ -385493,10 +385354,10 @@ rename to include/linux/reset/reset-simple.h 2.18.4 -From d9d225da7519aaa9c34dd42333d98c7d4b3c42c9 Mon Sep 17 00:00:00 2001 +From be6f4e77d56a8d87d9bb9e510125f0f9b9bec730 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Tue, 28 Jan 2020 16:22:20 +0100 -Subject: [PATCH 0618/1148] reset: simple: Add reset callback +Subject: [PATCH 0615/1209] reset: simple: Add reset callback The reset-simple code lacks a reset callback that is still pretty easy to implement. The only real thing to consider is the delay needed for a device @@ -385586,10 +385447,10 @@ index 08ccb25a55e6..5eb83625a495 100644 2.18.4 -From c771d5bbc16e444306b9ad0c652457a58e889ccd Mon Sep 17 00:00:00 2001 +From c807da9abd3a0ad88318cfbada3f36a4ddb7c389 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 13 Feb 2020 17:50:31 +0100 -Subject: [PATCH 0619/1148] dt-bindings: clock: Add BCM2711 DVP binding +Subject: [PATCH 0616/1209] dt-bindings: clock: Add BCM2711 DVP binding The BCM2711 has a unit controlling the HDMI0 and HDMI1 clock and reset signals. Let's add a binding for it. @@ -385661,10 +385522,10 @@ index 000000000000..08543ecbe35b 2.18.4 -From 9149ca2e968675a622d0ec774c8060ab282aabaa Mon Sep 17 00:00:00 2001 +From c2c116aec2872a034717fd7d9ba87f170be929d1 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Tue, 28 Jan 2020 09:36:27 +0100 -Subject: [PATCH 0620/1148] clk: bcm: Add BCM2711 DVP driver +Subject: [PATCH 0617/1209] clk: bcm: Add BCM2711 DVP driver The HDMI block has a block that controls clocks and reset signals to the HDMI0 and HDMI1 controllers. @@ -385844,10 +385705,10 @@ index 000000000000..bfe4e5b4a148 2.18.4 -From e35c75e831172d6c7f3c8ba62ddff887054dae59 Mon Sep 17 00:00:00 2001 +From 85ef63794623d68d6b9bf6f20c935cf4c402e874 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Tue, 28 Jan 2020 09:37:06 +0100 -Subject: [PATCH 0621/1148] ARM: dts: bcm2711: Add HDMI DVP +Subject: [PATCH 0618/1209] ARM: dts: bcm2711: Add HDMI DVP Now that we have a driver for the DVP, let's add its DT node. @@ -385893,10 +385754,10 @@ index 7acd4a3cf1e5..7cf1a9748f00 100644 2.18.4 -From 3810884c1fcd40c6b4bff2bde0ee904bd550741c Mon Sep 17 00:00:00 2001 +From 51169e7aa53ab558d705075fe08e95c497ec53f4 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 13 Feb 2020 15:42:05 +0100 -Subject: [PATCH 0622/1148] dt-bindings: display: Convert VC4 bindings to +Subject: [PATCH 0619/1209] dt-bindings: display: Convert VC4 bindings to schemas The BCM283x SoCs have a display pipeline composed of several controllers @@ -386636,10 +386497,10 @@ index faa83d7e339f..b1b23c692186 100644 2.18.4 -From d877258839750fb4f2ff87e15160aca0ad6dd674 Mon Sep 17 00:00:00 2001 +From c930673761a9f0b9e57f9abdef4a6a2a79620b5d Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 13 Feb 2020 15:47:18 +0100 -Subject: [PATCH 0623/1148] dt-bindings: display: vc4: dpi: Add missing +Subject: [PATCH 0620/1209] dt-bindings: display: vc4: dpi: Add missing clock-names property While the device tree and the driver expected a clock-names property, it @@ -386680,10 +386541,10 @@ index 288494b70e82..58213c564e03 100644 2.18.4 -From abfda9a52a049c86f1bdf403f740a1aed5018c6f Mon Sep 17 00:00:00 2001 +From d3d413917b644f1652b6d996d5097cf5bce0210f Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 13 Feb 2020 15:47:18 +0100 -Subject: [PATCH 0624/1148] dt-bindings: display: vc4: dsi: Add missing clock +Subject: [PATCH 0621/1209] dt-bindings: display: vc4: dsi: Add missing clock properties While the device tree and the driver expected a clock-names and a @@ -386740,10 +386601,10 @@ index 3887675f844e..3c643b227a70 100644 2.18.4 -From 78bc6da13fe42fb39e8b0084556d9f9d0a980640 Mon Sep 17 00:00:00 2001 +From 047ac20b2276eb573794733426f028e2e44acfd9 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 13 Feb 2020 15:47:18 +0100 -Subject: [PATCH 0625/1148] dt-bindings: display: vc4: hdmi: Add missing +Subject: [PATCH 0622/1209] dt-bindings: display: vc4: hdmi: Add missing clock-names property While the device tree and the driver expected a clock-names property, it @@ -386780,10 +386641,10 @@ index 834cc5f1c254..52b3cdac0bdf 100644 2.18.4 -From f75c5850bc198eb9f5375d12ea702496f01361fc Mon Sep 17 00:00:00 2001 +From 78f2f6bba6373ec178cdc60303b8ae204b6b89cf Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 13 Feb 2020 17:40:56 +0100 -Subject: [PATCH 0626/1148] dt-bindings: display: vc4: Document BCM2711 VC5 +Subject: [PATCH 0623/1209] dt-bindings: display: vc4: Document BCM2711 VC5 The BCM2711 comes with a new VideoCore. Add a compatible for it. @@ -386810,10 +386671,10 @@ index 0dcf0c397375..49a5e041aa49 100644 2.18.4 -From 202f5619172907fbae57e4721a1bd99966c5cfcc Mon Sep 17 00:00:00 2001 +From f6c3732dcedcd7377dc54f5f2041da5ff605c57a Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 19 Dec 2019 18:08:48 +0100 -Subject: [PATCH 0627/1148] drm/vc4: drv: Add include guards +Subject: [PATCH 0624/1209] drm/vc4: drv: Add include guards vc4_drv.h doesn't have any include guards which prevents it from being included twice. Let's add them. @@ -386846,10 +386707,10 @@ index 308f0473592a..95f7433c8630 100644 2.18.4 -From ec40359b91a24ee26562508c574bb1edd27cb1f1 Mon Sep 17 00:00:00 2001 +From 44edfe89d3a38e16733293c0f19eb571fde52c86 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 6 Feb 2020 15:40:34 +0100 -Subject: [PATCH 0628/1148] drm/vc4: drv: Support BCM2711 +Subject: [PATCH 0625/1209] drm/vc4: drv: Support BCM2711 The BCM2711 has a reworked display pipeline, and the load tracker needs some adjustement to operate properly. Let's add a compatible for BCM2711 @@ -386864,10 +386725,10 @@ Signed-off-by: Maxime Ripard 4 files changed, 30 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c -index 6c6701acfd85..4e5d63609736 100644 +index af8df6d328b9..a726d262a0fa 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c -@@ -368,6 +368,7 @@ static int vc4_platform_drm_remove(struct platform_device *pdev) +@@ -369,6 +369,7 @@ static int vc4_platform_drm_remove(struct platform_device *pdev) } static const struct of_device_id vc4_of_match[] = { @@ -386967,10 +386828,10 @@ index 1c5eef3ac441..81ec016a12d8 100644 2.18.4 -From 27217740c01d6b2b472bf3889e9982716ff18b58 Mon Sep 17 00:00:00 2001 +From dd669f854cf8bcbda7932810256face62efc2586 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 8 Aug 2019 17:51:07 +0100 -Subject: [PATCH 0629/1148] drm/vc4: drv: Add support for the BCM2711 HVS5 +Subject: [PATCH 0626/1209] drm/vc4: drv: Add support for the BCM2711 HVS5 The HVS found in the BCM2711 is slightly different from the previous generations. @@ -387478,10 +387339,10 @@ index 8416fdaf2ec4..22b895258545 100644 2.18.4 -From f2e906ea16be131973cf44bd30e5a85c0fd1b0cd Mon Sep 17 00:00:00 2001 +From 07ed5f602fa2d958f2f7a3829ec632ef2b2e5a51 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 11 Feb 2020 16:55:02 +0000 -Subject: [PATCH 0630/1148] drm/vc4: plane: Improve LBM usage +Subject: [PATCH 0627/1209] drm/vc4: plane: Improve LBM usage LBM allocations were always taking the worst case sizing of max(src_width, dst_width) * 16. This is significantly over @@ -387582,10 +387443,10 @@ index 49c16d0e2527..ed07e25f6b94 100644 2.18.4 -From 7a9a92e566d31f3f796a9692f221160ea55bb61a Mon Sep 17 00:00:00 2001 +From 786fa411555d6dda10ebb8b5e062a8942b400328 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 6 Feb 2020 14:32:57 +0100 -Subject: [PATCH 0631/1148] drm/vc4: plane: Move planes creation to its own +Subject: [PATCH 0628/1209] drm/vc4: plane: Move planes creation to its own function The planes so far were created as part of the CRTC binding code with @@ -387717,10 +387578,10 @@ index ed07e25f6b94..940d046b07b6 100644 2.18.4 -From 59e4442d792c407b4216ff85d09b2920db63ffe2 Mon Sep 17 00:00:00 2001 +From 23e5d4b18b8dcc363c49cc55c97d9cb2de8da074 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 6 Feb 2020 14:41:41 +0100 -Subject: [PATCH 0632/1148] drm/vc4: plane: Move additional planes creation to +Subject: [PATCH 0629/1209] drm/vc4: plane: Move additional planes creation to driver So far the plane creation was done when each CRTC was bound, and those @@ -387772,7 +387633,7 @@ index 9f473af60f02..c570dd09b180 100644 CRTC_WRITE(PV_INTEN, 0); diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c -index 4e5d63609736..cea611e5b604 100644 +index a726d262a0fa..3f523e1bee7f 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -253,6 +253,7 @@ static int vc4_drm_bind(struct device *dev) @@ -387800,10 +387661,10 @@ index 4e5d63609736..cea611e5b604 100644 2.18.4 -From 0a1da65813c04a07b81fd18d70cf20c0ac65f535 Mon Sep 17 00:00:00 2001 +From c4471061e0f61348c41bcbc8921229dda61c7494 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 6 Feb 2020 14:46:14 +0100 -Subject: [PATCH 0633/1148] drm/vc4: plane: Register all the planes at once +Subject: [PATCH 0630/1209] drm/vc4: plane: Register all the planes at once Instead of creating planes for each CRTC, we eventually want to create all the planes for each CRTCs. @@ -387819,7 +387680,7 @@ Signed-off-by: Maxime Ripard 3 files changed, 32 insertions(+), 34 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c -index cea611e5b604..7a65f19c99b4 100644 +index 3f523e1bee7f..67235aee3507 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -253,7 +253,6 @@ static int vc4_drm_bind(struct device *dev) @@ -387935,10 +387796,10 @@ index 940d046b07b6..603351b4c428 100644 2.18.4 -From c9db7593dff96d041cf2d39575ff31ec2ef45477 Mon Sep 17 00:00:00 2001 +From c89db7eeb785e7b180eb08fc3d35743a188fb444 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 6 Feb 2020 14:50:06 +0100 -Subject: [PATCH 0634/1148] drm/vc4: plane: Create overlays for any CRTC +Subject: [PATCH 0631/1209] drm/vc4: plane: Create overlays for any CRTC Now that we have everything in place, we can now register all the overlay planes that can be assigned to all the CRTCs. @@ -388011,10 +387872,10 @@ index 603351b4c428..744034c41ce2 100644 2.18.4 -From d97b9bb2a3ec7a7625b750d13658540db66946af Mon Sep 17 00:00:00 2001 +From 6e9774975841d22f90102ce47b6de966fc556b7d Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 6 Feb 2020 14:52:42 +0100 -Subject: [PATCH 0635/1148] drm/vc4: plane: Create more planes +Subject: [PATCH 0632/1209] drm/vc4: plane: Create more planes Let's now create more planes that can be affected to all the CRTCs. @@ -388049,10 +387910,10 @@ index 744034c41ce2..887ef481e746 100644 2.18.4 -From c4104024629e6e3b49205842cb07575c45da0eae Mon Sep 17 00:00:00 2001 +From 1b8d39cdc96e9a89871b6bbcc945d4bdfd0a235e Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 26 Dec 2019 11:45:04 +0100 -Subject: [PATCH 0636/1148] drm/vc4: crtc: Rename SoC data structures +Subject: [PATCH 0633/1209] drm/vc4: crtc: Rename SoC data structures Since we're going to introduce pixelvalve data structures for other SoCs than the BCM2835, let's rename the structures defined in the code to @@ -388111,10 +387972,10 @@ index c570dd09b180..8e6c6784f9a3 100644 2.18.4 -From a5ab85000a0935ea084afa8ee22890dc6779b672 Mon Sep 17 00:00:00 2001 +From 57b2a1f061216f66f1d345204e90a41a876dcec2 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 26 Dec 2019 15:45:04 +0100 -Subject: [PATCH 0637/1148] drm/vc4: crtc: Move crtc state to common header +Subject: [PATCH 0634/1209] drm/vc4: crtc: Move crtc state to common header We'll need to access the crtc_state from outside of vc4_crtc.c, so let's move it to vc4_drv.h @@ -388193,10 +388054,10 @@ index d2d253a94288..2703b9d8936b 100644 2.18.4 -From 56e67fbf18f5acab76f0fde85931003f8ec5a5da Mon Sep 17 00:00:00 2001 +From cc840ab8cf71f28083889738b30bf524ff043825 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 26 Dec 2019 11:36:50 +0100 -Subject: [PATCH 0638/1148] drm/vc4: crtc: Deal with different number of pixel +Subject: [PATCH 0635/1209] drm/vc4: crtc: Deal with different number of pixel per clock Some of the HDMI pixelvalves in vc5 output two pixels per clock cycle. @@ -388287,10 +388148,10 @@ index 2703b9d8936b..dabf9951c375 100644 2.18.4 -From b28ada932518dfc9fd78d90bdb4e549f2ec479c0 Mon Sep 17 00:00:00 2001 +From 8ccc36dc06dbb279c436843f8aa0736bc295dc02 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 9 Jan 2020 18:40:49 +0100 -Subject: [PATCH 0639/1148] drm/vc4: crtc: Use a shared interrupt +Subject: [PATCH 0636/1209] drm/vc4: crtc: Use a shared interrupt Some pixelvalves in vc5 use the same interrupt line so let's register our interrupt handler as a shared one. @@ -388319,10 +388180,10 @@ index 5e94adb4f70b..4eedaddb8c92 100644 2.18.4 -From 90c55cffd1880505cad7ab01942534eb965d3fa1 Mon Sep 17 00:00:00 2001 +From 679da704e3ce8bd786bc91b88b87025492bccdf9 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 13 Jan 2020 13:39:32 +0100 -Subject: [PATCH 0640/1148] drm/vc4: crtc: Turn static const variable into a +Subject: [PATCH 0637/1209] drm/vc4: crtc: Turn static const variable into a define The hvs_latency_pix variable doesn't need to be a variable and can just be @@ -388375,10 +388236,10 @@ index 4eedaddb8c92..7b08e6fd1fb1 100644 2.18.4 -From 7780da83d74a14fbf5f91c134bea70d483b1eb2a Mon Sep 17 00:00:00 2001 +From d2f519d6bade083e1e18d1b756ca99e660cf9992 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 26 Dec 2019 15:48:09 +0100 -Subject: [PATCH 0641/1148] drm/vc4: crtc: Move the cob allocation outside of +Subject: [PATCH 0638/1209] drm/vc4: crtc: Move the cob allocation outside of bind The COB allocation depends on the HVS channel used for a given @@ -388493,10 +388354,10 @@ index dabf9951c375..a7c9295aecc3 100644 2.18.4 -From 22526186eff15bab5a4273e1f482fb69c88f4f93 Mon Sep 17 00:00:00 2001 +From 1c9c05c51bc10278ec56967e16cf778a05cdc52a Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 26 Dec 2019 13:49:17 +0100 -Subject: [PATCH 0642/1148] drm/vc4: crtc: Rename HVS channel to output +Subject: [PATCH 0639/1209] drm/vc4: crtc: Rename HVS channel to output In vc5, the HVS has 6 outputs and 3 FIFOs (or channels), with pixelvalves each being assigned to a given output, but each output can @@ -388581,10 +388442,10 @@ index a7c9295aecc3..f6fc92663191 100644 2.18.4 -From ec55fe24f7a6e141d45c311dd8d3c0c8dd0a58dc Mon Sep 17 00:00:00 2001 +From 5a51ce87a044292e4bbffd65e82187a62e3cfc71 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Tue, 14 Jan 2020 13:37:27 +0100 -Subject: [PATCH 0643/1148] drm/vc4: crtc: Use local chan variable +Subject: [PATCH 0640/1209] drm/vc4: crtc: Use local chan variable The vc4_crtc_handle_page_flip already has a local variable holding the value of vc4_crtc->channel, so let's use it instead. @@ -388611,10 +388472,10 @@ index 8267e38abd5f..2e1aee1ba05b 100644 2.18.4 -From d1b177c781c950bd0ab1018caaa6317d9ebf0def Mon Sep 17 00:00:00 2001 +From 0e0eef2d2c5cf74e97f3127edafbe8b39f8ef428 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 21 Feb 2020 14:34:31 +0100 -Subject: [PATCH 0644/1148] drm/vc4: crtc: Enable and disable the PV in +Subject: [PATCH 0641/1209] drm/vc4: crtc: Enable and disable the PV in atomic_enable / disable The VIDEN bit in the pixelvalve currently being used to enable or disable @@ -388672,10 +388533,10 @@ index 2e1aee1ba05b..b394f873b194 100644 2.18.4 -From 20195c994030cbba727d775bc396358f6598d7f5 Mon Sep 17 00:00:00 2001 +From 652b4129b13252b3b8476656397183f932397c2c Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 26 Dec 2019 17:53:18 +0100 -Subject: [PATCH 0645/1148] drm/vc4: crtc: Assign output to channel +Subject: [PATCH 0642/1209] drm/vc4: crtc: Assign output to channel automatically The HVS found in the BCM2711 has 6 outputs and 3 FIFOs, with each output @@ -389144,10 +389005,10 @@ index 22b895258545..1300198716aa 100644 2.18.4 -From 1308985ed881716402c11f8bad2c7a10358bd6e2 Mon Sep 17 00:00:00 2001 +From ebb0d66e9d7ccbf59e9faa8f33292bf55b344950 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 13 Jan 2020 13:39:20 +0100 -Subject: [PATCH 0646/1148] drm/vc4: crtc: Add FIFO depth to vc4_crtc_data +Subject: [PATCH 0643/1209] drm/vc4: crtc: Add FIFO depth to vc4_crtc_data Not all pixelvalve FIFOs in vc5 have the same depth, so we need to add that to our vc4_crtc_data structure to be able to compute the fill level @@ -389238,10 +389099,10 @@ index 8208dfd0cb08..6eb030445419 100644 2.18.4 -From 7021cee6f54cfe7d3f8e07097c43df4ce0140b73 Mon Sep 17 00:00:00 2001 +From 7b82a7646c23e3995630e590519dc508524b3cac Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 13 Jan 2020 13:40:37 +0100 -Subject: [PATCH 0647/1148] drm/vc4: crtc: Add function to compute FIFO level +Subject: [PATCH 0644/1209] drm/vc4: crtc: Add function to compute FIFO level bits The longer FIFOs in vc5 pixelvalves means that the FIFO full level @@ -389288,10 +389149,10 @@ index 961da7b2439d..81d144fd446d 100644 2.18.4 -From 0a39da6f79f5dd0be6bc0fa9cac83ef843fa22c9 Mon Sep 17 00:00:00 2001 +From 87572cb0217f935f9286864d695759312726ea79 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 9 Jan 2020 18:35:13 +0100 -Subject: [PATCH 0648/1148] drm/vc4: crtc: Rename HDMI encoder type to HDMI0 +Subject: [PATCH 0645/1209] drm/vc4: crtc: Rename HDMI encoder type to HDMI0 The previous generations were only supporting a single HDMI controller, but that's about to change, so put an index as well to differentiate between @@ -389347,10 +389208,10 @@ index d59fd8714c5d..821eb9c4dfbf 100644 2.18.4 -From 21332f2b16dadec8a852bdbd316bccacb59879a9 Mon Sep 17 00:00:00 2001 +From 713566f1275bf90f2e30b5ecb17b6d576c0963ea Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 9 Jan 2020 18:39:30 +0100 -Subject: [PATCH 0649/1148] drm/vc4: crtc: Add HDMI1 encoder type +Subject: [PATCH 0646/1209] drm/vc4: crtc: Add HDMI1 encoder type The BCM2711 sports a second HDMI controller, so let's add that second HDMI encoder type. @@ -389376,10 +389237,10 @@ index 4aed118c7925..4a83b8879f1c 100644 2.18.4 -From 104e0df4728964dbb8ae75ec2be45155da402e14 Mon Sep 17 00:00:00 2001 +From 5c733e7e344b7d1ab6839d80b7a1f50a19c575e0 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 21 Feb 2020 16:48:19 +0100 -Subject: [PATCH 0650/1148] drm/vc4: crtc: Remove redundant call to +Subject: [PATCH 0647/1209] drm/vc4: crtc: Remove redundant call to drm_crtc_enable_color_mgmt The driver calls the helper to add the color management properties twice, @@ -389406,10 +389267,10 @@ index fa68ddfc9360..312077e84f63 100644 2.18.4 -From 4e4f1340fad6b5a8380cb5fff22f027a42b2da02 Mon Sep 17 00:00:00 2001 +From 93a1e43ae5a8c1f10bf3c7dabfc2cc4052162287 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 21 Feb 2020 16:54:21 +0100 -Subject: [PATCH 0651/1148] drm/vc4: crtc: Disable color management for HVS5 +Subject: [PATCH 0648/1209] drm/vc4: crtc: Disable color management for HVS5 The HVS5 uses different color matrices. Disable color management support for now. @@ -389466,10 +389327,10 @@ index 312077e84f63..daf882b7f95e 100644 2.18.4 -From be1f126e21c66aab78abe44e886ceb0f23e30832 Mon Sep 17 00:00:00 2001 +From f65b55534c935cf6f996a142ef702843ec442c90 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 13 Feb 2020 17:07:02 +0100 -Subject: [PATCH 0652/1148] dt-bindings: display: vc4: pv: Add BCM2711 pixel +Subject: [PATCH 0649/1209] dt-bindings: display: vc4: pv: Add BCM2711 pixel valves The BCM2711 comes with other pixelvalves that have different requirements @@ -389502,10 +389363,10 @@ index e60791db1fa1..4e1ba03f6477 100644 2.18.4 -From 4d66ba40f2e8023d600d0b738f5aa9c8de9508e7 Mon Sep 17 00:00:00 2001 +From 52fd58325ae2166da1274efbf1c63108d1543105 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 26 Dec 2019 11:35:58 +0100 -Subject: [PATCH 0653/1148] drm/vc4: crtc: Add BCM2711 pixelvalves +Subject: [PATCH 0650/1209] drm/vc4: crtc: Add BCM2711 pixelvalves The BCM2711 has 5 pixelvalves, so now that our driver is ready, let's add support for them. @@ -389662,10 +389523,10 @@ index 1300198716aa..ca563d373d9d 100644 2.18.4 -From 4ed2968cd79e9ed7b423ece5fe33b14ecf26c3e1 Mon Sep 17 00:00:00 2001 +From 0421ef062bdfca734f762c14531085e076724bfd Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Tue, 14 Jan 2020 17:24:32 +0100 -Subject: [PATCH 0654/1148] drm/vc4: hdmi: Use debugfs private field +Subject: [PATCH 0651/1209] drm/vc4: hdmi: Use debugfs private field We're calling vc4_debugfs_add_file with our struct vc4_hdmi pointer set in the private field, but we don't use that field and go through the @@ -389698,10 +389559,10 @@ index 821eb9c4dfbf..3bcb6ff781ec 100644 2.18.4 -From 654957ce3c23689e1a7d9aea96df19f30481f9a2 Mon Sep 17 00:00:00 2001 +From e58e468202a6cf290178753a586adf41cf124380 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Wed, 18 Dec 2019 18:35:12 +0100 -Subject: [PATCH 0655/1148] drm/vc4: hdmi: Move structure to header +Subject: [PATCH 0652/1209] drm/vc4: hdmi: Move structure to header We will need to share the vc4_hdmi and related structures with multiple files, so let's create a header for it. @@ -389902,10 +389763,10 @@ index 000000000000..5ec5d1f6b1e6 2.18.4 -From f68efb6f03de8caa988f1ffdbd869b20dd46f1f4 Mon Sep 17 00:00:00 2001 +From 3f88c68e46050c9d186a947e64bed4e0fa025711 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 6 Jan 2020 17:17:29 +0100 -Subject: [PATCH 0656/1148] drm/vc4: hdmi: rework connectors and encoders +Subject: [PATCH 0653/1209] drm/vc4: hdmi: rework connectors and encoders the vc4_hdmi driver has some custom structures to hold the data it needs to associate with the drm_encoder and drm_connector structures. @@ -390258,10 +390119,10 @@ index 5ec5d1f6b1e6..17079a39f1b1 100644 2.18.4 -From 86b79cdee6d7ab957aa173c30a66c216c6a9108d Mon Sep 17 00:00:00 2001 +From bc7c37719a084f309b2746f00ca58c7489d433a6 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 6 Jan 2020 18:07:05 +0100 -Subject: [PATCH 0657/1148] drm/vc4: hdmi: Rename hdmi to vc4_hdmi +Subject: [PATCH 0654/1209] drm/vc4: hdmi: Rename hdmi to vc4_hdmi The driver isn't consistent with the name given to the vc4_hdmi structure pointer in its functions. Make sure to use a consistent name. @@ -390945,10 +390806,10 @@ index e8de9fa499ae..45892e16eb04 100644 2.18.4 -From 9466d6eb5c2385cda0fb6d0e0b8087f9ed2d51f2 Mon Sep 17 00:00:00 2001 +From 0b96d4cc8457e4f72462b42214827bb272ebb30b Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 6 Jan 2020 18:21:44 +0100 -Subject: [PATCH 0658/1148] drm/vc4: hdmi: Move accessors to vc4_hdmi +Subject: [PATCH 0655/1209] drm/vc4: hdmi: Move accessors to vc4_hdmi The current driver only supports a single HDMI controller, and part of the issue is that the main vc4_dev structure holds a pointer to its @@ -391105,10 +390966,10 @@ index 17079a39f1b1..cdc9d90f62ac 100644 2.18.4 -From cd702dd349ccb5d6058b89ac74b0bc137570e8fa Mon Sep 17 00:00:00 2001 +From 7b55a2030c705861f2a64056ddcff35601576660 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 6 Jan 2020 18:44:36 +0100 -Subject: [PATCH 0659/1148] drm/vc4: hdmi: Use local vc4_hdmi directly +Subject: [PATCH 0656/1209] drm/vc4: hdmi: Use local vc4_hdmi directly The function vc4_hdmi_connector_detect access its vc4_hdmi struct by dereferencing the pointer in the structure vc4_dev. This will cause some @@ -391156,10 +391017,10 @@ index 87b66f528065..05a15407ea3a 100644 2.18.4 -From b2012c5f8d34d6e26bdb1753be4bf779141a1660 Mon Sep 17 00:00:00 2001 +From 936f17b86b84b76e9bf0b5c891088d80e748a802 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 6 Jan 2020 18:45:46 +0100 -Subject: [PATCH 0660/1148] drm/vc4: hdmi: Add container_of macros for encoders +Subject: [PATCH 0657/1209] drm/vc4: hdmi: Add container_of macros for encoders and connectors Whenever the code needs to access the vc4_hdmi structure from a DRM @@ -391315,10 +391176,10 @@ index cdc9d90f62ac..749a807cd1f3 100644 2.18.4 -From 757f493cf12d0f394afa33e2e0df50a024a81efb Mon Sep 17 00:00:00 2001 +From 399d874e049e175822cc39e19495892face41c80 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 6 Jan 2020 18:47:53 +0100 -Subject: [PATCH 0661/1148] drm/vc4: hdmi: Pass vc4_hdmi to CEC code +Subject: [PATCH 0658/1209] drm/vc4: hdmi: Pass vc4_hdmi to CEC code Our CEC code also retrieves the associated vc4_hdmi by setting the vc4_dev pointer as its private data, and then dereferences its vc4_hdmi @@ -391428,10 +391289,10 @@ index 3f0ed00c62df..ed18826dfc2f 100644 2.18.4 -From d6b0b5302c61397b927210bf8b787bf810f71a3f Mon Sep 17 00:00:00 2001 +From 13e62cd445ddb47a0efacb9999e3ae50681d9fc7 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 6 Jan 2020 18:49:11 +0100 -Subject: [PATCH 0662/1148] drm/vc4: hdmi: Remove vc4_dev hdmi pointer +Subject: [PATCH 0659/1209] drm/vc4: hdmi: Remove vc4_dev hdmi pointer Now that we don't have any users anymore, we can kill that pointer. @@ -391503,10 +391364,10 @@ index ed18826dfc2f..08933446b358 100644 2.18.4 -From 974545190067d29b6ae32b20c93e46aebf99e9bd Mon Sep 17 00:00:00 2001 +From 94eae078722ff13bf31c89daf50c95eacc19c4df Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 6 Jan 2020 18:57:16 +0100 -Subject: [PATCH 0663/1148] drm/vc4: hdmi: Remove vc4_hdmi_connector +Subject: [PATCH 0660/1209] drm/vc4: hdmi: Remove vc4_hdmi_connector The vc4_hdmi_connector was only used to switch between drm_connector to drm_encoder. However, we can now use vc4_hdmi to do the switch, so that @@ -391652,10 +391513,10 @@ index 749a807cd1f3..88794136d2e4 100644 2.18.4 -From dfd5a418a8b2170a47953b842f0c56171898892a Mon Sep 17 00:00:00 2001 +From bbd885abc04f7af09f4b121097068378d609b62e Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Wed, 18 Dec 2019 11:30:54 +0100 -Subject: [PATCH 0664/1148] drm/vc4: hdmi: Introduce resource init and variant +Subject: [PATCH 0661/1209] drm/vc4: hdmi: Introduce resource init and variant The HDMI controllers found in the BCM2711 has a pretty different clock and registers areas than found in the older BCM283x SoCs. @@ -391811,10 +391672,10 @@ index 88794136d2e4..4cd712779ad3 100644 2.18.4 -From 49805563e612247de5d42df670b1866aa6f525da Mon Sep 17 00:00:00 2001 +From d837803bc610394b4ade17dc0f884de34a2f2b8f Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Wed, 18 Dec 2019 19:15:08 +0100 -Subject: [PATCH 0665/1148] drm/vc4: hdmi: Implement a register layout +Subject: [PATCH 0662/1209] drm/vc4: hdmi: Implement a register layout abstraction The HDMI controllers found in the BCM2711 have most of the registers @@ -393134,10 +392995,10 @@ index ca563d373d9d..78809866097c 100644 2.18.4 -From bf941e7a6be9e9be204c4fd57ea912a6d9e62aed Mon Sep 17 00:00:00 2001 +From 6ecba61b2bf2ed54e1609d31d480f49a953b3d0c Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 19 Dec 2019 16:25:26 +0100 -Subject: [PATCH 0666/1148] drm/vc4: hdmi: Add reset callback +Subject: [PATCH 0663/1209] drm/vc4: hdmi: Add reset callback The BCM2711 and BCM283x HDMI controllers use a slightly different reset sequence, so let's add a callback to reset the controller. @@ -393208,10 +393069,10 @@ index f7d0ca9447d2..93695674c2d3 100644 2.18.4 -From 7d7f720292d9a32aaec709fa9ea661bd89dd789b Mon Sep 17 00:00:00 2001 +From 2d3161a215bbe285a9dadabfb5fee55bc0bae6a8 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 19 Dec 2019 16:53:33 +0100 -Subject: [PATCH 0667/1148] drm/vc4: hdmi: Add PHY init and disable function +Subject: [PATCH 0664/1209] drm/vc4: hdmi: Add PHY init and disable function The HDMI PHY in the BCM2711 HDMI controller is significantly more complicated to setup than in the older BCM283x SoCs. @@ -393349,10 +393210,10 @@ index 000000000000..26d6ee08edcf 2.18.4 -From 9d771492bf2eb3b7b8149e089af9225b0a15c305 Mon Sep 17 00:00:00 2001 +From 5cdf56020d12f9d21611ee36f3c02d7f2fab354d Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 19 Dec 2019 17:22:24 +0100 -Subject: [PATCH 0668/1148] drm/vc4: hdmi: Add PHY RNG enable / disable +Subject: [PATCH 0665/1209] drm/vc4: hdmi: Add PHY RNG enable / disable function Let's continue the implementation of hooks for the parts that change in the @@ -393464,10 +393325,10 @@ index 26d6ee08edcf..8fdea621d8b1 100644 2.18.4 -From dff4b2e7ae654c20dc4f5b0ef5661d3b86b3e290 Mon Sep 17 00:00:00 2001 +From 59ff2050a54a725ee6f31ec52c2ee7937e2919b2 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 26 Dec 2019 18:41:53 +0100 -Subject: [PATCH 0669/1148] drm/vc4: hdmi: Add a CSC setup callback +Subject: [PATCH 0666/1209] drm/vc4: hdmi: Add a CSC setup callback Similarly to the previous patches, the CSC setup is slightly different in the BCM2711 than in the previous generations. Let's add a callback for it. @@ -393606,10 +393467,10 @@ index 9ae4d2c5a4f0..22669e07b22e 100644 2.18.4 -From 14aeda529e6509d9c17520d3cbf29e067105cb16 Mon Sep 17 00:00:00 2001 +From 7c5602511bcd355b4ada944a6890cbfc1f57c37d Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 6 Jan 2020 13:43:27 +0100 -Subject: [PATCH 0670/1148] drm/vc4: hdmi: Add a set_timings callback +Subject: [PATCH 0667/1209] drm/vc4: hdmi: Add a set_timings callback Similarly to the previous patches, the timings setup in the HDMI controller of the BCM2711 is slightly different, mostly because it supports higher @@ -393747,10 +393608,10 @@ index 22669e07b22e..4a67d62aef53 100644 2.18.4 -From cc3b92fe20d6d485802de4b1cc93f20a64389a86 Mon Sep 17 00:00:00 2001 +From f64567e6eb3c4f95d21f3ba230caec23d47853be Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Tue, 7 Jan 2020 13:14:07 +0100 -Subject: [PATCH 0671/1148] drm/vc4: hdmi: Add HDMI ID +Subject: [PATCH 0668/1209] drm/vc4: hdmi: Add HDMI ID Some operations will need us to have the raw ID of the HDMI controller in the BCM2711, such as the encoder type to register, the name of the @@ -393801,10 +393662,10 @@ index 4a67d62aef53..4d3117de383a 100644 2.18.4 -From 9bdb95b3cce058e4e5b20a8d903fe5ab7a87d105 Mon Sep 17 00:00:00 2001 +From db2354631a850461d7668df866cdc343d331c6c7 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 16 Jan 2020 14:27:56 +0100 -Subject: [PATCH 0672/1148] drm/vc4: hdmi: Deal with multiple debugfs files +Subject: [PATCH 0669/1209] drm/vc4: hdmi: Deal with multiple debugfs files The HDMI driver was registering a single debugfs file so far with the name hdmi_regs. @@ -393840,10 +393701,10 @@ index 434240cbfaa6..25672d88f8f3 100644 2.18.4 -From 1061cf8aee7dae6f67d33a7d74e6b2f12bc5b6e6 Mon Sep 17 00:00:00 2001 +From efcd664198104883b9d401b6f4506a9f40c96245 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 6 Feb 2020 16:21:45 +0100 -Subject: [PATCH 0673/1148] drm/vc4: hdmi: Add an audio support flag +Subject: [PATCH 0670/1209] drm/vc4: hdmi: Add an audio support flag The BCM2711 audio support doesn't work yet, so let's add a boolean to indicate whether or not it's supported, and only register a sound card if @@ -393895,10 +393756,10 @@ index 4d3117de383a..f41116507156 100644 2.18.4 -From af6e87aa76d4b92e67d115f5ef4fa49288c007b7 Mon Sep 17 00:00:00 2001 +From f025aca4d18675e24037060e993fa5fc008c2a02 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 6 Feb 2020 16:22:13 +0100 -Subject: [PATCH 0674/1148] drm/vc4: hdmi: Move CEC init to its own function +Subject: [PATCH 0671/1209] drm/vc4: hdmi: Move CEC init to its own function The CEC init code was put directly into the bind function, which was quite inconsistent with how the audio support was done, and would prevent us from @@ -394066,10 +393927,10 @@ index b51d3e997e0c..3fadc534f41a 100644 2.18.4 -From b832b78d7846512f94cb5ad90108ada9a4728781 Mon Sep 17 00:00:00 2001 +From 8ef1968291da9b1d39bfbefd2f3cc3c70f8152be Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 6 Feb 2020 16:22:50 +0100 -Subject: [PATCH 0675/1148] drm/vc4: hdmi: Add CEC support flag +Subject: [PATCH 0672/1209] drm/vc4: hdmi: Add CEC support flag Similarly to the audio support, CEC support is not there yet for the BCM2711, so let's skip entirely the CEC initialization through a variant @@ -394121,10 +393982,10 @@ index f41116507156..cbb1d3ab85d7 100644 2.18.4 -From 193ca63b3247d5f767201834738ea301de80917c Mon Sep 17 00:00:00 2001 +From 03fc35ed90077bcea11d90747cd9f657d40ec355 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 10 Feb 2020 15:15:47 +0100 -Subject: [PATCH 0676/1148] drm/vc4: hdmi: Remove unused CEC_CLOCK_DIV define +Subject: [PATCH 0673/1209] drm/vc4: hdmi: Remove unused CEC_CLOCK_DIV define The CEC_CLOCK_DIV define is not used anywhere in the driver, let's remove it. @@ -394150,10 +394011,10 @@ index 8d5848990e4a..5a1a6e84b947 100644 2.18.4 -From 6aed6f13de1615fbcd56c186041cbad3501737af Mon Sep 17 00:00:00 2001 +From 2eae68a243f5480570fbf7e0b65f010a19a53c59 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 13 Feb 2020 12:31:09 +0100 -Subject: [PATCH 0677/1148] drm/vc4: hdmi: Rename drm_encoder pointer in +Subject: [PATCH 0674/1209] drm/vc4: hdmi: Rename drm_encoder pointer in mode_valid The mode_valid hook on the encoder uses a pointer to a drm_encoder called @@ -394182,10 +394043,10 @@ index 5a1a6e84b947..f74200cc878d 100644 2.18.4 -From 31116760c630a45011768ce8f951ec85b49864fc Mon Sep 17 00:00:00 2001 +From 4bf0c301d53237a4820fb644108b2f6cc0d16cc8 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 10 Feb 2020 15:23:06 +0100 -Subject: [PATCH 0678/1148] drm/vc4: hdmi: Adjust HSM clock rate depending on +Subject: [PATCH 0675/1209] drm/vc4: hdmi: Adjust HSM clock rate depending on pixel rate The HSM clock needs to be setup at around 110% of the pixel rate. This @@ -394353,10 +394214,10 @@ index cbb1d3ab85d7..ee9753255b68 100644 2.18.4 -From 0005284e0439da93780e863b28aa00a2d408bef2 Mon Sep 17 00:00:00 2001 +From 9bce87f23b9635ab1c9f4626eee60dce67a41eff Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Tue, 17 Dec 2019 11:48:37 +0100 -Subject: [PATCH 0679/1148] drm/vc4: hdmi: Support the BCM2711 HDMI controllers +Subject: [PATCH 0676/1209] drm/vc4: hdmi: Support the BCM2711 HDMI controllers Now that the driver is ready for it, let's bring in the HDMI controllers variants for the BCM2711. @@ -395496,10 +395357,10 @@ index 5f78da6e25c7..ea948ffaa69b 100644 2.18.4 -From 6d32e720add89a419e1f3ef5606c3b5e4299dad2 Mon Sep 17 00:00:00 2001 +From ee9f5e97e55a8e25672abac79c9fefc27ff51715 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 13 Feb 2020 16:45:24 +0100 -Subject: [PATCH 0680/1148] dt-bindings: display: vc4: hdmi: Add BCM2711 HDMI +Subject: [PATCH 0677/1209] dt-bindings: display: vc4: hdmi: Add BCM2711 HDMI controllers bindings The HDMI controllers found in the BCM2711 SoC need some adjustments to the @@ -395676,10 +395537,10 @@ index 52b3cdac0bdf..a9d24e1cf684 100644 2.18.4 -From bb3f00149ba727389d95d04ba9a6f82fb21f7856 Mon Sep 17 00:00:00 2001 +From 3947f09d415af843c7af4cf5d2e8fceca053c791 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Wed, 12 Feb 2020 12:26:40 +0100 -Subject: [PATCH 0681/1148] ARM: dts: bcm2711: Enable the display pipeline +Subject: [PATCH 0678/1209] ARM: dts: bcm2711: Enable the display pipeline Now that all the drivers have been adjusted for it, let's bring in the necessary device tree changes. @@ -395894,10 +395755,10 @@ index 7cf1a9748f00..10f14e897eb1 100644 2.18.4 -From 51c5cd4b04965dfa7bb97369db67ae23fcdeb4dd Mon Sep 17 00:00:00 2001 +From 353a20454d0d39a3655885fe1ef63ce3631cbfdc Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 21 Feb 2020 17:10:45 +0100 -Subject: [PATCH 0682/1148] [DOWNSTREAM] ARM: dts: rpi4: Disable KMS driver by +Subject: [PATCH 0679/1209] [DOWNSTREAM] ARM: dts: rpi4: Disable KMS driver by default Signed-off-by: Maxime Ripard @@ -395992,10 +395853,10 @@ index 207c15f37a23..e8b1e9279c67 100644 2.18.4 -From 0a184dff0b28cc9f2a8d460a5279557ef5120fae Mon Sep 17 00:00:00 2001 +From 54872c72328706891e55c4554742d39f0fe3827c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 20 Sep 2019 17:20:01 +0100 -Subject: [PATCH 0683/1148] dtoverlays: Add Pi4 version of vc4-kms-v3d +Subject: [PATCH 0680/1209] dtoverlays: Add Pi4 version of vc4-kms-v3d The Pi4 version of the KMS drivers is a work in progress, some blocks need alternate configuration, and some blocks currently @@ -396244,10 +396105,10 @@ index 000000000000..7d59a30a3662 2.18.4 -From 28fd25967241a8fd8d17b399f192429c6ba944f1 Mon Sep 17 00:00:00 2001 +From ad4b2fc66c3cfc47a61395b8e319d5d79ce79554 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 27 Jan 2020 10:22:44 +0000 -Subject: [PATCH 0684/1148] drm: Checking of the pitch is only valid for linear +Subject: [PATCH 0681/1209] drm: Checking of the pitch is only valid for linear formats framebuffer_check was computing a minimum pitch value and ensuring @@ -396290,10 +396151,10 @@ index 57564318ceea..fa54768fe4d2 100644 2.18.4 -From c995ed4454d8614907a39dc022a97a26f89fef14 Mon Sep 17 00:00:00 2001 +From b9d5d76b8fcf0bbe16c360e3e1ae0a955680e5ed Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 24 Jan 2020 14:25:41 +0000 -Subject: [PATCH 0685/1148] drm/vc4: Add support for DRM_FORMAT_P030 to vc4 +Subject: [PATCH 0682/1209] drm/vc4: Add support for DRM_FORMAT_P030 to vc4 planes This currently doesn't handle non-zero source rectangles correctly, @@ -396470,10 +396331,10 @@ index 887ef481e746..e01bea748c77 100644 2.18.4 -From cb3092f05daa53955e9154bad0ec963c7acd064e Mon Sep 17 00:00:00 2001 +From 50804cd87b30c03319519ba649a61510c14f0ba4 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 25 Feb 2020 17:35:10 +0000 -Subject: [PATCH 0686/1148] Fixup P030 support +Subject: [PATCH 0683/1209] Fixup P030 support I got the logic wrong for enabling pixel formats, resulting in Pi0-3 only getting a single, invalid, format (P030 SAND). @@ -396502,10 +396363,10 @@ index e01bea748c77..d0957d618167 100644 2.18.4 -From 20ca1bed2cf23dcd6639980d8e5d9ac974241ce6 Mon Sep 17 00:00:00 2001 +From 4188daf937389e497fe712d1a3daf972bfa54d56 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 11 Feb 2020 15:36:59 +0000 -Subject: [PATCH 0687/1148] drm/vc4: The check for assigned HVS channels is not +Subject: [PATCH 0684/1209] drm/vc4: The check for assigned HVS channels is not applicable firmware_kms Channel assignments is only in full KMS, so skip the check @@ -396541,10 +396402,10 @@ index fdd1ed754087..0dea148852d5 100644 2.18.4 -From 5c78fd8e157497391f2231e202f3683c49342ee8 Mon Sep 17 00:00:00 2001 +From 2571072d865bfc516b4b2cc03669301b5e857be3 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 17 Feb 2020 11:37:21 +0000 -Subject: [PATCH 0688/1148] dt: Update v3d to use firmware_clocks. +Subject: [PATCH 0685/1209] dt: Update v3d to use firmware_clocks. Use the updated DT clock-names property to map the v3d clock to the firmware_clocks driver, instead of the older clkdev API. @@ -396570,10 +396431,10 @@ index e8b1e9279c67..b113ca5bfbf6 100644 2.18.4 -From a1cf084e4d66df3517be0f89c532a19ff6e7178d Mon Sep 17 00:00:00 2001 +From 779016fb1c404a5b2d9150ad8b60f133789fcee6 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 25 Mar 2020 18:01:04 +0000 -Subject: [PATCH 0689/1148] drm/vc4: Reset audio infoframe on encoder_enable if +Subject: [PATCH 0686/1209] drm/vc4: Reset audio infoframe on encoder_enable if previously streaming If the encoder is disabled and re-enabled (eg mode change) all infoframes @@ -396650,10 +396511,10 @@ index 7a43abbe0cfa..6a775ec7616f 100644 2.18.4 -From 18efabfba2e5f05c4d819a08b3ce18868df6d897 Mon Sep 17 00:00:00 2001 +From 2967bfb887dd96ac67b8cf74c18df0f58f9a517f Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 25 Mar 2020 18:03:42 +0000 -Subject: [PATCH 0690/1148] drm/vc4: Set the b-frame marker to the match ALSA's +Subject: [PATCH 0687/1209] drm/vc4: Set the b-frame marker to the match ALSA's default. ALSA's iec958 plugin by default sets the block start preamble @@ -396687,10 +396548,10 @@ index 9c972433e894..abf25910d843 100644 2.18.4 -From 4e1089b0a052d10f3656f4ec93dc0401dfe577a0 Mon Sep 17 00:00:00 2001 +From dd0dfbe169c29a4e662464e1390c891f26feeb7f Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 25 Mar 2020 18:07:19 +0000 -Subject: [PATCH 0691/1148] dts: Add reg-names for the HDMI registers on +Subject: [PATCH 0688/1209] dts: Add reg-names for the HDMI registers on bcm2835 Pi4 is requiring many more register configs in the HDMI @@ -396721,10 +396582,10 @@ index fe1ab40c7f22..e269e75f0f57 100644 2.18.4 -From 0349fcc1d4d69e719e1e0c34ec2a806957a02439 Mon Sep 17 00:00:00 2001 +From b79bfb3303b117c6cb43f3fb54e62d019cd7f28f Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 25 Mar 2020 18:08:39 +0000 -Subject: [PATCH 0692/1148] dt: Add HDMI audio dma values to bcm2711.dtsi +Subject: [PATCH 0689/1209] dt: Add HDMI audio dma values to bcm2711.dtsi Adds the relevant DMA settings for HDMI audio to work. @@ -396759,10 +396620,10 @@ index 10f14e897eb1..141d9403fe27 100644 2.18.4 -From e3aaf16ab2cf8f8ce22a19a162c61d671e4725e4 Mon Sep 17 00:00:00 2001 +From 54e0d71b89d7631eb8dc6599733ec3c36856ea51 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 25 Mar 2020 18:11:41 +0000 -Subject: [PATCH 0693/1148] drm/vc4: Use reg-names to configure HDMI audio. +Subject: [PATCH 0690/1209] drm/vc4: Use reg-names to configure HDMI audio. HDMI audio configuration was using fixed index numbers to load in DT register settings. @@ -396800,10 +396661,10 @@ index abf25910d843..6a5e06314cae 100644 2.18.4 -From a75bcf3a0eea7a8ef746b968dfdb3dae53fb553b Mon Sep 17 00:00:00 2001 +From e6ab17d8967a59509e417fbed719300e77289357 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 25 Mar 2020 18:16:14 +0000 -Subject: [PATCH 0694/1148] drm/vc4: Add audio initialisation for Pi4. +Subject: [PATCH 0691/1209] drm/vc4: Add audio initialisation for Pi4. The audio configuration has changed for Pi4, so support the configuration functions via the variant tables. @@ -396935,10 +396796,10 @@ index 6a775ec7616f..9b80f9401d58 100644 2.18.4 -From 325b96a4b6f80a3528b9308fd5f709a176b52044 Mon Sep 17 00:00:00 2001 +From 9c521d62a2c1552a1448f4e78cabcd4a3210ffa4 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 25 Mar 2020 18:18:45 +0000 -Subject: [PATCH 0695/1148] drm/vc4: Enable audio on Pi4. +Subject: [PATCH 0692/1209] drm/vc4: Enable audio on Pi4. This could be a revert of "drm/vc4: hdmi: Add an audio support flag" as it is no longer needed. @@ -396972,10 +396833,10 @@ index 6757863e465d..a5f0ee70625c 100644 2.18.4 -From 069592addff0b3637fd5574c142cac215117d00b Mon Sep 17 00:00:00 2001 +From 2e3842ecacd7bf18d859c693cfbc633269fbb08b Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 25 Mar 2020 18:22:40 +0000 -Subject: [PATCH 0696/1148] drm/vc4: Alter the HDMI state machine clock calc to +Subject: [PATCH 0693/1209] drm/vc4: Alter the HDMI state machine clock calc to allow for 1920x1200 Whilst the documentation for BCM2835 states that the HDMI state machine @@ -397024,10 +396885,10 @@ index a5f0ee70625c..0e394d6b1200 100644 2.18.4 -From c4d8c87234cf4e58a835e70b9470cce7fbcbeabf Mon Sep 17 00:00:00 2001 +From bf636596563f3b3f5a524cc5755caad41773106a Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 26 Mar 2020 11:51:55 +0000 -Subject: [PATCH 0697/1148] dtoverlays: Remove comment about vc4-kms-v3d +Subject: [PATCH 0694/1209] dtoverlays: Remove comment about vc4-kms-v3d locking up X from README Using vc4-kms-v3d with X has worked for quite a while, and essentially @@ -397058,10 +396919,10 @@ index 03f6224d6f8d..88aa213e693f 100644 2.18.4 -From 19cb7039c02d3a7add4b0cb4153d9eafab870f14 Mon Sep 17 00:00:00 2001 +From 3ff9c817abb811e0b64c20a3523de6bf88b7e663 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 26 Mar 2020 15:32:19 +0000 -Subject: [PATCH 0698/1148] drm/vc4: Kick the core clock up during a mode +Subject: [PATCH 0695/1209] drm/vc4: Kick the core clock up during a mode change Experimental commit to kick the core clock up during mode @@ -397168,10 +397029,10 @@ index 0dea148852d5..20b328d7e43b 100644 2.18.4 -From 0c8d29b31c8c400c8350649e4b0667a6da52c5df Mon Sep 17 00:00:00 2001 +From f795aff23c25152bb5c194914d5b03d25c998904 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 30 Mar 2020 12:52:26 +0100 -Subject: [PATCH 0699/1148] drm/vc4: Fixup for firmware KMS +Subject: [PATCH 0696/1209] drm/vc4: Fixup for firmware KMS Fix up "drm/vc4: Kick the core clock up during a mode change" for firmware KMS mode where we don't have the HVS or core clock @@ -397210,10 +397071,10 @@ index 20b328d7e43b..7f857af77898 100644 2.18.4 -From a8becc525fd831376b3f1c4aaf0ebe720bb130dd Mon Sep 17 00:00:00 2001 +From 3ce721a9423f49766c1982e6c1df40dd9154dfc9 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 30 Mar 2020 18:25:10 +0100 -Subject: [PATCH 0700/1148] drm/vc4: Fixup plane init within firmware-kms +Subject: [PATCH 0697/1209] drm/vc4: Fixup plane init within firmware-kms "drm/vc4: plane: Move additional planes creation to driver" moved overlay and cursor plane creation to a global function thata was @@ -397225,7 +397086,7 @@ Signed-off-by: Dave Stevenson 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c -index 7a65f19c99b4..f45cad62214a 100644 +index 67235aee3507..68f9db6c4c87 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -291,9 +291,11 @@ static int vc4_drm_bind(struct device *dev) @@ -397247,10 +397108,10 @@ index 7a65f19c99b4..f45cad62214a 100644 2.18.4 -From 90cfd786d2515216279fdf7e8a0046371afd1586 Mon Sep 17 00:00:00 2001 +From 5baa781d8008025b4d7a3c6b0061fe6f97419fa5 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 31 Mar 2020 16:21:45 +0100 -Subject: [PATCH 0701/1148] drm/vc4-hdmi: Give the HDMI audio instances +Subject: [PATCH 0698/1209] drm/vc4-hdmi: Give the HDMI audio instances different names The debugfs usage within asoc gets confused if multiple interfaces @@ -397279,10 +397140,10 @@ index 0e394d6b1200..6621eb3e01c6 100644 2.18.4 -From f38c9c0a0838cdf7e87034105080dc3cec5fccdd Mon Sep 17 00:00:00 2001 +From 240d81d437cd88a16be91e0e21d2609b9bcf199c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 31 Mar 2020 16:23:11 +0100 -Subject: [PATCH 0702/1148] i2c: brcmstb: The interrupt line is optional, so +Subject: [PATCH 0699/1209] i2c: brcmstb: The interrupt line is optional, so use platform_get_irq_optional If there is no interrupt defined then an error is logged due @@ -397335,10 +397196,10 @@ index 169a2836922d..d4e0a0f6732a 100644 2.18.4 -From af70e189e44ed3f797d6f541c34f6ef57d9c228a Mon Sep 17 00:00:00 2001 +From d0950811cdaa1e1acc755f1a4ca1fa34e5936ac3 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 31 Mar 2020 17:54:08 +0100 -Subject: [PATCH 0703/1148] dt: Drop I2C for Pi4 HDMI interfaces to 97.5kHz. +Subject: [PATCH 0700/1209] dt: Drop I2C for Pi4 HDMI interfaces to 97.5kHz. It was set to 390kHz, which is outside of the required spec for reading HDMI (max 100kHz). The i2c-brcmstb driver only supports @@ -397376,10 +397237,10 @@ index 5f3c9313d9a7..3ecff12736ad 100644 2.18.4 -From 8dfa768cc6ee5718e14a7beaa8f82b3d033cc511 Mon Sep 17 00:00:00 2001 +From 191da5446b997ac0d0efc6e3bb64b69f87a0f336 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 27 Mar 2020 13:49:25 +0000 -Subject: [PATCH 0704/1148] overlays: Add missing rpi-poe parameters +Subject: [PATCH 0701/1209] overlays: Add missing rpi-poe parameters The rpi-poe fan overlay has gained two more fan speeds and adjusted the thresholds and hystereses. @@ -397421,10 +397282,10 @@ index 88aa213e693f..5832c5f00230 100644 2.18.4 -From c58e6d3a1efd55f23d3bc8377016c1170952528d Mon Sep 17 00:00:00 2001 +From 62b9a7e10b42823f91f38642be452fa453ed9b3b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 2 Apr 2020 16:46:31 +0100 -Subject: [PATCH 0705/1148] vc4_hdmi_phy: Fix offset calculation +Subject: [PATCH 0702/1209] vc4_hdmi_phy: Fix offset calculation The original firmware code worked with float and did offset = ((vco_freq / fref * 2) * (1 << 22)); @@ -397457,10 +397318,10 @@ index a436fabbc128..732d8a0e5a1c 100644 2.18.4 -From 0cb01534fd0261634dbe7c587d66a4defe86f436 Mon Sep 17 00:00:00 2001 +From 69df6b2c36f5092980bf44df9466bb85f50562cc Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 1 Apr 2020 15:09:42 +0100 -Subject: [PATCH 0706/1148] overlays: Add overlay_map +Subject: [PATCH 0703/1209] overlays: Add overlay_map The overlay map permits platform-specific overlays, with deprecation and renaming. @@ -397567,10 +397428,10 @@ index 000000000000..e9b04b954d55 2.18.4 -From 047a2ca6b6957233657014e3cc4ab35483100afe Mon Sep 17 00:00:00 2001 +From bf1d9f499b48e7b348cedb8341a1fe9d259bc9b9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 1 Apr 2020 17:24:15 +0100 -Subject: [PATCH 0707/1148] overlays: Formally rename/deprecate old overlays +Subject: [PATCH 0704/1209] overlays: Formally rename/deprecate old overlays Take advantage of the overlay_map to rename or deprecate some obsolete overlays. @@ -397824,10 +397685,10 @@ index 94c14267716e..000000000000 2.18.4 -From 7a43bffc0dd625a4ae5e277475cd32fc0ce2cff3 Mon Sep 17 00:00:00 2001 +From baeabb576dcab3e938f35cccb679da2b0bcd1008 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 1 Apr 2020 15:51:56 +0100 -Subject: [PATCH 0708/1148] overlays: Add vc4-kms-v3d-pi4 to overlay_map +Subject: [PATCH 0705/1209] overlays: Add vc4-kms-v3d-pi4 to overlay_map Signed-off-by: Phil Elwell --- @@ -397856,10 +397717,10 @@ index 113098ea6908..c4f7f33fb5da 100644 2.18.4 -From 732a8400691b60a3ca86b21681d9a55a297da492 Mon Sep 17 00:00:00 2001 +From 34192689743059040bb457ee9dd073f3264d247b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 6 Apr 2020 09:47:42 +0100 -Subject: [PATCH 0709/1148] Add upstream and upstream-pi4 to overlay_map +Subject: [PATCH 0706/1209] Add upstream and upstream-pi4 to overlay_map Because the upstream overlay applies vc4-kms-v3d, of which Pi 4 has its own version, there also needs to be a Pi 4 version - vc4-kms-v3d-pi4. @@ -398098,10 +397959,10 @@ index 000000000000..2db343ef2237 2.18.4 -From 674d24fd5b9ffb549ca688a5cbe9c9133c66da2b Mon Sep 17 00:00:00 2001 +From d897284da4eefe973fb2cb6918e12776f97cb230 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 9 Sep 2019 15:49:56 +0100 -Subject: [PATCH 0710/1148] clk-raspberrypi: Allow cpufreq driver to also +Subject: [PATCH 0707/1209] clk-raspberrypi: Allow cpufreq driver to also adjust gpu clocks For performance/power it is beneficial to adjust gpu clocks with arm clock. @@ -398129,10 +397990,10 @@ index 86b18f8cc98d..eb1844148af9 100644 2.18.4 -From 6425dffbd82051a2f0f5ab0019661208b2657599 Mon Sep 17 00:00:00 2001 +From 056f04bc04b65f2b3da7c5f377879174eeb82463 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 8 Apr 2020 09:48:29 +0100 -Subject: [PATCH 0711/1148] configs: FS_ENCRYPTION replaces EXT4_ENCRYPTION +Subject: [PATCH 0708/1209] configs: FS_ENCRYPTION replaces EXT4_ENCRYPTION The filesystem-specific encryption options have been replaced by a generic FS_ENCRYPTION option. @@ -398229,10 +398090,10 @@ index b40477e1553b..544c16a75b34 100644 2.18.4 -From 2a15bd3538005ec3963a00a23ed5b50287556cd9 Mon Sep 17 00:00:00 2001 +From b98ca4ea0fd07dc96cb91dec276161961b751381 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Apr 2020 20:00:30 +1000 -Subject: [PATCH 0712/1148] Add support for the AudioInjector.net Isolated +Subject: [PATCH 0709/1209] Add support for the AudioInjector.net Isolated sound card This patch adds support for the Audio Injector Isolated sound card. @@ -398675,10 +398536,10 @@ index 000000000000..652464658fef 2.18.4 -From d9940e0a48ad2656a270f547e6b253f52d4ee85e Mon Sep 17 00:00:00 2001 +From 2ec174c577cfbb459f4a631eb9247165f4eabfc1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 8 Apr 2020 11:59:39 +0100 -Subject: [PATCH 0713/1148] overlays: Fix dtc warnings in i2c-gpio +Subject: [PATCH 0710/1209] overlays: Fix dtc warnings in i2c-gpio Better late than never. @@ -398705,10 +398566,10 @@ index 39e7bc5fa9d8..e94053b55610 100644 2.18.4 -From 1277ce803bca96512f9136aa772ade0be7fc6356 Mon Sep 17 00:00:00 2001 +From f4ec849c4dd8e8c08ccd0446aa89bb4d679dce97 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 8 Apr 2020 15:23:56 +0100 -Subject: [PATCH 0714/1148] kbuild: Disable gcc plugins +Subject: [PATCH 0711/1209] kbuild: Disable gcc plugins The GCC plugin feature leads to different kernel configurations on what ought to be equivalent build systems because they depend on the build @@ -398739,10 +398600,10 @@ index d3caefe53eab..6ee109e5d266 100755 2.18.4 -From aeac70ca87d75e189a326166fa5bec4c2f204f82 Mon Sep 17 00:00:00 2001 +From 435e839e5f6db4c05c52605cf695aa1c58c72861 Mon Sep 17 00:00:00 2001 From: AMuszkat Date: Wed, 8 Apr 2020 09:31:39 +0200 -Subject: [PATCH 0715/1148] configs: add MA120X0P codec +Subject: [PATCH 0712/1209] configs: add MA120X0P codec Signed-off-by: AMuszkat --- @@ -398817,10 +398678,10 @@ index a24cbb4837b8..34aa78d5d814 100644 2.18.4 -From 81865eabb75dabfffc8952b26eea63f258ac21c2 Mon Sep 17 00:00:00 2001 +From 6ff7133f661f03c63f1c0b615ab24c57786213da Mon Sep 17 00:00:00 2001 From: AMuszkat Date: Wed, 8 Apr 2020 10:04:49 +0200 -Subject: [PATCH 0716/1148] ASoC: ma120x0p: Add 96KHz rate support +Subject: [PATCH 0713/1209] ASoC: ma120x0p: Add 96KHz rate support Add 96KHz rate support to MA120X0P codec and make enable and mute gpio pins optional. @@ -398865,10 +398726,10 @@ index 39c74b17e007..e1591b6aff43 100644 2.18.4 -From 0b3eaad2f560fc7267d6d757fd8d1537c4649d9b Mon Sep 17 00:00:00 2001 +From ef74d9bd34175b07835b974e894498f41546e0ff Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Thu, 7 Nov 2019 10:56:11 +0100 -Subject: [PATCH 0717/1148] arm64: mm: reserve CMA and crashkernel in +Subject: [PATCH 0714/1209] arm64: mm: reserve CMA and crashkernel in ZONE_DMA32 commit bff3b04460a80f425442fe8e5c6ee8c3ebef611f upstream. @@ -398916,10 +398777,10 @@ index ddd6a6ce158e..9ee7894d6414 100644 2.18.4 -From c28fb88153d6a48b7636caf89d0d5957064babc2 Mon Sep 17 00:00:00 2001 +From bf130b7700b910ebb3df3a0cf7009559a3d1f56f Mon Sep 17 00:00:00 2001 From: Will Deacon Date: Tue, 3 Dec 2019 12:10:13 +0000 -Subject: [PATCH 0718/1148] arm64: mm: Fix initialisation of DMA zones on +Subject: [PATCH 0715/1209] arm64: mm: Fix initialisation of DMA zones on non-NUMA systems commit 93b90414c33f59b7960bc8d607da0ce83377e021 upstream. @@ -399027,10 +398888,10 @@ index 9ee7894d6414..9af647dafa51 100644 2.18.4 -From 80feeb13b8cfe5ff61506d53231e897586052773 Mon Sep 17 00:00:00 2001 +From 459f841a6cdc71881d80dc5577f6e6bf37ff68d5 Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Fri, 10 Jan 2020 18:29:35 +0100 -Subject: [PATCH 0719/1148] ARM: dts: bcm283x: Unify CMA configuration +Subject: [PATCH 0716/1209] ARM: dts: bcm283x: Unify CMA configuration commit c5a1e5375d19bd4001c59dc5d482ac5b1ba51cbf upstream. @@ -399130,10 +398991,10 @@ index 202a61f574c7..adb59ca3df6c 100644 2.18.4 -From f493053bed243e15d2c143f5008fe44b01bba64e Mon Sep 17 00:00:00 2001 +From 1e6e1e651af23f3c817a5dddcdd80bdd34c081ad Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Fri, 10 Jan 2020 18:19:33 +0100 -Subject: [PATCH 0720/1148] dma-contiguous: CMA: give precedence to cmdline +Subject: [PATCH 0717/1209] dma-contiguous: CMA: give precedence to cmdline commit 8c8c5a4994a306c217fd061cbfc5903399fd4c1c upstream. @@ -399185,10 +399046,10 @@ index 69cfb4345388..8477bf549dc9 100644 2.18.4 -From 8c34a8854e6bc528e9c11d979b95fb1ba2883d62 Mon Sep 17 00:00:00 2001 +From 5bb68ac63c29696c6486ce7101077bf1030b7445 Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Thu, 2 Apr 2020 19:22:46 +0200 -Subject: [PATCH 0721/1148] ARM: dts: Use upstream CMA configuration +Subject: [PATCH 0718/1209] ARM: dts: Use upstream CMA configuration Now that the kernel command line has precedence over the device tree, we can use the upstream CMA setup without breaking backward @@ -399227,10 +399088,10 @@ index 83a8431d9e5f..996112381eef 100644 2.18.4 -From 3c4a0c409e2821d376ce803d72930e66fb4655ec Mon Sep 17 00:00:00 2001 +From f4968d21605fa0fe8e98e54cf7cbdc9a905940c9 Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Thu, 2 Apr 2020 19:54:33 +0200 -Subject: [PATCH 0722/1148] ARM: dts: overlays: Unify overlay CMA handling +Subject: [PATCH 0719/1209] ARM: dts: overlays: Unify overlay CMA handling Now that we don't have to abuse the kernel command line to change CMA's size we can clean-up and centralize CMA usage in overlays. @@ -400119,10 +399980,10 @@ index 7d59a30a3662..134ad9ecbd4a 100644 2.18.4 -From 07e665c0b5c6b9020c3420aca1501a191d94f028 Mon Sep 17 00:00:00 2001 +From 77267c40aed436886b93a707bba96239f6d7f601 Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Thu, 19 Mar 2020 20:00:13 +0100 -Subject: [PATCH 0723/1148] ARM: dts: bcm283x: Fix vc4's firmware bus DMA +Subject: [PATCH 0720/1209] ARM: dts: bcm283x: Fix vc4's firmware bus DMA limitations The bus is virtual and devices have to inherit their DMA constraints @@ -400153,10 +400014,10 @@ index 394c8a71b13b..fd2c766e0f71 100644 2.18.4 -From 2d6cfd697ea0a47210f27817eea40cf610e4d351 Mon Sep 17 00:00:00 2001 +From 70f33f8cf362223e372e1ff22979a4724278fcf0 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Apr 2020 15:25:02 +0100 -Subject: [PATCH 0724/1148] ARM: dts: bcm2711: Restrict CMA to first 768MB +Subject: [PATCH 0721/1209] ARM: dts: bcm2711: Restrict CMA to first 768MB The downstream 32-bit 2711 kernel configuration enables HIGHMEM for access to more physical RAM. The HIGHMEM zone starts at 0x30000000 @@ -400192,10 +400053,10 @@ index b113ca5bfbf6..f27cb47448b1 100644 2.18.4 -From 11e36098cbf070a4fbb455d2343202cd68c7fe93 Mon Sep 17 00:00:00 2001 +From 20f622efc4bd9a4a83e53868731063d658201e35 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 27 Feb 2020 12:00:42 +0000 -Subject: [PATCH 0725/1148] configs: Restore CONFIG_GPIO_SYSFS +Subject: [PATCH 0722/1209] configs: Restore CONFIG_GPIO_SYSFS Signed-off-by: Phil Elwell --- @@ -400257,10 +400118,10 @@ index 818e84acbf53..dac95c734828 100644 2.18.4 -From 8baa463f783a23e0da567a568ccd8782317b76fa Mon Sep 17 00:00:00 2001 +From 42a73f9d496bfde3b52c517dcc885b17e969d67d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 4 Feb 2020 12:51:56 +0000 -Subject: [PATCH 0726/1148] ARM: dts: Extend SCB bus address range +Subject: [PATCH 0723/1209] ARM: dts: Extend SCB bus address range Signed-off-by: Phil Elwell --- @@ -400286,10 +400147,10 @@ index f27cb47448b1..4bc44b2ad211 100644 2.18.4 -From 98efe07209cdfb3f7c0f4b6c8f65a5097f9e4720 Mon Sep 17 00:00:00 2001 +From 37dabf9ec1ff0a312658d09f26302fbf6aa155fb Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 5 Dec 2019 18:02:08 +0000 -Subject: [PATCH 0727/1148] dts: bcm2711: Move emmc2 to its own "bus" +Subject: [PATCH 0724/1209] dts: bcm2711: Move emmc2 to its own "bus" Moving the EMMC2 controller under a dedicated bus allows the firmware to patch the dma-ranges property for different memory sizes without @@ -400344,10 +400205,10 @@ index 996112381eef..34251ec1b531 100644 2.18.4 -From 3a8ef3666c6c58c40ddc061c2b2ab4e300ce3ef4 Mon Sep 17 00:00:00 2001 +From 85685df19f67ca4126f95808fe8c365ac7ddaf42 Mon Sep 17 00:00:00 2001 From: James Hilliard Date: Fri, 10 Apr 2020 19:24:40 -0600 -Subject: [PATCH 0728/1148] drm/vc4: hdmi: Silence pixel clock error on +Subject: [PATCH 0725/1209] drm/vc4: hdmi: Silence pixel clock error on -EPROBE_DEFER If the vc4 hdmi driver loads before the pixel clock is available we @@ -400379,11 +400240,11 @@ index 6621eb3e01c6..2ebaea7e2a7b 100644 2.18.4 -From 9f20099894e6989701d19bb783389a461df7f9a2 Mon Sep 17 00:00:00 2001 +From e605a921345ed54737f01d2b919910b5678438b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Schambacher?= Date: Wed, 15 Apr 2020 11:48:29 +0200 -Subject: [PATCH 0729/1148] Fixes a problem with clock settings of HiFiBerry +Subject: [PATCH 0726/1209] Fixes a problem with clock settings of HiFiBerry DAC+ADC PRO (#3545) This patch fixes a problem of the re-calculation of @@ -400427,10 +400288,10 @@ index 2883c3ce9488..ffa76014e7df 100644 2.18.4 -From 2eae2220fcd1c6d52a843d905a1c71aef6232d86 Mon Sep 17 00:00:00 2001 +From 4c03eeef2373ec1c75aebc57fa72ede4e19b7fa1 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Tue, 7 Apr 2020 17:21:55 +0200 -Subject: [PATCH 0730/1148] Documentation: media: Update sub-device API intro +Subject: [PATCH 0727/1209] Documentation: media: Update sub-device API intro Update the V4L2 sub-device userspace API introduction to provide more details on why complex devices might want to register devnodes for the @@ -400467,10 +400328,10 @@ index 29e07e23f888..41ccb3e5c707 100644 2.18.4 -From cc136ea3149caff9c7ae00e8bb7aa21f5328b42f Mon Sep 17 00:00:00 2001 +From 720bc73fca757bbbf6047e7430f56f3fb788cc1a Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Tue, 7 Apr 2020 17:21:56 +0200 -Subject: [PATCH 0731/1148] Documentation: media: Document read-only subdevice +Subject: [PATCH 0728/1209] Documentation: media: Document read-only subdevice Document a new kAPI function to register subdev device nodes in read only mode and for each affected ioctl report how access is restricted. @@ -400704,10 +400565,10 @@ index fc73d27e6d74..feba9f807135 100644 2.18.4 -From 69cff70679667e4bf958b364bf465a0ec714ea6d Mon Sep 17 00:00:00 2001 +From 99f7427eb52a582abb58442a6079532d5e4c99a6 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Tue, 7 Apr 2020 17:21:57 +0200 -Subject: [PATCH 0732/1148] media: v4l2-dev: Add +Subject: [PATCH 0729/1209] media: v4l2-dev: Add v4l2_device_register_ro_subdev_node() Add to the V4L2 core a function to register device nodes for video @@ -400922,10 +400783,10 @@ index a0e93f0ef62a..841d23e3bbcf 100644 2.18.4 -From f18d3efef31ce198566fcf7b3a868fca060da949 Mon Sep 17 00:00:00 2001 +From c80c0842be1355736dc2c49b3c7e704869a9669f Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Wed, 1 Apr 2020 08:39:49 +0100 -Subject: [PATCH 0733/1148] media: bcm2835-unicam: Driver for CCP2/CSI2 camera +Subject: [PATCH 0730/1209] media: bcm2835-unicam: Driver for CCP2/CSI2 camera interface Add driver for the Unicam camera receiver block on @@ -403653,10 +403514,10 @@ index 000000000000..ae059a171d0f 2.18.4 -From 53749f3363dba38f4811d68f77487b5bf2935f76 Mon Sep 17 00:00:00 2001 +From dbbc3ebee77611a478e5394b1610458437ce819a Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Wed, 1 Apr 2020 08:46:29 +0100 -Subject: [PATCH 0734/1148] defconfig: Add bcm2835-unicam to platform +Subject: [PATCH 0731/1209] defconfig: Add bcm2835-unicam to platform defconfigs. This commit enables the bcm2835-unicam driver in the following @@ -403713,10 +403574,10 @@ index 8eddf1eec9b7..543948a9499d 100644 2.18.4 -From 931e32e00c1ec2cf4d349647894a48b0e22c290e Mon Sep 17 00:00:00 2001 +From 0673c64b7cf43da56f58c8d37d552d8770f06fd3 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Wed, 1 Apr 2020 08:46:29 +0100 -Subject: [PATCH 0735/1148] media: uapi: v4l2-core: Add sensor ancillary data +Subject: [PATCH 0732/1209] media: uapi: v4l2-core: Add sensor ancillary data V4L2 foucc type. Add V4L2_META_FMT_SENSOR_DATA format 4CC. @@ -403796,10 +403657,10 @@ index 360200ed4f08..8878b9abd034 100644 default: /* Compressed formats */ diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h -index f927a77cb2f1..350d03021818 100644 +index 5d28d8ef6c0c..d8320844d188 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h -@@ -769,6 +769,7 @@ struct v4l2_pix_format { +@@ -768,6 +768,7 @@ struct v4l2_pix_format { #define V4L2_META_FMT_VSP1_HGT v4l2_fourcc('V', 'S', 'P', 'T') /* R-Car VSP1 2-D Histogram */ #define V4L2_META_FMT_UVC v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header metadata */ #define V4L2_META_FMT_D4XX v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */ @@ -403811,10 +403672,10 @@ index f927a77cb2f1..350d03021818 100644 2.18.4 -From 9ca86ac59cee4aab3e3f6fa429b2be7e133417d6 Mon Sep 17 00:00:00 2001 +From 1af73593a286f40e758a0fc9ea5c9e47dbb27ddd Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Tue, 21 Jan 2020 14:06:47 +0000 -Subject: [PATCH 0736/1148] media: uapi: Add MEDIA_BUS_FMT_SENSOR_DATA media +Subject: [PATCH 0733/1209] media: uapi: Add MEDIA_BUS_FMT_SENSOR_DATA media bus format This patch adds MEDIA_BUS_FMT_SENSOR_DATA used by the bcm2835-unicam @@ -403883,10 +403744,10 @@ index 16c1fa2d89a4..4b5e2a71dfec 100644 2.18.4 -From fd3ec652a4a968cb05a4f42d938029671146e512 Mon Sep 17 00:00:00 2001 +From 38507733e5e070912bab907cd52288e704a674aa Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Tue, 7 Apr 2020 10:42:14 +0100 -Subject: [PATCH 0737/1148] media: bcm2835-unicam: Add support for mulitple +Subject: [PATCH 0734/1209] media: bcm2835-unicam: Add support for mulitple device nodes. Move device node specific state out of the device state structure and @@ -404972,10 +404833,10 @@ index 8c1b220e6d8c..c19f96ce9d29 100644 2.18.4 -From 6f77627f2477e5ef419154ada481908282d202c5 Mon Sep 17 00:00:00 2001 +From cab53ffeef1cac94dbeadeba7ce3458213d84685 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Thu, 16 Apr 2020 11:35:41 +0100 -Subject: [PATCH 0738/1148] media: bcm2835-unicam: Add embedded data node. +Subject: [PATCH 0735/1209] media: bcm2835-unicam: Add embedded data node. This patch adds a new node in the bcm2835-unicam driver to support CSI-2 embedded data streams. The subdevice is queried to see if @@ -406146,10 +406007,10 @@ index c19f96ce9d29..27752969c275 100644 2.18.4 -From f213cc3e2c85e1c4a134fa185d5636ee5e2a5a59 Mon Sep 17 00:00:00 2001 +From c7e042db4f29bf332e4f8f3ded4e23be9538ac9f Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Thu, 2 Apr 2020 16:08:51 +0100 -Subject: [PATCH 0739/1148] media: bcm2835-unicam: Use dummy buffer if none +Subject: [PATCH 0736/1209] media: bcm2835-unicam: Use dummy buffer if none have been queued If no buffer has been queued by a userland application, we use an @@ -406460,10 +406321,10 @@ index 27752969c275..62248db04bfa 100644 2.18.4 -From c470b816ffb80ce176bac94c082a27d476acd1da Mon Sep 17 00:00:00 2001 +From 1c64edbae40d17f679aa140e8e7076a34b4bd0ed Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 17 Apr 2020 10:46:19 +0100 -Subject: [PATCH 0740/1148] spi: Force CS_HIGH if GPIO descriptors are used +Subject: [PATCH 0737/1209] spi: Force CS_HIGH if GPIO descriptors are used Commit f3186dd87669 ("spi: Optionally use GPIO descriptors for CS GPIOs") amended of_spi_parse_dt() to always set SPI_CS_HIGH for SPI slaves whose @@ -406484,10 +406345,10 @@ Signed-off-by: Phil Elwell 1 file changed, 9 insertions(+) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c -index 982753ac1bf6..eba2f687f1e6 100644 +index 4c96c7c9e335..254c1cf9d794 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -3058,6 +3058,7 @@ static int __spi_validate_bits_per_word(struct spi_controller *ctlr, +@@ -3114,6 +3114,7 @@ static int __spi_validate_bits_per_word(struct spi_controller *ctlr, */ int spi_setup(struct spi_device *spi) { @@ -406495,7 +406356,7 @@ index 982753ac1bf6..eba2f687f1e6 100644 unsigned bad_bits, ugly_bits; int status; -@@ -3075,6 +3076,14 @@ int spi_setup(struct spi_device *spi) +@@ -3131,6 +3132,14 @@ int spi_setup(struct spi_device *spi) (SPI_TX_DUAL | SPI_TX_QUAD | SPI_TX_OCTAL | SPI_RX_DUAL | SPI_RX_QUAD | SPI_RX_OCTAL))) return -EINVAL; @@ -406514,10 +406375,10 @@ index 982753ac1bf6..eba2f687f1e6 100644 2.18.4 -From f4b47d9a478175ae628eebfea3ec37553ed70f74 Mon Sep 17 00:00:00 2001 +From 748e1b4e173486a468d3e22f481134b8c708b054 Mon Sep 17 00:00:00 2001 From: Lad Prabhakar Date: Tue, 10 Mar 2020 14:17:07 +0100 -Subject: [PATCH 0741/1148] media: i2c: imx219: Fix power sequence +Subject: [PATCH 0738/1209] media: i2c: imx219: Fix power sequence Commit ca45448a56659c6df6e0436188e97f6cc65dea8a upstream. @@ -406575,10 +406436,10 @@ index f1effb5a5f66..16010ca1781a 100644 2.18.4 -From 48ba3f8cd5489f7faf3adf0fcaf3aa968555d2da Mon Sep 17 00:00:00 2001 +From 22f634f35bec17922a266dc19638f983987672a4 Mon Sep 17 00:00:00 2001 From: Lad Prabhakar Date: Tue, 10 Mar 2020 14:17:08 +0100 -Subject: [PATCH 0742/1148] media: i2c: imx219: Add support for RAW8 bit bayer +Subject: [PATCH 0739/1209] media: i2c: imx219: Add support for RAW8 bit bayer format Commit 22da1d56e982151e0bdfafe9de6fe94098a51356 upstream. @@ -406900,10 +406761,10 @@ index 16010ca1781a..3207487b4c10 100644 2.18.4 -From e0460592c97b559a918abc347f25299a3399d77f Mon Sep 17 00:00:00 2001 +From 0d58f9fce2e6cc8ebf7846ae78cdda4b9ad5d511 Mon Sep 17 00:00:00 2001 From: Lad Prabhakar Date: Tue, 10 Mar 2020 14:17:09 +0100 -Subject: [PATCH 0743/1148] media: i2c: imx219: Add support for cropped 640x480 +Subject: [PATCH 0740/1209] media: i2c: imx219: Add support for cropped 640x480 resolution Commit 25130b8ad409d5532f3763bcf891af74f550a70d upstream. @@ -407024,10 +406885,10 @@ index 3207487b4c10..cb03bdec1f9c 100644 2.18.4 -From b0c462ca1745647e278de42cb54d811c090a37c2 Mon Sep 17 00:00:00 2001 +From fa8e1892e360fa51b173b05df1cc99691bc8e2fb Mon Sep 17 00:00:00 2001 From: Dafna Hirschfeld Date: Tue, 31 Mar 2020 20:06:30 +0200 -Subject: [PATCH 0744/1148] media: i2c: imx219: Fix a bug in +Subject: [PATCH 0741/1209] media: i2c: imx219: Fix a bug in imx219_enum_frame_size https://patchwork.linuxtv.org/patch/62740/ @@ -407064,10 +406925,10 @@ index cb03bdec1f9c..86e0564bfb4f 100644 2.18.4 -From 55c0e44d37876f653bdf35f157adce163d9b494f Mon Sep 17 00:00:00 2001 +From 7a3e95a3823964e84a8fdc78c783365a2fb24611 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 24 Mar 2020 23:13:02 +0200 -Subject: [PATCH 0745/1148] media: bcm2835-unicam: Disable event-related ioctls +Subject: [PATCH 0742/1209] media: bcm2835-unicam: Disable event-related ioctls on metadata node The unicam driver supports both the SOURCE_CHANGE and CTRL events. Both @@ -407101,10 +406962,10 @@ index 62248db04bfa..4840aa6c96c4 100644 2.18.4 -From 95da89d5dc7f4e22ca4d911b9ff9ad97359076ad Mon Sep 17 00:00:00 2001 +From e7286d17ee551f55144118dd7d175927ec565001 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 24 Mar 2020 23:13:02 +0200 -Subject: [PATCH 0746/1148] media: bcm2835-unicam: Add support for the +Subject: [PATCH 0743/1209] media: bcm2835-unicam: Add support for the FRAME_SYNC event The FRAME_SYNC event is useful for userspace image processing algorithms @@ -407162,10 +407023,10 @@ index 4840aa6c96c4..2ddac7382fb9 100644 2.18.4 -From 034e9bfe0a14c8325247612e8255c8296db5dc48 Mon Sep 17 00:00:00 2001 +From 13c651e58db34ec9a3a82ea76556a136f429fa14 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 17 Apr 2020 16:24:21 +0100 -Subject: [PATCH 0747/1148] configs: Enable CONFIG_ARM_BCM2835_CPUFREQ +Subject: [PATCH 0744/1209] configs: Enable CONFIG_ARM_BCM2835_CPUFREQ We actually use the 64-bit 2711 kernel on Pi3 too. It still uses the downstream cpufreq driver in DT. @@ -407192,10 +407053,10 @@ index dac95c734828..14398af7f558 100644 2.18.4 -From ed461c7ef24f549e98c94df0cb2cf9e290090380 Mon Sep 17 00:00:00 2001 +From 264e58e4ab3e5b65fb6541c0c05fb6dfa5065896 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 17 Apr 2020 16:20:55 +0100 -Subject: [PATCH 0748/1148] Revert "firmware: raspberrypi: register clk device" +Subject: [PATCH 0745/1209] Revert "firmware: raspberrypi: register clk device" This reverts commit 91f2cf4a6b2131016b1ae9c9500245f0572112c7. @@ -407256,10 +407117,10 @@ index 4f3ab14d275a..dc11a1968e99 100644 2.18.4 -From 97375e6958d54c757e13b8b49cd7c9d29cbb5cf8 Mon Sep 17 00:00:00 2001 +From f52dfec60b7086fcc50ac74ee5382ceb6e131329 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Thu, 12 Mar 2020 14:09:38 +0000 -Subject: [PATCH 0749/1148] media: imx219: Advertise embedded data node on +Subject: [PATCH 0746/1209] media: imx219: Advertise embedded data node on media pad 1 This commit updates the imx219 driver to adverise support for embedded @@ -407597,10 +407458,10 @@ index 86e0564bfb4f..017ae503cc09 100644 2.18.4 -From 92f449e80510bee047d5d58d627f0cd03fc2912b Mon Sep 17 00:00:00 2001 +From ac8d9d50cdc00678716104d4a8aa9af254610dab Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 20 Apr 2020 11:25:18 +0100 -Subject: [PATCH 0750/1148] dts: bcm2711: EMMC2 can address the whole first GB +Subject: [PATCH 0747/1209] dts: bcm2711: EMMC2 can address the whole first GB Although 0xfc000000 looks like an inaccessible RAM address (due to the peripheral mappings), with RAM mapped at 0xc0000000 (as it is on the @@ -407634,10 +407495,10 @@ index 34251ec1b531..b3a00baba962 100644 2.18.4 -From 0fe2890aefdc3e7b88d871602ec3b6b6c3acc3c1 Mon Sep 17 00:00:00 2001 +From 256d2b99f5de83855b70b3b70635a25715382764 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 20 Apr 2020 22:18:52 +0100 -Subject: [PATCH 0751/1148] driver: char: rpivid: Remove legacy name support +Subject: [PATCH 0748/1209] driver: char: rpivid: Remove legacy name support Signed-off-by: Phil Elwell --- @@ -407693,10 +407554,10 @@ index fbf3d4f3fe0c..5f4c91924ec1 100644 2.18.4 -From 933cf8ca59ab0d39ef7f5173111359509e87ec70 Mon Sep 17 00:00:00 2001 +From 0cdc688b362b07169860f6d171e9e7c30ef2b0c6 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 21 Apr 2020 11:30:23 +0100 -Subject: [PATCH 0752/1148] driver: char: rpivid: Don't map more than wanted +Subject: [PATCH 0749/1209] driver: char: rpivid: Don't map more than wanted Limit mappings to the permitted range, but don't map more than asked for otherwise we walk off the end of the allocated VMA. @@ -407750,10 +407611,10 @@ index 5f4c91924ec1..9f38083f4cb6 100644 2.18.4 -From 312ce605a12697f3a3fcad5d0d5f9e8c4a162341 Mon Sep 17 00:00:00 2001 +From 96ab122baddeb212ffad64743410d5946938c1eb Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 9 Apr 2020 12:43:22 +0100 -Subject: [PATCH 0753/1148] defconfig: Enable I2C_MUX_PINCTRL in all Pi configs +Subject: [PATCH 0750/1209] defconfig: Enable I2C_MUX_PINCTRL in all Pi configs To be used to switch between the camera/display pins, and the HAT pins for i2c-0. @@ -407836,10 +407697,10 @@ index 34aa78d5d814..3a39acd6d0ab 100644 2.18.4 -From beb6045383143bdae96bcbd8262bd3631e00dde5 Mon Sep 17 00:00:00 2001 +From c919195b14f5b2c3c2e95321642f4b9358c903d7 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 9 Apr 2020 12:46:13 +0100 -Subject: [PATCH 0754/1148] dt: Implement an I2C pinctrl mux for BSC0. +Subject: [PATCH 0751/1209] dt: Implement an I2C pinctrl mux for BSC0. BSC0 serves either the HAT EEPROM pins on the 40pin connector, or the display and camera on a board specific pairing of either @@ -408308,10 +408169,10 @@ index adb59ca3df6c..4426f9e6ba92 100644 2.18.4 -From 6d483178b1cd66f6f3beb896992404a6e6ef9ed5 Mon Sep 17 00:00:00 2001 +From e6b6452716abbb2c204e842580d979687d1b2a6c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 9 Apr 2020 15:04:14 +0100 -Subject: [PATCH 0755/1148] dtoverlays: Update CSI overlays to use i2c_csi_dsi +Subject: [PATCH 0752/1209] dtoverlays: Update CSI overlays to use i2c_csi_dsi Update all overlays that were using i2c_vc for talking to CSI source devices to use the new i2c_csi_dsi node via i2c_mux_pinctrl. @@ -408749,10 +408610,10 @@ index 2a1a3a80de49..f8c059827234 100644 2.18.4 -From fd41e49a43430250a090498c5e38c9c8b7b8cf88 Mon Sep 17 00:00:00 2001 +From 6c388d6fc715ef35fca12ca0cc23b3adc53e94d9 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 9 Apr 2020 17:26:13 +0100 -Subject: [PATCH 0756/1148] dt: Update all mainline bcm283x dt files for i2c0 +Subject: [PATCH 0753/1209] dt: Update all mainline bcm283x dt files for i2c0 pinctrl mux BSC0 (aka i2c0) can me muxed via pinctrl to GPIOs 0&1, 28&29, or @@ -408982,10 +408843,10 @@ index 588d9411ceb6..dde209ade51b 100644 2.18.4 -From 206f4a5d01d0de406f65171cf3fd8d676a9c22b9 Mon Sep 17 00:00:00 2001 +From 85589e005041bd33910b0e46cde6929d74954010 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 21 Apr 2020 17:34:27 +0100 -Subject: [PATCH 0757/1148] ARM: dts: Create bcm2708-rpi-b-rev1.dts +Subject: [PATCH 0754/1209] ARM: dts: Create bcm2708-rpi-b-rev1.dts The first revision of the Pi Model B used I2C0 to address the camera and I2C0 was available for user applications on the 26-pin header. @@ -409175,10 +409036,10 @@ index 2af64cd43729..e3d90b4262f1 100644 2.18.4 -From dd85e776ad8a73449613cdbb080a3e233778d024 Mon Sep 17 00:00:00 2001 +From 92c36e7afbcd7e744fcca1c7e5a8fefbed2fef87 Mon Sep 17 00:00:00 2001 From: Hristo Venev Date: Wed, 22 Apr 2020 13:40:47 +0300 -Subject: [PATCH 0758/1148] dts: bcm2711: set #size-cells = <2> +Subject: [PATCH 0755/1209] dts: bcm2711: set #size-cells = <2> There already is one 4 GiB range, and one more will appear when high peripheral mode is enabled. @@ -409300,10 +409161,10 @@ index b34a65ff6316..41698e7f5e24 100644 2.18.4 -From 1c6811c65c84774703bdc5dbe006b5b1944842a3 Mon Sep 17 00:00:00 2001 +From a8f24431562d26f10fcb38e2565a29b42af17c79 Mon Sep 17 00:00:00 2001 From: Hristo Venev Date: Wed, 22 Apr 2020 16:34:59 +0300 -Subject: [PATCH 0759/1148] dts: bcm2711: add "High Peripheral" mode overlay +Subject: [PATCH 0756/1209] dts: bcm2711: add "High Peripheral" mode overlay The following addresses change: @@ -409455,10 +409316,10 @@ index a20c0e079cc8..1287964c15bf 100644 2.18.4 -From 4eadfc72cf0efb08e0a12a18c89b9699316d979f Mon Sep 17 00:00:00 2001 +From f904d536462dd990a6d0e36e70061354f5b0e926 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 20 Apr 2020 13:41:10 +0100 -Subject: [PATCH 0760/1148] Revert "spi: spidev: Fix CS polarity if GPIO +Subject: [PATCH 0757/1209] Revert "spi: spidev: Fix CS polarity if GPIO descriptors are used" This reverts commit 83b2a8fe43bda0c11981ad6afa5dd0104d78be28. @@ -409493,10 +409354,10 @@ index 736af270d7a1..d41630b23968 100644 2.18.4 -From 711b3d039c475e8cfcfb1626fa7e9a905c429d73 Mon Sep 17 00:00:00 2001 +From c00a085564d7433a8dc80a5047d44288e3b0b53a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 20 Apr 2020 13:30:49 +0100 -Subject: [PATCH 0761/1148] spi: use_gpio_descriptor fixup moved to spi_setup +Subject: [PATCH 0758/1209] spi: use_gpio_descriptor fixup moved to spi_setup Commits [1] and [2] including code that forces SPI_CS_HIGH for SPI controllers that use GPIO descriptors, the SPI_CS_HIGH flag being @@ -409531,7 +409392,7 @@ Signed-off-by: Phil Elwell 1 file changed, 9 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c -index eba2f687f1e6..571ef41edb83 100644 +index 254c1cf9d794..46568c47ecfb 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1792,15 +1792,6 @@ static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi, @@ -409554,10 +409415,10 @@ index eba2f687f1e6..571ef41edb83 100644 2.18.4 -From d75ab124cb81863da00e6dcb7f985aa6dabf0797 Mon Sep 17 00:00:00 2001 +From aa6c340a5ab654b0c6ceb3e1c69a76953b5c19c1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 24 Apr 2020 15:17:06 +0100 -Subject: [PATCH 0762/1148] overlays: rpivid-v4l2 also needs size-cells = 2 +Subject: [PATCH 0759/1209] overlays: rpivid-v4l2 also needs size-cells = 2 Fixes: "dts: bcm2711: set #size-cells = <2>" @@ -409590,10 +409451,10 @@ index e6ece0570e90..cd8d96bb5715 100644 2.18.4 -From 9b2fd794592f4984b6e642d6fb5a06f21fc10f41 Mon Sep 17 00:00:00 2001 +From cb5e69bd84bcf6ade3eed3135d142f257b85be8c Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Tue, 21 Apr 2020 16:26:03 +0100 -Subject: [PATCH 0763/1148] media: bcm2835-unicam: Re-fetch mbus code from +Subject: [PATCH 0760/1209] media: bcm2835-unicam: Re-fetch mbus code from subdev on a g_fmt call The sensor subdevice may change the Bayer order if a H/V flip is @@ -409645,10 +409506,10 @@ index 2ddac7382fb9..2e022c5e1cfd 100644 2.18.4 -From 77db9f5a9d0382200556980cc3bc981c2c255078 Mon Sep 17 00:00:00 2001 +From 8f90cab4ebf5c4d124427e28a5d576cfe2e5894b Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Thu, 23 Apr 2020 10:18:15 +0100 -Subject: [PATCH 0764/1148] uapi: bcm2835-isp: Add bcm2835-isp uapi header file +Subject: [PATCH 0761/1209] uapi: bcm2835-isp: Add bcm2835-isp uapi header file This file defines the userland interface to the bcm2835-isp driver that will follow in a separate commit. @@ -409989,10 +409850,10 @@ index 000000000000..e7afc367fd76 2.18.4 -From 265c1f89a1a5420883a04a4aec235e629c91cbd6 Mon Sep 17 00:00:00 2001 +From 3ca285b5164380d59acdf80bc888cead8a653a15 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Thu, 23 Apr 2020 10:20:26 +0100 -Subject: [PATCH 0765/1148] media: uapi: v4l2-core: Add ISP statistics output +Subject: [PATCH 0762/1209] media: uapi: v4l2-core: Add ISP statistics output V4L2 fourcc type Add V4L2_META_FMT_BCM2835_ISP_STATS V4L2 format type. @@ -410081,10 +409942,10 @@ index 8878b9abd034..31d3f50a5040 100644 default: /* Compressed formats */ diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h -index 350d03021818..5b33ba237b6d 100644 +index d8320844d188..10e146cd092a 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h -@@ -770,6 +770,7 @@ struct v4l2_pix_format { +@@ -769,6 +769,7 @@ struct v4l2_pix_format { #define V4L2_META_FMT_UVC v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header metadata */ #define V4L2_META_FMT_D4XX v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */ #define V4L2_META_FMT_SENSOR_DATA v4l2_fourcc('S', 'E', 'N', 'S') /* Sensor Ancillary metadata */ @@ -410096,10 +409957,10 @@ index 350d03021818..5b33ba237b6d 100644 2.18.4 -From 64a80938584502deb60e06818d313afb65ef71c7 Mon Sep 17 00:00:00 2001 +From 439fd85ae67269f399e56edabd04451d83c5e7a9 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Tue, 21 Apr 2020 15:06:19 +0100 -Subject: [PATCH 0766/1148] media: uapi: v4l-ctrls: Add CID base for the +Subject: [PATCH 0763/1209] media: uapi: v4l-ctrls: Add CID base for the bcm2835-isp driver We are reserving controls for the new bcm2835-isp driver. @@ -410276,10 +410137,10 @@ index d21ac7545626..660574b1b4e7 100644 2.18.4 -From 59fa5c84baaf9110107769097bbc826eb1ebe7f9 Mon Sep 17 00:00:00 2001 +From 608fa92821d40c00fd2c81997a0413fe2158caca Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Thu, 23 Apr 2020 10:12:24 +0100 -Subject: [PATCH 0767/1148] staging: mmal-vchiq: Fix formatting errors in +Subject: [PATCH 0764/1209] staging: mmal-vchiq: Fix formatting errors in mmal_parameters.h No functional changes in this commit. @@ -410400,10 +410261,10 @@ index d3d7828d1e56..27bafc5f01d2 100644 2.18.4 -From 8bf54a815c54b1a4a82633ac210389515bfb63ba Mon Sep 17 00:00:00 2001 +From 723e43b71ab1e30ca8d2e64900ba7432399a076e Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Thu, 23 Apr 2020 10:17:37 +0100 -Subject: [PATCH 0768/1148] staging: vc04_services: ISP: Add a more complex ISP +Subject: [PATCH 0765/1209] staging: vc04_services: ISP: Add a more complex ISP processing component Driver for the BCM2835 ISP hardware block. This driver uses the MMAL @@ -412684,10 +412545,10 @@ index 27bafc5f01d2..9c752db45565 100644 2.18.4 -From 742b6f168d28c52ac5280b3bff751bea73173de3 Mon Sep 17 00:00:00 2001 +From 84b9cf076ae47c6904bf52d821874a571e980bea Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Wed, 22 Apr 2020 08:32:32 +0100 -Subject: [PATCH 0769/1148] staging: vchiq: Load bcm2835_isp driver from vchiq +Subject: [PATCH 0766/1209] staging: vchiq: Load bcm2835_isp driver from vchiq bcmn2835_isp is a platform driver dependent on vchiq, therefore add the load/unload functions for it to vchiq. @@ -412729,10 +412590,10 @@ index a3fcb1830995..d01c2d424310 100644 2.18.4 -From f18dbd873f66023966011b02025010e640f33ffe Mon Sep 17 00:00:00 2001 +From 6ff902079ac2110e03b3fd88b1bf3cd52d9d65db Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Mon, 20 Jan 2020 12:58:06 +0000 -Subject: [PATCH 0770/1148] configs: Add VIDEO_ISP_BCM2835 to all Pi defconfigs +Subject: [PATCH 0767/1209] configs: Add VIDEO_ISP_BCM2835 to all Pi defconfigs This commit enables the bcm2835-isp driver in the following defconfigs: @@ -412815,10 +412676,10 @@ index 3a39acd6d0ab..bb3b687406ab 100644 2.18.4 -From ea2d32499fcd0a89d9687be17ca72ab758ab40da Mon Sep 17 00:00:00 2001 +From efa0fec5419452dec9efee86344bf691e8de8a51 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 28 Apr 2020 17:35:07 +0100 -Subject: [PATCH 0771/1148] vc4_hvs: Mark core clock as optional +Subject: [PATCH 0768/1209] vc4_hvs: Mark core clock as optional This isn't required on Pi3, so don't treat as an error @@ -412844,10 +412705,10 @@ index 59198019aa1d..d76521be2c0d 100644 2.18.4 -From 8f7f6be6b1fd03ed2e7e08e288aab0fded73bc36 Mon Sep 17 00:00:00 2001 +From f8108d7bad403bb25fcc9e4f9c35d8ec9e605f1e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 27 Apr 2020 19:07:50 +0100 -Subject: [PATCH 0772/1148] vc4_hdmi: BCM2835 requires a fixed hsm clock for +Subject: [PATCH 0769/1209] vc4_hdmi: BCM2835 requires a fixed hsm clock for CEC to work Signed-off-by: popcornmix @@ -412945,10 +412806,10 @@ index 9b80f9401d58..95bed29531b9 100644 2.18.4 -From 48f0f390f3b55fca3c60ac71ffd1042739db0003 Mon Sep 17 00:00:00 2001 +From 0838627b2a55fbce3e4c753566ced1ac360eb5e8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 29 Apr 2020 13:41:20 +0100 -Subject: [PATCH 0773/1148] configs: Enable CONFIG_DRM_VC4_HDMI_CEC +Subject: [PATCH 0770/1209] configs: Enable CONFIG_DRM_VC4_HDMI_CEC Signed-off-by: popcornmix --- @@ -412984,10 +412845,10 @@ index bb3b687406ab..f6c12a7a04be 100644 2.18.4 -From da0dfc20869d8f8b0c1e10a1981f390fb9b0e2e4 Mon Sep 17 00:00:00 2001 +From 732cbb9058d85d0d942ca2d2e2e86e1c3baad36e Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Wed, 29 Apr 2020 11:50:38 +0200 -Subject: [PATCH 0774/1148] media: i2c: imx219: Implement get_selection +Subject: [PATCH 0771/1209] media: i2c: imx219: Implement get_selection Implement the get_selection pad operation for the IMX219 sensor driver. The supported targets report the sensor's native size, the crop default @@ -413171,10 +413032,10 @@ index 017ae503cc09..988ebf6dd895 100644 2.18.4 -From 114ed328837bff74fdac32177a616c60d58f4bea Mon Sep 17 00:00:00 2001 +From 3e04a07681cd5d703f76bc5fc72f7f3806321538 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 29 Apr 2020 11:46:07 +0100 -Subject: [PATCH 0775/1148] media: i2c: ov5647: Add support for g_selection to +Subject: [PATCH 0772/1209] media: i2c: ov5647: Add support for g_selection to reflect cropping/binning In order to apply lens shading correctly the client needs to know how @@ -413383,10 +413244,10 @@ index 66b3ee5cc190..e7c7e3ab4b38 100644 2.18.4 -From e7d5aecd66b17c39dba34d7d4818a8836ba01f09 Mon Sep 17 00:00:00 2001 +From e6b60e879f69dd9986e2fdd9dd686b445e21b592 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 29 Apr 2020 11:50:52 +0100 -Subject: [PATCH 0776/1148] media: i2c: ov5467: Fixup error path to release +Subject: [PATCH 0773/1209] media: i2c: ov5467: Fixup error path to release mutex "87f3ab9 media: ov5647: Add basic support for multiple sensor modes." @@ -413419,10 +413280,10 @@ index e7c7e3ab4b38..09d68b0b4a13 100644 2.18.4 -From e15593d7e083bff4df7ea5ffefc9e44c5b9e2e6d Mon Sep 17 00:00:00 2001 +From ada7963b57deb36a30019a762b010e1a5bd97f26 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 29 Apr 2020 12:25:13 +0100 -Subject: [PATCH 0777/1148] media: i2c: ov5647: Support V4L2_CID_PIXEL_RATE +Subject: [PATCH 0774/1209] media: i2c: ov5647: Support V4L2_CID_PIXEL_RATE Clients need to know the pixel rate in order to compute exposure and frame rate values. @@ -413556,10 +413417,10 @@ index 09d68b0b4a13..02d72feb837e 100644 2.18.4 -From fcd0c01220bfa6cc1d70adfb5ecb7beafdce7f5a Mon Sep 17 00:00:00 2001 +From 2d831847295ee74ba01318b405037ed3a21c896c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 29 Apr 2020 17:25:56 +0100 -Subject: [PATCH 0778/1148] media: i2c: ov5647: Set V4L2_SUBDEV_FL_HAS_EVENTS +Subject: [PATCH 0775/1209] media: i2c: ov5647: Set V4L2_SUBDEV_FL_HAS_EVENTS flag The ov5647 subdev can generate control events, therefore set @@ -413705,10 +413566,10 @@ index 02d72feb837e..c012e0b3d68b 100644 2.18.4 -From ccc82502dcb80d891f89a401003f8afedcc6af32 Mon Sep 17 00:00:00 2001 +From d8f046d7b8f0086842cbaaeeb71f4222ea340646 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 29 Apr 2020 21:39:58 +0100 -Subject: [PATCH 0779/1148] media: i2c: ov5647: Add support for V4L2_CID_VBLANK +Subject: [PATCH 0776/1209] media: i2c: ov5647: Add support for V4L2_CID_VBLANK Adds vblank control to allow for frame rate control. @@ -413916,10 +413777,10 @@ index c012e0b3d68b..445a0ce186ec 100644 2.18.4 -From 1e9bc0164179f9291cd5b6691421c65284825c78 Mon Sep 17 00:00:00 2001 +From ce7c2162f5a8019199b4c2e44cb50c4c9f07b693 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 29 Apr 2020 21:47:25 +0100 -Subject: [PATCH 0780/1148] media: i2c: ov5647: Neither analogue gain nor +Subject: [PATCH 0777/1209] media: i2c: ov5647: Neither analogue gain nor exposure need EXECUTE_ON_WRITE The controls for analogue gain and exposure were defined with @@ -413980,10 +413841,10 @@ index 445a0ce186ec..49247711221c 100644 2.18.4 -From bcbaf82091d324c10b3d3437bce349c6ddfc15f5 Mon Sep 17 00:00:00 2001 +From 2db3a684f55444c5ba9bce52d1e568715a6aa057 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 29 Apr 2020 22:11:01 +0100 -Subject: [PATCH 0781/1148] media: i2c: ov5647: Use member names in mode tables +Subject: [PATCH 0778/1209] media: i2c: ov5647: Use member names in mode tables To make adding new members to the mode structures easier, use the member names in the initialisers. @@ -414097,10 +413958,10 @@ index 49247711221c..da4ef30d8f32 100644 2.18.4 -From ec2a4239d85c5c1d266e41830ad2597fa283f078 Mon Sep 17 00:00:00 2001 +From bbf6210c6495948b30dcb721ad9b9f40157b58cb Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 30 Apr 2020 11:03:00 +0100 -Subject: [PATCH 0782/1148] media: i2c: ov5647: Advertise the correct exposure +Subject: [PATCH 0779/1209] media: i2c: ov5647: Advertise the correct exposure range Exposure is clipped by the VTS of the mode, so needs to be updated as @@ -414222,10 +414083,10 @@ index da4ef30d8f32..6d84d2785f74 100644 2.18.4 -From 59728feaa9f0fb35929d179362a2215f557f20bd Mon Sep 17 00:00:00 2001 +From 760c9cb0696cbabd8be09147044d1c3b16271a15 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 20 Apr 2020 11:01:21 +0100 -Subject: [PATCH 0783/1148] media: i2c: imx219: Declare that the driver can +Subject: [PATCH 0780/1209] media: i2c: imx219: Declare that the driver can create events The flag V4L2_SUBDEV_FL_HAS_EVENTS is required if the subdev can @@ -414255,10 +414116,10 @@ index 988ebf6dd895..b84fc19e9ff7 100644 2.18.4 -From 5f9f95dd06b9b31f4a732d4cf21c7431a6b5f00d Mon Sep 17 00:00:00 2001 +From 46d0fd7237b831e41044bcbf64d646bea942a2af Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 29 Apr 2020 16:45:02 +0100 -Subject: [PATCH 0784/1148] media: bcm2835-unicam: Add support for +Subject: [PATCH 0781/1209] media: bcm2835-unicam: Add support for VIDIOC_[S|G]_SELECTION Sensors are now reflecting cropping and scaling parameters through @@ -414343,10 +414204,10 @@ index 2e022c5e1cfd..f94a790ca315 100644 2.18.4 -From fc006be25fcf0974d2a3f501543ed969c6fc88d6 Mon Sep 17 00:00:00 2001 +From 87ee9556f6771b28f24693bed9a25990f286a06a Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 29 Apr 2020 22:05:09 +0100 -Subject: [PATCH 0785/1148] media: bcm2835-unicam: Do not stop streaming in +Subject: [PATCH 0782/1209] media: bcm2835-unicam: Do not stop streaming in unicam_release unicam_release calls _vb2_fop_release, which will call stop_streaming @@ -414377,10 +414238,10 @@ index f94a790ca315..e7c0e91cb841 100644 2.18.4 -From 6ce8298ea1117c2057d2ea410035d0939282d8bf Mon Sep 17 00:00:00 2001 +From 8b6b02041bc062a763891c1ddc6e7658385a587e Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 30 Apr 2020 09:52:50 +0100 -Subject: [PATCH 0786/1148] media: bcm2835-unicam: Fix reference counting in +Subject: [PATCH 0783/1209] media: bcm2835-unicam: Fix reference counting in unicam_open The reference counting of node->open was only incremented after @@ -414421,10 +414282,10 @@ index e7c0e91cb841..5b5585f6770c 100644 2.18.4 -From 7c6208aeab9fe7a0eebf35d3665ce1a8eac1dcd1 Mon Sep 17 00:00:00 2001 +From 57b2563888cb825664b2b904556f4e4d0627ea29 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Fri, 1 May 2020 14:15:24 +0100 -Subject: [PATCH 0787/1148] staging: vc04_services: ISP: Add enum_framesizes +Subject: [PATCH 0784/1209] staging: vc04_services: ISP: Add enum_framesizes ioctl This is used to enumerate available frame sizes on all nodes @@ -414762,10 +414623,10 @@ index ded2be584f95..9d8ccb403480 100644 2.18.4 -From afce9ef6cc546839f640df7cec9f45fbcb7cacf8 Mon Sep 17 00:00:00 2001 +From 89f4947894a4655477dcbeb718064a50f18fd664 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 1 May 2020 14:58:23 +0100 -Subject: [PATCH 0788/1148] SQUASH: spi: Demote SPI_CS_HIGH warning to +Subject: [PATCH 0785/1209] SQUASH: spi: Demote SPI_CS_HIGH warning to KERN_DEBUG This warning is unavoidable from a client's perspective and @@ -414779,10 +414640,10 @@ Signed-off-by: Phil Elwell 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c -index 571ef41edb83..9a1983f81435 100644 +index 46568c47ecfb..f9453df24b86 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -3070,8 +3070,8 @@ int spi_setup(struct spi_device *spi) +@@ -3126,8 +3126,8 @@ int spi_setup(struct spi_device *spi) if (ctlr->use_gpio_descriptors && ctlr->cs_gpiods && ctlr->cs_gpiods[spi->chip_select] && !(spi->mode & SPI_CS_HIGH)) { @@ -414797,10 +414658,10 @@ index 571ef41edb83..9a1983f81435 100644 2.18.4 -From d51b93b815adf6a8acfa2d8b261216632b72fde6 Mon Sep 17 00:00:00 2001 +From 91ec1b95d6d3519a3c395a9be4ec7afd16cb1edb Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 4 Apr 2019 13:33:47 +0100 -Subject: [PATCH 0789/1148] bcm2835-dma: Add proper 40-bit DMA support +Subject: [PATCH 0786/1209] bcm2835-dma: Add proper 40-bit DMA support BCM2711 has 4 DMA channels with a 40-bit address range, allowing them to access the full 4GB of memory on a Pi 4. @@ -415603,10 +415464,10 @@ index 1e5d6f1bed4e..53346d7eb66c 100644 2.18.4 -From 867aedb90fdbe6a79b2834cdd6951f1b22e19c82 Mon Sep 17 00:00:00 2001 +From 9a3f9ce8de720d88c41ba87f28d80998f18e75ae Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 30 Apr 2020 12:43:05 +0100 -Subject: [PATCH 0790/1148] ARM: dts: bcm2711: Allow 40-bit DMA for SPI +Subject: [PATCH 0787/1209] ARM: dts: bcm2711: Allow 40-bit DMA for SPI Add the spi_dma4 DT parameter to enable use of the 40-bit DMA channels to drive SPI. Note that there are only 3-4 40-bit channels available, @@ -415651,10 +415512,10 @@ index ece3d3143643..505f37235473 100644 2.18.4 -From bcee15807f14b38e0f659ab4e0e671e7e9cba02d Mon Sep 17 00:00:00 2001 +From 3822bd0e0950fd310d9e4abb0954c7bd95977f41 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 1 May 2020 17:56:13 +0100 -Subject: [PATCH 0791/1148] overlays: Make the i2c-gpio overlay safe again +Subject: [PATCH 0788/1209] overlays: Make the i2c-gpio overlay safe again Like many overlays, the i2c-gpio overlay goes to efforts to avoid generating warnings about #address-cells and #size-cells not @@ -415689,10 +415550,10 @@ index e94053b55610..39e7bc5fa9d8 100644 2.18.4 -From c651e6efc695e2c35fb00972a83fd400755bcab2 Mon Sep 17 00:00:00 2001 +From 3cbe0c80d23e5bfd8132fc9dcd75b15a9129dd85 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 1 May 2020 17:49:08 +0100 -Subject: [PATCH 0792/1148] staging: vc04_services: isp: Remove duplicated +Subject: [PATCH 0789/1209] staging: vc04_services: isp: Remove duplicated initialisation With the codec code from which this was derived, the driver had to @@ -415757,10 +415618,10 @@ index 6c4405ab4dc5..edb1a27328de 100644 2.18.4 -From c218d40d493377e9ce3413056fa9f0e7ea35ae72 Mon Sep 17 00:00:00 2001 +From e78652d8006f2377f6fb2dffed8c326dfaa5e240 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 1 May 2020 16:54:20 +0100 -Subject: [PATCH 0793/1148] staging: vc04_services: isp: Make all references to +Subject: [PATCH 0790/1209] staging: vc04_services: isp: Make all references to bcm2835_isp_fmt const The array of potential formats and their configuration should be const. @@ -415913,10 +415774,10 @@ index 9d8ccb403480..af3bde152bb2 100644 2.18.4 -From 8e4f81f15b3a2cd00c64828d9ffe0f1c1b14fb1e Mon Sep 17 00:00:00 2001 +From 319b7e44825b2162b9a61f3b85068c5c80dd03f8 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Sat, 2 May 2020 13:43:06 +0100 -Subject: [PATCH 0794/1148] overlays: gpio-keys: Avoid open-drain warnings +Subject: [PATCH 0791/1209] overlays: gpio-keys: Avoid open-drain warnings The i2c-gpio driver expects to use a GPIO in open-drain mode. Failure to configure it in that way causes alarming warnings in the kernel log. @@ -415948,10 +415809,10 @@ index 39e7bc5fa9d8..def139db8bcb 100644 2.18.4 -From cd8e7503387887b3bad93d254b8d17b04f8f8863 Mon Sep 17 00:00:00 2001 +From 7f0249d5c9313b4dfdff2892d14994bc3c2ced42 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 4 May 2020 11:06:04 +0100 -Subject: [PATCH 0795/1148] configs: Add missing PPS configs +Subject: [PATCH 0792/1209] configs: Add missing PPS configs The arm64 bcm2711_defconfig was inexplicably missing three PPS config options. Add them, along with another missing option from @@ -415995,10 +415856,10 @@ index f6c12a7a04be..751f6efda9f1 100644 2.18.4 -From a3ce09722c978538ed403c74466e6c09369ffb6b Mon Sep 17 00:00:00 2001 +From fa5b3995bb6bafeebd46f7560ff6489233ddd209 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 4 May 2020 13:38:39 +0100 -Subject: [PATCH 0796/1148] configs: Add missing TOUCHSCREEN_RASPBERRYPI_FW=m +Subject: [PATCH 0793/1209] configs: Add missing TOUCHSCREEN_RASPBERRYPI_FW=m The 32- and 64-bit bcm2711 defconfigs are missing support for the official Raspberry Pi touchscreen. @@ -416041,10 +415902,10 @@ index d626405a9199..7c362f4355c5 100644 2.18.4 -From 8e12343871c162bdb7423d350d1393a6d1c6bd3f Mon Sep 17 00:00:00 2001 +From 61cd9c2331dbe92346046a2f480fc6f843845d8b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 6 Apr 2020 17:07:31 +0100 -Subject: [PATCH 0797/1148] vc4_hdmi_phy: Fix typo in phy_get_cp_current +Subject: [PATCH 0794/1209] vc4_hdmi_phy: Fix typo in phy_get_cp_current This is stored in a 6-bit register field which causes a WARN @@ -416070,10 +415931,10 @@ index 732d8a0e5a1c..0e242f87db9e 100644 2.18.4 -From 7aca24c9467ebb5da186af302fe47fe3d1485579 Mon Sep 17 00:00:00 2001 +From cd0d61cba67077910fb266da903fff38e783f4c0 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 4 May 2020 15:13:24 +0100 -Subject: [PATCH 0798/1148] overlays: Make use of intra-overlay fragments +Subject: [PATCH 0795/1209] overlays: Make use of intra-overlay fragments The firmware and runtime overlay support has recently been updated to correctly process fragments that target other fragments within the @@ -416170,10 +416031,10 @@ index b380d925f0a5..4fc571c2db33 100644 2.18.4 -From a075e36ba6f3666ff60119eba356464dc9d271c3 Mon Sep 17 00:00:00 2001 +From 8b6b4886ee65e602ee50d659364356877ef9daa9 Mon Sep 17 00:00:00 2001 From: Jacko Dirks Date: Tue, 5 May 2020 14:28:14 +0200 -Subject: [PATCH 0799/1148] media: i2c: tc358743: Fix fallthrough warning +Subject: [PATCH 0796/1209] media: i2c: tc358743: Fix fallthrough warning Signed-off-by: Jacko Dirks --- @@ -416181,10 +416042,10 @@ Signed-off-by: Jacko Dirks 1 file changed, 1 insertion(+) diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c -index ad9f7e833243..68aa716c14ba 100644 +index 01e255aede50..73caf8609a7e 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c -@@ -2002,6 +2002,7 @@ static int tc358743_probe_of(struct tc358743_state *state) +@@ -2004,6 +2004,7 @@ static int tc358743_probe_of(struct tc358743_state *state) switch (bps_pr_lane) { default: dev_warn(dev, "untested bps per lane: %u bps\n", bps_pr_lane); @@ -416196,10 +416057,10 @@ index ad9f7e833243..68aa716c14ba 100644 2.18.4 -From 570f7a9303c540001d359ff7d7616ea30a65a29d Mon Sep 17 00:00:00 2001 +From 3f237be9b8757ac6baac5c80247c9cfd9da489f7 Mon Sep 17 00:00:00 2001 From: Jacko Dirks Date: Tue, 5 May 2020 14:33:31 +0200 -Subject: [PATCH 0800/1148] media: bcm2835: unicam: Fix uninitialized warning +Subject: [PATCH 0797/1209] media: bcm2835: unicam: Fix uninitialized warning Signed-off-by: Jacko Dirks --- @@ -416223,10 +416084,10 @@ index 5b5585f6770c..6fd1b0939a07 100644 2.18.4 -From 41bd926b0f5e6cc741026cefaf79b56ee1666736 Mon Sep 17 00:00:00 2001 +From c2eb7df55aa37d93234cc4d1680a59e19795bc87 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 5 May 2020 19:45:41 +0100 -Subject: [PATCH 0801/1148] video: bcm2708_fb: Disable FB if no displays found +Subject: [PATCH 0798/1209] video: bcm2708_fb: Disable FB if no displays found If the firmware hasn't detected a display, the driver would assume one display was available, but because it had failed to retrieve the @@ -416263,10 +416124,10 @@ index 8234207b1914..d035fa59c269 100644 2.18.4 -From d56522379f1cceaf2e8c514627a9a4b5ccf72cb3 Mon Sep 17 00:00:00 2001 +From 0fdc46759e183babc187c7eddc0f75f32bdfb442 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 6 May 2020 14:25:20 +0100 -Subject: [PATCH 0802/1148] overlays: sc16is752-spi1: Add xtal parameter +Subject: [PATCH 0799/1209] overlays: sc16is752-spi1: Add xtal parameter The other sc16is75x overlays have an xtal parameter to allow a different crystal frequency to be specified, but sc16is752-spi1 @@ -416309,10 +416170,10 @@ index 4e33b14afc78..131d3ab43d3a 100644 2.18.4 -From 7d007d5570a22a4ec902e42b03ef531d5341b21d Mon Sep 17 00:00:00 2001 +From c6de8202f392051c3f8af51240e8cc4b48873595 Mon Sep 17 00:00:00 2001 From: Dom Cobley Date: Thu, 7 May 2020 18:16:07 +0100 -Subject: [PATCH 0803/1148] vc4_hdmi: Fix register offset when sending longer +Subject: [PATCH 0800/1209] vc4_hdmi: Fix register offset when sending longer CEC messages Signed-off-by: Dom Cobley @@ -416357,10 +416218,10 @@ index 2919549b227f..7b5421d24871 100644 2.18.4 -From 96588fa57950fccb8662721466676dbfbde0be36 Mon Sep 17 00:00:00 2001 +From 0c4885290e21b9ef288b36bd5acbea9274c36b2e Mon Sep 17 00:00:00 2001 From: Dom Cobley Date: Thu, 7 May 2020 18:16:07 +0100 -Subject: [PATCH 0804/1148] vc4_hdmi: Fix up CEC registers +Subject: [PATCH 0801/1209] vc4_hdmi: Fix up CEC registers Fix an incorrect register address, add a missing one and reorder into address order @@ -416406,10 +416267,10 @@ index ea948ffaa69b..a0fa082a017c 100644 2.18.4 -From 1c435d4f65652ee4be244a9c5478a68aa8e4b9a0 Mon Sep 17 00:00:00 2001 +From e3ee18d2fa2535ee499f1e37c78e3ec85f018fb2 Mon Sep 17 00:00:00 2001 From: Dom Cobley Date: Thu, 7 May 2020 18:16:07 +0100 -Subject: [PATCH 0805/1148] vc4_hdmi_regs: Add Intr2 register block +Subject: [PATCH 0802/1209] vc4_hdmi_regs: Add Intr2 register block Signed-off-by: Dom Cobley --- @@ -416569,10 +416430,10 @@ index a0fa082a017c..7311a8c0f1e5 100644 2.18.4 -From 01e5c4f3ed005c55b73769dd92052dfcba6aabde Mon Sep 17 00:00:00 2001 +From ba9603c6db49032ddcf51606f7d4ae0333cf1ea3 Mon Sep 17 00:00:00 2001 From: Dom Cobley Date: Thu, 7 May 2020 18:16:08 +0100 -Subject: [PATCH 0806/1148] vc4_hdmi_regs: Make interrupt mask variant specific +Subject: [PATCH 0803/1209] vc4_hdmi_regs: Make interrupt mask variant specific Signed-off-by: Dom Cobley --- @@ -416680,10 +416541,10 @@ index 78809866097c..4d017572a5c2 100644 2.18.4 -From 64e6c6516768be1c4018d0cd778184d4283a2803 Mon Sep 17 00:00:00 2001 +From 7bf894b3e0031fa4df9b6978edc16aa61d199543 Mon Sep 17 00:00:00 2001 From: Dom Cobley Date: Thu, 7 May 2020 18:16:08 +0100 -Subject: [PATCH 0807/1148] vc4_hdmi: Make irq shared +Subject: [PATCH 0804/1209] vc4_hdmi: Make irq shared Signed-off-by: Dom Cobley --- @@ -416708,10 +416569,10 @@ index 9f6b260a7238..7b9d98fe2e3e 100644 2.18.4 -From 7cef5890c1a01047eabcdf97dc1e9a2da3f3ae76 Mon Sep 17 00:00:00 2001 +From e046044b6f5c3a0755c5eb1ebaaa670ac5b3e16d Mon Sep 17 00:00:00 2001 From: Dom Cobley Date: Thu, 7 May 2020 18:16:08 +0100 -Subject: [PATCH 0808/1148] vc4_hdmi: Adjust CEC ref clock based on its input +Subject: [PATCH 0805/1209] vc4_hdmi: Adjust CEC ref clock based on its input clock 2711 uses a fixed 27MHz input, earlier models use the HSM clock @@ -416805,10 +416666,10 @@ index 7765b9cf885b..dbf96a3b01ee 100644 2.18.4 -From 05b29090e1fbcdb53a815ebe00d2b849ed34388c Mon Sep 17 00:00:00 2001 +From 28d3dcf8f35e8e7d5d0acd2788bc9f07df494b0e Mon Sep 17 00:00:00 2001 From: Dom Cobley Date: Thu, 7 May 2020 18:16:09 +0100 -Subject: [PATCH 0809/1148] vc4_hdmi: Remove cec_available flag as always +Subject: [PATCH 0806/1209] vc4_hdmi: Remove cec_available flag as always supported Signed-off-by: Dom Cobley @@ -416857,10 +416718,10 @@ index dbf96a3b01ee..60f7bf99e06e 100644 2.18.4 -From 9015d8384a49a32b85e8ba38919e4173d4b07b79 Mon Sep 17 00:00:00 2001 +From e1bc3f94c09264be7892a1b2b56c90676a049bc8 Mon Sep 17 00:00:00 2001 From: Dom Cobley Date: Thu, 7 May 2020 18:16:09 +0100 -Subject: [PATCH 0810/1148] config: Enable CONFIG_DRM_VC4_HDMI_CEC +Subject: [PATCH 0807/1209] config: Enable CONFIG_DRM_VC4_HDMI_CEC Signed-off-by: Dom Cobley --- @@ -416896,10 +416757,10 @@ index 7c362f4355c5..35afa6b6ffd6 100644 2.18.4 -From 6ceb7874dd5497975bbb8f5e3a304456fa1a4ab9 Mon Sep 17 00:00:00 2001 +From f224a0ec3f8bedcd5757f3959a1620afb2e0ac33 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 May 2020 11:55:45 +0100 -Subject: [PATCH 0811/1148] overlays: tc358743: Use intra-overlay fragments +Subject: [PATCH 0808/1209] overlays: tc358743: Use intra-overlay fragments The tc358743 overlay was written using a workaround to a problem with fragments that target other fragments, but this had the unfortunate @@ -416957,10 +416818,10 @@ index f8c059827234..b317e088b37e 100644 2.18.4 -From d7c16e91ab930c6abc03690f0ee1cb7a63baa237 Mon Sep 17 00:00:00 2001 +From c9cdadcfcd361c64b938f14a50f77782cb567deb Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 May 2020 15:12:21 +0100 -Subject: [PATCH 0812/1148] overlays: Move "fixed-clock" nodes to the root +Subject: [PATCH 0809/1209] overlays: Move "fixed-clock" nodes to the root Apart from some special cases, device objects are only created for nodes if they are children of a bus or the root node. "fixed-clock" @@ -417311,10 +417172,10 @@ index b317e088b37e..2ea99cd9e1a1 100644 2.18.4 -From 85948ecf82a669f80abd6795c27d2bbf8c93aa59 Mon Sep 17 00:00:00 2001 +From 657a7d1e53328986e8ab9a102f0a959b35da0843 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 12 May 2020 08:32:42 +0100 -Subject: [PATCH 0813/1148] raspberrypi: dts: Switch to discrete ALSA devices +Subject: [PATCH 0810/1209] raspberrypi: dts: Switch to discrete ALSA devices Add the command line options required to enable audio over discrete ALSA devices. @@ -417411,10 +417272,10 @@ index 86dd3093e709..05220fa0202b 100644 2.18.4 -From 5e19d1ac494cd29d88b28eef4c5f1e199fbdf97f Mon Sep 17 00:00:00 2001 +From 53411386bfd3b8102e47e5c39d71e46dc5872625 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Thu, 7 May 2020 15:50:54 +0100 -Subject: [PATCH 0814/1148] dt-bindings: media: i2c: Add IMX477 CMOS sensor +Subject: [PATCH 0811/1209] dt-bindings: media: i2c: Add IMX477 CMOS sensor binding Add YAML device tree binding for IMX477 CMOS image sensor. @@ -417548,10 +417409,10 @@ index 000000000000..0994e13e67f6 2.18.4 -From 638eaf9de442e0b4437440c842554dd88eabdd52 Mon Sep 17 00:00:00 2001 +From 69d0e8de1e4a1a02ce330b08e8d1e4e30238a74f Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Thu, 7 May 2020 15:50:04 +0100 -Subject: [PATCH 0815/1148] dtoverlays: Add IMX477 sensor overlay +Subject: [PATCH 0812/1209] dtoverlays: Add IMX477 sensor overlay Add an overlay for the Sony IMX477 CMOS sensor device. Also update overlay README and Makefile. @@ -417715,10 +417576,10 @@ index 000000000000..1dd6f92b4dfe 2.18.4 -From a19de33e4851cf8b04f12d8a6b34533395c9b0c6 Mon Sep 17 00:00:00 2001 +From 79a3887b4d0c21b54ebb3f5122efd62fadca474a Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Fri, 8 May 2020 10:00:12 +0100 -Subject: [PATCH 0816/1148] media: i2c: Add driver for Sony IMX477 sensor +Subject: [PATCH 0813/1209] media: i2c: Add driver for Sony IMX477 sensor Adds a driver for the 12MPix Sony IMX477 CSI2 sensor. Whilst the sensor supports 2 or 4 CSI2 data lanes, this driver @@ -419994,10 +419855,10 @@ index 000000000000..ec56b0cfd57b 2.18.4 -From ed60dd316329b66feda84e826d64ab06253496b9 Mon Sep 17 00:00:00 2001 +From 2252978697b39fb681d0ee1a40848d1e0b314ce6 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Fri, 8 May 2020 09:41:17 +0100 -Subject: [PATCH 0817/1148] media: i2c: imx477: Add support for adaptive frame +Subject: [PATCH 0814/1209] media: i2c: imx477: Add support for adaptive frame control Use V4L2_CID_EXPOSURE_AUTO_PRIORITY to control if the driver should @@ -420182,10 +420043,10 @@ index ec56b0cfd57b..bd0e2c291a32 100644 2.18.4 -From fcfe2a46413b7a52a8a43887982b278b9fc672cd Mon Sep 17 00:00:00 2001 +From ba602dfae2e94825385862c01d8aeb769f3c32d0 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Thu, 7 May 2020 15:36:25 +0100 -Subject: [PATCH 0818/1148] configs: Add imx477 sensor driver to all Raspberry +Subject: [PATCH 0815/1209] configs: Add imx477 sensor driver to all Raspberry Pi defconfigs This commit enables the imx477 sensor driver in the following @@ -420269,10 +420130,10 @@ index 751f6efda9f1..efb1b60cbbb6 100644 2.18.4 -From 3f911fad9455256a29e8b64ab4cb9d67c9e68ca4 Mon Sep 17 00:00:00 2001 +From bb8b6625489e697106771e6ebae3c1582e05bec1 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Tue, 26 Nov 2019 15:25:16 +0100 -Subject: [PATCH 0819/1148] udmabuf: Remove deleted map/unmap handlers. +Subject: [PATCH 0816/1209] udmabuf: Remove deleted map/unmap handlers. Commit 19d32ace8b6acebc45da1ea748000ac79ccc7721 upstream. @@ -420327,10 +420188,10 @@ index 9635897458a0..9de539c1def4 100644 2.18.4 -From 22e9256d091d8daa6d826bba88dc8d8ff83b97dd Mon Sep 17 00:00:00 2001 +From 6b8a29893bc0f263a2978e5c1492413f15e1aa08 Mon Sep 17 00:00:00 2001 From: Gurchetan Singh Date: Mon, 2 Dec 2019 17:36:24 -0800 -Subject: [PATCH 0820/1148] udmabuf: use cache_sgt_mapping option +Subject: [PATCH 0817/1209] udmabuf: use cache_sgt_mapping option Commit bc7a71da43b48333f84c6534ab43d240e34cf9eb uptream. @@ -420368,10 +420229,10 @@ index 9de539c1def4..be15eb6b0586 100644 2.18.4 -From 3f608d82865b675f549203dab61d64d797a11c47 Mon Sep 17 00:00:00 2001 +From 33420b72931a046322619e587911b8022e8a38e2 Mon Sep 17 00:00:00 2001 From: Gurchetan Singh Date: Mon, 2 Dec 2019 17:36:25 -0800 -Subject: [PATCH 0821/1148] udmabuf: add a pointer to the miscdevice in dma-buf +Subject: [PATCH 0818/1209] udmabuf: add a pointer to the miscdevice in dma-buf private data Commit c1bbed668997268c9edccdc9db1bd1487d9e20b0 upstream. @@ -420441,10 +420302,10 @@ index be15eb6b0586..f0bf3ba7441e 100644 2.18.4 -From 15494fb9cf6d4f414af1c48fa715ef9b5d88a7f0 Mon Sep 17 00:00:00 2001 +From 695a89c5cf3568140c4db1dc1b1f94a7960e151d Mon Sep 17 00:00:00 2001 From: Gurchetan Singh Date: Mon, 2 Dec 2019 17:36:26 -0800 -Subject: [PATCH 0822/1148] udmabuf: separate out creating/destroying +Subject: [PATCH 0819/1209] udmabuf: separate out creating/destroying scatter-table Commit 17a7ce203490459cff14fb1c8f9a15d65fd1c544 upstream. @@ -420518,10 +420379,10 @@ index f0bf3ba7441e..0a610e09ae23 100644 2.18.4 -From 09c389c71fabf934c61cee34cbe61b4ff4be483d Mon Sep 17 00:00:00 2001 +From 83657d56553c0ec93261e15681824611d05cd311 Mon Sep 17 00:00:00 2001 From: Gurchetan Singh Date: Mon, 2 Dec 2019 17:36:27 -0800 -Subject: [PATCH 0823/1148] udmabuf: implement begin_cpu_access/end_cpu_access +Subject: [PATCH 0820/1209] udmabuf: implement begin_cpu_access/end_cpu_access hooks Commit 284562e1f34874e267d4f499362c3816f8f6bc3f upstream. @@ -420614,10 +420475,10 @@ index 0a610e09ae23..61b0a2cff874 100644 2.18.4 -From bbc0dcfc0d5c0727f79dd730ee8b4d9c20946709 Mon Sep 17 00:00:00 2001 +From d8ef8ee27a5b1c838831465746b9e020d3ddce10 Mon Sep 17 00:00:00 2001 From: Gurchetan Singh Date: Tue, 17 Dec 2019 15:02:28 -0800 -Subject: [PATCH 0824/1148] udmabuf: fix dma-buf cpu access +Subject: [PATCH 0821/1209] udmabuf: fix dma-buf cpu access Commit 1ffe09590121fbb3786d6c860acdd200f7ab095c upstream. @@ -420680,10 +420541,10 @@ index 61b0a2cff874..acb26c627d27 100644 2.18.4 -From 11f6bc3c355e1d61f3966a7e3d3854e6eb68ee48 Mon Sep 17 00:00:00 2001 +From a4d431548ef6a0644861482ab8c4200053ea5ea7 Mon Sep 17 00:00:00 2001 From: "Andrew F. Davis" Date: Tue, 3 Dec 2019 17:26:37 +0000 -Subject: [PATCH 0825/1148] dma-buf: Add dma-buf heaps framework +Subject: [PATCH 0822/1209] dma-buf: Add dma-buf heaps framework Commit c02a81fba74fe3488ad6b08bfb5a1329005418f8 upstream. This framework allows a unified userspace interface for dma-buf @@ -421224,10 +421085,10 @@ index 000000000000..73e7f66c1cae 2.18.4 -From f32d974cd2c14bafaa980edc1ac6a442629dfb48 Mon Sep 17 00:00:00 2001 +From 1d67079598459c3d5925a35cc787ff8de68773b3 Mon Sep 17 00:00:00 2001 From: John Stultz Date: Tue, 3 Dec 2019 17:26:38 +0000 -Subject: [PATCH 0826/1148] dma-buf: heaps: Add heap helpers +Subject: [PATCH 0823/1209] dma-buf: heaps: Add heap helpers Commit 5248eb12fea890a03b4cdc3ef546d6319d4d9b73 upstream. @@ -421633,10 +421494,10 @@ index 000000000000..805d2df88024 2.18.4 -From 07b5e9334da2fc2cf0b49de49978e226bbbc705e Mon Sep 17 00:00:00 2001 +From 2275f2d9d200dfa5da84f75025453e3d61e48dd6 Mon Sep 17 00:00:00 2001 From: John Stultz Date: Tue, 3 Dec 2019 17:26:39 +0000 -Subject: [PATCH 0827/1148] dma-buf: heaps: Add system heap to dmabuf heaps +Subject: [PATCH 0824/1209] dma-buf: heaps: Add system heap to dmabuf heaps Commit efa04fefebbd724ffda7f49e42d057a7217c45b0 upstream. @@ -421847,10 +421708,10 @@ index 000000000000..1aa01e98c595 2.18.4 -From 6c8e815b40074248b42a54841babeac1fb0d743b Mon Sep 17 00:00:00 2001 +From 38e11bb7b7e1eaa80e53109ac993252d024b7c24 Mon Sep 17 00:00:00 2001 From: John Stultz Date: Tue, 3 Dec 2019 17:26:40 +0000 -Subject: [PATCH 0828/1148] dma-buf: heaps: Add CMA heap to dmabuf heaps +Subject: [PATCH 0825/1209] dma-buf: heaps: Add CMA heap to dmabuf heaps Commit b61614ec318aae0c77ecd2816878d851dd61d9a6 upstream. @@ -422109,10 +421970,10 @@ index 000000000000..626cf7fd033a 2.18.4 -From 6ed4e19b56ea68e31ad7cd296d8a10b823cb5fa8 Mon Sep 17 00:00:00 2001 +From 7fb76773b72baf3c3feebf322e301463de8d7474 Mon Sep 17 00:00:00 2001 From: John Stultz Date: Tue, 3 Dec 2019 17:26:41 +0000 -Subject: [PATCH 0829/1148] kselftests: Add dma-heap test +Subject: [PATCH 0826/1209] kselftests: Add dma-heap test Commit a8779927fd86c91f5400bfcbccfa018a667d8350 upstream. @@ -422572,10 +422433,10 @@ index 000000000000..3e53ad331bdc 2.18.4 -From 62ebd22e907d51380e4e64620a57620e56fd6d4e Mon Sep 17 00:00:00 2001 +From 8768098787000339129ce9595eaf0b0872500029 Mon Sep 17 00:00:00 2001 From: "Andrew F. Davis" Date: Mon, 16 Dec 2019 08:34:04 -0500 -Subject: [PATCH 0830/1148] dma-buf: heaps: Use _IOCTL_ for userspace IOCTL +Subject: [PATCH 0827/1209] dma-buf: heaps: Use _IOCTL_ for userspace IOCTL identifier Commit b3b4346544b571c96d46be615b9db69a601ce4c8 upstream. @@ -422651,10 +422512,10 @@ index 3e53ad331bdc..cd5e1f602ac9 100644 2.18.4 -From d5342eb7029d3d9ce34363df85e4a7d8af8512a0 Mon Sep 17 00:00:00 2001 +From 1b3924c007fa42c80d23d5a89cf16778b2376ab4 Mon Sep 17 00:00:00 2001 From: "Andrew F. Davis" Date: Mon, 16 Dec 2019 08:34:05 -0500 -Subject: [PATCH 0831/1148] dma-buf: heaps: Remove redundant heap identifier +Subject: [PATCH 0828/1209] dma-buf: heaps: Remove redundant heap identifier from system heap name The heaps are already in a directory of heaps, adding _heap to a heap @@ -422685,10 +422546,10 @@ index 1aa01e98c595..0bf688e3c023 100644 2.18.4 -From 9d28c99f084277922cdde96331d0824fc155a378 Mon Sep 17 00:00:00 2001 +From edd07563c08f0c753325248e7230c5cabd594ded Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Mon, 16 Dec 2019 16:10:59 +0000 -Subject: [PATCH 0832/1148] dma-buf: fix resource leak on -ENOTTY error return +Subject: [PATCH 0829/1209] dma-buf: fix resource leak on -ENOTTY error return path Commit f9d3b2c600075d1f79efcd5cdb1718c2f554c0f9 upstream. @@ -422725,10 +422586,10 @@ index a24721496114..1886aee46131 100644 2.18.4 -From 959645c3110bf817731ebddeefd8b99cee7ff740 Mon Sep 17 00:00:00 2001 +From e4954a75aef26be2351162b050387044efdad66f Mon Sep 17 00:00:00 2001 From: zhong jiang Date: Wed, 18 Dec 2019 00:38:22 +0530 -Subject: [PATCH 0833/1148] dma-heap: Make the symbol 'dma_heap_ioctl_cmds' +Subject: [PATCH 0830/1209] dma-heap: Make the symbol 'dma_heap_ioctl_cmds' static Commit 7d411afe8444060454a53b1f9b70ee78b3e75ef1 upstream. @@ -422765,10 +422626,10 @@ index 1886aee46131..afd22c9dbdcf 100644 2.18.4 -From 6cebf54b74ab334e4db1da6a600096d5525a14d7 Mon Sep 17 00:00:00 2001 +From 3c8825a75ad43c450d7ab6179ce2937e0b1f096e Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 8 May 2020 20:44:12 +0100 -Subject: [PATCH 0834/1148] defconfig: Add CMA and system dma-heaps to the +Subject: [PATCH 0831/1209] defconfig: Add CMA and system dma-heaps to the config The CMA dma-heap allocator can be used in place of vcsm-cma @@ -422857,10 +422718,10 @@ index efb1b60cbbb6..1f037a5bd4ef 100644 2.18.4 -From 29a071f628ef5c76d7de779874115b24aeb83f94 Mon Sep 17 00:00:00 2001 +From 054ff7be6e64271741d605436b1e2983c54bd667 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 6 May 2020 17:02:26 +0100 -Subject: [PATCH 0835/1148] ARM: dts: Enable firmware-clocks on all Pis +Subject: [PATCH 0832/1209] ARM: dts: Enable firmware-clocks on all Pis Signed-off-by: Phil Elwell --- @@ -422888,10 +422749,10 @@ index bf90fd585364..d2f5ea1f31f8 100644 2.18.4 -From 4e89fefee56146fea57f84ea14fc3234599cdb33 Mon Sep 17 00:00:00 2001 +From e95777c6b6bc13559ee7a698eed8f552ee2bfdab Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 12 May 2020 17:17:45 +0100 -Subject: [PATCH 0836/1148] configs: Include the firmware-clocks driver +Subject: [PATCH 0833/1209] configs: Include the firmware-clocks driver Signed-off-by: Phil Elwell --- @@ -422940,10 +422801,10 @@ index 1f037a5bd4ef..f546bc80c8b1 100644 2.18.4 -From f86620dc9318ae607d384b9a1c2e12f9c11f62e4 Mon Sep 17 00:00:00 2001 +From cf6f4d6132ed479ca47056940a84d49c75872a69 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 12 May 2020 17:18:28 +0100 -Subject: [PATCH 0837/1148] configs: Use the upstream cpufreq driver +Subject: [PATCH 0834/1209] configs: Use the upstream cpufreq driver Switch to the upstream cpufreq driver on non-BCM2835 Pis. @@ -422998,10 +422859,10 @@ index f546bc80c8b1..05a9f0ef9508 100644 2.18.4 -From 81c89347c96129091129cfd0b4d80dcf0747172d Mon Sep 17 00:00:00 2001 +From 8ab7d5ae2077f0bc590650971b6df9efa6578121 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 13 May 2020 18:28:27 +0100 -Subject: [PATCH 0838/1148] media: bcm2835-unicam: Always service interrupts +Subject: [PATCH 0835/1209] media: bcm2835-unicam: Always service interrupts From when bringing up the driver, there was a check in the isr to ignore interrupts (claiming them handled) should the driver @@ -423055,10 +422916,10 @@ index 6fd1b0939a07..aadc2ab6ec91 100644 2.18.4 -From f3c7215a53f21f8cfd26e1ba34faa2ec2b66a358 Mon Sep 17 00:00:00 2001 +From 40cfaa8073903803cb46ad9b7180dc9c6dc946dc Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 13 May 2020 20:10:15 +0100 -Subject: [PATCH 0839/1148] sc16is7xx: Fix for hardware flow control +Subject: [PATCH 0836/1209] sc16is7xx: Fix for hardware flow control The SC16IS7XX hardware flow control is mishandled by the driver in a number of ways: @@ -423131,10 +422992,10 @@ index fe486498530d..7eda5b1eb1d9 100644 2.18.4 -From 3979b7338be701337ddd7ffddd424eef76bb877b Mon Sep 17 00:00:00 2001 +From 3fd50cec2fca2d200b552e02f8cc24fb3d3a3b89 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 14 May 2020 14:44:15 +0100 -Subject: [PATCH 0840/1148] drm/vc4: Fix VIC usage with Broadcast RGB +Subject: [PATCH 0837/1209] drm/vc4: Fix VIC usage with Broadcast RGB Adding the Broadcast RGB range selection broke the VIC field of the AVI infoframes on HDMI, zeroing them for all @@ -423195,10 +423056,10 @@ index 6701cd3a0249..25a1f066e62c 100644 2.18.4 -From 2308046ce5792f85f9ca738346bd3d10709cb358 Mon Sep 17 00:00:00 2001 +From bb376be2237a29ac38d51d4c8a1d7c573d8a1a30 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 15 May 2020 13:42:10 +0100 -Subject: [PATCH 0841/1148] staging: vc04_services: mmal-vchiq: Update +Subject: [PATCH 0838/1209] staging: vc04_services: mmal-vchiq: Update parameters list Adds in a couple of new MMAL parameter defines. @@ -423229,10 +423090,10 @@ index 9c752db45565..5b596b5c057f 100644 2.18.4 -From 7518cae1c5d1236bb4a7e1947fb3e5a352581a19 Mon Sep 17 00:00:00 2001 +From 5143e67c2df49a62242e9e60abb37021dc6fbde6 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 15 May 2020 13:43:08 +0100 -Subject: [PATCH 0842/1148] staging:vc04_services: bcm2835-codec: Request +Subject: [PATCH 0839/1209] staging:vc04_services: bcm2835-codec: Request headers with I-frame V4L2 wishes to have the codec header bytes in the same buffer as the @@ -423264,10 +423125,10 @@ index 50395795c3db..3c819e251513 100644 2.18.4 -From 1942a687486578610085d760be8a370bc83b151a Mon Sep 17 00:00:00 2001 +From 14a361455980dcdd6ab4973e0675ea03d0b418c9 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 15 May 2020 13:47:13 +0100 -Subject: [PATCH 0843/1148] staging:vc04_services: bcm2835-codec: Avoid +Subject: [PATCH 0840/1209] staging:vc04_services: bcm2835-codec: Avoid fragmenting buffers The firmware by default is quite happy to fragment encoded @@ -423302,10 +423163,10 @@ index 3c819e251513..1c7fbba6c9c8 100644 2.18.4 -From 165e7e59b521fa602cb00e092861ff6ce5c713ad Mon Sep 17 00:00:00 2001 +From ef076f3fe66455dc5d65721d116a8787ec963753 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 15 May 2020 13:48:59 +0100 -Subject: [PATCH 0844/1148] staging:vc04_services: bcm2835-camera: Request +Subject: [PATCH 0841/1209] staging:vc04_services: bcm2835-camera: Request headers with I-frame V4L2 wishes to have the codec header bytes in the same buffer as the @@ -423338,10 +423199,10 @@ index e69ec072c2c7..b7214741fa61 100644 2.18.4 -From 9a71e6ca1f492736139eeaaf8b6ca6a173a90b3a Mon Sep 17 00:00:00 2001 +From 4802f593699fd9db6913485f9279cade87f706a5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 15 May 2020 17:18:20 +0100 -Subject: [PATCH 0845/1148] configs: Restore missing NF_TABLES settings +Subject: [PATCH 0842/1209] configs: Restore missing NF_TABLES settings The arm bcm2711_defconfig and the arm64 bcmrpi3_defconfig have been missing their NF_TABLES settings. Restore them. @@ -423502,10 +423363,10 @@ index 05a9f0ef9508..da5a47b18b19 100644 2.18.4 -From 1e82429381603c8f2912f370e77f6a33d89ecd63 Mon Sep 17 00:00:00 2001 +From ef8d8bac962dd33fefc6b4ef0de318aad2b4e809 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 18 May 2020 09:46:48 +0100 -Subject: [PATCH 0846/1148] overlays: Fix audio parameter of vc4-kms-v3d +Subject: [PATCH 0843/1209] overlays: Fix audio parameter of vc4-kms-v3d The CMA handling change broke the audio parameter - the fragment numbering has changed - so fix it. @@ -423533,10 +423394,10 @@ index b40aa1d8f432..caa64bfb95a7 100644 2.18.4 -From dd9e1e24000f37f7b81fe772fcc1cb013f176fab Mon Sep 17 00:00:00 2001 +From 5514de6ee458d5205e8a19b985253263d0e54c7d Mon Sep 17 00:00:00 2001 From: j-schambacher Date: Tue, 19 May 2020 13:56:17 +0200 -Subject: [PATCH 0847/1148] Switch to snd_soc_dai_set_bclk_ratio Replaces +Subject: [PATCH 0844/1209] Switch to snd_soc_dai_set_bclk_ratio Replaces obsolete function snd_soc_dai_set_tdm_slot Signed-off-by: Joerg Schambacher @@ -423577,10 +423438,10 @@ index ffa76014e7df..a7fab4d951b6 100644 2.18.4 -From f557e53f6b1a18b5ec908b7fd2b1d3744bd1bc4c Mon Sep 17 00:00:00 2001 +From 9a0a238be7fdee2c055beec94df5892b0da02207 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 19 May 2020 11:46:47 +0100 -Subject: [PATCH 0848/1148] media: bcm2835-unicam: Retain packing information +Subject: [PATCH 0845/1209] media: bcm2835-unicam: Retain packing information on G_FMT The change to retrieve the pixel format always on g_fmt didn't @@ -423631,10 +423492,10 @@ index aadc2ab6ec91..c4e7d2177193 100644 2.18.4 -From a11074d8de5b936d4ada17f9dee69b771cb04245 Mon Sep 17 00:00:00 2001 +From e75aa7824d48dee0ec314af86e93488514b07aa3 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 19 May 2020 15:47:02 +0100 -Subject: [PATCH 0849/1148] zswap: Uncross module parameter setting functions +Subject: [PATCH 0846/1209] zswap: Uncross module parameter setting functions The "compressor" and "zpool" parameters of the zswap module each has a custom setter function that calls __zswap_param_set with specific @@ -423674,10 +423535,10 @@ index 46a322316e52..b0fc8d9ffe1f 100644 2.18.4 -From e8835d3af12ffb84afbb0ac17586b54c15fb2f6f Mon Sep 17 00:00:00 2001 +From 0b69be5b51ddd4597b4d5812115393f22ee01b5b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 5 May 2020 15:23:32 +0100 -Subject: [PATCH 0850/1148] zswap: Defer zswap initialisation +Subject: [PATCH 0847/1209] zswap: Defer zswap initialisation Enabling zswap support in the kernel configuration costs about 1.5MB of RAM, even when zswap is not enabled at runtime. This cost can be @@ -423795,10 +423656,10 @@ index b0fc8d9ffe1f..a347f8df45c1 100644 2.18.4 -From 3a74a545ad8dc9da09ec3c54a81ea44132c7162f Mon Sep 17 00:00:00 2001 +From 47a5ab025390a2d2d579a21b0bc7f6b1280d8421 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 5 May 2020 15:25:06 +0100 -Subject: [PATCH 0851/1148] configs: Add ZSWAP=y, ZBUD=m, Z3FOLD=m +Subject: [PATCH 0848/1209] configs: Add ZSWAP=y, ZBUD=m, Z3FOLD=m Signed-off-by: Phil Elwell --- @@ -423883,10 +423744,10 @@ index da5a47b18b19..4b232432e240 100644 2.18.4 -From 44b5e87dbfa6677f8400c812f9d2167360add216 Mon Sep 17 00:00:00 2001 +From aa109cae2d5ad10b2e236840668c609d47831902 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 19 May 2020 14:54:28 +0100 -Subject: [PATCH 0852/1148] drm/vc4: Adopt the dma configuration from the HVS +Subject: [PATCH 0849/1209] drm/vc4: Adopt the dma configuration from the HVS or V3D component vc4_drv isn't necessarily under the /soc node in DT as it is a @@ -423904,7 +423765,7 @@ Signed-off-by: Dave Stevenson 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c -index f45cad62214a..4a7004729a8a 100644 +index 68f9db6c4c87..82fd80547bb1 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -249,6 +249,14 @@ static void vc4_match_add_drivers(struct device *dev, @@ -423943,10 +423804,10 @@ index f45cad62214a..4a7004729a8a 100644 2.18.4 -From 6e8811e43f4b7f550a0e3a827af4a378f3bd8d97 Mon Sep 17 00:00:00 2001 +From fa52099f701a1d7a2e8853f773c7bc13586490b1 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 19 May 2020 16:20:30 +0100 -Subject: [PATCH 0853/1148] drm/vc4: Add FKMS as an acceptable node for dma +Subject: [PATCH 0850/1209] drm/vc4: Add FKMS as an acceptable node for dma ranges. Under FKMS, the firmware (via FKMS) also requires the VideoCore cache @@ -423961,7 +423822,7 @@ Signed-off-by: Dave Stevenson 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c -index 4a7004729a8a..cbab26d18342 100644 +index 82fd80547bb1..2e1b2e51aff0 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -251,6 +251,7 @@ static void vc4_match_add_drivers(struct device *dev, @@ -423976,10 +423837,10 @@ index 4a7004729a8a..cbab26d18342 100644 2.18.4 -From 186e474682a1f7bcb9ca2cec5ab0c032781dcf9e Mon Sep 17 00:00:00 2001 +From 24c0bf03349104623e741bd9495e0f591b5945d0 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Tue, 19 May 2020 16:56:33 +0100 -Subject: [PATCH 0854/1148] media: i2c: imx477: Return correct result on sensor +Subject: [PATCH 0851/1209] media: i2c: imx477: Return correct result on sensor id verification The test should return -EIO if the register read id does not match @@ -424007,10 +423868,10 @@ index bd0e2c291a32..e42a8633087d 100644 2.18.4 -From 6164dab0f021cd2b5265eb6819bf279bfb9ea34b Mon Sep 17 00:00:00 2001 +From fef852dd2d53ceed50518e7521895a3e2fe51af0 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 20 May 2020 16:36:33 +0100 -Subject: [PATCH 0855/1148] staging: vchiq_arm: Clean up 40-bit DMA support +Subject: [PATCH 0852/1209] staging: vchiq_arm: Clean up 40-bit DMA support Manage the split between addresses for the VPU and addresses for the 40-bit DMA controller with a dedicated DMA device pointer that on non- @@ -424169,10 +424030,10 @@ index d01c2d424310..d55f038637fc 100644 2.18.4 -From 7b89aa9c97d23596ee3af1b2a559612085b15301 Mon Sep 17 00:00:00 2001 +From 535c9eae72da11da2c66885ae0cb236248bbfc93 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 20 May 2020 16:36:57 +0100 -Subject: [PATCH 0856/1148] ARM: dts: Update for new VCHIQ BCM2711 DMA support +Subject: [PATCH 0853/1209] ARM: dts: Update for new VCHIQ BCM2711 DMA support Now that the enhanced BCM2711 DMA controller is located by compatible string and used directly for generating bulk transfer addresses, @@ -424242,10 +424103,10 @@ index 2c55c78bd7cb..46bcfd586f17 100644 2.18.4 -From 826391f236d1f11e81a8b9d36a9cfdc2c84449a9 Mon Sep 17 00:00:00 2001 +From 84e85ed90b17a86ed02a6712400c3dec7158ea6b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 25 May 2020 21:52:40 +0100 -Subject: [PATCH 0857/1148] Revert "zswap: Uncross module parameter setting +Subject: [PATCH 0854/1209] Revert "zswap: Uncross module parameter setting functions" This reverts commit e5e8a2214dff0c43580afc5dc22d496f667c3bbf. @@ -424277,10 +424138,10 @@ index a347f8df45c1..232f4565e795 100644 2.18.4 -From befa49fefe9b6f743f0831facbb2fdb2078f382c Mon Sep 17 00:00:00 2001 +From 092b9af02a5b1e5bb668c11e1825fd56815c31ef Mon Sep 17 00:00:00 2001 From: David Plowman Date: Thu, 28 May 2020 11:09:48 +0100 -Subject: [PATCH 0858/1148] media: bcm2835-unicam: change minimum number of +Subject: [PATCH 0855/1209] media: bcm2835-unicam: change minimum number of vb2_queue buffers to 1 Since the unicam driver was modified to write to a dummy buffer when no @@ -424311,10 +424172,10 @@ index c4e7d2177193..47b2d3a03fbf 100644 2.18.4 -From 162e03be00d718ce5e5a8a118261aba3291d6528 Mon Sep 17 00:00:00 2001 +From 126bfedb857a651b51b96d7595f927cb94e6a254 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Mon, 13 Jan 2020 19:56:15 +0100 -Subject: [PATCH 0859/1148] dt-bindings: Add Broadcom AVS RO thermal +Subject: [PATCH 0856/1209] dt-bindings: Add Broadcom AVS RO thermal Commit ee31ff373da6602e7a4e60fe11322b41ac38eb22 upstream. @@ -424388,10 +424249,10 @@ index 000000000000..98e7b57bfa13 2.18.4 -From d0f6274517ab4a59fc2372c9a6b2b6eed7d5d077 Mon Sep 17 00:00:00 2001 +From 48bfc4337c2258a9259c29d0158d69edbf5f8e68 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Mon, 13 Jan 2020 19:56:16 +0100 -Subject: [PATCH 0860/1148] thermal: Add BCM2711 thermal driver +Subject: [PATCH 0857/1209] thermal: Add BCM2711 thermal driver Commit 59b781352dc4cb9ae27a8ddae0cda979d29d8af7 upstream. @@ -424572,10 +424433,10 @@ index 000000000000..67c2a737bc9d 2.18.4 -From cc2af0c97fe9fd6f66b207ba302f5bf2cac85626 Mon Sep 17 00:00:00 2001 +From 27bcf6680327ec8f3e0b1c36e109c3714a0fb34d Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Mon, 13 Jan 2020 19:56:17 +0100 -Subject: [PATCH 0861/1148] ARM: dts: bcm2711: Enable thermal +Subject: [PATCH 0858/1209] ARM: dts: bcm2711: Enable thermal Commit a1d6989bf12b01cd9198e2c31a96678ac9c47415 upstream. @@ -424627,10 +424488,10 @@ index 96ef133391d1..20114a723cf9 100644 2.18.4 -From 17e4791c3424f02a8da95e000ba365b6f72b1b0e Mon Sep 17 00:00:00 2001 +From c6edb606fe37ef007de431b8b1cf05db3fa91aac Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Mon, 13 Jan 2020 19:56:18 +0100 -Subject: [PATCH 0862/1148] ARM: configs: Build BCM2711 thermal as module +Subject: [PATCH 0859/1209] ARM: configs: Build BCM2711 thermal as module Commit 1a90e73248c4d0add6583bd88bb5e082c3e090bc upstream. @@ -424676,10 +424537,10 @@ index c9a867ac32d4..4486777c7f86 100644 2.18.4 -From 3d45cf55246eda6a719c0e3ce7ed8dfc8b5649fb Mon Sep 17 00:00:00 2001 +From 928f3197e95f080b40b0ade09d8bea616edd7b85 Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Thu, 14 May 2020 17:24:24 +0800 -Subject: [PATCH 0863/1148] Revert "thermal: brcmstb_thermal: Correct SoC name" +Subject: [PATCH 0860/1209] Revert "thermal: brcmstb_thermal: Correct SoC name" This reverts commit 6642a4f0769be5732fd372a5637fc1b01d62f93a. @@ -424727,10 +424588,10 @@ index 08f71fec5152..7a7c6ad7b8a0 100644 2.18.4 -From d0a84cd85b84300672fcaeabc851bd4539f919a9 Mon Sep 17 00:00:00 2001 +From 0ceb4d77878eacb8ba1b81e416084c03c4525e79 Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Thu, 14 May 2020 17:24:28 +0800 -Subject: [PATCH 0864/1148] Revert "thermal: brcmstb_thermal: Add BCM2838 +Subject: [PATCH 0861/1209] Revert "thermal: brcmstb_thermal: Add BCM2838 support" This reverts commit 9d62448adc918a94fba091d475d0e6f1648c36f4. @@ -424887,10 +424748,10 @@ index 7a7c6ad7b8a0..680f1a070606 100644 2.18.4 -From d7ca82fd2059f43f056512ce74798acd49bc99f9 Mon Sep 17 00:00:00 2001 +From 5e130905419170af8772611a34c9a0884a752de8 Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Thu, 14 May 2020 17:39:30 +0800 -Subject: [PATCH 0865/1148] ARM: dts: bcm2711-rpi: Remove downstream thermal +Subject: [PATCH 0862/1209] ARM: dts: bcm2711-rpi: Remove downstream thermal sensor node Signed-off-by: Chen-Yu Tsai @@ -424934,10 +424795,10 @@ index 46bcfd586f17..05e51a05bf56 100644 2.18.4 -From 9f874adb69e902b58ffcbe7b065697e5482854bf Mon Sep 17 00:00:00 2001 +From eb98775483f6dc065729bf147ca1cc215415e3b5 Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Fri, 15 May 2020 15:38:12 +0800 -Subject: [PATCH 0866/1148] configs: Switch to upstream thermal sensor for RPi +Subject: [PATCH 0863/1209] configs: Switch to upstream thermal sensor for RPi 4 - BCM2711_THERMAL Signed-off-by: Chen-Yu Tsai @@ -424990,10 +424851,10 @@ index 05d721c25d2d..09d3180c9fd9 100644 2.18.4 -From f6a94a28791abe0e7b6dde13e04f627d91821c62 Mon Sep 17 00:00:00 2001 +From 1fb8591aa0506409c4f6da6412667c9f6f015d46 Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Fri, 15 May 2020 15:56:14 +0800 -Subject: [PATCH 0867/1148] configs: Build HWMON core into kernel +Subject: [PATCH 0864/1209] configs: Build HWMON core into kernel To expose thermal regions as hwmon devices, the HWMON core has to be built-in, so that THERMAL_HWMON can be enabled. @@ -425071,10 +424932,10 @@ index 4b232432e240..585a975caf2a 100644 2.18.4 -From db055214ddaacb9cc26bceed5438bf454d15584b Mon Sep 17 00:00:00 2001 +From 38e04d225ba5da1d3effb242014f34d89f8ccd46 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 19 May 2020 09:46:12 +0100 -Subject: [PATCH 0868/1148] brcmfmac: BCM43436 needs dedicated firmware +Subject: [PATCH 0865/1209] brcmfmac: BCM43436 needs dedicated firmware Signed-off-by: Phil Elwell --- @@ -425107,10 +424968,10 @@ index 370301ac248b..ee540d5fd96b 100644 2.18.4 -From b24b1958e9d020e359021df3f296d768b3f3fa26 Mon Sep 17 00:00:00 2001 +From 9e7d7facc58461f001e70e9fbc4830bfc6778d8b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 29 May 2020 14:41:13 +0100 -Subject: [PATCH 0869/1148] overlays: i2c-rtc: Fix trickle-resistor-ohms param +Subject: [PATCH 0866/1209] overlays: i2c-rtc: Fix trickle-resistor-ohms param The abx80x implementation of the trickle-resistor-ohms parameter is missing the ":0" indicating that the target is an integer/cell value. @@ -425139,10 +425000,10 @@ index 5df390b52a7b..24c86974b0db 100644 2.18.4 -From b21ab1c46f8582cc72d74ccea2ef555fbd555885 Mon Sep 17 00:00:00 2001 +From 06b1023243a3eaee01c5118c561954661c52377c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Thu, 30 Apr 2020 19:40:07 +0200 -Subject: [PATCH 0870/1148] overlays: gpio-shutdown: Add information for SysV +Subject: [PATCH 0867/1209] overlays: gpio-shutdown: Add information for SysV init / inittab KeyboardSignal and kb::kbrequest can be used to call /sbin/shutdown @@ -425196,10 +425057,10 @@ index 0a9c9ec6cc8d..2afd499b2808 100644 2.18.4 -From 822baff5f093c1ae9df7082822306b3f352c7736 Mon Sep 17 00:00:00 2001 +From ef6b20865d5d17d81a878eb953448e271e158fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Thu, 30 Apr 2020 19:41:10 +0200 -Subject: [PATCH 0871/1148] overlays: gpio-shutdown: Add information for +Subject: [PATCH 0868/1209] overlays: gpio-shutdown: Add information for Raspberry Pi 1 Model B rev 1 Raspberry Pi 1 Model B rev 1 uses GPIO1 for power-up instead of GPIO3. @@ -425266,10 +425127,10 @@ index db07ba67781d..0a27595143ec 100644 2.18.4 -From abc61ea47b114a3c2dc3e473e99b78494415a8af Mon Sep 17 00:00:00 2001 +From 731045dd7f2c663bb69023495d7f4afa867cd033 Mon Sep 17 00:00:00 2001 From: bjorn Date: Thu, 7 May 2020 05:11:43 +0200 -Subject: [PATCH 0872/1148] overlays: Add spi0 overlay to support sc16is752 +Subject: [PATCH 0869/1209] overlays: Add spi0 overlay to support sc16is752 Signed-off-by: Bjorn --- @@ -425364,10 +425225,10 @@ index 000000000000..ccce7ad599bc 2.18.4 -From 1a4b72ab0f781026ddc24afb138d2f1be5410fb6 Mon Sep 17 00:00:00 2001 +From d9744f260b45838013c57c2be32d02f039381bd3 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Sun, 24 Nov 2019 16:40:48 -0600 -Subject: [PATCH 0873/1148] net: rtl8192cu: fix gcc misleading whitespace +Subject: [PATCH 0870/1209] net: rtl8192cu: fix gcc misleading whitespace warning This fixes a gcc warning about misleading whitespace. @@ -425413,10 +425274,10 @@ index 8fa8ed51b721..bdd9c73cba3f 100755 2.18.4 -From ad133bb720720761b0aa9b5a3bb0dda75ca02337 Mon Sep 17 00:00:00 2001 +From 4c1143b0b3c6ec3170c3314a98abe5d1de941b21 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 29 May 2020 16:55:12 +0100 -Subject: [PATCH 0874/1148] overlays: i2c-rtc-gpio: Fix trickle-resistor-ohms +Subject: [PATCH 0871/1209] overlays: i2c-rtc-gpio: Fix trickle-resistor-ohms param The abx80x implementation of the trickle-resistor-ohms parameter is @@ -425446,10 +425307,10 @@ index 44df77459520..125bd77fff0a 100644 2.18.4 -From 1324722615f69880e2deab0d6cca01a4aa4340c5 Mon Sep 17 00:00:00 2001 +From d1ac7c67c64eb6a2e9fe08ab25892364b4c6e039 Mon Sep 17 00:00:00 2001 From: David Plowman Date: Fri, 29 May 2020 14:36:56 +0100 -Subject: [PATCH 0875/1148] media: bcm2835-isp: fix bytes per line calculations +Subject: [PATCH 0872/1209] media: bcm2835-isp: fix bytes per line calculations for some image formats The bytes per line numbers calculated by get_bytesperline was not @@ -425534,10 +425395,10 @@ index af3bde152bb2..40ca0f6e9c97 100644 2.18.4 -From 9c9bb39096774d7338d22a6a68d272c023bfe76b Mon Sep 17 00:00:00 2001 +From 99e4bb9933e5f30bd103bcc0ecf7acb5fcc0e8e9 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Mon, 1 Jun 2020 07:02:00 -0400 -Subject: [PATCH 0876/1148] Add Micro Crystal RV-1805 to i2c-rtc overlays +Subject: [PATCH 0873/1209] Add Micro Crystal RV-1805 to i2c-rtc overlays While the RV-1805 is supported by the rtc-abx80x driver via auto-detection, in order for it to be initialized properly @@ -425711,10 +425572,10 @@ index 24c86974b0db..df59d93cd759 100644 2.18.4 -From 2feb2c9261f6fc168cf057cd9f24f77fc22cdba3 Mon Sep 17 00:00:00 2001 +From 147e2bebd879761b76ab7a6ad02b6f9ba6711b87 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 2 Jun 2020 10:06:05 +0100 -Subject: [PATCH 0877/1148] configs: Add SND_SOC_MAX98357A=m +Subject: [PATCH 0874/1209] configs: Add SND_SOC_MAX98357A=m Enable the MAX98357A driver. @@ -425801,10 +425662,10 @@ index 585a975caf2a..c82e163a095c 100644 2.18.4 -From 9a3f51fa6364d71f097f91ef7c9cf8bd5fb5e0de Mon Sep 17 00:00:00 2001 +From 48bba38d2dbe6f026fba52b286d439a3adba71ec Mon Sep 17 00:00:00 2001 From: Dom Cobley Date: Tue, 2 Jun 2020 19:31:49 +0100 -Subject: [PATCH 0878/1148] vc4: Set driver_name for card +Subject: [PATCH 0875/1209] vc4: Set driver_name for card Allows use of the same alsa conf file for hdmi1 @@ -425829,10 +425690,10 @@ index 093f424ad5b4..4ba7add2737f 100644 2.18.4 -From f56f9b80ca44040597f0c1e12f254046e78b15ab Mon Sep 17 00:00:00 2001 +From 07781a6b4d6ededabd128d8f29c1456b1b48cb8a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 4 Jun 2020 17:23:36 +0100 -Subject: [PATCH 0879/1148] staging: vchiq_arm: Use g_dma_dev for dma_unmap_sg +Subject: [PATCH 0876/1209] staging: vchiq_arm: Use g_dma_dev for dma_unmap_sg Commit "staging: vchiq_arm: Clean up 40-bit DMA support" failed to change one of the calls to dma_unmap_sg to pass in g_dma_dev (rather @@ -425862,10 +425723,10 @@ index d6a6ca9e06ec..b396fed96f3f 100644 2.18.4 -From b7333588427a9705b054d7a0a0a81c54b3d64d0b Mon Sep 17 00:00:00 2001 +From 913328765c81d9698f5fd71899f42efc2c3f0b36 Mon Sep 17 00:00:00 2001 From: Dom Cobley Date: Wed, 3 Jun 2020 12:20:19 +0100 -Subject: [PATCH 0880/1148] vc4: cec: Restore cec physical address on reconnect +Subject: [PATCH 0877/1209] vc4: cec: Restore cec physical address on reconnect Currently we call cec_phys_addr_invalidate on a hotplug deassert. That may be due to a TV power cycling, or an AVR being switched @@ -425924,10 +425785,10 @@ index 4ba7add2737f..5aa5236e576d 100644 2.18.4 -From 58e675207f998723d2da6e014960d614842460de Mon Sep 17 00:00:00 2001 +From 6c290cb8e056245152ce84cd59a1830145aba9c3 Mon Sep 17 00:00:00 2001 From: Hristo Venev Date: Fri, 5 Jun 2020 09:22:49 +0000 -Subject: [PATCH 0881/1148] snd_bcm2835: disable HDMI audio when vc4 is used +Subject: [PATCH 0878/1209] snd_bcm2835: disable HDMI audio when vc4 is used (#3640) Things don't work too well when both the vc4 driver and the firmware @@ -426028,10 +425889,10 @@ index 2f465dba54bf..a53c39d1bbaa 100644 2.18.4 -From 23eab954a3ce1889bbaa26c97f640b60df038f43 Mon Sep 17 00:00:00 2001 +From f1a6989c7b9d7dfc2c014d38c3c922e1b71c7da8 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 5 Jun 2020 16:06:59 +0100 -Subject: [PATCH 0882/1148] Revert "overlays: gpio-keys: Avoid open-drain +Subject: [PATCH 0879/1209] Revert "overlays: gpio-keys: Avoid open-drain warnings" This reverts commit 907e08e6e70dd557a1f5cd03ef28492ffebffb08. @@ -426056,10 +425917,10 @@ index def139db8bcb..39e7bc5fa9d8 100644 2.18.4 -From 2a4e71e0eea64d560e82d157db335cd8e08bbfd5 Mon Sep 17 00:00:00 2001 +From 497424726e00c881117694ecfaa714f5856fe6d7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 5 Jun 2020 16:07:07 +0100 -Subject: [PATCH 0883/1148] overlays: i2c-gpio: Avoid open-drain warnings +Subject: [PATCH 0880/1209] overlays: i2c-gpio: Avoid open-drain warnings The i2c-gpio driver expects to use a GPIO in open-drain mode. Failure to configure it in that way causes alarming warnings in the kernel log. @@ -426159,10 +426020,10 @@ index 23813369093a..227e3c0fa1cd 100644 2.18.4 -From a8c2bd72459813f2c7dbdadc3f4c1f0dc293b6c1 Mon Sep 17 00:00:00 2001 +From 4d24930f277e309a1d9ff64054c558b55bd9b093 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 5 Jun 2020 16:18:52 +0100 -Subject: [PATCH 0884/1148] overlays: Update upstream overlays after +Subject: [PATCH 0881/1209] overlays: Update upstream overlays after vc4-kms-v3d change Signed-off-by: Phil Elwell @@ -426209,10 +426070,10 @@ index 428aa5dcc38f..30130f09fbc6 100644 2.18.4 -From 96714ee238f47238c5bd964b464372ccdac855b3 Mon Sep 17 00:00:00 2001 +From c3d3ba76f860dd20ca7f3e1feefd4e58509e57f8 Mon Sep 17 00:00:00 2001 From: Akira Shimahara Date: Mon, 11 May 2020 22:35:35 +0200 -Subject: [PATCH 0885/1148] w1_therm: adding code comments and code reordering +Subject: [PATCH 0882/1209] w1_therm: adding code comments and code reordering commit 92b8d2724464bc1d2e735a84c0da5741dce33485 upstream. @@ -426795,10 +426656,10 @@ index e028e0092799..1234916daaa8 100644 2.18.4 -From 6dcc0ed5004da65a36425e6d271f56d85460f4da Mon Sep 17 00:00:00 2001 +From 7d281522c4eaa6ae182d004bd3e7ea84f17413dc Mon Sep 17 00:00:00 2001 From: Akira Shimahara Date: Mon, 11 May 2020 22:36:10 +0200 -Subject: [PATCH 0886/1148] w1_therm: fix reset_select_slave during discovery +Subject: [PATCH 0883/1209] w1_therm: fix reset_select_slave during discovery commit c8ad65f6fbfdcb9b620674ef456020eef2bfeb36 upstream. @@ -426950,10 +426811,10 @@ index 1234916daaa8..aa5678369c0b 100644 2.18.4 -From 85b941140df4239ccb73e249e3c5707dcd8c3eda Mon Sep 17 00:00:00 2001 +From 35ca7c9c1540402f7a7e5cd32931181d6c0f321e Mon Sep 17 00:00:00 2001 From: Akira Shimahara Date: Mon, 11 May 2020 22:36:50 +0200 -Subject: [PATCH 0887/1148] w1_therm: adding ext_power sysfs entry +Subject: [PATCH 0884/1209] w1_therm: adding ext_power sysfs entry commit b7bb6ca17a90f47c2fe2848531b5bbaf27a65ba7 upstream. @@ -427252,10 +427113,10 @@ index aa5678369c0b..932a0738b52a 100644 2.18.4 -From f751d72636242bab10b622002a720ac37ab1c354 Mon Sep 17 00:00:00 2001 +From 7db087f1c23c140e35a08fc189e752cc4eac9442 Mon Sep 17 00:00:00 2001 From: Akira Shimahara Date: Mon, 11 May 2020 22:37:08 +0200 -Subject: [PATCH 0888/1148] w1_therm: adding resolution sysfs entry +Subject: [PATCH 0885/1209] w1_therm: adding resolution sysfs entry commit 308bdb94de0c1abe7eac5193f58638b8aeaddf4b upstream. @@ -427973,10 +427834,10 @@ index 932a0738b52a..7ab8a141ce6e 100644 2.18.4 -From 1b50f4cfebe5a225281afecb1c65b531993fca68 Mon Sep 17 00:00:00 2001 +From 0dff67f1ca8ca8b09c1a998bdda6d846dc1abbbf Mon Sep 17 00:00:00 2001 From: Akira Shimahara Date: Mon, 11 May 2020 22:37:25 +0200 -Subject: [PATCH 0889/1148] w1_therm: adding eeprom sysfs entry +Subject: [PATCH 0886/1209] w1_therm: adding eeprom sysfs entry commit 45d457a4cf24455eefd076a01a3d86414fc2ff1e upstream. @@ -428353,10 +428214,10 @@ index 7ab8a141ce6e..1ba07b0833fa 100644 2.18.4 -From 056bbbf9216c40bb9d2870be2c811eb3dd930f11 Mon Sep 17 00:00:00 2001 +From a027411d98f2e526b9835c9ec5cf10ad4d791ac2 Mon Sep 17 00:00:00 2001 From: Akira Shimahara Date: Mon, 11 May 2020 22:37:42 +0200 -Subject: [PATCH 0890/1148] w1_therm: optimizing temperature read timings +Subject: [PATCH 0887/1209] w1_therm: optimizing temperature read timings commit 67b392f7b8edfa6f427fecd98722acab34c1c99f upstream. @@ -428889,10 +428750,10 @@ index 1ba07b0833fa..5a81ce2a4e74 100644 2.18.4 -From 2a07771efcb9e892a6a17ffc885125e4e8dee48f Mon Sep 17 00:00:00 2001 +From f3d132ec1f82c858492e4d300ff9b237228d2d00 Mon Sep 17 00:00:00 2001 From: Akira Shimahara Date: Mon, 11 May 2020 22:38:01 +0200 -Subject: [PATCH 0891/1148] w1_therm: adding alarm sysfs entry +Subject: [PATCH 0888/1209] w1_therm: adding alarm sysfs entry commit e2c94d6f572079511945e64537eb1218643f2e68 upstream. @@ -429216,10 +429077,10 @@ index 5a81ce2a4e74..825536196e61 100644 2.18.4 -From 8c570fe6399c6fbd69c9d156ae01072476c75648 Mon Sep 17 00:00:00 2001 +From 86ebea8c3661add9417bc2cf41a7589cdd2017b2 Mon Sep 17 00:00:00 2001 From: Akira Shimahara Date: Mon, 11 May 2020 22:38:20 +0200 -Subject: [PATCH 0892/1148] w1_therm: adding bulk read support to trigger +Subject: [PATCH 0889/1209] w1_therm: adding bulk read support to trigger multiple conversion on bus commit 57c76221d5af648c8355a55c09b050c5d8d38189 upstream. @@ -429813,10 +429674,10 @@ index 825536196e61..cc4b88056b33 100644 2.18.4 -From d39cdf8c6120a77bad493170c4bf688a6e8c4b23 Mon Sep 17 00:00:00 2001 +From cf43aeb400caa63da20f36009063902643d6fc74 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 20 May 2020 15:00:19 +0300 -Subject: [PATCH 0893/1148] w1_therm: Free the correct variable +Subject: [PATCH 0890/1209] w1_therm: Free the correct variable commit e420637b81f78d0fbacf539bdb1b341eba602aea upstream. @@ -429860,10 +429721,10 @@ index cc4b88056b33..a6c85e486671 100644 2.18.4 -From 1feb0f8130dfb5921f4ab138110b76d515750fbd Mon Sep 17 00:00:00 2001 +From 71725821ad29e3da0aa0b255506a505da78227e0 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Tue, 19 May 2020 16:45:53 +0100 -Subject: [PATCH 0894/1148] w1_therm: remove redundant assignments to variable +Subject: [PATCH 0891/1209] w1_therm: remove redundant assignments to variable ret commit f37d13d52c0560bd2bac40b22466af538e61a5ce upstream. @@ -429924,10 +429785,10 @@ index a6c85e486671..c1b4eda16719 100644 2.18.4 -From 26c93b977bf341fe9ef021dce344e25ad0fa24e0 Mon Sep 17 00:00:00 2001 +From bbef097a7ef8e861df3a4163bf336f4f437f696a Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Thu, 7 May 2020 19:20:20 +0200 -Subject: [PATCH 0895/1148] PCI: brcmstb: Assert fundamental reset on +Subject: [PATCH 0892/1209] PCI: brcmstb: Assert fundamental reset on initialization commit 22e21e51ce755399fd42055a3f668ee4af370881 upstream. @@ -429963,10 +429824,10 @@ index 3a10e678c7f4..9e452c366b26 100644 2.18.4 -From 7286ba3aa7be5bced6d757ac9a8de9e90019c490 Mon Sep 17 00:00:00 2001 +From 4ab74a4f1458ec5cafa1dece1c0348bd721c88d9 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Wed, 10 Jun 2020 16:28:56 +0200 -Subject: [PATCH 0896/1148] clk: rpi: Adjust DT binding to match upstream +Subject: [PATCH 0893/1209] clk: rpi: Adjust DT binding to match upstream Signed-off-by: Maxime Ripard --- @@ -430178,10 +430039,10 @@ index eb1844148af9..c4929416b6d5 100644 2.18.4 -From 691133ebf75ba54a0d67ff4ab6099d0cd5059404 Mon Sep 17 00:00:00 2001 +From 35ce636b48e027059466a9f2335b6550c7a2827a Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Tue, 26 May 2020 14:23:04 +0200 -Subject: [PATCH 0897/1148] clk: bcm: rpi: Add an enum for the firmware clocks +Subject: [PATCH 0894/1209] clk: bcm: rpi: Add an enum for the firmware clocks While the firmware allows us to discover the available clocks, we need to discriminate those clocks to only register the ones meaningful to Linux. @@ -430264,10 +430125,10 @@ index c4929416b6d5..c21d8c7de439 100644 2.18.4 -From 8fd46b8a13c1fa2720a693dc00dd8710336f1206 Mon Sep 17 00:00:00 2001 +From 4f130fc2d7ce69b5794726ef28cbc52116b978ad Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Wed, 27 May 2020 11:13:52 +0200 -Subject: [PATCH 0898/1148] clk: bcm: rpi: Use CCF boundaries instead of +Subject: [PATCH 0895/1209] clk: bcm: rpi: Use CCF boundaries instead of rolling our own The raspberrypi firmware clock driver has a min_rate / max_rate clamping by @@ -430404,10 +430265,10 @@ index c21d8c7de439..70574c937b68 100644 2.18.4 -From d2a0716444ed7f4a991311456209cd7939ecfb07 Mon Sep 17 00:00:00 2001 +From 3b0967aa9fdc436a8ae70bcf7697f2c99ee75a59 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Tue, 26 May 2020 14:30:31 +0200 -Subject: [PATCH 0899/1148] clk: bcm: rpi: Give firmware clocks a name +Subject: [PATCH 0896/1209] clk: bcm: rpi: Give firmware clocks a name We've registered the firmware clocks using their ID as name, but it's much more convenient to register them using their proper name. Since the @@ -430462,10 +430323,10 @@ index 70574c937b68..4f7fe01c1b3b 100644 2.18.4 -From 59ed6b8290ca1d3c8b0a438ec74ba8f1e96d1c01 Mon Sep 17 00:00:00 2001 +From c659020cbe46a444502530b0612865a267207f95 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Tue, 26 May 2020 15:27:35 +0200 -Subject: [PATCH 0900/1148] clk: bcm: rpi: Remove the quirks for the CPU clock +Subject: [PATCH 0897/1209] clk: bcm: rpi: Remove the quirks for the CPU clock The CPU clock has had so far a bunch of quirks to expose the clock tree properly, but since we reverted to exposing them through the MMIO driver, @@ -430675,10 +430536,10 @@ index 4f7fe01c1b3b..c87e3ee58e4b 100644 2.18.4 -From 6451416de972370df10b4c1c0d76441cabbe0a51 Mon Sep 17 00:00:00 2001 +From 2744697913602ae15cc7c38d45d66675e14510c9 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Wed, 10 Jun 2020 16:18:17 +0200 -Subject: [PATCH 0901/1148] clk: rpi: Only register a few firmware clocks +Subject: [PATCH 0898/1209] clk: rpi: Only register a few firmware clocks Signed-off-by: Maxime Ripard --- @@ -430725,10 +430586,10 @@ index c87e3ee58e4b..642622fb77ea 100644 2.18.4 -From d482c36cf6c52111140bbb65cf001d1559933c95 Mon Sep 17 00:00:00 2001 +From 6308f3daff0883c0e31328fb77bc53923f396628 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Wed, 10 Jun 2020 16:29:08 +0200 -Subject: [PATCH 0902/1148] clk: rpi: Fix compatible indentation +Subject: [PATCH 0899/1209] clk: rpi: Fix compatible indentation Signed-off-by: Maxime Ripard --- @@ -430754,10 +430615,10 @@ index 642622fb77ea..cb87980b468e 100644 2.18.4 -From 8a6470dcf22d507d865d2d2a6284a866d64758b4 Mon Sep 17 00:00:00 2001 +From 8fbfb7672be858dccc0ecb86dcccfbebdbd3dccd Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 11 Jun 2020 16:34:00 +0100 -Subject: [PATCH 0903/1148] SQUASH: dts: Fix firmware clocks support +Subject: [PATCH 0900/1209] SQUASH: dts: Fix firmware clocks support Commit [1] touched a lot of files and still missed some platforms. In particular, Pi 2 was left with no clock scaling. Simplify the @@ -430956,10 +430817,10 @@ index 73e1290616e4..925cb37c22f0 100644 2.18.4 -From c94e4b67403bdea6374961c450b6baf128ca151f Mon Sep 17 00:00:00 2001 +From c547e3cc5b616bba0420a62d681548d4e6a92d61 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 2 Jun 2020 17:19:51 +0100 -Subject: [PATCH 0904/1148] ARM: dts: Add bcm2711-rpi-cm4.dts +Subject: [PATCH 0901/1209] ARM: dts: Add bcm2711-rpi-cm4.dts Add initial DTS file for Compute Module 4. @@ -431598,10 +431459,10 @@ index 3c38fbe71886..073d7dadcc95 100644 2.18.4 -From e038b8b6bf4a6a364564d438faeebf691d589756 Mon Sep 17 00:00:00 2001 +From 93b79a57c24d4e7f707155c95905e916c0f307f9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 11 Jun 2020 09:57:03 +0100 -Subject: [PATCH 0905/1148] PCI: brcmstb: Add DT property to control L1SS +Subject: [PATCH 0902/1209] PCI: brcmstb: Add DT property to control L1SS The BRCM PCIe block has controls to enable control of the CLKREQ# signal by the L1SS, and to gate the refclk with the CLKREQ# input. @@ -431683,10 +431544,10 @@ index 9e452c366b26..1e0a94778856 100644 2.18.4 -From 6f174d12911744f9f2e562893063022c72496679 Mon Sep 17 00:00:00 2001 +From abcb0c4b7710d100a5098eee8665c33f06693468 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 11 Jun 2020 11:22:38 +0100 -Subject: [PATCH 0906/1148] ARM: dts: Set brcm,enable-l1ss for CM4 +Subject: [PATCH 0903/1209] ARM: dts: Set brcm,enable-l1ss for CM4 Enable the PCIE L1SS on Compute Module 4. It's possible that this is also the right thing to do for Pi 4, but it has been working as is @@ -431716,104 +431577,10 @@ index f616d3f23f14..2ea54b92fbca 100644 2.18.4 -From 99a4486a573af5c9c91b07ef5b99ca3ca0209e3b Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Tue, 16 Jun 2020 10:23:03 +0100 -Subject: [PATCH 0907/1148] Revert "SQUASH: Fix spi driver compiler warnings" - -This reverts commit fe3f696b7e5229678ae45d1293e97b5ecc00c245. - -See: https://github.com/raspberrypi/linux/pull/3687 ---- - drivers/spi/spi-bcm2835.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c -index dc759de7124b..c2e7a2dbbcc7 100644 ---- a/drivers/spi/spi-bcm2835.c -+++ b/drivers/spi/spi-bcm2835.c -@@ -1230,6 +1230,8 @@ static int bcm2835_spi_setup(struct spi_device *spi) - { - struct spi_controller *ctlr = spi->controller; - struct bcm2835_spi *bs = spi_controller_get_devdata(ctlr); -+ struct gpio_chip *chip; -+ enum gpio_lookup_flags lflags; - u32 cs; - - /* --- -2.18.4 - - -From 203d3aa177bae6af6f5d0bbb291fd018df589107 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Tue, 16 Jun 2020 10:23:29 +0100 -Subject: [PATCH 0908/1148] Revert "spi: spi-bcm2835: Disable forced software - CS" - -This reverts commit 2697f0186db346176832b8eb79adaf5c874681e8. - -See: https://github.com/raspberrypi/linux/pull/3687 ---- - drivers/spi/spi-bcm2835.c | 37 +++++++++++++++++++++++++++++++++++++ - 1 file changed, 37 insertions(+) - -diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c -index c2e7a2dbbcc7..9dccfbaa2e1d 100644 ---- a/drivers/spi/spi-bcm2835.c -+++ b/drivers/spi/spi-bcm2835.c -@@ -1283,6 +1283,43 @@ static int bcm2835_spi_setup(struct spi_device *spi) - return -EINVAL; - } - -+ /* -+ * Translate native CS to GPIO -+ * -+ * FIXME: poking around in the gpiolib internals like this is -+ * not very good practice. Find a way to locate the real problem -+ * and fix it. Why is the GPIO descriptor in spi->cs_gpiod -+ * sometimes not assigned correctly? Erroneous device trees? -+ */ -+ -+ /* get the gpio chip for the base */ -+ chip = gpiochip_find("pinctrl-bcm2835", chip_match_name); -+ if (!chip) -+ return 0; -+ -+ /* -+ * Retrieve the corresponding GPIO line used for CS. -+ * The inversion semantics will be handled by the GPIO core -+ * code, so we pass GPIOS_OUT_LOW for "unasserted" and -+ * the correct flag for inversion semantics. The SPI_CS_HIGH -+ * on spi->mode cannot be checked for polarity in this case -+ * as the flag use_gpio_descriptors enforces SPI_CS_HIGH. -+ */ -+ if (of_property_read_bool(spi->dev.of_node, "spi-cs-high")) -+ lflags = GPIO_ACTIVE_HIGH; -+ else -+ lflags = GPIO_ACTIVE_LOW; -+ spi->cs_gpiod = gpiochip_request_own_desc(chip, 8 - spi->chip_select, -+ DRV_NAME, -+ lflags, -+ GPIOD_OUT_LOW); -+ if (IS_ERR(spi->cs_gpiod)) -+ return PTR_ERR(spi->cs_gpiod); -+ -+ /* and set up the "mode" and level */ -+ dev_info(&spi->dev, "setting up native-CS%i to use GPIO\n", -+ spi->chip_select); -+ - return 0; - } - --- -2.18.4 - - -From daf6c525eb06cc7652aee26395a152f755991608 Mon Sep 17 00:00:00 2001 +From 8924925d1dff97dd8c10c7c2ab34bcbbd832d2cf Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 16 Jun 2020 10:23:42 +0100 -Subject: [PATCH 0909/1148] Revert "spi: spi-bcm2835: Re-enable HW CS" +Subject: [PATCH 0904/1209] Revert "spi: spi-bcm2835: Re-enable HW CS" This reverts commit 49b9bd89784e3fa29f143ebf1ac8f125be47b708. @@ -431823,7 +431590,7 @@ See: https://github.com/raspberrypi/linux/pull/3687 1 file changed, 2 insertions(+), 51 deletions(-) diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c -index 9dccfbaa2e1d..6899558fcba2 100644 +index 7ac3563f458b..7b5216461bc4 100644 --- a/drivers/spi/spi-bcm2835.c +++ b/drivers/spi/spi-bcm2835.c @@ -1173,57 +1173,9 @@ static void bcm2835_spi_handle_err(struct spi_controller *ctlr, @@ -431886,7 +431653,7 @@ index 9dccfbaa2e1d..6899558fcba2 100644 } static int bcm2835_spi_setup(struct spi_device *spi) -@@ -1341,7 +1293,6 @@ static int bcm2835_spi_probe(struct platform_device *pdev) +@@ -1328,7 +1280,6 @@ static int bcm2835_spi_probe(struct platform_device *pdev) ctlr->bits_per_word_mask = SPI_BPW_MASK(8); ctlr->num_chipselect = BCM2835_SPI_NUM_CS; ctlr->setup = bcm2835_spi_setup; @@ -431898,10 +431665,10 @@ index 9dccfbaa2e1d..6899558fcba2 100644 2.18.4 -From cecedc07316ab2961d5dc389eacc3b2008523a0c Mon Sep 17 00:00:00 2001 +From 3729ed89548b545f787d755ed3eca8f079af13bc Mon Sep 17 00:00:00 2001 From: Markus Proeller Date: Tue, 16 Jun 2020 13:24:31 +0200 -Subject: [PATCH 0910/1148] media: irs1125: Using i2c_transfer for ic2 reads +Subject: [PATCH 0905/1209] media: irs1125: Using i2c_transfer for ic2 reads Reading data over i2c is done by using i2c_transfer to ensure that this operation can't be interrupted. @@ -431969,10 +431736,10 @@ index 25e1dd5a08ef..6680afea5894 100644 2.18.4 -From f8697351d6a7cfbfb779e8e6ce785971da6c1942 Mon Sep 17 00:00:00 2001 +From 8d4c9788e4186bf8b023f240502a5ec15807096b Mon Sep 17 00:00:00 2001 From: Markus Proeller Date: Tue, 16 Jun 2020 13:27:42 +0200 -Subject: [PATCH 0911/1148] media: irs1125: Refactoring and debug messages +Subject: [PATCH 0906/1209] media: irs1125: Refactoring and debug messages Changed some variable names to comply with checkpatch --strict mode. Debug messages added. @@ -432098,10 +431865,10 @@ index 6680afea5894..289f0c25b141 100644 2.18.4 -From e21242a7ca069e3caf0a7d4480f45d10668faddf Mon Sep 17 00:00:00 2001 +From 3b5dcbe028fcb7a44e2da892153b5276d99a6a92 Mon Sep 17 00:00:00 2001 From: Markus Proeller Date: Tue, 16 Jun 2020 13:31:36 +0200 -Subject: [PATCH 0912/1148] media: irs1125: Atomic access to imager +Subject: [PATCH 0907/1209] media: irs1125: Atomic access to imager reconfiguration Instead of changing the exposure and framerate settings for all sequences, @@ -432487,10 +432254,10 @@ index dccaca23aa76..96d676123d5e 100644 2.18.4 -From 2443ff1da8d3dc3ae949c93bf12660cefeac6f01 Mon Sep 17 00:00:00 2001 +From cdb6155a8b9b345d2a235b0e13f7b35477727d3d Mon Sep 17 00:00:00 2001 From: Markus Proeller Date: Tue, 16 Jun 2020 13:33:56 +0200 -Subject: [PATCH 0913/1148] media: irs1125: Keep HW in sync after imager reset +Subject: [PATCH 0908/1209] media: irs1125: Keep HW in sync after imager reset When closing the video device, the irs1125 is put in power down state. To keep V4L2 ctrls and the HW in sync, v4l2_ctrl_handler_setup is @@ -432674,10 +432441,10 @@ index d59e05004a03..30c3d2640386 100644 2.18.4 -From 794c75572ac3f3b13fbae23a428e1426cc8426fe Mon Sep 17 00:00:00 2001 +From 16278256681bac161d8987e6118f522656fa0f66 Mon Sep 17 00:00:00 2001 From: Maxim Mikityanskiy Date: Sat, 20 Jun 2020 15:40:00 +0300 -Subject: [PATCH 0914/1148] staging: bcm2835-audio: Add missing MODULE_ALIAS +Subject: [PATCH 0909/1209] staging: bcm2835-audio: Add missing MODULE_ALIAS Commit 8353fe6f1e0f ("Revert "staging: bcm2835-audio: Drop DT dependency"") reverts the upstream change and makes bcm2835-audio use @@ -432710,10 +432477,10 @@ index a53c39d1bbaa..b9716f3e264c 100644 2.18.4 -From d11af5072bc5143f87cc2e315ba554f12e5818c0 Mon Sep 17 00:00:00 2001 +From 42accf12bc725c410cf056af088ee905445a0d2a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 26 Jun 2020 11:51:05 +0100 -Subject: [PATCH 0915/1148] brcmfmac: Prefer a ccode from OTP over nvram file +Subject: [PATCH 0910/1209] brcmfmac: Prefer a ccode from OTP over nvram file Allow the nvram file to set a default ccode (regulatory domain) without overriding one set in OTP. @@ -432847,10 +432614,10 @@ index 3aed4c4b887a..a926c466706f 100644 2.18.4 -From 8a15c3d3e8732b79a9c267dcdbe6e989137b6c7e Mon Sep 17 00:00:00 2001 +From 110646d1201a6a22b8884f618ffb2c58cc411f1b Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Tue, 16 Jun 2020 16:12:36 +0200 -Subject: [PATCH 0916/1148] media: v4l2-subdev: Introduce [get|set]_mbus_config +Subject: [PATCH 0911/1209] media: v4l2-subdev: Introduce [get|set]_mbus_config pad ops Upstream https://patchwork.linuxtv.org/patch/64669/ @@ -432916,10 +432683,10 @@ index 71f1f2f0da53..ab736577b882 100644 2.18.4 -From 2cbc6ece699017e27f001505fd049a02a4057320 Mon Sep 17 00:00:00 2001 +From 1c86a8249bc206a698e43e98e0c9f0e48aeca17d Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Tue, 16 Jun 2020 16:12:37 +0200 -Subject: [PATCH 0917/1148] media: i2c: Use the new get_mbus_config pad op +Subject: [PATCH 0912/1209] media: i2c: Use the new get_mbus_config pad op Upstream https://patchwork.linuxtv.org/patch/64669/ @@ -433102,10 +432869,10 @@ index 482609665305..0ef5af026d09 100644 static const struct v4l2_subdev_ops ov9640_subdev_ops = { diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c -index 68aa716c14ba..4831f14197b2 100644 +index 73caf8609a7e..b3b8d6e15ea2 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c -@@ -1619,8 +1619,9 @@ static int tc358743_dv_timings_cap(struct v4l2_subdev *sd, +@@ -1621,8 +1621,9 @@ static int tc358743_dv_timings_cap(struct v4l2_subdev *sd, return 0; } @@ -433117,7 +432884,7 @@ index 68aa716c14ba..4831f14197b2 100644 { struct tc358743_state *state = to_state(sd); const u32 mask = V4L2_MBUS_CSI2_LANE_MASK; -@@ -1850,7 +1851,6 @@ static const struct v4l2_subdev_video_ops tc358743_video_ops = { +@@ -1852,7 +1853,6 @@ static const struct v4l2_subdev_video_ops tc358743_video_ops = { .s_dv_timings = tc358743_s_dv_timings, .g_dv_timings = tc358743_g_dv_timings, .query_dv_timings = tc358743_query_dv_timings, @@ -433125,7 +432892,7 @@ index 68aa716c14ba..4831f14197b2 100644 .s_stream = tc358743_s_stream, }; -@@ -1862,6 +1862,7 @@ static const struct v4l2_subdev_pad_ops tc358743_pad_ops = { +@@ -1864,6 +1864,7 @@ static const struct v4l2_subdev_pad_ops tc358743_pad_ops = { .set_edid = tc358743_s_edid, .enum_dv_timings = tc358743_enum_dv_timings, .dv_timings_cap = tc358743_dv_timings_cap, @@ -433169,10 +432936,10 @@ index edad49cebcdf..8ffff67ce2b7 100644 2.18.4 -From 2bcdfdb0534089a23a3416a903fcaef2154e9eb3 Mon Sep 17 00:00:00 2001 +From de92df99bc7f14e5a54ad089c064e2a5c3e7298e Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Tue, 16 Jun 2020 16:12:38 +0200 -Subject: [PATCH 0918/1148] media: i2c: ov6650: Use new [get|set]_mbus_config +Subject: [PATCH 0913/1209] media: i2c: ov6650: Use new [get|set]_mbus_config ops Upstream https://patchwork.linuxtv.org/patch/64674/ @@ -433309,10 +433076,10 @@ index af482620f94a..704064728f55 100644 2.18.4 -From 64d0c29cdf60f6070ecae384b37294ba71f3af15 Mon Sep 17 00:00:00 2001 +From 7deca090e26454dcdb00113351e30fbfce2586fb Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Tue, 16 Jun 2020 16:12:39 +0200 -Subject: [PATCH 0919/1148] media: pxa_camera: Use the new set_mbus_config op +Subject: [PATCH 0914/1209] media: pxa_camera: Use the new set_mbus_config op Upstream https://patchwork.linuxtv.org/patch/64671/ @@ -433598,10 +433365,10 @@ index 8d47ea0c33f8..1200d9991b18 100644 2.18.4 -From 951bb2788d30295742591ffb7167a61d4a191a92 Mon Sep 17 00:00:00 2001 +From 4daad34fb1b3473e31607aebb23aafd4cb7da109 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Tue, 16 Jun 2020 16:12:40 +0200 -Subject: [PATCH 0920/1148] media: v4l2-subdev: Remove [s|g]_mbus_config video +Subject: [PATCH 0915/1209] media: v4l2-subdev: Remove [s|g]_mbus_config video ops Upstream https://patchwork.linuxtv.org/patch/64670/ @@ -433647,10 +433414,10 @@ index ab736577b882..d5225239f316 100644 2.18.4 -From 0309e40300cdbadee9ccce15e32abc152b1e98a4 Mon Sep 17 00:00:00 2001 +From 021025c6b161894dd06e799aaa3d5c2940007104 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Tue, 16 Jun 2020 16:12:41 +0200 -Subject: [PATCH 0921/1148] staging: media: imx: Update TODO entry +Subject: [PATCH 0916/1209] staging: media: imx: Update TODO entry Upstream https://patchwork.linuxtv.org/patch/64672/ @@ -433681,10 +433448,10 @@ index 6f29b5ca5324..64c6ba5945ca 100644 2.18.4 -From 88847efec251ec4ca81b8788e47683724d55397e Mon Sep 17 00:00:00 2001 +From 04acd3fc61a1158577ef7e231496d969cebd1c4d Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Tue, 16 Jun 2020 16:12:42 +0200 -Subject: [PATCH 0922/1148] media: i2c: adv748x: Adjust TXA data lanes number +Subject: [PATCH 0917/1209] media: i2c: adv748x: Adjust TXA data lanes number MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -433812,10 +433579,10 @@ index fccb388ce179..1061f425ece5 100644 2.18.4 -From c75d805e4aea1ebfa2e1507963cf0dc9b64d68b3 Mon Sep 17 00:00:00 2001 +From e3bc89eec3c17aeb9d26a816c570b1b9087021c3 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Tue, 16 Jun 2020 16:12:43 +0200 -Subject: [PATCH 0923/1148] media: i2c: adv748x: Implement get_mbus_config +Subject: [PATCH 0918/1209] media: i2c: adv748x: Implement get_mbus_config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -433881,10 +433648,10 @@ index 2091cda50935..99bb63d05eef 100644 2.18.4 -From f962ec83806c8060051dfbbd8a0de70b82af69a0 Mon Sep 17 00:00:00 2001 +From 00199f8754d8953533ac6eafda728430a0b2947b Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Tue, 16 Jun 2020 16:12:44 +0200 -Subject: [PATCH 0924/1148] media: rcar-csi2: Negotiate data lanes number +Subject: [PATCH 0919/1209] media: rcar-csi2: Negotiate data lanes number Upstream https://patchwork.linuxtv.org/patch/64675/ @@ -433901,18 +433668,18 @@ Signed-off-by: Jacopo Mondi 1 file changed, 67 insertions(+), 7 deletions(-) diff --git a/drivers/media/platform/rcar-vin/rcar-csi2.c b/drivers/media/platform/rcar-vin/rcar-csi2.c -index c14af1b929df..a59f8ae0b119 100644 +index d27eccfa57ca..7a1f397d4fc3 100644 --- a/drivers/media/platform/rcar-vin/rcar-csi2.c +++ b/drivers/media/platform/rcar-vin/rcar-csi2.c -@@ -363,6 +363,7 @@ struct rcar_csi2 { +@@ -362,6 +362,7 @@ struct rcar_csi2 { + struct v4l2_async_notifier notifier; - struct v4l2_async_subdev asd; struct v4l2_subdev *remote; + unsigned int remote_pad; struct v4l2_mbus_framefmt mf; -@@ -408,13 +409,14 @@ static void rcsi2_exit_standby(struct rcar_csi2 *priv) +@@ -407,13 +408,14 @@ static void rcsi2_exit_standby(struct rcar_csi2 *priv) reset_control_deassert(priv->rstc); } @@ -433929,7 +433696,7 @@ index c14af1b929df..a59f8ae0b119 100644 if ((rcsi2_read(priv, PHCLM_REG) & PHCLM_STOPSTATECKL) && (rcsi2_read(priv, PHDLM_REG) & lane_mask) == lane_mask) -@@ -446,7 +448,8 @@ static int rcsi2_set_phypll(struct rcar_csi2 *priv, unsigned int mbps) +@@ -445,7 +447,8 @@ static int rcsi2_set_phypll(struct rcar_csi2 *priv, unsigned int mbps) return 0; } @@ -433939,7 +433706,7 @@ index c14af1b929df..a59f8ae0b119 100644 { struct v4l2_subdev *source; struct v4l2_ctrl *ctrl; -@@ -471,15 +474,63 @@ static int rcsi2_calc_mbps(struct rcar_csi2 *priv, unsigned int bpp) +@@ -470,15 +473,63 @@ static int rcsi2_calc_mbps(struct rcar_csi2 *priv, unsigned int bpp) * bps = link_freq * 2 */ mbps = v4l2_ctrl_g_ctrl_int64(ctrl) * bpp; @@ -434004,7 +433771,7 @@ index c14af1b929df..a59f8ae0b119 100644 unsigned int i; int mbps, ret; -@@ -521,10 +572,18 @@ static int rcsi2_start_receiver(struct rcar_csi2 *priv) +@@ -520,10 +571,18 @@ static int rcsi2_start_receiver(struct rcar_csi2 *priv) fld |= FLD_FLD_NUM(1); } @@ -434025,7 +433792,7 @@ index c14af1b929df..a59f8ae0b119 100644 if (mbps < 0) return mbps; -@@ -571,7 +630,7 @@ static int rcsi2_start_receiver(struct rcar_csi2 *priv) +@@ -570,7 +629,7 @@ static int rcsi2_start_receiver(struct rcar_csi2 *priv) rcsi2_write(priv, PHYCNT_REG, phycnt | PHYCNT_SHUTDOWNZ); rcsi2_write(priv, PHYCNT_REG, phycnt | PHYCNT_SHUTDOWNZ | PHYCNT_RSTZ); @@ -434034,7 +433801,7 @@ index c14af1b929df..a59f8ae0b119 100644 if (ret) return ret; -@@ -748,6 +807,7 @@ static int rcsi2_notify_bound(struct v4l2_async_notifier *notifier, +@@ -747,6 +806,7 @@ static int rcsi2_notify_bound(struct v4l2_async_notifier *notifier, } priv->remote = subdev; @@ -434046,10 +433813,10 @@ index c14af1b929df..a59f8ae0b119 100644 2.18.4 -From 4dbcf60d3d5cfac4da82699c5490a289f9435007 Mon Sep 17 00:00:00 2001 +From 10884195464944d080f79f601c921b03151e7ae2 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 23 Jun 2020 10:05:57 +0100 -Subject: [PATCH 0925/1148] drivers: media: Remove the downstream version of +Subject: [PATCH 0920/1209] drivers: media: Remove the downstream version of bcm2835-unicam About to be replaced by the upstream version. @@ -437237,10 +437004,10 @@ index ae059a171d0f..000000000000 2.18.4 -From d6b8a71e01b280b493d02439c8aae126f376c13a Mon Sep 17 00:00:00 2001 +From ec5d27e66abbd839ff30f92ab8155456fe23d8db Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 23 Jun 2020 10:35:24 +0100 -Subject: [PATCH 0926/1148] include: media: Add vfl_devnode_type of +Subject: [PATCH 0921/1209] include: media: Add vfl_devnode_type of VFL_TYPE_VIDEO Upsstream are renaming VFL_TYPE_GRABBER to VFL_TYPE_VIDEO. @@ -437268,10 +437035,10 @@ index 8f2befe9c905..4cc362a79c7c 100644 2.18.4 -From 07fbb085426b1b16d45c06f6aeed90549bf1737b Mon Sep 17 00:00:00 2001 +From d21a151454f6389fce1e015a6d1802dbb9f60459 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Mon, 4 May 2020 12:25:41 +0300 -Subject: [PATCH 0927/1148] media: bcm2835-unicam: Driver for CCP2/CSI2 camera +Subject: [PATCH 0922/1209] media: bcm2835-unicam: Driver for CCP2/CSI2 camera interface Add a driver for the Unicam camera receiver block on BCM283x processors. @@ -440436,10 +440203,10 @@ index 000000000000..ae059a171d0f 2.18.4 -From d99504066fab84eb31f4a966c3add48099b5121a Mon Sep 17 00:00:00 2001 +From f0846300ab40ed6eeab6fa125817cc44c30c258e Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 23 Jun 2020 14:32:51 +0100 -Subject: [PATCH 0928/1148] media: bcm2835-unicam: Add support for +Subject: [PATCH 0923/1209] media: bcm2835-unicam: Add support for get_mbus_config to set num lanes Use the get_mbus_config pad subdev call to allow a source to use @@ -440498,10 +440265,10 @@ index 2e9387cbc1e0..9adfb2d217af 100644 2.18.4 -From 77bca85774fc8e70a221c55b639deb0be676722f Mon Sep 17 00:00:00 2001 +From 0a9f7498a4e731f9233e213828f8bcd4c685a96f Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 13 May 2020 18:28:27 +0100 -Subject: [PATCH 0929/1148] media: bcm2835-unicam: Always service interrupts +Subject: [PATCH 0924/1209] media: bcm2835-unicam: Always service interrupts From when bringing up the driver, there was a check in the isr to ignore interrupts (claiming them handled) should the driver @@ -440555,10 +440322,10 @@ index 9adfb2d217af..9c0b9375572d 100644 2.18.4 -From d8f279e80c923dc2c2ed1871c30774504cfebb1b Mon Sep 17 00:00:00 2001 +From 87ec4d0475ddb81d8578d3a65f3a1a59ef6d79a6 Mon Sep 17 00:00:00 2001 From: Jacko Dirks Date: Tue, 5 May 2020 14:33:31 +0200 -Subject: [PATCH 0930/1148] media: bcm2835: unicam: Fix uninitialized warning +Subject: [PATCH 0925/1209] media: bcm2835: unicam: Fix uninitialized warning Signed-off-by: Jacko Dirks --- @@ -440582,10 +440349,10 @@ index 9c0b9375572d..7906c2813a70 100644 2.18.4 -From c8ff880be789d58d69296828d475428834a107ce Mon Sep 17 00:00:00 2001 +From 103939a49d7d71a80af59ff3bf05f3e2b6e6b281 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 23 Jun 2020 15:14:05 +0100 -Subject: [PATCH 0931/1148] media: bcm2835-unicam: Fixup review comments from +Subject: [PATCH 0926/1209] media: bcm2835-unicam: Fixup review comments from Hans. Updates the driver based on the upstream review comments from @@ -440832,10 +440599,10 @@ index 7906c2813a70..94e08ae92c1f 100644 2.18.4 -From e5fb6feeecab4b8e2ea46a09dd702bf0109e02dd Mon Sep 17 00:00:00 2001 +From 8872953980e5b857e09b11a54167aef5ed9cc859 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 19 May 2020 11:46:47 +0100 -Subject: [PATCH 0932/1148] media: bcm2835-unicam: Retain packing information +Subject: [PATCH 0927/1209] media: bcm2835-unicam: Retain packing information on G_FMT The change to retrieve the pixel format always on g_fmt didn't @@ -440886,10 +440653,10 @@ index 94e08ae92c1f..96c0b9fea942 100644 2.18.4 -From e8f0a53f2c2d0cd6a622bbd7ff6982cedf37d46e Mon Sep 17 00:00:00 2001 +From 77d9de73e3247287d4482488265288adef68f3f2 Mon Sep 17 00:00:00 2001 From: David Plowman Date: Thu, 28 May 2020 11:09:48 +0100 -Subject: [PATCH 0933/1148] media: bcm2835-unicam: change minimum number of +Subject: [PATCH 0928/1209] media: bcm2835-unicam: change minimum number of vb2_queue buffers to 1 Since the unicam driver was modified to write to a dummy buffer when no @@ -440920,10 +440687,10 @@ index 96c0b9fea942..f2cd2083bbd4 100644 2.18.4 -From f6f06804a17ce63d6e1293db08c2d1aa7a77841c Mon Sep 17 00:00:00 2001 +From c7dc48d26b3df3594e18b8e38fb492690559c57d Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 23 Jun 2020 15:41:42 +0100 -Subject: [PATCH 0934/1148] dt/dtoverlays: Fix up base DT and overlays for +Subject: [PATCH 0929/1209] dt/dtoverlays: Fix up base DT and overlays for updated Unicam driver The upstreamed Unicam driver uses a dt property to denote how many @@ -441086,10 +440853,10 @@ index 2ea99cd9e1a1..a1f8af36d2e7 100644 2.18.4 -From 7059ac1c185f4092cce5a047e07a1a371cbbf253 Mon Sep 17 00:00:00 2001 +From d7916e3803cd019ddd72ea463d1a94fb2240f33d Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 26 Jun 2020 15:53:44 +0100 -Subject: [PATCH 0935/1148] media: bcm2835-unicam: Avoid gcc warning over {0} +Subject: [PATCH 0930/1209] media: bcm2835-unicam: Avoid gcc warning over {0} on endpoint Older gcc versions object to = { 0 } initialisation if the first @@ -441119,10 +440886,10 @@ index f2cd2083bbd4..f70167d271fe 100644 2.18.4 -From 0b5d099f7f0f73de9edcd14ebf8735708ed7f968 Mon Sep 17 00:00:00 2001 +From 0af18ecf2ac6575ad458a61666694159b5be4a73 Mon Sep 17 00:00:00 2001 From: Manivannan Sadhasivam Date: Fri, 4 Oct 2019 13:05:24 -0300 -Subject: [PATCH 0936/1148] media: dt-bindings: media: i2c: Add IMX290 CMOS +Subject: [PATCH 0931/1209] media: dt-bindings: media: i2c: Add IMX290 CMOS sensor binding Commit 8a97a4676f8b1badcd9cfbed2b081342847bb1b1 upstream. @@ -441226,10 +440993,10 @@ index d744087f13a7..1543a5147d22 100644 2.18.4 -From cdd81b330875351608c5dfb85c915b4895b696f7 Mon Sep 17 00:00:00 2001 +From 60379c8db9dafc6111aff3ad4eb5989fb344e4eb Mon Sep 17 00:00:00 2001 From: Manivannan Sadhasivam Date: Fri, 4 Oct 2019 13:05:25 -0300 -Subject: [PATCH 0937/1148] media: i2c: Add IMX290 CMOS image sensor driver +Subject: [PATCH 0932/1209] media: i2c: Add IMX290 CMOS image sensor driver Commit 828dbc299278065b634e913d2700d254a3224853 upstream. @@ -442176,10 +441943,10 @@ index 000000000000..f7678e5a5d87 2.18.4 -From d769950be7486beb91a1b2d9dfed1a34a3c222a3 Mon Sep 17 00:00:00 2001 +From 7d25e5f85ff34a52738928d1bfec2b5ba4d005c3 Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Fri, 12 Jun 2020 15:53:46 +0200 -Subject: [PATCH 0938/1148] media: i2c: imx290: set the format before +Subject: [PATCH 0933/1209] media: i2c: imx290: set the format before VIDIOC_SUBDEV_G_FMT is called Commit d46cfdc86c30d5ec768924f0b1e2683c8d20b671 upstream. @@ -442232,10 +441999,10 @@ index f7678e5a5d87..2d8c38ffe2f0 100644 2.18.4 -From c7ce8f475682e4e4f7a113efdc5089292fd43280 Mon Sep 17 00:00:00 2001 +From 981b9993d5ed7ce13e7c42b60610ce9ef62bff4f Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Fri, 12 Jun 2020 15:53:47 +0200 -Subject: [PATCH 0939/1148] media: i2c: imx290: fix the order of the args in +Subject: [PATCH 0934/1209] media: i2c: imx290: fix the order of the args in SET_RUNTIME_PM_OPS() Commit 8d2d1bedb1b9af3e0c039a4444858da7b6da71f8 upstream. @@ -442268,10 +442035,10 @@ index 2d8c38ffe2f0..d0322f9a8856 100644 2.18.4 -From 5b062d0ee3000407429ff6dd3fd8fcdc814d0887 Mon Sep 17 00:00:00 2001 +From c9466dc200aa49d5ba12ca59ea9423a0011b4a7c Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Fri, 12 Jun 2020 15:53:48 +0200 -Subject: [PATCH 0940/1148] media: i2c: imx290: fix reset GPIO pin handling +Subject: [PATCH 0935/1209] media: i2c: imx290: fix reset GPIO pin handling Commit 3909a92d7df622b41b9ceeeea694e641cad7667b upstream. @@ -442335,10 +442102,10 @@ index d0322f9a8856..7b1de1f0c8b7 100644 2.18.4 -From 3054dc7a61d9024c9103f590a3aa2605c368ce6e Mon Sep 17 00:00:00 2001 +From dc87797affc593c6538beb31c95ce9d3caba80c3 Mon Sep 17 00:00:00 2001 From: Manivannan Sadhasivam Date: Fri, 12 Jun 2020 15:53:49 +0200 -Subject: [PATCH 0941/1148] media: i2c: imx290: Add support for 2 data lanes +Subject: [PATCH 0936/1209] media: i2c: imx290: Add support for 2 data lanes Commit 97589ad61c730e0f486635c6c19fa25ab8e8f29d upstream. @@ -442655,10 +442422,10 @@ index 7b1de1f0c8b7..ffb393962ffc 100644 2.18.4 -From 9c32254f5ba85e75c7ae914cff96071152cdc319 Mon Sep 17 00:00:00 2001 +From 9365da520c36e51ed19c10ec3659edfb0154c3eb Mon Sep 17 00:00:00 2001 From: Manivannan Sadhasivam Date: Fri, 12 Jun 2020 15:53:50 +0200 -Subject: [PATCH 0942/1148] media: i2c: imx290: Add configurable link frequency +Subject: [PATCH 0937/1209] media: i2c: imx290: Add configurable link frequency and pixel rate Commit 98e0500eadb772e1be32d8e369fcc3b7bcac93ed upstream. @@ -442967,10 +442734,10 @@ index ffb393962ffc..152b65cb7cbc 100644 2.18.4 -From 6ea8f16b9018823399fc2cd63e81ee6d32a3a859 Mon Sep 17 00:00:00 2001 +From 26cf3dd297d84736a9d7195ed06543e9c492a38a Mon Sep 17 00:00:00 2001 From: Manivannan Sadhasivam Date: Fri, 12 Jun 2020 15:53:51 +0200 -Subject: [PATCH 0943/1148] media: i2c: imx290: Add support for test pattern +Subject: [PATCH 0938/1209] media: i2c: imx290: Add support for test pattern generation Commit a58df1f9e4885eaf3d0663574a217e513821a9f0 upstream. @@ -443083,10 +442850,10 @@ index 152b65cb7cbc..67725a5aabd3 100644 2.18.4 -From 532eb18768d36aa45f762cd777a445afc266fae8 Mon Sep 17 00:00:00 2001 +From 1ced1ed38c2c24e639663c283c290bd776dfc5dc Mon Sep 17 00:00:00 2001 From: Manivannan Sadhasivam Date: Fri, 12 Jun 2020 15:53:52 +0200 -Subject: [PATCH 0944/1148] media: i2c: imx290: Add RAW12 mode support +Subject: [PATCH 0939/1209] media: i2c: imx290: Add RAW12 mode support Commit c566ac01ceaa02450acc155201772c0623530e76 upstream. @@ -443198,10 +442965,10 @@ index 67725a5aabd3..c654a9a8fb08 100644 2.18.4 -From 912e5435af7b993e10c9d0ef5780497a9f99b5fe Mon Sep 17 00:00:00 2001 +From 451ea2a4a4c901422b728366ff1c34ba0834c617 Mon Sep 17 00:00:00 2001 From: Manivannan Sadhasivam Date: Fri, 12 Jun 2020 15:53:53 +0200 -Subject: [PATCH 0945/1148] media: i2c: imx290: Add support to enumerate all +Subject: [PATCH 0940/1209] media: i2c: imx290: Add support to enumerate all frame sizes Commit 3b867fb641d884b714fba390ae866714ba475f29 upstream. @@ -443262,10 +443029,10 @@ index c654a9a8fb08..fd147fac5ef2 100644 2.18.4 -From 41d28aa62f0697c62f898eb20e25dc791bb08720 Mon Sep 17 00:00:00 2001 +From 50310f8a96a949ec32459e5685278fec748b7803 Mon Sep 17 00:00:00 2001 From: Manivannan Sadhasivam Date: Fri, 12 Jun 2020 15:53:54 +0200 -Subject: [PATCH 0946/1148] media: i2c: imx290: Move the settle time delay out +Subject: [PATCH 0941/1209] media: i2c: imx290: Move the settle time delay out of loop Commit 6544af9b04b4484867c234ba0be1b5008e4a14ee upstream. @@ -443305,10 +443072,10 @@ index fd147fac5ef2..02001c1b0dfc 100644 2.18.4 -From 2340e4f1e704f91411eda0e53cfe0c9b1c83eb48 Mon Sep 17 00:00:00 2001 +From 29f22856a4cc22eb6b881711e20388e76765f641 Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Fri, 12 Jun 2020 15:53:55 +0200 -Subject: [PATCH 0947/1148] media: i2c: imx290: set bus_type before calling +Subject: [PATCH 0942/1209] media: i2c: imx290: set bus_type before calling v4l2_fwnode_endpoint_alloc_parse() Commit a270675875829b6d46eb9e38960fd6019555ebb8 upstream. @@ -443448,10 +443215,10 @@ index 02001c1b0dfc..9c97830164e9 100644 2.18.4 -From d7ed11aa16b594e0eabc1af7182c50ff4628bd29 Mon Sep 17 00:00:00 2001 +From 1cbc468f196b73d0e2d1992106a8059adf87adf3 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 25 Jun 2020 08:28:51 +0100 -Subject: [PATCH 0948/1148] media: i2c: imx290: Add support for 74.25MHz clock +Subject: [PATCH 0943/1209] media: i2c: imx290: Add support for 74.25MHz clock The existing driver only supported a clock of 37.125MHz, but the sensor also supports 74.25MHz. @@ -443718,10 +443485,10 @@ index 9c97830164e9..656716fea44b 100644 2.18.4 -From e68319dbbcda79c8b17e6fad74ce33859b8d3d0a Mon Sep 17 00:00:00 2001 +From 7a0e056db471ff7924b8c25f8d00a766b7a8a5bf Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 11 Jun 2020 13:41:43 +0100 -Subject: [PATCH 0949/1148] media: i2c: imx290: Correct range for V4L2_CID_GAIN +Subject: [PATCH 0944/1209] media: i2c: imx290: Correct range for V4L2_CID_GAIN to 0-238 The datasheet lists the gain as being 0.0 to 72.0dB in 0.3dB steps, which @@ -443750,10 +443517,10 @@ index 656716fea44b..e7eecbea9bb0 100644 2.18.4 -From 7985ef2bc136666b3757a4f2bc0d2abbf1395f16 Mon Sep 17 00:00:00 2001 +From b7839be05d2f9e28acb2d20ae3b7c4bcbf6d6af6 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 11 Jun 2020 14:36:40 +0100 -Subject: [PATCH 0950/1148] media: i2c: imx290: Convert HMAX setting into +Subject: [PATCH 0945/1209] media: i2c: imx290: Convert HMAX setting into V4L2_CID_HBLANK Userspace needs to know HBLANK if it is to work out exposure times @@ -443915,10 +443682,10 @@ index e7eecbea9bb0..876ad590102b 100644 2.18.4 -From 8211197dc78519cc7caf868ed92c2c42962415b5 Mon Sep 17 00:00:00 2001 +From b1c8c2e7cc60aba83d00e7289da14c154959a6a8 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 11 Jun 2020 18:09:12 +0100 -Subject: [PATCH 0951/1148] media: i2c: imx290: Add support for V4L2_CID_VBLANK +Subject: [PATCH 0946/1209] media: i2c: imx290: Add support for V4L2_CID_VBLANK In order to calculate framerate and durations userspace needs the vertical blanking information. This can be configurable, @@ -444062,10 +443829,10 @@ index 876ad590102b..ea0559e8dcc9 100644 2.18.4 -From 04c0c6c9f571c5b77f4fb644fdac9b62d20cca47 Mon Sep 17 00:00:00 2001 +From 9d757d70ceb7c03b7e0ee659c1b4afee459e75cb Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 11 Jun 2020 18:19:13 +0100 -Subject: [PATCH 0952/1148] media: i2c: imx290: Add exposure control to the +Subject: [PATCH 0947/1209] media: i2c: imx290: Add exposure control to the driver. Adds support for V4L2_CID_EXPOSURE so that userspace can control @@ -444161,10 +443928,10 @@ index ea0559e8dcc9..df1ad9ac509f 100644 2.18.4 -From 7bc6131d314e44295b2bc34df306f92eae86f70c Mon Sep 17 00:00:00 2001 +From 9dfa8b14a5564d7e59a5363e57b28bfca0f4fa71 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 11 Jun 2020 18:34:16 +0100 -Subject: [PATCH 0953/1148] media: i2c: imx290: Add H and V flip controls +Subject: [PATCH 0948/1209] media: i2c: imx290: Add H and V flip controls The sensor supports horizontal and vertical flips, so support them through V4L2_CID_HFLIP and V4L2_CID_VFLIP. @@ -444250,10 +444017,10 @@ index df1ad9ac509f..246c4b149598 100644 2.18.4 -From 01367cf9acb6dbbe229de413e734ca79523db19c Mon Sep 17 00:00:00 2001 +From 3f8c460e46e47fedee2f107e5f460370f319d784 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 25 Jun 2020 16:52:14 +0100 -Subject: [PATCH 0954/1148] media: dt-bindings: media: i2c: Add mono version to +Subject: [PATCH 0949/1209] media: dt-bindings: media: i2c: Add mono version to IMX290 bindings The IMX290 module is available as either monochrome or colour and @@ -444292,10 +444059,10 @@ index a3cc21410f7c..294e63650d9e 100644 2.18.4 -From 6d04a80fcfc67b0c41f84dda64da2b3237e66654 Mon Sep 17 00:00:00 2001 +From eecbe91ce37c69c3b0c03f0ace50d21835b7a6ff Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 25 Jun 2020 17:03:11 +0100 -Subject: [PATCH 0955/1148] media : i2c: imx290: Add support for the mono +Subject: [PATCH 0950/1209] media : i2c: imx290: Add support for the mono sensor variant. The IMX290 module is available as either mono or colour (Bayer). @@ -444483,10 +444250,10 @@ index 246c4b149598..a6c5d9ce709f 100644 2.18.4 -From d52a2a4e3919580f996417b6fade19de30249246 Mon Sep 17 00:00:00 2001 +From d090b5202184eafe6be1b1802d7d8ca2a4dd61e9 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 26 Jun 2020 18:11:49 +0100 -Subject: [PATCH 0956/1148] media: i2c: imx290: Switch set_hmax to use +Subject: [PATCH 0951/1209] media: i2c: imx290: Switch set_hmax to use imx290_write_buffered_reg imx290_set_hmax was using two independent writes to set up hmax, @@ -444532,10 +444299,10 @@ index a6c5d9ce709f..9431c2b917ed 100644 2.18.4 -From 631dd8912756f8e74ca1ccbe59a0622ce4105d6e Mon Sep 17 00:00:00 2001 +From 37230d8c577474ce72682bf248d948f0264d12bd Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 19 May 2020 13:35:17 +0100 -Subject: [PATCH 0957/1148] dtoverlays: Add an overlay for the Sony IMX290 +Subject: [PATCH 0952/1209] dtoverlays: Add an overlay for the Sony IMX290 image sensor Adds an overlay to configure the IMX290 image sensor. @@ -444782,10 +444549,10 @@ index 000000000000..8f1dadb13f6a 2.18.4 -From d3c27737ab96475b0114cf1ca57d13d4c62e6404 Mon Sep 17 00:00:00 2001 +From 82cc8fd558efcaee9f77f8fe1876109b0a0e36fd Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 25 Jun 2020 18:12:17 +0100 -Subject: [PATCH 0958/1148] defconfig: Add Sony IMX290 image sensor driver to +Subject: [PATCH 0953/1209] defconfig: Add Sony IMX290 image sensor driver to all Pi defconfigs Adds the mainline IMX290 sensor driver (with extra features) to @@ -444864,10 +444631,10 @@ index c82e163a095c..55bf3bbbcb74 100644 2.18.4 -From 16e91a5b33780da77c93cdd59ae022fbbc722749 Mon Sep 17 00:00:00 2001 +From 11e30b4a5565b50de2825316c2e323095f348bc2 Mon Sep 17 00:00:00 2001 From: Dom Cobley Date: Tue, 23 Jun 2020 18:37:01 +0100 -Subject: [PATCH 0959/1148] vc4_hdmi: Set HD_CTL_WHOLSMP and HD_CTL_CHALIGN_SET +Subject: [PATCH 0954/1209] vc4_hdmi: Set HD_CTL_WHOLSMP and HD_CTL_CHALIGN_SET Symptom is random switching of speakers when using multichannel. @@ -444908,10 +444675,10 @@ index 5aa5236e576d..994bcb027172 100644 2.18.4 -From 8736783c8edb6014ab5dac1cad49921ab6c523ed Mon Sep 17 00:00:00 2001 +From fb46db91c0c6e3fd5077e65333255bd19c26ac3d Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Tue, 19 May 2020 15:56:47 +0100 -Subject: [PATCH 0960/1148] staging: vc04_services: isp: Fixup g/s_selection +Subject: [PATCH 0955/1209] staging: vc04_services: isp: Fixup g/s_selection implementation Add V4L2_SEL_TGT_CROP_DEFAULT and V4L2_SEL_TGT_CROP_BOUND targets. @@ -445043,10 +444810,10 @@ index bc86354ac4c6..83471996a84d 100644 2.18.4 -From 32518134fc76b32a8b7fdd00786f592c60a301e0 Mon Sep 17 00:00:00 2001 +From 7afdb0ba178c8cc2fccdbff6699b360d0f5f46ed Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Tue, 19 May 2020 15:57:08 +0100 -Subject: [PATCH 0961/1148] staging: vc04_services: isp: Reorder operations +Subject: [PATCH 0956/1209] staging: vc04_services: isp: Reorder operations during device probe Register the video node at the end of the probe, swapping order with @@ -445141,10 +444908,10 @@ index 83471996a84d..815cf50cd07a 100644 2.18.4 -From ff980da948445a7c7da55feaaf808303cc4d8e72 Mon Sep 17 00:00:00 2001 +From 8cf91adebe2a740bb2b0b1569e790f69b46559f8 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Tue, 19 May 2020 15:57:23 +0100 -Subject: [PATCH 0962/1148] uapi: bcm2835-isp: Fixups for bcm2835-isp uapi +Subject: [PATCH 0957/1209] uapi: bcm2835-isp: Fixups for bcm2835-isp uapi structures Rename pad_[] to padding[]. @@ -445181,10 +444948,10 @@ index e7afc367fd76..bb16dcbcb40f 100644 2.18.4 -From 312feb6d20eeacb98945d8de5f9809bde92bb845 Mon Sep 17 00:00:00 2001 +From 836eb7379b55048aece4bbde7e3d1f8616ac1e5e Mon Sep 17 00:00:00 2001 From: Maxim Mikityanskiy Date: Sun, 21 Jun 2020 18:06:31 +0300 -Subject: [PATCH 0963/1148] config: Set CONFIG_SERIAL_DEV_CTRL_TTYPORT=y in +Subject: [PATCH 0958/1209] config: Set CONFIG_SERIAL_DEV_CTRL_TTYPORT=y in Raspberry Pi defconfigs The next patch adds a device tree overlay for Bluetooth. The Bluetooth @@ -445289,10 +445056,10 @@ index 55bf3bbbcb74..bf65e6561589 100644 2.18.4 -From e863a16e6daa287ae875b8c6a69e097c64b849f8 Mon Sep 17 00:00:00 2001 +From cfeb7638cc8e59106f165288ac4bea1ea3675944 Mon Sep 17 00:00:00 2001 From: Maxim Mikityanskiy Date: Sat, 27 Jun 2020 13:08:26 +0300 -Subject: [PATCH 0964/1148] ARM: dts: Add Bluetooth nodes for Raspberry Pi +Subject: [PATCH 0959/1209] ARM: dts: Add Bluetooth nodes for Raspberry Pi Add device tree nodes for Bluetooth on supported Raspberry Pi boards. It's disabled by default and can be enabled by `krnbt=on` dtparam. It's @@ -445596,10 +445363,10 @@ index 30d3d8549da0..44d8e10ef735 100644 2.18.4 -From e1ce1be5b056d35bff7acb69be16e8108a8908fb Mon Sep 17 00:00:00 2001 +From 020d42718c10d8d75b80d7735911f0a468fa3ec6 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 30 Jun 2020 18:04:13 +0100 -Subject: [PATCH 0965/1148] drm/vc4: Allow interlaced HDMI modes from FKMS. +Subject: [PATCH 0960/1209] drm/vc4: Allow interlaced HDMI modes from FKMS. Having checked the firmware handling for interlaced modes, it appears to be possible to support interlaced modes on @@ -445639,10 +445406,10 @@ index 25a1f066e62c..ab794eec6afe 100644 2.18.4 -From dd994b7bcbb49516bc0b2dae37a66fca64b89be8 Mon Sep 17 00:00:00 2001 +From 869a3f2e9a7af1a8e750587d42ea35ad35aa032b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 2 Jul 2020 13:53:20 +0100 -Subject: [PATCH 0966/1148] serial: 8250: bcm2835aux - defer if clock is zero +Subject: [PATCH 0961/1209] serial: 8250: bcm2835aux - defer if clock is zero See: https://github.com/raspberrypi/linux/issues/3700 @@ -445673,10 +445440,10 @@ index 33da68341c3a..8102ad9d04ea 100644 2.18.4 -From eb436fd5e42790a2166fd858676e0a1f0ff84e2a Mon Sep 17 00:00:00 2001 +From c7ccd77f7060f92f0c46fad5f8754249ebc79477 Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Mon, 24 Feb 2020 18:52:20 +0100 -Subject: [PATCH 0967/1148] media: v4l: Add 14-bit raw bayer pixel formats +Subject: [PATCH 0962/1209] media: v4l: Add 14-bit raw bayer pixel formats MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -445819,10 +445586,10 @@ index 31d3f50a5040..fddc53668cf3 100644 case V4L2_PIX_FMT_SGBRG14P: descr = "14-bit Bayer GBGB/RGRG Packed"; break; case V4L2_PIX_FMT_SGRBG14P: descr = "14-bit Bayer GRGR/BGBG Packed"; break; diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h -index 5b33ba237b6d..4da08fe3590e 100644 +index 10e146cd092a..20bbc3e60118 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h -@@ -667,6 +667,10 @@ struct v4l2_pix_format { +@@ -666,6 +666,10 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_SGBRG12P v4l2_fourcc('p', 'G', 'C', 'C') #define V4L2_PIX_FMT_SGRBG12P v4l2_fourcc('p', 'g', 'C', 'C') #define V4L2_PIX_FMT_SRGGB12P v4l2_fourcc('p', 'R', 'C', 'C') @@ -445837,10 +445604,10 @@ index 5b33ba237b6d..4da08fe3590e 100644 2.18.4 -From 7333c63e0a3e356e7038735ad10f5b17de8ec2dc Mon Sep 17 00:00:00 2001 +From 9505ffc318620058669a3d1758a6f61f916420e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= Date: Mon, 24 Feb 2020 18:52:21 +0100 -Subject: [PATCH 0968/1148] media: v4l: Add 14-bit raw greyscale pixel format +Subject: [PATCH 0963/1209] media: v4l: Add 14-bit raw greyscale pixel format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -445966,10 +445733,10 @@ index fddc53668cf3..6296f6cc87c4 100644 case V4L2_PIX_FMT_Y16_BE: descr = "16-bit Greyscale BE"; break; case V4L2_PIX_FMT_Y10BPACK: descr = "10-bit Greyscale (Packed)"; break; diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h -index 4da08fe3590e..f3ce1c88dbf8 100644 +index 20bbc3e60118..a4fd05446c62 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h -@@ -570,6 +570,7 @@ struct v4l2_pix_format { +@@ -569,6 +569,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */ #define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ #define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ') /* 12 Greyscale */ @@ -445981,10 +445748,10 @@ index 4da08fe3590e..f3ce1c88dbf8 100644 2.18.4 -From d83f7b89a5c953630f323723610f8d221d444d7b Mon Sep 17 00:00:00 2001 +From d299291c3caeccacdaa1bea91fb5ccdb2896120f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= Date: Mon, 24 Feb 2020 18:52:22 +0100 -Subject: [PATCH 0969/1148] media: v4l: Add 1X14 14-bit greyscale media bus +Subject: [PATCH 0964/1209] media: v4l: Add 1X14 14-bit greyscale media bus code definition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -446077,10 +445844,10 @@ index 4b5e2a71dfec..3c2848e91c1b 100644 2.18.4 -From a7c22157f7da58c30d9cb6f6db4afbc2f7ae6baa Mon Sep 17 00:00:00 2001 +From 0d89a37c203a56dc93e2d58247b13eb064c4a46a Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 7 May 2020 16:59:03 +0100 -Subject: [PATCH 0970/1148] media: Add a pixel format for MIPI packed 12bit +Subject: [PATCH 0965/1209] media: Add a pixel format for MIPI packed 12bit luma only. This is the format used by monochrome 12bit image sensors. @@ -446170,10 +445937,10 @@ index 6296f6cc87c4..c76d836b6e0d 100644 case V4L2_PIX_FMT_Y12I: descr = "Interleaved 12-bit Greyscale"; break; case V4L2_PIX_FMT_Z16: descr = "16-bit Depth"; break; diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h -index f3ce1c88dbf8..28772badf558 100644 +index a4fd05446c62..cd055346095b 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h -@@ -577,6 +577,7 @@ struct v4l2_pix_format { +@@ -576,6 +576,7 @@ struct v4l2_pix_format { /* Grey bit-packed formats */ #define V4L2_PIX_FMT_Y10BPACK v4l2_fourcc('Y', '1', '0', 'B') /* 10 Greyscale bit-packed */ #define V4L2_PIX_FMT_Y10P v4l2_fourcc('Y', '1', '0', 'P') /* 10 Greyscale, MIPI RAW10 packed */ @@ -446185,10 +445952,10 @@ index f3ce1c88dbf8..28772badf558 100644 2.18.4 -From ac0195c8c3fe0eaec0d623815edfcdeb1d5e2d6d Mon Sep 17 00:00:00 2001 +From e3a8355dd43505c95cf29a3c5fe455f30c409040 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 25 Jun 2020 17:51:03 +0100 -Subject: [PATCH 0971/1148] media: Add a pixel format for MIPI packed 14bit +Subject: [PATCH 0966/1209] media: Add a pixel format for MIPI packed 14bit luma only. This is the format used by monochrome 14bit image sensors. @@ -446287,10 +446054,10 @@ index c76d836b6e0d..1deb1919cdcd 100644 case V4L2_PIX_FMT_Y12I: descr = "Interleaved 12-bit Greyscale"; break; case V4L2_PIX_FMT_Z16: descr = "16-bit Depth"; break; diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h -index 28772badf558..f93979a670a5 100644 +index cd055346095b..8020c483ea3c 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h -@@ -578,6 +578,7 @@ struct v4l2_pix_format { +@@ -577,6 +577,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_Y10BPACK v4l2_fourcc('Y', '1', '0', 'B') /* 10 Greyscale bit-packed */ #define V4L2_PIX_FMT_Y10P v4l2_fourcc('Y', '1', '0', 'P') /* 10 Greyscale, MIPI RAW10 packed */ #define V4L2_PIX_FMT_Y12P v4l2_fourcc('Y', '1', '2', 'P') /* 12 Greyscale, MIPI RAW12 packed */ @@ -446302,10 +446069,10 @@ index 28772badf558..f93979a670a5 100644 2.18.4 -From e9a1c06bcf7afe53bfaec36b2d16737ee63c2992 Mon Sep 17 00:00:00 2001 +From dcb58f30514c9b4f70a4366efba5417245d4d4d9 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 6 May 2020 18:09:04 +0100 -Subject: [PATCH 0972/1148] staging: vc04_services: isp: Add support for 14bit +Subject: [PATCH 0967/1209] staging: vc04_services: isp: Add support for 14bit Bayer The only thing missing was a set of defines, therefore add them in. @@ -446385,10 +446152,10 @@ index 8d904fcce388..4288d50a7e6b 100644 2.18.4 -From baed5eab6409edbe5829d70999cd8695c35cb031 Mon Sep 17 00:00:00 2001 +From f9e9113df1f7d9d269bed5210f881378057a6edc Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 6 May 2020 18:11:14 +0100 -Subject: [PATCH 0973/1148] staging: vc04_services: isp: Add monochrome image +Subject: [PATCH 0968/1209] staging: vc04_services: isp: Add monochrome image formats Adds support for monochrome image formats in the various @@ -446485,10 +446252,10 @@ index 4288d50a7e6b..8eb6334ee055 100644 2.18.4 -From b86459e88105a29da632aaacc5a20c3d2940fe75 Mon Sep 17 00:00:00 2001 +From cedc3e9e8ba80c12460b8602bb21f2b58e19a02c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 6 May 2020 18:24:34 +0100 -Subject: [PATCH 0974/1148] staging: vc04_services: isp: Increase the number of +Subject: [PATCH 0969/1209] staging: vc04_services: isp: Increase the number of supported formats expected The ISP now supports 47 different input formats, therefore increase the @@ -446520,10 +446287,10 @@ index 815cf50cd07a..424e7e6da1d6 100644 2.18.4 -From 28618bd7dd774331eeb2c8fa7d5ee606812ae90a Mon Sep 17 00:00:00 2001 +From da2a539c61f5b64952528a2964f6121f9e44768b Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 25 Jun 2020 17:40:56 +0100 -Subject: [PATCH 0975/1148] staging: vc04_services: codec: Increase the number +Subject: [PATCH 0970/1209] staging: vc04_services: codec: Increase the number of supported formats expected The ISP now supports 47 different input formats, therefore increase the @@ -446555,10 +446322,10 @@ index 1c7fbba6c9c8..2391d589f170 100644 2.18.4 -From 606e46fb96a2a3a55df904817bb495fa5525714d Mon Sep 17 00:00:00 2001 +From 9d3348481383a4a57e097ea17f0e165353617329 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 1 Jul 2020 10:38:12 +0100 -Subject: [PATCH 0976/1148] staging: vc04_services: codec: Add support for mono +Subject: [PATCH 0971/1209] staging: vc04_services: codec: Add support for mono formats The firmware ISP component now allows for processing of mono @@ -446625,10 +446392,10 @@ index 2391d589f170..b9415f3cdb76 100644 2.18.4 -From 6fa9c37c97cd943914fbe46c0b75f0b363091a60 Mon Sep 17 00:00:00 2001 +From 967771358e45c2332671d41de44bbeacdb376beb Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 1 Jul 2020 10:50:12 +0100 -Subject: [PATCH 0977/1148] staging: vc04_services: codec: Add support for +Subject: [PATCH 0972/1209] staging: vc04_services: codec: Add support for 14bit Bayer formats Now that the 14bit Bayer formats have been defined within @@ -446688,10 +446455,10 @@ index b9415f3cdb76..3fe81979aaa1 100644 2.18.4 -From 22ad3eb84afa2ed287a07f8cb988beb90026b49f Mon Sep 17 00:00:00 2001 +From b32c735979c57426c24549543275b22809160d50 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 25 Jun 2020 17:53:32 +0100 -Subject: [PATCH 0978/1148] media: bcm2835-unicam: Add support for 12bit mono +Subject: [PATCH 0973/1209] media: bcm2835-unicam: Add support for 12bit mono packed format Now that V4L2_PIX_FMT_Y12P is defined, allow passing raw 12bit @@ -446719,10 +446486,10 @@ index f70167d271fe..104f4d0f9f05 100644 2.18.4 -From 69606d0f57189e91bae66fb06b4ba226b29f29e7 Mon Sep 17 00:00:00 2001 +From 88a74e547d63ae26e514152d37e8c865254d2ecb Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 25 Jun 2020 18:03:47 +0100 -Subject: [PATCH 0979/1148] media: bcm2835-unicam: Add support for 14bit mono +Subject: [PATCH 0974/1209] media: bcm2835-unicam: Add support for 14bit mono sources Now that V4L2_PIX_FMT_Y14 and V4L2_PIX_FMT_Y14P are defined, @@ -446754,10 +446521,10 @@ index 104f4d0f9f05..799bea3d4f41 100644 2.18.4 -From 42f8f170288777bc96a97ce773c731f37f7290b9 Mon Sep 17 00:00:00 2001 +From 9140c723951105a6a3cf4de76b59c0613eff3062 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 1 Jul 2020 10:57:57 +0100 -Subject: [PATCH 0980/1148] media: bcm2835-unicam: Add support for unpacked +Subject: [PATCH 0975/1209] media: bcm2835-unicam: Add support for unpacked 14bit Bayer formats Now that the 14bit non-packed Bayer formats are defined, add them @@ -446802,10 +446569,10 @@ index 799bea3d4f41..3b082587dd14 100644 2.18.4 -From c0702082a80248fc150b5bc2f1c6d61bf2450b67 Mon Sep 17 00:00:00 2001 +From 7f364cfd67b8f684327b222285b2458cebcc8327 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 2 Jul 2020 15:21:05 +0100 -Subject: [PATCH 0981/1148] overlays: Fix miniuart-bt "krnbt" parameter +Subject: [PATCH 0976/1209] overlays: Fix miniuart-bt "krnbt" parameter Although superficially appealing, an overlay parameter that targets a label in the base DTB is not currently supported. Instead it is @@ -446840,10 +446607,10 @@ index 44d8e10ef735..da49f14a0940 100644 2.18.4 -From 9556bb5da8c8a6a803fb717411399af31c9d4e09 Mon Sep 17 00:00:00 2001 +From 44b8ebe1891a0ca4370e91b4680c78d0c95c43d0 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 3 Jul 2020 14:11:55 +0100 -Subject: [PATCH 0982/1148] drm/vc4: Make FKMS max refresh rate a module +Subject: [PATCH 0977/1209] drm/vc4: Make FKMS max refresh rate a module parameter Some people want to use the high refresh rate modes for 1080p100 @@ -446901,10 +446668,10 @@ index ab794eec6afe..a173ca430db4 100644 2.18.4 -From 704acb0334c00452568ab872d2741f4c205509df Mon Sep 17 00:00:00 2001 +From b02c65ac36ef81bf8667c1d473e0e0cafe2f1304 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 3 Jul 2020 16:06:55 +0100 -Subject: [PATCH 0983/1148] drm/vc4: FKMS Block modes with odd horizontal +Subject: [PATCH 0978/1209] drm/vc4: FKMS Block modes with odd horizontal timing values on Pi4 Pi4 HDMI pipeline is 2 pixels/clock and can not produce timings @@ -446981,10 +446748,10 @@ index a173ca430db4..ff726486c785 100644 2.18.4 -From 08186c2419849b38201078d4d701414a5dc7baca Mon Sep 17 00:00:00 2001 +From 246971b576c237eb83fc4816949bd7f3f1ded0a8 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 3 Jul 2020 16:05:37 +0100 -Subject: [PATCH 0984/1148] dt: Use rpi-firmware-kms-2711 on 2711 platforms +Subject: [PATCH 0979/1209] dt: Use rpi-firmware-kms-2711 on 2711 platforms Signed-off-by: Dave Stevenson --- @@ -447026,10 +446793,10 @@ index c42fa2aa5ef2..ce3edc2cda7d 100644 2.18.4 -From 7a8c11ae631f8ae58f56eb7606113ef9e7124a4b Mon Sep 17 00:00:00 2001 +From 10687b60ef21255402391bacb5be40955aab485e Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 3 Jul 2020 16:13:33 +0100 -Subject: [PATCH 0985/1148] drm/vc4: FKMS: Put includes in alphabetical order, +Subject: [PATCH 0980/1209] drm/vc4: FKMS: Put includes in alphabetical order, and use <> instead of "" Reorder the includes, and use the system include paths rather than @@ -447089,10 +446856,10 @@ index ff726486c785..ec5c223033c8 100644 2.18.4 -From 5a72fc97ab625ebcea9ac41304b82326776be81a Mon Sep 17 00:00:00 2001 +From 8296f6cec4d9a57a04f787a64fcb5fedbf650bc3 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Tue, 4 Feb 2020 15:50:41 +0100 -Subject: [PATCH 0986/1148] irqchip/bcm2835: Quiesce IRQs left enabled by +Subject: [PATCH 0981/1209] irqchip/bcm2835: Quiesce IRQs left enabled by bootloader [ Upstream commit bd59b343a9c902c522f006e6d71080f4893bbf42 ] @@ -447200,10 +446967,10 @@ index 40c1b38d5db5..be181d4aecca 100644 2.18.4 -From fd08f62b4700e45a79aff549babdd4afe2cb9dd6 Mon Sep 17 00:00:00 2001 +From bc24702b27320f532e3a47076acc5623f1ba4344 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 1 Jul 2020 18:28:10 +0100 -Subject: [PATCH 0987/1148] dtoverlays: Fixup imx219 and imx477 overlays due to +Subject: [PATCH 0982/1209] dtoverlays: Fixup imx219 and imx477 overlays due to parsing failures imx219 overlay failed to detect as CSI2 as it was missing any @@ -447250,10 +447017,10 @@ index bd187713939e..73d4f79d54e6 100644 2.18.4 -From 17cb0888b0986ec7798086a00283068fc876f9f3 Mon Sep 17 00:00:00 2001 +From f8c28c9d7c1baa32279be4d92aa51b1087935380 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Sat, 4 Jul 2020 22:19:26 +0100 -Subject: [PATCH 0988/1148] overlays: rpi-ft5406: Fix boolean parameters +Subject: [PATCH 0983/1209] overlays: rpi-ft5406: Fix boolean parameters An improvement in the automated testing of overlays revealed these invalid boolean parameter declarations. @@ -447283,10 +447050,10 @@ index 4dcb490f04b6..8483c4f4b2eb 100644 2.18.4 -From 8e02ce61939e28d6e30ab7d2e61e65cb85554221 Mon Sep 17 00:00:00 2001 +From 449edc11c0ef364a3c2d7a0df1c74963cbe1665b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 6 Jul 2020 20:04:53 +0100 -Subject: [PATCH 0989/1148] configs: Regenerate Pi defconfigs +Subject: [PATCH 0984/1209] configs: Regenerate Pi defconfigs Signed-off-by: Phil Elwell --- @@ -447361,10 +447128,10 @@ index bf65e6561589..99ed08604d56 100644 2.18.4 -From fc539c07e2f8f8029594a0a5dc4bd0b28dc941a3 Mon Sep 17 00:00:00 2001 +From 53c66011ff0d4f4feb535646f9fbc05217eeadac Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 6 Jul 2020 17:53:47 +0100 -Subject: [PATCH 0990/1148] ARM: dts: Copy kernel BT changes to CM4 +Subject: [PATCH 0985/1209] ARM: dts: Copy kernel BT changes to CM4 Signed-off-by: Phil Elwell --- @@ -447396,10 +447163,10 @@ index ce3edc2cda7d..d5d62245f73c 100644 2.18.4 -From b4ba3818c60c53d9b0d947d39968c4c9e2e54ab9 Mon Sep 17 00:00:00 2001 +From e4b2b055bee1d225d0070478cab13479f334a8a8 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 7 Jul 2020 09:01:54 +0100 -Subject: [PATCH 0991/1148] ARM: dts: Make bcm2711 dts more like 5.7 +Subject: [PATCH 0986/1209] ARM: dts: Make bcm2711 dts more like 5.7 The multiple declarations of pixelvalve2 were causing problems for the DT checkers. Aligning the dts files closer to the later kernel versions @@ -448104,10 +447871,10 @@ index 4b98dba51e59..4f87bb4fd3d1 100644 2.18.4 -From bb7f08b1fd241ebc2895c2aba124d8aae6cef823 Mon Sep 17 00:00:00 2001 +From 3ab4046c37c1afa043759fd4204a2ffd958369e6 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 1 Jul 2020 20:28:27 +0100 -Subject: [PATCH 0992/1148] bcm2835-dma: Add NO_WAIT_RESP flag +Subject: [PATCH 0987/1209] bcm2835-dma: Add NO_WAIT_RESP flag Use bit 27 of the dreq value (the second cell of the DT DMA descriptor) to request that the WAIT_RESP bit is not set. @@ -448164,10 +447931,10 @@ index 53346d7eb66c..9fec52489421 100644 2.18.4 -From a10d04115b306eb9557e21505fb66758a8ef6162 Mon Sep 17 00:00:00 2001 +From 29c946cf19fee8c1666b42bc1692beb793b49401 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 7 Jul 2020 14:08:55 +0100 -Subject: [PATCH 0993/1148] ARM: dts: Restore the old 2711 scb ranges property +Subject: [PATCH 0988/1209] ARM: dts: Restore the old 2711 scb ranges property The back-ported value breaks PCIe. @@ -448194,10 +447961,10 @@ index e8c6a0dfc9f7..4a3659d21997 100644 2.18.4 -From dc3525c2a3075712d9e09643653ab80a05703e1f Mon Sep 17 00:00:00 2001 +From 7f3434ed3ed5adc524367fd3214c75057e26d4f6 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 7 Jul 2020 14:22:25 +0100 -Subject: [PATCH 0994/1148] configs: Enable CONFIG_BLK_DEV_NVME=m +Subject: [PATCH 0989/1209] configs: Enable CONFIG_BLK_DEV_NVME=m Enable support for NVME SSDs. @@ -448235,10 +448002,10 @@ index 9656ca9f5316..656068a1bbb8 100644 2.18.4 -From 37aab2f45b37a0cd0494c19f4924b6be1f7626a1 Mon Sep 17 00:00:00 2001 +From fa01cf5e2e175e847ded03282a5d851b6954c7f3 Mon Sep 17 00:00:00 2001 From: Zefa Chen Date: Fri, 17 May 2019 18:23:03 +0800 -Subject: [PATCH 0995/1148] media: i2c: add ov9281 driver. +Subject: [PATCH 0990/1209] media: i2c: add ov9281 driver. Change-Id: I7b77250bbc56d2f861450cf77271ad15f9b88ab1 Signed-off-by: Zefa Chen @@ -449464,10 +449231,10 @@ index 000000000000..4a6324a3e5da 2.18.4 -From 9b4dea84f478d87d0d2cd2e80296c0dc76b3a85f Mon Sep 17 00:00:00 2001 +From 9832d9f0c4d7021a94dbf1c392d1409d59fab4c5 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 14 Apr 2020 15:47:09 +0100 -Subject: [PATCH 0996/1148] media: i2c: ov9281: fix mclk issue when probe +Subject: [PATCH 0991/1209] media: i2c: ov9281: fix mclk issue when probe multiple camera. Takes the ov9281 part only from the Rockchip's patch. @@ -449530,10 +449297,10 @@ index 4a6324a3e5da..0d6759942f79 100644 2.18.4 -From 8adc08102039e3a3dfba4c04745914b8da841397 Mon Sep 17 00:00:00 2001 +From baba484ed4893b53097b31174aadb675edd51d58 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 14 Apr 2020 15:51:50 +0100 -Subject: [PATCH 0997/1148] media: i2c: ov9281: add enum_frame_interval +Subject: [PATCH 0992/1209] media: i2c: ov9281: add enum_frame_interval function for iq tool 2.2 and hal3 Adds the ov9281 parts of the Rockchip patch adding enum_frame_interval to @@ -449633,10 +449400,10 @@ index 0d6759942f79..273aa904683c 100644 2.18.4 -From 7ba863eb85b7b8733e90514175596e0c146ff192 Mon Sep 17 00:00:00 2001 +From f80effcc7358aa48f15e638ee7a1acfb04940bd5 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 14 Apr 2020 16:12:33 +0100 -Subject: [PATCH 0998/1148] media: i2c: ov9281: Fixup for recent kernel +Subject: [PATCH 0993/1209] media: i2c: ov9281: Fixup for recent kernel releases, and remove custom code The Rockchip driver was based on a 4.4 kernel, and had several custom @@ -450330,10 +450097,10 @@ index 273aa904683c..7b9bea476cfb 100644 2.18.4 -From 30fd44c096842b7fe285f0d586e0c9aa86e42fa0 Mon Sep 17 00:00:00 2001 +From 55a36a9996f1b6db831ab66df2c292ef2eae01bb Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 6 Jul 2020 17:51:32 +0100 -Subject: [PATCH 0999/1148] media: i2c: ov9281: Read chip ID via 2 reads +Subject: [PATCH 0994/1209] media: i2c: ov9281: Read chip ID via 2 reads Vision Components have made an OV9281 module which blocks reading back the majority of registers to comply with NDAs, and in doing @@ -450378,10 +450145,10 @@ index 7b9bea476cfb..bb8efc3d3cba 100644 2.18.4 -From 0862d55aa66310b7858b0d3abb6b5576abe4a790 Mon Sep 17 00:00:00 2001 +From 2ee733f0b3a3fdfc70ae1ffd5336a710808476aa Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 6 Jul 2020 17:32:21 +0100 -Subject: [PATCH 1000/1148] dtoverlay: Add overlay for Omnivision OV9281 image +Subject: [PATCH 0995/1209] dtoverlay: Add overlay for Omnivision OV9281 image sensor Adds an overlay for the OV9281 mono imaging sensor using 2 CSI-2 @@ -450546,10 +450313,10 @@ index 000000000000..4411c9d96564 2.18.4 -From 41f7bbde522a67d559077fa5b15d7c3505f66cca Mon Sep 17 00:00:00 2001 +From 52c07b18785f7374daa5d7444e00112bda1a7df9 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 6 Jul 2020 18:45:01 +0100 -Subject: [PATCH 1001/1148] defconfigs: Add OV9281 to all the Pi defconfigs +Subject: [PATCH 0996/1209] defconfigs: Add OV9281 to all the Pi defconfigs Adds the driver for use by the dtoverlay. @@ -450626,10 +450393,10 @@ index 99ed08604d56..e238f963d172 100644 2.18.4 -From 0e639aca70d6328a654852b18914b11b4791908b Mon Sep 17 00:00:00 2001 +From 5e2014e6b43d34131a0fab40cb6113ac8b586c6e Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sun, 6 Oct 2019 17:28:19 +0200 -Subject: [PATCH 1002/1148] Bluetooth: hci_bcm: Fix RTS handling during startup +Subject: [PATCH 0997/1209] Bluetooth: hci_bcm: Fix RTS handling during startup commit 3347a80965b38f096b1d6f995c00c9c9e53d4b8b upstream. @@ -450665,10 +450432,10 @@ index 94ed734c1d7e..f204ae626c69 100644 2.18.4 -From 14e1fdf1e0a329666b0c9476439e8ae7ce9eb658 Mon Sep 17 00:00:00 2001 +From 360e52005bc62ac8f0b99a355017199d1388c3e2 Mon Sep 17 00:00:00 2001 From: Abhishek Pandit-Subedi Date: Fri, 25 Oct 2019 14:54:26 -0700 -Subject: [PATCH 1003/1148] Bluetooth: hci_bcm: Add compatible string for +Subject: [PATCH 0998/1209] Bluetooth: hci_bcm: Add compatible string for BCM43540 commit d462af20dbfa1b9b1a831412f32d9d6757b82459 upstream. @@ -450699,10 +450466,10 @@ index f204ae626c69..31943895b22e 100644 2.18.4 -From 05385375208dd5bb1d873645772011ccdcb6f787 Mon Sep 17 00:00:00 2001 +From 088cd1140a147fee868f9fb9de81589e96968eb8 Mon Sep 17 00:00:00 2001 From: Mohammad Rasim Date: Wed, 20 Nov 2019 14:02:35 +0300 -Subject: [PATCH 1004/1148] Bluetooth: btbcm: Add entry for BCM4335A0 UART +Subject: [PATCH 0999/1209] Bluetooth: btbcm: Add entry for BCM4335A0 UART bluetooth commit 1199ab4c9e1d4cdfbabd70b4aadbc8e72c691f65 upstream. @@ -450765,10 +450532,10 @@ index 31943895b22e..d5b6467b0e9f 100644 2.18.4 -From a47ffb814e4f6b897ce9fa8ec09d2f8f531623b9 Mon Sep 17 00:00:00 2001 +From 8fd8a19f14749f660949589ccfd2dc626bac75ef Mon Sep 17 00:00:00 2001 From: Abhishek Pandit-Subedi Date: Tue, 26 Nov 2019 08:17:29 +0100 -Subject: [PATCH 1005/1148] Bluetooth: hci_bcm: Disallow set_baudrate for +Subject: [PATCH 1000/1209] Bluetooth: hci_bcm: Disallow set_baudrate for BCM4354 commit 5d6f391073d5c1c903ac12be72c66b96b2ae93f4 upstream. @@ -450886,10 +450653,10 @@ index d5b6467b0e9f..84a32c58712e 100644 2.18.4 -From 77d4959e6b703dd02f475ea1a9e771e0b1aba8ae Mon Sep 17 00:00:00 2001 +From 1a311b497760f3be0a42e39618b9206dc0b931ce Mon Sep 17 00:00:00 2001 From: Abhishek Pandit-Subedi Date: Tue, 26 Nov 2019 08:17:30 +0100 -Subject: [PATCH 1006/1148] Bluetooth: btbcm: Support pcm configuration +Subject: [PATCH 1001/1209] Bluetooth: btbcm: Support pcm configuration commit 528379902337102b0264fe5343eafb3d6c59fa45 upstream. @@ -451018,10 +450785,10 @@ index d204be8a84bf..3c7dd0765837 100644 2.18.4 -From c4c5af4750dc38035dd6ad0703ea07ac7243c52e Mon Sep 17 00:00:00 2001 +From 0d7a00a85219f24c8f71b06d230428713bda42fb Mon Sep 17 00:00:00 2001 From: Abhishek Pandit-Subedi Date: Tue, 26 Nov 2019 08:17:32 +0100 -Subject: [PATCH 1007/1148] Bluetooth: hci_bcm: Support pcm params in dts +Subject: [PATCH 1002/1209] Bluetooth: hci_bcm: Support pcm params in dts commit eb762b94111b646b4f116ebfdbfcadbad14e12b3 upstream. @@ -451098,10 +450865,10 @@ index 84a32c58712e..4f21b60a8a20 100644 2.18.4 -From c6a9eeb28549057a839156dd66510e139fc5d795 Mon Sep 17 00:00:00 2001 +From 9ef74e6bdc971f1aafb7cd421ac53a620ae8ef8b Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Wed, 1 Jan 2020 15:01:34 +0100 -Subject: [PATCH 1008/1148] Bluetooth: hci_bcm: Drive RTS only for BCM43438 +Subject: [PATCH 1003/1209] Bluetooth: hci_bcm: Drive RTS only for BCM43438 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -451196,10 +450963,10 @@ index 4f21b60a8a20..de05b1428289 100644 2.18.4 -From 200d6f69d18e98947297ab6f0cc57b7b6363a3ca Mon Sep 17 00:00:00 2001 +From 33510c29288585680a3d26031de100c117f0f713 Mon Sep 17 00:00:00 2001 From: Joerg Schambacher Date: Tue, 7 Jul 2020 15:09:06 +0200 -Subject: [PATCH 1009/1148] Enhances the DAC+ driver to control the optional +Subject: [PATCH 1004/1209] Enhances the DAC+ driver to control the optional headphone amplifier Probes on the I2C bus for TPA6130A2, if successful, it sets DT-parameter @@ -451338,10 +451105,10 @@ index 4cde60a5b6f6..286a62c3ff48 100644 2.18.4 -From e771c485511f536e4c0e61443b5b253d91d35069 Mon Sep 17 00:00:00 2001 +From 60b458b81383accb503c6b9746da0e211e34ec9c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 8 Jul 2020 17:33:06 +0100 -Subject: [PATCH 1010/1148] ARM: dts: hifiberry-dacplus headphone amp support +Subject: [PATCH 1005/1209] ARM: dts: hifiberry-dacplus headphone amp support Signed-off-by: Phil Elwell --- @@ -451368,10 +451135,10 @@ index 2ca3d886ebb7..ff19015ba656 100644 2.18.4 -From b9c7e2c78da7a3c698509977dbede375d755cc71 Mon Sep 17 00:00:00 2001 +From fb637057496f6ecbb0a03382c1b7b6727b3e66de Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 7 Jul 2020 10:31:53 +0100 -Subject: [PATCH 1011/1148] media: i2c: imx290: Explicitly set v&h blank on +Subject: [PATCH 1006/1209] media: i2c: imx290: Explicitly set v&h blank on mode change __v4l2_ctrl_modify_range only updates the current value should @@ -451420,10 +451187,10 @@ index 9431c2b917ed..0aa3940c577e 100644 2.18.4 -From a817de6f8b3445254bbdd68e4fb19f4388c7a746 Mon Sep 17 00:00:00 2001 +From 7e936dbeb6d0e3fb4c15dedba0d33ae9553b67b4 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 7 Jul 2020 11:23:48 +0100 -Subject: [PATCH 1012/1148] media: i2c: imx290: Add support for g_selection to +Subject: [PATCH 1007/1209] media: i2c: imx290: Add support for g_selection to report cropping Userspace needs to know the cropping arrangements for each mode, @@ -451582,10 +451349,10 @@ index 0aa3940c577e..5b7083b7050e 100644 2.18.4 -From b2e3e62f8764da313469482acb7e950f07add0c0 Mon Sep 17 00:00:00 2001 +From 7fcda3fa99d0584a0ca8f7c6387c54afc2b9df48 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 7 Jul 2020 11:51:26 +0100 -Subject: [PATCH 1013/1148] media: i2c: imx290: Set the colorspace fields in +Subject: [PATCH 1008/1209] media: i2c: imx290: Set the colorspace fields in the format The colorspace fields were left untouched in imx290_set_fmt @@ -451619,10 +451386,10 @@ index 5b7083b7050e..0057e0b98912 100644 2.18.4 -From d99040ff56bfe21caee789a7bd6083dfa667294c Mon Sep 17 00:00:00 2001 +From 08b852548eecd8afa3ea443e93f35aa7c233ca79 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 7 Jul 2020 14:23:40 +0100 -Subject: [PATCH 1014/1148] media: bcm2835-unicam: Reinstate V4L2_CAP_READWRITE +Subject: [PATCH 1009/1209] media: bcm2835-unicam: Reinstate V4L2_CAP_READWRITE in the caps v4l2-compliance throws a failure if the device doesn't advertise @@ -451653,10 +451420,10 @@ index 3b082587dd14..6b7780ec8ec6 100644 2.18.4 -From b7bd21f59465925db6a514b449d6df084e8b6442 Mon Sep 17 00:00:00 2001 +From c2fda035839cb6c9e999b821fdce8aab84ee201d Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 7 Jul 2020 14:52:43 +0100 -Subject: [PATCH 1015/1148] media: bcm2835-unicam: Ensure type is VIDEO_CAPTURE +Subject: [PATCH 1010/1209] media: bcm2835-unicam: Ensure type is VIDEO_CAPTURE in [g|s]_selection [g|s]_selection pass in a buffer type that needs to be validated @@ -451695,10 +451462,10 @@ index 6b7780ec8ec6..c2b9d89f0ae5 100644 2.18.4 -From 86ec25374c4530eaa2c0280a4cf278d7f0058b2b Mon Sep 17 00:00:00 2001 +From 4a719c12329b2f2d4cd16ff17bb2c895cb5f9a1c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Jul 2020 14:34:34 +0100 -Subject: [PATCH 1016/1148] configs: Add CAN_EMS_USB=m +Subject: [PATCH 1011/1209] configs: Add CAN_EMS_USB=m See: https://github.com/raspberrypi/linux/issues/3716 @@ -451775,10 +451542,10 @@ index e238f963d172..c028ffce473a 100644 2.18.4 -From 3e9459c2cb91b31bcb7500e468143cd989879e81 Mon Sep 17 00:00:00 2001 +From 34079e1d1b5a2d5a2f7831a39d4235b27ca2c38b Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 7 Jul 2020 16:12:05 +0100 -Subject: [PATCH 1017/1148] dtoverlays: Create an overlay for the Omnivision +Subject: [PATCH 1012/1209] dtoverlays: Create an overlay for the Omnivision OV7251 sensor Adds an overlay for the OV7251 VGA global shutter sensor. @@ -451943,10 +451710,10 @@ index 000000000000..f04eafd4adf9 2.18.4 -From 3b565135efcc3db7189adf496b96603a4b4e3a22 Mon Sep 17 00:00:00 2001 +From c5003356ebd619966e8d7df1c8bbc254d9b9e478 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 7 Jul 2020 16:14:36 +0100 -Subject: [PATCH 1018/1148] defconfigs: Add the Omnivision OV7251 sensor driver +Subject: [PATCH 1013/1209] defconfigs: Add the Omnivision OV7251 sensor driver to the defconfigs Signed-off-by: Dave Stevenson @@ -452022,10 +451789,10 @@ index c028ffce473a..1d42667e3c11 100644 2.18.4 -From da532e6a621f6c686079c63b8f424b7e11283405 Mon Sep 17 00:00:00 2001 +From 5b4d4cc1614a2f35d5c5de063ed056208fb83e99 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 10 Mar 2020 22:21:15 +0000 -Subject: [PATCH 1019/1148] vc4_hdmi: Set HDMI_MAI_FMT +Subject: [PATCH 1014/1209] vc4_hdmi: Set HDMI_MAI_FMT The hardware uses this for generating the right audio data island packets when using formats other than PCM @@ -452154,10 +451921,10 @@ index 4d017572a5c2..a388a9265afc 100644 2.18.4 -From 24baa6299cd1ce2529567632ac31afe9400d90b9 Mon Sep 17 00:00:00 2001 +From 6c0f1d77a346a6538790daed7c33c0131b114d40 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Tue, 17 Mar 2020 12:12:22 +0100 -Subject: [PATCH 1020/1148] drm/vc4: add iec958 controls to vc4_hdmi +Subject: [PATCH 1015/1209] drm/vc4: add iec958 controls to vc4_hdmi Although vc4 get an IEC958 formatted stream passed in from userspace the driver needs the info from the channel status bits to properly @@ -452281,10 +452048,10 @@ index 60f7bf99e06e..5914de41705c 100644 2.18.4 -From 56cea755a4e4131413542b1bc77593828938ab06 Mon Sep 17 00:00:00 2001 +From 986157aecf007a505ccf9b05387097be0644c535 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Thu, 19 Mar 2020 20:00:35 +0100 -Subject: [PATCH 1021/1148] drm/vc4: move setup from hw_params to prepare +Subject: [PATCH 1016/1209] drm/vc4: move setup from hw_params to prepare Configuring HDMI audio registers in prepare allows us to take IEC958 bits into account which are set by the alsa hook after @@ -452343,10 +452110,10 @@ index 913dbcc7a7dd..d6961466e2eb 100644 2.18.4 -From f0c9841e6fd98643cd2e5a4df09af1a73e5387ed Mon Sep 17 00:00:00 2001 +From 671eb9bb28746be6841f61e67a50331e9cc86ca9 Mon Sep 17 00:00:00 2001 From: Dom Cobley Date: Fri, 10 Jul 2020 11:51:16 +0100 -Subject: [PATCH 1022/1148] drm/vc4: enable HBR MAI format on HBR streams +Subject: [PATCH 1017/1209] drm/vc4: enable HBR MAI format on HBR streams Signed-off-by: Matthias Reichl --- @@ -452374,10 +452141,10 @@ index d6961466e2eb..3108e0a1eacd 100644 2.18.4 -From f35541e5f756930c6efe4284e5314f29d6bd30ef Mon Sep 17 00:00:00 2001 +From de6d9de17ae1783d2798df5d48b3a1b08c55a0d3 Mon Sep 17 00:00:00 2001 From: Dom Cobley Date: Thu, 25 Jun 2020 18:48:40 +0100 -Subject: [PATCH 1023/1148] vc4_hdmi: Remove firmware logic for MAI threshold +Subject: [PATCH 1018/1209] vc4_hdmi: Remove firmware logic for MAI threshold setting This was a workaround for bugs in hardware on earlier Pi models @@ -452427,10 +452194,10 @@ index 3108e0a1eacd..19a243c9d805 100644 2.18.4 -From 91badf4e6b364458157787f44b5a09443baef25b Mon Sep 17 00:00:00 2001 +From 98dce41f83f23574c93c92e7813ec94d6778e7ca Mon Sep 17 00:00:00 2001 From: Dom Cobley Date: Tue, 30 Jun 2020 11:23:49 +0100 -Subject: [PATCH 1024/1148] vc_hdmi: Set VC4_HDMI_MAI_CONFIG_FORMAT_REVERSE +Subject: [PATCH 1019/1209] vc_hdmi: Set VC4_HDMI_MAI_CONFIG_FORMAT_REVERSE Without this bit set, HDMI_MAI_FORMAT doesn't pick up the format and samplerate from DVP_CFG_MAI0_FMT and you @@ -452457,10 +452224,10 @@ index 19a243c9d805..5e74a6ca0c99 100644 2.18.4 -From eeb98853fcee5f0ef30b1c99ad01341461ab78fb Mon Sep 17 00:00:00 2001 +From 593519aeef437480846895b9f6ea0844ac4c30df Mon Sep 17 00:00:00 2001 From: Dom Cobley Date: Thu, 2 Jul 2020 19:36:08 +0100 -Subject: [PATCH 1025/1148] dts: Enable NO_WAIT_RESP for hdmi audio dma +Subject: [PATCH 1020/1209] dts: Enable NO_WAIT_RESP for hdmi audio dma Without this set, DVP_CFG_MAI0_CTL indicates occasional DLATE errors when configured to 8 channel 192kHz @@ -452510,10 +452277,10 @@ index e269e75f0f57..e39577e90cc1 100644 2.18.4 -From afc684a90854b8d668f02fcdbeb5d8d449074438 Mon Sep 17 00:00:00 2001 +From fcb4cfb81b48df967ff686a5e50880fcae256554 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 10 Jul 2020 16:57:43 +0100 -Subject: [PATCH 1026/1148] SQUASH: dts: Further simplify firmware clocks +Subject: [PATCH 1021/1209] SQUASH: dts: Further simplify firmware clocks All Pi platforms will use the firmware clocks driver, so declare it in the most common place - bcm2835-rpi.dtsi. @@ -452591,10 +452358,10 @@ index 52b47038ca82..c4c858b984c6 100644 2.18.4 -From 5a25cd0d93727660a047aa75878059e977351bd0 Mon Sep 17 00:00:00 2001 +From 2ca3b5cc9ff7d4add429986cdebd92b6bacd5efe Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Mon, 11 May 2020 13:02:22 +0100 -Subject: [PATCH 1027/1148] media: bcm2835: unicam: Set VPU min clock freq to +Subject: [PATCH 1022/1209] media: bcm2835: unicam: Set VPU min clock freq to 250Mhz. When streaming with Unicam, the VPU must have a clock frequency of at @@ -452753,10 +452520,10 @@ index c2b9d89f0ae5..57c3c5f5db56 100644 2.18.4 -From 2d53e606ae33f2c051f494d4ff4a4e56cb82453d Mon Sep 17 00:00:00 2001 +From 43ae9b020be53e2038da7365c795b4dee3c80541 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Mon, 11 May 2020 13:06:27 +0100 -Subject: [PATCH 1028/1148] dt-bindings: bcm2835-unicam: Update documentation +Subject: [PATCH 1023/1209] dt-bindings: bcm2835-unicam: Update documentation with new clock params Update the documentation to reflect the new "VPU" clock needed @@ -452797,10 +452564,10 @@ index 7714fb374b34..164d0377dcd2 100644 2.18.4 -From 2fb120fc5face9df65ee8c80632a8a8f4a4e290f Mon Sep 17 00:00:00 2001 +From 45a188e8b48772e461563a028148b0c7407c646e Mon Sep 17 00:00:00 2001 From: AMuszkat Date: Tue, 14 Jul 2020 17:51:03 +0200 -Subject: [PATCH 1029/1148] correct SND_SOC_DAILINK_DEFS +Subject: [PATCH 1024/1209] correct SND_SOC_DAILINK_DEFS Signed-off-by: AMuszkat --- @@ -452824,10 +452591,10 @@ index 41965c71c912..db43239d29c9 100644 2.18.4 -From cd00ea107d7d0d4f36c236f97e34058d6aa44188 Mon Sep 17 00:00:00 2001 +From 6f15909cfae7e9b273c1fa2df6baa555910a01ce Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Sat, 9 May 2020 11:04:44 +0200 -Subject: [PATCH 1030/1148] media: dt-bindings: video-interfaces: Document +Subject: [PATCH 1025/1209] media: dt-bindings: video-interfaces: Document 'orientation' property Add the 'orientation' device property, used to specify the device mounting @@ -452873,10 +452640,10 @@ index f884ada0bffc..b1ff492c7da7 100644 2.18.4 -From 5d939383930034224d954d962bce38783fa0f8ab Mon Sep 17 00:00:00 2001 +From 19dede728293a6cbfad3b283302a0d362f4a5b7a Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Sat, 9 May 2020 11:04:45 +0200 -Subject: [PATCH 1031/1148] media: dt-bindings: video-interface: Replace +Subject: [PATCH 1026/1209] media: dt-bindings: video-interface: Replace 'rotation' description Replace the 'rotation' property description by providing a definition @@ -453269,10 +453036,10 @@ index b1ff492c7da7..3920f25a9123 100644 2.18.4 -From 12edaa1cd38f9f5406a6c2a17802fb7da921da03 Mon Sep 17 00:00:00 2001 +From 9511c34ba580603475bfdb9e1a3714d8d9d9c3b5 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Sat, 9 May 2020 11:04:46 +0200 -Subject: [PATCH 1032/1148] media: v4l2-ctrl: Document +Subject: [PATCH 1027/1209] media: v4l2-ctrl: Document V4L2_CID_CAMERA_ORIENTATION Add documentation for the V4L2_CID_CAMERA_ORIENTATION camera @@ -453336,10 +453103,10 @@ index 51c1d5c9eb00..c65a2b66232e 100644 2.18.4 -From 9e29353113903115b93ba0a46c0951317bd64b1f Mon Sep 17 00:00:00 2001 +From 4d628f9c7e845c89c1bd2c114f8d6da22e50e5bb Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Sat, 9 May 2020 11:04:47 +0200 -Subject: [PATCH 1033/1148] media: v4l2-ctrl: Document +Subject: [PATCH 1028/1209] media: v4l2-ctrl: Document V4L2_CID_CAMERA_SENSOR_ROTATION Add documentation for the V4L2_CID_CAMERA_SENSOR_ROTATION camera @@ -453493,10 +453260,10 @@ index c65a2b66232e..e64c1b2c01e8 100644 2.18.4 -From 06840cfbfb07558b1a2ed45a50de0366105ba0a8 Mon Sep 17 00:00:00 2001 +From 32c6ba49dbb630d01081e0161ccdf4eaaa17440f Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Sat, 9 May 2020 11:04:48 +0200 -Subject: [PATCH 1034/1148] media: v4l2-ctrls: Add camera orientation and +Subject: [PATCH 1029/1209] media: v4l2-ctrls: Add camera orientation and rotation Add support for the newly defined V4L2_CID_CAMERA_ORIENTATION @@ -453590,10 +453357,10 @@ index 660574b1b4e7..b6173d8c38f1 100644 2.18.4 -From 0807da5b5376559cd95a9ead318fdea978c7c707 Mon Sep 17 00:00:00 2001 +From fcc779f90467bf8670457a189b5363638898e530 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Sat, 9 May 2020 11:04:49 +0200 -Subject: [PATCH 1035/1148] media: v4l2-fwnode: Add helper to parse device +Subject: [PATCH 1030/1209] media: v4l2-fwnode: Add helper to parse device properties Add an helper function to parse common device properties in the same @@ -453736,10 +453503,10 @@ index f6a7bcd13197..7bb8da2092f6 100644 2.18.4 -From ab022795df766118bd77bf18356c9b3003059883 Mon Sep 17 00:00:00 2001 +From 670c4ba9546a84f6906fbc232e95b9955bea7016 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Sat, 9 May 2020 11:04:52 +0200 -Subject: [PATCH 1036/1148] media: v4l2-ctrls: Add helper to register +Subject: [PATCH 1031/1209] media: v4l2-ctrls: Add helper to register properties Add an helper function to v4l2-ctrls to register controls associated @@ -453858,10 +453625,10 @@ index 65575e9b5a2b..162859aa2138 100644 2.18.4 -From 71461649d84c54abfe14148cb6c8091af0e2a66f Mon Sep 17 00:00:00 2001 +From 52ca1fa3f856e007c1b66b15566317d36f02c055 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 4 Jul 2020 01:45:08 +0300 -Subject: [PATCH 1037/1148] media: i2c: ov5647: Parse and register properties +Subject: [PATCH 1032/1209] media: i2c: ov5647: Parse and register properties Parse device properties and register controls for them using the V4L2 fwnode properties helpers. @@ -453913,10 +453680,10 @@ index 6d84d2785f74..86a821a172b3 100644 2.18.4 -From 208b9c8ba8dfe984b3d80b81e9df58b0b76dd919 Mon Sep 17 00:00:00 2001 +From d099eac99e57a2d40abb5477e44f2d5fb623cd21 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Sat, 9 May 2020 11:04:55 +0200 -Subject: [PATCH 1038/1148] media: i2c: imx219: Parse and register properties +Subject: [PATCH 1033/1209] media: i2c: imx219: Parse and register properties Parse device properties and register controls for them using the newly introduced helpers. @@ -453970,10 +453737,10 @@ index b84fc19e9ff7..812323107f36 100644 2.18.4 -From f7de9725aac24fd938a559d3235da31509f5e336 Mon Sep 17 00:00:00 2001 +From 5791014d1c35ed2b944edff6ffd76139a2c20157 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 4 Jul 2020 01:45:08 +0300 -Subject: [PATCH 1039/1148] media: i2c: imx477: Parse and register properties +Subject: [PATCH 1034/1209] media: i2c: imx477: Parse and register properties Parse device properties and register controls for them using the V4L2 fwnode properties helpers. @@ -454021,10 +453788,10 @@ index e42a8633087d..3fbb173fa079 100644 2.18.4 -From e358df7714dfcc0c524593adb63413544289b47f Mon Sep 17 00:00:00 2001 +From e2d0fe26b1020fb9acb9a938f607088c151cb62a Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 4 Jul 2020 03:04:38 +0300 -Subject: [PATCH 1040/1148] dt/dtoverlays: ov5647: Add parameter to set camera +Subject: [PATCH 1035/1209] dt/dtoverlays: ov5647: Add parameter to set camera module rotation Add a rotation DT overlay parameter to allow specifying the camera @@ -454078,10 +453845,10 @@ index 5eba3cb9fb91..fd1e7a457f69 100644 2.18.4 -From 4afa13c6a90735a20136fd2084a6201d8d2cbfa8 Mon Sep 17 00:00:00 2001 +From 541ee7a3cec7265ff5ba5f635f777e297b6cd4a4 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 4 Jul 2020 03:04:38 +0300 -Subject: [PATCH 1041/1148] dt/dtoverlays: imx219: Add parameter to set camera +Subject: [PATCH 1036/1209] dt/dtoverlays: imx219: Add parameter to set camera module rotation Add a rotation DT overlay parameter to allow specifying the camera @@ -454136,10 +453903,10 @@ index 3c2d3fac93d2..dce07b335c4e 100644 2.18.4 -From b7af8b8252ef65865239e18d47872c1a4b7198cf Mon Sep 17 00:00:00 2001 +From 1b7a0c5f67db2b841a6408207dbbd5c54eb686b9 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 4 Jul 2020 03:04:38 +0300 -Subject: [PATCH 1042/1148] dt/dtoverlays: imx477: Add parameter to set camera +Subject: [PATCH 1037/1209] dt/dtoverlays: imx477: Add parameter to set camera module rotation Add a rotation DT overlay parameter to allow specifying the camera @@ -454194,10 +453961,10 @@ index 73d4f79d54e6..1a97eaaf4c82 100644 2.18.4 -From 984a7d0fc591cb0cc4e1d36cb9b212774c8fda16 Mon Sep 17 00:00:00 2001 +From c20efc6f41cf1b0f773dfc8b04190417c6c8d58c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 16 Jul 2020 12:02:47 +0100 -Subject: [PATCH 1043/1148] drm/vc4: Add DRM_MODE_FLAG_DBLCLK support to +Subject: [PATCH 1038/1209] drm/vc4: Add DRM_MODE_FLAG_DBLCLK support to vc4-fkms 480i and several other modes use DRM_MODE_FLAG_DBLCLK and pixel @@ -454254,10 +454021,10 @@ index ec5c223033c8..31982bda0062 100644 2.18.4 -From 356566e068487bebc777048fe0aa7b9a6257836e Mon Sep 17 00:00:00 2001 +From df3d8dd32c0c1e55535a7b5fe5e5aaa0db7041db Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Jul 2020 10:33:19 +0100 -Subject: [PATCH 1044/1148] leds: Add the actpwr trigger +Subject: [PATCH 1039/1209] leds: Add the actpwr trigger The actpwr trigger is a meta trigger that cycles between an inverted mmc0 and default-on. It is written in a way that could fairly easily @@ -454501,10 +454268,10 @@ index 000000000000..4e89fb314e2c 2.18.4 -From ac4ddf286fd9d5359d725d19689c80119908addf Mon Sep 17 00:00:00 2001 +From 64eb673d8f64e0f45ff4f6a5cfaa4372ff3859a8 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2020 13:18:11 +0100 -Subject: [PATCH 1045/1148] configs: Enable LEDS_TRIGGER_ACTPWR +Subject: [PATCH 1040/1209] configs: Enable LEDS_TRIGGER_ACTPWR Make the combined mmc0 activity & power trigger available to use. @@ -454581,10 +454348,10 @@ index 1d42667e3c11..c7e5eeacb27c 100644 2.18.4 -From 3f35c94f271bdc81deecfc39136f6fb21da2ae5d Mon Sep 17 00:00:00 2001 +From 1fd60263c52a52abaefca9f9cbd796e794180924 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 16 Jul 2020 18:19:58 +0100 -Subject: [PATCH 1046/1148] ARM: dts: Select the actpwr LED trigger on Zeroes +Subject: [PATCH 1041/1209] ARM: dts: Select the actpwr LED trigger on Zeroes The new "actpwr" LED trigger guarantees that the combined PWR and ACT LED is on for at least half of every second. Under heavy SD card @@ -454630,10 +454397,10 @@ index c2f58e84eb32..5655eb4769ea 100644 2.18.4 -From 9b1c3f56338186aa18a7cbe0f3bedeaebd291841 Mon Sep 17 00:00:00 2001 +From 05e764d5d9d35d76e8362e94aa3054dd5e64bd68 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 8 May 2020 22:05:29 +0100 -Subject: [PATCH 1047/1148] staging: vc04_services: isp: Rework lens shading to +Subject: [PATCH 1042/1209] staging: vc04_services: isp: Rework lens shading to take a dmabuf This removes the need for the client to use vcsm at all. @@ -454725,10 +454492,10 @@ index bb16dcbcb40f..cf8c0437f159 100644 2.18.4 -From 5bc08eb00c79597f35ef4c2020c2183af8c43d12 Mon Sep 17 00:00:00 2001 +From 2095d4a5f878fe8ba312164f8d0d5661414e5996 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Fri, 17 Jul 2020 09:17:36 +1000 -Subject: [PATCH 1048/1148] Mute bug fix for the Audioinjector.net isolated +Subject: [PATCH 1043/1209] Mute bug fix for the Audioinjector.net isolated soundcard. --- @@ -454795,10 +454562,10 @@ index 652464658fef..27e1316e387d 100644 2.18.4 -From 8bf3e7950dfb7ee13cd2fafdc6cd116553982a0c Mon Sep 17 00:00:00 2001 +From c2ccd7280c44ce313b3818bb2e33ed0e750e4266 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 17 Jul 2020 17:56:17 +0100 -Subject: [PATCH 1049/1148] configs: Add MAXIM_THERMOCOUPLE=m +Subject: [PATCH 1044/1209] configs: Add MAXIM_THERMOCOUPLE=m See: https://github.com/raspberrypi/linux/issues/3732 @@ -454875,10 +454642,10 @@ index c7e5eeacb27c..04128417383a 100644 2.18.4 -From e3660296d3ac5f14feecdabeafa78d50a288d78d Mon Sep 17 00:00:00 2001 +From 3572fcd91788928a74f6f7e6e3e890437e3ca87a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 20 Apr 2020 18:00:38 +0100 -Subject: [PATCH 1050/1148] vc4: Report channel mapping back to userspace +Subject: [PATCH 1045/1209] vc4: Report channel mapping back to userspace This follows logic in hdmi-codec.c to use speaker layout from ELD to choose a suitable speaker mapping based on @@ -455387,10 +455154,10 @@ index 5914de41705c..e866979a6df5 100644 2.18.4 -From 12f929c0cd72ffc0071e983508580b3a32654cdc Mon Sep 17 00:00:00 2001 +From d4c16dc3de8f5a1ace77df752d6a278646f76d2a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 20 Jul 2020 09:35:46 +0100 -Subject: [PATCH 1051/1148] SQUASH: leds: actpwr - delete unused variable +Subject: [PATCH 1046/1209] SQUASH: leds: actpwr - delete unused variable Signed-off-by: Phil Elwell --- @@ -455413,10 +455180,10 @@ index 4e89fb314e2c..1a52107ceb03 100644 2.18.4 -From 55d24d29cafe8cd944f802c4405586aecc4f3875 Mon Sep 17 00:00:00 2001 +From d25611603ce050100ab9aaeaef393d13e41966fb Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 21 Jul 2020 17:34:09 +0100 -Subject: [PATCH 1052/1148] staging: vchiq_arm: children inherit DMA config +Subject: [PATCH 1047/1209] staging: vchiq_arm: children inherit DMA config Although it is no longer necessary for vchiq's children to have a different DMA configuration to the parent, they do still need to @@ -455455,10 +455222,10 @@ index d55f038637fc..4edfca26410e 100644 2.18.4 -From 6e35c5f513032d7757303dab23c073baabd00c64 Mon Sep 17 00:00:00 2001 +From f40af87d4136e457ae1bea26e936e17a3d593726 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 22 Jul 2020 17:45:24 +0100 -Subject: [PATCH 1053/1148] ARM: dts: 2711 DMA can address 36 bits +Subject: [PATCH 1048/1209] ARM: dts: 2711 DMA can address 36 bits Kernels prior to 5.7 only see the first entry in dma-ranges, so make it cover the full addressable range. @@ -455486,10 +455253,10 @@ index 444a3d74e8f2..c2c63bbef338 100644 2.18.4 -From bf8d8544f13536d44d57ff8150b5a860f1a5d55c Mon Sep 17 00:00:00 2001 +From 2d9985373c1f0d66773a4174c9cc70bd33d4705a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 22 Jul 2020 17:59:31 +0100 -Subject: [PATCH 1054/1148] bcm2835-dma: Advertise the full DMA range +Subject: [PATCH 1049/1209] bcm2835-dma: Advertise the full DMA range Unless the DMA mask is set wider than 32 bits, DMA mapping will use a bounce buffer. @@ -455569,10 +455336,10 @@ index 9fec52489421..5a9b18edc2b7 100644 2.18.4 -From 3094c244cd923d8a772fad2ef08cb50b1234e94d Mon Sep 17 00:00:00 2001 +From bf0548b71dbc3efff7c2819f39810dbbad6472a9 Mon Sep 17 00:00:00 2001 From: iamdavidcz Date: Thu, 23 Jul 2020 23:10:22 +0200 -Subject: [PATCH 1055/1148] add CONFIG_CRYPTO_USER_API_HASH=m +Subject: [PATCH 1050/1209] add CONFIG_CRYPTO_USER_API_HASH=m --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -455646,10 +455413,10 @@ index 04128417383a..05459f731972 100644 2.18.4 -From b1e4d5b756b5f3120cb5e2759ff866a2c0adb569 Mon Sep 17 00:00:00 2001 +From f02fb2bbf2de0b7a87b8b90a4d734f91f7232cd5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 27 Jul 2020 14:56:16 +0100 -Subject: [PATCH 1056/1148] configs: Adding remaining crypto API modules +Subject: [PATCH 1051/1209] configs: Adding remaining crypto API modules Now that CONFIG_CRYPTO_USER_API_HASH=m is enabled, adding CONFIG_CRYPTO_USER_API_RNG=m and CONFIG_CRYPTO_USER_API_AEAD=m should @@ -455735,10 +455502,10 @@ index 05459f731972..11f3ff5d60f8 100644 2.18.4 -From 52a346374801958e73aa3230d6369e9fc44a10ab Mon Sep 17 00:00:00 2001 +From 2fda744b2adeb7328b80639b764fcaac65ea5c1c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 27 Jul 2020 15:34:19 +0100 -Subject: [PATCH 1057/1148] configs: Restore missing cgroups to BCM2835-7 +Subject: [PATCH 1052/1209] configs: Restore missing cgroups to BCM2835-7 See: https://github.com/raspberrypi/linux/issues/3644 @@ -455792,10 +455559,10 @@ index 11f3ff5d60f8..feca764ecd74 100644 2.18.4 -From 92c26b716c6b91f0e0759296552132303ad91c8f Mon Sep 17 00:00:00 2001 +From aa979d899902b8383c8a699fd19403d12a47babb Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 17 Jul 2020 11:20:07 +0100 -Subject: [PATCH 1058/1148] ARM: dts: Add UART skip-init properties for U-boot +Subject: [PATCH 1053/1209] ARM: dts: Add UART skip-init properties for U-boot U-boot can get stuck trying to initialise UARTs that aren't mapped to the pin header. There is no reason for U-boot not to rely on the @@ -455833,10 +455600,10 @@ index e3d90b4262f1..68a7e1c09db1 100644 2.18.4 -From 7c8286acfa657b6601c96c9436be350e95446af8 Mon Sep 17 00:00:00 2001 +From 381a98d5fb89ef87f755734e4d9537bb25664bc2 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 28 Jul 2020 13:01:42 +0100 -Subject: [PATCH 1059/1148] drm/vc4: Remove UIF from the list of modifiers +Subject: [PATCH 1054/1209] drm/vc4: Remove UIF from the list of modifiers returned by format_mod_supported FKMS was listing UIF in the supported modifiers from format_mod_supported @@ -455868,10 +455635,10 @@ index 31982bda0062..7802020cc3c0 100644 2.18.4 -From 39e6c616ed9d97ed15ff086670f773022516009e Mon Sep 17 00:00:00 2001 +From 587e5f57f4a9b75005216102b06e337e0a827dd9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 29 Jul 2020 13:47:55 +0100 -Subject: [PATCH 1060/1148] ARM: proc-v7: Force misalignment of early stmia +Subject: [PATCH 1055/1209] ARM: proc-v7: Force misalignment of early stmia In an attempt to prevent the problem of CPUn not starting, explicitly misalign the scratch space used to save registers acros the cache @@ -455934,10 +455701,10 @@ index c4e8006a1a8c..d5d63b9fbe22 100644 2.18.4 -From e8259282386db8d5d73283bf40a726e330dce708 Mon Sep 17 00:00:00 2001 +From b2e1aba299c90105f193a4b2e1065e17ddd0670c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 30 Jul 2020 15:13:09 +0100 -Subject: [PATCH 1061/1148] overlays: Fix sc16is75x overlays w.r.t. serdev +Subject: [PATCH 1056/1209] overlays: Fix sc16is75x overlays w.r.t. serdev Enabling serdev support in rpi-5.4.y had the unintended consequence of making any UART device node with a subnode look like a "serdev" node, @@ -456128,10 +455895,10 @@ index ffdea106434a..730c6e8cd614 100644 2.18.4 -From e20a1921b60914a86b9ed495c2e03547d6970e2e Mon Sep 17 00:00:00 2001 +From b44ab4e69075c272c3125425dafe90255881f6f2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 30 Jul 2020 18:06:24 +0100 -Subject: [PATCH 1062/1148] overlays: Delete spi0-hw-cs +Subject: [PATCH 1057/1209] overlays: Delete spi0-hw-cs The spi0-hw-cs overlay is unnecessary (and actually harmful) with the current kernels. Delete it, leaving a note in the README and a @@ -456228,10 +455995,10 @@ index 168a0dc80ad1..000000000000 2.18.4 -From 00581ddf750606a2280c4422fc92aa85abe884ce Mon Sep 17 00:00:00 2001 +From dd8a8fe80dde46858e8551587a6fa94f28a0baf8 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Tue, 22 Oct 2019 10:36:24 +0200 -Subject: [PATCH 1063/1148] backlight: gpio: Explicitly set the direction of +Subject: [PATCH 1058/1209] backlight: gpio: Explicitly set the direction of the GPIO commit 706dc68102bc7421a9e6573d149ab6d769d71cc7 upstream. @@ -456322,10 +456089,10 @@ index 18e053e4716c..40e94eb7a7b3 100644 2.18.4 -From 0c273ae423b3826924cac69363e0eee9a044c292 Mon Sep 17 00:00:00 2001 +From c1eac0699769f9c07755d16b89893ad06de9c61c Mon Sep 17 00:00:00 2001 From: Dougie Lawson Date: Mon, 27 Jul 2020 23:52:40 +0100 -Subject: [PATCH 1064/1148] overlays: Add maxtherm overlay for MAX6675/31855 +Subject: [PATCH 1059/1209] overlays: Add maxtherm overlay for MAX6675/31855 Add an overlay - maxtherm - to support the MAX6675 and MAX31855 family of thermocouples. @@ -456571,10 +456338,10 @@ index 000000000000..34d5727069ec 2.18.4 -From 582429715da2f3f95d89f6dfca0d68b194d917f5 Mon Sep 17 00:00:00 2001 +From cc4e16dfb15b3e7f93848a2ca98b02f76fb7abca Mon Sep 17 00:00:00 2001 From: Annaliese McDermond Date: Sun, 2 Aug 2020 18:19:43 +0000 -Subject: [PATCH 1065/1148] configs: add CONFIG_SENSORS_IIO_HWMON=m +Subject: [PATCH 1060/1209] configs: add CONFIG_SENSORS_IIO_HWMON=m The hwmon module for the ads1015 was removed from the kernel in favor of the IIO version. This patch adds the bridge driver @@ -456654,10 +456421,10 @@ index feca764ecd74..497a14e0a6aa 100644 2.18.4 -From 1f0f7b4639bb162a11712fa79f0f18822f518cc0 Mon Sep 17 00:00:00 2001 +From df668c8e89dfcca3390d9a42fc85c8d2fafe29af Mon Sep 17 00:00:00 2001 From: Annaliese McDermond Date: Sun, 2 Aug 2020 18:25:07 +0000 -Subject: [PATCH 1066/1148] dtoverlays: Add the iio_hwmon driver to correct ADC +Subject: [PATCH 1061/1209] dtoverlays: Add the iio_hwmon driver to correct ADC issues The Linux kernel maintainers removed the hwmon driver for the @@ -456700,10 +456467,10 @@ index 08bfce0edb23..d18187d7f343 100644 2.18.4 -From 0e4de8b1ae2a9a1162396327bf7a77b14d6e81bb Mon Sep 17 00:00:00 2001 +From e7d71df7387a55a675244ab3806e688851bb1898 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 14 Jul 2020 14:03:44 +0200 -Subject: [PATCH 1067/1148] Revert "ath9k: Fix general protection fault in +Subject: [PATCH 1062/1209] Revert "ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb" This reverts commit b5c8896bc14f54e5c4dd5a6e42879f125b8abd2d which is @@ -456722,10 +456489,10 @@ Signed-off-by: Greg Kroah-Hartman 2 files changed, 11 insertions(+), 42 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c -index 3f563e02d17d..27a1c8960130 100644 +index 2ed98aaed6fb..edaafa2d4715 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c -@@ -643,9 +643,9 @@ static void ath9k_hif_usb_rx_stream(struct hif_device_usb *hif_dev, +@@ -652,9 +652,9 @@ static void ath9k_hif_usb_rx_stream(struct hif_device_usb *hif_dev, static void ath9k_hif_usb_rx_cb(struct urb *urb) { @@ -456738,7 +456505,7 @@ index 3f563e02d17d..27a1c8960130 100644 int ret; if (!skb) -@@ -685,15 +685,14 @@ static void ath9k_hif_usb_rx_cb(struct urb *urb) +@@ -694,15 +694,14 @@ static void ath9k_hif_usb_rx_cb(struct urb *urb) return; free: kfree_skb(skb); @@ -456757,7 +456524,7 @@ index 3f563e02d17d..27a1c8960130 100644 int ret; if (!skb) -@@ -753,7 +752,6 @@ static void ath9k_hif_usb_reg_in_cb(struct urb *urb) +@@ -762,7 +761,6 @@ static void ath9k_hif_usb_reg_in_cb(struct urb *urb) return; free: kfree_skb(skb); @@ -456765,7 +456532,7 @@ index 3f563e02d17d..27a1c8960130 100644 urb->context = NULL; } -@@ -799,7 +797,7 @@ static int ath9k_hif_usb_alloc_tx_urbs(struct hif_device_usb *hif_dev) +@@ -818,7 +816,7 @@ static int ath9k_hif_usb_alloc_tx_urbs(struct hif_device_usb *hif_dev) init_usb_anchor(&hif_dev->mgmt_submitted); for (i = 0; i < MAX_TX_URB_NUM; i++) { @@ -456774,7 +456541,7 @@ index 3f563e02d17d..27a1c8960130 100644 if (!tx_buf) goto err; -@@ -836,9 +834,8 @@ static void ath9k_hif_usb_dealloc_rx_urbs(struct hif_device_usb *hif_dev) +@@ -855,9 +853,8 @@ static void ath9k_hif_usb_dealloc_rx_urbs(struct hif_device_usb *hif_dev) static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev) { @@ -456785,7 +456552,7 @@ index 3f563e02d17d..27a1c8960130 100644 int i, ret; init_usb_anchor(&hif_dev->rx_submitted); -@@ -846,12 +843,6 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev) +@@ -865,12 +862,6 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev) for (i = 0; i < MAX_RX_URB_NUM; i++) { @@ -456798,7 +456565,7 @@ index 3f563e02d17d..27a1c8960130 100644 /* Allocate URB */ urb = usb_alloc_urb(0, GFP_KERNEL); if (urb == NULL) { -@@ -866,14 +857,11 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev) +@@ -885,14 +876,11 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev) goto err_skb; } @@ -456814,7 +456581,7 @@ index 3f563e02d17d..27a1c8960130 100644 /* Anchor URB */ usb_anchor_urb(urb, &hif_dev->rx_submitted); -@@ -899,8 +887,6 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev) +@@ -918,8 +906,6 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev) err_skb: usb_free_urb(urb); err_urb: @@ -456823,7 +456590,7 @@ index 3f563e02d17d..27a1c8960130 100644 ath9k_hif_usb_dealloc_rx_urbs(hif_dev); return ret; } -@@ -912,21 +898,14 @@ static void ath9k_hif_usb_dealloc_reg_in_urbs(struct hif_device_usb *hif_dev) +@@ -931,21 +917,14 @@ static void ath9k_hif_usb_dealloc_reg_in_urbs(struct hif_device_usb *hif_dev) static int ath9k_hif_usb_alloc_reg_in_urbs(struct hif_device_usb *hif_dev) { @@ -456846,7 +456613,7 @@ index 3f563e02d17d..27a1c8960130 100644 /* Allocate URB */ urb = usb_alloc_urb(0, GFP_KERNEL); if (urb == NULL) { -@@ -941,14 +920,11 @@ static int ath9k_hif_usb_alloc_reg_in_urbs(struct hif_device_usb *hif_dev) +@@ -960,14 +939,11 @@ static int ath9k_hif_usb_alloc_reg_in_urbs(struct hif_device_usb *hif_dev) goto err_skb; } @@ -456862,7 +456629,7 @@ index 3f563e02d17d..27a1c8960130 100644 /* Anchor URB */ usb_anchor_urb(urb, &hif_dev->reg_in_submitted); -@@ -974,8 +950,6 @@ static int ath9k_hif_usb_alloc_reg_in_urbs(struct hif_device_usb *hif_dev) +@@ -993,8 +969,6 @@ static int ath9k_hif_usb_alloc_reg_in_urbs(struct hif_device_usb *hif_dev) err_skb: usb_free_urb(urb); err_urb: @@ -456891,10 +456658,10 @@ index 5985aa15ca93..a94e7e1c86e9 100644 2.18.4 -From 69a84ccb9346fb4e757b603492d60c844eaedbbe Mon Sep 17 00:00:00 2001 +From 2adcebd3d576e8809794bd3fc32580d070fd1070 Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Fri, 7 Aug 2020 13:55:18 +0100 -Subject: [PATCH 1068/1148] dts: bcm2711: Disable DVP by default +Subject: [PATCH 1063/1209] dts: bcm2711: Disable DVP by default The HDMI DVP should be disabled by default as is the case for other display related drivers. This changes resolves an issue when using @@ -456943,10 +456710,10 @@ index 935e9469e318..3c662cea4e1f 100644 2.18.4 -From 0ddc7fe913fcb29667e6e4e402e3c382ff9e4bdb Mon Sep 17 00:00:00 2001 +From a33540e727df1080ce4e32a652287372bf3b4c2e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 5 Aug 2020 17:34:27 +0100 -Subject: [PATCH 1069/1148] config: Add USB gadget support to bcm2711 config +Subject: [PATCH 1064/1209] config: Add USB gadget support to bcm2711 config Signed-off-by: Phil Elwell --- @@ -457002,10 +456769,10 @@ index 085507434521..7ea2b663bdc0 100644 2.18.4 -From 093c1764556350fc1760456361ecc2d0942c0bd7 Mon Sep 17 00:00:00 2001 +From 964a832717f748821d10b2d2dcbcacac193e5323 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 5 Aug 2020 17:35:48 +0100 -Subject: [PATCH 1070/1148] ARM: dts: Add required USB power domain for XCHI +Subject: [PATCH 1065/1209] ARM: dts: Add required USB power domain for XCHI The firmware setting otg_mode=1 can be used to enable the onboard XHCI controller in host mode, but that requires that the USB power domain @@ -457032,10 +456799,10 @@ index 0d804cc824e0..b624ab54ad05 100644 2.18.4 -From 3fc4908e69a0d101e26e8a56af71770cde5436a9 Mon Sep 17 00:00:00 2001 +From 1902b146a0404c065da47f871a7587555685a358 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 12 Aug 2020 10:15:52 +0100 -Subject: [PATCH 1071/1148] overlays: Regenerate upstream-pi4 +Subject: [PATCH 1066/1209] overlays: Regenerate upstream-pi4 The recent modification to vc4-kms-v3d-pi4 also results in a change to the Pi 4 version of the upstream overlay. @@ -457066,10 +456833,10 @@ index 30130f09fbc6..d88bbcfc36d1 100644 2.18.4 -From 19aa40565fbfe679fa23c66fbfaf0877c81e9560 Mon Sep 17 00:00:00 2001 +From a0fc56728f271ea7c3af89d890ead41cd35612cf Mon Sep 17 00:00:00 2001 From: Qiujun Huang Date: Sat, 4 Apr 2020 12:18:38 +0800 -Subject: [PATCH 1072/1148] ath9k: Fix general protection fault in +Subject: [PATCH 1067/1209] ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -457122,10 +456889,10 @@ Signed-off-by: Greg Kroah-Hartman 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c -index 27a1c8960130..3f563e02d17d 100644 +index edaafa2d4715..2ed98aaed6fb 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c -@@ -643,9 +643,9 @@ static void ath9k_hif_usb_rx_stream(struct hif_device_usb *hif_dev, +@@ -652,9 +652,9 @@ static void ath9k_hif_usb_rx_stream(struct hif_device_usb *hif_dev, static void ath9k_hif_usb_rx_cb(struct urb *urb) { @@ -457138,7 +456905,7 @@ index 27a1c8960130..3f563e02d17d 100644 int ret; if (!skb) -@@ -685,14 +685,15 @@ static void ath9k_hif_usb_rx_cb(struct urb *urb) +@@ -694,14 +694,15 @@ static void ath9k_hif_usb_rx_cb(struct urb *urb) return; free: kfree_skb(skb); @@ -457157,7 +456924,7 @@ index 27a1c8960130..3f563e02d17d 100644 int ret; if (!skb) -@@ -752,6 +753,7 @@ static void ath9k_hif_usb_reg_in_cb(struct urb *urb) +@@ -761,6 +762,7 @@ static void ath9k_hif_usb_reg_in_cb(struct urb *urb) return; free: kfree_skb(skb); @@ -457165,7 +456932,7 @@ index 27a1c8960130..3f563e02d17d 100644 urb->context = NULL; } -@@ -797,7 +799,7 @@ static int ath9k_hif_usb_alloc_tx_urbs(struct hif_device_usb *hif_dev) +@@ -816,7 +818,7 @@ static int ath9k_hif_usb_alloc_tx_urbs(struct hif_device_usb *hif_dev) init_usb_anchor(&hif_dev->mgmt_submitted); for (i = 0; i < MAX_TX_URB_NUM; i++) { @@ -457174,7 +456941,7 @@ index 27a1c8960130..3f563e02d17d 100644 if (!tx_buf) goto err; -@@ -834,8 +836,9 @@ static void ath9k_hif_usb_dealloc_rx_urbs(struct hif_device_usb *hif_dev) +@@ -853,8 +855,9 @@ static void ath9k_hif_usb_dealloc_rx_urbs(struct hif_device_usb *hif_dev) static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev) { @@ -457185,7 +456952,7 @@ index 27a1c8960130..3f563e02d17d 100644 int i, ret; init_usb_anchor(&hif_dev->rx_submitted); -@@ -843,6 +846,12 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev) +@@ -862,6 +865,12 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev) for (i = 0; i < MAX_RX_URB_NUM; i++) { @@ -457198,7 +456965,7 @@ index 27a1c8960130..3f563e02d17d 100644 /* Allocate URB */ urb = usb_alloc_urb(0, GFP_KERNEL); if (urb == NULL) { -@@ -857,11 +866,14 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev) +@@ -876,11 +885,14 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev) goto err_skb; } @@ -457214,7 +456981,7 @@ index 27a1c8960130..3f563e02d17d 100644 /* Anchor URB */ usb_anchor_urb(urb, &hif_dev->rx_submitted); -@@ -887,6 +899,8 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev) +@@ -906,6 +918,8 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev) err_skb: usb_free_urb(urb); err_urb: @@ -457223,7 +456990,7 @@ index 27a1c8960130..3f563e02d17d 100644 ath9k_hif_usb_dealloc_rx_urbs(hif_dev); return ret; } -@@ -898,14 +912,21 @@ static void ath9k_hif_usb_dealloc_reg_in_urbs(struct hif_device_usb *hif_dev) +@@ -917,14 +931,21 @@ static void ath9k_hif_usb_dealloc_reg_in_urbs(struct hif_device_usb *hif_dev) static int ath9k_hif_usb_alloc_reg_in_urbs(struct hif_device_usb *hif_dev) { @@ -457246,7 +457013,7 @@ index 27a1c8960130..3f563e02d17d 100644 /* Allocate URB */ urb = usb_alloc_urb(0, GFP_KERNEL); if (urb == NULL) { -@@ -920,11 +941,14 @@ static int ath9k_hif_usb_alloc_reg_in_urbs(struct hif_device_usb *hif_dev) +@@ -939,11 +960,14 @@ static int ath9k_hif_usb_alloc_reg_in_urbs(struct hif_device_usb *hif_dev) goto err_skb; } @@ -457262,7 +457029,7 @@ index 27a1c8960130..3f563e02d17d 100644 /* Anchor URB */ usb_anchor_urb(urb, &hif_dev->reg_in_submitted); -@@ -950,6 +974,8 @@ static int ath9k_hif_usb_alloc_reg_in_urbs(struct hif_device_usb *hif_dev) +@@ -969,6 +993,8 @@ static int ath9k_hif_usb_alloc_reg_in_urbs(struct hif_device_usb *hif_dev) err_skb: usb_free_urb(urb); err_urb: @@ -457291,10 +457058,10 @@ index a94e7e1c86e9..5985aa15ca93 100644 2.18.4 -From 71f63c3533c28c03d51033ce5bbdc4d49044f1cd Mon Sep 17 00:00:00 2001 +From c16dc650c6ba61bf146d6da3e4fddb00535cf6dd Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 20 Jul 2020 16:42:57 +0100 -Subject: [PATCH 1073/1148] drm/vc4: Increase the number of planes per crtc in +Subject: [PATCH 1068/1209] drm/vc4: Increase the number of planes per crtc in FKMS. The number assigned was arbitrary as one primary, one overlay, @@ -457402,10 +457169,10 @@ index 7802020cc3c0..bafdd1265289 100644 2.18.4 -From ae6a9226e08abcee60a90e1b3e2082aaa1631a61 Mon Sep 17 00:00:00 2001 +From e2c633d9140422921584f3eb8d61add183f3ed3c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 13 Aug 2020 18:29:56 +0100 -Subject: [PATCH 1074/1148] drm/vc4: Set the possible crtcs mask correctly for +Subject: [PATCH 1069/1209] drm/vc4: Set the possible crtcs mask correctly for planes with FKMS The driver was assigning all planes to crtcs when actually they're @@ -457448,10 +457215,10 @@ index bafdd1265289..0063d78a1b4a 100644 2.18.4 -From 9688180768401c4cfa2f4aa752070708229ece67 Mon Sep 17 00:00:00 2001 +From 7374fb0b3d7c67f4f10bc1ae86436981f6dfcca7 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 13 Aug 2020 16:58:18 +0100 -Subject: [PATCH 1075/1148] staging: vc04_services: codec: Fix incorrect buffer +Subject: [PATCH 1070/1209] staging: vc04_services: codec: Fix incorrect buffer cleanup The allocated input and output buffers are initialised in @@ -457506,10 +457273,10 @@ index 3fe81979aaa1..b6c5a66b4b4a 100644 2.18.4 -From 8092202722e433f84dc51ec5bb59d0be72589691 Mon Sep 17 00:00:00 2001 +From da8be658ab74aa54eb6618f5baa11728fecf75a4 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 13 Aug 2020 17:01:27 +0100 -Subject: [PATCH 1076/1148] staging: vc04_service: codec: Allow start_streaming +Subject: [PATCH 1071/1209] staging: vc04_service: codec: Allow start_streaming to update the buffernum start_streaming passes a count of how many buffers have been queued @@ -457582,10 +457349,10 @@ index b6c5a66b4b4a..427048c0ea31 100644 2.18.4 -From 3107e97642ec9035d29c1518e9c970550aab88c4 Mon Sep 17 00:00:00 2001 +From 48beb4bcae6b8f1853c38f9cec2e3a50a9cf9248 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 13 Aug 2020 17:04:53 +0100 -Subject: [PATCH 1077/1148] staging: vc04_services: codec: Fix component +Subject: [PATCH 1072/1209] staging: vc04_services: codec: Fix component enable/disable start_streaming enabled the VPU component if ctx->component_enabled @@ -457626,10 +457393,10 @@ index 427048c0ea31..14c47e2ea995 100644 2.18.4 -From 550787a4cf659e0dbbdacce272a754e52f0cc3c4 Mon Sep 17 00:00:00 2001 +From d14d13f7dabcd8383fd283596a58702dca5f208b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 14 Aug 2020 17:29:29 +0100 -Subject: [PATCH 1078/1148] configs: Add USB_GADGET=m to bcmrpi3_defconfig +Subject: [PATCH 1073/1209] configs: Add USB_GADGET=m to bcmrpi3_defconfig See: https://github.com/raspberrypi/linux/issues/3796 @@ -457654,10 +457421,10 @@ index 497a14e0a6aa..65432c855202 100644 2.18.4 -From 1be4bb0fd429ec4aa52c98a8ecfb30d8e1bd9e66 Mon Sep 17 00:00:00 2001 +From afd142043dd89576bfff8b5c8ec49fd7410a8188 Mon Sep 17 00:00:00 2001 From: Andreas Watterott <1488433+awatterott@users.noreply.github.com> Date: Mon, 17 Aug 2020 21:17:09 +0200 -Subject: [PATCH 1079/1148] update rpi-display-overlay.dts pins for 5.4 +Subject: [PATCH 1074/1209] update rpi-display-overlay.dts pins for 5.4 --- arch/arm/boot/dts/overlays/rpi-display-overlay.dts | 6 +++--- @@ -457692,10 +457459,10 @@ index a5eed07d6a4b..de87432ff2be 100644 2.18.4 -From 2b4296e2c6f462c196bccf97e2b277d5751ae4ba Mon Sep 17 00:00:00 2001 +From 9af549ff6d9845d4c96b9c351e949bec8fb6901a Mon Sep 17 00:00:00 2001 From: "Ziqian SUN (Zamir)" Date: Sat, 11 Apr 2020 09:34:27 +0800 -Subject: [PATCH 1080/1148] Bluetooth: btrtl: Add support for RTL8761B +Subject: [PATCH 1075/1209] Bluetooth: btrtl: Add support for RTL8761B commit 04896832c94aae4842100cafb8d3a73e1bed3a45 upstream. @@ -457775,10 +457542,10 @@ index 0dfaf90a31b0..6cfdef7fc4b1 100644 2.18.4 -From 426c25e940ff563d8ba49a3cd93539ec01fd4252 Mon Sep 17 00:00:00 2001 +From 085334c06f5ed3c899241d7518027e8fbba36e8f Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 17 Aug 2020 18:11:47 +0100 -Subject: [PATCH 1081/1148] dtoverlays: Add overlay for the PCA953x family of +Subject: [PATCH 1076/1209] dtoverlays: Add overlay for the PCA953x family of GPIO expanders Adds an overlay for configuring all the GPIO expanders supported @@ -458101,10 +457868,10 @@ index 000000000000..8b6ee44665ce 2.18.4 -From 7818388ad029c859863b7696228964fc061166d2 Mon Sep 17 00:00:00 2001 +From fb5182978fb8e75fd381de69c22dbde371dc0a9f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 15 May 2020 16:28:32 +0100 -Subject: [PATCH 1082/1148] rtc: rv3028: Write BSM and TCE/TCR to EEPROM +Subject: [PATCH 1077/1209] rtc: rv3028: Write BSM and TCE/TCR to EEPROM Periodically the RV3028 refreshes registers from the EEPROM. When this happens, some settings that have only been committed to registers are @@ -458227,10 +457994,10 @@ index 8b2446909a1b..e02ae4b1cbc2 100644 2.18.4 -From 2304e4f024f2e94457689cbb7716d605fe70f741 Mon Sep 17 00:00:00 2001 +From 1d50dbb97c7d84bed8bb1d870026dbe4440a5ead Mon Sep 17 00:00:00 2001 From: Einar Vading Date: Fri, 14 Aug 2020 22:14:41 +0200 -Subject: [PATCH 1083/1148] rtc: rv3028: Refresh RAM on EEPROM write +Subject: [PATCH 1078/1209] rtc: rv3028: Refresh RAM on EEPROM write The active RV3028 settings are in RAM so after modifying the settings in EEPROM the RAM should be refreshed so that they take effect. @@ -458325,10 +458092,10 @@ index e02ae4b1cbc2..99d10d7ead2f 100644 2.18.4 -From 2cf36579f9a4801cc16f16b7367593d96154e6a5 Mon Sep 17 00:00:00 2001 +From 40d9ce45ce902c44b6583ff470371ca3e19788f0 Mon Sep 17 00:00:00 2001 From: Thomas Preston Date: Thu, 13 Aug 2020 01:38:35 +0100 -Subject: [PATCH 1084/1148] dt/overlays: Add PiFace Digital Device Tree Overlay +Subject: [PATCH 1079/1209] dt/overlays: Add PiFace Digital Device Tree Overlay The PiFace Digital is a convenient breakout board for the Microchip mcp23s17 SPI GPIO port expander. @@ -458535,10 +458302,10 @@ index 000000000000..532a858683d6 2.18.4 -From 4c4fd77ceb007b81f1d4c5f88858b41f05c2f50c Mon Sep 17 00:00:00 2001 +From b8490de79507eedb6804e2387c1f9693c3c06c22 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 18 Aug 2020 13:16:39 +0100 -Subject: [PATCH 1085/1148] configs: Add CONFIG_UEVENT_HELPER=y +Subject: [PATCH 1080/1209] configs: Add CONFIG_UEVENT_HELPER=y See: https://github.com/raspberrypi/linux/issues/3785 @@ -458615,10 +458382,10 @@ index 65432c855202..9c6ada12bebf 100644 2.18.4 -From c3986f944cefdab84a5bc5906bd2051521482b7d Mon Sep 17 00:00:00 2001 +From fff3b92243f9d4a03dda554905cecf1791deb4da Mon Sep 17 00:00:00 2001 From: RICCIARDI-Adrien Date: Thu, 20 Aug 2020 10:18:35 +0200 -Subject: [PATCH 1086/1148] overlays: Updated MCP3008 compatible strings. +Subject: [PATCH 1081/1209] overlays: Updated MCP3008 compatible strings. Used recommended ones from Documentation/devicetree/bindings/iio/adc/mcp320x.txt. --- @@ -458705,10 +458472,10 @@ index 0b7d9f75546e..957fdb9310af 100755 2.18.4 -From 1e990365bf6177aac89e6246f0673c93b44774b2 Mon Sep 17 00:00:00 2001 +From f4fab8a7ca887cecdef2322f7dac42817f393dd3 Mon Sep 17 00:00:00 2001 From: Ramin Moussavi Date: Sat, 25 Jul 2020 22:31:49 +0200 -Subject: [PATCH 1087/1148] RESET_CONTROLLER needs to be activated to compile +Subject: [PATCH 1082/1209] RESET_CONTROLLER needs to be activated to compile Broadcom BCM2835 clock support --- @@ -458731,10 +458498,10 @@ index 03bbd8040451..2d32eeca0153 100644 2.18.4 -From 79d9533d77622de680f08aaf670606a833e66e28 Mon Sep 17 00:00:00 2001 +From 96f7fd9002488c8965e7e63f24eaa03241e6e76d Mon Sep 17 00:00:00 2001 From: Andrei Koshkosh Date: Sun, 29 Sep 2019 05:04:05 -0300 -Subject: [PATCH 1088/1148] media: dvbsky: use a single mutex and state buffers +Subject: [PATCH 1083/1209] media: dvbsky: use a single mutex and state buffers for all R/W ops commit cecf0bbbcb6f035a5ca2197f3e11ec2b7fb3da83 upstream. @@ -458801,10 +458568,10 @@ index dc380c0c9536..199ba6a8201f 100644 2.18.4 -From 31018f29f6f2ea9b387c0cc1c1250ad6f189cd9f Mon Sep 17 00:00:00 2001 +From c0eb495581682ed0eeddd1b5dbad64bad3563938 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 24 Aug 2020 17:11:34 +0100 -Subject: [PATCH 1089/1148] ARM: dts: bcm2711: Enable support for DDR52 eMMC +Subject: [PATCH 1084/1209] ARM: dts: bcm2711: Enable support for DDR52 eMMC See: https://github.com/raspberrypi/linux/issues/3802 @@ -458829,10 +458596,10 @@ index b624ab54ad05..0556c73e332a 100644 2.18.4 -From 46e19fa526714dccd96416a83d666a118ed59ba7 Mon Sep 17 00:00:00 2001 +From 111c43015413e73aeb42dc53541e41f4a9923f8f Mon Sep 17 00:00:00 2001 From: Paul Elder Date: Mon, 24 Aug 2020 17:14:29 +0900 -Subject: [PATCH 1090/1148] staging: vc04_services: ISP: Fix dmabuf error check +Subject: [PATCH 1085/1209] staging: vc04_services: ISP: Fix dmabuf error check in S_CTRL In bcm2835_isp_s_ctrl, the error check for dma_buf_get() is incorrect, @@ -458860,10 +458627,10 @@ index db38649124b7..f3703f2a0143 100644 2.18.4 -From 78851361aa8e9f8dd52d049cf7549f6c3f38b983 Mon Sep 17 00:00:00 2001 +From 0067e53db30013f9799b74bbe545f609900e71e6 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 24 Aug 2020 18:28:52 +0100 -Subject: [PATCH 1091/1148] ARM: dts: bcm2708.dtsi: Don't delete the cpus node +Subject: [PATCH 1086/1209] ARM: dts: bcm2708.dtsi: Don't delete the cpus node The cpus node was originally deleted to match the then downstream version of the BCM2835 DTS files, but doing so doesn't seem to make @@ -458892,10 +458659,10 @@ index a32ff21613ed..36ec4989403f 100644 2.18.4 -From d5b6f6a053dd8cec4972d307c3e7373f475d52d8 Mon Sep 17 00:00:00 2001 +From 59656c2ecad51543170a8499dd45fe8d4cd9d2bd Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 25 Aug 2020 11:06:20 +0100 -Subject: [PATCH 1092/1148] ARM: dts: bcm2711: Add mmc_ddr_1_8v where possible +Subject: [PATCH 1087/1209] ARM: dts: bcm2711: Add mmc_ddr_1_8v where possible Advertise mmc_ddr_1_8v on platforms that support 1.8V SD/MMC DDR52. @@ -458937,10 +458704,10 @@ index d4ea928e30ce..823aeeca393d 100644 2.18.4 -From da6a16630e07c61ad8f3488b27fff061710b3d26 Mon Sep 17 00:00:00 2001 +From 914df1889bf492e1d6d94dc71acf5cf932a15925 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 25 Aug 2020 14:06:34 +0100 -Subject: [PATCH 1093/1148] configs: Add I2C_HID=m +Subject: [PATCH 1088/1209] configs: Add I2C_HID=m Enable support for I2C HID devices. @@ -459019,10 +458786,10 @@ index 9c6ada12bebf..f278668e178d 100644 2.18.4 -From 7efdb4a2fc8b2c4eb62d0e4aae6c0971a338bbe3 Mon Sep 17 00:00:00 2001 +From fff255bc09187f42084b2701c6483accd25fcb64 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 25 Aug 2020 14:19:51 +0100 -Subject: [PATCH 1094/1148] Revert "ARM: dts: bcm2711: Add mmc_ddr_1_8v where +Subject: [PATCH 1089/1209] Revert "ARM: dts: bcm2711: Add mmc_ddr_1_8v where possible" The commit being reverted has been seen to prevent booting with an eMMC @@ -459066,10 +458833,10 @@ index 823aeeca393d..d4ea928e30ce 100644 2.18.4 -From 5e322602c5c89359ef4f5d03ca373c624892155c Mon Sep 17 00:00:00 2001 +From af2e47169ef8e73bf1bd81d3c69f3d84ab3481fb Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 25 Aug 2020 17:08:17 +0100 -Subject: [PATCH 1095/1148] configs: Add CONFIG_SPS30=m +Subject: [PATCH 1090/1209] configs: Add CONFIG_SPS30=m Enable the driver for the Sensirion SPS30 particulate matter sensor. The i2c-sensor overlay already has support for the device, but it does @@ -459150,10 +458917,10 @@ index f278668e178d..a69ed1899039 100644 2.18.4 -From 40a4f8b64720e6a846d58d85670805e8f1765b80 Mon Sep 17 00:00:00 2001 +From 09eefe61a1231d625ad379f722a80bbaac2fae20 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 24 Aug 2020 17:30:06 +0100 -Subject: [PATCH 1096/1148] Revert "raspberrypi-cpufreq: Only report integer +Subject: [PATCH 1091/1209] Revert "raspberrypi-cpufreq: Only report integer pll divisor frequencies" This reverts commit f44019c198fdfea0c880f5e64641b8a43c13e829. @@ -459197,10 +458964,10 @@ index 8bcfab2749a8..2bc7d9734272 100644 2.18.4 -From e812d5e66ec6d3a0c84efd0fd68bbdf75c657dcd Mon Sep 17 00:00:00 2001 +From d2432301006376797092c5b5c9d3bccf5f265b63 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 25 Aug 2020 11:26:04 +0100 -Subject: [PATCH 1097/1148] configs: Enable upstream cpufreq driver for pi0/pi1 +Subject: [PATCH 1092/1209] configs: Enable upstream cpufreq driver for pi0/pi1 Signed-off-by: popcornmix --- @@ -459225,10 +458992,10 @@ index 9789478cc4d1..d681885c1d2b 100644 2.18.4 -From b7c5c345df30900654ff23ac9550fee374ea6f5c Mon Sep 17 00:00:00 2001 +From 07b052e1b1b4c08660eb0a5d128ad7847dc7aad2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 27 Aug 2020 17:57:18 +0100 -Subject: [PATCH 1098/1148] ARM: dts: bcm2835: Use the L2 non-allocating alias +Subject: [PATCH 1093/1209] ARM: dts: bcm2835: Use the L2 non-allocating alias The /soc/dma-ranges property on BCM2835 currently results in DMA addresses in the range 0x40000000-0x5fffffff. This will allocate in the @@ -459261,10 +459028,10 @@ index 53bf4579cc22..b94d5ec3f332 100644 2.18.4 -From ddf3c7b428b04fe62c51f0cadf1de2af216fc28a Mon Sep 17 00:00:00 2001 +From 440ead460d822af1ac2e8b030d81e3f7999b770c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 27 Aug 2020 16:30:26 +0100 -Subject: [PATCH 1099/1148] media: bcm2835-unicam: Drop WARN on uing direct +Subject: [PATCH 1094/1209] media: bcm2835-unicam: Drop WARN on uing direct cache alias Pi 0&1 pass all ARM accesses through the VPU L2 cache, therefore @@ -459301,10 +459068,10 @@ index 57c3c5f5db56..6501fb205e20 100644 2.18.4 -From af96354422ef8cb00962a4fdc9055bceaaff36fc Mon Sep 17 00:00:00 2001 +From c94d21f33e2ed058d2db798b8f011b60a7bcd1e4 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 10 Jul 2020 12:40:50 +0100 -Subject: [PATCH 1100/1148] media: i2c: tc358743: Only allow supported pixel +Subject: [PATCH 1095/1209] media: i2c: tc358743: Only allow supported pixel fmts in set_fmt Fix commit "media: tc358743: Return an appropriate colorspace from @@ -459317,10 +459084,10 @@ Signed-off-by: Dave Stevenson 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c -index 4831f14197b2..fe34ae82d8d7 100644 +index b3b8d6e15ea2..eef6ab823c6c 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c -@@ -1729,8 +1729,10 @@ static int tc358743_set_fmt(struct v4l2_subdev *sd, +@@ -1731,8 +1731,10 @@ static int tc358743_set_fmt(struct v4l2_subdev *sd, u32 code = format->format.code; /* is overwritten by get_fmt */ int ret = tc358743_get_fmt(sd, cfg, format); @@ -459337,10 +459104,10 @@ index 4831f14197b2..fe34ae82d8d7 100644 2.18.4 -From 8c7e85c8a5448a205d765310b154d10816f9e691 Mon Sep 17 00:00:00 2001 +From 7929e24cdcac03cf1bfddbc6cb626ac31257314f Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 7 Jul 2020 18:29:10 +0100 -Subject: [PATCH 1101/1148] media: i2c: ov9281: Add support for 8 bit readout +Subject: [PATCH 1096/1209] media: i2c: ov9281: Add support for 8 bit readout The sensor supports 8 bit mode as well as 10bit, so add the relevant code to allow selection of this. @@ -459531,10 +459298,10 @@ index bb8efc3d3cba..9610c24ceff1 100644 2.18.4 -From 5e3b8ef208a16d90e75614df8e6e7edb79335a2d Mon Sep 17 00:00:00 2001 +From a8c67d4ef0676cbe1cd3e0d4b2537ed54474e129 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 28 Aug 2020 12:55:41 +0100 -Subject: [PATCH 1102/1148] overlays: Add spi0-1cs and spi0-2cs +Subject: [PATCH 1097/1209] overlays: Add spi0-1cs and spi0-2cs The spi0-1cs overlay allows the SPI0 interface to be run with a single CS line, which can be useful if GPIOs are in short supply. The no_miso @@ -459697,10 +459464,10 @@ index ff41439a483a..df6519537c3a 100644 2.18.4 -From 31e21f57011119551e7c9e1471aa900bb1aeb653 Mon Sep 17 00:00:00 2001 +From 1d3b5d4eb0e772084f076ff61972fe06c34df008 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 28 Aug 2020 22:04:05 +0100 -Subject: [PATCH 1103/1148] overlays: Fix error in README +Subject: [PATCH 1098/1209] overlays: Fix error in README spi0-cs has been renamed spi0-2cs, not spi0-1cs. @@ -459726,10 +459493,10 @@ index a0adf476eafa..e2d90595c3c0 100644 2.18.4 -From 0dd4e889d4de7b59ab7033b01b3fdedccb777ab4 Mon Sep 17 00:00:00 2001 +From d47f44c2cc529b95f05efa98ac0d102e6dc1f55b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 1 Sep 2020 15:46:28 +0100 -Subject: [PATCH 1104/1148] configs: Make the evdev module a built-in +Subject: [PATCH 1099/1209] configs: Make the evdev module a built-in The evdev module is required to use a keyboard (although not a mouse, it appears). This means that if a kernel is unable to load modules the @@ -459816,10 +459583,10 @@ index a69ed1899039..93c935bc9fb6 100644 2.18.4 -From 09a6e7c0fbea9bbcdff6cbf16dd755274721de7e Mon Sep 17 00:00:00 2001 +From 9882846a7879b0766eb45166cc5dcfdfc6101a62 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 1 Sep 2020 17:31:31 +0100 -Subject: [PATCH 1105/1148] configs: Include AppArmor support +Subject: [PATCH 1100/1209] configs: Include AppArmor support AppArmor security has been a long-requested feature. This commit adds the config settings necessary to allow it to be enabled at boot @@ -460028,10 +459795,10 @@ index 93c935bc9fb6..e5696e1c86c2 100644 2.18.4 -From 5890cc4ff58cb21c3ed0d5c49fcbbf03ddfc2df9 Mon Sep 17 00:00:00 2001 +From a3a8cf4b79193c762871b83c3955fa62c5147fff Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 2 Sep 2020 08:39:57 +0100 -Subject: [PATCH 1106/1148] overlays: Minor README correction +Subject: [PATCH 1101/1209] overlays: Minor README correction Signed-off-by: Phil Elwell --- @@ -460055,10 +459822,10 @@ index e2d90595c3c0..9662d297ac6f 100644 2.18.4 -From 835ce90caf039601f6e5522cd71280c62696fa28 Mon Sep 17 00:00:00 2001 +From a3b7633d69066d8d4583c1b34ffc3379e8debe93 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 1 Sep 2020 18:15:27 +0100 -Subject: [PATCH 1107/1148] staging/fbtft: Add support for display variants +Subject: [PATCH 1102/1209] staging/fbtft: Add support for display variants Display variants are intended as a replacement for the now-deleted fbtft_device drivers. Drivers can register additional compatible @@ -460269,10 +460036,10 @@ index 9b6bdb62093d..c5703cd5ec7d 100644 2.18.4 -From d7f495f5ed8fe69dea913658ce65fcc9c8b99a8e Mon Sep 17 00:00:00 2001 +From 188d8a93d355889256e355a7870982ecb19c6699 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 3 Sep 2020 17:36:00 +0100 -Subject: [PATCH 1108/1148] overlays: Add adafruit18 and sainsmart18 overlays +Subject: [PATCH 1103/1209] overlays: Add adafruit18 and sainsmart18 overlays Add support for three ST7735R-based displays - adafruit18, adafruit18_green and sainsmart18. @@ -460452,10 +460219,10 @@ index 000000000000..38bbe2cfc207 2.18.4 -From 2eaea70c790c0e903c71be2416affec7bd8ea0ab Mon Sep 17 00:00:00 2001 +From 772383b3a0a045e9cfb142743527dc41f09edc2d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 4 Sep 2020 09:04:29 +0100 -Subject: [PATCH 1109/1148] ARM: dts: Limit BT modem baud rate on 3B +Subject: [PATCH 1104/1209] ARM: dts: Limit BT modem baud rate on 3B The 3B doesn't have the flow control signals connected to the BT modem, which limits the maximum usable baud rate to below 1 Mbaud. Use @@ -460486,10 +460253,10 @@ index e833915a7854..7dc3ef47e78f 100644 2.18.4 -From 6245dc18d09233e063036159cd1d00254d5fb540 Mon Sep 17 00:00:00 2001 +From 425289c0bbd20c95ca227cfcfae7ca4a23421adb Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 7 Sep 2020 13:47:20 +0100 -Subject: [PATCH 1110/1148] configs: Enable CHACHA20POLY1305=m +Subject: [PATCH 1105/1209] configs: Enable CHACHA20POLY1305=m Enable the CHACHA20 cipher, a high-performance AES alternative, and the POLY1305 authentication algorithm. Together they make up RFC-7539. @@ -460571,10 +460338,10 @@ index e5696e1c86c2..a32bad78a0a3 100644 2.18.4 -From bba1c26da073eb88613035191e99a438ee8e932b Mon Sep 17 00:00:00 2001 +From 31e4c0851dff6eb0e831c405b44a34c5ab481e9e Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 3 Sep 2020 14:59:40 +0100 -Subject: [PATCH 1111/1148] overlays: Update i2c0 overlay to disable the +Subject: [PATCH 1106/1209] overlays: Update i2c0 overlay to disable the i2c0mux. The i2c0 overlay was assigning pinctrl settings to node i2c0, @@ -460649,10 +460416,10 @@ index 6b1f9ec6c878..7c6771f84d8e 100644 2.18.4 -From 88dc424e3ae1ba8bd2ba50b936f95846cb8a90c2 Mon Sep 17 00:00:00 2001 +From 7717b03514726f1c9218d475af6b3154e37898a7 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 3 Sep 2020 15:12:50 +0100 -Subject: [PATCH 1112/1148] dt: Remove duplicate assignment for i2c0 pinctrl +Subject: [PATCH 1107/1209] dt: Remove duplicate assignment for i2c0 pinctrl config The include file bcm283x-rpi-i2c0mux_0_XX.dtsi was setting @@ -460828,10 +460595,10 @@ index 88f7fe53b97f..f972979281f5 100644 2.18.4 -From 9af68c1ed37bed7d24d705f254a4d7f08217d6e7 Mon Sep 17 00:00:00 2001 +From 588b9c526378207cc946e9ab4aaf33217b93e8cd Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 27 Aug 2020 18:57:26 +0100 -Subject: [PATCH 1113/1148] overlays: Add option for composite to +Subject: [PATCH 1108/1209] overlays: Add option for composite to vc4-kms-v3d-pi4. Composite is an alternative to HDMI/DPI/DSI on Pi4 as it @@ -460904,10 +460671,10 @@ index 3c662cea4e1f..f721f12d729d 100644 2.18.4 -From 68d72ea4a0c192250920052976f99912ffa7e0a6 Mon Sep 17 00:00:00 2001 +From c83925cc9eb8f435c7eb6f3b7865d479c916df80 Mon Sep 17 00:00:00 2001 From: lsellens Date: Mon, 14 Sep 2020 22:35:39 -0500 -Subject: [PATCH 1114/1148] minor typo in directions +Subject: [PATCH 1109/1209] minor typo in directions --- arch/arm/boot/dts/overlays/gpio-fan-overlay.dts | 2 +- @@ -460930,10 +460697,10 @@ index 0b14981b4824..77a7bbb41e3b 100644 2.18.4 -From e8618718dbeb71a0872a25f2bfc55b8371458f12 Mon Sep 17 00:00:00 2001 +From 8f6955bf21bfd06a65b4df5ae64814cbc60a4155 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 14 Sep 2020 15:49:38 +0100 -Subject: [PATCH 1115/1148] overlays: Regenerate upstream-pi4 overlay +Subject: [PATCH 1110/1209] overlays: Regenerate upstream-pi4 overlay Signed-off-by: Phil Elwell --- @@ -460967,10 +460734,10 @@ index d88bbcfc36d1..5673f61b7951 100644 2.18.4 -From b620f82a87face0a9172d5b27b74ef787e8f5fe9 Mon Sep 17 00:00:00 2001 +From 463386c654372717f5aee256d0ba5285480c25a9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 14 Sep 2020 15:48:16 +0100 -Subject: [PATCH 1116/1148] overlays: Add parameters to adafruit18, sainsmart18 +Subject: [PATCH 1111/1209] overlays: Add parameters to adafruit18, sainsmart18 Also fix polarity of the reset GPIO. @@ -461071,10 +460838,10 @@ index 38bbe2cfc207..ce2f942ba316 100644 2.18.4 -From cda9ed1f3b50d9597f204f0d383f96435f90b3d1 Mon Sep 17 00:00:00 2001 +From c51c4ab12499c5252badffed09c791dd42e8bad7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 21 Sep 2020 14:02:44 +0100 -Subject: [PATCH 1117/1148] rpivid_h265: Fix width/height typo +Subject: [PATCH 1112/1209] rpivid_h265: Fix width/height typo Signed-off-by: popcornmix --- @@ -461098,10 +460865,10 @@ index 47d4de42c584..b677910e237c 100644 2.18.4 -From 2d4c4fea7b24ad7fea00461c89bd0f5aca2d0cce Mon Sep 17 00:00:00 2001 +From df0dce425802e671b935cbc307c54b0cfa5b5af5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 21 Sep 2020 22:00:10 +0100 -Subject: [PATCH 1118/1148] overlays: Add extra CMA sizes (up to 512M) +Subject: [PATCH 1113/1209] overlays: Add extra CMA sizes (up to 512M) Signed-off-by: Phil Elwell --- @@ -461184,10 +460951,10 @@ index 4fbdf161672e..1d87c599f909 100644 2.18.4 -From 17411e38cea9b462a0df1f500366f31bf461dda1 Mon Sep 17 00:00:00 2001 +From dc67694d7a27515f549b8a39ead813ccef2c536d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 21 Sep 2020 22:09:40 +0100 -Subject: [PATCH 1119/1148] overlays: Add note to BCM2711 overlays +Subject: [PATCH 1114/1209] overlays: Add note to BCM2711 overlays Signed-off-by: Phil Elwell --- @@ -461340,10 +461107,10 @@ index afd40f84a342..5118f477cc13 100644 2.18.4 -From 37c686b344504ce38bf6b889422bc50d033ed5c0 Mon Sep 17 00:00:00 2001 +From f19d8ba0e4fbf23346251cba6238f5db3fc30339 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 21 Sep 2020 20:45:46 +0100 -Subject: [PATCH 1120/1148] overlays: adafruit18,sainsmart18: default bgr to +Subject: [PATCH 1115/1209] overlays: adafruit18,sainsmart18: default bgr to off Signed-off-by: Phil Elwell @@ -461403,10 +461170,10 @@ index ce2f942ba316..c51f1c030a55 100644 2.18.4 -From 6496f637ee599645f7123325dbfeee4cfe8b91de Mon Sep 17 00:00:00 2001 +From 5cafa134a92ff6a6c9166d5ece0ca5b5f332e137 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 25 Sep 2020 17:50:14 +0100 -Subject: [PATCH 1121/1148] configs: Remove I2C_BRCMSTB from the kernel +Subject: [PATCH 1116/1209] configs: Remove I2C_BRCMSTB from the kernel Make it a module on 2711-based platforms, otherwise delete it altogether, @@ -461484,10 +461251,10 @@ index a32bad78a0a3..7f159969011e 100644 2.18.4 -From 18886ae37ce3f0ee74ce45155dc3b0a36dd66b70 Mon Sep 17 00:00:00 2001 +From 4304fa9b2371959cbba69dd7b3a90ba087a1855c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 25 Sep 2020 15:07:23 +0100 -Subject: [PATCH 1122/1148] net: bcmgenet: Reset RBUF on first open +Subject: [PATCH 1117/1209] net: bcmgenet: Reset RBUF on first open If the RBUF logic is not reset when the kernel starts then there may be some data left over from any network boot loader. If the @@ -461560,10 +461327,10 @@ index 0cb19a1120b6..821596627d76 100644 2.18.4 -From 6091669fb15c3f64ee321b0edfb7b3e6244447c5 Mon Sep 17 00:00:00 2001 +From 71ebefe753490cd83ac1d12a406aa76dde306e69 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 29 Sep 2020 15:03:34 +0100 -Subject: [PATCH 1123/1148] ASoC: cs42xx8: Only define cs42xx8_of_match once +Subject: [PATCH 1118/1209] ASoC: cs42xx8: Only define cs42xx8_of_match once cs42xx8.c exports cs42xx8_of_match, so there's no need to redefine it in cs42xx8-i2c.c - doing so breaks linking when loadable module @@ -461609,10 +461376,10 @@ index a4586ea4acf6..b8b15b886c22 100644 2.18.4 -From ee40eb43e7154b08134549cc5656690ea4bee980 Mon Sep 17 00:00:00 2001 +From d03365fb3b360548dea12e25e44282ab2863a13f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 30 Sep 2020 12:28:37 +0100 -Subject: [PATCH 1124/1148] configs: Regenerate the defconfigs +Subject: [PATCH 1119/1209] configs: Regenerate the defconfigs Signed-off-by: Phil Elwell --- @@ -461664,10 +461431,10 @@ index 7f159969011e..c838461038e6 100644 2.18.4 -From 0fa44841a5a2059d920a4053829c1f4b5230e893 Mon Sep 17 00:00:00 2001 +From c25f032fd91a6eeb4d3af7b37ddc5ec2cf03b609 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 30 Sep 2020 12:12:32 +0100 -Subject: [PATCH 1125/1148] staging: bcm2835-codec: Use a define the completion +Subject: [PATCH 1120/1209] staging: bcm2835-codec: Use a define the completion timeout Hiding a use of "HZ" as a timeout is a little nasty. @@ -461705,10 +461472,10 @@ index 14c47e2ea995..f3dfc7fda884 100644 2.18.4 -From 02eab7d73a0197e26f5426f560a196dcac900856 Mon Sep 17 00:00:00 2001 +From 60c502d76cbca2be144671e76117d17cb03a05ea Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 30 Sep 2020 12:13:44 +0100 -Subject: [PATCH 1126/1148] staging: bcm2835-codec: Correct buffer number +Subject: [PATCH 1121/1209] staging: bcm2835-codec: Correct buffer number change on start streaming "cac8c90 staging: vc04_service: codec: Allow start_streaming to update @@ -461741,10 +461508,10 @@ index f3dfc7fda884..b1e00e65ce18 100644 2.18.4 -From 24f86a87a1dd89f6d89de5f04e780f4d903d70a3 Mon Sep 17 00:00:00 2001 +From 9cb62c9fb230778d75032e652382f159f005ee3b Mon Sep 17 00:00:00 2001 From: Adrian Carpenter Date: Wed, 14 Aug 2019 15:33:36 +0100 -Subject: [PATCH 1127/1148] usb/dwc2: Set correct state on gadget disconnect +Subject: [PATCH 1122/1209] usb/dwc2: Set correct state on gadget disconnect When operating as a USB device, when the device is disconnected the suspend interrupt is called rather than the disconnect interrupt, this results in the state remaining as "configured". This change changes the state to "not attached" instead when the suspend interrupt is called. --- @@ -461778,10 +461545,10 @@ index 6272b4ae4740..11c8893fbc1a 100644 2.18.4 -From ccd44a3c13f1df77d5ea2739d6285cec0a6ab8d3 Mon Sep 17 00:00:00 2001 +From 643597b860ecd21ab7e1104038616596b16b98a5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 30 Sep 2020 19:23:43 +0100 -Subject: [PATCH 1128/1148] USB: gadget: f_hid: avoid crashes and log spam +Subject: [PATCH 1123/1209] USB: gadget: f_hid: avoid crashes and log spam Disconnecting and reconnecting the USB cable can lead to crashes and a variety of kernel log spam. Try to fix or minimise both. @@ -461840,10 +461607,10 @@ index f3816a5c861e..00fae22e941a 100644 2.18.4 -From 6660ff71170361cc79d94b98481b0d92aea0da1b Mon Sep 17 00:00:00 2001 +From 4552d6467c487278229d363feca829d3843daa77 Mon Sep 17 00:00:00 2001 From: newbloke82 <39644602+newbloke82@users.noreply.github.com> Date: Thu, 1 Oct 2020 19:16:35 +0200 -Subject: [PATCH 1129/1148] Update hy28b-overlay.dts +Subject: [PATCH 1124/1209] Update hy28b-overlay.dts My hy28b TFT stopped working on upgrade to 5.4 kernel. I had a whitescreen but no obvious errors when using 'sudo vcdbg log msg' or 'dmesg'. Both /dev/fb0 and /dev/fb1 were present. Followed this article on waveshare32b that 'reset_gpios needed to be 0 0 1 instead of 0 0 0' (https://forum.armbian.com/topic/13233-any-clues-for-the-creation-of-a-dtoverlay-for-fbtft-on-54y/). I applied a similar change to this dts file and compiled a new dtbo: 'dtc -O dtb -o hy28b.dtbo hy28b-overlay.dts'. Fixed my issue - may help others? I got from the 5.4 upgrade thread that other tft users are having issues with small tfts... https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=269769&p=1706597&hilit=gpio#p1706597 --- @@ -461867,10 +461634,10 @@ index 2e5e20f327a3..9edd0848d555 100644 2.18.4 -From c0dd6d67f84b356b82e37c8dcb7568b248a44a99 Mon Sep 17 00:00:00 2001 +From b0f69cbe72ce0bbfe3939221c9ffb8ab040c5624 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 2 Oct 2020 10:06:49 +0100 -Subject: [PATCH 1130/1148] overlays: Update display GPIO declarations +Subject: [PATCH 1125/1209] overlays: Update display GPIO declarations The 5.4 kernel changes the way a number of display drivers use GPIOs. That change has exposed flaws/broken a number of display overlays, so @@ -462063,10 +461830,10 @@ index 254ac2e0a214..a102b09e3ab5 100644 2.18.4 -From 7a40b2748f2e6c107443946bb6c0173341ab6db2 Mon Sep 17 00:00:00 2001 +From 33dd0aea56e90492b4392df0a7b0c6678431e1d1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 5 Oct 2020 15:41:15 +0100 -Subject: [PATCH 1131/1148] SQUASH: USB: gadget: f_hid: remove more spam +Subject: [PATCH 1126/1209] SQUASH: USB: gadget: f_hid: remove more spam Tidying up the previous patch to this file dropped the deletion of a particularly noisy error message. Restore its removal. @@ -462095,10 +461862,10 @@ index 00fae22e941a..4670ad21402d 100644 2.18.4 -From 7024450543e43cf6d334a9cce34c267a13f48c02 Mon Sep 17 00:00:00 2001 +From d69c7474603533f6da57a7cebfa52a10145dde5e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 5 Oct 2020 16:08:18 +0100 -Subject: [PATCH 1132/1148] configs: Add CONFIG_RTC_DRV_SD3078=m +Subject: [PATCH 1127/1209] configs: Add CONFIG_RTC_DRV_SD3078=m Enable the driver module for the SD3078 RTC. @@ -462177,10 +461944,10 @@ index c838461038e6..ee15660f8306 100644 2.18.4 -From 7640dbade24a2d1c4c03995f2c19f9d15bdfc8e9 Mon Sep 17 00:00:00 2001 +From 48cd79629fdfebc9d00a48711851b099d414b139 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 5 Oct 2020 16:10:26 +0100 -Subject: [PATCH 1133/1148] overlays: Add sd3078 to the i2c-rtc overlay +Subject: [PATCH 1128/1209] overlays: Add sd3078 to the i2c-rtc overlay Add support for the SD3078 RTC to the i2c-rtc overlay. @@ -462243,10 +462010,10 @@ index df59d93cd759..735ca303e4fa 100644 2.18.4 -From 123246e7e26a6a826db25692b2ddf83945c7580f Mon Sep 17 00:00:00 2001 +From 5492ac4be269cad019b5695cd4b7ab32db414a6a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 5 Oct 2020 17:16:39 +0100 -Subject: [PATCH 1134/1148] configs: Restore SND_PCM_OSS=m +Subject: [PATCH 1129/1209] configs: Restore SND_PCM_OSS=m A kconfig change way back in 4.13 caused SND_PCM_OSS to be dropped from our defconfigs. Restore it as a potential workaround for a supposed @@ -462332,10 +462099,10 @@ index ee15660f8306..32fbcba06098 100644 2.18.4 -From c4f06042163d6198a7e3c5112dacaf3568d43965 Mon Sep 17 00:00:00 2001 +From 1d3b24393a88d9c610947201a7d8ef1150d32690 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 6 Oct 2020 11:44:16 +0100 -Subject: [PATCH 1135/1148] Revert "usb/dwc2: Set correct state on gadget +Subject: [PATCH 1130/1209] Revert "usb/dwc2: Set correct state on gadget disconnect" This reverts commit c3974850cc10de2596893eaec2f5c456e9ded6a0. @@ -462374,10 +462141,10 @@ index 11c8893fbc1a..6272b4ae4740 100644 2.18.4 -From 743e386c566fa53b72e1d337c25a4b57d81de785 Mon Sep 17 00:00:00 2001 +From ff1829e69bed2457daac0c9b2ae28d9e040cc348 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 7 Oct 2020 13:14:19 +0100 -Subject: [PATCH 1136/1148] configs: Add MEMCG_SWAP support initially disabled +Subject: [PATCH 1131/1209] configs: Add MEMCG_SWAP support initially disabled Add support for memcg swap accounting, but leave it disabled by default. Add "swapaccount=1" to the kernel command line to enable it. @@ -462462,10 +462229,10 @@ index 32fbcba06098..6d9c9978ccb7 100644 2.18.4 -From 7ff5090421a8ad1a332ad49f2092b8e6ee16dbf6 Mon Sep 17 00:00:00 2001 +From 3f11ee8415a3d14cad8046ac7b8b37fdf4be31cf Mon Sep 17 00:00:00 2001 From: Jonathan Bell Date: Wed, 7 Oct 2020 15:09:29 +0100 -Subject: [PATCH 1137/1148] dwc_otg: initialise sched_frame for periodic QHs +Subject: [PATCH 1132/1209] dwc_otg: initialise sched_frame for periodic QHs that were parked If a periodic QH has no remaining QTDs, then it is removed from all @@ -462501,10 +462268,10 @@ index 2823dc9af63f..4503af692aef 100644 2.18.4 -From e459fba07d9e9f568ee723961c5e1a3f6a8f7e51 Mon Sep 17 00:00:00 2001 +From ba8aa06834266c49d47606bd401520719f054756 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Thu, 8 Oct 2020 12:06:58 +0100 -Subject: [PATCH 1138/1148] arm64: configs: Enable Unicam support +Subject: [PATCH 1133/1209] arm64: configs: Enable Unicam support Enable the unicam module on 64 bit kernel builds. @@ -462542,10 +462309,10 @@ index 6d9c9978ccb7..fceaba1e6630 100644 2.18.4 -From 28309a8c1fcae4fd32197111beacba7cf6b506ac Mon Sep 17 00:00:00 2001 +From 27f75cff8ae78db2cf8746624973198342fad213 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Thu, 8 Oct 2020 12:07:16 +0100 -Subject: [PATCH 1139/1148] arm64: configs: Enable V4L2 test module support +Subject: [PATCH 1134/1209] arm64: configs: Enable V4L2 test module support Enable the v4l2 test modules on 64 bit kernel builds. @@ -462591,10 +462358,10 @@ index fceaba1e6630..a4db16794285 100644 2.18.4 -From 809e71b57c642a331730238d781279d183cb460f Mon Sep 17 00:00:00 2001 +From 7891905cd332bb0475b0c84bfe94e242dc9fd589 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 8 Oct 2020 15:35:14 +0100 -Subject: [PATCH 1140/1148] staging: bcm2835-camera: Replace deprecated +Subject: [PATCH 1135/1209] staging: bcm2835-camera: Replace deprecated V4L2_PIX_FMT_BGR32 V4L2_PIX_FMT_BGR32 is deprecated as it is ambiguous over where @@ -462627,10 +462394,10 @@ index b7214741fa61..da14f1fb8664 100644 2.18.4 -From 7c4b813c9037719d246cf2ee79c8a26e658e05e5 Mon Sep 17 00:00:00 2001 +From 14b7dd7060008744556990f93513a086300da06d Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 8 Oct 2020 16:06:59 +0100 -Subject: [PATCH 1141/1148] staging: bcm2835-codec: Replace deprecated +Subject: [PATCH 1136/1209] staging: bcm2835-codec: Replace deprecated V4L2_PIX_FMT_BGR32 V4L2_PIX_FMT_BGR32 is deprecated as it is ambiguous over where @@ -462660,10 +462427,10 @@ index b1e00e65ce18..eefe8e101f96 100644 2.18.4 -From 75ac8bc08d43745c8d39a2e84aa5f5a29cf5fb7e Mon Sep 17 00:00:00 2001 +From 0c1276bfcb7bf24b5b24f73ce79d68bf07cc7ffe Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 12 Oct 2020 14:36:35 +0100 -Subject: [PATCH 1142/1148] ARM: bcm2711-rpi.dts: Unlock DMA channels 9 & 10 +Subject: [PATCH 1137/1209] ARM: bcm2711-rpi.dts: Unlock DMA channels 9 & 10 The downstream-specific override of the 32-bit DMA mask needlessly disables channels 9 and 10 - the VPU doesn't use them. This override @@ -462699,10 +462466,10 @@ index 0556c73e332a..0c586d9ea6f8 100644 2.18.4 -From 0d19dd10fb5ebb8767f130f380bba437882693b2 Mon Sep 17 00:00:00 2001 +From 98fa710cd55b9a396b43cfd20f70bc4924673eb2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 30 Sep 2020 12:00:54 +0100 -Subject: [PATCH 1143/1148] gpio: Add gpio-fsm driver +Subject: [PATCH 1138/1209] gpio: Add gpio-fsm driver The gpio-fsm driver implements simple state machines that allow GPIOs to be controlled in response to inputs from other GPIOs - real and @@ -463895,10 +463662,10 @@ index 000000000000..eb40cfdc71df 2.18.4 -From 3b7df60bba103dab244fe5f779e6f5d098d98eb5 Mon Sep 17 00:00:00 2001 +From 943415d2d9fa7f24369ff48eb4069381a14577cb Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 30 Sep 2020 12:18:45 +0100 -Subject: [PATCH 1144/1148] configs: Add CONFIG_GPIO_FSM=m +Subject: [PATCH 1139/1209] configs: Add CONFIG_GPIO_FSM=m Enable the gpio-fsm module. @@ -463975,10 +463742,10 @@ index a4db16794285..54579a745176 100644 2.18.4 -From 82ef295042784db6364118ccbebc11077043b426 Mon Sep 17 00:00:00 2001 +From ffb0f41bdfd196a84529de2313a7c2f9a9f1b12d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 30 Sep 2020 12:08:08 +0100 -Subject: [PATCH 1145/1148] overlays: Add fsm-demo overlay +Subject: [PATCH 1140/1209] overlays: Add fsm-demo overlay fsm-demo demonstrates the usage of the gpio-fsm driver. It is designed to be used with a set of "traffic light" LEDs on GPIOs @@ -464137,10 +463904,10 @@ index 000000000000..9e06e388e4d3 2.18.4 -From f9ec784fba114fa446f7b2473cbfa18042024ee7 Mon Sep 17 00:00:00 2001 +From b6916f823de6e48a7b722c3be8490648cab38659 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 30 Sep 2020 12:17:48 +0100 -Subject: [PATCH 1146/1148] overlays: Add ghost-amp overlay +Subject: [PATCH 1141/1209] overlays: Add ghost-amp overlay Add an overlay for the Ghost amplifier. @@ -464311,10 +464078,10 @@ index 000000000000..afc9f034b5fc 2.18.4 -From bf71727fe49b171c166df3f20f651ca0aa3c6bf0 Mon Sep 17 00:00:00 2001 +From 10054e905f2a684e5480d452202fb28b3164a8fe Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 6 Aug 2020 11:17:13 -0700 -Subject: [PATCH 1147/1148] Bluetooth: Disable High Speed by default +Subject: [PATCH 1142/1209] Bluetooth: Disable High Speed by default commit b176dd0ef6afcb3bca24f41d78b0d0b731ec2d08 upstream. @@ -464343,10 +464110,10 @@ index 3803135c88ff..340f169f6d54 100644 2.18.4 -From e13a8b6e93eb4b452de2005812bfca56432889b4 Mon Sep 17 00:00:00 2001 +From 471183f69c945800b4019e41ac627dc45142fa24 Mon Sep 17 00:00:00 2001 From: Joerg Schambacher Date: Fri, 16 Oct 2020 15:17:07 +0200 -Subject: [PATCH 1148/1148] Fixes a problem when module probes before i2c +Subject: [PATCH 1143/1209] Fixes a problem when module probes before i2c module is available The driver crashed while a NULL pointer returned by i2c_get_adapter() @@ -464394,3 +464161,17230 @@ index 286a62c3ff48..2f1b1ef4191a 100644 -- 2.18.4 + +From 30410b3ab5582e82acf6ea86b26ae709521c82da Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Thu, 15 Oct 2020 11:59:02 +0100 +Subject: [PATCH 1144/1209] uapi: Update V4L2_CID_USER_BCM2835_ISP_BASE due to + upstream change + +Commit "4e52889 media: atmel: atmel-isc-base: expose white +balance as v4l2 controls" in the upstream kernels reserves +(V4L2_CID_USER_BASE + 0x10c0) for use by the Atmel ISC, +therefore we have a control collision with our existing +define for V4L2_CID_USER_BCM2835_ISP_BASE. + +Update V4L2_CID_USER_BCM2835_ISP_BASE to + 0x10e0 as the +next available block. + +NB ABI breakage for libcamera (the only user of these controls). + +Signed-off-by: Dave Stevenson +--- + include/uapi/linux/v4l2-controls.h | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h +index b6173d8c38f1..9afecc81b883 100644 +--- a/include/uapi/linux/v4l2-controls.h ++++ b/include/uapi/linux/v4l2-controls.h +@@ -192,9 +192,15 @@ enum v4l2_colorfx { + * We reserve 16 controls for this driver. */ + #define V4L2_CID_USER_IMX_BASE (V4L2_CID_USER_BASE + 0x10b0) + ++/* ++ * The base for the atmel isc driver controls. ++ * We reserve 32 controls for this driver. ++ */ ++#define V4L2_CID_USER_ATMEL_ISC_BASE (V4L2_CID_USER_BASE + 0x10c0) ++ + /* The base for the bcm2835-isp driver controls. + * We reserve 16 controls for this driver. */ +-#define V4L2_CID_USER_BCM2835_ISP_BASE (V4L2_CID_USER_BASE + 0x10c0) ++#define V4L2_CID_USER_BCM2835_ISP_BASE (V4L2_CID_USER_BASE + 0x10e0) + + /* MPEG-class control IDs */ + /* The MPEG controls are applicable to all codec controls +-- +2.18.4 + + +From 9a33d060a0301ae2d85c1307178e5e17b4df4cec Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Wed, 21 Oct 2020 18:33:02 +0100 +Subject: [PATCH 1145/1209] dtoverlays: Correct CSI2 settings for ov9281 + +OV9281 appears to drop the clock to LP mode between frames, but +the overlay didn't define this at both ends of the CSI2 link. +The overlay also had an incorrect link frequency defined, not that +the driver ever checked for one. + +Fix both issues. + +Signed-off-by: Dave Stevenson +--- + arch/arm/boot/dts/overlays/ov9281-overlay.dts | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/overlays/ov9281-overlay.dts b/arch/arm/boot/dts/overlays/ov9281-overlay.dts +index 4411c9d96564..40b298d3dd86 100644 +--- a/arch/arm/boot/dts/overlays/ov9281-overlay.dts ++++ b/arch/arm/boot/dts/overlays/ov9281-overlay.dts +@@ -34,7 +34,7 @@ + data-lanes = <1 2>; + clock-noncontinuous; + link-frequencies = +- /bits/ 64 <456000000>; ++ /bits/ 64 <400000000>; + }; + }; + }; +@@ -50,6 +50,7 @@ + csi1_ep: endpoint { + remote-endpoint = <&ov9281_0>; + data-lanes = <1 2>; ++ clock-noncontinuous; + }; + }; + }; +-- +2.18.4 + + +From 88971fcf6a1646c02cbeb9bceff57bf51c46195f Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 23 Oct 2020 15:45:11 +0100 +Subject: [PATCH 1146/1209] dts: Add CM4 to arm64 dt files + +Signed-off-by: Dave Stevenson +--- + arch/arm64/boot/dts/broadcom/Makefile | 3 ++- + arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4.dts | 1 + + 2 files changed, 3 insertions(+), 1 deletion(-) + create mode 100644 arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4.dts + +diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile +index c3eaf8d63ee4..1e861e2bf2e0 100644 +--- a/arch/arm64/boot/dts/broadcom/Makefile ++++ b/arch/arm64/boot/dts/broadcom/Makefile +@@ -7,7 +7,8 @@ dtb-$(CONFIG_ARCH_BCM2709) += bcm2710-rpi-2-b.dtb + dtb-$(CONFIG_ARCH_BCM2709) += bcm2710-rpi-3-b.dtb + dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-2-b.dtb + dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b.dtb +-dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-4-b.dtb ++dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-4-b.dtb \ ++ bcm2711-rpi-cm4.dtb + dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b-plus.dtb + dtb-$(CONFIG_ARCH_BCM2709) += bcm2710-rpi-cm3.dtb + dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-cm3.dtb +diff --git a/arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4.dts b/arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4.dts +new file mode 100644 +index 000000000000..8064a58155f1 +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4.dts +@@ -0,0 +1 @@ ++#include "../../../../arm/boot/dts/bcm2711-rpi-cm4.dts" +-- +2.18.4 + + +From d51dfee25f33304acd39b24bf59c79653b4d0c19 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 26 Oct 2020 15:01:21 +0000 +Subject: [PATCH 1147/1209] dts: Tidy the Raspberry Pi Makefile entries + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/Makefile | 2 +- + arch/arm64/boot/dts/broadcom/Makefile | 7 ++----- + 2 files changed, 3 insertions(+), 6 deletions(-) + +diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile +index 477108fe0404..325f1ceccad9 100644 +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -10,8 +10,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \ + bcm2709-rpi-2-b.dtb \ + bcm2710-rpi-2-b.dtb \ + bcm2710-rpi-3-b.dtb \ +- bcm2711-rpi-4-b.dtb \ + bcm2710-rpi-3-b-plus.dtb \ ++ bcm2711-rpi-4-b.dtb \ + bcm2710-rpi-cm3.dtb \ + bcm2711-rpi-cm4.dtb + +diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile +index 1e861e2bf2e0..996e670a6018 100644 +--- a/arch/arm64/boot/dts/broadcom/Makefile ++++ b/arch/arm64/boot/dts/broadcom/Makefile +@@ -3,15 +3,12 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-a-plus.dtb \ + bcm2837-rpi-3-b.dtb \ + bcm2837-rpi-3-b-plus.dtb \ + bcm2837-rpi-cm3-io3.dtb +-dtb-$(CONFIG_ARCH_BCM2709) += bcm2710-rpi-2-b.dtb +-dtb-$(CONFIG_ARCH_BCM2709) += bcm2710-rpi-3-b.dtb + dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-2-b.dtb + dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b.dtb +-dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-4-b.dtb \ +- bcm2711-rpi-cm4.dtb + dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b-plus.dtb +-dtb-$(CONFIG_ARCH_BCM2709) += bcm2710-rpi-cm3.dtb ++dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-4-b.dtb + dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-cm3.dtb ++dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-cm4.dtb + + subdir-y += northstar2 + subdir-y += stingray +-- +2.18.4 + + +From 87766e2620d13cf5ee20a96d91b02fc2cb65e9c9 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 26 Oct 2020 10:23:22 +0000 +Subject: [PATCH 1148/1209] staging: bcm2835-audio: Add disable-headphones flag + +Add a property to allow the headphone output to be disabled. Use an +integer property rather than a boolean so that an overlay can clear it. + +Signed-off-by: Phil Elwell +--- + drivers/staging/vc04_services/bcm2835-audio/bcm2835.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c +index b9716f3e264c..092ccbfd5243 100644 +--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c ++++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c +@@ -381,11 +381,16 @@ static int snd_bcm2835_alsa_probe(struct platform_device *pdev) + } + + if (!enable_compat_alsa) { ++ // In this mode, enable analog output by default ++ u32 disable_headphones = 0; ++ + if (!of_property_read_bool(dev->of_node, "brcm,disable-hdmi")) + set_hdmi_enables(dev); + +- // In this mode, always enable analog output +- enable_headphones = true; ++ of_property_read_u32(dev->of_node, ++ "brcm,disable-headphones", ++ &disable_headphones); ++ enable_headphones = !disable_headphones; + } else { + enable_hdmi0 = enable_hdmi; + } +-- +2.18.4 + + +From 419c7d70005119261aa0f48fca3eb1e577107712 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 26 Oct 2020 10:18:50 +0000 +Subject: [PATCH 1149/1209] ARM: dts: Disable headphone audio on Zeroes, CM4 + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/bcm2708-rpi-zero-w.dts | 1 + + arch/arm/boot/dts/bcm2708-rpi-zero.dts | 1 + + arch/arm/boot/dts/bcm2711-rpi-cm4.dts | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/arch/arm/boot/dts/bcm2708-rpi-zero-w.dts b/arch/arm/boot/dts/bcm2708-rpi-zero-w.dts +index f1bbed9fbf73..80263a42aebf 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-zero-w.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-zero-w.dts +@@ -152,6 +152,7 @@ + &audio { + pinctrl-names = "default"; + pinctrl-0 = <&audio_pins>; ++ brcm,disable-headphones = <1>; + }; + + / { +diff --git a/arch/arm/boot/dts/bcm2708-rpi-zero.dts b/arch/arm/boot/dts/bcm2708-rpi-zero.dts +index e7578788b839..5b1332ace9b8 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-zero.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-zero.dts +@@ -106,6 +106,7 @@ + &audio { + pinctrl-names = "default"; + pinctrl-0 = <&audio_pins>; ++ brcm,disable-headphones = <1>; + }; + + / { +diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4.dts +index d4ea928e30ce..3ff0be02cb34 100644 +--- a/arch/arm/boot/dts/bcm2711-rpi-cm4.dts ++++ b/arch/arm/boot/dts/bcm2711-rpi-cm4.dts +@@ -460,6 +460,7 @@ + &audio { + pinctrl-names = "default"; + pinctrl-0 = <&audio_pins>; ++ brcm,disable-headphones = <1>; + }; + + &vc4 { +-- +2.18.4 + + +From d26267a6fe6f2904bf8a0dde1f422d14c98b6e23 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 26 Oct 2020 10:21:23 +0000 +Subject: [PATCH 1150/1209] overlays: Enable headphone audio in audremap + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/audremap-overlay.dts | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/arch/arm/boot/dts/overlays/audremap-overlay.dts b/arch/arm/boot/dts/overlays/audremap-overlay.dts +index d624bb3a3fea..7324890ead86 100644 +--- a/arch/arm/boot/dts/overlays/audremap-overlay.dts ++++ b/arch/arm/boot/dts/overlays/audremap-overlay.dts +@@ -26,6 +26,13 @@ + }; + }; + ++ fragment@3 { ++ target = <&audio>; ++ __overlay__ { ++ brcm,disable-headphones = <0>; ++ }; ++ }; ++ + __overrides__ { + swap_lr = <&frag0>, "swap_lr?"; + enable_jack = <&frag0>, "enable_jack?"; +-- +2.18.4 + + +From 7ba47aa1f154c2535efcc5648ddbaaf1861292d1 Mon Sep 17 00:00:00 2001 +From: Serge Schneider +Date: Mon, 26 Oct 2020 16:38:21 +0000 +Subject: [PATCH 1151/1209] rpisense-fb: Set pseudo_pallete to prevent crash on + fbcon takeover + +Signed-off-by: Serge Schneider +--- + drivers/video/fbdev/rpisense-fb.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/drivers/video/fbdev/rpisense-fb.c b/drivers/video/fbdev/rpisense-fb.c +index 26432a5a0b4b..325977def531 100644 +--- a/drivers/video/fbdev/rpisense-fb.c ++++ b/drivers/video/fbdev/rpisense-fb.c +@@ -52,6 +52,8 @@ static u8 gamma_low[32] = {0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + + static u8 gamma_user[32]; + ++static u32 pseudo_palette[16]; ++ + static struct rpisense_fb_param rpisense_fb_param = { + .vmem = NULL, + .vmemsize = 128, +@@ -225,6 +227,7 @@ static int rpisense_fb_probe(struct platform_device *pdev) + info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB; + info->screen_base = rpisense_fb_param.vmem; + info->screen_size = rpisense_fb_param.vmemsize; ++ info->pseudo_palette = pseudo_palette; + + if (lowlight) + rpisense_fb_param.gamma = gamma_low; +-- +2.18.4 + + +From a5ef11b58c89d7259a0b6b137e469ae8bf292e82 Mon Sep 17 00:00:00 2001 +From: David Knell +Date: Wed, 28 Oct 2020 14:18:42 +0000 +Subject: [PATCH 1152/1209] PiFi-40 defconfigs + +Signed-off-by: David Knell +--- + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcm2711_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + arch/arm64/configs/bcm2711_defconfig | 1 + + arch/arm64/configs/bcmrpi3_defconfig | 1 + + 5 files changed, 5 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 350461728d8f..6b3d27193be4 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -984,6 +984,7 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADCPRO=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSDSP=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m ++CONFIG_SND_BCM2708_SOC_PIFI_40=m + CONFIG_SND_BCM2708_SOC_RPI_CIRRUS=m + CONFIG_SND_BCM2708_SOC_RPI_DAC=m + CONFIG_SND_BCM2708_SOC_RPI_PROTO=m +diff --git a/arch/arm/configs/bcm2711_defconfig b/arch/arm/configs/bcm2711_defconfig +index d9dc636eb222..5b826bc26c30 100644 +--- a/arch/arm/configs/bcm2711_defconfig ++++ b/arch/arm/configs/bcm2711_defconfig +@@ -998,6 +998,7 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADCPRO=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSDSP=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m ++CONFIG_SND_BCM2708_SOC_PIFI_40=m + CONFIG_SND_BCM2708_SOC_RPI_CIRRUS=m + CONFIG_SND_BCM2708_SOC_RPI_DAC=m + CONFIG_SND_BCM2708_SOC_RPI_PROTO=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 67d7bb17b596..1beb2c61e519 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -976,6 +976,7 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADCPRO=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSDSP=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m ++CONFIG_SND_BCM2708_SOC_PIFI_40=m + CONFIG_SND_BCM2708_SOC_RPI_CIRRUS=m + CONFIG_SND_BCM2708_SOC_RPI_DAC=m + CONFIG_SND_BCM2708_SOC_RPI_PROTO=m +diff --git a/arch/arm64/configs/bcm2711_defconfig b/arch/arm64/configs/bcm2711_defconfig +index 60e1cb88fe8c..22ba4d32f786 100644 +--- a/arch/arm64/configs/bcm2711_defconfig ++++ b/arch/arm64/configs/bcm2711_defconfig +@@ -997,6 +997,7 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADCPRO=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSDSP=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m ++CONFIG_SND_BCM2708_SOC_PIFI_40=m + CONFIG_SND_BCM2708_SOC_RPI_CIRRUS=m + CONFIG_SND_BCM2708_SOC_RPI_DAC=m + CONFIG_SND_BCM2708_SOC_RPI_PROTO=m +diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig +index 54579a745176..a91f46b4a45c 100644 +--- a/arch/arm64/configs/bcmrpi3_defconfig ++++ b/arch/arm64/configs/bcmrpi3_defconfig +@@ -904,6 +904,7 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADCPRO=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSDSP=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m ++CONFIG_SND_BCM2708_SOC_PIFI_40=m + CONFIG_SND_BCM2708_SOC_RPI_DAC=m + CONFIG_SND_BCM2708_SOC_RPI_PROTO=m + CONFIG_SND_BCM2708_SOC_JUSTBOOM_BOTH=m +-- +2.18.4 + + +From ae7c50e3ba2a9b4f2e16c1f2265d64f7f19c839f Mon Sep 17 00:00:00 2001 +From: David Knell +Date: Wed, 28 Oct 2020 14:20:56 +0000 +Subject: [PATCH 1153/1209] PiFi-40 Devicetree files + +Signed-off-by: David Knell +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 6 +++ + .../arm/boot/dts/overlays/pifi-40-overlay.dts | 50 +++++++++++++++++++ + 3 files changed, 57 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/pifi-40-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index ab9fa47c8876..fbb7ed1ba55b 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -125,6 +125,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ + pca953x.dtbo \ + pibell.dtbo \ + pifacedigital.dtbo \ ++ pifi-40.dtbo \ + piglow.dtbo \ + piscreen.dtbo \ + piscreen2r.dtbo \ +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index eff90baed406..c709c4b89c15 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -2000,6 +2000,12 @@ Params: spi-present-mask 8-bit integer, bitmap indicating MCP23S17 SPI0 + 0-3, which can be configured with JP1 and JP2. + + ++Name: pifi-40 ++Info: Configures the PiFi 40W stereo amplifier ++Load: dtoverlay=pifi-40 ++Params: ++ ++ + Name: piglow + Info: Configures the PiGlow by pimoroni.com + Load: dtoverlay=piglow +diff --git a/arch/arm/boot/dts/overlays/pifi-40-overlay.dts b/arch/arm/boot/dts/overlays/pifi-40-overlay.dts +new file mode 100644 +index 000000000000..51a20e54977f +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/pifi-40-overlay.dts +@@ -0,0 +1,50 @@ ++// Definitions for PiFi-40 Amp ++/dts-v1/; ++/plugin/; ++#include ++/ { ++ compatible = "brcm,bcm2835"; ++ ++ fragment@0 { ++ target = <&i2s>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ tas5711l: audio-codec@1a { ++ compatible = "ti,tas5711"; ++ reg = <0x1a>; ++ #sound-dai-cells = <0>; ++ sound-name-prefix = "Left"; ++ status = "okay"; ++ }; ++ ++ tas5711r: audio-codec@1b { ++ compatible = "ti,tas5711"; ++ reg = <0x1b>; ++ #sound-dai-cells = <0>; ++ sound-name-prefix = "Right"; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&sound>; ++ pifi_40: __overlay__ { ++ compatible = "pifi,pifi-40"; ++ audio-codec = <&tas5711l &tas5711r>; ++ i2s-controller = <&i2s>; ++ pdn-gpios = <&gpio 23 1>; ++ status = "okay"; ++ }; ++ }; ++}; +-- +2.18.4 + + +From 4a20e623ba08ea7e371d61f128302d1a16c0a1dd Mon Sep 17 00:00:00 2001 +From: David Knell +Date: Wed, 28 Oct 2020 14:21:37 +0000 +Subject: [PATCH 1154/1209] PiFi-40 driver, Makefile and Kconfig + +Signed-off-by: David Knell +--- + sound/soc/bcm/Kconfig | 8 ++ + sound/soc/bcm/Makefile | 3 + + sound/soc/bcm/pifi-40.c | 282 ++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 293 insertions(+) + create mode 100644 sound/soc/bcm/pifi-40.c + +diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig +index 5ec58ef9cbe6..7433e6f15cd7 100644 +--- a/sound/soc/bcm/Kconfig ++++ b/sound/soc/bcm/Kconfig +@@ -91,6 +91,14 @@ config SND_BCM2708_SOC_HIFIBERRY_AMP + help + Say Y or M if you want to add support for the HifiBerry Amp amplifier board. + ++ config SND_BCM2708_SOC_PIFI_40 ++ tristate "Support for the PiFi-40 amp" ++ depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S ++ select SND_SOC_TAS571X ++ select SND_PIFI_40 ++ help ++ Say Y or M if you want to add support for the PiFi40 amp board ++ + config SND_BCM2708_SOC_RPI_CIRRUS + tristate "Support for Cirrus Logic Audio Card" + depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S +diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile +index cab392690974..00a983355b91 100644 +--- a/sound/soc/bcm/Makefile ++++ b/sound/soc/bcm/Makefile +@@ -40,6 +40,7 @@ snd-soc-pisound-objs := pisound.o + snd-soc-fe-pi-audio-objs := fe-pi-audio.o + snd-soc-rpi-simple-soundcard-objs := rpi-simple-soundcard.o + snd-soc-rpi-wm8804-soundcard-objs := rpi-wm8804-soundcard.o ++snd-soc-pifi-40-objs := pifi-40.o + + obj-$(CONFIG_SND_BCM2708_SOC_GOOGLEVOICEHAT_SOUNDCARD) += snd-soc-googlevoicehat-codec.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o +@@ -69,3 +70,5 @@ obj-$(CONFIG_SND_PISOUND) += snd-soc-pisound.o + obj-$(CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO) += snd-soc-fe-pi-audio.o + obj-$(CONFIG_SND_RPI_SIMPLE_SOUNDCARD) += snd-soc-rpi-simple-soundcard.o + obj-$(CONFIG_SND_RPI_WM8804_SOUNDCARD) += snd-soc-rpi-wm8804-soundcard.o ++obj-$(CONFIG_SND_BCM2708_SOC_PIFI_40) += snd-soc-pifi-40.o ++ +diff --git a/sound/soc/bcm/pifi-40.c b/sound/soc/bcm/pifi-40.c +new file mode 100644 +index 000000000000..dbb9dd0dbe94 +--- /dev/null ++++ b/sound/soc/bcm/pifi-40.c +@@ -0,0 +1,282 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* ++ * ALSA ASoC Machine Driver for PiFi-40 ++ * ++ * Author: David Knell ++ * based on code by Florian Meier ++ * Copyright (C) 2020 ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static struct gpio_desc *pdn_gpio; ++static int vol = 0x30; ++ ++// Volume control ++static int pifi_40_vol_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ ucontrol->value.integer.value[0] = vol; ++ ucontrol->value.integer.value[1] = vol; ++ return 0; ++} ++ ++static int pifi_40_vol_set(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); ++ struct snd_soc_pcm_runtime *rtd; ++ unsigned int v = ucontrol->value.integer.value[0]; ++ struct snd_soc_component *dac[2]; ++ ++ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); ++ dac[0] = rtd->codec_dais[0]->component; ++ dac[1] = rtd->codec_dais[1]->component; ++ ++ snd_soc_component_write(dac[0], 0x07, 255 - v); ++ snd_soc_component_write(dac[1], 0x07, 255 - v); ++ ++ vol = v; ++ return 1; ++} ++ ++static const DECLARE_TLV_DB_SCALE(digital_tlv_master, -10350, 50, 1); ++static const struct snd_kcontrol_new pifi_40_controls[] = { ++ SOC_DOUBLE_R_EXT_TLV("Master Volume", 0x00, 0x01, ++ 0x00, // Min ++ 0xff, // Max ++ 0x01, // Invert ++ pifi_40_vol_get, pifi_40_vol_set, ++ digital_tlv_master) ++}; ++ ++static const char * const codec_ctl_pfx[] = { "Left", "Right" }; ++ ++static const char * const codec_ctl_name[] = { "Master Volume", ++ "Speaker Volume", ++ "Speaker Switch" }; ++ ++static int snd_pifi_40_init(struct snd_soc_pcm_runtime *rtd) ++{ ++ struct snd_soc_card *card = rtd->card; ++ struct snd_soc_component *dac[2]; ++ struct snd_kcontrol *kctl; ++ int i, j; ++ ++ dac[0] = rtd->codec_dais[0]->component; ++ dac[1] = rtd->codec_dais[1]->component; ++ ++ // Set up cards - pulse power down first ++ gpiod_set_value_cansleep(pdn_gpio, 1); ++ usleep_range(1000, 10000); ++ gpiod_set_value_cansleep(pdn_gpio, 0); ++ usleep_range(20000, 30000); ++ ++ // Oscillator trim ++ snd_soc_component_write(dac[0], 0x1b, 0); ++ snd_soc_component_write(dac[1], 0x1b, 0); ++ usleep_range(60000, 80000); ++ ++ // Common setup ++ for (i = 0; i < 2; i++) { ++ // MCLK at 64fs, sample rate 44.1 or 48kHz ++ snd_soc_component_write(dac[i], 0x00, 0x60); ++ ++ // Set up for PBTL ++ snd_soc_component_write(dac[i], 0x19, 0x3A); ++ snd_soc_component_write(dac[i], 0x25, 0x01103245); ++ ++ // Master vol to -10db ++ snd_soc_component_write(dac[i], 0x07, 0x44); ++ } ++ // Inputs set to L and R respectively ++ snd_soc_component_write(dac[0], 0x20, 0x00017772); ++ snd_soc_component_write(dac[1], 0x20, 0x00107772); ++ ++ // Remove codec controls ++ for (i = 0; i < 2; i++) { ++ for (j = 0; j < 3; j++) { ++ char cname[256]; ++ ++ sprintf(cname, "%s %s", codec_ctl_pfx[i], ++ codec_ctl_name[j]); ++ kctl = snd_soc_card_get_kcontrol(card, cname); ++ if (!kctl) { ++ pr_info("Control %s not found\n", ++ cname); ++ } else { ++ kctl->vd[0].access = ++ SNDRV_CTL_ELEM_ACCESS_READWRITE; ++ snd_ctl_remove(card->snd_card, kctl); ++ } ++ } ++ } ++ ++ return 0; ++} ++ ++static int snd_pifi_40_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; ++ unsigned int sample_bits; ++ ++ sample_bits = snd_pcm_format_physical_width(params_format(params)); ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, 64); ++} ++ ++static struct snd_soc_ops snd_pifi_40_ops = { .hw_params = ++ snd_pifi_40_hw_params }; ++ ++static struct snd_soc_dai_link_component pifi_40_codecs[] = { ++ { ++ .dai_name = "tas571x-hifi", ++ }, ++ { ++ .dai_name = "tas571x-hifi", ++ }, ++}; ++ ++SND_SOC_DAILINK_DEFS( ++ pifi_40_dai, DAILINK_COMP_ARRAY(COMP_EMPTY()), ++ DAILINK_COMP_ARRAY(COMP_CODEC("tas571x.1-001a", "tas571x-hifi"), ++ COMP_CODEC("tas571x.1-001b", "tas571x-hifi")), ++ DAILINK_COMP_ARRAY(COMP_EMPTY())); ++ ++static struct snd_soc_dai_link snd_pifi_40_dai[] = { ++ { ++ .name = "PiFi40", ++ .stream_name = "PiFi40", ++ .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | ++ SND_SOC_DAIFMT_CBS_CFS, ++ .ops = &snd_pifi_40_ops, ++ .init = snd_pifi_40_init, ++ SND_SOC_DAILINK_REG(pifi_40_dai), ++ }, ++}; ++ ++// Machine driver ++static struct snd_soc_card snd_pifi_40 = { ++ .name = "PiFi40", ++ .owner = THIS_MODULE, ++ .dai_link = snd_pifi_40_dai, ++ .num_links = ARRAY_SIZE(snd_pifi_40_dai), ++ .controls = pifi_40_controls, ++ .num_controls = ARRAY_SIZE(pifi_40_controls) ++}; ++ ++static void snd_pifi_40_pdn(struct snd_soc_card *card, int on) ++{ ++ if (pdn_gpio) ++ gpiod_set_value_cansleep(pdn_gpio, on ? 0 : 1); ++} ++ ++static int snd_pifi_40_probe(struct platform_device *pdev) ++{ ++ struct snd_soc_card *card = &snd_pifi_40; ++ int ret = 0, i = 0; ++ ++ card->dev = &pdev->dev; ++ platform_set_drvdata(pdev, &snd_pifi_40); ++ ++ if (pdev->dev.of_node) { ++ struct device_node *i2s_node; ++ struct snd_soc_dai_link *dai; ++ ++ dai = &snd_pifi_40_dai[0]; ++ i2s_node = of_parse_phandle(pdev->dev.of_node, "i2s-controller", ++ 0); ++ if (i2s_node) { ++ for (i = 0; i < card->num_links; i++) { ++ dai->cpus->dai_name = NULL; ++ dai->cpus->of_node = i2s_node; ++ dai->platforms->name = NULL; ++ dai->platforms->of_node = i2s_node; ++ } ++ } ++ ++ pifi_40_codecs[0].of_node = ++ of_parse_phandle(pdev->dev.of_node, "audio-codec", 0); ++ pifi_40_codecs[1].of_node = ++ of_parse_phandle(pdev->dev.of_node, "audio-codec", 1); ++ if (!pifi_40_codecs[0].of_node || !pifi_40_codecs[1].of_node) { ++ dev_err(&pdev->dev, ++ "Property 'audio-codec' missing or invalid\n"); ++ return -EINVAL; ++ } ++ ++ pdn_gpio = devm_gpiod_get_optional(&pdev->dev, "pdn", ++ GPIOD_OUT_LOW); ++ if (IS_ERR(pdn_gpio)) { ++ ret = PTR_ERR(pdn_gpio); ++ dev_err(&pdev->dev, "failed to get pdn gpio: %d\n", ++ ret); ++ return ret; ++ } ++ ++ ret = snd_soc_register_card(&snd_pifi_40); ++ if (ret < 0) { ++ dev_err(&pdev->dev, ++ "snd_soc_register_card() failed: %d\n", ret); ++ return ret; ++ } ++ ++ return 0; ++ } ++ ++ return -EINVAL; ++} ++ ++static int snd_pifi_40_remove(struct platform_device *pdev) ++{ ++ struct snd_soc_card *card = platform_get_drvdata(pdev); ++ ++ kfree(&card->drvdata); ++ snd_pifi_40_pdn(&snd_pifi_40, 0); ++ return snd_soc_unregister_card(&snd_pifi_40); ++} ++ ++static const struct of_device_id snd_pifi_40_of_match[] = { ++ { ++ .compatible = "pifi,pifi-40", ++ }, ++ { /* sentinel */ }, ++}; ++ ++MODULE_DEVICE_TABLE(of, snd_pifi_40_of_match); ++ ++static struct platform_driver snd_pifi_40_driver = { ++ .driver = { ++ .name = "snd-pifi-40", ++ .owner = THIS_MODULE, ++ .of_match_table = snd_pifi_40_of_match, ++ }, ++ .probe = snd_pifi_40_probe, ++ .remove = snd_pifi_40_remove, ++}; ++ ++module_platform_driver(snd_pifi_40_driver); ++ ++MODULE_AUTHOR("David Knell "); ++MODULE_DESCRIPTION("ALSA ASoC Machine Driver for PiFi-40"); ++MODULE_LICENSE("GPL v2"); +-- +2.18.4 + + +From 2b6cace73f29add0d588095b9222cf1085c550f5 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 27 Oct 2020 09:59:49 +0000 +Subject: [PATCH 1155/1209] dwc_otg: Minimise header and fix build warnings + +Delete a large amount of unused declaration from "usb.h", some of which +were causing build warnings, and get the module building cleanly. + +Signed-off-by: Phil Elwell +--- + drivers/usb/host/dwc_common_port/usb.h | 664 ------------------- + drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 4 +- + drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c | 2 +- + 3 files changed, 3 insertions(+), 667 deletions(-) + +diff --git a/drivers/usb/host/dwc_common_port/usb.h b/drivers/usb/host/dwc_common_port/usb.h +index 27bda82dac2e..f78593575736 100644 +--- a/drivers/usb/host/dwc_common_port/usb.h ++++ b/drivers/usb/host/dwc_common_port/usb.h +@@ -55,12 +55,6 @@ typedef u_int8_t uByte; + typedef u_int8_t uWord[2]; + typedef u_int8_t uDWord[4]; + +-#define USETW2(w,h,l) ((w)[0] = (u_int8_t)(l), (w)[1] = (u_int8_t)(h)) +-#define UCONSTW(x) { (x) & 0xff, ((x) >> 8) & 0xff } +-#define UCONSTDW(x) { (x) & 0xff, ((x) >> 8) & 0xff, \ +- ((x) >> 16) & 0xff, ((x) >> 24) & 0xff } +- +-#if 1 + #define UGETW(w) ((w)[0] | ((w)[1] << 8)) + #define USETW(w,v) ((w)[0] = (u_int8_t)(v), (w)[1] = (u_int8_t)((v) >> 8)) + #define UGETDW(w) ((w)[0] | ((w)[1] << 8) | ((w)[2] << 16) | ((w)[3] << 24)) +@@ -68,31 +62,6 @@ typedef u_int8_t uDWord[4]; + (w)[1] = (u_int8_t)((v) >> 8), \ + (w)[2] = (u_int8_t)((v) >> 16), \ + (w)[3] = (u_int8_t)((v) >> 24)) +-#else +-/* +- * On little-endian machines that can handle unanliged accesses +- * (e.g. i386) these macros can be replaced by the following. +- */ +-#define UGETW(w) (*(u_int16_t *)(w)) +-#define USETW(w,v) (*(u_int16_t *)(w) = (v)) +-#define UGETDW(w) (*(u_int32_t *)(w)) +-#define USETDW(w,v) (*(u_int32_t *)(w) = (v)) +-#endif +- +-/* +- * Macros for accessing UAS IU fields, which are big-endian +- */ +-#define IUSETW2(w,h,l) ((w)[0] = (u_int8_t)(h), (w)[1] = (u_int8_t)(l)) +-#define IUCONSTW(x) { ((x) >> 8) & 0xff, (x) & 0xff } +-#define IUCONSTDW(x) { ((x) >> 24) & 0xff, ((x) >> 16) & 0xff, \ +- ((x) >> 8) & 0xff, (x) & 0xff } +-#define IUGETW(w) (((w)[0] << 8) | (w)[1]) +-#define IUSETW(w,v) ((w)[0] = (u_int8_t)((v) >> 8), (w)[1] = (u_int8_t)(v)) +-#define IUGETDW(w) (((w)[0] << 24) | ((w)[1] << 16) | ((w)[2] << 8) | (w)[3]) +-#define IUSETDW(w,v) ((w)[0] = (u_int8_t)((v) >> 24), \ +- (w)[1] = (u_int8_t)((v) >> 16), \ +- (w)[2] = (u_int8_t)((v) >> 8), \ +- (w)[3] = (u_int8_t)(v)) + + #define UPACKED __attribute__((__packed__)) + +@@ -119,29 +88,6 @@ typedef struct { + #define UT_ENDPOINT 0x02 + #define UT_OTHER 0x03 + +-#define UT_READ_DEVICE (UT_READ | UT_STANDARD | UT_DEVICE) +-#define UT_READ_INTERFACE (UT_READ | UT_STANDARD | UT_INTERFACE) +-#define UT_READ_ENDPOINT (UT_READ | UT_STANDARD | UT_ENDPOINT) +-#define UT_WRITE_DEVICE (UT_WRITE | UT_STANDARD | UT_DEVICE) +-#define UT_WRITE_INTERFACE (UT_WRITE | UT_STANDARD | UT_INTERFACE) +-#define UT_WRITE_ENDPOINT (UT_WRITE | UT_STANDARD | UT_ENDPOINT) +-#define UT_READ_CLASS_DEVICE (UT_READ | UT_CLASS | UT_DEVICE) +-#define UT_READ_CLASS_INTERFACE (UT_READ | UT_CLASS | UT_INTERFACE) +-#define UT_READ_CLASS_OTHER (UT_READ | UT_CLASS | UT_OTHER) +-#define UT_READ_CLASS_ENDPOINT (UT_READ | UT_CLASS | UT_ENDPOINT) +-#define UT_WRITE_CLASS_DEVICE (UT_WRITE | UT_CLASS | UT_DEVICE) +-#define UT_WRITE_CLASS_INTERFACE (UT_WRITE | UT_CLASS | UT_INTERFACE) +-#define UT_WRITE_CLASS_OTHER (UT_WRITE | UT_CLASS | UT_OTHER) +-#define UT_WRITE_CLASS_ENDPOINT (UT_WRITE | UT_CLASS | UT_ENDPOINT) +-#define UT_READ_VENDOR_DEVICE (UT_READ | UT_VENDOR | UT_DEVICE) +-#define UT_READ_VENDOR_INTERFACE (UT_READ | UT_VENDOR | UT_INTERFACE) +-#define UT_READ_VENDOR_OTHER (UT_READ | UT_VENDOR | UT_OTHER) +-#define UT_READ_VENDOR_ENDPOINT (UT_READ | UT_VENDOR | UT_ENDPOINT) +-#define UT_WRITE_VENDOR_DEVICE (UT_WRITE | UT_VENDOR | UT_DEVICE) +-#define UT_WRITE_VENDOR_INTERFACE (UT_WRITE | UT_VENDOR | UT_INTERFACE) +-#define UT_WRITE_VENDOR_OTHER (UT_WRITE | UT_VENDOR | UT_OTHER) +-#define UT_WRITE_VENDOR_ENDPOINT (UT_WRITE | UT_VENDOR | UT_ENDPOINT) +- + /* Requests */ + #define UR_GET_STATUS 0x00 + #define USTAT_STANDARD_STATUS 0x00 +@@ -240,71 +186,6 @@ typedef struct { + #include + #endif + +-typedef struct { +- uByte bLength; +- uByte bDescriptorType; +- uByte bDescriptorSubtype; +-} UPACKED usb_descriptor_t; +- +-typedef struct { +- uByte bLength; +- uByte bDescriptorType; +-} UPACKED usb_descriptor_header_t; +- +-typedef struct { +- uByte bLength; +- uByte bDescriptorType; +- uWord bcdUSB; +-#define UD_USB_2_0 0x0200 +-#define UD_IS_USB2(d) (UGETW((d)->bcdUSB) >= UD_USB_2_0) +- uByte bDeviceClass; +- uByte bDeviceSubClass; +- uByte bDeviceProtocol; +- uByte bMaxPacketSize; +- /* The fields below are not part of the initial descriptor. */ +- uWord idVendor; +- uWord idProduct; +- uWord bcdDevice; +- uByte iManufacturer; +- uByte iProduct; +- uByte iSerialNumber; +- uByte bNumConfigurations; +-} UPACKED usb_device_descriptor_t; +-#define USB_DEVICE_DESCRIPTOR_SIZE 18 +- +-typedef struct { +- uByte bLength; +- uByte bDescriptorType; +- uWord wTotalLength; +- uByte bNumInterface; +- uByte bConfigurationValue; +- uByte iConfiguration; +-#define UC_ATT_ONE (1 << 7) /* must be set */ +-#define UC_ATT_SELFPOWER (1 << 6) /* self powered */ +-#define UC_ATT_WAKEUP (1 << 5) /* can wakeup */ +-#define UC_ATT_BATTERY (1 << 4) /* battery powered */ +- uByte bmAttributes; +-#define UC_BUS_POWERED 0x80 +-#define UC_SELF_POWERED 0x40 +-#define UC_REMOTE_WAKEUP 0x20 +- uByte bMaxPower; /* max current in 2 mA units */ +-#define UC_POWER_FACTOR 2 +-} UPACKED usb_config_descriptor_t; +-#define USB_CONFIG_DESCRIPTOR_SIZE 9 +- +-typedef struct { +- uByte bLength; +- uByte bDescriptorType; +- uByte bInterfaceNumber; +- uByte bAlternateSetting; +- uByte bNumEndpoints; +- uByte bInterfaceClass; +- uByte bInterfaceSubClass; +- uByte bInterfaceProtocol; +- uByte iInterface; +-} UPACKED usb_interface_descriptor_t; +-#define USB_INTERFACE_DESCRIPTOR_SIZE 9 +- + typedef struct { + uByte bLength; + uByte bDescriptorType; +@@ -332,27 +213,6 @@ typedef struct { + } UPACKED usb_endpoint_descriptor_t; + #define USB_ENDPOINT_DESCRIPTOR_SIZE 7 + +-typedef struct ss_endpoint_companion_descriptor { +- uByte bLength; +- uByte bDescriptorType; +- uByte bMaxBurst; +-#define USSE_GET_MAX_STREAMS(a) ((a) & 0x1f) +-#define USSE_SET_MAX_STREAMS(a, b) ((a) | ((b) & 0x1f)) +-#define USSE_GET_MAX_PACKET_NUM(a) ((a) & 0x03) +-#define USSE_SET_MAX_PACKET_NUM(a, b) ((a) | ((b) & 0x03)) +- uByte bmAttributes; +- uWord wBytesPerInterval; +-} UPACKED ss_endpoint_companion_descriptor_t; +-#define USB_SS_ENDPOINT_COMPANION_DESCRIPTOR_SIZE 6 +- +-typedef struct { +- uByte bLength; +- uByte bDescriptorType; +- uWord bString[127]; +-} UPACKED usb_string_descriptor_t; +-#define USB_MAX_STRING_LEN 128 +-#define USB_LANGUAGE_TABLE 0 /* # of the string language id table */ +- + /* Hub specific request */ + #define UR_GET_BUS_STATE 0x02 + #define UR_CLEAR_TT_BUFFER 0x08 +@@ -411,530 +271,6 @@ typedef struct { + } UPACKED usb_hub_descriptor_t; + #define USB_HUB_DESCRIPTOR_SIZE 9 /* includes deprecated PortPowerCtrlMask */ + +-typedef struct { +- uByte bLength; +- uByte bDescriptorType; +- uWord bcdUSB; +- uByte bDeviceClass; +- uByte bDeviceSubClass; +- uByte bDeviceProtocol; +- uByte bMaxPacketSize0; +- uByte bNumConfigurations; +- uByte bReserved; +-} UPACKED usb_device_qualifier_t; +-#define USB_DEVICE_QUALIFIER_SIZE 10 +- +-typedef struct { +- uByte bLength; +- uByte bDescriptorType; +- uByte bmAttributes; +-#define UOTG_SRP 0x01 +-#define UOTG_HNP 0x02 +-} UPACKED usb_otg_descriptor_t; +- +-/* OTG feature selectors */ +-#define UOTG_B_HNP_ENABLE 3 +-#define UOTG_A_HNP_SUPPORT 4 +-#define UOTG_A_ALT_HNP_SUPPORT 5 +- +-typedef struct { +- uWord wStatus; +-/* Device status flags */ +-#define UDS_SELF_POWERED 0x0001 +-#define UDS_REMOTE_WAKEUP 0x0002 +-/* Endpoint status flags */ +-#define UES_HALT 0x0001 +-} UPACKED usb_status_t; +- +-typedef struct { +- uWord wHubStatus; +-#define UHS_LOCAL_POWER 0x0001 +-#define UHS_OVER_CURRENT 0x0002 +- uWord wHubChange; +-} UPACKED usb_hub_status_t; +- +-typedef struct { +- uWord wPortStatus; +-#define UPS_CURRENT_CONNECT_STATUS 0x0001 +-#define UPS_PORT_ENABLED 0x0002 +-#define UPS_SUSPEND 0x0004 +-#define UPS_OVERCURRENT_INDICATOR 0x0008 +-#define UPS_RESET 0x0010 +-#define UPS_PORT_POWER 0x0100 +-#define UPS_LOW_SPEED 0x0200 +-#define UPS_HIGH_SPEED 0x0400 +-#define UPS_PORT_TEST 0x0800 +-#define UPS_PORT_INDICATOR 0x1000 +- uWord wPortChange; +-#define UPS_C_CONNECT_STATUS 0x0001 +-#define UPS_C_PORT_ENABLED 0x0002 +-#define UPS_C_SUSPEND 0x0004 +-#define UPS_C_OVERCURRENT_INDICATOR 0x0008 +-#define UPS_C_PORT_RESET 0x0010 +-} UPACKED usb_port_status_t; +- +-#ifdef _MSC_VER +-#include +-#endif +- +-/* Device class codes */ +-#define UDCLASS_IN_INTERFACE 0x00 +-#define UDCLASS_COMM 0x02 +-#define UDCLASS_HUB 0x09 +-#define UDSUBCLASS_HUB 0x00 +-#define UDPROTO_FSHUB 0x00 +-#define UDPROTO_HSHUBSTT 0x01 +-#define UDPROTO_HSHUBMTT 0x02 +-#define UDCLASS_DIAGNOSTIC 0xdc +-#define UDCLASS_WIRELESS 0xe0 +-#define UDSUBCLASS_RF 0x01 +-#define UDPROTO_BLUETOOTH 0x01 +-#define UDCLASS_VENDOR 0xff +- +-/* Interface class codes */ +-#define UICLASS_UNSPEC 0x00 +- +-#define UICLASS_AUDIO 0x01 +-#define UISUBCLASS_AUDIOCONTROL 1 +-#define UISUBCLASS_AUDIOSTREAM 2 +-#define UISUBCLASS_MIDISTREAM 3 +- +-#define UICLASS_CDC 0x02 /* communication */ +-#define UISUBCLASS_DIRECT_LINE_CONTROL_MODEL 1 +-#define UISUBCLASS_ABSTRACT_CONTROL_MODEL 2 +-#define UISUBCLASS_TELEPHONE_CONTROL_MODEL 3 +-#define UISUBCLASS_MULTICHANNEL_CONTROL_MODEL 4 +-#define UISUBCLASS_CAPI_CONTROLMODEL 5 +-#define UISUBCLASS_ETHERNET_NETWORKING_CONTROL_MODEL 6 +-#define UISUBCLASS_ATM_NETWORKING_CONTROL_MODEL 7 +-#define UIPROTO_CDC_AT 1 +- +-#define UICLASS_HID 0x03 +-#define UISUBCLASS_BOOT 1 +-#define UIPROTO_BOOT_KEYBOARD 1 +- +-#define UICLASS_PHYSICAL 0x05 +- +-#define UICLASS_IMAGE 0x06 +- +-#define UICLASS_PRINTER 0x07 +-#define UISUBCLASS_PRINTER 1 +-#define UIPROTO_PRINTER_UNI 1 +-#define UIPROTO_PRINTER_BI 2 +-#define UIPROTO_PRINTER_1284 3 +- +-#define UICLASS_MASS 0x08 +-#define UISUBCLASS_RBC 1 +-#define UISUBCLASS_SFF8020I 2 +-#define UISUBCLASS_QIC157 3 +-#define UISUBCLASS_UFI 4 +-#define UISUBCLASS_SFF8070I 5 +-#define UISUBCLASS_SCSI 6 +-#define UIPROTO_MASS_CBI_I 0 +-#define UIPROTO_MASS_CBI 1 +-#define UIPROTO_MASS_BBB_OLD 2 /* Not in the spec anymore */ +-#define UIPROTO_MASS_BBB 80 /* 'P' for the Iomega Zip drive */ +- +-#define UICLASS_HUB 0x09 +-#define UISUBCLASS_HUB 0 +-#define UIPROTO_FSHUB 0 +-#define UIPROTO_HSHUBSTT 0 /* Yes, same as previous */ +-#define UIPROTO_HSHUBMTT 1 +- +-#define UICLASS_CDC_DATA 0x0a +-#define UISUBCLASS_DATA 0 +-#define UIPROTO_DATA_ISDNBRI 0x30 /* Physical iface */ +-#define UIPROTO_DATA_HDLC 0x31 /* HDLC */ +-#define UIPROTO_DATA_TRANSPARENT 0x32 /* Transparent */ +-#define UIPROTO_DATA_Q921M 0x50 /* Management for Q921 */ +-#define UIPROTO_DATA_Q921 0x51 /* Data for Q921 */ +-#define UIPROTO_DATA_Q921TM 0x52 /* TEI multiplexer for Q921 */ +-#define UIPROTO_DATA_V42BIS 0x90 /* Data compression */ +-#define UIPROTO_DATA_Q931 0x91 /* Euro-ISDN */ +-#define UIPROTO_DATA_V120 0x92 /* V.24 rate adaption */ +-#define UIPROTO_DATA_CAPI 0x93 /* CAPI 2.0 commands */ +-#define UIPROTO_DATA_HOST_BASED 0xfd /* Host based driver */ +-#define UIPROTO_DATA_PUF 0xfe /* see Prot. Unit Func. Desc.*/ +-#define UIPROTO_DATA_VENDOR 0xff /* Vendor specific */ +- +-#define UICLASS_SMARTCARD 0x0b +- +-/*#define UICLASS_FIRM_UPD 0x0c*/ +- +-#define UICLASS_SECURITY 0x0d +- +-#define UICLASS_DIAGNOSTIC 0xdc +- +-#define UICLASS_WIRELESS 0xe0 +-#define UISUBCLASS_RF 0x01 +-#define UIPROTO_BLUETOOTH 0x01 +- +-#define UICLASS_APPL_SPEC 0xfe +-#define UISUBCLASS_FIRMWARE_DOWNLOAD 1 +-#define UISUBCLASS_IRDA 2 +-#define UIPROTO_IRDA 0 +- +-#define UICLASS_VENDOR 0xff +- +-#define USB_HUB_MAX_DEPTH 5 +- +-/* +- * Minimum time a device needs to be powered down to go through +- * a power cycle. XXX Are these time in the spec? +- */ +-#define USB_POWER_DOWN_TIME 200 /* ms */ +-#define USB_PORT_POWER_DOWN_TIME 100 /* ms */ +- +-#if 0 +-/* These are the values from the spec. */ +-#define USB_PORT_RESET_DELAY 10 /* ms */ +-#define USB_PORT_ROOT_RESET_DELAY 50 /* ms */ +-#define USB_PORT_RESET_RECOVERY 10 /* ms */ +-#define USB_PORT_POWERUP_DELAY 100 /* ms */ +-#define USB_SET_ADDRESS_SETTLE 2 /* ms */ +-#define USB_RESUME_DELAY (20*5) /* ms */ +-#define USB_RESUME_WAIT 10 /* ms */ +-#define USB_RESUME_RECOVERY 10 /* ms */ +-#define USB_EXTRA_POWER_UP_TIME 0 /* ms */ +-#else +-/* Allow for marginal (i.e. non-conforming) devices. */ +-#define USB_PORT_RESET_DELAY 50 /* ms */ +-#define USB_PORT_ROOT_RESET_DELAY 250 /* ms */ +-#define USB_PORT_RESET_RECOVERY 250 /* ms */ +-#define USB_PORT_POWERUP_DELAY 300 /* ms */ +-#define USB_SET_ADDRESS_SETTLE 10 /* ms */ +-#define USB_RESUME_DELAY (50*5) /* ms */ +-#define USB_RESUME_WAIT 50 /* ms */ +-#define USB_RESUME_RECOVERY 50 /* ms */ +-#define USB_EXTRA_POWER_UP_TIME 20 /* ms */ +-#endif +- +-#define USB_MIN_POWER 100 /* mA */ +-#define USB_MAX_POWER 500 /* mA */ +- +-#define USB_BUS_RESET_DELAY 100 /* ms XXX?*/ +- +-#define USB_UNCONFIG_NO 0 +-#define USB_UNCONFIG_INDEX (-1) +- +-/*** ioctl() related stuff ***/ +- +-struct usb_ctl_request { +- int ucr_addr; +- usb_device_request_t ucr_request; +- void *ucr_data; +- int ucr_flags; +-#define USBD_SHORT_XFER_OK 0x04 /* allow short reads */ +- int ucr_actlen; /* actual length transferred */ +-}; +- +-struct usb_alt_interface { +- int uai_config_index; +- int uai_interface_index; +- int uai_alt_no; +-}; +- +-#define USB_CURRENT_CONFIG_INDEX (-1) +-#define USB_CURRENT_ALT_INDEX (-1) +- +-struct usb_config_desc { +- int ucd_config_index; +- usb_config_descriptor_t ucd_desc; +-}; +- +-struct usb_interface_desc { +- int uid_config_index; +- int uid_interface_index; +- int uid_alt_index; +- usb_interface_descriptor_t uid_desc; +-}; +- +-struct usb_endpoint_desc { +- int ued_config_index; +- int ued_interface_index; +- int ued_alt_index; +- int ued_endpoint_index; +- usb_endpoint_descriptor_t ued_desc; +-}; +- +-struct usb_full_desc { +- int ufd_config_index; +- u_int ufd_size; +- u_char *ufd_data; +-}; +- +-struct usb_string_desc { +- int usd_string_index; +- int usd_language_id; +- usb_string_descriptor_t usd_desc; +-}; +- +-struct usb_ctl_report_desc { +- int ucrd_size; +- u_char ucrd_data[1024]; /* filled data size will vary */ +-}; +- +-typedef struct { u_int32_t cookie; } usb_event_cookie_t; +- +-#define USB_MAX_DEVNAMES 4 +-#define USB_MAX_DEVNAMELEN 16 +-struct usb_device_info { +- u_int8_t udi_bus; +- u_int8_t udi_addr; /* device address */ +- usb_event_cookie_t udi_cookie; +- char udi_product[USB_MAX_STRING_LEN]; +- char udi_vendor[USB_MAX_STRING_LEN]; +- char udi_release[8]; +- u_int16_t udi_productNo; +- u_int16_t udi_vendorNo; +- u_int16_t udi_releaseNo; +- u_int8_t udi_class; +- u_int8_t udi_subclass; +- u_int8_t udi_protocol; +- u_int8_t udi_config; +- u_int8_t udi_speed; +-#define USB_SPEED_UNKNOWN 0 +-#define USB_SPEED_LOW 1 +-#define USB_SPEED_FULL 2 +-#define USB_SPEED_HIGH 3 +-#define USB_SPEED_VARIABLE 4 +-#define USB_SPEED_SUPER 5 +- int udi_power; /* power consumption in mA, 0 if selfpowered */ +- int udi_nports; +- char udi_devnames[USB_MAX_DEVNAMES][USB_MAX_DEVNAMELEN]; +- u_int8_t udi_ports[16];/* hub only: addresses of devices on ports */ +-#define USB_PORT_ENABLED 0xff +-#define USB_PORT_SUSPENDED 0xfe +-#define USB_PORT_POWERED 0xfd +-#define USB_PORT_DISABLED 0xfc +-}; +- +-struct usb_ctl_report { +- int ucr_report; +- u_char ucr_data[1024]; /* filled data size will vary */ +-}; +- +-struct usb_device_stats { +- u_long uds_requests[4]; /* indexed by transfer type UE_* */ +-}; +- +-#define WUSB_MIN_IE 0x80 +-#define WUSB_WCTA_IE 0x80 +-#define WUSB_WCONNECTACK_IE 0x81 +-#define WUSB_WHOSTINFO_IE 0x82 +-#define WUHI_GET_CA(_bmAttributes_) ((_bmAttributes_) & 0x3) +-#define WUHI_CA_RECONN 0x00 +-#define WUHI_CA_LIMITED 0x01 +-#define WUHI_CA_ALL 0x03 +-#define WUHI_GET_MLSI(_bmAttributes_) (((_bmAttributes_) & 0x38) >> 3) +-#define WUSB_WCHCHANGEANNOUNCE_IE 0x83 +-#define WUSB_WDEV_DISCONNECT_IE 0x84 +-#define WUSB_WHOST_DISCONNECT_IE 0x85 +-#define WUSB_WRELEASE_CHANNEL_IE 0x86 +-#define WUSB_WWORK_IE 0x87 +-#define WUSB_WCHANNEL_STOP_IE 0x88 +-#define WUSB_WDEV_KEEPALIVE_IE 0x89 +-#define WUSB_WISOCH_DISCARD_IE 0x8A +-#define WUSB_WRESETDEVICE_IE 0x8B +-#define WUSB_WXMIT_PACKET_ADJUST_IE 0x8C +-#define WUSB_MAX_IE 0x8C +- +-/* Device Notification Types */ +- +-#define WUSB_DN_MIN 0x01 +-#define WUSB_DN_CONNECT 0x01 +-# define WUSB_DA_OLDCONN 0x00 +-# define WUSB_DA_NEWCONN 0x01 +-# define WUSB_DA_SELF_BEACON 0x02 +-# define WUSB_DA_DIR_BEACON 0x04 +-# define WUSB_DA_NO_BEACON 0x06 +-#define WUSB_DN_DISCONNECT 0x02 +-#define WUSB_DN_EPRDY 0x03 +-#define WUSB_DN_MASAVAILCHANGED 0x04 +-#define WUSB_DN_REMOTEWAKEUP 0x05 +-#define WUSB_DN_SLEEP 0x06 +-#define WUSB_DN_ALIVE 0x07 +-#define WUSB_DN_MAX 0x07 +- +-#ifdef _MSC_VER +-#include +-#endif +- +-/* WUSB Handshake Data. Used during the SET/GET HANDSHAKE requests */ +-typedef struct wusb_hndshk_data { +- uByte bMessageNumber; +- uByte bStatus; +- uByte tTKID[3]; +- uByte bReserved; +- uByte CDID[16]; +- uByte Nonce[16]; +- uByte MIC[8]; +-} UPACKED wusb_hndshk_data_t; +-#define WUSB_HANDSHAKE_LEN_FOR_MIC 38 +- +-/* WUSB Connection Context */ +-typedef struct wusb_conn_context { +- uByte CHID [16]; +- uByte CDID [16]; +- uByte CK [16]; +-} UPACKED wusb_conn_context_t; +- +-/* WUSB Security Descriptor */ +-typedef struct wusb_security_desc { +- uByte bLength; +- uByte bDescriptorType; +- uWord wTotalLength; +- uByte bNumEncryptionTypes; +-} UPACKED wusb_security_desc_t; +- +-/* WUSB Encryption Type Descriptor */ +-typedef struct wusb_encrypt_type_desc { +- uByte bLength; +- uByte bDescriptorType; +- +- uByte bEncryptionType; +-#define WUETD_UNSECURE 0 +-#define WUETD_WIRED 1 +-#define WUETD_CCM_1 2 +-#define WUETD_RSA_1 3 +- +- uByte bEncryptionValue; +- uByte bAuthKeyIndex; +-} UPACKED wusb_encrypt_type_desc_t; +- +-/* WUSB Key Descriptor */ +-typedef struct wusb_key_desc { +- uByte bLength; +- uByte bDescriptorType; +- uByte tTKID[3]; +- uByte bReserved; +- uByte KeyData[1]; /* variable length */ +-} UPACKED wusb_key_desc_t; +- +-/* WUSB BOS Descriptor (Binary device Object Store) */ +-typedef struct wusb_bos_desc { +- uByte bLength; +- uByte bDescriptorType; +- uWord wTotalLength; +- uByte bNumDeviceCaps; +-} UPACKED wusb_bos_desc_t; +- +-#define USB_DEVICE_CAPABILITY_20_EXTENSION 0x02 +-typedef struct usb_dev_cap_20_ext_desc { +- uByte bLength; +- uByte bDescriptorType; +- uByte bDevCapabilityType; +-#define USB_20_EXT_LPM 0x02 +- uDWord bmAttributes; +-} UPACKED usb_dev_cap_20_ext_desc_t; +- +-#define USB_DEVICE_CAPABILITY_SS_USB 0x03 +-typedef struct usb_dev_cap_ss_usb { +- uByte bLength; +- uByte bDescriptorType; +- uByte bDevCapabilityType; +-#define USB_DC_SS_USB_LTM_CAPABLE 0x02 +- uByte bmAttributes; +-#define USB_DC_SS_USB_SPEED_SUPPORT_LOW 0x01 +-#define USB_DC_SS_USB_SPEED_SUPPORT_FULL 0x02 +-#define USB_DC_SS_USB_SPEED_SUPPORT_HIGH 0x04 +-#define USB_DC_SS_USB_SPEED_SUPPORT_SS 0x08 +- uWord wSpeedsSupported; +- uByte bFunctionalitySupport; +- uByte bU1DevExitLat; +- uWord wU2DevExitLat; +-} UPACKED usb_dev_cap_ss_usb_t; +- +-#define USB_DEVICE_CAPABILITY_CONTAINER_ID 0x04 +-typedef struct usb_dev_cap_container_id { +- uByte bLength; +- uByte bDescriptorType; +- uByte bDevCapabilityType; +- uByte bReserved; +- uByte containerID[16]; +-} UPACKED usb_dev_cap_container_id_t; +- +-/* Device Capability Type Codes */ +-#define WUSB_DEVICE_CAPABILITY_WIRELESS_USB 0x01 +- +-/* Device Capability Descriptor */ +-typedef struct wusb_dev_cap_desc { +- uByte bLength; +- uByte bDescriptorType; +- uByte bDevCapabilityType; +- uByte caps[1]; /* Variable length */ +-} UPACKED wusb_dev_cap_desc_t; +- +-/* Device Capability Descriptor */ +-typedef struct wusb_dev_cap_uwb_desc { +- uByte bLength; +- uByte bDescriptorType; +- uByte bDevCapabilityType; +- uByte bmAttributes; +- uWord wPHYRates; /* Bitmap */ +- uByte bmTFITXPowerInfo; +- uByte bmFFITXPowerInfo; +- uWord bmBandGroup; +- uByte bReserved; +-} UPACKED wusb_dev_cap_uwb_desc_t; +- +-/* Wireless USB Endpoint Companion Descriptor */ +-typedef struct wusb_endpoint_companion_desc { +- uByte bLength; +- uByte bDescriptorType; +- uByte bMaxBurst; +- uByte bMaxSequence; +- uWord wMaxStreamDelay; +- uWord wOverTheAirPacketSize; +- uByte bOverTheAirInterval; +- uByte bmCompAttributes; +-} UPACKED wusb_endpoint_companion_desc_t; +- +-/* Wireless USB Numeric Association M1 Data Structure */ +-typedef struct wusb_m1_data { +- uByte version; +- uWord langId; +- uByte deviceFriendlyNameLength; +- uByte sha_256_m3[32]; +- uByte deviceFriendlyName[256]; +-} UPACKED wusb_m1_data_t; +- +-typedef struct wusb_m2_data { +- uByte version; +- uWord langId; +- uByte hostFriendlyNameLength; +- uByte pkh[384]; +- uByte hostFriendlyName[256]; +-} UPACKED wusb_m2_data_t; +- +-typedef struct wusb_m3_data { +- uByte pkd[384]; +- uByte nd; +-} UPACKED wusb_m3_data_t; +- +-typedef struct wusb_m4_data { +- uDWord _attributeTypeIdAndLength_1; +- uWord associationTypeId; +- +- uDWord _attributeTypeIdAndLength_2; +- uWord associationSubTypeId; +- +- uDWord _attributeTypeIdAndLength_3; +- uDWord length; +- +- uDWord _attributeTypeIdAndLength_4; +- uDWord associationStatus; +- +- uDWord _attributeTypeIdAndLength_5; +- uByte chid[16]; +- +- uDWord _attributeTypeIdAndLength_6; +- uByte cdid[16]; +- +- uDWord _attributeTypeIdAndLength_7; +- uByte bandGroups[2]; +-} UPACKED wusb_m4_data_t; +- + #ifdef _MSC_VER + #include + #endif +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +index eda7a33908b3..50c8705185ad 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +@@ -482,8 +482,8 @@ static void hcd_init_fiq(void *cookie) + otg_dev->os_dep.mphi_base + 0x1f0; + dwc_otg_hcd->fiq_state->mphi_regs.swirq_clr = + otg_dev->os_dep.mphi_base + 0x1f4; +- DWC_WARN("Fake MPHI regs_base at 0x%08x", +- (int)dwc_otg_hcd->fiq_state->mphi_regs.base); ++ DWC_WARN("Fake MPHI regs_base at %px", ++ dwc_otg_hcd->fiq_state->mphi_regs.base); + } else { + dwc_otg_hcd->fiq_state->mphi_regs.ctrl = + otg_dev->os_dep.mphi_base + 0x4c; +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c +index e55ea9c74be4..76e94b4ebb43 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c +@@ -3377,7 +3377,7 @@ void predict_nextep_seq( dwc_otg_core_if_t * core_if) + dtknq1_data_t dtknqr1; + uint32_t in_tkn_epnums[4]; + uint8_t seqnum[MAX_EPS_CHANNELS]; +- uint8_t intkn_seq[TOKEN_Q_DEPTH]; ++ uint8_t intkn_seq[1 << 5]; + grstctl_t resetctl = {.d32 = 0 }; + uint8_t temp; + int ndx = 0; +-- +2.18.4 + + +From 82e3a1d650df341c5a548215169280bc6662e3ab Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 27 Oct 2020 12:10:04 +0000 +Subject: [PATCH 1156/1209] gpio-fsm: Fix a build warning + +Signed-off-by: Phil Elwell +--- + drivers/gpio/gpio-fsm.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpio/gpio-fsm.c b/drivers/gpio/gpio-fsm.c +index eb8b4d58d2d0..2cab50e51315 100644 +--- a/drivers/gpio/gpio-fsm.c ++++ b/drivers/gpio/gpio-fsm.c +@@ -956,7 +956,8 @@ static int gpio_fsm_probe(struct platform_device *pdev) + // add reserved words to the symbol table + for (i = 0; i < ARRAY_SIZE(reserved_symbols); i++) { + if (reserved_symbols[i]) +- add_symbol(&gf->symtab, reserved_symbols[i], (void *)i); ++ add_symbol(&gf->symtab, reserved_symbols[i], ++ (void *)(uintptr_t)i); + } + + // parse the state +-- +2.18.4 + + +From bec0204160d0788c4bf81d77668d2581439dcfca Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 27 Oct 2020 12:10:40 +0000 +Subject: [PATCH 1157/1209] rpivid_h625: Fix build warnings + +Signed-off-by: Phil Elwell +--- + drivers/staging/media/rpivid/rpivid_h265.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/drivers/staging/media/rpivid/rpivid_h265.c b/drivers/staging/media/rpivid/rpivid_h265.c +index b677910e237c..fc3caed58187 100644 +--- a/drivers/staging/media/rpivid/rpivid_h265.c ++++ b/drivers/staging/media/rpivid/rpivid_h265.c +@@ -1341,10 +1341,10 @@ static int frame_end(struct rpivid_dev *const dev, + + if (gptr_realloc_new(dev, de->cmd_copy_gptr, cmd_alloc)) { + v4l2_err(&dev->v4l2_dev, +- "Alloc cmd buffer (%d): FAILED\n", cmd_alloc); ++ "Alloc cmd buffer (%zu): FAILED\n", cmd_alloc); + return -ENOMEM; + } +- v4l2_info(&dev->v4l2_dev, "Alloc cmd buffer (%d): OK\n", ++ v4l2_info(&dev->v4l2_dev, "Alloc cmd buffer (%zu): OK\n", + cmd_alloc); + } + +@@ -1696,12 +1696,12 @@ static void rpivid_h265_setup(struct rpivid_ctx *ctx, struct rpivid_run *run) + bits_alloc, + DMA_ATTR_FORCE_CONTIGUOUS) != 0) { + v4l2_err(&dev->v4l2_dev, +- "Unable to alloc buf (%d) for bit copy\n", ++ "Unable to alloc buf (%zu) for bit copy\n", + bits_alloc); + goto fail; + } + v4l2_info(&dev->v4l2_dev, +- "Alloc buf (%d) for bit copy OK\n", ++ "Alloc buf (%zu) for bit copy OK\n", + bits_alloc); + } + } +@@ -1995,11 +1995,11 @@ static void phase1_thread(struct rpivid_dev *const dev, void *v) + if (de->p1_status & STATUS_PU_EXHAUSTED) { + if (gptr_realloc_new(dev, pu_gptr, next_size(pu_gptr->size))) { + v4l2_err(&dev->v4l2_dev, +- "%s: PU realloc (%#x) failed\n", ++ "%s: PU realloc (%zx) failed\n", + __func__, pu_gptr->size); + goto fail; + } +- v4l2_info(&dev->v4l2_dev, "%s: PU realloc (%#x) OK\n", ++ v4l2_info(&dev->v4l2_dev, "%s: PU realloc (%zx) OK\n", + __func__, pu_gptr->size); + } + +@@ -2007,11 +2007,11 @@ static void phase1_thread(struct rpivid_dev *const dev, void *v) + if (gptr_realloc_new(dev, coeff_gptr, + next_size(coeff_gptr->size))) { + v4l2_err(&dev->v4l2_dev, +- "%s: Coeff realloc (%#x) failed\n", ++ "%s: Coeff realloc (%zx) failed\n", + __func__, coeff_gptr->size); + goto fail; + } +- v4l2_info(&dev->v4l2_dev, "%s: Coeff realloc (%#x) OK\n", ++ v4l2_info(&dev->v4l2_dev, "%s: Coeff realloc (%zx) OK\n", + __func__, coeff_gptr->size); + } + +-- +2.18.4 + + +From 36e1dd243a74dd3a28e393e012ec14ffd4065fa6 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 27 Oct 2020 12:11:56 +0000 +Subject: [PATCH 1158/1209] dwc_otg: Fix more build warnings + +Signed-off-by: Phil Elwell +--- + drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c | 10 +++++---- + drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 23 ++++++++++++++------- + drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c | 3 ++- + drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 8 +++---- + 4 files changed, 27 insertions(+), 17 deletions(-) + +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c +index 490a7801e737..f644acbce748 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c +@@ -240,7 +240,8 @@ static int notrace fiq_increment_dma_buf(struct fiq_state *st, int num_channels, + hcdma_data_t hcdma; + int i = st->channel[n].dma_info.index; + int len; +- struct fiq_dma_blob *blob = (struct fiq_dma_blob *) st->dma_base; ++ struct fiq_dma_blob *blob = ++ (struct fiq_dma_blob *)(uintptr_t)st->dma_base; + + len = fiq_get_xfer_len(st, n); + fiq_print(FIQDBG_INT, st, "LEN: %03d", len); +@@ -249,7 +250,7 @@ static int notrace fiq_increment_dma_buf(struct fiq_state *st, int num_channels, + if (i > 6) + BUG(); + +- hcdma.d32 = (dma_addr_t) &blob->channel[n].index[i].buf[0]; ++ hcdma.d32 = (u32)(uintptr_t)&blob->channel[n].index[i].buf[0]; + FIQ_WRITE(st->dwc_regs_base + HC_START + (HC_OFFSET * n) + HC_DMA, hcdma.d32); + st->channel[n].dma_info.index = i; + return 0; +@@ -289,7 +290,8 @@ static int notrace fiq_iso_out_advance(struct fiq_state *st, int num_channels, i + hcsplt_data_t hcsplt; + hctsiz_data_t hctsiz; + hcdma_data_t hcdma; +- struct fiq_dma_blob *blob = (struct fiq_dma_blob *) st->dma_base; ++ struct fiq_dma_blob *blob = ++ (struct fiq_dma_blob *)(uintptr_t)st->dma_base; + int last = 0; + int i = st->channel[n].dma_info.index; + +@@ -301,7 +303,7 @@ static int notrace fiq_iso_out_advance(struct fiq_state *st, int num_channels, i + last = 1; + + /* New DMA address - address of bounce buffer referred to in index */ +- hcdma.d32 = (dma_addr_t) blob->channel[n].index[i].buf; ++ hcdma.d32 = (u32)(uintptr_t)blob->channel[n].index[i].buf; + //hcdma.d32 = FIQ_READ(st->dwc_regs_base + HC_START + (HC_OFFSET * n) + HC_DMA); + //hcdma.d32 += st->channel[n].dma_info.slot_len[i]; + fiq_print(FIQDBG_INT, st, "LAST: %01d ", last); +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index 0f6645e2383c..e42d8ca89c01 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +@@ -1270,7 +1270,8 @@ static void assign_and_init_hc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) + hc->multi_count = 1; + + if (hcd->core_if->dma_enable) { +- hc->xfer_buff = (uint8_t *) urb->dma + urb->actual_length; ++ hc->xfer_buff = ++ (uint8_t *)(uintptr_t)urb->dma + urb->actual_length; + + /* For non-dword aligned case */ + if (((unsigned long)hc->xfer_buff & 0x3) +@@ -1314,7 +1315,8 @@ static void assign_and_init_hc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) + hc->ep_is_in = 0; + hc->data_pid_start = DWC_OTG_HC_PID_SETUP; + if (hcd->core_if->dma_enable) { +- hc->xfer_buff = (uint8_t *) urb->setup_dma; ++ hc->xfer_buff = ++ (uint8_t *)(uintptr_t)urb->setup_dma; + } else { + hc->xfer_buff = (uint8_t *) urb->setup_packet; + } +@@ -1362,7 +1364,8 @@ static void assign_and_init_hc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) + + hc->xfer_len = 0; + if (hcd->core_if->dma_enable) { +- hc->xfer_buff = (uint8_t *) hcd->status_buf_dma; ++ hc->xfer_buff = (uint8_t *) ++ (uintptr_t)hcd->status_buf_dma; + } else { + hc->xfer_buff = (uint8_t *) hcd->status_buf; + } +@@ -1390,7 +1393,7 @@ static void assign_and_init_hc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) + frame_desc->status = 0; + + if (hcd->core_if->dma_enable) { +- hc->xfer_buff = (uint8_t *) urb->dma; ++ hc->xfer_buff = (uint8_t *)(uintptr_t)urb->dma; + } else { + hc->xfer_buff = (uint8_t *) urb->buf; + } +@@ -1571,8 +1574,10 @@ int fiq_fsm_setup_periodic_dma(dwc_otg_hcd_t *hcd, struct fiq_channel_state *st, + * Pointer arithmetic on hcd->fiq_state->dma_base (a dma_addr_t) + * to point it to the correct offset in the allocated buffers. + */ +- blob = (struct fiq_dma_blob *) hcd->fiq_state->dma_base; +- st->hcdma_copy.d32 = (dma_addr_t) blob->channel[hc->hc_num].index[0].buf; ++ blob = (struct fiq_dma_blob *) ++ (uintptr_t)hcd->fiq_state->dma_base; ++ st->hcdma_copy.d32 =(u32)(uintptr_t) ++ blob->channel[hc->hc_num].index[0].buf; + + /* Calculate the max number of CSPLITS such that the FIQ can time out + * a transaction if it fails. +@@ -1627,8 +1632,10 @@ int fiq_fsm_setup_periodic_dma(dwc_otg_hcd_t *hcd, struct fiq_channel_state *st, + * dma_addr_t) to point it to the correct offset in the + * allocated buffers. + */ +- blob = (struct fiq_dma_blob *) hcd->fiq_state->dma_base; +- st->hcdma_copy.d32 = (dma_addr_t) blob->channel[hc->hc_num].index[0].buf; ++ blob = (struct fiq_dma_blob *) ++ (uintptr_t)hcd->fiq_state->dma_base; ++ st->hcdma_copy.d32 = (u32)(uintptr_t) ++ blob->channel[hc->hc_num].index[0].buf; + + /* fixup xfersize to the actual packet size */ + st->hctsiz_copy.b.pid = 0; +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 bd8a20403713..2fd96e56e412 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c +@@ -620,7 +620,8 @@ static void init_non_isoc_dma_desc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) + + if (n_desc) { + /* SG request - more than 1 QTDs */ +- hc->xfer_buff = (uint8_t *)qtd->urb->dma + qtd->urb->actual_length; ++ hc->xfer_buff = (uint8_t *)(uintptr_t)qtd->urb->dma + ++ qtd->urb->actual_length; + hc->xfer_len = qtd->urb->length - qtd->urb->actual_length; + } + +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 d3097ef3728c..9d49b2b33227 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +@@ -1857,10 +1857,10 @@ static int32_t handle_hc_ahberr_intr(dwc_otg_hcd_t * hcd, + DWC_ERROR(" Max packet size: %d\n", + dwc_otg_hcd_get_mps(&urb->pipe_info)); + DWC_ERROR(" Data buffer length: %d\n", urb->length); +- DWC_ERROR(" Transfer buffer: %p, Transfer DMA: %p\n", +- urb->buf, (void *)urb->dma); +- DWC_ERROR(" Setup buffer: %p, Setup DMA: %p\n", +- urb->setup_packet, (void *)urb->setup_dma); ++ DWC_ERROR(" Transfer buffer: %p, Transfer DMA: %pad\n", ++ urb->buf, &urb->dma); ++ DWC_ERROR(" Setup buffer: %p, Setup DMA: %pad\n", ++ urb->setup_packet, &urb->setup_dma); + DWC_ERROR(" Interval: %d\n", urb->interval); + + /* Core haltes the channel for Descriptor DMA mode */ +-- +2.18.4 + + +From 7a64b53891617c0102e947bfdc8e5420114243ff Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 27 Oct 2020 12:12:22 +0000 +Subject: [PATCH 1159/1209] bcm2708_fb: Fix a build warning + +Signed-off-by: Phil Elwell +--- + drivers/video/fbdev/bcm2708_fb.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/video/fbdev/bcm2708_fb.c b/drivers/video/fbdev/bcm2708_fb.c +index d035fa59c269..9a3d3d23c17e 100644 +--- a/drivers/video/fbdev/bcm2708_fb.c ++++ b/drivers/video/fbdev/bcm2708_fb.c +@@ -705,7 +705,8 @@ static long vc_mem_copy(struct bcm2708_fb *fb, struct fb_dmacopy *ioparam) + u8 *q = (u8 *)ioparam->dst + offset; + + dma_memcpy(fb, bus_addr, +- INTALIAS_L1L2_NONALLOCATING((dma_addr_t)p), size); ++ INTALIAS_L1L2_NONALLOCATING((u32)(uintptr_t)p), ++ size); + if (copy_to_user(q, buf, s) != 0) { + pr_err("[%s]: failed to copy-to-user\n", __func__); + rc = -EFAULT; +-- +2.18.4 + + +From 804e718c1674ae14e95ed5905cb52924c633be06 Mon Sep 17 00:00:00 2001 +From: Dom Cobley +Date: Tue, 27 Oct 2020 12:24:14 +0000 +Subject: [PATCH 1160/1209] bcm2835-pcm: Fix up multichannel pcm audio + +Fixes: a9c1660ff5f02d048c5f31abf1fd1108ccf9ef87 +Signed-off-by: Dom Cobley +--- + .../vc04_services/bcm2835-audio/bcm2835-pcm.c | 21 +++++++++---------- + 1 file changed, 10 insertions(+), 11 deletions(-) + +diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c +index e4603ba742e4..b409e84901ec 100644 +--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c ++++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c +@@ -14,14 +14,14 @@ static const struct snd_pcm_hardware snd_bcm2835_playback_hw = { + SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | + SNDRV_PCM_INFO_SYNC_APPLPTR), + .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, +- .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_192000, ++ .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_192000, + .rate_min = 8000, + .rate_max = 192000, + .channels_min = 1, +- .channels_max = 2, +- .buffer_bytes_max = 128 * 1024, ++ .channels_max = 8, ++ .buffer_bytes_max = 512 * 1024, + .period_bytes_min = 1 * 1024, +- .period_bytes_max = 128 * 1024, ++ .period_bytes_max = 512 * 1024, + .periods_min = 1, + .periods_max = 128, + }; +@@ -31,16 +31,15 @@ static const struct snd_pcm_hardware snd_bcm2835_playback_spdif_hw = { + SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | + SNDRV_PCM_INFO_SYNC_APPLPTR), + .formats = SNDRV_PCM_FMTBIT_S16_LE, +- .rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | +- SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 | +- SNDRV_PCM_RATE_176400 | SNDRV_PCM_RATE_192000, ++ .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_44100 | ++ SNDRV_PCM_RATE_48000, + .rate_min = 44100, +- .rate_max = 192000, ++ .rate_max = 48000, + .channels_min = 2, +- .channels_max = 8, +- .buffer_bytes_max = 512 * 1024, ++ .channels_max = 2, ++ .buffer_bytes_max = 128 * 1024, + .period_bytes_min = 1 * 1024, +- .period_bytes_max = 512 * 1024, ++ .period_bytes_max = 128 * 1024, + .periods_min = 1, + .periods_max = 128, + }; +-- +2.18.4 + + +From 654388b10e3e447fd3ad17af2741fa624743375b Mon Sep 17 00:00:00 2001 +From: Tim Gover +Date: Thu, 22 Oct 2020 15:30:55 +0100 +Subject: [PATCH 1161/1209] watchdog: bcm2835: Ignore params after the + partition number + +Use sscanf to extract the partition number and ignore extra parameters +which are only relevant to other reboot notifiers. +--- + drivers/watchdog/bcm2835_wdt.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/drivers/watchdog/bcm2835_wdt.c b/drivers/watchdog/bcm2835_wdt.c +index 62937e6f83ca..de25e3682f03 100644 +--- a/drivers/watchdog/bcm2835_wdt.c ++++ b/drivers/watchdog/bcm2835_wdt.c +@@ -126,10 +126,12 @@ static int bcm2835_restart(struct watchdog_device *wdog, + { + struct bcm2835_wdt *wdt = watchdog_get_drvdata(wdog); + +- unsigned long long val; ++ unsigned long val; + u8 partition = 0; + +- if (data && !kstrtoull(data, 0, &val) && val <= 63) ++ // Allow extra arguments separated by spaces after ++ // the partition number. ++ if (data && sscanf(data, "%lu", &val) && val < 63) + partition = val; + + __bcm2835_restart(wdt, partition); +-- +2.18.4 + + +From 0bb2a27da12611d45a1636bb25f3b8bd9c1f1877 Mon Sep 17 00:00:00 2001 +From: Tim Gover +Date: Tue, 20 Oct 2020 11:55:37 +0100 +Subject: [PATCH 1162/1209] firmware: raspberrypi: Add support for tryonce + reboot flag + +Define a new mailbox (SET_REBOOT_FLAGS) which may be used to +pass optional flags to the Raspberry Pi firmware that changes +the behaviour of the bootloader and firmware during a reboot. + +Currently this just defines the 'tryboot' flag which causes +the firmware to load tryboot.txt instead config.txt. This +alternate configuration file can be used to specify the +path of an alternate firmware and kernels allowing a fallback +mechanism to be implemented for OS upgrades. +--- + drivers/firmware/raspberrypi.c | 25 ++++++++++++++++++++-- + include/soc/bcm2835/raspberrypi-firmware.h | 2 ++ + 2 files changed, 25 insertions(+), 2 deletions(-) + +diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c +index dc11a1968e99..9b5cb65a8712 100644 +--- a/drivers/firmware/raspberrypi.c ++++ b/drivers/firmware/raspberrypi.c +@@ -190,6 +190,7 @@ static int rpi_firmware_notify_reboot(struct notifier_block *nb, + { + struct rpi_firmware *fw; + struct platform_device *pdev = g_pdev; ++ u32 reboot_flags = 0; + + if (!pdev) + return 0; +@@ -198,8 +199,28 @@ static int rpi_firmware_notify_reboot(struct notifier_block *nb, + if (!fw) + return 0; + +- (void)rpi_firmware_property(fw, RPI_FIRMWARE_NOTIFY_REBOOT, +- 0, 0); ++ // The partition id is the first parameter followed by zero or ++ // more flags separated by spaces indicating the reason for the reboot. ++ // ++ // 'tryboot': Sets a one-shot flag which is cleared upon reboot and ++ // causes the tryboot.txt to be loaded instead of config.txt ++ // by the bootloader and the start.elf firmware. ++ // ++ // This is intended to allow automatic fallback to a known ++ // good image if an OS/FW upgrade fails. ++ // ++ // N.B. The firmware mechanism for storing reboot flags may vary ++ // on different Raspberry Pi models. ++ if (data && strstr(data, " tryboot")) ++ reboot_flags |= 0x1; ++ ++ // The mailbox might have been called earlier, directly via vcmailbox ++ // so only overwrite if reboot flags are passed to the reboot command. ++ if (reboot_flags) ++ (void)rpi_firmware_property(fw, RPI_FIRMWARE_SET_REBOOT_FLAGS, ++ &reboot_flags, sizeof(reboot_flags)); ++ ++ (void)rpi_firmware_property(fw, RPI_FIRMWARE_NOTIFY_REBOOT, NULL, 0); + + return 0; + } +diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h +index 3335c2a2993c..7e0d1f186f29 100644 +--- a/include/soc/bcm2835/raspberrypi-firmware.h ++++ b/include/soc/bcm2835/raspberrypi-firmware.h +@@ -96,6 +96,8 @@ enum rpi_firmware_property_tag { + RPI_FIRMWARE_GET_POE_HAT_VAL = 0x00030049, + RPI_FIRMWARE_SET_POE_HAT_VAL = 0x00030050, + RPI_FIRMWARE_NOTIFY_XHCI_RESET = 0x00030058, ++ RPI_FIRMWARE_GET_REBOOT_FLAGS = 0x00030064, ++ RPI_FIRMWARE_SET_REBOOT_FLAGS = 0x00038064, + + /* Dispmanx TAGS */ + RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001, +-- +2.18.4 + + +From a4bea80fce7b2594585b4c1cce01493696fbd288 Mon Sep 17 00:00:00 2001 +From: Jonathan Bell +Date: Tue, 14 May 2019 17:00:41 +0100 +Subject: [PATCH 1163/1209] phy: broadcom: split out the BCM54213PE from the + BCM54210E IDs + +The last nibble is a revision ID, and the 54213pe is a later rev +than the 54210e. Running the 54210e setup code on a 54213pe results +in a broken RGMII interface. + +Signed-off-by: Jonathan Bell +--- + drivers/net/phy/broadcom.c | 16 +++++++++++++--- + include/linux/brcmphy.h | 1 + + 2 files changed, 14 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c +index 56f029579b24..49de844e03a3 100644 +--- a/drivers/net/phy/broadcom.c ++++ b/drivers/net/phy/broadcom.c +@@ -213,7 +213,8 @@ static void bcm54xx_adjust_rxrefclk(struct phy_device *phydev) + /* Abort if we are using an untested phy. */ + if (BRCM_PHY_MODEL(phydev) != PHY_ID_BCM57780 && + BRCM_PHY_MODEL(phydev) != PHY_ID_BCM50610 && +- BRCM_PHY_MODEL(phydev) != PHY_ID_BCM50610M) ++ BRCM_PHY_MODEL(phydev) != PHY_ID_BCM50610M && ++ BRCM_PHY_MODEL(phydev) != PHY_ID_BCM54213PE) + return; + + val = bcm_phy_read_shadow(phydev, BCM54XX_SHD_SCR3); +@@ -620,12 +621,20 @@ static struct phy_driver broadcom_drivers[] = { + .config_intr = bcm_phy_config_intr, + }, { + .phy_id = PHY_ID_BCM54210E, +- .phy_id_mask = 0xfffffff0, ++ .phy_id_mask = 0xffffffff, + .name = "Broadcom BCM54210E", + /* PHY_GBIT_FEATURES */ + .config_init = bcm54xx_config_init, + .ack_interrupt = bcm_phy_ack_intr, + .config_intr = bcm_phy_config_intr, ++}, { ++ .phy_id = PHY_ID_BCM54213PE, ++ .phy_id_mask = 0xffffffff, ++ .name = "Broadcom BCM54213PE", ++ /* PHY_GBIT_FEATURES */ ++ .config_init = bcm54xx_config_init, ++ .ack_interrupt = bcm_phy_ack_intr, ++ .config_intr = bcm_phy_config_intr, + }, { + .phy_id = PHY_ID_BCM5461, + .phy_id_mask = 0xfffffff0, +@@ -753,7 +762,8 @@ module_phy_driver(broadcom_drivers); + static struct mdio_device_id __maybe_unused broadcom_tbl[] = { + { PHY_ID_BCM5411, 0xfffffff0 }, + { PHY_ID_BCM5421, 0xfffffff0 }, +- { PHY_ID_BCM54210E, 0xfffffff0 }, ++ { PHY_ID_BCM54210E, 0xffffffff }, ++ { PHY_ID_BCM54213PE, 0xffffffff }, + { PHY_ID_BCM5461, 0xfffffff0 }, + { PHY_ID_BCM54612E, 0xfffffff0 }, + { PHY_ID_BCM54616S, 0xfffffff0 }, +diff --git a/include/linux/brcmphy.h b/include/linux/brcmphy.h +index 6db2d9a6e503..bfb37218f435 100644 +--- a/include/linux/brcmphy.h ++++ b/include/linux/brcmphy.h +@@ -20,6 +20,7 @@ + #define PHY_ID_BCM5411 0x00206070 + #define PHY_ID_BCM5421 0x002060e0 + #define PHY_ID_BCM54210E 0x600d84a0 ++#define PHY_ID_BCM54213PE 0x600d84a2 + #define PHY_ID_BCM5464 0x002060b0 + #define PHY_ID_BCM5461 0x002060c0 + #define PHY_ID_BCM54612E 0x03625e60 +-- +2.18.4 + + +From 1bbbfa9b810e18cbc59cd5c15f965fc185809e0e Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 29 Oct 2020 14:10:56 +0000 +Subject: [PATCH 1164/1209] phy: broadcom: Add bcm54213pe configuration + +Signed-off-by: Phil Elwell +--- + drivers/net/phy/broadcom.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c +index 49de844e03a3..5a1ba06163cc 100644 +--- a/drivers/net/phy/broadcom.c ++++ b/drivers/net/phy/broadcom.c +@@ -43,6 +43,11 @@ static int bcm54210e_config_init(struct phy_device *phydev) + return 0; + } + ++static int bcm54213pe_config_init(struct phy_device *phydev) ++{ ++ return bcm54210e_config_init(phydev); ++} ++ + static int bcm54612e_config_init(struct phy_device *phydev) + { + int reg; +@@ -304,6 +309,10 @@ static int bcm54xx_config_init(struct phy_device *phydev) + err = bcm54210e_config_init(phydev); + if (err) + return err; ++ } else if (BRCM_PHY_MODEL(phydev) == PHY_ID_BCM54213PE) { ++ err = bcm54213pe_config_init(phydev); ++ if (err) ++ return err; + } else if (BRCM_PHY_MODEL(phydev) == PHY_ID_BCM54612E) { + err = bcm54612e_config_init(phydev); + if (err) +-- +2.18.4 + + +From dbd6c13754b3640adeee463e54e52b48ef588113 Mon Sep 17 00:00:00 2001 +From: Sudeep +Date: Fri, 23 Oct 2020 15:47:17 +0530 +Subject: [PATCH 1165/1209] Allo boss2 driver + +Signed-off-by: Sudeep +--- + sound/soc/bcm/Kconfig | 9 + + sound/soc/bcm/Makefile | 2 + + sound/soc/bcm/allo-boss2-dac.c | 1133 ++++++++++++++++++++++++++++++++ + 3 files changed, 1144 insertions(+) + create mode 100644 sound/soc/bcm/allo-boss2-dac.c + +diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig +index 7433e6f15cd7..31ec3e047c55 100644 +--- a/sound/soc/bcm/Kconfig ++++ b/sound/soc/bcm/Kconfig +@@ -258,6 +258,15 @@ config SND_BCM2708_SOC_ALLO_BOSS_DAC + help + Say Y or M if you want to add support for Allo Boss DAC. + ++config SND_BCM2708_SOC_ALLO_BOSS2_DAC ++ tristate "Support for Allo Boss2 DAC" ++ depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S ++ depends on I2C ++ select REGMAP_I2C ++ select SND_AUDIO_GRAPH_CARD ++ help ++ Say Y or M if you want to add support for Allo Boss2 DAC. ++ + config SND_BCM2708_SOC_ALLO_DIGIONE + tristate "Support for Allo DigiOne" + depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S +diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile +index 00a983355b91..8ebbd3f29380 100644 +--- a/sound/soc/bcm/Makefile ++++ b/sound/soc/bcm/Makefile +@@ -33,6 +33,7 @@ snd-soc-digidac1-soundcard-objs := digidac1-soundcard.o + snd-soc-dionaudio-loco-objs := dionaudio_loco.o + snd-soc-dionaudio-loco-v2-objs := dionaudio_loco-v2.o + snd-soc-allo-boss-dac-objs := allo-boss-dac.o ++snd-soc-allo-boss2-dac-objs := allo-boss2-dac.o + snd-soc-allo-piano-dac-objs := allo-piano-dac.o + snd-soc-allo-piano-dac-plus-objs := allo-piano-dac-plus.o + snd-soc-allo-katana-codec-objs := allo-katana-codec.o +@@ -63,6 +64,7 @@ obj-$(CONFIG_SND_DIGIDAC1_SOUNDCARD) += snd-soc-digidac1-soundcard.o + obj-$(CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO) += snd-soc-dionaudio-loco.o + obj-$(CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2) += snd-soc-dionaudio-loco-v2.o + obj-$(CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC) += snd-soc-allo-boss-dac.o ++obj-$(CONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC) += snd-soc-allo-boss2-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC) += snd-soc-allo-piano-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS) += snd-soc-allo-piano-dac-plus.o + obj-$(CONFIG_SND_BCM2708_SOC_ALLO_KATANA_DAC) += snd-soc-allo-katana-codec.o +diff --git a/sound/soc/bcm/allo-boss2-dac.c b/sound/soc/bcm/allo-boss2-dac.c +new file mode 100644 +index 000000000000..5ad7f16964aa +--- /dev/null ++++ b/sound/soc/bcm/allo-boss2-dac.c +@@ -0,0 +1,1133 @@ ++/* ++ * Driver for the ALLO KATANA CODEC ++ * ++ * Author: Jaikumar ++ * Copyright 2018 ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "../codecs/cs43130.h" ++ ++#include ++#include ++#define DEBUG ++ ++#define CS43130_DSD_EN_MASK 0x10 ++#define CS43130_PDN_DONE_INT_MASK 0x00 ++ ++static struct gpio_desc *snd_allo_clk44gpio; ++static struct gpio_desc *snd_allo_clk48gpio; ++ ++struct cs43130_priv { ++ struct snd_soc_component *component; ++ struct regmap *regmap; ++ struct regulator_bulk_data supplies[CS43130_NUM_SUPPLIES]; ++ struct gpio_desc *reset_gpio; ++ unsigned int dev_id; /* codec device ID */ ++ int xtal_ibias; ++ /* shared by both DAIs */ ++ struct mutex clk_mutex; ++ int clk_req; ++ bool pll_bypass; ++ struct completion xtal_rdy; ++ struct completion pll_rdy; ++ unsigned int mclk; ++ unsigned int mclk_int; ++ int mclk_int_src; ++ ++ /* DAI specific */ ++ struct cs43130_dai dais[CS43130_DAI_ID_MAX]; ++ ++ /* HP load specific */ ++ bool dc_meas; ++ bool ac_meas; ++ bool hpload_done; ++ struct completion hpload_evt; ++ unsigned int hpload_stat; ++ u16 hpload_dc[2]; ++ u16 dc_threshold[CS43130_DC_THRESHOLD]; ++ u16 ac_freq[CS43130_AC_FREQ]; ++ u16 hpload_ac[CS43130_AC_FREQ][2]; ++ struct workqueue_struct *wq; ++ struct work_struct work; ++ struct snd_soc_jack jack; ++}; ++ ++static const struct reg_default cs43130_reg_defaults[] = { ++ {CS43130_SYS_CLK_CTL_1, 0x06}, ++ {CS43130_SP_SRATE, 0x01}, ++ {CS43130_SP_BITSIZE, 0x05}, ++ {CS43130_PAD_INT_CFG, 0x03}, ++ {CS43130_PWDN_CTL, 0xFE}, ++ {CS43130_CRYSTAL_SET, 0x04}, ++ {CS43130_PLL_SET_1, 0x00}, ++ {CS43130_PLL_SET_2, 0x00}, ++ {CS43130_PLL_SET_3, 0x00}, ++ {CS43130_PLL_SET_4, 0x00}, ++ {CS43130_PLL_SET_5, 0x40}, ++ {CS43130_PLL_SET_6, 0x10}, ++ {CS43130_PLL_SET_7, 0x80}, ++ {CS43130_PLL_SET_8, 0x03}, ++ {CS43130_PLL_SET_9, 0x02}, ++ {CS43130_PLL_SET_10, 0x02}, ++ {CS43130_CLKOUT_CTL, 0x00}, ++ {CS43130_ASP_NUM_1, 0x01}, ++ {CS43130_ASP_NUM_2, 0x00}, ++ {CS43130_ASP_DEN_1, 0x08}, ++ {CS43130_ASP_DEN_2, 0x00}, ++ {CS43130_ASP_LRCK_HI_TIME_1, 0x1F}, ++ {CS43130_ASP_LRCK_HI_TIME_2, 0x00}, ++ {CS43130_ASP_LRCK_PERIOD_1, 0x3F}, ++ {CS43130_ASP_LRCK_PERIOD_2, 0x00}, ++ {CS43130_ASP_CLOCK_CONF, 0x0C}, ++ {CS43130_ASP_FRAME_CONF, 0x0A}, ++ {CS43130_XSP_NUM_1, 0x01}, ++ {CS43130_XSP_NUM_2, 0x00}, ++ {CS43130_XSP_DEN_1, 0x02}, ++ {CS43130_XSP_DEN_2, 0x00}, ++ {CS43130_XSP_LRCK_HI_TIME_1, 0x1F}, ++ {CS43130_XSP_LRCK_HI_TIME_2, 0x00}, ++ {CS43130_XSP_LRCK_PERIOD_1, 0x3F}, ++ {CS43130_XSP_LRCK_PERIOD_2, 0x00}, ++ {CS43130_XSP_CLOCK_CONF, 0x0C}, ++ {CS43130_XSP_FRAME_CONF, 0x0A}, ++ {CS43130_ASP_CH_1_LOC, 0x00}, ++ {CS43130_ASP_CH_2_LOC, 0x00}, ++ {CS43130_ASP_CH_1_SZ_EN, 0x06}, ++ {CS43130_ASP_CH_2_SZ_EN, 0x0E}, ++ {CS43130_XSP_CH_1_LOC, 0x00}, ++ {CS43130_XSP_CH_2_LOC, 0x00}, ++ {CS43130_XSP_CH_1_SZ_EN, 0x06}, ++ {CS43130_XSP_CH_2_SZ_EN, 0x0E}, ++ {CS43130_DSD_VOL_B, 0x78}, ++ {CS43130_DSD_VOL_A, 0x78}, ++ {CS43130_DSD_PATH_CTL_1, 0xA8}, ++ {CS43130_DSD_INT_CFG, 0x00}, ++ {CS43130_DSD_PATH_CTL_2, 0x02}, ++ {CS43130_DSD_PCM_MIX_CTL, 0x00}, ++ {CS43130_DSD_PATH_CTL_3, 0x40}, ++ {CS43130_HP_OUT_CTL_1, 0x30}, ++ {CS43130_PCM_FILT_OPT, 0x02}, ++ {CS43130_PCM_VOL_B, 0x78}, ++ {CS43130_PCM_VOL_A, 0x78}, ++ {CS43130_PCM_PATH_CTL_1, 0xA8}, ++ {CS43130_PCM_PATH_CTL_2, 0x00}, ++ {CS43130_CLASS_H_CTL, 0x1E}, ++ {CS43130_HP_DETECT, 0x04}, ++ {CS43130_HP_LOAD_1, 0x00}, ++ {CS43130_HP_MEAS_LOAD_1, 0x00}, ++ {CS43130_HP_MEAS_LOAD_2, 0x00}, ++ {CS43130_INT_MASK_1, 0xFF}, ++ {CS43130_INT_MASK_2, 0xFF}, ++ {CS43130_INT_MASK_3, 0xFF}, ++ {CS43130_INT_MASK_4, 0xFF}, ++ {CS43130_INT_MASK_5, 0xFF}, ++}; ++static bool cs43130_volatile_register(struct device *dev, unsigned int reg) ++{ ++ switch (reg) { ++ case CS43130_INT_STATUS_1 ... CS43130_INT_STATUS_5: ++ case CS43130_HP_DC_STAT_1 ... CS43130_HP_DC_STAT_2: ++ case CS43130_HP_AC_STAT_1 ... CS43130_HP_AC_STAT_2: ++ return true; ++ default: ++ return false; ++ } ++} ++ ++static const char * const pcm_spd_texts[] = { ++ "Fast", ++ "Slow", ++}; ++ ++static SOC_ENUM_SINGLE_DECL(pcm_spd_enum, CS43130_PCM_FILT_OPT, 7, ++ pcm_spd_texts); ++ ++static const SNDRV_CTL_TLVD_DECLARE_DB_MINMAX(master_tlv, -12750, 0); ++ ++static const struct snd_kcontrol_new cs43130_controls[] = { ++ SOC_DOUBLE_R_TLV("Master Playback Volume", CS43130_PCM_VOL_B, ++ CS43130_PCM_VOL_A, 0, 255, 1, master_tlv), ++ SOC_DOUBLE("Master Playback Switch", CS43130_PCM_PATH_CTL_1, ++ 0, 1, 1, 1), ++ SOC_DOUBLE_R_TLV("Digital Playback Volume", CS43130_DSD_VOL_B, ++ CS43130_DSD_VOL_A, 0, 255, 1, master_tlv), ++ SOC_DOUBLE("Digital Playback Switch", CS43130_DSD_PATH_CTL_1, ++ 0, 1, 1, 1), ++ SOC_SINGLE("HV_Enable", CS43130_HP_OUT_CTL_1, 0, 1, 0), ++ SOC_ENUM("PCM Filter Speed", pcm_spd_enum), ++ SOC_SINGLE("PCM Phase Compensation", CS43130_PCM_FILT_OPT, 6, 1, 0), ++ SOC_SINGLE("PCM Nonoversample Emulate", CS43130_PCM_FILT_OPT, 5, 1, 0), ++ SOC_SINGLE("PCM High-pass Filter", CS43130_PCM_FILT_OPT, 1, 1, 0), ++ SOC_SINGLE("PCM De-emphasis Filter", CS43130_PCM_FILT_OPT, 0, 1, 0), ++}; ++ ++static bool cs43130_readable_register(struct device *dev, unsigned int reg) ++{ ++ switch (reg) { ++ case CS43130_DEVID_AB ... CS43130_SYS_CLK_CTL_1: ++ case CS43130_SP_SRATE ... CS43130_PAD_INT_CFG: ++ case CS43130_PWDN_CTL: ++ case CS43130_CRYSTAL_SET: ++ case CS43130_PLL_SET_1 ... CS43130_PLL_SET_5: ++ case CS43130_PLL_SET_6: ++ case CS43130_PLL_SET_7: ++ case CS43130_PLL_SET_8: ++ case CS43130_PLL_SET_9: ++ case CS43130_PLL_SET_10: ++ case CS43130_CLKOUT_CTL: ++ case CS43130_ASP_NUM_1 ... CS43130_ASP_FRAME_CONF: ++ case CS43130_XSP_NUM_1 ... CS43130_XSP_FRAME_CONF: ++ case CS43130_ASP_CH_1_LOC: ++ case CS43130_ASP_CH_2_LOC: ++ case CS43130_ASP_CH_1_SZ_EN: ++ case CS43130_ASP_CH_2_SZ_EN: ++ case CS43130_XSP_CH_1_LOC: ++ case CS43130_XSP_CH_2_LOC: ++ case CS43130_XSP_CH_1_SZ_EN: ++ case CS43130_XSP_CH_2_SZ_EN: ++ case CS43130_DSD_VOL_B ... CS43130_DSD_PATH_CTL_3: ++ case CS43130_HP_OUT_CTL_1: ++ case CS43130_PCM_FILT_OPT ... CS43130_PCM_PATH_CTL_2: ++ case CS43130_CLASS_H_CTL: ++ case CS43130_HP_DETECT: ++ case CS43130_HP_STATUS: ++ case CS43130_HP_LOAD_1: ++ case CS43130_HP_MEAS_LOAD_1: ++ case CS43130_HP_MEAS_LOAD_2: ++ case CS43130_HP_DC_STAT_1: ++ case CS43130_HP_DC_STAT_2: ++ case CS43130_HP_AC_STAT_1: ++ case CS43130_HP_AC_STAT_2: ++ case CS43130_HP_LOAD_STAT: ++ case CS43130_INT_STATUS_1 ... CS43130_INT_STATUS_5: ++ case CS43130_INT_MASK_1 ... CS43130_INT_MASK_5: ++ return true; ++ default: ++ return false; ++ } ++} ++static bool cs43130_precious_register(struct device *dev, unsigned int reg) ++{ ++ switch (reg) { ++ case CS43130_INT_STATUS_1 ... CS43130_INT_STATUS_5: ++ return true; ++ default: ++ return false; ++ } ++} ++static int cs43130_pcm_pdn(struct snd_soc_component *component) ++{ ++ struct cs43130_priv *cs43130 = ++ snd_soc_component_get_drvdata(component); ++ int ret; ++ unsigned int reg, pdn_int; ++ ++ regmap_write(cs43130->regmap, CS43130_DSD_PATH_CTL_2, 0x02); ++ regmap_update_bits(cs43130->regmap, CS43130_INT_MASK_1, ++ CS43130_PDN_DONE_INT_MASK, 0); ++ regmap_update_bits(cs43130->regmap, CS43130_PWDN_CTL, ++ CS43130_PDN_HP_MASK, 1 << CS43130_PDN_HP_SHIFT); ++ usleep_range(10, 50); ++ ret = regmap_read(cs43130->regmap, CS43130_INT_STATUS_1, ®); ++ pdn_int = reg & 0xFE; ++ regmap_update_bits(cs43130->regmap, CS43130_PWDN_CTL, ++ CS43130_PDN_ASP_MASK, 1 << CS43130_PDN_ASP_SHIFT); ++ return 0; ++ ++} ++static int cs43130_pwr_up_asp_dac(struct snd_soc_component *component) ++{ ++ struct cs43130_priv *cs43130 = ++ snd_soc_component_get_drvdata(component); ++ ++ regmap_update_bits(cs43130->regmap, CS43130_PAD_INT_CFG, ++ CS43130_ASP_3ST_MASK, 0); ++ regmap_write(cs43130->regmap, CS43130_DXD1, 0x99); ++ regmap_write(cs43130->regmap, CS43130_DXD13, 0x20); ++ regmap_update_bits(cs43130->regmap, CS43130_PWDN_CTL, ++ CS43130_PDN_ASP_MASK, 0); ++ regmap_update_bits(cs43130->regmap, CS43130_PWDN_CTL, ++ CS43130_PDN_HP_MASK, 0); ++ usleep_range(10000, 12000); ++ regmap_write(cs43130->regmap, CS43130_DXD1, 0x00); ++ regmap_write(cs43130->regmap, CS43130_DXD13, 0x00); ++ return 0; ++} ++static int cs43130_change_clksrc(struct snd_soc_component *component, ++ enum cs43130_mclk_src_sel src) ++{ ++ int ret; ++ struct cs43130_priv *cs43130 = ++ snd_soc_component_get_drvdata(component); ++ int mclk_int_decoded; ++ ++ if (src == cs43130->mclk_int_src) { ++ /* clk source has not changed */ ++ return 0; ++ } ++ switch (cs43130->mclk_int) { ++ case CS43130_MCLK_22M: ++ mclk_int_decoded = CS43130_MCLK_22P5; ++ break; ++ case CS43130_MCLK_24M: ++ mclk_int_decoded = CS43130_MCLK_24P5; ++ break; ++ default: ++ dev_err(component->dev, "Invalid MCLK INT freq: %u\n", ++ cs43130->mclk_int); ++ return -EINVAL; ++ } ++ ++ switch (src) { ++ case CS43130_MCLK_SRC_EXT: ++ cs43130->pll_bypass = true; ++ cs43130->mclk_int_src = CS43130_MCLK_SRC_EXT; ++ if (cs43130->xtal_ibias == CS43130_XTAL_UNUSED) { ++ regmap_update_bits(cs43130->regmap, CS43130_PWDN_CTL, ++ CS43130_PDN_XTAL_MASK, ++ 1 << CS43130_PDN_XTAL_SHIFT); ++ } else { ++ reinit_completion(&cs43130->xtal_rdy); ++ regmap_update_bits(cs43130->regmap, CS43130_INT_MASK_1, ++ CS43130_XTAL_RDY_INT_MASK, 0); ++ regmap_update_bits(cs43130->regmap, CS43130_PWDN_CTL, ++ CS43130_PDN_XTAL_MASK, 0); ++ ret = wait_for_completion_timeout(&cs43130->xtal_rdy, ++ msecs_to_jiffies(100)); ++ regmap_update_bits(cs43130->regmap, CS43130_INT_MASK_1, ++ CS43130_XTAL_RDY_INT_MASK, ++ 1 << CS43130_XTAL_RDY_INT_SHIFT); ++ if (ret == 0) { ++ dev_err(component->dev, "Timeout waiting for XTAL_READY interrupt\n"); ++ return -ETIMEDOUT; ++ } ++ } ++ regmap_update_bits(cs43130->regmap, CS43130_SYS_CLK_CTL_1, ++ CS43130_MCLK_SRC_SEL_MASK, ++ src << CS43130_MCLK_SRC_SEL_SHIFT); ++ regmap_update_bits(cs43130->regmap, CS43130_SYS_CLK_CTL_1, ++ CS43130_MCLK_INT_MASK, ++ mclk_int_decoded << CS43130_MCLK_INT_SHIFT); ++ usleep_range(150, 200); ++ regmap_update_bits(cs43130->regmap, CS43130_PWDN_CTL, ++ CS43130_PDN_PLL_MASK, ++ 1 << CS43130_PDN_PLL_SHIFT); ++ break; ++ case CS43130_MCLK_SRC_RCO: ++ cs43130->mclk_int_src = CS43130_MCLK_SRC_RCO; ++ ++ regmap_update_bits(cs43130->regmap, CS43130_SYS_CLK_CTL_1, ++ CS43130_MCLK_SRC_SEL_MASK, ++ src << CS43130_MCLK_SRC_SEL_SHIFT); ++ regmap_update_bits(cs43130->regmap, CS43130_SYS_CLK_CTL_1, ++ CS43130_MCLK_INT_MASK, ++ CS43130_MCLK_22P5 << CS43130_MCLK_INT_SHIFT); ++ usleep_range(150, 200); ++ regmap_update_bits(cs43130->regmap, CS43130_PWDN_CTL, ++ CS43130_PDN_XTAL_MASK, ++ 1 << CS43130_PDN_XTAL_SHIFT); ++ regmap_update_bits(cs43130->regmap, CS43130_PWDN_CTL, ++ CS43130_PDN_PLL_MASK, ++ 1 << CS43130_PDN_PLL_SHIFT); ++ break; ++ default: ++ dev_err(component->dev, "Invalid MCLK source value\n"); ++ return -EINVAL; ++ } ++ ++ return 0; ++} ++static const struct cs43130_bitwidth_map cs43130_bitwidth_table[] = { ++ {8, CS43130_SP_BIT_SIZE_8, CS43130_CH_BIT_SIZE_8}, ++ {16, CS43130_SP_BIT_SIZE_16, CS43130_CH_BIT_SIZE_16}, ++ {24, CS43130_SP_BIT_SIZE_24, CS43130_CH_BIT_SIZE_24}, ++ {32, CS43130_SP_BIT_SIZE_32, CS43130_CH_BIT_SIZE_32}, ++}; ++ ++static const struct cs43130_bitwidth_map *cs43130_get_bitwidth_table( ++ unsigned int bitwidth) ++{ ++ int i; ++ ++ for (i = 0; i < ARRAY_SIZE(cs43130_bitwidth_table); i++) { ++ if (cs43130_bitwidth_table[i].bitwidth == bitwidth) ++ return &cs43130_bitwidth_table[i]; ++ } ++ ++ return NULL; ++} ++static int cs43130_set_bitwidth(int dai_id, unsigned int bitwidth_dai, ++ struct regmap *regmap) ++{ ++ const struct cs43130_bitwidth_map *bw_map; ++ ++ bw_map = cs43130_get_bitwidth_table(bitwidth_dai); ++ if (!bw_map) ++ return -EINVAL; ++ ++ switch (dai_id) { ++ case CS43130_ASP_PCM_DAI: ++ case CS43130_ASP_DOP_DAI: ++ regmap_update_bits(regmap, CS43130_ASP_CH_1_SZ_EN, ++ CS43130_CH_BITSIZE_MASK, bw_map->ch_bit); ++ regmap_update_bits(regmap, CS43130_ASP_CH_2_SZ_EN, ++ CS43130_CH_BITSIZE_MASK, bw_map->ch_bit); ++ regmap_update_bits(regmap, CS43130_SP_BITSIZE, ++ CS43130_ASP_BITSIZE_MASK, bw_map->sp_bit); ++ break; ++ case CS43130_XSP_DOP_DAI: ++ regmap_update_bits(regmap, CS43130_XSP_CH_1_SZ_EN, ++ CS43130_CH_BITSIZE_MASK, bw_map->ch_bit); ++ regmap_update_bits(regmap, CS43130_XSP_CH_2_SZ_EN, ++ CS43130_CH_BITSIZE_MASK, bw_map->ch_bit); ++ regmap_update_bits(regmap, CS43130_SP_BITSIZE, ++ CS43130_XSP_BITSIZE_MASK, bw_map->sp_bit << ++ CS43130_XSP_BITSIZE_SHIFT); ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ return 0; ++} ++static const struct cs43130_rate_map cs43130_rate_table[] = { ++ {32000, CS43130_ASP_SPRATE_32K}, ++ {44100, CS43130_ASP_SPRATE_44_1K}, ++ {48000, CS43130_ASP_SPRATE_48K}, ++ {88200, CS43130_ASP_SPRATE_88_2K}, ++ {96000, CS43130_ASP_SPRATE_96K}, ++ {176400, CS43130_ASP_SPRATE_176_4K}, ++ {192000, CS43130_ASP_SPRATE_192K}, ++ {352800, CS43130_ASP_SPRATE_352_8K}, ++ {384000, CS43130_ASP_SPRATE_384K}, ++}; ++ ++static const struct cs43130_rate_map *cs43130_get_rate_table(int fs) ++{ ++ int i; ++ ++ for (i = 0; i < ARRAY_SIZE(cs43130_rate_table); i++) { ++ if (cs43130_rate_table[i].fs == fs) ++ return &cs43130_rate_table[i]; ++ } ++ ++ return NULL; ++} ++ ++static const struct cs43130_clk_gen *cs43130_get_clk_gen(int mclk_int, int fs, ++ const struct cs43130_clk_gen *clk_gen_table, int len_clk_gen_table) ++{ ++ int i; ++ ++ for (i = 0; i < len_clk_gen_table; i++) { ++ if (clk_gen_table[i].mclk_int == mclk_int && ++ clk_gen_table[i].fs == fs) ++ return &clk_gen_table[i]; ++ } ++ return NULL; ++} ++ ++static int cs43130_set_sp_fmt(int dai_id, unsigned int bitwidth_sclk, ++ struct snd_pcm_hw_params *params, ++ struct cs43130_priv *cs43130) ++{ ++ u16 frm_size; ++ u16 hi_size; ++ u8 frm_delay; ++ u8 frm_phase; ++ u8 frm_data; ++ u8 sclk_edge; ++ u8 lrck_edge; ++ u8 clk_data; ++ u8 loc_ch1; ++ u8 loc_ch2; ++ u8 dai_mode_val; ++ const struct cs43130_clk_gen *clk_gen; ++ ++ switch (cs43130->dais[dai_id].dai_format) { ++ case SND_SOC_DAIFMT_I2S: ++ hi_size = bitwidth_sclk; ++ frm_delay = 2; ++ frm_phase = 0; ++ break; ++ case SND_SOC_DAIFMT_LEFT_J: ++ hi_size = bitwidth_sclk; ++ frm_delay = 2; ++ frm_phase = 1; ++ break; ++ case SND_SOC_DAIFMT_DSP_A: ++ hi_size = 1; ++ frm_delay = 2; ++ frm_phase = 1; ++ break; ++ case SND_SOC_DAIFMT_DSP_B: ++ hi_size = 1; ++ frm_delay = 0; ++ frm_phase = 1; ++ break; ++ default: ++ return -EINVAL; ++ } ++ switch (cs43130->dais[dai_id].dai_mode) { ++ case SND_SOC_DAIFMT_CBS_CFS: ++ dai_mode_val = 0; ++ break; ++ case SND_SOC_DAIFMT_CBM_CFM: ++ dai_mode_val = 1; ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ frm_size = bitwidth_sclk * params_channels(params); ++ sclk_edge = 1; ++ lrck_edge = 0; ++ loc_ch1 = 0; ++ loc_ch2 = bitwidth_sclk * (params_channels(params) - 1); ++ ++ frm_data = frm_delay & CS43130_SP_FSD_MASK; ++ frm_data |= (frm_phase << CS43130_SP_STP_SHIFT) & CS43130_SP_STP_MASK; ++ ++ clk_data = lrck_edge & CS43130_SP_LCPOL_IN_MASK; ++ clk_data |= (lrck_edge << CS43130_SP_LCPOL_OUT_SHIFT) & ++ CS43130_SP_LCPOL_OUT_MASK; ++ clk_data |= (sclk_edge << CS43130_SP_SCPOL_IN_SHIFT) & ++ CS43130_SP_SCPOL_IN_MASK; ++ clk_data |= (sclk_edge << CS43130_SP_SCPOL_OUT_SHIFT) & ++ CS43130_SP_SCPOL_OUT_MASK; ++ clk_data |= (dai_mode_val << CS43130_SP_MODE_SHIFT) & ++ CS43130_SP_MODE_MASK; ++ switch (dai_id) { ++ case CS43130_ASP_PCM_DAI: ++ case CS43130_ASP_DOP_DAI: ++ regmap_update_bits(cs43130->regmap, CS43130_ASP_LRCK_PERIOD_1, ++ CS43130_SP_LCPR_DATA_MASK, (frm_size - 1) >> ++ CS43130_SP_LCPR_LSB_DATA_SHIFT); ++ regmap_update_bits(cs43130->regmap, CS43130_ASP_LRCK_PERIOD_2, ++ CS43130_SP_LCPR_DATA_MASK, (frm_size - 1) >> ++ CS43130_SP_LCPR_MSB_DATA_SHIFT); ++ regmap_update_bits(cs43130->regmap, CS43130_ASP_LRCK_HI_TIME_1, ++ CS43130_SP_LCHI_DATA_MASK, (hi_size - 1) >> ++ CS43130_SP_LCHI_LSB_DATA_SHIFT); ++ regmap_update_bits(cs43130->regmap, CS43130_ASP_LRCK_HI_TIME_2, ++ CS43130_SP_LCHI_DATA_MASK, (hi_size - 1) >> ++ CS43130_SP_LCHI_MSB_DATA_SHIFT); ++ regmap_write(cs43130->regmap, CS43130_ASP_FRAME_CONF, frm_data); ++ regmap_write(cs43130->regmap, CS43130_ASP_CH_1_LOC, loc_ch1); ++ regmap_write(cs43130->regmap, CS43130_ASP_CH_2_LOC, loc_ch2); ++ regmap_update_bits(cs43130->regmap, CS43130_ASP_CH_1_SZ_EN, ++ CS43130_CH_EN_MASK, 1 << CS43130_CH_EN_SHIFT); ++ regmap_update_bits(cs43130->regmap, CS43130_ASP_CH_2_SZ_EN, ++ CS43130_CH_EN_MASK, 1 << CS43130_CH_EN_SHIFT); ++ regmap_write(cs43130->regmap, CS43130_ASP_CLOCK_CONF, clk_data); ++ break; ++ case CS43130_XSP_DOP_DAI: ++ regmap_update_bits(cs43130->regmap, CS43130_XSP_LRCK_PERIOD_1, ++ CS43130_SP_LCPR_DATA_MASK, (frm_size - 1) >> ++ CS43130_SP_LCPR_LSB_DATA_SHIFT); ++ regmap_update_bits(cs43130->regmap, CS43130_XSP_LRCK_PERIOD_2, ++ CS43130_SP_LCPR_DATA_MASK, (frm_size - 1) >> ++ CS43130_SP_LCPR_MSB_DATA_SHIFT); ++ regmap_update_bits(cs43130->regmap, CS43130_XSP_LRCK_HI_TIME_1, ++ CS43130_SP_LCHI_DATA_MASK, (hi_size - 1) >> ++ CS43130_SP_LCHI_LSB_DATA_SHIFT); ++ regmap_update_bits(cs43130->regmap, CS43130_XSP_LRCK_HI_TIME_2, ++ CS43130_SP_LCHI_DATA_MASK, (hi_size - 1) >> ++ CS43130_SP_LCHI_MSB_DATA_SHIFT); ++ regmap_write(cs43130->regmap, CS43130_XSP_FRAME_CONF, frm_data); ++ regmap_write(cs43130->regmap, CS43130_XSP_CH_1_LOC, loc_ch1); ++ regmap_write(cs43130->regmap, CS43130_XSP_CH_2_LOC, loc_ch2); ++ regmap_update_bits(cs43130->regmap, CS43130_XSP_CH_1_SZ_EN, ++ CS43130_CH_EN_MASK, 1 << CS43130_CH_EN_SHIFT); ++ regmap_update_bits(cs43130->regmap, CS43130_XSP_CH_2_SZ_EN, ++ CS43130_CH_EN_MASK, 1 << CS43130_CH_EN_SHIFT); ++ regmap_write(cs43130->regmap, CS43130_XSP_CLOCK_CONF, clk_data); ++ break; ++ default: ++ return -EINVAL; ++ } ++ switch (frm_size) { ++ case 16: ++ clk_gen = cs43130_get_clk_gen(cs43130->mclk_int, ++ params_rate(params), ++ cs43130_16_clk_gen, ++ ARRAY_SIZE(cs43130_16_clk_gen)); ++ break; ++ case 32: ++ clk_gen = cs43130_get_clk_gen(cs43130->mclk_int, ++ params_rate(params), ++ cs43130_32_clk_gen, ++ ARRAY_SIZE(cs43130_32_clk_gen)); ++ break; ++ case 48: ++ clk_gen = cs43130_get_clk_gen(cs43130->mclk_int, ++ params_rate(params), ++ cs43130_48_clk_gen, ++ ARRAY_SIZE(cs43130_48_clk_gen)); ++ break; ++ case 64: ++ clk_gen = cs43130_get_clk_gen(cs43130->mclk_int, ++ params_rate(params), ++ cs43130_64_clk_gen, ++ ARRAY_SIZE(cs43130_64_clk_gen)); ++ break; ++ default: ++ return -EINVAL; ++ } ++ if (!clk_gen) ++ return -EINVAL; ++ switch (dai_id) { ++ case CS43130_ASP_PCM_DAI: ++ case CS43130_ASP_DOP_DAI: ++ regmap_write(cs43130->regmap, CS43130_ASP_DEN_1, ++ (clk_gen->den & CS43130_SP_M_LSB_DATA_MASK) >> ++ CS43130_SP_M_LSB_DATA_SHIFT); ++ regmap_write(cs43130->regmap, CS43130_ASP_DEN_2, ++ (clk_gen->den & CS43130_SP_M_MSB_DATA_MASK) >> ++ CS43130_SP_M_MSB_DATA_SHIFT); ++ regmap_write(cs43130->regmap, CS43130_ASP_NUM_1, ++ (clk_gen->num & CS43130_SP_N_LSB_DATA_MASK) >> ++ CS43130_SP_N_LSB_DATA_SHIFT); ++ regmap_write(cs43130->regmap, CS43130_ASP_NUM_2, ++ (clk_gen->num & CS43130_SP_N_MSB_DATA_MASK) >> ++ CS43130_SP_N_MSB_DATA_SHIFT); ++ break; ++ case CS43130_XSP_DOP_DAI: ++ regmap_write(cs43130->regmap, CS43130_XSP_DEN_1, ++ (clk_gen->den & CS43130_SP_M_LSB_DATA_MASK) >> ++ CS43130_SP_M_LSB_DATA_SHIFT); ++ regmap_write(cs43130->regmap, CS43130_XSP_DEN_2, ++ (clk_gen->den & CS43130_SP_M_MSB_DATA_MASK) >> ++ CS43130_SP_M_MSB_DATA_SHIFT); ++ regmap_write(cs43130->regmap, CS43130_XSP_NUM_1, ++ (clk_gen->num & CS43130_SP_N_LSB_DATA_MASK) >> ++ CS43130_SP_N_LSB_DATA_SHIFT); ++ regmap_write(cs43130->regmap, CS43130_XSP_NUM_2, ++ (clk_gen->num & CS43130_SP_N_MSB_DATA_MASK) >> ++ CS43130_SP_N_MSB_DATA_SHIFT); ++ break; ++ default: ++ return -EINVAL; ++ } ++ return 0; ++} ++ ++static int cs43130_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params, ++ struct snd_soc_dai *dai) ++{ ++ struct snd_soc_component *component = dai->component; ++ struct cs43130_priv *cs43130 = ++ snd_soc_component_get_drvdata(component); ++ const struct cs43130_rate_map *rate_map; ++ unsigned int sclk = cs43130->dais[dai->id].sclk; ++ unsigned int bitwidth_sclk; ++ unsigned int bitwidth_dai = (unsigned int)(params_width(params)); ++ unsigned int dop_rate = (unsigned int)(params_rate(params)); ++ unsigned int required_clk, ret; ++ u8 dsd_speed; ++ ++ cs43130->pll_bypass = true; ++ cs43130_pcm_pdn(component); ++ mutex_lock(&cs43130->clk_mutex); ++ if (!cs43130->clk_req) { ++ /* no DAI is currently using clk */ ++ if (!(CS43130_MCLK_22M % params_rate(params))) { ++ required_clk = CS43130_MCLK_22M; ++ cs43130->mclk_int = CS43130_MCLK_22M; ++ gpiod_set_value_cansleep(snd_allo_clk44gpio, 1); ++ gpiod_set_value_cansleep(snd_allo_clk48gpio, 0); ++ usleep_range(13500, 14000); ++ } else { ++ required_clk = CS43130_MCLK_24M; ++ cs43130->mclk_int = CS43130_MCLK_24M; ++ gpiod_set_value_cansleep(snd_allo_clk48gpio, 1); ++ gpiod_set_value_cansleep(snd_allo_clk44gpio, 0); ++ usleep_range(13500, 14000); ++ } ++ if (cs43130->pll_bypass) ++ cs43130_change_clksrc(component, CS43130_MCLK_SRC_EXT); ++ else ++ cs43130_change_clksrc(component, CS43130_MCLK_SRC_PLL); ++ } ++ ++ cs43130->clk_req++; ++ mutex_unlock(&cs43130->clk_mutex); ++ ++ switch (dai->id) { ++ case CS43130_ASP_DOP_DAI: ++ case CS43130_XSP_DOP_DAI: ++ /* DoP bitwidth is always 24-bit */ ++ bitwidth_dai = 24; ++ sclk = params_rate(params) * bitwidth_dai * ++ params_channels(params); ++ ++ switch (params_rate(params)) { ++ case 176400: ++ dsd_speed = 0; ++ break; ++ case 352800: ++ dsd_speed = 1; ++ break; ++ default: ++ dev_err(component->dev, "Rate(%u) not supported\n", ++ params_rate(params)); ++ return -EINVAL; ++ } ++ ++ regmap_update_bits(cs43130->regmap, CS43130_DSD_PATH_CTL_2, ++ CS43130_DSD_SPEED_MASK, ++ dsd_speed << CS43130_DSD_SPEED_SHIFT); ++ break; ++ case CS43130_ASP_PCM_DAI: ++ rate_map = cs43130_get_rate_table(params_rate(params)); ++ if (!rate_map) ++ return -EINVAL; ++ ++ regmap_write(cs43130->regmap, CS43130_SP_SRATE, rate_map->val); ++ if ((dop_rate == 176400) && (bitwidth_dai == 24)) { ++ dsd_speed = 0; ++ regmap_update_bits(cs43130->regmap, ++ CS43130_DSD_PATH_CTL_2, ++ CS43130_DSD_SPEED_MASK, ++ dsd_speed << CS43130_DSD_SPEED_SHIFT); ++ regmap_update_bits(cs43130->regmap, ++ CS43130_DSD_PATH_CTL_2, ++ CS43130_DSD_SRC_MASK, ++ CS43130_DSD_SRC_ASP << ++ CS43130_DSD_SRC_SHIFT); ++ regmap_update_bits(cs43130->regmap, ++ CS43130_DSD_PATH_CTL_2, ++ CS43130_DSD_EN_MASK, 0x01 << ++ CS43130_DSD_EN_SHIFT); ++ } ++ break; ++ default: ++ dev_err(component->dev, "Invalid DAI (%d)\n", dai->id); ++ return -EINVAL; ++ } ++ ++ switch (dai->id) { ++ case CS43130_ASP_DOP_DAI: ++ regmap_update_bits(cs43130->regmap, CS43130_DSD_PATH_CTL_2, ++ CS43130_DSD_SRC_MASK, CS43130_DSD_SRC_ASP << ++ CS43130_DSD_SRC_SHIFT); ++ regmap_update_bits(cs43130->regmap, CS43130_DSD_PATH_CTL_2, ++ CS43130_DSD_EN_MASK, 0x01 << ++ CS43130_DSD_EN_SHIFT); ++ break; ++ case CS43130_XSP_DOP_DAI: ++ regmap_update_bits(cs43130->regmap, CS43130_DSD_PATH_CTL_2, ++ CS43130_DSD_SRC_MASK, CS43130_DSD_SRC_XSP << ++ CS43130_DSD_SRC_SHIFT); ++ break; ++ } ++ if (!sclk && cs43130->dais[dai->id].dai_mode == ++ SND_SOC_DAIFMT_CBM_CFM) { ++ /* Calculate SCLK in master mode if unassigned */ ++ sclk = params_rate(params) * bitwidth_dai * ++ params_channels(params); ++ } ++ if (!sclk) { ++ /* at this point, SCLK must be set */ ++ dev_err(component->dev, "SCLK freq is not set\n"); ++ return -EINVAL; ++ } ++ ++ bitwidth_sclk = (sclk / params_rate(params)) / params_channels(params); ++ if (bitwidth_sclk < bitwidth_dai) { ++ dev_err(component->dev, "Format not supported: SCLK freq is too low\n"); ++ return -EINVAL; ++ } ++ ++ dev_dbg(component->dev, ++ "sclk = %u, fs = %d, bitwidth_dai = %u\n", ++ sclk, params_rate(params), bitwidth_dai); ++ ++ dev_dbg(component->dev, ++ "bitwidth_sclk = %u, num_ch = %u\n", ++ bitwidth_sclk, params_channels(params)); ++ ++ cs43130_set_bitwidth(dai->id, bitwidth_dai, cs43130->regmap); ++ cs43130_set_sp_fmt(dai->id, bitwidth_sclk, params, cs43130); ++ ret = cs43130_pwr_up_asp_dac(component); ++ return 0; ++} ++ ++static int cs43130_hw_free(struct snd_pcm_substream *substream, ++ struct snd_soc_dai *dai) ++{ ++ struct snd_soc_component *component = dai->component; ++ struct cs43130_priv *cs43130 = ++ snd_soc_component_get_drvdata(component); ++ ++ mutex_lock(&cs43130->clk_mutex); ++ cs43130->clk_req--; ++ if (!cs43130->clk_req) { ++ /* no DAI is currently using clk */ ++ cs43130_change_clksrc(component, CS43130_MCLK_SRC_RCO); ++ cs43130_pcm_pdn(component); ++ } ++ mutex_unlock(&cs43130->clk_mutex); ++ ++ return 0; ++} ++ ++static const unsigned int cs43130_asp_src_rates[] = { ++ 32000, 44100, 48000, 88200, 96000, 176400, 192000 ++}; ++ ++static const struct snd_pcm_hw_constraint_list cs43130_asp_constraints = { ++ .count = ARRAY_SIZE(cs43130_asp_src_rates), ++ .list = cs43130_asp_src_rates, ++}; ++ ++static int cs43130_pcm_startup(struct snd_pcm_substream *substream, ++ struct snd_soc_dai *dai) ++{ ++ return snd_pcm_hw_constraint_list(substream->runtime, 0, ++ SNDRV_PCM_HW_PARAM_RATE, ++ &cs43130_asp_constraints); ++} ++ ++static int cs43130_pcm_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) ++{ ++ struct snd_soc_component *component = codec_dai->component; ++ struct cs43130_priv *cs43130 = ++ snd_soc_component_get_drvdata(component); ++ ++ switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { ++ case SND_SOC_DAIFMT_CBS_CFS: ++ cs43130->dais[codec_dai->id].dai_mode = SND_SOC_DAIFMT_CBS_CFS; ++ break; ++ case SND_SOC_DAIFMT_CBM_CFM: ++ cs43130->dais[codec_dai->id].dai_mode = SND_SOC_DAIFMT_CBM_CFM; ++ break; ++ default: ++ dev_err(component->dev, "unsupported mode\n"); ++ return -EINVAL; ++ } ++ ++ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { ++ case SND_SOC_DAIFMT_I2S: ++ cs43130->dais[codec_dai->id].dai_format = SND_SOC_DAIFMT_I2S; ++ break; ++ case SND_SOC_DAIFMT_LEFT_J: ++ cs43130->dais[codec_dai->id].dai_format = SND_SOC_DAIFMT_LEFT_J; ++ break; ++ default: ++ dev_err(component->dev, ++ "unsupported audio format\n"); ++ return -EINVAL; ++ } ++ ++ dev_dbg(component->dev, "dai_id = %d, dai_mode = %u, dai_format = %u\n", ++ codec_dai->id, ++ cs43130->dais[codec_dai->id].dai_mode, ++ cs43130->dais[codec_dai->id].dai_format); ++ ++ return 0; ++} ++ ++static int cs43130_set_sysclk(struct snd_soc_dai *codec_dai, ++ int clk_id, unsigned int freq, int dir) ++{ ++ struct snd_soc_component *component = codec_dai->component; ++ struct cs43130_priv *cs43130 = ++ snd_soc_component_get_drvdata(component); ++ ++ cs43130->dais[codec_dai->id].sclk = freq; ++ dev_dbg(component->dev, "dai_id = %d, sclk = %u\n", codec_dai->id, ++ cs43130->dais[codec_dai->id].sclk); ++ ++ return 0; ++} ++ ++static int cs43130_component_set_sysclk(struct snd_soc_component *component, ++ int clk_id, int source, ++ unsigned int freq, int dir) ++{ ++ struct cs43130_priv *cs43130 = ++ snd_soc_component_get_drvdata(component); ++ ++ dev_dbg(component->dev, "clk_id = %d, source = %d, freq = %d, dir = %d\n", ++ clk_id, source, freq, dir); ++ ++ switch (freq) { ++ case CS43130_MCLK_22M: ++ case CS43130_MCLK_24M: ++ cs43130->mclk = freq; ++ break; ++ default: ++ dev_err(component->dev, "Invalid MCLK INT freq: %u\n", freq); ++ return -EINVAL; ++ } ++ ++ if (source == CS43130_MCLK_SRC_EXT) { ++ cs43130->pll_bypass = true; ++ } else { ++ dev_err(component->dev, "Invalid MCLK source\n"); ++ return -EINVAL; ++ } ++ ++ return 0; ++} ++static u16 const cs43130_ac_freq[CS43130_AC_FREQ] = { ++ 24, ++ 43, ++ 93, ++ 200, ++ 431, ++ 928, ++ 2000, ++ 4309, ++ 9283, ++ 20000, ++}; ++static const struct snd_soc_dai_ops cs43130_dai_ops = { ++ .startup = cs43130_pcm_startup, ++ .hw_params = cs43130_hw_params, ++ .hw_free = cs43130_hw_free, ++ .set_sysclk = cs43130_set_sysclk, ++ .set_fmt = cs43130_pcm_set_fmt, ++}; ++ ++static struct snd_soc_dai_driver cs43130_codec_dai = { ++ .name = "allo-cs43130", ++ .playback = { ++ .stream_name = "Playback", ++ .channels_min = 2, ++ .channels_max = 2, ++ .rates = SNDRV_PCM_RATE_CONTINUOUS, ++ .rate_min = 44100, ++ .rate_max = 192000, ++ .formats = SNDRV_PCM_FMTBIT_S16_LE | ++ SNDRV_PCM_FMTBIT_S24_LE | ++ SNDRV_PCM_FMTBIT_S32_LE ++ ++ }, ++ .ops = &cs43130_dai_ops, ++}; ++ ++static struct snd_soc_component_driver cs43130_component_driver = { ++ .idle_bias_on = true, ++ .controls = cs43130_controls, ++ .num_controls = ARRAY_SIZE(cs43130_controls), ++ .set_sysclk = cs43130_component_set_sysclk, ++ .idle_bias_on = 1, ++ .use_pmdown_time = 1, ++ .endianness = 1, ++ .non_legacy_dai_naming = 1, ++}; ++ ++static const struct regmap_config cs43130_regmap = { ++ .reg_bits = 24, ++ .pad_bits = 8, ++ .val_bits = 8, ++ ++ .max_register = CS43130_LASTREG, ++ .reg_defaults = cs43130_reg_defaults, ++ .num_reg_defaults = ARRAY_SIZE(cs43130_reg_defaults), ++ .readable_reg = cs43130_readable_register, ++ .precious_reg = cs43130_precious_register, ++ .volatile_reg = cs43130_volatile_register, ++ .cache_type = REGCACHE_RBTREE, ++ /* needed for regcache_sync */ ++ .use_single_read = true, ++ .use_single_write = true, ++}; ++ ++static u16 const cs43130_dc_threshold[CS43130_DC_THRESHOLD] = { ++ 50, ++ 120, ++}; ++ ++static int cs43130_handle_device_data(struct i2c_client *i2c_client, ++ struct cs43130_priv *cs43130) ++{ ++ struct device_node *np = i2c_client->dev.of_node; ++ unsigned int val; ++ int i; ++ ++ if (of_property_read_u32(np, "cirrus,xtal-ibias", &val) < 0) { ++ /* Crystal is unused. System clock is used for external MCLK */ ++ cs43130->xtal_ibias = CS43130_XTAL_UNUSED; ++ return 0; ++ } ++ ++ switch (val) { ++ case 1: ++ cs43130->xtal_ibias = CS43130_XTAL_IBIAS_7_5UA; ++ break; ++ case 2: ++ cs43130->xtal_ibias = CS43130_XTAL_IBIAS_12_5UA; ++ break; ++ case 3: ++ cs43130->xtal_ibias = CS43130_XTAL_IBIAS_15UA; ++ break; ++ default: ++ dev_err(&i2c_client->dev, ++ "Invalid cirrus,xtal-ibias value: %d\n", val); ++ return -EINVAL; ++ } ++ ++ cs43130->dc_meas = of_property_read_bool(np, "cirrus,dc-measure"); ++ cs43130->ac_meas = of_property_read_bool(np, "cirrus,ac-measure"); ++ ++ if (of_property_read_u16_array(np, "cirrus,ac-freq", cs43130->ac_freq, ++ CS43130_AC_FREQ) < 0) { ++ for (i = 0; i < CS43130_AC_FREQ; i++) ++ cs43130->ac_freq[i] = cs43130_ac_freq[i]; ++ } ++ ++ if (of_property_read_u16_array(np, "cirrus,dc-threshold", ++ cs43130->dc_threshold, ++ CS43130_DC_THRESHOLD) < 0) { ++ for (i = 0; i < CS43130_DC_THRESHOLD; i++) ++ cs43130->dc_threshold[i] = cs43130_dc_threshold[i]; ++ } ++ ++ return 0; ++} ++ ++ ++static int allo_cs43130_component_probe(struct i2c_client *i2c, ++ const struct i2c_device_id *id) ++{ ++ struct regmap *regmap; ++ struct regmap_config config = cs43130_regmap; ++ struct device *dev = &i2c->dev; ++ struct cs43130_priv *cs43130; ++ unsigned int devid = 0; ++ unsigned int reg; ++ int ret; ++ ++ regmap = devm_regmap_init_i2c(i2c, &config); ++ if (IS_ERR(regmap)) ++ return PTR_ERR(regmap); ++ ++ cs43130 = devm_kzalloc(dev, sizeof(struct cs43130_priv), ++ GFP_KERNEL); ++ if (!cs43130) ++ return -ENOMEM; ++ ++ dev_set_drvdata(dev, cs43130); ++ cs43130->regmap = regmap; ++ ++ if (i2c->dev.of_node) { ++ ret = cs43130_handle_device_data(i2c, cs43130); ++ if (ret != 0) ++ return ret; ++ } ++ usleep_range(2000, 2050); ++ ++ ret = regmap_read(cs43130->regmap, CS43130_DEVID_AB, ®); ++ devid = (reg & 0xFF) << 12; ++ ret = regmap_read(cs43130->regmap, CS43130_DEVID_CD, ®); ++ devid |= (reg & 0xFF) << 4; ++ ret = regmap_read(cs43130->regmap, CS43130_DEVID_E, ®); ++ devid |= (reg & 0xF0) >> 4; ++ if (devid != CS43198_CHIP_ID) { ++ dev_err(dev, "Failed to read Chip or wrong Chip id: %d\n", ret); ++ return ret; ++ } ++ ++ cs43130->mclk_int_src = CS43130_MCLK_SRC_RCO; ++ msleep(20); ++ ++ ret = snd_soc_register_component(dev, &cs43130_component_driver, ++ &cs43130_codec_dai, 1); ++ if (ret != 0) { ++ dev_err(dev, "failed to register codec: %d\n", ret); ++ return ret; ++ } ++ regmap_update_bits(cs43130->regmap, CS43130_PAD_INT_CFG, ++ CS43130_ASP_3ST_MASK, 0); ++ regmap_update_bits(cs43130->regmap, CS43130_PAD_INT_CFG, ++ CS43130_XSP_3ST_MASK, 1); ++ regmap_update_bits(cs43130->regmap, CS43130_PWDN_CTL, ++ CS43130_PDN_HP_MASK, 1 << CS43130_PDN_HP_SHIFT); ++ msleep(20); ++ regmap_write(cs43130->regmap, CS43130_CLASS_H_CTL, 0x06); ++ snd_allo_clk44gpio = devm_gpiod_get(dev, "clock44", GPIOD_OUT_HIGH); ++ if (IS_ERR(snd_allo_clk44gpio)) ++ dev_err(dev, "devm_gpiod_get() failed\n"); ++ ++ snd_allo_clk48gpio = devm_gpiod_get(dev, "clock48", GPIOD_OUT_LOW); ++ if (IS_ERR(snd_allo_clk48gpio)) ++ dev_err(dev, "devm_gpiod_get() failed\n"); ++ ++ return 0; ++} ++ ++static int allo_cs43130_component_remove(struct i2c_client *i2c) ++{ ++ snd_soc_unregister_component(&i2c->dev); ++ return 0; ++} ++ ++static const struct i2c_device_id allo_cs43130_component_id[] = { ++ { "allo-cs43198", }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, allo_cs43130_component_id); ++ ++static const struct of_device_id allo_cs43130_codec_of_match[] = { ++ { .compatible = "allo,allo-cs43198", }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, allo_cs43130_codec_of_match); ++ ++static struct i2c_driver allo_cs43130_component_driver = { ++ .probe = allo_cs43130_component_probe, ++ .remove = allo_cs43130_component_remove, ++ .id_table = allo_cs43130_component_id, ++ .driver = { ++ .name = "allo-cs43198", ++ .of_match_table = allo_cs43130_codec_of_match, ++ }, ++}; ++ ++module_i2c_driver(allo_cs43130_component_driver); ++ ++MODULE_DESCRIPTION("ASoC Allo Boss2 Codec Driver"); ++MODULE_AUTHOR("Sudeepkumar "); ++MODULE_LICENSE("GPL v2"); +-- +2.18.4 + + +From d5ef2f158548840ab62fb5d03ba98392f9ad71b2 Mon Sep 17 00:00:00 2001 +From: Sudeep +Date: Fri, 23 Oct 2020 15:51:15 +0530 +Subject: [PATCH 1166/1209] Add allo boss2 overlay + +Signed-off-by: Sudeep +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 6 ++ + .../overlays/allo-boss2-dac-audio-overlay.dts | 57 +++++++++++++++++++ + 3 files changed, 64 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/allo-boss2-dac-audio-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index fbb7ed1ba55b..13342d83d02d 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -14,6 +14,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ + adv728x-m.dtbo \ + akkordion-iqdacplus.dtbo \ + allo-boss-dac-pcm512x-audio.dtbo \ ++ allo-boss2-dac-audio.dtbo \ + allo-digione.dtbo \ + allo-katana-dac-audio.dtbo \ + allo-piano-dac-pcm512x-audio.dtbo \ +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index c709c4b89c15..2192cdfb27aa 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -420,6 +420,12 @@ Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec + slave" + + ++Name: allo-boss2-dac-audio ++Info: Configures the Allo Boss2 DAC audio card ++Load: dtoverlay=allo-boss2-dac-audio ++Params: ++ ++ + Name: allo-digione + Info: Configures the Allo Digione audio card + Load: dtoverlay=allo-digione +diff --git a/arch/arm/boot/dts/overlays/allo-boss2-dac-audio-overlay.dts b/arch/arm/boot/dts/overlays/allo-boss2-dac-audio-overlay.dts +new file mode 100644 +index 000000000000..a6adfb495eb9 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/allo-boss2-dac-audio-overlay.dts +@@ -0,0 +1,57 @@ ++/* * Definitions for Allo Boss2 DAC boards ++ */ ++ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2835"; ++ ++ fragment@0 { ++ target = <&i2s>; ++ __overlay__ { ++ #sound-dai-cells = <0>; ++ status = "okay"; ++ cpu_port: port { ++ cpu_endpoint: endpoint { ++ remote-endpoint = <&codec_endpoint>; ++ bitclock-master = <&codec_endpoint>; ++ frame-master = <&codec_endpoint>; ++ dai-format = "i2s"; ++ }; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ allo-cs43130@30 { ++ #sound-dai-cells = <0>; ++ compatible = "allo,allo-cs43198"; ++ clock44-gpio = <&gpio 5 0>; ++ clock48-gpio = <&gpio 6 0>; ++ reg = <0x30>; ++ port { ++ codec_endpoint: endpoint { ++ remote-endpoint = <&cpu_endpoint>; ++ }; ++ }; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&sound>; ++ boss2_dac: __overlay__ { ++ compatible = "audio-graph-card"; ++ label = "Allo Boss2"; ++ dais = <&cpu_port>; ++ status = "okay"; ++ }; ++ }; ++}; ++ +-- +2.18.4 + + +From 08b1e4ce395d748ec93f14acd1389908ecfc1331 Mon Sep 17 00:00:00 2001 +From: Sudeep +Date: Fri, 23 Oct 2020 15:52:38 +0530 +Subject: [PATCH 1167/1209] Add allo boss2 config + +Signed-off-by: Sudeep +--- + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcm2711_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + arch/arm64/configs/bcm2711_defconfig | 1 + + arch/arm64/configs/bcmrpi3_defconfig | 1 + + 5 files changed, 5 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 6b3d27193be4..b062fead409b 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -1006,6 +1006,7 @@ CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2=m + CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m + CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m + CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m ++CONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC=m + CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m + CONFIG_SND_BCM2708_SOC_ALLO_KATANA_DAC=m + CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m +diff --git a/arch/arm/configs/bcm2711_defconfig b/arch/arm/configs/bcm2711_defconfig +index 5b826bc26c30..598e9e198951 100644 +--- a/arch/arm/configs/bcm2711_defconfig ++++ b/arch/arm/configs/bcm2711_defconfig +@@ -1020,6 +1020,7 @@ CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2=m + CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m + CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m + CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m ++CONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC=m + CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m + CONFIG_SND_BCM2708_SOC_ALLO_KATANA_DAC=m + CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 1beb2c61e519..520d0bf8c700 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -998,6 +998,7 @@ CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2=m + CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m + CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m + CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m ++CONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC=m + CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m + CONFIG_SND_BCM2708_SOC_ALLO_KATANA_DAC=m + CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m +diff --git a/arch/arm64/configs/bcm2711_defconfig b/arch/arm64/configs/bcm2711_defconfig +index 22ba4d32f786..39f2fc51de4d 100644 +--- a/arch/arm64/configs/bcm2711_defconfig ++++ b/arch/arm64/configs/bcm2711_defconfig +@@ -1019,6 +1019,7 @@ CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2=m + CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m + CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m + CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m ++CONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC=m + CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m + CONFIG_SND_BCM2708_SOC_ALLO_KATANA_DAC=m + CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m +diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig +index a91f46b4a45c..3d43b416bce4 100644 +--- a/arch/arm64/configs/bcmrpi3_defconfig ++++ b/arch/arm64/configs/bcmrpi3_defconfig +@@ -921,6 +921,7 @@ CONFIG_SND_AUDIOSENSE_PI=m + CONFIG_SND_DIGIDAC1_SOUNDCARD=m + CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m + CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m ++CONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC=m + CONFIG_SND_PISOUND=m + CONFIG_SND_SOC_AD193X_SPI=m + CONFIG_SND_SOC_AD193X_I2C=m +-- +2.18.4 + + +From 362fe47448366733813e271a71d5d337b57f6b58 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 3 Nov 2020 10:13:48 +0000 +Subject: [PATCH 1168/1209] Revert "mailbox: avoid timer start from callback" + +This reverts commit 6dc15642c8b830d384fd3e6c9ea63144202b8932. + +The Pi 400 shutdown/poweroff mechanism relies on being able to set +a GPIO on the expander in the pm_power_off handler, something that +requires two mailbox calls - GET_GPIO_STATE and SET_GPIO_STATE. A +recent kernel change introduces a reasonable possibility that the +GET call doesn't completes, and bisecting led to a commit from +October that changes the timer usage of the mailbox. + +My theory is that there is a race condition in the new code that breaks +the poll timer, but that it normally goes unnoticed because subsequent +mailbox activity wakes it up again. The power-off mailbox calls happen +at a time when other subsystems have been shut down, so if one of them +fails then there is nothing to allow it to recover. + +Revert 6dc15642 as (at least) a workaround. + +See: https://github.com/raspberrypi/linux/issues/3941 + +Signed-off-by: Phil Elwell +--- + drivers/mailbox/mailbox.c | 12 +++++------- + 1 file changed, 5 insertions(+), 7 deletions(-) + +diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c +index 3e7d4b20ab34..0b821a5b2db8 100644 +--- a/drivers/mailbox/mailbox.c ++++ b/drivers/mailbox/mailbox.c +@@ -82,12 +82,9 @@ static void msg_submit(struct mbox_chan *chan) + exit: + spin_unlock_irqrestore(&chan->lock, flags); + +- /* kick start the timer immediately to avoid delays */ +- if (!err && (chan->txdone_method & TXDONE_BY_POLL)) { +- /* but only if not already active */ +- if (!hrtimer_active(&chan->mbox->poll_hrt)) +- hrtimer_start(&chan->mbox->poll_hrt, 0, HRTIMER_MODE_REL); +- } ++ if (!err && (chan->txdone_method & TXDONE_BY_POLL)) ++ /* kick start the timer immediately to avoid delays */ ++ hrtimer_start(&chan->mbox->poll_hrt, 0, HRTIMER_MODE_REL); + } + + static void tx_tick(struct mbox_chan *chan, int r) +@@ -125,10 +122,11 @@ static enum hrtimer_restart txdone_hrtimer(struct hrtimer *hrtimer) + struct mbox_chan *chan = &mbox->chans[i]; + + if (chan->active_req && chan->cl) { +- resched = true; + txdone = chan->mbox->ops->last_tx_done(chan); + if (txdone) + tx_tick(chan, 0); ++ else ++ resched = true; + } + } + +-- +2.18.4 + + +From 892d8a4129edb941570efdd9f057d22b90ab8693 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 14 Jul 2020 14:21:33 +0100 +Subject: [PATCH 1169/1209] ARM: dts: Add bcm2711-rpi-400.dts + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/Makefile | 1 + + arch/arm/boot/dts/bcm2711-rpi-400.dts | 585 ++++++++++++++++++ + arch/arm64/boot/dts/broadcom/Makefile | 1 + + .../boot/dts/broadcom/bcm2711-rpi-400.dts | 1 + + 4 files changed, 588 insertions(+) + create mode 100644 arch/arm/boot/dts/bcm2711-rpi-400.dts + create mode 100644 arch/arm64/boot/dts/broadcom/bcm2711-rpi-400.dts + +diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile +index 325f1ceccad9..0e1c0aeefa69 100644 +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -12,6 +12,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \ + bcm2710-rpi-3-b.dtb \ + bcm2710-rpi-3-b-plus.dtb \ + bcm2711-rpi-4-b.dtb \ ++ bcm2711-rpi-400.dtb \ + bcm2710-rpi-cm3.dtb \ + bcm2711-rpi-cm4.dtb + +diff --git a/arch/arm/boot/dts/bcm2711-rpi-400.dts b/arch/arm/boot/dts/bcm2711-rpi-400.dts +new file mode 100644 +index 000000000000..afd1ca215518 +--- /dev/null ++++ b/arch/arm/boot/dts/bcm2711-rpi-400.dts +@@ -0,0 +1,585 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/dts-v1/; ++#include "bcm2711.dtsi" ++#include "bcm2835-rpi.dtsi" ++ ++/ { ++ compatible = "raspberrypi,400", "brcm,bcm2711"; ++ model = "Raspberry Pi 400"; ++ ++ chosen { ++ /* 8250 auxiliary UART instead of pl011 */ ++ stdout-path = "serial1:115200n8"; ++ }; ++ ++ /* Will be filled by the bootloader */ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0 0 0>; ++ }; ++ ++ aliases { ++ emmc2bus = &emmc2bus; ++ ethernet0 = &genet; ++ pcie0 = &pcie0; ++ }; ++ ++ leds { ++ act { ++ gpios = <&gpio 42 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ pwr { ++ label = "PWR"; ++ gpios = <&expgpio 2 GPIO_ACTIVE_LOW>; ++ default-state = "keep"; ++ linux,default-trigger = "default-on"; ++ }; ++ }; ++ ++ wifi_pwrseq: wifi-pwrseq { ++ compatible = "mmc-pwrseq-simple"; ++ reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>; ++ }; ++ ++ sd_io_1v8_reg: sd_io_1v8_reg { ++ compatible = "regulator-gpio"; ++ regulator-name = "vdd-sd-io"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ regulator-settling-time-us = <5000>; ++ gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>; ++ states = <1800000 0x1 ++ 3300000 0x0>; ++ status = "okay"; ++ }; ++}; ++ ++&firmware { ++ expgpio: gpio { ++ compatible = "raspberrypi,firmware-gpio"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ gpio-line-names = "BT_ON", ++ "WL_ON", ++ "PWR_LED_OFF", ++ "GLOBAL_RESET", ++ "VDD_SD_IO_SEL", ++ "CAM_GPIO", ++ "SD_PWR_ON", ++ "SD_OC_N"; ++ status = "okay"; ++ }; ++}; ++ ++&gpio { ++ /* ++ * Parts taken from rpi_SCH_4b_4p0_reduced.pdf and ++ * the official GPU firmware DT blob. ++ * ++ * Legend: ++ * "FOO" = GPIO line named "FOO" on the schematic ++ * "FOO_N" = GPIO line named "FOO" on schematic, active low ++ */ ++ gpio-line-names = "ID_SDA", ++ "ID_SCL", ++ "SDA1", ++ "SCL1", ++ "GPIO_GCLK", ++ "GPIO5", ++ "GPIO6", ++ "SPI_CE1_N", ++ "SPI_CE0_N", ++ "SPI_MISO", ++ "SPI_MOSI", ++ "SPI_SCLK", ++ "GPIO12", ++ "GPIO13", ++ /* Serial port */ ++ "TXD1", ++ "RXD1", ++ "GPIO16", ++ "GPIO17", ++ "GPIO18", ++ "GPIO19", ++ "GPIO20", ++ "GPIO21", ++ "GPIO22", ++ "GPIO23", ++ "GPIO24", ++ "GPIO25", ++ "GPIO26", ++ "GPIO27", ++ "RGMII_MDIO", ++ "RGMIO_MDC", ++ /* Used by BT module */ ++ "CTS0", ++ "RTS0", ++ "TXD0", ++ "RXD0", ++ /* Used by Wifi */ ++ "SD1_CLK", ++ "SD1_CMD", ++ "SD1_DATA0", ++ "SD1_DATA1", ++ "SD1_DATA2", ++ "SD1_DATA3", ++ /* Shared with SPI flash */ ++ "PWM0_MISO", ++ "PWM1_MOSI", ++ "STATUS_LED_G_CLK", ++ "SPIFLASH_CE_N", ++ "SDA0", ++ "SCL0", ++ "RGMII_RXCLK", ++ "RGMII_RXCTL", ++ "RGMII_RXD0", ++ "RGMII_RXD1", ++ "RGMII_RXD2", ++ "RGMII_RXD3", ++ "RGMII_TXCLK", ++ "RGMII_TXCTL", ++ "RGMII_TXD0", ++ "RGMII_TXD1", ++ "RGMII_TXD2", ++ "RGMII_TXD3"; ++}; ++ ++&pwm1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>; ++ status = "okay"; ++}; ++ ++/* SDHCI is used to control the SDIO for wireless */ ++&sdhci { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&emmc_gpio34>; ++ bus-width = <4>; ++ non-removable; ++ mmc-pwrseq = <&wifi_pwrseq>; ++ status = "okay"; ++ ++ brcmf: wifi@1 { ++ reg = <1>; ++ compatible = "brcm,bcm4329-fmac"; ++ }; ++}; ++ ++/* EMMC2 is used to drive the SD card */ ++&emmc2 { ++ vqmmc-supply = <&sd_io_1v8_reg>; ++ broken-cd; ++ status = "okay"; ++}; ++ ++&genet { ++ phy-handle = <&phy1>; ++ phy-mode = "rgmii-rxid"; ++ status = "okay"; ++}; ++ ++&genet_mdio { ++ phy1: ethernet-phy@1 { ++ /* No PHY interrupt */ ++ reg = <0x1>; ++ }; ++}; ++ ++/* uart0 communicates with the BT module */ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>; ++ uart-has-rtscts; ++ status = "okay"; ++ ++ bluetooth { ++ compatible = "brcm,bcm43438-bt"; ++ max-speed = <2000000>; ++ shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>; ++ }; ++}; ++ ++/* uart1 is mapped to the pin header */ ++&uart1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart1_gpio14>; ++ status = "okay"; ++}; ++ ++&vchiq { ++ interrupts = ; ++}; ++ ++// ============================================= ++// Downstream rpi- changes ++ ++#include "bcm270x.dtsi" ++#include "bcm271x-rpi-bt.dtsi" ++ ++/ { ++ soc { ++ /delete-node/ pixelvalve@7e807000; ++ /delete-node/ hdmi@7e902000; ++ }; ++}; ++ ++#include "bcm2711-rpi.dtsi" ++#include "bcm283x-rpi-csi1-2lane.dtsi" ++#include "bcm283x-rpi-i2c0mux_0_44.dtsi" ++ ++/ { ++ chosen { ++ bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1"; ++ }; ++ ++ aliases { ++ serial0 = &uart1; ++ serial1 = &uart0; ++ mmc0 = &emmc2; ++ mmc1 = &mmcnr; ++ mmc2 = &sdhost; ++ /delete-property/ i2c2; ++ i2c3 = &i2c3; ++ i2c4 = &i2c4; ++ i2c5 = &i2c5; ++ i2c6 = &i2c6; ++ /delete-property/ intc; ++ }; ++ ++ /delete-node/ wifi-pwrseq; ++}; ++ ++&mmcnr { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&sdio_pins>; ++ bus-width = <4>; ++ status = "okay"; ++}; ++ ++&uart0 { ++ pinctrl-0 = <&uart0_pins &bt_pins>; ++ status = "okay"; ++}; ++ ++&uart1 { ++ pinctrl-0 = <&uart1_pins>; ++}; ++ ++&spi0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&spi0_pins &spi0_cs_pins>; ++ cs-gpios = <&gpio 8 1>, <&gpio 7 1>; ++ ++ spidev0: spidev@0{ ++ compatible = "spidev"; ++ reg = <0>; /* CE0 */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ spi-max-frequency = <125000000>; ++ }; ++ ++ spidev1: spidev@1{ ++ compatible = "spidev"; ++ reg = <1>; /* CE1 */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ spi-max-frequency = <125000000>; ++ }; ++}; ++ ++&gpio { ++ spi0_pins: spi0_pins { ++ brcm,pins = <9 10 11>; ++ brcm,function = ; ++ }; ++ ++ spi0_cs_pins: spi0_cs_pins { ++ brcm,pins = <8 7>; ++ brcm,function = ; ++ }; ++ ++ spi3_pins: spi3_pins { ++ brcm,pins = <1 2 3>; ++ brcm,function = ; ++ }; ++ ++ spi3_cs_pins: spi3_cs_pins { ++ brcm,pins = <0 24>; ++ brcm,function = ; ++ }; ++ ++ spi4_pins: spi4_pins { ++ brcm,pins = <5 6 7>; ++ brcm,function = ; ++ }; ++ ++ spi4_cs_pins: spi4_cs_pins { ++ brcm,pins = <4 25>; ++ brcm,function = ; ++ }; ++ ++ spi5_pins: spi5_pins { ++ brcm,pins = <13 14 15>; ++ brcm,function = ; ++ }; ++ ++ spi5_cs_pins: spi5_cs_pins { ++ brcm,pins = <12 26>; ++ brcm,function = ; ++ }; ++ ++ spi6_pins: spi6_pins { ++ brcm,pins = <19 20 21>; ++ brcm,function = ; ++ }; ++ ++ spi6_cs_pins: spi6_cs_pins { ++ brcm,pins = <18 27>; ++ brcm,function = ; ++ }; ++ ++ i2c0_pins: i2c0 { ++ brcm,pins = <0 1>; ++ brcm,function = ; ++ brcm,pull = ; ++ }; ++ ++ i2c1_pins: i2c1 { ++ brcm,pins = <2 3>; ++ brcm,function = ; ++ brcm,pull = ; ++ }; ++ ++ i2c3_pins: i2c3 { ++ brcm,pins = <4 5>; ++ brcm,function = ; ++ brcm,pull = ; ++ }; ++ ++ i2c4_pins: i2c4 { ++ brcm,pins = <8 9>; ++ brcm,function = ; ++ brcm,pull = ; ++ }; ++ ++ i2c5_pins: i2c5 { ++ brcm,pins = <12 13>; ++ brcm,function = ; ++ brcm,pull = ; ++ }; ++ ++ i2c6_pins: i2c6 { ++ brcm,pins = <22 23>; ++ brcm,function = ; ++ brcm,pull = ; ++ }; ++ ++ i2s_pins: i2s { ++ brcm,pins = <18 19 20 21>; ++ brcm,function = ; ++ }; ++ ++ sdio_pins: sdio_pins { ++ brcm,pins = <34 35 36 37 38 39>; ++ brcm,function = ; // alt3 = SD1 ++ brcm,pull = <0 2 2 2 2 2>; ++ }; ++ ++ bt_pins: bt_pins { ++ brcm,pins = "-"; // non-empty to keep btuart happy, //4 = 0 ++ // to fool pinctrl ++ brcm,function = <0>; ++ brcm,pull = <2>; ++ }; ++ ++ uart0_pins: uart0_pins { ++ brcm,pins = <32 33>; ++ brcm,function = ; ++ brcm,pull = <0 2>; ++ }; ++ ++ uart1_pins: uart1_pins { ++ brcm,pins; ++ brcm,function; ++ brcm,pull; ++ }; ++ ++ uart2_pins: uart2_pins { ++ brcm,pins = <0 1>; ++ brcm,function = ; ++ brcm,pull = <0 2>; ++ }; ++ ++ uart3_pins: uart3_pins { ++ brcm,pins = <4 5>; ++ brcm,function = ; ++ brcm,pull = <0 2>; ++ }; ++ ++ uart4_pins: uart4_pins { ++ brcm,pins = <8 9>; ++ brcm,function = ; ++ brcm,pull = <0 2>; ++ }; ++ ++ uart5_pins: uart5_pins { ++ brcm,pins = <12 13>; ++ brcm,function = ; ++ brcm,pull = <0 2>; ++ }; ++}; ++ ++&i2c0if { ++ clock-frequency = <100000>; ++}; ++ ++&i2c1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c1_pins>; ++ clock-frequency = <100000>; ++}; ++ ++&i2s { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2s_pins>; ++}; ++ ++/ { ++ __overrides__ { ++ /delete-property/ i2c2_baudrate; ++ /delete-property/ i2c2_iknowwhatimdoing; ++ }; ++}; ++ ++&firmwarekms { ++ compatible = "raspberrypi,rpi-firmware-kms-2711"; ++}; ++ ++// ============================================= ++// Board specific stuff here ++ ++/ { ++ sd_vcc_reg: sd_vcc_reg { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc-sd"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ enable-active-high; ++ gpio = <&expgpio 6 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ power_ctrl: power_ctrl { ++ compatible = "gpio-poweroff"; ++ gpios = <&expgpio 5 0>; ++ force; ++ }; ++}; ++ ++&sdhost { ++ status = "disabled"; ++}; ++ ++&emmc2 { ++ vmmc-supply = <&sd_vcc_reg>; ++}; ++ ++&phy1 { ++ led-modes = <0x00 0x08>; /* link/activity link */ ++}; ++ ++&gpio { ++ audio_pins: audio_pins { ++ brcm,pins = <40 41>; ++ brcm,function = <4>; ++ }; ++}; ++ ++&leds { ++ act_led: act { ++ label = "led0"; ++ linux,default-trigger = "default-on"; ++ default-state = "on"; ++ gpios = <&gpio 42 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ pwr_led: pwr { ++ label = "led1"; ++ linux,default-trigger = "default-on"; ++ gpios = <&expgpio 2 GPIO_ACTIVE_LOW>; ++ }; ++}; ++ ++&pwm1 { ++ status = "disabled"; ++}; ++ ++&audio { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&audio_pins>; ++ brcm,disable-headphones = <1>; ++}; ++ ++&vc4 { ++ status = "disabled"; ++}; ++ ++&pixelvalve0 { ++ status = "disabled"; ++}; ++ ++&pixelvalve1 { ++ status = "disabled"; ++}; ++ ++&pixelvalve2 { ++ status = "disabled"; ++}; ++ ++&pixelvalve3 { ++ status = "disabled"; ++}; ++ ++&pixelvalve4 { ++ status = "disabled"; ++}; ++ ++&hdmi0 { ++ status = "disabled"; ++}; ++ ++&ddc0 { ++ status = "disabled"; ++}; ++ ++&hdmi1 { ++ status = "disabled"; ++}; ++ ++&ddc1 { ++ status = "disabled"; ++}; ++ ++/ { ++ __overrides__ { ++ act_led_gpio = <&act_led>,"gpios:4"; ++ act_led_activelow = <&act_led>,"gpios:8"; ++ act_led_trigger = <&act_led>,"linux,default-trigger"; ++ ++ pwr_led_gpio = <&pwr_led>,"gpios:4"; ++ pwr_led_activelow = <&pwr_led>,"gpios:8"; ++ pwr_led_trigger = <&pwr_led>,"linux,default-trigger"; ++ ++ eth_led0 = <&phy1>,"led-modes:0"; ++ eth_led1 = <&phy1>,"led-modes:4"; ++ ++ sd_poll_once = <&emmc2>, "non-removable?"; ++ spi_dma4 = <&spi0>, "dmas:0=", <&dma40>, ++ <&spi0>, "dmas:8=", <&dma40>; ++ }; ++}; +diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile +index 996e670a6018..2bca736a7197 100644 +--- a/arch/arm64/boot/dts/broadcom/Makefile ++++ b/arch/arm64/boot/dts/broadcom/Makefile +@@ -7,6 +7,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-2-b.dtb + dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b.dtb + dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b-plus.dtb + dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-4-b.dtb ++dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-400.dtb + dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-cm3.dtb + dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-cm4.dtb + +diff --git a/arch/arm64/boot/dts/broadcom/bcm2711-rpi-400.dts b/arch/arm64/boot/dts/broadcom/bcm2711-rpi-400.dts +new file mode 100644 +index 000000000000..90c2b5a195d4 +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcm2711-rpi-400.dts +@@ -0,0 +1 @@ ++#include "../../../../arm/boot/dts/bcm2711-rpi-400.dts" +-- +2.18.4 + + +From 7f66107093081c32535047e25572540dc8615824 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 4 Nov 2020 11:25:02 +0000 +Subject: [PATCH 1170/1209] overlays: Deprecate and delete the sdtweak overlay + +The sdtweak overlay has been superseded by the board-specific +sd_* parameters such as sd_poll_once, sd_overclock etc. + +For example, replace: + + dtoverlay=sdtweak,poll_once + +with: + + dtparam=sd_poll_once + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/overlay_map.dts | 4 +++ + .../arm/boot/dts/overlays/sdtweak-overlay.dts | 25 ------------------- + 2 files changed, 4 insertions(+), 25 deletions(-) + delete mode 100644 arch/arm/boot/dts/overlays/sdtweak-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/overlay_map.dts b/arch/arm/boot/dts/overlays/overlay_map.dts +index 22b0ad1738ec..b2e6b41216b2 100644 +--- a/arch/arm/boot/dts/overlays/overlay_map.dts ++++ b/arch/arm/boot/dts/overlays/overlay_map.dts +@@ -61,6 +61,10 @@ + deprecated = "use sdio,bus_width=1,gpios_22_25"; + }; + ++ sdtweak { ++ deprecated = "use 'dtparam=sd_poll_once' etc."; ++ }; ++ + spi0-cs { + renamed = "spi0-2cs"; + }; +diff --git a/arch/arm/boot/dts/overlays/sdtweak-overlay.dts b/arch/arm/boot/dts/overlays/sdtweak-overlay.dts +deleted file mode 100644 +index 38157d2f9bf3..000000000000 +--- a/arch/arm/boot/dts/overlays/sdtweak-overlay.dts ++++ /dev/null +@@ -1,25 +0,0 @@ +-/dts-v1/; +-/plugin/; +- +-/* Provide backwards compatible aliases for the old sdhost dtparams. */ +- +-/{ +- compatible = "brcm,bcm2835"; +- +- fragment@0 { +- target = <&sdhost>; +- frag0: __overlay__ { +- brcm,overclock-50 = <0>; +- brcm,pio-limit = <1>; +- }; +- }; +- +- __overrides__ { +- overclock_50 = <&frag0>,"brcm,overclock-50:0"; +- force_pio = <&frag0>,"brcm,force-pio?"; +- pio_limit = <&frag0>,"brcm,pio-limit:0"; +- debug = <&frag0>,"brcm,debug?"; +- enable = <&frag0>,"status"; +- poll_once = <&frag0>,"non-removable?"; +- }; +-}; +-- +2.18.4 + + +From 11d2ef31f82c0ec612c6e978ade491545a576dff Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 5 Nov 2020 09:54:33 +0000 +Subject: [PATCH 1171/1209] overlays: Complete the sdtweak excision + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/Makefile | 1 - + arch/arm/boot/dts/overlays/README | 27 ++++----------------------- + 2 files changed, 4 insertions(+), 24 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 13342d83d02d..467cc0ae9194 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -159,7 +159,6 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ + sc16is752-spi1.dtbo \ + sdhost.dtbo \ + sdio.dtbo \ +- sdtweak.dtbo \ + sh1106-spi.dtbo \ + smi.dtbo \ + smi-dev.dtbo \ +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 2192cdfb27aa..dd33a27178b5 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -2407,29 +2407,10 @@ Load: + + + Name: sdtweak +-Info: Tunes the bcm2835-sdhost SD/MMC driver +- N.B. This functionality is now available via the sd_* dtparams in the +- base DTB. +-Load: dtoverlay=sdtweak,= +-Params: overclock_50 Clock (in MHz) to use when the MMC framework +- requests 50MHz +- +- force_pio Disable DMA support (default off) +- +- pio_limit Number of blocks above which to use DMA +- (default 1) +- +- debug Enable debug output (default off) +- +- poll_once Looks for a card once after booting. Useful +- for network booting scenarios to avoid the +- overhead of continuous polling. N.B. Using +- this option restricts the system to using a +- single card per boot (or none at all). +- (default off) +- +- enable Set to off to completely disable the interface +- (default on) ++Info: This overlay is now deprecated. Use the sd_* dtparams in the ++ base DTB, e.g. "dtoverlay=sdtweak,poll_once" becomes ++ "dtparam=sd_poll_once". ++Load: + + + Name: sh1106-spi +-- +2.18.4 + + +From 37e43ee5972bf6b121534aeb233c35df64952bb7 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 5 Nov 2020 11:39:35 +0000 +Subject: [PATCH 1172/1209] ARM: dts: bcm27xx: Remove enable_headphones setting + +The enable_headphones parameter of the snd_bcm2835 module is forced +to 1 if enable_compat_alsa is 0, so setting them both on the kernel +command line is pointless (and, in the case of Pi 400 and Pi Zeroes, +confusing). + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/bcm2708-rpi-zero-w.dts | 2 +- + arch/arm/boot/dts/bcm2708-rpi-zero.dts | 2 +- + arch/arm/boot/dts/bcm270x.dtsi | 2 +- + arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts | 2 +- + arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 2 +- + arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 2 +- + arch/arm/boot/dts/bcm2711-rpi-400.dts | 2 +- + arch/arm/boot/dts/bcm2711-rpi-cm4.dts | 2 +- + 8 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708-rpi-zero-w.dts b/arch/arm/boot/dts/bcm2708-rpi-zero-w.dts +index 80263a42aebf..188f56b3a7f5 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-zero-w.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-zero-w.dts +@@ -11,7 +11,7 @@ + model = "Raspberry Pi Zero W"; + + chosen { +- bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1"; ++ bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1"; + }; + + aliases { +diff --git a/arch/arm/boot/dts/bcm2708-rpi-zero.dts b/arch/arm/boot/dts/bcm2708-rpi-zero.dts +index 5b1332ace9b8..8d20064dddc4 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-zero.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-zero.dts +@@ -10,7 +10,7 @@ + model = "Raspberry Pi Zero"; + + chosen { +- bootargs = "coherent_pool=1M snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1"; ++ bootargs = "coherent_pool=1M snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1"; + }; + }; + +diff --git a/arch/arm/boot/dts/bcm270x.dtsi b/arch/arm/boot/dts/bcm270x.dtsi +index b74a9df1390e..c3a55a7a2deb 100644 +--- a/arch/arm/boot/dts/bcm270x.dtsi ++++ b/arch/arm/boot/dts/bcm270x.dtsi +@@ -3,7 +3,7 @@ + + / { + chosen { +- bootargs = "coherent_pool=1M snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1"; ++ bootargs = "coherent_pool=1M snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1"; + /delete-property/ stdout-path; + }; + +diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts +index 4e4e47100831..e7b7281d3c60 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts +@@ -12,7 +12,7 @@ + model = "Raspberry Pi 3 Model B+"; + + chosen { +- bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1"; ++ bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1"; + }; + + aliases { +diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +index 8989c00b03e5..d69d6a187e0c 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +@@ -12,7 +12,7 @@ + model = "Raspberry Pi 3 Model B"; + + chosen { +- bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1"; ++ bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1"; + }; + + aliases { +diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts +index 21b20e334b1a..b5daeee077ec 100644 +--- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts ++++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts +@@ -234,7 +234,7 @@ + + / { + chosen { +- bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1"; ++ bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1"; + }; + + aliases { +diff --git a/arch/arm/boot/dts/bcm2711-rpi-400.dts b/arch/arm/boot/dts/bcm2711-rpi-400.dts +index afd1ca215518..9454ce193ec5 100644 +--- a/arch/arm/boot/dts/bcm2711-rpi-400.dts ++++ b/arch/arm/boot/dts/bcm2711-rpi-400.dts +@@ -234,7 +234,7 @@ + + / { + chosen { +- bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1"; ++ bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1"; + }; + + aliases { +diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4.dts +index 3ff0be02cb34..a969000c0b89 100644 +--- a/arch/arm/boot/dts/bcm2711-rpi-cm4.dts ++++ b/arch/arm/boot/dts/bcm2711-rpi-cm4.dts +@@ -174,7 +174,7 @@ + + / { + chosen { +- bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1"; ++ bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1"; + }; + + aliases { +-- +2.18.4 + + +From 86f338a767f31634cd6a8a0ea487c63badc10219 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Wed, 4 Nov 2020 18:54:20 +0000 +Subject: [PATCH 1173/1209] staging: vcsm-cma: Fix memory leak from not + detaching dmabuf + +When importing there was a missing call to detach the buffer, +so each import leaked the sg table entry. + +Actually the release process for both locally allocated and +imported buffers is identical, so fix them to both use the same +function. + +Signed-off-by: Dave Stevenson +--- + .../staging/vc04_services/vc-sm-cma/vc_sm.c | 22 ++----------------- + 1 file changed, 2 insertions(+), 20 deletions(-) + +diff --git a/drivers/staging/vc04_services/vc-sm-cma/vc_sm.c b/drivers/staging/vc04_services/vc-sm-cma/vc_sm.c +index 8cbe2b3522c6..03685cb5c80f 100644 +--- a/drivers/staging/vc04_services/vc-sm-cma/vc_sm.c ++++ b/drivers/staging/vc04_services/vc-sm-cma/vc_sm.c +@@ -237,6 +237,7 @@ static void vc_sm_add_resource(struct vc_sm_privdata_t *privdata, + + /* + * Cleans up imported dmabuf. ++ * Should be called with mutex held. + */ + static void vc_sm_clean_up_dmabuf(struct vc_sm_buffer *buffer) + { +@@ -244,7 +245,6 @@ static void vc_sm_clean_up_dmabuf(struct vc_sm_buffer *buffer) + return; + + /* Handle cleaning up imported dmabufs */ +- mutex_lock(&buffer->lock); + if (buffer->import.sgt) { + dma_buf_unmap_attachment(buffer->import.attach, + buffer->import.sgt, +@@ -255,7 +255,6 @@ static void vc_sm_clean_up_dmabuf(struct vc_sm_buffer *buffer) + dma_buf_detach(buffer->dma_buf, buffer->import.attach); + buffer->import.attach = NULL; + } +- mutex_unlock(&buffer->lock); + } + + /* +@@ -686,23 +685,6 @@ int vc_sm_import_dmabuf_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma) + return buf->import.dma_buf->ops->mmap(buf->import.dma_buf, vma); + } + +-static +-void vc_sm_import_dma_buf_release(struct dma_buf *dmabuf) +-{ +- struct vc_sm_buffer *buf = dmabuf->priv; +- +- pr_debug("%s: Relasing dma_buf %p\n", __func__, dmabuf); +- mutex_lock(&buf->lock); +- if (!buf->imported) +- return; +- +- buf->in_use = 0; +- +- vc_sm_vpu_free(buf); +- +- vc_sm_release_resource(buf); +-} +- + static + void *vc_sm_import_dma_buf_kmap(struct dma_buf *dmabuf, + unsigned long offset) +@@ -753,7 +735,7 @@ static const struct dma_buf_ops dma_buf_import_ops = { + .map_dma_buf = vc_sm_import_map_dma_buf, + .unmap_dma_buf = vc_sm_import_unmap_dma_buf, + .mmap = vc_sm_import_dmabuf_mmap, +- .release = vc_sm_import_dma_buf_release, ++ .release = vc_sm_dma_buf_release, + .attach = vc_sm_import_dma_buf_attach, + .detach = vc_sm_import_dma_buf_detatch, + .begin_cpu_access = vc_sm_import_dma_buf_begin_cpu_access, +-- +2.18.4 + + +From 8bdb838756b19da27822c76978ce3086592011d3 Mon Sep 17 00:00:00 2001 +From: paul-1 <6473457+paul-1@users.noreply.github.com> +Date: Wed, 4 Nov 2020 19:11:37 -0500 +Subject: [PATCH 1174/1209] Update Allo Piano Dac Driver for 5.4.y kernels + +Add unique names to the individual dac coded drivers +Remove some of the codec controls that are not used. + +Signed-off-by: Paul Hermann +--- + sound/soc/bcm/allo-piano-dac-plus.c | 129 +++++++++++++++++++++------- + 1 file changed, 97 insertions(+), 32 deletions(-) + +diff --git a/sound/soc/bcm/allo-piano-dac-plus.c b/sound/soc/bcm/allo-piano-dac-plus.c +index e910d4a4546d..d323f24e7d9a 100644 +--- a/sound/soc/bcm/allo-piano-dac-plus.c ++++ b/sound/soc/bcm/allo-piano-dac-plus.c +@@ -2,7 +2,8 @@ + * ALSA ASoC Machine Driver for Allo Piano DAC Plus Subwoofer + * + * Author: Baswaraj K +- * Copyright 2016 ++ * Copyright 2020 ++ * based on code by David Knell + * based on code by Florian Meier + * +@@ -276,8 +277,15 @@ static int snd_allo_piano_dual_mode_put(struct snd_kcontrol *kcontrol, + PCM512x_DIGITAL_VOLUME_2, 0xff); + + list_for_each_entry(kctl, &snd_card_ptr->controls, list) { +- if (!strncmp(kctl->id.name, "Digital Playback Volume", +- sizeof(kctl->id.name))) { ++ if (!strncmp(kctl->id.name, "Main Digital Playback Volume", ++ sizeof(kctl->id.name))) { ++ mc = (struct soc_mixer_control *) ++ kctl->private_value; ++ mc->rreg = mc->reg; ++ break; ++ } ++ if (!strncmp(kctl->id.name, "Sub Digital Playback Volume", ++ sizeof(kctl->id.name))) { + mc = (struct soc_mixer_control *) + kctl->private_value; + mc->rreg = mc->reg; +@@ -291,13 +299,20 @@ static int snd_allo_piano_dual_mode_put(struct snd_kcontrol *kcontrol, + PCM512x_DIGITAL_VOLUME_3, &right_val); + + list_for_each_entry(kctl, &snd_card_ptr->controls, list) { +- if (!strncmp(kctl->id.name, "Digital Playback Volume", +- sizeof(kctl->id.name))) { ++ if (!strncmp(kctl->id.name, "Main Digital Playback Volume", ++ sizeof(kctl->id.name))) { + mc = (struct soc_mixer_control *) + kctl->private_value; + mc->rreg = PCM512x_DIGITAL_VOLUME_3; + break; + } ++ if (!strncmp(kctl->id.name, "Sub Digital Playback Volume", ++ sizeof(kctl->id.name))) { ++ mc = (struct soc_mixer_control *) ++ kctl->private_value; ++ mc->rreg = PCM512x_DIGITAL_VOLUME_2; ++ break; ++ } + } + + snd_soc_component_write(rtd->codec_dais[0]->component, +@@ -344,13 +359,20 @@ static int snd_allo_piano_mode_put(struct snd_kcontrol *kcontrol, + PCM512x_DIGITAL_VOLUME_2, &right_val); + + list_for_each_entry(kctl, &snd_card_ptr->controls, list) { +- if (!strncmp(kctl->id.name, "Digital Playback Volume", +- sizeof(kctl->id.name))) { ++ if (!strncmp(kctl->id.name, "Main Digital Playback Volume", ++ sizeof(kctl->id.name))) { + mc = (struct soc_mixer_control *) + kctl->private_value; + mc->rreg = PCM512x_DIGITAL_VOLUME_3; + break; + } ++ if (!strncmp(kctl->id.name, "Sub Digital Playback Volume", ++ sizeof(kctl->id.name))) { ++ mc = (struct soc_mixer_control *) ++ kctl->private_value; ++ mc->rreg = PCM512x_DIGITAL_VOLUME_2; ++ break; ++ } + } + snd_soc_component_write(rtd->codec_dais[0]->component, + PCM512x_DIGITAL_VOLUME_3, left_val); +@@ -434,12 +456,6 @@ static int pcm512x_set_reg_sub(struct snd_kcontrol *kcontrol, + int ret = 0; + + rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); +- if (glb_ptr->dual_mode != 1) { +- ret = snd_soc_component_write(rtd->codec_dais[1]->component, +- PCM512x_DIGITAL_VOLUME_2, (~left_val)); +- if (ret < 0) +- return ret; +- } + + if (digital_gain_0db_limit) { + ret = snd_soc_limit_volume(card, "Subwoofer Playback Volume", +@@ -449,6 +465,13 @@ static int pcm512x_set_reg_sub(struct snd_kcontrol *kcontrol, + ret); + } + ++ if (glb_ptr->dual_mode != 1) { ++ ret = snd_soc_component_write(rtd->codec_dais[1]->component, ++ PCM512x_DIGITAL_VOLUME_2, (~left_val)); ++ if (ret < 0) ++ return ret; ++ } ++ + ret = snd_soc_component_write(rtd->codec_dais[1]->component, + PCM512x_DIGITAL_VOLUME_3, (~right_val)); + if (ret < 0) +@@ -674,7 +697,7 @@ static const struct snd_kcontrol_new allo_piano_controls[] = { + + SOC_DOUBLE_R_EXT_TLV("Subwoofer Playback Volume", + PCM512x_DIGITAL_VOLUME_2, +- PCM512x_DIGITAL_VOLUME_3, 0, 255, 1, ++ PCM512x_DIGITAL_VOLUME_3, 0, 207, 1, + pcm512x_get_reg_sub, + pcm512x_set_reg_sub, + digital_tlv_sub), +@@ -688,7 +711,7 @@ static const struct snd_kcontrol_new allo_piano_controls[] = { + + SOC_DOUBLE_R_EXT_TLV("Master Playback Volume", + PCM512x_DIGITAL_VOLUME_2, +- PCM512x_DIGITAL_VOLUME_3, 0, 255, 1, ++ PCM512x_DIGITAL_VOLUME_3, 0, 207, 1, + pcm512x_get_reg_master, + pcm512x_set_reg_master, + digital_tlv_master), +@@ -701,10 +724,28 @@ static const struct snd_kcontrol_new allo_piano_controls[] = { + pcm512x_set_reg_master_switch), + }; + ++static const char * const codec_ctl_pfx[] = { "Main", "Sub" }; ++static const char * const codec_ctl_name[] = { ++ "Digital Playback Volume", ++ "Digital Playback Switch", ++ "Auto Mute Mono Switch", ++ "Auto Mute Switch", ++ "Auto Mute Time Left", ++ "Auto Mute Time Right", ++ "Clock Missing Period", ++ "Max Overclock DAC", ++ "Max Overclock DSP", ++ "Max Overclock PLL", ++ "Volume Ramp Down Emergency Rate", ++ "Volume Ramp Down Emergency Step" ++}; ++ + static int snd_allo_piano_dac_init(struct snd_soc_pcm_runtime *rtd) + { + struct snd_soc_card *card = rtd->card; + struct glb_pool *glb_ptr; ++ struct snd_kcontrol *kctl; ++ int i, j; + + glb_ptr = kzalloc(sizeof(struct glb_pool), GFP_KERNEL); + if (!glb_ptr) +@@ -719,12 +760,37 @@ static int snd_allo_piano_dac_init(struct snd_soc_pcm_runtime *rtd) + if (digital_gain_0db_limit) { + int ret; + +- ret = snd_soc_limit_volume(card, "Digital Playback Volume", +- 207); +- if (ret < 0) +- dev_warn(card->dev, "Failed to set volume limit: %d\n", +- ret); ++ //Set volume limit on both dacs ++ for (i = 0; i < ARRAY_SIZE(codec_ctl_pfx); i++) { ++ char cname[256]; ++ ++ sprintf(cname, "%s %s", codec_ctl_pfx[i], codec_ctl_name[0]); ++ ret = snd_soc_limit_volume(card, cname, 207); ++ if (ret < 0) ++ dev_warn(card->dev, "Failed to set volume limit: %d\n", ++ ret); ++ } ++ } ++ ++ // Remove codec controls ++ for (i = 0; i < ARRAY_SIZE(codec_ctl_pfx); i++) { ++ // Start at 1, leave the Digital Volume control. ++ for (j = 1; j < ARRAY_SIZE(codec_ctl_name); j++) { ++ char cname[256]; ++ ++ sprintf(cname, "%s %s", codec_ctl_pfx[i], codec_ctl_name[j]); ++ kctl = snd_soc_card_get_kcontrol(card, cname); ++ if (!kctl) { ++ dev_err(rtd->card->dev, "Control %s not found\n", ++ cname); ++ } else { ++ kctl->vd[0].access = ++ SNDRV_CTL_ELEM_ACCESS_READWRITE; ++ snd_ctl_remove(card->snd_card, kctl); ++ } ++ } + } ++ + return 0; + } + +@@ -868,10 +934,10 @@ static struct snd_soc_dai_link_component allo_piano_2_1_codecs[] = { + }; + + SND_SOC_DAILINK_DEFS(allo_piano_dai_plus, +- DAILINK_COMP_ARRAY(COMP_CPU("bcm2708-i2s.0")), +- DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "pcm512x-hifi"), +- COMP_CODEC(NULL, "pcm512x-hifi")), +- DAILINK_COMP_ARRAY(COMP_PLATFORM("bcm2708-i2s.0"))); ++ DAILINK_COMP_ARRAY(COMP_EMPTY()), ++ DAILINK_COMP_ARRAY(COMP_CODEC("pcm512x.1-004c", "pcm512x-hifi"), ++ COMP_CODEC("pcm512x.1-004d", "pcm512x-hifi")), ++ DAILINK_COMP_ARRAY(COMP_EMPTY())); + + static struct snd_soc_dai_link snd_allo_piano_dac_dai[] = { + { +@@ -964,17 +1030,16 @@ static int snd_allo_piano_dac_probe(struct platform_device *pdev) + snd_allo_piano_dac.set_bias_level = + snd_allo_piano_set_bias_level; + +- ret = snd_soc_register_card(&snd_allo_piano_dac); +- if (ret < 0) { +- dev_err(&pdev->dev, +- "snd_soc_register_card() failed: %d\n", ret); +- return ret; +- } +- + if ((mute_gpio[0]) && (mute_gpio[1])) + snd_allo_piano_gpio_mute(&snd_allo_piano_dac); + +- return 0; ++ ret = devm_snd_soc_register_card(&pdev->dev, &snd_allo_piano_dac); ++ ++ if (ret && ret != -EPROBE_DEFER) ++ dev_err(&pdev->dev, ++ "snd_soc_register_card() failed: %d\n", ret); ++ return ret; ++ + } + + return -EINVAL; +-- +2.18.4 + + +From ffedaaf352aa878953047ad8009e4c149a019523 Mon Sep 17 00:00:00 2001 +From: paul-1 <6473457+paul-1@users.noreply.github.com> +Date: Wed, 4 Nov 2020 19:17:48 -0500 +Subject: [PATCH 1175/1209] Overlay: Update Allo Piano Plus dac driver for + 5.4.y kernels. + +Create unique names for the two instances of the codec driver. + +Signed-off-by: Paul Hermann +--- + .../dts/overlays/allo-piano-dac-plus-pcm512x-audio-overlay.dts | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/arm/boot/dts/overlays/allo-piano-dac-plus-pcm512x-audio-overlay.dts b/arch/arm/boot/dts/overlays/allo-piano-dac-plus-pcm512x-audio-overlay.dts +index 374c553db062..d47a35def4f7 100644 +--- a/arch/arm/boot/dts/overlays/allo-piano-dac-plus-pcm512x-audio-overlay.dts ++++ b/arch/arm/boot/dts/overlays/allo-piano-dac-plus-pcm512x-audio-overlay.dts +@@ -23,12 +23,14 @@ + #sound-dai-cells = <0>; + compatible = "ti,pcm5122"; + reg = <0x4c>; ++ sound-name-prefix = "Main"; + status = "okay"; + }; + allo_pcm5122_4d: pcm5122@4d { + #sound-dai-cells = <0>; + compatible = "ti,pcm5122"; + reg = <0x4d>; ++ sound-name-prefix = "Sub"; + status = "okay"; + }; + }; +-- +2.18.4 + + +From e586f5d36d24e1f4b10b4b5f5219aaac94891002 Mon Sep 17 00:00:00 2001 +From: paul-1 <6473457+paul-1@users.noreply.github.com> +Date: Sat, 7 Nov 2020 12:01:44 -0500 +Subject: [PATCH 1176/1209] Update volume controls in Allo Piano Dac Plus + +Put control scaling back to 255. +Clean up what master/sub volume controls set in codec. +Remove more unneeded mixer controls. + +Signed-off-by: Paul Hermann +--- + sound/soc/bcm/allo-piano-dac-plus.c | 56 +++++++++++++++++------------ + 1 file changed, 33 insertions(+), 23 deletions(-) + +diff --git a/sound/soc/bcm/allo-piano-dac-plus.c b/sound/soc/bcm/allo-piano-dac-plus.c +index d323f24e7d9a..245c3fc47736 100644 +--- a/sound/soc/bcm/allo-piano-dac-plus.c ++++ b/sound/soc/bcm/allo-piano-dac-plus.c +@@ -420,6 +420,7 @@ static int pcm512x_get_reg_sub(struct snd_kcontrol *kcontrol, + unsigned int right_val = 0; + int ret; + rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); ++ + ret = snd_soc_component_read(rtd->codec_dais[1]->component, + PCM512x_DIGITAL_VOLUME_3, &right_val); + if (ret < 0) +@@ -465,17 +466,20 @@ static int pcm512x_set_reg_sub(struct snd_kcontrol *kcontrol, + ret); + } + +- if (glb_ptr->dual_mode != 1) { ++ // When in Dual Mono, Sub vol control should not set anything. ++ if (glb_ptr->dual_mode != 1) { //Not in Dual Mono mode ++ + ret = snd_soc_component_write(rtd->codec_dais[1]->component, + PCM512x_DIGITAL_VOLUME_2, (~left_val)); + if (ret < 0) + return ret; +- } + +- ret = snd_soc_component_write(rtd->codec_dais[1]->component, +- PCM512x_DIGITAL_VOLUME_3, (~right_val)); +- if (ret < 0) +- return ret; ++ ret = snd_soc_component_write(rtd->codec_dais[1]->component, ++ PCM512x_DIGITAL_VOLUME_3, (~right_val)); ++ if (ret < 0) ++ return ret; ++ ++ } + + return 1; + } +@@ -540,7 +544,7 @@ static int pcm512x_get_reg_master(struct snd_kcontrol *kcontrol, + if ( ret < 0) + return ret; + +- if (glb_ptr->dual_mode == 1) { ++ if (glb_ptr->dual_mode == 1) { // in Dual Mono mode + ret = snd_soc_component_read(rtd->codec_dais[1]->component, + PCM512x_DIGITAL_VOLUME_3, &right_val); + if (ret < 0) +@@ -582,8 +586,21 @@ static int pcm512x_set_reg_master(struct snd_kcontrol *kcontrol, + ret); + } + +- if (glb_ptr->dual_mode != 1) { ++ if (glb_ptr->dual_mode == 1) { //in Dual Mono Mode ++ ++ ret = snd_soc_component_write(rtd->codec_dais[0]->component, ++ PCM512x_DIGITAL_VOLUME_2, (~left_val)); ++ if (ret < 0) ++ return ret; ++ + ret = snd_soc_component_write(rtd->codec_dais[1]->component, ++ PCM512x_DIGITAL_VOLUME_3, (~right_val)); ++ if (ret < 0) ++ return ret; ++ ++ } else { ++ ++ ret = snd_soc_component_write(rtd->codec_dais[0]->component, + PCM512x_DIGITAL_VOLUME_2, (~left_val)); + if (ret < 0) + return ret; +@@ -594,16 +611,6 @@ static int pcm512x_set_reg_master(struct snd_kcontrol *kcontrol, + return ret; + + } +- +- ret = snd_soc_component_write(rtd->codec_dais[1]->component, +- PCM512x_DIGITAL_VOLUME_3, (~right_val)); +- if (ret < 0) +- return ret; +- +- ret = snd_soc_component_write(rtd->codec_dais[0]->component, +- PCM512x_DIGITAL_VOLUME_2, (~left_val)); +- if (ret < 0) +- return ret; + return 1; + } + +@@ -697,7 +704,7 @@ static const struct snd_kcontrol_new allo_piano_controls[] = { + + SOC_DOUBLE_R_EXT_TLV("Subwoofer Playback Volume", + PCM512x_DIGITAL_VOLUME_2, +- PCM512x_DIGITAL_VOLUME_3, 0, 207, 1, ++ PCM512x_DIGITAL_VOLUME_3, 0, 255, 1, + pcm512x_get_reg_sub, + pcm512x_set_reg_sub, + digital_tlv_sub), +@@ -711,7 +718,7 @@ static const struct snd_kcontrol_new allo_piano_controls[] = { + + SOC_DOUBLE_R_EXT_TLV("Master Playback Volume", + PCM512x_DIGITAL_VOLUME_2, +- PCM512x_DIGITAL_VOLUME_3, 0, 207, 1, ++ PCM512x_DIGITAL_VOLUME_3, 0, 255, 1, + pcm512x_get_reg_master, + pcm512x_set_reg_master, + digital_tlv_master), +@@ -737,7 +744,11 @@ static const char * const codec_ctl_name[] = { + "Max Overclock DSP", + "Max Overclock PLL", + "Volume Ramp Down Emergency Rate", +- "Volume Ramp Down Emergency Step" ++ "Volume Ramp Down Emergency Step", ++ "Volume Ramp Up Rate", ++ "Volume Ramp Down Rate", ++ "Volume Ramp Up Step", ++ "Volume Ramp Down Step" + }; + + static int snd_allo_piano_dac_init(struct snd_soc_pcm_runtime *rtd) +@@ -774,8 +785,7 @@ static int snd_allo_piano_dac_init(struct snd_soc_pcm_runtime *rtd) + + // Remove codec controls + for (i = 0; i < ARRAY_SIZE(codec_ctl_pfx); i++) { +- // Start at 1, leave the Digital Volume control. +- for (j = 1; j < ARRAY_SIZE(codec_ctl_name); j++) { ++ for (j = 0; j < ARRAY_SIZE(codec_ctl_name); j++) { + char cname[256]; + + sprintf(cname, "%s %s", codec_ctl_pfx[i], codec_ctl_name[j]); +-- +2.18.4 + + +From 54ad8c600ef13d4e3ecce4315251b085fa332f93 Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde +Date: Wed, 16 Sep 2020 00:35:22 +0200 +Subject: [PATCH 1177/1209] can: rx-offload: can_rx_offload_add_manual(): add + new initialization function + +This patch adds a new initialization function: +can_rx_offload_add_manual() + +It should be used to add support rx-offload to a driver, if the callback +mechanism should not be used. Use e.g. can_rx_offload_queue_sorted() to queue +skbs into rx-offload. + +Link: https://lore.kernel.org/r/20200915223527.1417033-33-mkl@pengutronix.de +Signed-off-by: Marc Kleine-Budde +(cherry picked from commit 728fc9ff73d3f25220f6b8a52aaf063ec51ef294) +Signed-off-by: Marc Kleine-Budde +--- + drivers/net/can/rx-offload.c | 11 +++++++++++ + include/linux/can/rx-offload.h | 3 +++ + 2 files changed, 14 insertions(+) + +diff --git a/drivers/net/can/rx-offload.c b/drivers/net/can/rx-offload.c +index 7e75a87a8a6a..fa65e0a4b7a0 100644 +--- a/drivers/net/can/rx-offload.c ++++ b/drivers/net/can/rx-offload.c +@@ -375,6 +375,17 @@ int can_rx_offload_add_fifo(struct net_device *dev, struct can_rx_offload *offlo + } + EXPORT_SYMBOL_GPL(can_rx_offload_add_fifo); + ++int can_rx_offload_add_manual(struct net_device *dev, ++ struct can_rx_offload *offload, ++ unsigned int weight) ++{ ++ if (offload->mailbox_read) ++ return -EINVAL; ++ ++ return can_rx_offload_init_queue(dev, offload, weight); ++} ++EXPORT_SYMBOL_GPL(can_rx_offload_add_manual); ++ + void can_rx_offload_enable(struct can_rx_offload *offload) + { + can_rx_offload_reset(offload); +diff --git a/include/linux/can/rx-offload.h b/include/linux/can/rx-offload.h +index 01219f2902bf..eac8f11413f0 100644 +--- a/include/linux/can/rx-offload.h ++++ b/include/linux/can/rx-offload.h +@@ -35,6 +35,9 @@ int can_rx_offload_add_timestamp(struct net_device *dev, + int can_rx_offload_add_fifo(struct net_device *dev, + struct can_rx_offload *offload, + unsigned int weight); ++int can_rx_offload_add_manual(struct net_device *dev, ++ struct can_rx_offload *offload, ++ unsigned int weight); + int can_rx_offload_irq_offload_timestamp(struct can_rx_offload *offload, + u64 reg); + int can_rx_offload_irq_offload_fifo(struct can_rx_offload *offload); +-- +2.18.4 + + +From a6f05c37fd7e8d2ff9d4b3a5311103010ad52881 Mon Sep 17 00:00:00 2001 +From: Oleksij Rempel +Date: Fri, 18 Sep 2020 19:25:31 +0200 +Subject: [PATCH 1178/1209] dt-binding: can: mcp25xxfd: document device tree + bindings + +This patch adds the device-tree binding documentation for the Microchip +MCP25xxFD SPI CAN controller family. + +Signed-off-by: Oleksij Rempel +Signed-off-by: Marc Kleine-Budde +Link: https://lore.kernel.org/r/20200918172536.2074504-2-mkl@pengutronix.de +(cherry picked from commit 1b5a78e69c1fdae9aa8a62c45acb820639ccad87) +Signed-off-by: Marc Kleine-Budde +--- + .../bindings/net/can/microchip,mcp25xxfd.yaml | 79 +++++++++++++++++++ + 1 file changed, 79 insertions(+) + create mode 100644 Documentation/devicetree/bindings/net/can/microchip,mcp25xxfd.yaml + +diff --git a/Documentation/devicetree/bindings/net/can/microchip,mcp25xxfd.yaml b/Documentation/devicetree/bindings/net/can/microchip,mcp25xxfd.yaml +new file mode 100644 +index 000000000000..aa2cad14d6d7 +--- /dev/null ++++ b/Documentation/devicetree/bindings/net/can/microchip,mcp25xxfd.yaml +@@ -0,0 +1,79 @@ ++# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) ++%YAML 1.2 ++--- ++$id: http://devicetree.org/schemas/net/can/microchip,mcp25xxfd.yaml# ++$schema: http://devicetree.org/meta-schemas/core.yaml# ++ ++title: ++ Microchip MCP2517FD and MCP2518FD stand-alone CAN controller device tree ++ bindings ++ ++maintainers: ++ - Marc Kleine-Budde ++ ++properties: ++ compatible: ++ oneOf: ++ - const: microchip,mcp2517fd ++ description: for MCP2517FD ++ - const: microchip,mcp2518fd ++ description: for MCP2518FD ++ - const: microchip,mcp25xxfd ++ description: to autodetect chip variant ++ ++ reg: ++ maxItems: 1 ++ ++ interrupts-extended: ++ maxItems: 1 ++ ++ clocks: ++ maxItems: 1 ++ ++ vdd-supply: ++ description: Regulator that powers the CAN controller. ++ maxItems: 1 ++ ++ xceiver-supply: ++ description: Regulator that powers the CAN transceiver. ++ maxItems: 1 ++ ++ microchip,rx-int-gpios: ++ description: ++ GPIO phandle of GPIO connected to to INT1 pin of the MCP25XXFD, which ++ signals a pending RX interrupt. ++ maxItems: 1 ++ ++ spi-max-frequency: ++ description: ++ Must be half or less of "clocks" frequency. ++ maximum: 20000000 ++ ++required: ++ - compatible ++ - reg ++ - interrupts-extended ++ - clocks ++ ++examples: ++ - | ++ #include ++ #include ++ ++ spi0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ can@0 { ++ compatible = "microchip,mcp25xxfd"; ++ reg = <0>; ++ clocks = <&can0_osc>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&can0_pins>; ++ spi-max-frequency = <20000000>; ++ interrupts-extended = <&gpio 13 IRQ_TYPE_LEVEL_LOW>; ++ microchip,rx-int-gpios = <&gpio 27 GPIO_ACTIVE_LOW>; ++ vdd-supply = <®5v0>; ++ xceiver-supply = <®5v0>; ++ }; ++ }; +-- +2.18.4 + + +From 29e7831b1ab32f2b2fbdb67fa53e9d316cceaf1a Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde +Date: Fri, 18 Sep 2020 19:25:32 +0200 +Subject: [PATCH 1179/1209] can: mcp25xxfd: add regmap infrastructure + +This patch adds the regmap infrastructure for the Microchip MCP25xxFD SPI CAN +controller family. The actual driver is added in the next commit. + +Tested-by: Kurt Van Dijck +Tested-by: Manivannan Sadhasivam +Signed-off-by: Marc Kleine-Budde +Link: https://lore.kernel.org/r/20200918172536.2074504-3-mkl@pengutronix.de +(cherry picked from commit 875347fe57563693b29cafe24fdee72f0faf6434) +Signed-off-by: Marc Kleine-Budde +--- + drivers/net/can/spi/Kconfig | 2 + + drivers/net/can/spi/Makefile | 1 + + drivers/net/can/spi/mcp25xxfd/Kconfig | 17 + + drivers/net/can/spi/mcp25xxfd/Makefile | 7 + + .../net/can/spi/mcp25xxfd/mcp25xxfd-crc16.c | 89 ++ + .../net/can/spi/mcp25xxfd/mcp25xxfd-regmap.c | 556 ++++++++++++ + drivers/net/can/spi/mcp25xxfd/mcp25xxfd.h | 835 ++++++++++++++++++ + 7 files changed, 1507 insertions(+) + create mode 100644 drivers/net/can/spi/mcp25xxfd/Kconfig + create mode 100644 drivers/net/can/spi/mcp25xxfd/Makefile + create mode 100644 drivers/net/can/spi/mcp25xxfd/mcp25xxfd-crc16.c + create mode 100644 drivers/net/can/spi/mcp25xxfd/mcp25xxfd-regmap.c + create mode 100644 drivers/net/can/spi/mcp25xxfd/mcp25xxfd.h + +diff --git a/drivers/net/can/spi/Kconfig b/drivers/net/can/spi/Kconfig +index 1c50788055cb..d4b68eb5d386 100644 +--- a/drivers/net/can/spi/Kconfig ++++ b/drivers/net/can/spi/Kconfig +@@ -15,4 +15,6 @@ config CAN_MCP251X + Driver for the Microchip MCP251x and MCP25625 SPI CAN + controllers. + ++source "drivers/net/can/spi/mcp25xxfd/Kconfig" ++ + endmenu +diff --git a/drivers/net/can/spi/Makefile b/drivers/net/can/spi/Makefile +index f115b2c46623..20c18ac96b1c 100644 +--- a/drivers/net/can/spi/Makefile ++++ b/drivers/net/can/spi/Makefile +@@ -6,3 +6,4 @@ + + obj-$(CONFIG_CAN_HI311X) += hi311x.o + obj-$(CONFIG_CAN_MCP251X) += mcp251x.o ++obj-y += mcp25xxfd/ +diff --git a/drivers/net/can/spi/mcp25xxfd/Kconfig b/drivers/net/can/spi/mcp25xxfd/Kconfig +new file mode 100644 +index 000000000000..9eb596019a58 +--- /dev/null ++++ b/drivers/net/can/spi/mcp25xxfd/Kconfig +@@ -0,0 +1,17 @@ ++# SPDX-License-Identifier: GPL-2.0-only ++ ++config CAN_MCP25XXFD ++ tristate "Microchip MCP25xxFD SPI CAN controllers" ++ select REGMAP ++ help ++ Driver for the Microchip MCP25XXFD SPI FD-CAN controller ++ family. ++ ++config CAN_MCP25XXFD_SANITY ++ depends on CAN_MCP25XXFD ++ bool "Additional Sanity Checks" ++ help ++ This option enables additional sanity checks in the driver, ++ that compares various internal counters with the in chip ++ variants. This comes with a runtime overhead. ++ Disable if unsure. +diff --git a/drivers/net/can/spi/mcp25xxfd/Makefile b/drivers/net/can/spi/mcp25xxfd/Makefile +new file mode 100644 +index 000000000000..9dadf0070b42 +--- /dev/null ++++ b/drivers/net/can/spi/mcp25xxfd/Makefile +@@ -0,0 +1,7 @@ ++# SPDX-License-Identifier: GPL-2.0-only ++ ++obj-$(CONFIG_CAN_MCP25XXFD) += mcp25xxfd.o ++ ++mcp25xxfd-objs := ++mcp25xxfd-objs += mcp25xxfd-crc16.o ++mcp25xxfd-objs += mcp25xxfd-regmap.o +diff --git a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-crc16.c b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-crc16.c +new file mode 100644 +index 000000000000..79d09aaebf33 +--- /dev/null ++++ b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-crc16.c +@@ -0,0 +1,89 @@ ++// SPDX-License-Identifier: GPL-2.0 ++// ++// mcp25xxfd - Microchip MCP25xxFD Family CAN controller driver ++// ++// Copyright (c) 2020 Pengutronix, ++// Marc Kleine-Budde ++// ++// Based on: ++// ++// CAN bus driver for Microchip 25XXFD CAN Controller with SPI Interface ++// ++// Copyright (c) 2019 Martin Sperl ++// ++ ++#include "mcp25xxfd.h" ++ ++/* The standard crc16 in linux/crc16.h is unfortunately not computing ++ * the correct results (left shift vs. right shift). So here an ++ * implementation with a table generated with the help of: ++ * ++ * http://lkml.iu.edu/hypermail/linux/kernel/0508.1/1085.html ++ */ ++static const u16 mcp25xxfd_crc16_table[] = { ++ 0x0000, 0x8005, 0x800f, 0x000a, 0x801b, 0x001e, 0x0014, 0x8011, ++ 0x8033, 0x0036, 0x003c, 0x8039, 0x0028, 0x802d, 0x8027, 0x0022, ++ 0x8063, 0x0066, 0x006c, 0x8069, 0x0078, 0x807d, 0x8077, 0x0072, ++ 0x0050, 0x8055, 0x805f, 0x005a, 0x804b, 0x004e, 0x0044, 0x8041, ++ 0x80c3, 0x00c6, 0x00cc, 0x80c9, 0x00d8, 0x80dd, 0x80d7, 0x00d2, ++ 0x00f0, 0x80f5, 0x80ff, 0x00fa, 0x80eb, 0x00ee, 0x00e4, 0x80e1, ++ 0x00a0, 0x80a5, 0x80af, 0x00aa, 0x80bb, 0x00be, 0x00b4, 0x80b1, ++ 0x8093, 0x0096, 0x009c, 0x8099, 0x0088, 0x808d, 0x8087, 0x0082, ++ 0x8183, 0x0186, 0x018c, 0x8189, 0x0198, 0x819d, 0x8197, 0x0192, ++ 0x01b0, 0x81b5, 0x81bf, 0x01ba, 0x81ab, 0x01ae, 0x01a4, 0x81a1, ++ 0x01e0, 0x81e5, 0x81ef, 0x01ea, 0x81fb, 0x01fe, 0x01f4, 0x81f1, ++ 0x81d3, 0x01d6, 0x01dc, 0x81d9, 0x01c8, 0x81cd, 0x81c7, 0x01c2, ++ 0x0140, 0x8145, 0x814f, 0x014a, 0x815b, 0x015e, 0x0154, 0x8151, ++ 0x8173, 0x0176, 0x017c, 0x8179, 0x0168, 0x816d, 0x8167, 0x0162, ++ 0x8123, 0x0126, 0x012c, 0x8129, 0x0138, 0x813d, 0x8137, 0x0132, ++ 0x0110, 0x8115, 0x811f, 0x011a, 0x810b, 0x010e, 0x0104, 0x8101, ++ 0x8303, 0x0306, 0x030c, 0x8309, 0x0318, 0x831d, 0x8317, 0x0312, ++ 0x0330, 0x8335, 0x833f, 0x033a, 0x832b, 0x032e, 0x0324, 0x8321, ++ 0x0360, 0x8365, 0x836f, 0x036a, 0x837b, 0x037e, 0x0374, 0x8371, ++ 0x8353, 0x0356, 0x035c, 0x8359, 0x0348, 0x834d, 0x8347, 0x0342, ++ 0x03c0, 0x83c5, 0x83cf, 0x03ca, 0x83db, 0x03de, 0x03d4, 0x83d1, ++ 0x83f3, 0x03f6, 0x03fc, 0x83f9, 0x03e8, 0x83ed, 0x83e7, 0x03e2, ++ 0x83a3, 0x03a6, 0x03ac, 0x83a9, 0x03b8, 0x83bd, 0x83b7, 0x03b2, ++ 0x0390, 0x8395, 0x839f, 0x039a, 0x838b, 0x038e, 0x0384, 0x8381, ++ 0x0280, 0x8285, 0x828f, 0x028a, 0x829b, 0x029e, 0x0294, 0x8291, ++ 0x82b3, 0x02b6, 0x02bc, 0x82b9, 0x02a8, 0x82ad, 0x82a7, 0x02a2, ++ 0x82e3, 0x02e6, 0x02ec, 0x82e9, 0x02f8, 0x82fd, 0x82f7, 0x02f2, ++ 0x02d0, 0x82d5, 0x82df, 0x02da, 0x82cb, 0x02ce, 0x02c4, 0x82c1, ++ 0x8243, 0x0246, 0x024c, 0x8249, 0x0258, 0x825d, 0x8257, 0x0252, ++ 0x0270, 0x8275, 0x827f, 0x027a, 0x826b, 0x026e, 0x0264, 0x8261, ++ 0x0220, 0x8225, 0x822f, 0x022a, 0x823b, 0x023e, 0x0234, 0x8231, ++ 0x8213, 0x0216, 0x021c, 0x8219, 0x0208, 0x820d, 0x8207, 0x0202 ++}; ++ ++static inline u16 mcp25xxfd_crc16_byte(u16 crc, const u8 data) ++{ ++ u8 index = (crc >> 8) ^ data; ++ ++ return (crc << 8) ^ mcp25xxfd_crc16_table[index]; ++} ++ ++static u16 mcp25xxfd_crc16(u16 crc, u8 const *buffer, size_t len) ++{ ++ while (len--) ++ crc = mcp25xxfd_crc16_byte(crc, *buffer++); ++ ++ return crc; ++} ++ ++u16 mcp25xxfd_crc16_compute(const void *data, size_t data_size) ++{ ++ u16 crc = 0xffff; ++ ++ return mcp25xxfd_crc16(crc, data, data_size); ++} ++ ++u16 mcp25xxfd_crc16_compute2(const void *cmd, size_t cmd_size, ++ const void *data, size_t data_size) ++{ ++ u16 crc; ++ ++ crc = mcp25xxfd_crc16_compute(cmd, cmd_size); ++ crc = mcp25xxfd_crc16(crc, data, data_size); ++ ++ return crc; ++} +diff --git a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-regmap.c b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-regmap.c +new file mode 100644 +index 000000000000..376649c7e443 +--- /dev/null ++++ b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-regmap.c +@@ -0,0 +1,556 @@ ++// SPDX-License-Identifier: GPL-2.0 ++// ++// mcp25xxfd - Microchip MCP25xxFD Family CAN controller driver ++// ++// Copyright (c) 2019, 2020 Pengutronix, ++// Marc Kleine-Budde ++// ++ ++#include "mcp25xxfd.h" ++ ++#include ++ ++static const struct regmap_config mcp25xxfd_regmap_crc; ++ ++static int ++mcp25xxfd_regmap_nocrc_write(void *context, const void *data, size_t count) ++{ ++ struct spi_device *spi = context; ++ ++ return spi_write(spi, data, count); ++} ++ ++static int ++mcp25xxfd_regmap_nocrc_gather_write(void *context, ++ const void *reg, size_t reg_len, ++ const void *val, size_t val_len) ++{ ++ struct spi_device *spi = context; ++ struct mcp25xxfd_priv *priv = spi_get_drvdata(spi); ++ struct mcp25xxfd_map_buf_nocrc *buf_tx = priv->map_buf_nocrc_tx; ++ struct spi_transfer xfer[] = { ++ { ++ .tx_buf = buf_tx, ++ .len = sizeof(buf_tx->cmd) + val_len, ++ }, ++ }; ++ ++ BUILD_BUG_ON(sizeof(buf_tx->cmd) != sizeof(__be16)); ++ ++ if (IS_ENABLED(CONFIG_CAN_MCP25XXFD_SANITY) && ++ reg_len != sizeof(buf_tx->cmd.cmd)) ++ return -EINVAL; ++ ++ memcpy(&buf_tx->cmd, reg, sizeof(buf_tx->cmd)); ++ memcpy(buf_tx->data, val, val_len); ++ ++ return spi_sync_transfer(spi, xfer, ARRAY_SIZE(xfer)); ++} ++ ++static inline bool mcp25xxfd_update_bits_read_reg(unsigned int reg) ++{ ++ switch (reg) { ++ case MCP25XXFD_REG_INT: ++ case MCP25XXFD_REG_TEFCON: ++ case MCP25XXFD_REG_FIFOCON(MCP25XXFD_RX_FIFO(0)): ++ case MCP25XXFD_REG_FLTCON(0): ++ case MCP25XXFD_REG_ECCSTAT: ++ case MCP25XXFD_REG_CRC: ++ return false; ++ case MCP25XXFD_REG_CON: ++ case MCP25XXFD_REG_FIFOSTA(MCP25XXFD_RX_FIFO(0)): ++ case MCP25XXFD_REG_OSC: ++ case MCP25XXFD_REG_ECCCON: ++ return true; ++ default: ++ WARN(1, "Status of reg 0x%04x unknown.\n", reg); ++ } ++ ++ return true; ++} ++ ++static int ++mcp25xxfd_regmap_nocrc_update_bits(void *context, unsigned int reg, ++ unsigned int mask, unsigned int val) ++{ ++ struct spi_device *spi = context; ++ struct mcp25xxfd_priv *priv = spi_get_drvdata(spi); ++ struct mcp25xxfd_map_buf_nocrc *buf_rx = priv->map_buf_nocrc_rx; ++ struct mcp25xxfd_map_buf_nocrc *buf_tx = priv->map_buf_nocrc_tx; ++ __le32 orig_le32 = 0, mask_le32, val_le32, tmp_le32; ++ u8 first_byte, last_byte, len; ++ int err; ++ ++ BUILD_BUG_ON(sizeof(buf_rx->cmd) != sizeof(__be16)); ++ BUILD_BUG_ON(sizeof(buf_tx->cmd) != sizeof(__be16)); ++ ++ if (IS_ENABLED(CONFIG_CAN_MCP25XXFD_SANITY) && ++ mask == 0) ++ return -EINVAL; ++ ++ first_byte = mcp25xxfd_first_byte_set(mask); ++ last_byte = mcp25xxfd_last_byte_set(mask); ++ len = last_byte - first_byte + 1; ++ ++ if (mcp25xxfd_update_bits_read_reg(reg)) { ++ struct spi_transfer xfer[2] = { }; ++ struct spi_message msg; ++ ++ spi_message_init(&msg); ++ spi_message_add_tail(&xfer[0], &msg); ++ ++ if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_HALF_DUPLEX) { ++ xfer[0].tx_buf = buf_tx; ++ xfer[0].len = sizeof(buf_tx->cmd); ++ ++ xfer[1].rx_buf = buf_rx->data; ++ xfer[1].len = len; ++ spi_message_add_tail(&xfer[1], &msg); ++ } else { ++ xfer[0].tx_buf = buf_tx; ++ xfer[0].rx_buf = buf_rx; ++ xfer[0].len = sizeof(buf_tx->cmd) + len; ++ ++ if (MCP25XXFD_SANITIZE_SPI) ++ memset(buf_tx->data, 0x0, len); ++ } ++ ++ mcp25xxfd_spi_cmd_read_nocrc(&buf_tx->cmd, reg + first_byte); ++ err = spi_sync(spi, &msg); ++ if (err) ++ return err; ++ ++ memcpy(&orig_le32, buf_rx->data, len); ++ } ++ ++ mask_le32 = cpu_to_le32(mask >> BITS_PER_BYTE * first_byte); ++ val_le32 = cpu_to_le32(val >> BITS_PER_BYTE * first_byte); ++ ++ tmp_le32 = orig_le32 & ~mask_le32; ++ tmp_le32 |= val_le32 & mask_le32; ++ ++ mcp25xxfd_spi_cmd_write_nocrc(&buf_tx->cmd, reg + first_byte); ++ memcpy(buf_tx->data, &tmp_le32, len); ++ ++ return spi_write(spi, buf_tx, sizeof(buf_tx->cmd) + len); ++} ++ ++static int ++mcp25xxfd_regmap_nocrc_read(void *context, ++ const void *reg, size_t reg_len, ++ void *val_buf, size_t val_len) ++{ ++ struct spi_device *spi = context; ++ struct mcp25xxfd_priv *priv = spi_get_drvdata(spi); ++ struct mcp25xxfd_map_buf_nocrc *buf_rx = priv->map_buf_nocrc_rx; ++ struct mcp25xxfd_map_buf_nocrc *buf_tx = priv->map_buf_nocrc_tx; ++ struct spi_transfer xfer[2] = { }; ++ struct spi_message msg; ++ int err; ++ ++ BUILD_BUG_ON(sizeof(buf_rx->cmd) != sizeof(__be16)); ++ BUILD_BUG_ON(sizeof(buf_tx->cmd) != sizeof(__be16)); ++ ++ if (IS_ENABLED(CONFIG_CAN_MCP25XXFD_SANITY) && ++ reg_len != sizeof(buf_tx->cmd.cmd)) ++ return -EINVAL; ++ ++ spi_message_init(&msg); ++ spi_message_add_tail(&xfer[0], &msg); ++ ++ if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_HALF_DUPLEX) { ++ xfer[0].tx_buf = reg; ++ xfer[0].len = sizeof(buf_tx->cmd); ++ ++ xfer[1].rx_buf = val_buf; ++ xfer[1].len = val_len; ++ spi_message_add_tail(&xfer[1], &msg); ++ } else { ++ xfer[0].tx_buf = buf_tx; ++ xfer[0].rx_buf = buf_rx; ++ xfer[0].len = sizeof(buf_tx->cmd) + val_len; ++ ++ memcpy(&buf_tx->cmd, reg, sizeof(buf_tx->cmd)); ++ if (MCP25XXFD_SANITIZE_SPI) ++ memset(buf_tx->data, 0x0, val_len); ++ }; ++ ++ err = spi_sync(spi, &msg); ++ if (err) ++ return err; ++ ++ if (!(priv->devtype_data.quirks & MCP25XXFD_QUIRK_HALF_DUPLEX)) ++ memcpy(val_buf, buf_rx->data, val_len); ++ ++ return 0; ++} ++ ++static int ++mcp25xxfd_regmap_crc_gather_write(void *context, ++ const void *reg_p, size_t reg_len, ++ const void *val, size_t val_len) ++{ ++ struct spi_device *spi = context; ++ struct mcp25xxfd_priv *priv = spi_get_drvdata(spi); ++ struct mcp25xxfd_map_buf_crc *buf_tx = priv->map_buf_crc_tx; ++ struct spi_transfer xfer[] = { ++ { ++ .tx_buf = buf_tx, ++ .len = sizeof(buf_tx->cmd) + val_len + ++ sizeof(buf_tx->crc), ++ }, ++ }; ++ u16 reg = *(u16 *)reg_p; ++ u16 crc; ++ ++ BUILD_BUG_ON(sizeof(buf_tx->cmd) != sizeof(__be16) + sizeof(u8)); ++ ++ if (IS_ENABLED(CONFIG_CAN_MCP25XXFD_SANITY) && ++ reg_len != sizeof(buf_tx->cmd.cmd) + ++ mcp25xxfd_regmap_crc.pad_bits / BITS_PER_BYTE) ++ return -EINVAL; ++ ++ mcp25xxfd_spi_cmd_write_crc(&buf_tx->cmd, reg, val_len); ++ memcpy(buf_tx->data, val, val_len); ++ ++ crc = mcp25xxfd_crc16_compute(buf_tx, sizeof(buf_tx->cmd) + val_len); ++ put_unaligned_be16(crc, buf_tx->data + val_len); ++ ++ return spi_sync_transfer(spi, xfer, ARRAY_SIZE(xfer)); ++} ++ ++static int ++mcp25xxfd_regmap_crc_write(void *context, ++ const void *data, size_t count) ++{ ++ const size_t data_offset = sizeof(__be16) + ++ mcp25xxfd_regmap_crc.pad_bits / BITS_PER_BYTE; ++ ++ return mcp25xxfd_regmap_crc_gather_write(context, ++ data, data_offset, ++ data + data_offset, ++ count - data_offset); ++} ++ ++static int ++mcp25xxfd_regmap_crc_read_one(struct mcp25xxfd_priv *priv, ++ struct spi_message *msg, unsigned int data_len) ++{ ++ const struct mcp25xxfd_map_buf_crc *buf_rx = priv->map_buf_crc_rx; ++ const struct mcp25xxfd_map_buf_crc *buf_tx = priv->map_buf_crc_tx; ++ u16 crc_received, crc_calculated; ++ int err; ++ ++ BUILD_BUG_ON(sizeof(buf_rx->cmd) != sizeof(__be16) + sizeof(u8)); ++ BUILD_BUG_ON(sizeof(buf_tx->cmd) != sizeof(__be16) + sizeof(u8)); ++ ++ err = spi_sync(priv->spi, msg); ++ if (err) ++ return err; ++ ++ crc_received = get_unaligned_be16(buf_rx->data + data_len); ++ crc_calculated = mcp25xxfd_crc16_compute2(&buf_tx->cmd, ++ sizeof(buf_tx->cmd), ++ buf_rx->data, ++ data_len); ++ if (crc_received != crc_calculated) ++ return -EBADMSG; ++ ++ return 0; ++} ++ ++static int ++mcp25xxfd_regmap_crc_read(void *context, ++ const void *reg_p, size_t reg_len, ++ void *val_buf, size_t val_len) ++{ ++ struct spi_device *spi = context; ++ struct mcp25xxfd_priv *priv = spi_get_drvdata(spi); ++ struct mcp25xxfd_map_buf_crc *buf_rx = priv->map_buf_crc_rx; ++ struct mcp25xxfd_map_buf_crc *buf_tx = priv->map_buf_crc_tx; ++ struct spi_transfer xfer[2] = { }; ++ struct spi_message msg; ++ u16 reg = *(u16 *)reg_p; ++ int i, err; ++ ++ BUILD_BUG_ON(sizeof(buf_rx->cmd) != sizeof(__be16) + sizeof(u8)); ++ BUILD_BUG_ON(sizeof(buf_tx->cmd) != sizeof(__be16) + sizeof(u8)); ++ ++ if (IS_ENABLED(CONFIG_CAN_MCP25XXFD_SANITY) && ++ reg_len != sizeof(buf_tx->cmd.cmd) + ++ mcp25xxfd_regmap_crc.pad_bits / BITS_PER_BYTE) ++ return -EINVAL; ++ ++ spi_message_init(&msg); ++ spi_message_add_tail(&xfer[0], &msg); ++ ++ if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_HALF_DUPLEX) { ++ xfer[0].tx_buf = buf_tx; ++ xfer[0].len = sizeof(buf_tx->cmd); ++ ++ xfer[1].rx_buf = buf_rx->data; ++ xfer[1].len = val_len + sizeof(buf_tx->crc); ++ spi_message_add_tail(&xfer[1], &msg); ++ } else { ++ xfer[0].tx_buf = buf_tx; ++ xfer[0].rx_buf = buf_rx; ++ xfer[0].len = sizeof(buf_tx->cmd) + val_len + ++ sizeof(buf_tx->crc); ++ ++ if (MCP25XXFD_SANITIZE_SPI) ++ memset(buf_tx->data, 0x0, val_len + ++ sizeof(buf_tx->crc)); ++ } ++ ++ mcp25xxfd_spi_cmd_read_crc(&buf_tx->cmd, reg, val_len); ++ ++ for (i = 0; i < MCP25XXFD_READ_CRC_RETRIES_MAX; i++) { ++ err = mcp25xxfd_regmap_crc_read_one(priv, &msg, val_len); ++ if (!err) ++ goto out; ++ if (err != -EBADMSG) ++ return err; ++ ++ /* MCP25XXFD_REG_OSC is the first ever reg we read from. ++ * ++ * The chip may be in deep sleep and this SPI transfer ++ * (i.e. the assertion of the CS) will wake the chip ++ * up. This takes about 3ms. The CRC of this transfer ++ * is wrong. ++ * ++ * Or there isn't a chip at all, in this case the CRC ++ * will be wrong, too. ++ * ++ * In both cases ignore the CRC and copy the read data ++ * to the caller. It will take care of both cases. ++ * ++ */ ++ if (reg == MCP25XXFD_REG_OSC) { ++ err = 0; ++ goto out; ++ } ++ ++ netdev_dbg(priv->ndev, ++ "CRC read error at address 0x%04x (length=%zd, data=%*ph, CRC=0x%04x) retrying.\n", ++ reg, val_len, (int)val_len, buf_rx->data, ++ get_unaligned_be16(buf_rx->data + val_len)); ++ } ++ ++ if (err) { ++ netdev_info(priv->ndev, ++ "CRC read error at address 0x%04x (length=%zd, data=%*ph, CRC=0x%04x).\n", ++ reg, val_len, (int)val_len, buf_rx->data, ++ get_unaligned_be16(buf_rx->data + val_len)); ++ ++ return err; ++ } ++ out: ++ memcpy(val_buf, buf_rx->data, val_len); ++ ++ return 0; ++} ++ ++static const struct regmap_range mcp25xxfd_reg_table_yes_range[] = { ++ regmap_reg_range(0x000, 0x2ec), /* CAN FD Controller Module SFR */ ++ regmap_reg_range(0x400, 0xbfc), /* RAM */ ++ regmap_reg_range(0xe00, 0xe14), /* MCP2517/18FD SFR */ ++}; ++ ++static const struct regmap_access_table mcp25xxfd_reg_table = { ++ .yes_ranges = mcp25xxfd_reg_table_yes_range, ++ .n_yes_ranges = ARRAY_SIZE(mcp25xxfd_reg_table_yes_range), ++}; ++ ++static const struct regmap_config mcp25xxfd_regmap_nocrc = { ++ .name = "nocrc", ++ .reg_bits = 16, ++ .reg_stride = 4, ++ .pad_bits = 0, ++ .val_bits = 32, ++ .max_register = 0xffc, ++ .wr_table = &mcp25xxfd_reg_table, ++ .rd_table = &mcp25xxfd_reg_table, ++ .cache_type = REGCACHE_NONE, ++ .read_flag_mask = (__force unsigned long) ++ cpu_to_be16(MCP25XXFD_SPI_INSTRUCTION_READ), ++ .write_flag_mask = (__force unsigned long) ++ cpu_to_be16(MCP25XXFD_SPI_INSTRUCTION_WRITE), ++}; ++ ++static const struct regmap_bus mcp25xxfd_bus_nocrc = { ++ .write = mcp25xxfd_regmap_nocrc_write, ++ .gather_write = mcp25xxfd_regmap_nocrc_gather_write, ++ .reg_update_bits = mcp25xxfd_regmap_nocrc_update_bits, ++ .read = mcp25xxfd_regmap_nocrc_read, ++ .reg_format_endian_default = REGMAP_ENDIAN_BIG, ++ .val_format_endian_default = REGMAP_ENDIAN_LITTLE, ++ .max_raw_read = sizeof_field(struct mcp25xxfd_map_buf_nocrc, data), ++ .max_raw_write = sizeof_field(struct mcp25xxfd_map_buf_nocrc, data), ++}; ++ ++static const struct regmap_config mcp25xxfd_regmap_crc = { ++ .name = "crc", ++ .reg_bits = 16, ++ .reg_stride = 4, ++ .pad_bits = 16, /* keep data bits aligned */ ++ .val_bits = 32, ++ .max_register = 0xffc, ++ .wr_table = &mcp25xxfd_reg_table, ++ .rd_table = &mcp25xxfd_reg_table, ++ .cache_type = REGCACHE_NONE, ++}; ++ ++static const struct regmap_bus mcp25xxfd_bus_crc = { ++ .write = mcp25xxfd_regmap_crc_write, ++ .gather_write = mcp25xxfd_regmap_crc_gather_write, ++ .read = mcp25xxfd_regmap_crc_read, ++ .reg_format_endian_default = REGMAP_ENDIAN_NATIVE, ++ .val_format_endian_default = REGMAP_ENDIAN_LITTLE, ++ .max_raw_read = sizeof_field(struct mcp25xxfd_map_buf_crc, data), ++ .max_raw_write = sizeof_field(struct mcp25xxfd_map_buf_crc, data), ++}; ++ ++static inline bool ++mcp25xxfd_regmap_use_nocrc(struct mcp25xxfd_priv *priv) ++{ ++ return (!(priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_REG)) || ++ (!(priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_RX)); ++} ++ ++static inline bool ++mcp25xxfd_regmap_use_crc(struct mcp25xxfd_priv *priv) ++{ ++ return (priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_REG) || ++ (priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_RX); ++} ++ ++static int ++mcp25xxfd_regmap_init_nocrc(struct mcp25xxfd_priv *priv) ++{ ++ if (!priv->map_nocrc) { ++ struct regmap *map; ++ ++ map = devm_regmap_init(&priv->spi->dev, &mcp25xxfd_bus_nocrc, ++ priv->spi, &mcp25xxfd_regmap_nocrc); ++ if (IS_ERR(map)) ++ return PTR_ERR(map); ++ ++ priv->map_nocrc = map; ++ } ++ ++ if (!priv->map_buf_nocrc_rx) { ++ priv->map_buf_nocrc_rx = ++ devm_kzalloc(&priv->spi->dev, ++ sizeof(*priv->map_buf_nocrc_rx), ++ GFP_KERNEL); ++ if (!priv->map_buf_nocrc_rx) ++ return -ENOMEM; ++ } ++ ++ if (!priv->map_buf_nocrc_tx) { ++ priv->map_buf_nocrc_tx = ++ devm_kzalloc(&priv->spi->dev, ++ sizeof(*priv->map_buf_nocrc_tx), ++ GFP_KERNEL); ++ if (!priv->map_buf_nocrc_tx) ++ return -ENOMEM; ++ } ++ ++ if (!(priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_REG)) ++ priv->map_reg = priv->map_nocrc; ++ ++ if (!(priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_RX)) ++ priv->map_rx = priv->map_nocrc; ++ ++ return 0; ++} ++ ++static void mcp25xxfd_regmap_destroy_nocrc(struct mcp25xxfd_priv *priv) ++{ ++ if (priv->map_buf_nocrc_rx) { ++ devm_kfree(&priv->spi->dev, priv->map_buf_nocrc_rx); ++ priv->map_buf_nocrc_rx = NULL; ++ } ++ if (priv->map_buf_nocrc_tx) { ++ devm_kfree(&priv->spi->dev, priv->map_buf_nocrc_tx); ++ priv->map_buf_nocrc_tx = NULL; ++ } ++} ++ ++static int ++mcp25xxfd_regmap_init_crc(struct mcp25xxfd_priv *priv) ++{ ++ if (!priv->map_crc) { ++ struct regmap *map; ++ ++ map = devm_regmap_init(&priv->spi->dev, &mcp25xxfd_bus_crc, ++ priv->spi, &mcp25xxfd_regmap_crc); ++ if (IS_ERR(map)) ++ return PTR_ERR(map); ++ ++ priv->map_crc = map; ++ } ++ ++ if (!priv->map_buf_crc_rx) { ++ priv->map_buf_crc_rx = ++ devm_kzalloc(&priv->spi->dev, ++ sizeof(*priv->map_buf_crc_rx), ++ GFP_KERNEL); ++ if (!priv->map_buf_crc_rx) ++ return -ENOMEM; ++ } ++ ++ if (!priv->map_buf_crc_tx) { ++ priv->map_buf_crc_tx = ++ devm_kzalloc(&priv->spi->dev, ++ sizeof(*priv->map_buf_crc_tx), ++ GFP_KERNEL); ++ if (!priv->map_buf_crc_tx) ++ return -ENOMEM; ++ } ++ ++ if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_REG) ++ priv->map_reg = priv->map_crc; ++ ++ if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_RX) ++ priv->map_rx = priv->map_crc; ++ ++ return 0; ++} ++ ++static void mcp25xxfd_regmap_destroy_crc(struct mcp25xxfd_priv *priv) ++{ ++ if (priv->map_buf_crc_rx) { ++ devm_kfree(&priv->spi->dev, priv->map_buf_crc_rx); ++ priv->map_buf_crc_rx = NULL; ++ } ++ if (priv->map_buf_crc_tx) { ++ devm_kfree(&priv->spi->dev, priv->map_buf_crc_tx); ++ priv->map_buf_crc_tx = NULL; ++ } ++} ++ ++int mcp25xxfd_regmap_init(struct mcp25xxfd_priv *priv) ++{ ++ int err; ++ ++ if (mcp25xxfd_regmap_use_nocrc(priv)) { ++ err = mcp25xxfd_regmap_init_nocrc(priv); ++ ++ if (err) ++ return err; ++ } else { ++ mcp25xxfd_regmap_destroy_nocrc(priv); ++ } ++ ++ if (mcp25xxfd_regmap_use_crc(priv)) { ++ err = mcp25xxfd_regmap_init_crc(priv); ++ ++ if (err) ++ return err; ++ } else { ++ mcp25xxfd_regmap_destroy_crc(priv); ++ } ++ ++ return 0; ++} +diff --git a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd.h b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd.h +new file mode 100644 +index 000000000000..3bc799204cb0 +--- /dev/null ++++ b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd.h +@@ -0,0 +1,835 @@ ++/* SPDX-License-Identifier: GPL-2.0 ++ * ++ * mcp25xxfd - Microchip MCP25xxFD Family CAN controller driver ++ * ++ * Copyright (c) 2019 Pengutronix, ++ * Marc Kleine-Budde ++ * Copyright (c) 2019 Martin Sperl ++ */ ++ ++#ifndef _MCP25XXFD_H ++#define _MCP25XXFD_H ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* MPC25xx registers */ ++ ++/* CAN FD Controller Module SFR */ ++#define MCP25XXFD_REG_CON 0x00 ++#define MCP25XXFD_REG_CON_TXBWS_MASK GENMASK(31, 28) ++#define MCP25XXFD_REG_CON_ABAT BIT(27) ++#define MCP25XXFD_REG_CON_REQOP_MASK GENMASK(26, 24) ++#define MCP25XXFD_REG_CON_MODE_MIXED 0 ++#define MCP25XXFD_REG_CON_MODE_SLEEP 1 ++#define MCP25XXFD_REG_CON_MODE_INT_LOOPBACK 2 ++#define MCP25XXFD_REG_CON_MODE_LISTENONLY 3 ++#define MCP25XXFD_REG_CON_MODE_CONFIG 4 ++#define MCP25XXFD_REG_CON_MODE_EXT_LOOPBACK 5 ++#define MCP25XXFD_REG_CON_MODE_CAN2_0 6 ++#define MCP25XXFD_REG_CON_MODE_RESTRICTED 7 ++#define MCP25XXFD_REG_CON_OPMOD_MASK GENMASK(23, 21) ++#define MCP25XXFD_REG_CON_TXQEN BIT(20) ++#define MCP25XXFD_REG_CON_STEF BIT(19) ++#define MCP25XXFD_REG_CON_SERR2LOM BIT(18) ++#define MCP25XXFD_REG_CON_ESIGM BIT(17) ++#define MCP25XXFD_REG_CON_RTXAT BIT(16) ++#define MCP25XXFD_REG_CON_BRSDIS BIT(12) ++#define MCP25XXFD_REG_CON_BUSY BIT(11) ++#define MCP25XXFD_REG_CON_WFT_MASK GENMASK(10, 9) ++#define MCP25XXFD_REG_CON_WFT_T00FILTER 0x0 ++#define MCP25XXFD_REG_CON_WFT_T01FILTER 0x1 ++#define MCP25XXFD_REG_CON_WFT_T10FILTER 0x2 ++#define MCP25XXFD_REG_CON_WFT_T11FILTER 0x3 ++#define MCP25XXFD_REG_CON_WAKFIL BIT(8) ++#define MCP25XXFD_REG_CON_PXEDIS BIT(6) ++#define MCP25XXFD_REG_CON_ISOCRCEN BIT(5) ++#define MCP25XXFD_REG_CON_DNCNT_MASK GENMASK(4, 0) ++ ++#define MCP25XXFD_REG_NBTCFG 0x04 ++#define MCP25XXFD_REG_NBTCFG_BRP_MASK GENMASK(31, 24) ++#define MCP25XXFD_REG_NBTCFG_TSEG1_MASK GENMASK(23, 16) ++#define MCP25XXFD_REG_NBTCFG_TSEG2_MASK GENMASK(14, 8) ++#define MCP25XXFD_REG_NBTCFG_SJW_MASK GENMASK(6, 0) ++ ++#define MCP25XXFD_REG_DBTCFG 0x08 ++#define MCP25XXFD_REG_DBTCFG_BRP_MASK GENMASK(31, 24) ++#define MCP25XXFD_REG_DBTCFG_TSEG1_MASK GENMASK(20, 16) ++#define MCP25XXFD_REG_DBTCFG_TSEG2_MASK GENMASK(11, 8) ++#define MCP25XXFD_REG_DBTCFG_SJW_MASK GENMASK(3, 0) ++ ++#define MCP25XXFD_REG_TDC 0x0c ++#define MCP25XXFD_REG_TDC_EDGFLTEN BIT(25) ++#define MCP25XXFD_REG_TDC_SID11EN BIT(24) ++#define MCP25XXFD_REG_TDC_TDCMOD_MASK GENMASK(17, 16) ++#define MCP25XXFD_REG_TDC_TDCMOD_AUTO 2 ++#define MCP25XXFD_REG_TDC_TDCMOD_MANUAL 1 ++#define MCP25XXFD_REG_TDC_TDCMOD_DISABLED 0 ++#define MCP25XXFD_REG_TDC_TDCO_MASK GENMASK(14, 8) ++#define MCP25XXFD_REG_TDC_TDCV_MASK GENMASK(5, 0) ++ ++#define MCP25XXFD_REG_TBC 0x10 ++ ++#define MCP25XXFD_REG_TSCON 0x14 ++#define MCP25XXFD_REG_TSCON_TSRES BIT(18) ++#define MCP25XXFD_REG_TSCON_TSEOF BIT(17) ++#define MCP25XXFD_REG_TSCON_TBCEN BIT(16) ++#define MCP25XXFD_REG_TSCON_TBCPRE_MASK GENMASK(9, 0) ++ ++#define MCP25XXFD_REG_VEC 0x18 ++#define MCP25XXFD_REG_VEC_RXCODE_MASK GENMASK(30, 24) ++#define MCP25XXFD_REG_VEC_TXCODE_MASK GENMASK(22, 16) ++#define MCP25XXFD_REG_VEC_FILHIT_MASK GENMASK(12, 8) ++#define MCP25XXFD_REG_VEC_ICODE_MASK GENMASK(6, 0) ++ ++#define MCP25XXFD_REG_INT 0x1c ++#define MCP25XXFD_REG_INT_IF_MASK GENMASK(15, 0) ++#define MCP25XXFD_REG_INT_IE_MASK GENMASK(31, 16) ++#define MCP25XXFD_REG_INT_IVMIE BIT(31) ++#define MCP25XXFD_REG_INT_WAKIE BIT(30) ++#define MCP25XXFD_REG_INT_CERRIE BIT(29) ++#define MCP25XXFD_REG_INT_SERRIE BIT(28) ++#define MCP25XXFD_REG_INT_RXOVIE BIT(27) ++#define MCP25XXFD_REG_INT_TXATIE BIT(26) ++#define MCP25XXFD_REG_INT_SPICRCIE BIT(25) ++#define MCP25XXFD_REG_INT_ECCIE BIT(24) ++#define MCP25XXFD_REG_INT_TEFIE BIT(20) ++#define MCP25XXFD_REG_INT_MODIE BIT(19) ++#define MCP25XXFD_REG_INT_TBCIE BIT(18) ++#define MCP25XXFD_REG_INT_RXIE BIT(17) ++#define MCP25XXFD_REG_INT_TXIE BIT(16) ++#define MCP25XXFD_REG_INT_IVMIF BIT(15) ++#define MCP25XXFD_REG_INT_WAKIF BIT(14) ++#define MCP25XXFD_REG_INT_CERRIF BIT(13) ++#define MCP25XXFD_REG_INT_SERRIF BIT(12) ++#define MCP25XXFD_REG_INT_RXOVIF BIT(11) ++#define MCP25XXFD_REG_INT_TXATIF BIT(10) ++#define MCP25XXFD_REG_INT_SPICRCIF BIT(9) ++#define MCP25XXFD_REG_INT_ECCIF BIT(8) ++#define MCP25XXFD_REG_INT_TEFIF BIT(4) ++#define MCP25XXFD_REG_INT_MODIF BIT(3) ++#define MCP25XXFD_REG_INT_TBCIF BIT(2) ++#define MCP25XXFD_REG_INT_RXIF BIT(1) ++#define MCP25XXFD_REG_INT_TXIF BIT(0) ++/* These IRQ flags must be cleared by SW in the CAN_INT register */ ++#define MCP25XXFD_REG_INT_IF_CLEARABLE_MASK \ ++ (MCP25XXFD_REG_INT_IVMIF | MCP25XXFD_REG_INT_WAKIF | \ ++ MCP25XXFD_REG_INT_CERRIF | MCP25XXFD_REG_INT_SERRIF | \ ++ MCP25XXFD_REG_INT_MODIF) ++ ++#define MCP25XXFD_REG_RXIF 0x20 ++#define MCP25XXFD_REG_TXIF 0x24 ++#define MCP25XXFD_REG_RXOVIF 0x28 ++#define MCP25XXFD_REG_TXATIF 0x2c ++#define MCP25XXFD_REG_TXREQ 0x30 ++ ++#define MCP25XXFD_REG_TREC 0x34 ++#define MCP25XXFD_REG_TREC_TXBO BIT(21) ++#define MCP25XXFD_REG_TREC_TXBP BIT(20) ++#define MCP25XXFD_REG_TREC_RXBP BIT(19) ++#define MCP25XXFD_REG_TREC_TXWARN BIT(18) ++#define MCP25XXFD_REG_TREC_RXWARN BIT(17) ++#define MCP25XXFD_REG_TREC_EWARN BIT(16) ++#define MCP25XXFD_REG_TREC_TEC_MASK GENMASK(15, 8) ++#define MCP25XXFD_REG_TREC_REC_MASK GENMASK(7, 0) ++ ++#define MCP25XXFD_REG_BDIAG0 0x38 ++#define MCP25XXFD_REG_BDIAG0_DTERRCNT_MASK GENMASK(31, 24) ++#define MCP25XXFD_REG_BDIAG0_DRERRCNT_MASK GENMASK(23, 16) ++#define MCP25XXFD_REG_BDIAG0_NTERRCNT_MASK GENMASK(15, 8) ++#define MCP25XXFD_REG_BDIAG0_NRERRCNT_MASK GENMASK(7, 0) ++ ++#define MCP25XXFD_REG_BDIAG1 0x3c ++#define MCP25XXFD_REG_BDIAG1_DLCMM BIT(31) ++#define MCP25XXFD_REG_BDIAG1_ESI BIT(30) ++#define MCP25XXFD_REG_BDIAG1_DCRCERR BIT(29) ++#define MCP25XXFD_REG_BDIAG1_DSTUFERR BIT(28) ++#define MCP25XXFD_REG_BDIAG1_DFORMERR BIT(27) ++#define MCP25XXFD_REG_BDIAG1_DBIT1ERR BIT(25) ++#define MCP25XXFD_REG_BDIAG1_DBIT0ERR BIT(24) ++#define MCP25XXFD_REG_BDIAG1_TXBOERR BIT(23) ++#define MCP25XXFD_REG_BDIAG1_NCRCERR BIT(21) ++#define MCP25XXFD_REG_BDIAG1_NSTUFERR BIT(20) ++#define MCP25XXFD_REG_BDIAG1_NFORMERR BIT(19) ++#define MCP25XXFD_REG_BDIAG1_NACKERR BIT(18) ++#define MCP25XXFD_REG_BDIAG1_NBIT1ERR BIT(17) ++#define MCP25XXFD_REG_BDIAG1_NBIT0ERR BIT(16) ++#define MCP25XXFD_REG_BDIAG1_BERR_MASK \ ++ (MCP25XXFD_REG_BDIAG1_DLCMM | MCP25XXFD_REG_BDIAG1_ESI | \ ++ MCP25XXFD_REG_BDIAG1_DCRCERR | MCP25XXFD_REG_BDIAG1_DSTUFERR | \ ++ MCP25XXFD_REG_BDIAG1_DFORMERR | MCP25XXFD_REG_BDIAG1_DBIT1ERR | \ ++ MCP25XXFD_REG_BDIAG1_DBIT0ERR | MCP25XXFD_REG_BDIAG1_TXBOERR | \ ++ MCP25XXFD_REG_BDIAG1_NCRCERR | MCP25XXFD_REG_BDIAG1_NSTUFERR | \ ++ MCP25XXFD_REG_BDIAG1_NFORMERR | MCP25XXFD_REG_BDIAG1_NACKERR | \ ++ MCP25XXFD_REG_BDIAG1_NBIT1ERR | MCP25XXFD_REG_BDIAG1_NBIT0ERR) ++#define MCP25XXFD_REG_BDIAG1_EFMSGCNT_MASK GENMASK(15, 0) ++ ++#define MCP25XXFD_REG_TEFCON 0x40 ++#define MCP25XXFD_REG_TEFCON_FSIZE_MASK GENMASK(28, 24) ++#define MCP25XXFD_REG_TEFCON_FRESET BIT(10) ++#define MCP25XXFD_REG_TEFCON_UINC BIT(8) ++#define MCP25XXFD_REG_TEFCON_TEFTSEN BIT(5) ++#define MCP25XXFD_REG_TEFCON_TEFOVIE BIT(3) ++#define MCP25XXFD_REG_TEFCON_TEFFIE BIT(2) ++#define MCP25XXFD_REG_TEFCON_TEFHIE BIT(1) ++#define MCP25XXFD_REG_TEFCON_TEFNEIE BIT(0) ++ ++#define MCP25XXFD_REG_TEFSTA 0x44 ++#define MCP25XXFD_REG_TEFSTA_TEFOVIF BIT(3) ++#define MCP25XXFD_REG_TEFSTA_TEFFIF BIT(2) ++#define MCP25XXFD_REG_TEFSTA_TEFHIF BIT(1) ++#define MCP25XXFD_REG_TEFSTA_TEFNEIF BIT(0) ++ ++#define MCP25XXFD_REG_TEFUA 0x48 ++ ++#define MCP25XXFD_REG_TXQCON 0x50 ++#define MCP25XXFD_REG_TXQCON_PLSIZE_MASK GENMASK(31, 29) ++#define MCP25XXFD_REG_TXQCON_PLSIZE_8 0 ++#define MCP25XXFD_REG_TXQCON_PLSIZE_12 1 ++#define MCP25XXFD_REG_TXQCON_PLSIZE_16 2 ++#define MCP25XXFD_REG_TXQCON_PLSIZE_20 3 ++#define MCP25XXFD_REG_TXQCON_PLSIZE_24 4 ++#define MCP25XXFD_REG_TXQCON_PLSIZE_32 5 ++#define MCP25XXFD_REG_TXQCON_PLSIZE_48 6 ++#define MCP25XXFD_REG_TXQCON_PLSIZE_64 7 ++#define MCP25XXFD_REG_TXQCON_FSIZE_MASK GENMASK(28, 24) ++#define MCP25XXFD_REG_TXQCON_TXAT_UNLIMITED 3 ++#define MCP25XXFD_REG_TXQCON_TXAT_THREE_SHOT 1 ++#define MCP25XXFD_REG_TXQCON_TXAT_ONE_SHOT 0 ++#define MCP25XXFD_REG_TXQCON_TXAT_MASK GENMASK(22, 21) ++#define MCP25XXFD_REG_TXQCON_TXPRI_MASK GENMASK(20, 16) ++#define MCP25XXFD_REG_TXQCON_FRESET BIT(10) ++#define MCP25XXFD_REG_TXQCON_TXREQ BIT(9) ++#define MCP25XXFD_REG_TXQCON_UINC BIT(8) ++#define MCP25XXFD_REG_TXQCON_TXEN BIT(7) ++#define MCP25XXFD_REG_TXQCON_TXATIE BIT(4) ++#define MCP25XXFD_REG_TXQCON_TXQEIE BIT(2) ++#define MCP25XXFD_REG_TXQCON_TXQNIE BIT(0) ++ ++#define MCP25XXFD_REG_TXQSTA 0x54 ++#define MCP25XXFD_REG_TXQSTA_TXQCI_MASK GENMASK(12, 8) ++#define MCP25XXFD_REG_TXQSTA_TXABT BIT(7) ++#define MCP25XXFD_REG_TXQSTA_TXLARB BIT(6) ++#define MCP25XXFD_REG_TXQSTA_TXERR BIT(5) ++#define MCP25XXFD_REG_TXQSTA_TXATIF BIT(4) ++#define MCP25XXFD_REG_TXQSTA_TXQEIF BIT(2) ++#define MCP25XXFD_REG_TXQSTA_TXQNIF BIT(0) ++ ++#define MCP25XXFD_REG_TXQUA 0x58 ++ ++#define MCP25XXFD_REG_FIFOCON(x) (0x50 + 0xc * (x)) ++#define MCP25XXFD_REG_FIFOCON_PLSIZE_MASK GENMASK(31, 29) ++#define MCP25XXFD_REG_FIFOCON_PLSIZE_8 0 ++#define MCP25XXFD_REG_FIFOCON_PLSIZE_12 1 ++#define MCP25XXFD_REG_FIFOCON_PLSIZE_16 2 ++#define MCP25XXFD_REG_FIFOCON_PLSIZE_20 3 ++#define MCP25XXFD_REG_FIFOCON_PLSIZE_24 4 ++#define MCP25XXFD_REG_FIFOCON_PLSIZE_32 5 ++#define MCP25XXFD_REG_FIFOCON_PLSIZE_48 6 ++#define MCP25XXFD_REG_FIFOCON_PLSIZE_64 7 ++#define MCP25XXFD_REG_FIFOCON_FSIZE_MASK GENMASK(28, 24) ++#define MCP25XXFD_REG_FIFOCON_TXAT_MASK GENMASK(22, 21) ++#define MCP25XXFD_REG_FIFOCON_TXAT_ONE_SHOT 0 ++#define MCP25XXFD_REG_FIFOCON_TXAT_THREE_SHOT 1 ++#define MCP25XXFD_REG_FIFOCON_TXAT_UNLIMITED 3 ++#define MCP25XXFD_REG_FIFOCON_TXPRI_MASK GENMASK(20, 16) ++#define MCP25XXFD_REG_FIFOCON_FRESET BIT(10) ++#define MCP25XXFD_REG_FIFOCON_TXREQ BIT(9) ++#define MCP25XXFD_REG_FIFOCON_UINC BIT(8) ++#define MCP25XXFD_REG_FIFOCON_TXEN BIT(7) ++#define MCP25XXFD_REG_FIFOCON_RTREN BIT(6) ++#define MCP25XXFD_REG_FIFOCON_RXTSEN BIT(5) ++#define MCP25XXFD_REG_FIFOCON_TXATIE BIT(4) ++#define MCP25XXFD_REG_FIFOCON_RXOVIE BIT(3) ++#define MCP25XXFD_REG_FIFOCON_TFERFFIE BIT(2) ++#define MCP25XXFD_REG_FIFOCON_TFHRFHIE BIT(1) ++#define MCP25XXFD_REG_FIFOCON_TFNRFNIE BIT(0) ++ ++#define MCP25XXFD_REG_FIFOSTA(x) (0x54 + 0xc * (x)) ++#define MCP25XXFD_REG_FIFOSTA_FIFOCI_MASK GENMASK(12, 8) ++#define MCP25XXFD_REG_FIFOSTA_TXABT BIT(7) ++#define MCP25XXFD_REG_FIFOSTA_TXLARB BIT(6) ++#define MCP25XXFD_REG_FIFOSTA_TXERR BIT(5) ++#define MCP25XXFD_REG_FIFOSTA_TXATIF BIT(4) ++#define MCP25XXFD_REG_FIFOSTA_RXOVIF BIT(3) ++#define MCP25XXFD_REG_FIFOSTA_TFERFFIF BIT(2) ++#define MCP25XXFD_REG_FIFOSTA_TFHRFHIF BIT(1) ++#define MCP25XXFD_REG_FIFOSTA_TFNRFNIF BIT(0) ++ ++#define MCP25XXFD_REG_FIFOUA(x) (0x58 + 0xc * (x)) ++ ++#define MCP25XXFD_REG_FLTCON(x) (0x1d0 + 0x4 * (x)) ++#define MCP25XXFD_REG_FLTCON_FLTEN3 BIT(31) ++#define MCP25XXFD_REG_FLTCON_F3BP_MASK GENMASK(28, 24) ++#define MCP25XXFD_REG_FLTCON_FLTEN2 BIT(23) ++#define MCP25XXFD_REG_FLTCON_F2BP_MASK GENMASK(20, 16) ++#define MCP25XXFD_REG_FLTCON_FLTEN1 BIT(15) ++#define MCP25XXFD_REG_FLTCON_F1BP_MASK GENMASK(12, 8) ++#define MCP25XXFD_REG_FLTCON_FLTEN0 BIT(7) ++#define MCP25XXFD_REG_FLTCON_F0BP_MASK GENMASK(4, 0) ++#define MCP25XXFD_REG_FLTCON_FLTEN(x) (BIT(7) << 8 * ((x) & 0x3)) ++#define MCP25XXFD_REG_FLTCON_FLT_MASK(x) (GENMASK(7, 0) << (8 * ((x) & 0x3))) ++#define MCP25XXFD_REG_FLTCON_FBP(x, fifo) ((fifo) << 8 * ((x) & 0x3)) ++ ++#define MCP25XXFD_REG_FLTOBJ(x) (0x1f0 + 0x8 * (x)) ++#define MCP25XXFD_REG_FLTOBJ_EXIDE BIT(30) ++#define MCP25XXFD_REG_FLTOBJ_SID11 BIT(29) ++#define MCP25XXFD_REG_FLTOBJ_EID_MASK GENMASK(28, 11) ++#define MCP25XXFD_REG_FLTOBJ_SID_MASK GENMASK(10, 0) ++ ++#define MCP25XXFD_REG_FLTMASK(x) (0x1f4 + 0x8 * (x)) ++#define MCP25XXFD_REG_MASK_MIDE BIT(30) ++#define MCP25XXFD_REG_MASK_MSID11 BIT(29) ++#define MCP25XXFD_REG_MASK_MEID_MASK GENMASK(28, 11) ++#define MCP25XXFD_REG_MASK_MSID_MASK GENMASK(10, 0) ++ ++/* RAM */ ++#define MCP25XXFD_RAM_START 0x400 ++#define MCP25XXFD_RAM_SIZE SZ_2K ++ ++/* Message Object */ ++#define MCP25XXFD_OBJ_ID_SID11 BIT(29) ++#define MCP25XXFD_OBJ_ID_EID_MASK GENMASK(28, 11) ++#define MCP25XXFD_OBJ_ID_SID_MASK GENMASK(10, 0) ++#define MCP25XXFD_OBJ_FLAGS_SEQ_MCP2518FD_MASK GENMASK(31, 9) ++#define MCP25XXFD_OBJ_FLAGS_SEQ_MCP2517FD_MASK GENMASK(15, 9) ++#define MCP25XXFD_OBJ_FLAGS_SEQ_MASK MCP25XXFD_OBJ_FLAGS_SEQ_MCP2518FD_MASK ++#define MCP25XXFD_OBJ_FLAGS_ESI BIT(8) ++#define MCP25XXFD_OBJ_FLAGS_FDF BIT(7) ++#define MCP25XXFD_OBJ_FLAGS_BRS BIT(6) ++#define MCP25XXFD_OBJ_FLAGS_RTR BIT(5) ++#define MCP25XXFD_OBJ_FLAGS_IDE BIT(4) ++#define MCP25XXFD_OBJ_FLAGS_DLC GENMASK(3, 0) ++ ++#define MCP25XXFD_REG_FRAME_EFF_SID_MASK GENMASK(28, 18) ++#define MCP25XXFD_REG_FRAME_EFF_EID_MASK GENMASK(17, 0) ++ ++/* MCP2517/18FD SFR */ ++#define MCP25XXFD_REG_OSC 0xe00 ++#define MCP25XXFD_REG_OSC_SCLKRDY BIT(12) ++#define MCP25XXFD_REG_OSC_OSCRDY BIT(10) ++#define MCP25XXFD_REG_OSC_PLLRDY BIT(8) ++#define MCP25XXFD_REG_OSC_CLKODIV_10 3 ++#define MCP25XXFD_REG_OSC_CLKODIV_4 2 ++#define MCP25XXFD_REG_OSC_CLKODIV_2 1 ++#define MCP25XXFD_REG_OSC_CLKODIV_1 0 ++#define MCP25XXFD_REG_OSC_CLKODIV_MASK GENMASK(6, 5) ++#define MCP25XXFD_REG_OSC_SCLKDIV BIT(4) ++#define MCP25XXFD_REG_OSC_LPMEN BIT(3) /* MCP2518FD only */ ++#define MCP25XXFD_REG_OSC_OSCDIS BIT(2) ++#define MCP25XXFD_REG_OSC_PLLEN BIT(0) ++ ++#define MCP25XXFD_REG_IOCON 0xe04 ++#define MCP25XXFD_REG_IOCON_INTOD BIT(30) ++#define MCP25XXFD_REG_IOCON_SOF BIT(29) ++#define MCP25XXFD_REG_IOCON_TXCANOD BIT(28) ++#define MCP25XXFD_REG_IOCON_PM1 BIT(25) ++#define MCP25XXFD_REG_IOCON_PM0 BIT(24) ++#define MCP25XXFD_REG_IOCON_GPIO1 BIT(17) ++#define MCP25XXFD_REG_IOCON_GPIO0 BIT(16) ++#define MCP25XXFD_REG_IOCON_LAT1 BIT(9) ++#define MCP25XXFD_REG_IOCON_LAT0 BIT(8) ++#define MCP25XXFD_REG_IOCON_XSTBYEN BIT(6) ++#define MCP25XXFD_REG_IOCON_TRIS1 BIT(1) ++#define MCP25XXFD_REG_IOCON_TRIS0 BIT(0) ++ ++#define MCP25XXFD_REG_CRC 0xe08 ++#define MCP25XXFD_REG_CRC_FERRIE BIT(25) ++#define MCP25XXFD_REG_CRC_CRCERRIE BIT(24) ++#define MCP25XXFD_REG_CRC_FERRIF BIT(17) ++#define MCP25XXFD_REG_CRC_CRCERRIF BIT(16) ++#define MCP25XXFD_REG_CRC_IF_MASK GENMASK(17, 16) ++#define MCP25XXFD_REG_CRC_MASK GENMASK(15, 0) ++ ++#define MCP25XXFD_REG_ECCCON 0xe0c ++#define MCP25XXFD_REG_ECCCON_PARITY_MASK GENMASK(14, 8) ++#define MCP25XXFD_REG_ECCCON_DEDIE BIT(2) ++#define MCP25XXFD_REG_ECCCON_SECIE BIT(1) ++#define MCP25XXFD_REG_ECCCON_ECCEN BIT(0) ++ ++#define MCP25XXFD_REG_ECCSTAT 0xe10 ++#define MCP25XXFD_REG_ECCSTAT_ERRADDR_MASK GENMASK(27, 16) ++#define MCP25XXFD_REG_ECCSTAT_IF_MASK GENMASK(2, 1) ++#define MCP25XXFD_REG_ECCSTAT_DEDIF BIT(2) ++#define MCP25XXFD_REG_ECCSTAT_SECIF BIT(1) ++ ++#define MCP25XXFD_REG_DEVID 0xe14 /* MCP2518FD only */ ++#define MCP25XXFD_REG_DEVID_ID_MASK GENMASK(7, 4) ++#define MCP25XXFD_REG_DEVID_REV_MASK GENMASK(3, 0) ++ ++/* number of TX FIFO objects, depending on CAN mode ++ * ++ * FIFO setup: tef: 8*12 bytes = 96 bytes, tx: 8*16 bytes = 128 bytes ++ * FIFO setup: tef: 4*12 bytes = 48 bytes, tx: 4*72 bytes = 288 bytes ++ */ ++#define MCP25XXFD_TX_OBJ_NUM_CAN 8 ++#define MCP25XXFD_TX_OBJ_NUM_CANFD 4 ++ ++#if MCP25XXFD_TX_OBJ_NUM_CAN > MCP25XXFD_TX_OBJ_NUM_CANFD ++#define MCP25XXFD_TX_OBJ_NUM_MAX MCP25XXFD_TX_OBJ_NUM_CAN ++#else ++#define MCP25XXFD_TX_OBJ_NUM_MAX MCP25XXFD_TX_OBJ_NUM_CANFD ++#endif ++ ++#define MCP25XXFD_NAPI_WEIGHT 32 ++#define MCP25XXFD_TX_FIFO 1 ++#define MCP25XXFD_RX_FIFO(x) (MCP25XXFD_TX_FIFO + 1 + (x)) ++ ++/* SPI commands */ ++#define MCP25XXFD_SPI_INSTRUCTION_RESET 0x0000 ++#define MCP25XXFD_SPI_INSTRUCTION_WRITE 0x2000 ++#define MCP25XXFD_SPI_INSTRUCTION_READ 0x3000 ++#define MCP25XXFD_SPI_INSTRUCTION_WRITE_CRC 0xa000 ++#define MCP25XXFD_SPI_INSTRUCTION_READ_CRC 0xb000 ++#define MCP25XXFD_SPI_INSTRUCTION_WRITE_CRC_SAFE 0xc000 ++#define MCP25XXFD_SPI_ADDRESS_MASK GENMASK(11, 0) ++ ++#define MCP25XXFD_SYSCLOCK_HZ_MAX 40000000 ++#define MCP25XXFD_SYSCLOCK_HZ_MIN 1000000 ++#define MCP25XXFD_SPICLOCK_HZ_MAX 20000000 ++#define MCP25XXFD_OSC_PLL_MULTIPLIER 10 ++#define MCP25XXFD_OSC_STAB_SLEEP_US (3 * USEC_PER_MSEC) ++#define MCP25XXFD_OSC_STAB_TIMEOUT_US (10 * MCP25XXFD_OSC_STAB_SLEEP_US) ++#define MCP25XXFD_POLL_SLEEP_US (10) ++#define MCP25XXFD_POLL_TIMEOUT_US (USEC_PER_MSEC) ++#define MCP25XXFD_SOFTRESET_RETRIES_MAX 3 ++#define MCP25XXFD_READ_CRC_RETRIES_MAX 3 ++#define MCP25XXFD_ECC_CNT_MAX 2 ++#define MCP25XXFD_SANITIZE_SPI 1 ++#define MCP25XXFD_SANITIZE_CAN 1 ++ ++/* Silence TX MAB overflow warnings */ ++#define MCP25XXFD_QUIRK_MAB_NO_WARN BIT(0) ++/* Use CRC to access registers */ ++#define MCP25XXFD_QUIRK_CRC_REG BIT(1) ++/* Use CRC to access RX/TEF-RAM */ ++#define MCP25XXFD_QUIRK_CRC_RX BIT(2) ++/* Use CRC to access TX-RAM */ ++#define MCP25XXFD_QUIRK_CRC_TX BIT(3) ++/* Enable ECC for RAM */ ++#define MCP25XXFD_QUIRK_ECC BIT(4) ++/* Use Half Duplex SPI transfers */ ++#define MCP25XXFD_QUIRK_HALF_DUPLEX BIT(5) ++ ++struct mcp25xxfd_hw_tef_obj { ++ u32 id; ++ u32 flags; ++ u32 ts; ++}; ++ ++/* The tx_obj_raw version is used in spi async, i.e. without ++ * regmap. We have to take care of endianness ourselves. ++ */ ++struct mcp25xxfd_hw_tx_obj_raw { ++ __le32 id; ++ __le32 flags; ++ u8 data[sizeof_field(struct canfd_frame, data)]; ++}; ++ ++struct mcp25xxfd_hw_tx_obj_can { ++ u32 id; ++ u32 flags; ++ u8 data[sizeof_field(struct can_frame, data)]; ++}; ++ ++struct mcp25xxfd_hw_tx_obj_canfd { ++ u32 id; ++ u32 flags; ++ u8 data[sizeof_field(struct canfd_frame, data)]; ++}; ++ ++struct mcp25xxfd_hw_rx_obj_can { ++ u32 id; ++ u32 flags; ++ u32 ts; ++ u8 data[sizeof_field(struct can_frame, data)]; ++}; ++ ++struct mcp25xxfd_hw_rx_obj_canfd { ++ u32 id; ++ u32 flags; ++ u32 ts; ++ u8 data[sizeof_field(struct canfd_frame, data)]; ++}; ++ ++struct mcp25xxfd_tef_ring { ++ unsigned int head; ++ unsigned int tail; ++ ++ /* u8 obj_num equals tx_ring->obj_num */ ++ /* u8 obj_size equals sizeof(struct mcp25xxfd_hw_tef_obj) */ ++}; ++ ++struct __packed mcp25xxfd_buf_cmd { ++ __be16 cmd; ++}; ++ ++struct __packed mcp25xxfd_buf_cmd_crc { ++ __be16 cmd; ++ u8 len; ++}; ++ ++union mcp25xxfd_tx_obj_load_buf { ++ struct __packed { ++ struct mcp25xxfd_buf_cmd cmd; ++ struct mcp25xxfd_hw_tx_obj_raw hw_tx_obj; ++ } nocrc; ++ struct __packed { ++ struct mcp25xxfd_buf_cmd_crc cmd; ++ struct mcp25xxfd_hw_tx_obj_raw hw_tx_obj; ++ __be16 crc; ++ } crc; ++} ____cacheline_aligned; ++ ++union mcp25xxfd_write_reg_buf { ++ struct __packed { ++ struct mcp25xxfd_buf_cmd cmd; ++ u8 data[4]; ++ } nocrc; ++ struct __packed { ++ struct mcp25xxfd_buf_cmd_crc cmd; ++ u8 data[4]; ++ __be16 crc; ++ } crc; ++} ____cacheline_aligned; ++ ++struct mcp25xxfd_tx_obj { ++ struct spi_message msg; ++ struct spi_transfer xfer[2]; ++ union mcp25xxfd_tx_obj_load_buf buf; ++}; ++ ++struct mcp25xxfd_tx_ring { ++ unsigned int head; ++ unsigned int tail; ++ ++ u16 base; ++ u8 obj_num; ++ u8 obj_size; ++ ++ struct mcp25xxfd_tx_obj obj[MCP25XXFD_TX_OBJ_NUM_MAX]; ++ union mcp25xxfd_write_reg_buf rts_buf; ++}; ++ ++struct mcp25xxfd_rx_ring { ++ unsigned int head; ++ unsigned int tail; ++ ++ u16 base; ++ u8 nr; ++ u8 fifo_nr; ++ u8 obj_num; ++ u8 obj_size; ++ ++ struct mcp25xxfd_hw_rx_obj_canfd obj[]; ++}; ++ ++struct __packed mcp25xxfd_map_buf_nocrc { ++ struct mcp25xxfd_buf_cmd cmd; ++ u8 data[256]; ++} ____cacheline_aligned; ++ ++struct __packed mcp25xxfd_map_buf_crc { ++ struct mcp25xxfd_buf_cmd_crc cmd; ++ u8 data[256 - 4]; ++ __be16 crc; ++} ____cacheline_aligned; ++ ++struct mcp25xxfd_ecc { ++ u32 ecc_stat; ++ int cnt; ++}; ++ ++struct mcp25xxfd_regs_status { ++ u32 intf; ++}; ++ ++enum mcp25xxfd_model { ++ MCP25XXFD_MODEL_MCP2517FD = 0x2517, ++ MCP25XXFD_MODEL_MCP2518FD = 0x2518, ++ MCP25XXFD_MODEL_MCP25XXFD = 0xffff, /* autodetect model */ ++}; ++ ++struct mcp25xxfd_devtype_data { ++ enum mcp25xxfd_model model; ++ u32 quirks; ++}; ++ ++struct mcp25xxfd_priv { ++ struct can_priv can; ++ struct can_rx_offload offload; ++ struct net_device *ndev; ++ ++ struct regmap *map_reg; /* register access */ ++ struct regmap *map_rx; /* RX/TEF RAM access */ ++ ++ struct regmap *map_nocrc; ++ struct mcp25xxfd_map_buf_nocrc *map_buf_nocrc_rx; ++ struct mcp25xxfd_map_buf_nocrc *map_buf_nocrc_tx; ++ ++ struct regmap *map_crc; ++ struct mcp25xxfd_map_buf_crc *map_buf_crc_rx; ++ struct mcp25xxfd_map_buf_crc *map_buf_crc_tx; ++ ++ struct spi_device *spi; ++ u32 spi_max_speed_hz_orig; ++ ++ struct mcp25xxfd_tef_ring tef; ++ struct mcp25xxfd_tx_ring tx[1]; ++ struct mcp25xxfd_rx_ring *rx[1]; ++ ++ u8 rx_ring_num; ++ ++ struct mcp25xxfd_ecc ecc; ++ struct mcp25xxfd_regs_status regs_status; ++ ++ struct gpio_desc *rx_int; ++ struct clk *clk; ++ struct regulator *reg_vdd; ++ struct regulator *reg_xceiver; ++ ++ struct mcp25xxfd_devtype_data devtype_data; ++ struct can_berr_counter bec; ++}; ++ ++#define MCP25XXFD_IS(_model) \ ++static inline bool \ ++mcp25xxfd_is_##_model(const struct mcp25xxfd_priv *priv) \ ++{ \ ++ return priv->devtype_data.model == MCP25XXFD_MODEL_MCP##_model##FD; \ ++} ++ ++MCP25XXFD_IS(2517); ++MCP25XXFD_IS(2518); ++MCP25XXFD_IS(25XX); ++ ++static inline u8 mcp25xxfd_first_byte_set(u32 mask) ++{ ++ return (mask & 0x0000ffff) ? ++ ((mask & 0x000000ff) ? 0 : 1) : ++ ((mask & 0x00ff0000) ? 2 : 3); ++} ++ ++static inline u8 mcp25xxfd_last_byte_set(u32 mask) ++{ ++ return (mask & 0xffff0000) ? ++ ((mask & 0xff000000) ? 3 : 2) : ++ ((mask & 0x0000ff00) ? 1 : 0); ++} ++ ++static inline __be16 mcp25xxfd_cmd_reset(void) ++{ ++ return cpu_to_be16(MCP25XXFD_SPI_INSTRUCTION_RESET); ++} ++ ++static inline void ++mcp25xxfd_spi_cmd_read_nocrc(struct mcp25xxfd_buf_cmd *cmd, u16 addr) ++{ ++ cmd->cmd = cpu_to_be16(MCP25XXFD_SPI_INSTRUCTION_READ | addr); ++} ++ ++static inline void ++mcp25xxfd_spi_cmd_write_nocrc(struct mcp25xxfd_buf_cmd *cmd, u16 addr) ++{ ++ cmd->cmd = cpu_to_be16(MCP25XXFD_SPI_INSTRUCTION_WRITE | addr); ++} ++ ++static inline bool mcp25xxfd_reg_in_ram(unsigned int reg) ++{ ++ static const struct regmap_range range = ++ regmap_reg_range(MCP25XXFD_RAM_START, ++ MCP25XXFD_RAM_START + MCP25XXFD_RAM_SIZE - 4); ++ ++ return regmap_reg_in_range(reg, &range); ++} ++ ++static inline void ++__mcp25xxfd_spi_cmd_crc_set_len(struct mcp25xxfd_buf_cmd_crc *cmd, ++ u16 len, bool in_ram) ++{ ++ /* Number of u32 for RAM access, number of u8 otherwise. */ ++ if (in_ram) ++ cmd->len = len >> 2; ++ else ++ cmd->len = len; ++} ++ ++static inline void ++mcp25xxfd_spi_cmd_crc_set_len_in_ram(struct mcp25xxfd_buf_cmd_crc *cmd, u16 len) ++{ ++ __mcp25xxfd_spi_cmd_crc_set_len(cmd, len, true); ++} ++ ++static inline void ++mcp25xxfd_spi_cmd_crc_set_len_in_reg(struct mcp25xxfd_buf_cmd_crc *cmd, u16 len) ++{ ++ __mcp25xxfd_spi_cmd_crc_set_len(cmd, len, false); ++} ++ ++static inline void ++mcp25xxfd_spi_cmd_read_crc_set_addr(struct mcp25xxfd_buf_cmd_crc *cmd, u16 addr) ++{ ++ cmd->cmd = cpu_to_be16(MCP25XXFD_SPI_INSTRUCTION_READ_CRC | addr); ++} ++ ++static inline void ++mcp25xxfd_spi_cmd_read_crc(struct mcp25xxfd_buf_cmd_crc *cmd, ++ u16 addr, u16 len) ++{ ++ mcp25xxfd_spi_cmd_read_crc_set_addr(cmd, addr); ++ __mcp25xxfd_spi_cmd_crc_set_len(cmd, len, mcp25xxfd_reg_in_ram(addr)); ++} ++ ++static inline void ++mcp25xxfd_spi_cmd_write_crc_set_addr(struct mcp25xxfd_buf_cmd_crc *cmd, ++ u16 addr) ++{ ++ cmd->cmd = cpu_to_be16(MCP25XXFD_SPI_INSTRUCTION_WRITE_CRC | addr); ++} ++ ++static inline void ++mcp25xxfd_spi_cmd_write_crc(struct mcp25xxfd_buf_cmd_crc *cmd, ++ u16 addr, u16 len) ++{ ++ mcp25xxfd_spi_cmd_write_crc_set_addr(cmd, addr); ++ __mcp25xxfd_spi_cmd_crc_set_len(cmd, len, mcp25xxfd_reg_in_ram(addr)); ++} ++ ++static inline u8 * ++mcp25xxfd_spi_cmd_write(const struct mcp25xxfd_priv *priv, ++ union mcp25xxfd_write_reg_buf *write_reg_buf, ++ u16 addr) ++{ ++ u8 *data; ++ ++ if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_REG) { ++ mcp25xxfd_spi_cmd_write_crc_set_addr(&write_reg_buf->crc.cmd, ++ addr); ++ data = write_reg_buf->crc.data; ++ } else { ++ mcp25xxfd_spi_cmd_write_nocrc(&write_reg_buf->nocrc.cmd, ++ addr); ++ data = write_reg_buf->nocrc.data; ++ } ++ ++ return data; ++} ++ ++static inline u16 mcp25xxfd_get_tef_obj_addr(u8 n) ++{ ++ return MCP25XXFD_RAM_START + ++ sizeof(struct mcp25xxfd_hw_tef_obj) * n; ++} ++ ++static inline u16 ++mcp25xxfd_get_tx_obj_addr(const struct mcp25xxfd_tx_ring *ring, u8 n) ++{ ++ return ring->base + ring->obj_size * n; ++} ++ ++static inline u16 ++mcp25xxfd_get_rx_obj_addr(const struct mcp25xxfd_rx_ring *ring, u8 n) ++{ ++ return ring->base + ring->obj_size * n; ++} ++ ++static inline u8 mcp25xxfd_get_tef_head(const struct mcp25xxfd_priv *priv) ++{ ++ return priv->tef.head & (priv->tx->obj_num - 1); ++} ++ ++static inline u8 mcp25xxfd_get_tef_tail(const struct mcp25xxfd_priv *priv) ++{ ++ return priv->tef.tail & (priv->tx->obj_num - 1); ++} ++ ++static inline u8 mcp25xxfd_get_tef_len(const struct mcp25xxfd_priv *priv) ++{ ++ return priv->tef.head - priv->tef.tail; ++} ++ ++static inline u8 mcp25xxfd_get_tef_linear_len(const struct mcp25xxfd_priv *priv) ++{ ++ u8 len; ++ ++ len = mcp25xxfd_get_tef_len(priv); ++ ++ return min_t(u8, len, priv->tx->obj_num - mcp25xxfd_get_tef_tail(priv)); ++} ++ ++static inline u8 mcp25xxfd_get_tx_head(const struct mcp25xxfd_tx_ring *ring) ++{ ++ return ring->head & (ring->obj_num - 1); ++} ++ ++static inline u8 mcp25xxfd_get_tx_tail(const struct mcp25xxfd_tx_ring *ring) ++{ ++ return ring->tail & (ring->obj_num - 1); ++} ++ ++static inline u8 mcp25xxfd_get_tx_free(const struct mcp25xxfd_tx_ring *ring) ++{ ++ return ring->obj_num - (ring->head - ring->tail); ++} ++ ++static inline int ++mcp25xxfd_get_tx_nr_by_addr(const struct mcp25xxfd_tx_ring *tx_ring, u8 *nr, ++ u16 addr) ++{ ++ if (addr < mcp25xxfd_get_tx_obj_addr(tx_ring, 0) || ++ addr >= mcp25xxfd_get_tx_obj_addr(tx_ring, tx_ring->obj_num)) ++ return -ENOENT; ++ ++ *nr = (addr - mcp25xxfd_get_tx_obj_addr(tx_ring, 0)) / ++ tx_ring->obj_size; ++ ++ return 0; ++} ++ ++static inline u8 mcp25xxfd_get_rx_head(const struct mcp25xxfd_rx_ring *ring) ++{ ++ return ring->head & (ring->obj_num - 1); ++} ++ ++static inline u8 mcp25xxfd_get_rx_tail(const struct mcp25xxfd_rx_ring *ring) ++{ ++ return ring->tail & (ring->obj_num - 1); ++} ++ ++static inline u8 mcp25xxfd_get_rx_len(const struct mcp25xxfd_rx_ring *ring) ++{ ++ return ring->head - ring->tail; ++} ++ ++static inline u8 ++mcp25xxfd_get_rx_linear_len(const struct mcp25xxfd_rx_ring *ring) ++{ ++ u8 len; ++ ++ len = mcp25xxfd_get_rx_len(ring); ++ ++ return min_t(u8, len, ring->obj_num - mcp25xxfd_get_rx_tail(ring)); ++} ++ ++#define mcp25xxfd_for_each_tx_obj(ring, _obj, n) \ ++ for ((n) = 0, (_obj) = &(ring)->obj[(n)]; \ ++ (n) < (ring)->obj_num; \ ++ (n)++, (_obj) = &(ring)->obj[(n)]) ++ ++#define mcp25xxfd_for_each_rx_ring(priv, ring, n) \ ++ for ((n) = 0, (ring) = *((priv)->rx + (n)); \ ++ (n) < (priv)->rx_ring_num; \ ++ (n)++, (ring) = *((priv)->rx + (n))) ++ ++int mcp25xxfd_regmap_init(struct mcp25xxfd_priv *priv); ++u16 mcp25xxfd_crc16_compute2(const void *cmd, size_t cmd_size, ++ const void *data, size_t data_size); ++u16 mcp25xxfd_crc16_compute(const void *data, size_t data_size); ++ ++#endif +-- +2.18.4 + + +From 7045dd4228387be904460d02d5055cbb17e73fd8 Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde +Date: Fri, 18 Sep 2020 19:25:33 +0200 +Subject: [PATCH 1180/1209] can: mcp25xxfd: add driver for Microchip MCP25xxFD + SPI CAN + +This patch adds support for the Microchip MCP25xxFD SPI CAN controller family. + +Tested-by: Kurt Van Dijck +Tested-by: Manivannan Sadhasivam +Signed-off-by: Marc Kleine-Budde +Link: https://lore.kernel.org/r/20200918172536.2074504-4-mkl@pengutronix.de +(cherry picked from commit 55e5b97f003e85e66babb55f357627d52081a264) +[mkl: ported to v5.4, changed + cs_change_delay.unit -> cs_change_delay_unit, + cs_change_delay.value -> cs_change_delay] +Signed-off-by: Marc Kleine-Budde +--- + drivers/net/can/spi/mcp25xxfd/Makefile | 1 + + .../net/can/spi/mcp25xxfd/mcp25xxfd-core.c | 2907 +++++++++++++++++ + 2 files changed, 2908 insertions(+) + create mode 100644 drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c + +diff --git a/drivers/net/can/spi/mcp25xxfd/Makefile b/drivers/net/can/spi/mcp25xxfd/Makefile +index 9dadf0070b42..4e17f592e22e 100644 +--- a/drivers/net/can/spi/mcp25xxfd/Makefile ++++ b/drivers/net/can/spi/mcp25xxfd/Makefile +@@ -3,5 +3,6 @@ + obj-$(CONFIG_CAN_MCP25XXFD) += mcp25xxfd.o + + mcp25xxfd-objs := ++mcp25xxfd-objs += mcp25xxfd-core.o + mcp25xxfd-objs += mcp25xxfd-crc16.o + mcp25xxfd-objs += mcp25xxfd-regmap.o +diff --git a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c +new file mode 100644 +index 000000000000..eed20e132ddb +--- /dev/null ++++ b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c +@@ -0,0 +1,2907 @@ ++// SPDX-License-Identifier: GPL-2.0 ++// ++// mcp25xxfd - Microchip MCP25xxFD Family CAN controller driver ++// ++// Copyright (c) 2019, 2020 Pengutronix, ++// Marc Kleine-Budde ++// ++// Based on: ++// ++// CAN bus driver for Microchip 25XXFD CAN Controller with SPI Interface ++// ++// Copyright (c) 2019 Martin Sperl ++// ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "mcp25xxfd.h" ++ ++#define DEVICE_NAME "mcp25xxfd" ++ ++static const struct mcp25xxfd_devtype_data mcp25xxfd_devtype_data_mcp2517fd = { ++ .quirks = MCP25XXFD_QUIRK_MAB_NO_WARN | MCP25XXFD_QUIRK_CRC_REG | ++ MCP25XXFD_QUIRK_CRC_RX | MCP25XXFD_QUIRK_CRC_TX | ++ MCP25XXFD_QUIRK_ECC, ++ .model = MCP25XXFD_MODEL_MCP2517FD, ++}; ++ ++static const struct mcp25xxfd_devtype_data mcp25xxfd_devtype_data_mcp2518fd = { ++ .quirks = MCP25XXFD_QUIRK_CRC_REG | MCP25XXFD_QUIRK_CRC_RX | ++ MCP25XXFD_QUIRK_CRC_TX | MCP25XXFD_QUIRK_ECC, ++ .model = MCP25XXFD_MODEL_MCP2518FD, ++}; ++ ++/* Autodetect model, start with CRC enabled. */ ++static const struct mcp25xxfd_devtype_data mcp25xxfd_devtype_data_mcp25xxfd = { ++ .quirks = MCP25XXFD_QUIRK_CRC_REG | MCP25XXFD_QUIRK_CRC_RX | ++ MCP25XXFD_QUIRK_CRC_TX | MCP25XXFD_QUIRK_ECC, ++ .model = MCP25XXFD_MODEL_MCP25XXFD, ++}; ++ ++static const struct can_bittiming_const mcp25xxfd_bittiming_const = { ++ .name = DEVICE_NAME, ++ .tseg1_min = 2, ++ .tseg1_max = 256, ++ .tseg2_min = 1, ++ .tseg2_max = 128, ++ .sjw_max = 128, ++ .brp_min = 1, ++ .brp_max = 256, ++ .brp_inc = 1, ++}; ++ ++static const struct can_bittiming_const mcp25xxfd_data_bittiming_const = { ++ .name = DEVICE_NAME, ++ .tseg1_min = 1, ++ .tseg1_max = 32, ++ .tseg2_min = 1, ++ .tseg2_max = 16, ++ .sjw_max = 16, ++ .brp_min = 1, ++ .brp_max = 256, ++ .brp_inc = 1, ++}; ++ ++static const char *__mcp25xxfd_get_model_str(enum mcp25xxfd_model model) ++{ ++ switch (model) { ++ case MCP25XXFD_MODEL_MCP2517FD: ++ return "MCP2517FD"; break; ++ case MCP25XXFD_MODEL_MCP2518FD: ++ return "MCP2518FD"; break; ++ case MCP25XXFD_MODEL_MCP25XXFD: ++ return "MCP25xxFD"; break; ++ } ++ ++ return ""; ++} ++ ++static inline const char * ++mcp25xxfd_get_model_str(const struct mcp25xxfd_priv *priv) ++{ ++ return __mcp25xxfd_get_model_str(priv->devtype_data.model); ++} ++ ++static const char *mcp25xxfd_get_mode_str(const u8 mode) ++{ ++ switch (mode) { ++ case MCP25XXFD_REG_CON_MODE_MIXED: ++ return "Mixed (CAN FD/CAN 2.0)"; break; ++ case MCP25XXFD_REG_CON_MODE_SLEEP: ++ return "Sleep"; break; ++ case MCP25XXFD_REG_CON_MODE_INT_LOOPBACK: ++ return "Internal Loopback"; break; ++ case MCP25XXFD_REG_CON_MODE_LISTENONLY: ++ return "Listen Only"; break; ++ case MCP25XXFD_REG_CON_MODE_CONFIG: ++ return "Configuration"; break; ++ case MCP25XXFD_REG_CON_MODE_EXT_LOOPBACK: ++ return "External Loopback"; break; ++ case MCP25XXFD_REG_CON_MODE_CAN2_0: ++ return "CAN 2.0"; break; ++ case MCP25XXFD_REG_CON_MODE_RESTRICTED: ++ return "Restricted Operation"; break; ++ } ++ ++ return ""; ++} ++ ++static inline int mcp25xxfd_vdd_enable(const struct mcp25xxfd_priv *priv) ++{ ++ if (!priv->reg_vdd) ++ return 0; ++ ++ return regulator_enable(priv->reg_vdd); ++} ++ ++static inline int mcp25xxfd_vdd_disable(const struct mcp25xxfd_priv *priv) ++{ ++ if (!priv->reg_vdd) ++ return 0; ++ ++ return regulator_disable(priv->reg_vdd); ++} ++ ++static inline int ++mcp25xxfd_transceiver_enable(const struct mcp25xxfd_priv *priv) ++{ ++ if (!priv->reg_xceiver) ++ return 0; ++ ++ return regulator_enable(priv->reg_xceiver); ++} ++ ++static inline int ++mcp25xxfd_transceiver_disable(const struct mcp25xxfd_priv *priv) ++{ ++ if (!priv->reg_xceiver) ++ return 0; ++ ++ return regulator_disable(priv->reg_xceiver); ++} ++ ++static int mcp25xxfd_clks_and_vdd_enable(const struct mcp25xxfd_priv *priv) ++{ ++ int err; ++ ++ err = clk_prepare_enable(priv->clk); ++ if (err) ++ return err; ++ ++ err = mcp25xxfd_vdd_enable(priv); ++ if (err) ++ clk_disable_unprepare(priv->clk); ++ ++ /* Wait for oscillator stabilisation time after power up */ ++ usleep_range(MCP25XXFD_OSC_STAB_SLEEP_US, ++ 2 * MCP25XXFD_OSC_STAB_SLEEP_US); ++ ++ return err; ++} ++ ++static int mcp25xxfd_clks_and_vdd_disable(const struct mcp25xxfd_priv *priv) ++{ ++ int err; ++ ++ err = mcp25xxfd_vdd_disable(priv); ++ if (err) ++ return err; ++ ++ clk_disable_unprepare(priv->clk); ++ ++ return 0; ++} ++ ++static inline u8 ++mcp25xxfd_cmd_prepare_write_reg(const struct mcp25xxfd_priv *priv, ++ union mcp25xxfd_write_reg_buf *write_reg_buf, ++ const u16 reg, const u32 mask, const u32 val) ++{ ++ u8 first_byte, last_byte, len; ++ u8 *data; ++ __le32 val_le32; ++ ++ first_byte = mcp25xxfd_first_byte_set(mask); ++ last_byte = mcp25xxfd_last_byte_set(mask); ++ len = last_byte - first_byte + 1; ++ ++ data = mcp25xxfd_spi_cmd_write(priv, write_reg_buf, reg + first_byte); ++ val_le32 = cpu_to_le32(val >> BITS_PER_BYTE * first_byte); ++ memcpy(data, &val_le32, len); ++ ++ if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_REG) { ++ u16 crc; ++ ++ mcp25xxfd_spi_cmd_crc_set_len_in_reg(&write_reg_buf->crc.cmd, ++ len); ++ /* CRC */ ++ len += sizeof(write_reg_buf->crc.cmd); ++ crc = mcp25xxfd_crc16_compute(&write_reg_buf->crc, len); ++ put_unaligned_be16(crc, (void *)write_reg_buf + len); ++ ++ /* Total length */ ++ len += sizeof(write_reg_buf->crc.crc); ++ } else { ++ len += sizeof(write_reg_buf->nocrc.cmd); ++ } ++ ++ return len; ++} ++ ++static inline int ++mcp25xxfd_tef_tail_get_from_chip(const struct mcp25xxfd_priv *priv, ++ u8 *tef_tail) ++{ ++ u32 tef_ua; ++ int err; ++ ++ err = regmap_read(priv->map_reg, MCP25XXFD_REG_TEFUA, &tef_ua); ++ if (err) ++ return err; ++ ++ *tef_tail = tef_ua / sizeof(struct mcp25xxfd_hw_tef_obj); ++ ++ return 0; ++} ++ ++static inline int ++mcp25xxfd_tx_tail_get_from_chip(const struct mcp25xxfd_priv *priv, ++ u8 *tx_tail) ++{ ++ u32 fifo_sta; ++ int err; ++ ++ err = regmap_read(priv->map_reg, ++ MCP25XXFD_REG_FIFOSTA(MCP25XXFD_TX_FIFO), ++ &fifo_sta); ++ if (err) ++ return err; ++ ++ *tx_tail = FIELD_GET(MCP25XXFD_REG_FIFOSTA_FIFOCI_MASK, fifo_sta); ++ ++ return 0; ++} ++ ++static inline int ++mcp25xxfd_rx_head_get_from_chip(const struct mcp25xxfd_priv *priv, ++ const struct mcp25xxfd_rx_ring *ring, ++ u8 *rx_head) ++{ ++ u32 fifo_sta; ++ int err; ++ ++ err = regmap_read(priv->map_reg, MCP25XXFD_REG_FIFOSTA(ring->fifo_nr), ++ &fifo_sta); ++ if (err) ++ return err; ++ ++ *rx_head = FIELD_GET(MCP25XXFD_REG_FIFOSTA_FIFOCI_MASK, fifo_sta); ++ ++ return 0; ++} ++ ++static inline int ++mcp25xxfd_rx_tail_get_from_chip(const struct mcp25xxfd_priv *priv, ++ const struct mcp25xxfd_rx_ring *ring, ++ u8 *rx_tail) ++{ ++ u32 fifo_ua; ++ int err; ++ ++ err = regmap_read(priv->map_reg, MCP25XXFD_REG_FIFOUA(ring->fifo_nr), ++ &fifo_ua); ++ if (err) ++ return err; ++ ++ fifo_ua -= ring->base - MCP25XXFD_RAM_START; ++ *rx_tail = fifo_ua / ring->obj_size; ++ ++ return 0; ++} ++ ++static void ++mcp25xxfd_tx_ring_init_tx_obj(const struct mcp25xxfd_priv *priv, ++ const struct mcp25xxfd_tx_ring *ring, ++ struct mcp25xxfd_tx_obj *tx_obj, ++ const u8 rts_buf_len, ++ const u8 n) ++{ ++ struct spi_transfer *xfer; ++ u16 addr; ++ ++ /* FIFO load */ ++ addr = mcp25xxfd_get_tx_obj_addr(ring, n); ++ if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_TX) ++ mcp25xxfd_spi_cmd_write_crc_set_addr(&tx_obj->buf.crc.cmd, ++ addr); ++ else ++ mcp25xxfd_spi_cmd_write_nocrc(&tx_obj->buf.nocrc.cmd, ++ addr); ++ ++ xfer = &tx_obj->xfer[0]; ++ xfer->tx_buf = &tx_obj->buf; ++ xfer->len = 0; /* actual len is assigned on the fly */ ++ xfer->cs_change = 1; ++ xfer->cs_change_delay = 0; ++ xfer->cs_change_delay_unit = SPI_DELAY_UNIT_NSECS; ++ ++ /* FIFO request to send */ ++ xfer = &tx_obj->xfer[1]; ++ xfer->tx_buf = &ring->rts_buf; ++ xfer->len = rts_buf_len; ++ ++ /* SPI message */ ++ spi_message_init_with_transfers(&tx_obj->msg, tx_obj->xfer, ++ ARRAY_SIZE(tx_obj->xfer)); ++} ++ ++static void mcp25xxfd_ring_init(struct mcp25xxfd_priv *priv) ++{ ++ struct mcp25xxfd_tx_ring *tx_ring; ++ struct mcp25xxfd_rx_ring *rx_ring, *prev_rx_ring = NULL; ++ struct mcp25xxfd_tx_obj *tx_obj; ++ u32 val; ++ u16 addr; ++ u8 len; ++ int i; ++ ++ /* TEF */ ++ priv->tef.head = 0; ++ priv->tef.tail = 0; ++ ++ /* TX */ ++ tx_ring = priv->tx; ++ tx_ring->head = 0; ++ tx_ring->tail = 0; ++ tx_ring->base = mcp25xxfd_get_tef_obj_addr(tx_ring->obj_num); ++ ++ /* FIFO request to send */ ++ addr = MCP25XXFD_REG_FIFOCON(MCP25XXFD_TX_FIFO); ++ val = MCP25XXFD_REG_FIFOCON_TXREQ | MCP25XXFD_REG_FIFOCON_UINC; ++ len = mcp25xxfd_cmd_prepare_write_reg(priv, &tx_ring->rts_buf, ++ addr, val, val); ++ ++ mcp25xxfd_for_each_tx_obj(tx_ring, tx_obj, i) ++ mcp25xxfd_tx_ring_init_tx_obj(priv, tx_ring, tx_obj, len, i); ++ ++ /* RX */ ++ mcp25xxfd_for_each_rx_ring(priv, rx_ring, i) { ++ rx_ring->head = 0; ++ rx_ring->tail = 0; ++ rx_ring->nr = i; ++ rx_ring->fifo_nr = MCP25XXFD_RX_FIFO(i); ++ ++ if (!prev_rx_ring) ++ rx_ring->base = ++ mcp25xxfd_get_tx_obj_addr(tx_ring, ++ tx_ring->obj_num); ++ else ++ rx_ring->base = prev_rx_ring->base + ++ prev_rx_ring->obj_size * ++ prev_rx_ring->obj_num; ++ ++ prev_rx_ring = rx_ring; ++ } ++} ++ ++static void mcp25xxfd_ring_free(struct mcp25xxfd_priv *priv) ++{ ++ int i; ++ ++ for (i = ARRAY_SIZE(priv->rx) - 1; i > 0; i--) { ++ kfree(priv->rx[i]); ++ priv->rx[i] = NULL; ++ } ++} ++ ++static int mcp25xxfd_ring_alloc(struct mcp25xxfd_priv *priv) ++{ ++ struct mcp25xxfd_tx_ring *tx_ring; ++ struct mcp25xxfd_rx_ring *rx_ring; ++ int tef_obj_size, tx_obj_size, rx_obj_size; ++ int tx_obj_num; ++ int ram_free, i; ++ ++ tef_obj_size = sizeof(struct mcp25xxfd_hw_tef_obj); ++ if (priv->can.ctrlmode & CAN_CTRLMODE_FD) { ++ tx_obj_num = MCP25XXFD_TX_OBJ_NUM_CANFD; ++ tx_obj_size = sizeof(struct mcp25xxfd_hw_tx_obj_canfd); ++ rx_obj_size = sizeof(struct mcp25xxfd_hw_rx_obj_canfd); ++ } else { ++ tx_obj_num = MCP25XXFD_TX_OBJ_NUM_CAN; ++ tx_obj_size = sizeof(struct mcp25xxfd_hw_tx_obj_can); ++ rx_obj_size = sizeof(struct mcp25xxfd_hw_rx_obj_can); ++ } ++ ++ tx_ring = priv->tx; ++ tx_ring->obj_num = tx_obj_num; ++ tx_ring->obj_size = tx_obj_size; ++ ++ ram_free = MCP25XXFD_RAM_SIZE - tx_obj_num * ++ (tef_obj_size + tx_obj_size); ++ ++ for (i = 0; ++ i < ARRAY_SIZE(priv->rx) && ram_free >= rx_obj_size; ++ i++) { ++ int rx_obj_num; ++ ++ rx_obj_num = ram_free / rx_obj_size; ++ rx_obj_num = min(1 << (fls(rx_obj_num) - 1), 32); ++ ++ rx_ring = kzalloc(sizeof(*rx_ring) + rx_obj_size * rx_obj_num, ++ GFP_KERNEL); ++ if (!rx_ring) { ++ mcp25xxfd_ring_free(priv); ++ return -ENOMEM; ++ } ++ rx_ring->obj_num = rx_obj_num; ++ rx_ring->obj_size = rx_obj_size; ++ priv->rx[i] = rx_ring; ++ ++ ram_free -= rx_ring->obj_num * rx_ring->obj_size; ++ } ++ priv->rx_ring_num = i; ++ ++ netdev_dbg(priv->ndev, ++ "FIFO setup: TEF: %d*%d bytes = %d bytes, TX: %d*%d bytes = %d bytes\n", ++ tx_obj_num, tef_obj_size, tef_obj_size * tx_obj_num, ++ tx_obj_num, tx_obj_size, tx_obj_size * tx_obj_num); ++ ++ mcp25xxfd_for_each_rx_ring(priv, rx_ring, i) { ++ netdev_dbg(priv->ndev, ++ "FIFO setup: RX-%d: %d*%d bytes = %d bytes\n", ++ i, rx_ring->obj_num, rx_ring->obj_size, ++ rx_ring->obj_size * rx_ring->obj_num); ++ } ++ ++ netdev_dbg(priv->ndev, ++ "FIFO setup: free: %d bytes\n", ++ ram_free); ++ ++ return 0; ++} ++ ++static inline int ++mcp25xxfd_chip_get_mode(const struct mcp25xxfd_priv *priv, u8 *mode) ++{ ++ u32 val; ++ int err; ++ ++ err = regmap_read(priv->map_reg, MCP25XXFD_REG_CON, &val); ++ if (err) ++ return err; ++ ++ *mode = FIELD_GET(MCP25XXFD_REG_CON_OPMOD_MASK, val); ++ ++ return 0; ++} ++ ++static int ++__mcp25xxfd_chip_set_mode(const struct mcp25xxfd_priv *priv, ++ const u8 mode_req, bool nowait) ++{ ++ u32 con, con_reqop; ++ int err; ++ ++ con_reqop = FIELD_PREP(MCP25XXFD_REG_CON_REQOP_MASK, mode_req); ++ err = regmap_update_bits(priv->map_reg, MCP25XXFD_REG_CON, ++ MCP25XXFD_REG_CON_REQOP_MASK, con_reqop); ++ if (err) ++ return err; ++ ++ if (mode_req == MCP25XXFD_REG_CON_MODE_SLEEP || nowait) ++ return 0; ++ ++ err = regmap_read_poll_timeout(priv->map_reg, MCP25XXFD_REG_CON, con, ++ FIELD_GET(MCP25XXFD_REG_CON_OPMOD_MASK, ++ con) == mode_req, ++ MCP25XXFD_POLL_SLEEP_US, ++ MCP25XXFD_POLL_TIMEOUT_US); ++ if (err) { ++ u8 mode = FIELD_GET(MCP25XXFD_REG_CON_OPMOD_MASK, con); ++ ++ netdev_err(priv->ndev, ++ "Controller failed to enter mode %s Mode (%u) and stays in %s Mode (%u).\n", ++ mcp25xxfd_get_mode_str(mode_req), mode_req, ++ mcp25xxfd_get_mode_str(mode), mode); ++ return err; ++ } ++ ++ return 0; ++} ++ ++static inline int ++mcp25xxfd_chip_set_mode(const struct mcp25xxfd_priv *priv, ++ const u8 mode_req) ++{ ++ return __mcp25xxfd_chip_set_mode(priv, mode_req, false); ++} ++ ++static inline int ++mcp25xxfd_chip_set_mode_nowait(const struct mcp25xxfd_priv *priv, ++ const u8 mode_req) ++{ ++ return __mcp25xxfd_chip_set_mode(priv, mode_req, true); ++} ++ ++static inline bool mcp25xxfd_osc_invalid(u32 reg) ++{ ++ return reg == 0x0 || reg == 0xffffffff; ++} ++ ++static int mcp25xxfd_chip_clock_enable(const struct mcp25xxfd_priv *priv) ++{ ++ u32 osc, osc_reference, osc_mask; ++ int err; ++ ++ /* Set Power On Defaults for "Clock Output Divisor" and remove ++ * "Oscillator Disable" bit. ++ */ ++ osc = FIELD_PREP(MCP25XXFD_REG_OSC_CLKODIV_MASK, ++ MCP25XXFD_REG_OSC_CLKODIV_10); ++ osc_reference = MCP25XXFD_REG_OSC_OSCRDY; ++ osc_mask = MCP25XXFD_REG_OSC_OSCRDY | MCP25XXFD_REG_OSC_PLLRDY; ++ ++ /* Note: ++ * ++ * If the controller is in Sleep Mode the following write only ++ * removes the "Oscillator Disable" bit and powers it up. All ++ * other bits are unaffected. ++ */ ++ err = regmap_write(priv->map_reg, MCP25XXFD_REG_OSC, osc); ++ if (err) ++ return err; ++ ++ /* Wait for "Oscillator Ready" bit */ ++ err = regmap_read_poll_timeout(priv->map_reg, MCP25XXFD_REG_OSC, osc, ++ (osc & osc_mask) == osc_reference, ++ MCP25XXFD_OSC_STAB_SLEEP_US, ++ MCP25XXFD_OSC_STAB_TIMEOUT_US); ++ if (mcp25xxfd_osc_invalid(osc)) { ++ netdev_err(priv->ndev, ++ "Failed to detect %s (osc=0x%08x).\n", ++ mcp25xxfd_get_model_str(priv), osc); ++ return -ENODEV; ++ } else if (err == -ETIMEDOUT) { ++ netdev_err(priv->ndev, ++ "Timeout waiting for Oscillator Ready (osc=0x%08x, osc_reference=0x%08x)\n", ++ osc, osc_reference); ++ return -ETIMEDOUT; ++ } else if (err) { ++ return err; ++ } ++ ++ return 0; ++} ++ ++static int mcp25xxfd_chip_softreset_do(const struct mcp25xxfd_priv *priv) ++{ ++ const __be16 cmd = mcp25xxfd_cmd_reset(); ++ int err; ++ ++ /* The Set Mode and SPI Reset command only seems to works if ++ * the controller is not in Sleep Mode. ++ */ ++ err = mcp25xxfd_chip_clock_enable(priv); ++ if (err) ++ return err; ++ ++ err = mcp25xxfd_chip_set_mode(priv, MCP25XXFD_REG_CON_MODE_CONFIG); ++ if (err) ++ return err; ++ ++ /* spi_write_then_read() works with non DMA-safe buffers */ ++ return spi_write_then_read(priv->spi, &cmd, sizeof(cmd), NULL, 0); ++} ++ ++static int mcp25xxfd_chip_softreset_check(const struct mcp25xxfd_priv *priv) ++{ ++ u32 osc, osc_reference; ++ u8 mode; ++ int err; ++ ++ err = mcp25xxfd_chip_get_mode(priv, &mode); ++ if (err) ++ return err; ++ ++ if (mode != MCP25XXFD_REG_CON_MODE_CONFIG) { ++ netdev_info(priv->ndev, ++ "Controller not in Config Mode after reset, but in %s Mode (%u).\n", ++ mcp25xxfd_get_mode_str(mode), mode); ++ return -ETIMEDOUT; ++ } ++ ++ osc_reference = MCP25XXFD_REG_OSC_OSCRDY | ++ FIELD_PREP(MCP25XXFD_REG_OSC_CLKODIV_MASK, ++ MCP25XXFD_REG_OSC_CLKODIV_10); ++ ++ /* check reset defaults of OSC reg */ ++ err = regmap_read(priv->map_reg, MCP25XXFD_REG_OSC, &osc); ++ if (err) ++ return err; ++ ++ if (osc != osc_reference) { ++ netdev_info(priv->ndev, ++ "Controller failed to reset. osc=0x%08x, reference value=0x%08x\n", ++ osc, osc_reference); ++ return -ETIMEDOUT; ++ } ++ ++ return 0; ++} ++ ++static int mcp25xxfd_chip_softreset(const struct mcp25xxfd_priv *priv) ++{ ++ int err, i; ++ ++ for (i = 0; i < MCP25XXFD_SOFTRESET_RETRIES_MAX; i++) { ++ if (i) ++ netdev_info(priv->ndev, ++ "Retrying to reset Controller.\n"); ++ ++ err = mcp25xxfd_chip_softreset_do(priv); ++ if (err == -ETIMEDOUT) ++ continue; ++ if (err) ++ return err; ++ ++ err = mcp25xxfd_chip_softreset_check(priv); ++ if (err == -ETIMEDOUT) ++ continue; ++ if (err) ++ return err; ++ ++ return 0; ++ } ++ ++ if (err) ++ return err; ++ ++ return -ETIMEDOUT; ++} ++ ++static int mcp25xxfd_chip_clock_init(const struct mcp25xxfd_priv *priv) ++{ ++ u32 osc; ++ int err; ++ ++ /* Activate Low Power Mode on Oscillator Disable. This only ++ * works on the MCP2518FD. The MCP2517FD will go into normal ++ * Sleep Mode instead. ++ */ ++ osc = MCP25XXFD_REG_OSC_LPMEN | ++ FIELD_PREP(MCP25XXFD_REG_OSC_CLKODIV_MASK, ++ MCP25XXFD_REG_OSC_CLKODIV_10); ++ err = regmap_write(priv->map_reg, MCP25XXFD_REG_OSC, osc); ++ if (err) ++ return err; ++ ++ /* Set Time Base Counter Prescaler to 1. ++ * ++ * This means an overflow of the 32 bit Time Base Counter ++ * register at 40 MHz every 107 seconds. ++ */ ++ return regmap_write(priv->map_reg, MCP25XXFD_REG_TSCON, ++ MCP25XXFD_REG_TSCON_TBCEN); ++} ++ ++static int mcp25xxfd_set_bittiming(const struct mcp25xxfd_priv *priv) ++{ ++ const struct can_bittiming *bt = &priv->can.bittiming; ++ const struct can_bittiming *dbt = &priv->can.data_bittiming; ++ u32 val = 0; ++ s8 tdco; ++ int err; ++ ++ /* CAN Control Register ++ * ++ * - no transmit bandwidth sharing ++ * - config mode ++ * - disable transmit queue ++ * - store in transmit FIFO event ++ * - transition to restricted operation mode on system error ++ * - ESI is transmitted recessive when ESI of message is high or ++ * CAN controller error passive ++ * - restricted retransmission attempts, ++ * use TQXCON_TXAT and FIFOCON_TXAT ++ * - wake-up filter bits T11FILTER ++ * - use CAN bus line filter for wakeup ++ * - protocol exception is treated as a form error ++ * - Do not compare data bytes ++ */ ++ val = FIELD_PREP(MCP25XXFD_REG_CON_REQOP_MASK, ++ MCP25XXFD_REG_CON_MODE_CONFIG) | ++ MCP25XXFD_REG_CON_STEF | ++ MCP25XXFD_REG_CON_ESIGM | ++ MCP25XXFD_REG_CON_RTXAT | ++ FIELD_PREP(MCP25XXFD_REG_CON_WFT_MASK, ++ MCP25XXFD_REG_CON_WFT_T11FILTER) | ++ MCP25XXFD_REG_CON_WAKFIL | ++ MCP25XXFD_REG_CON_PXEDIS; ++ ++ if (!(priv->can.ctrlmode & CAN_CTRLMODE_FD_NON_ISO)) ++ val |= MCP25XXFD_REG_CON_ISOCRCEN; ++ ++ err = regmap_write(priv->map_reg, MCP25XXFD_REG_CON, val); ++ if (err) ++ return err; ++ ++ /* Nominal Bit Time */ ++ val = FIELD_PREP(MCP25XXFD_REG_NBTCFG_BRP_MASK, bt->brp - 1) | ++ FIELD_PREP(MCP25XXFD_REG_NBTCFG_TSEG1_MASK, ++ bt->prop_seg + bt->phase_seg1 - 1) | ++ FIELD_PREP(MCP25XXFD_REG_NBTCFG_TSEG2_MASK, ++ bt->phase_seg2 - 1) | ++ FIELD_PREP(MCP25XXFD_REG_NBTCFG_SJW_MASK, bt->sjw - 1); ++ ++ err = regmap_write(priv->map_reg, MCP25XXFD_REG_NBTCFG, val); ++ if (err) ++ return err; ++ ++ if (!(priv->can.ctrlmode & CAN_CTRLMODE_FD)) ++ return 0; ++ ++ /* Data Bit Time */ ++ val = FIELD_PREP(MCP25XXFD_REG_DBTCFG_BRP_MASK, dbt->brp - 1) | ++ FIELD_PREP(MCP25XXFD_REG_DBTCFG_TSEG1_MASK, ++ dbt->prop_seg + dbt->phase_seg1 - 1) | ++ FIELD_PREP(MCP25XXFD_REG_DBTCFG_TSEG2_MASK, ++ dbt->phase_seg2 - 1) | ++ FIELD_PREP(MCP25XXFD_REG_DBTCFG_SJW_MASK, dbt->sjw - 1); ++ ++ err = regmap_write(priv->map_reg, MCP25XXFD_REG_DBTCFG, val); ++ if (err) ++ return err; ++ ++ /* Transmitter Delay Compensation */ ++ tdco = clamp_t(int, dbt->brp * (dbt->prop_seg + dbt->phase_seg1), ++ -64, 63); ++ val = FIELD_PREP(MCP25XXFD_REG_TDC_TDCMOD_MASK, ++ MCP25XXFD_REG_TDC_TDCMOD_AUTO) | ++ FIELD_PREP(MCP25XXFD_REG_TDC_TDCO_MASK, tdco); ++ ++ return regmap_write(priv->map_reg, MCP25XXFD_REG_TDC, val); ++} ++ ++static int mcp25xxfd_chip_rx_int_enable(const struct mcp25xxfd_priv *priv) ++{ ++ u32 val; ++ ++ if (!priv->rx_int) ++ return 0; ++ ++ /* Configure GPIOs: ++ * - PIN0: GPIO Input ++ * - PIN1: GPIO Input/RX Interrupt ++ * ++ * PIN1 must be Input, otherwise there is a glitch on the ++ * rx-INT line. It happens between setting the PIN as output ++ * (in the first byte of the SPI transfer) and configuring the ++ * PIN as interrupt (in the last byte of the SPI transfer). ++ */ ++ val = MCP25XXFD_REG_IOCON_PM0 | MCP25XXFD_REG_IOCON_TRIS1 | ++ MCP25XXFD_REG_IOCON_TRIS0; ++ return regmap_write(priv->map_reg, MCP25XXFD_REG_IOCON, val); ++} ++ ++static int mcp25xxfd_chip_rx_int_disable(const struct mcp25xxfd_priv *priv) ++{ ++ u32 val; ++ ++ if (!priv->rx_int) ++ return 0; ++ ++ /* Configure GPIOs: ++ * - PIN0: GPIO Input ++ * - PIN1: GPIO Input ++ */ ++ val = MCP25XXFD_REG_IOCON_PM1 | MCP25XXFD_REG_IOCON_PM0 | ++ MCP25XXFD_REG_IOCON_TRIS1 | MCP25XXFD_REG_IOCON_TRIS0; ++ return regmap_write(priv->map_reg, MCP25XXFD_REG_IOCON, val); ++} ++ ++static int ++mcp25xxfd_chip_rx_fifo_init_one(const struct mcp25xxfd_priv *priv, ++ const struct mcp25xxfd_rx_ring *ring) ++{ ++ u32 fifo_con; ++ ++ /* Enable RXOVIE on _all_ RX FIFOs, not just the last one. ++ * ++ * FIFOs hit by a RX MAB overflow and RXOVIE enabled will ++ * generate a RXOVIF, use this to properly detect RX MAB ++ * overflows. ++ */ ++ fifo_con = FIELD_PREP(MCP25XXFD_REG_FIFOCON_FSIZE_MASK, ++ ring->obj_num - 1) | ++ MCP25XXFD_REG_FIFOCON_RXTSEN | ++ MCP25XXFD_REG_FIFOCON_RXOVIE | ++ MCP25XXFD_REG_FIFOCON_TFNRFNIE; ++ ++ if (priv->can.ctrlmode & CAN_CTRLMODE_FD) ++ fifo_con |= FIELD_PREP(MCP25XXFD_REG_FIFOCON_PLSIZE_MASK, ++ MCP25XXFD_REG_FIFOCON_PLSIZE_64); ++ else ++ fifo_con |= FIELD_PREP(MCP25XXFD_REG_FIFOCON_PLSIZE_MASK, ++ MCP25XXFD_REG_FIFOCON_PLSIZE_8); ++ ++ return regmap_write(priv->map_reg, ++ MCP25XXFD_REG_FIFOCON(ring->fifo_nr), fifo_con); ++} ++ ++static int ++mcp25xxfd_chip_rx_filter_init_one(const struct mcp25xxfd_priv *priv, ++ const struct mcp25xxfd_rx_ring *ring) ++{ ++ u32 fltcon; ++ ++ fltcon = MCP25XXFD_REG_FLTCON_FLTEN(ring->nr) | ++ MCP25XXFD_REG_FLTCON_FBP(ring->nr, ring->fifo_nr); ++ ++ return regmap_update_bits(priv->map_reg, ++ MCP25XXFD_REG_FLTCON(ring->nr >> 2), ++ MCP25XXFD_REG_FLTCON_FLT_MASK(ring->nr), ++ fltcon); ++} ++ ++static int mcp25xxfd_chip_fifo_init(const struct mcp25xxfd_priv *priv) ++{ ++ const struct mcp25xxfd_tx_ring *tx_ring = priv->tx; ++ const struct mcp25xxfd_rx_ring *rx_ring; ++ u32 val; ++ int err, n; ++ ++ /* TEF */ ++ val = FIELD_PREP(MCP25XXFD_REG_TEFCON_FSIZE_MASK, ++ tx_ring->obj_num - 1) | ++ MCP25XXFD_REG_TEFCON_TEFTSEN | ++ MCP25XXFD_REG_TEFCON_TEFOVIE | ++ MCP25XXFD_REG_TEFCON_TEFNEIE; ++ ++ err = regmap_write(priv->map_reg, MCP25XXFD_REG_TEFCON, val); ++ if (err) ++ return err; ++ ++ /* FIFO 1 - TX */ ++ val = FIELD_PREP(MCP25XXFD_REG_FIFOCON_FSIZE_MASK, ++ tx_ring->obj_num - 1) | ++ MCP25XXFD_REG_FIFOCON_TXEN | ++ MCP25XXFD_REG_FIFOCON_TXATIE; ++ ++ if (priv->can.ctrlmode & CAN_CTRLMODE_FD) ++ val |= FIELD_PREP(MCP25XXFD_REG_FIFOCON_PLSIZE_MASK, ++ MCP25XXFD_REG_FIFOCON_PLSIZE_64); ++ else ++ val |= FIELD_PREP(MCP25XXFD_REG_FIFOCON_PLSIZE_MASK, ++ MCP25XXFD_REG_FIFOCON_PLSIZE_8); ++ ++ if (priv->can.ctrlmode & CAN_CTRLMODE_ONE_SHOT) ++ val |= FIELD_PREP(MCP25XXFD_REG_FIFOCON_TXAT_MASK, ++ MCP25XXFD_REG_FIFOCON_TXAT_ONE_SHOT); ++ else ++ val |= FIELD_PREP(MCP25XXFD_REG_FIFOCON_TXAT_MASK, ++ MCP25XXFD_REG_FIFOCON_TXAT_UNLIMITED); ++ ++ err = regmap_write(priv->map_reg, ++ MCP25XXFD_REG_FIFOCON(MCP25XXFD_TX_FIFO), ++ val); ++ if (err) ++ return err; ++ ++ /* RX FIFOs */ ++ mcp25xxfd_for_each_rx_ring(priv, rx_ring, n) { ++ err = mcp25xxfd_chip_rx_fifo_init_one(priv, rx_ring); ++ if (err) ++ return err; ++ ++ err = mcp25xxfd_chip_rx_filter_init_one(priv, rx_ring); ++ if (err) ++ return err; ++ } ++ ++ return 0; ++} ++ ++static int mcp25xxfd_chip_ecc_init(struct mcp25xxfd_priv *priv) ++{ ++ struct mcp25xxfd_ecc *ecc = &priv->ecc; ++ void *ram; ++ u32 val = 0; ++ int err; ++ ++ ecc->ecc_stat = 0; ++ ++ if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_ECC) ++ val = MCP25XXFD_REG_ECCCON_ECCEN; ++ ++ err = regmap_update_bits(priv->map_reg, MCP25XXFD_REG_ECCCON, ++ MCP25XXFD_REG_ECCCON_ECCEN, val); ++ if (err) ++ return err; ++ ++ ram = kzalloc(MCP25XXFD_RAM_SIZE, GFP_KERNEL); ++ if (!ram) ++ return -ENOMEM; ++ ++ err = regmap_raw_write(priv->map_reg, MCP25XXFD_RAM_START, ram, ++ MCP25XXFD_RAM_SIZE); ++ kfree(ram); ++ ++ return err; ++} ++ ++static inline void mcp25xxfd_ecc_tefif_successful(struct mcp25xxfd_priv *priv) ++{ ++ struct mcp25xxfd_ecc *ecc = &priv->ecc; ++ ++ ecc->ecc_stat = 0; ++} ++ ++static u8 mcp25xxfd_get_normal_mode(const struct mcp25xxfd_priv *priv) ++{ ++ u8 mode; ++ ++ if (priv->can.ctrlmode & CAN_CTRLMODE_FD) ++ mode = MCP25XXFD_REG_CON_MODE_MIXED; ++ else ++ mode = MCP25XXFD_REG_CON_MODE_CAN2_0; ++ ++ return mode; ++} ++ ++static int ++__mcp25xxfd_chip_set_normal_mode(const struct mcp25xxfd_priv *priv, ++ bool nowait) ++{ ++ u8 mode; ++ ++ mode = mcp25xxfd_get_normal_mode(priv); ++ ++ return __mcp25xxfd_chip_set_mode(priv, mode, nowait); ++} ++ ++static inline int ++mcp25xxfd_chip_set_normal_mode(const struct mcp25xxfd_priv *priv) ++{ ++ return __mcp25xxfd_chip_set_normal_mode(priv, false); ++} ++ ++static inline int ++mcp25xxfd_chip_set_normal_mode_nowait(const struct mcp25xxfd_priv *priv) ++{ ++ return __mcp25xxfd_chip_set_normal_mode(priv, true); ++} ++ ++static int mcp25xxfd_chip_interrupts_enable(const struct mcp25xxfd_priv *priv) ++{ ++ u32 val; ++ int err; ++ ++ val = MCP25XXFD_REG_CRC_FERRIE | MCP25XXFD_REG_CRC_CRCERRIE; ++ err = regmap_write(priv->map_reg, MCP25XXFD_REG_CRC, val); ++ if (err) ++ return err; ++ ++ val = MCP25XXFD_REG_ECCCON_DEDIE | MCP25XXFD_REG_ECCCON_SECIE; ++ err = regmap_update_bits(priv->map_reg, MCP25XXFD_REG_ECCCON, val, val); ++ if (err) ++ return err; ++ ++ val = MCP25XXFD_REG_INT_CERRIE | ++ MCP25XXFD_REG_INT_SERRIE | ++ MCP25XXFD_REG_INT_RXOVIE | ++ MCP25XXFD_REG_INT_TXATIE | ++ MCP25XXFD_REG_INT_SPICRCIE | ++ MCP25XXFD_REG_INT_ECCIE | ++ MCP25XXFD_REG_INT_TEFIE | ++ MCP25XXFD_REG_INT_MODIE | ++ MCP25XXFD_REG_INT_RXIE; ++ ++ if (priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING) ++ val |= MCP25XXFD_REG_INT_IVMIE; ++ ++ return regmap_write(priv->map_reg, MCP25XXFD_REG_INT, val); ++} ++ ++static int mcp25xxfd_chip_interrupts_disable(const struct mcp25xxfd_priv *priv) ++{ ++ int err; ++ u32 mask; ++ ++ err = regmap_write(priv->map_reg, MCP25XXFD_REG_INT, 0); ++ if (err) ++ return err; ++ ++ mask = MCP25XXFD_REG_ECCCON_DEDIE | MCP25XXFD_REG_ECCCON_SECIE; ++ err = regmap_update_bits(priv->map_reg, MCP25XXFD_REG_ECCCON, ++ mask, 0x0); ++ if (err) ++ return err; ++ ++ return regmap_write(priv->map_reg, MCP25XXFD_REG_CRC, 0); ++} ++ ++static int mcp25xxfd_chip_stop(struct mcp25xxfd_priv *priv, ++ const enum can_state state) ++{ ++ priv->can.state = state; ++ ++ mcp25xxfd_chip_interrupts_disable(priv); ++ mcp25xxfd_chip_rx_int_disable(priv); ++ return mcp25xxfd_chip_set_mode(priv, MCP25XXFD_REG_CON_MODE_SLEEP); ++} ++ ++static int mcp25xxfd_chip_start(struct mcp25xxfd_priv *priv) ++{ ++ int err; ++ ++ err = mcp25xxfd_chip_softreset(priv); ++ if (err) ++ goto out_chip_stop; ++ ++ err = mcp25xxfd_chip_clock_init(priv); ++ if (err) ++ goto out_chip_stop; ++ ++ err = mcp25xxfd_set_bittiming(priv); ++ if (err) ++ goto out_chip_stop; ++ ++ err = mcp25xxfd_chip_rx_int_enable(priv); ++ if (err) ++ return err; ++ ++ err = mcp25xxfd_chip_ecc_init(priv); ++ if (err) ++ goto out_chip_stop; ++ ++ mcp25xxfd_ring_init(priv); ++ ++ err = mcp25xxfd_chip_fifo_init(priv); ++ if (err) ++ goto out_chip_stop; ++ ++ priv->can.state = CAN_STATE_ERROR_ACTIVE; ++ ++ err = mcp25xxfd_chip_set_normal_mode(priv); ++ if (err) ++ goto out_chip_stop; ++ ++ return 0; ++ ++ out_chip_stop: ++ mcp25xxfd_chip_stop(priv, CAN_STATE_STOPPED); ++ ++ return err; ++} ++ ++static int mcp25xxfd_set_mode(struct net_device *ndev, enum can_mode mode) ++{ ++ struct mcp25xxfd_priv *priv = netdev_priv(ndev); ++ int err; ++ ++ switch (mode) { ++ case CAN_MODE_START: ++ err = mcp25xxfd_chip_start(priv); ++ if (err) ++ return err; ++ ++ err = mcp25xxfd_chip_interrupts_enable(priv); ++ if (err) { ++ mcp25xxfd_chip_stop(priv, CAN_STATE_STOPPED); ++ return err; ++ } ++ ++ netif_wake_queue(ndev); ++ break; ++ ++ default: ++ return -EOPNOTSUPP; ++ } ++ ++ return 0; ++} ++ ++static int __mcp25xxfd_get_berr_counter(const struct net_device *ndev, ++ struct can_berr_counter *bec) ++{ ++ const struct mcp25xxfd_priv *priv = netdev_priv(ndev); ++ u32 trec; ++ int err; ++ ++ err = regmap_read(priv->map_reg, MCP25XXFD_REG_TREC, &trec); ++ if (err) ++ return err; ++ ++ if (trec & MCP25XXFD_REG_TREC_TXBO) ++ bec->txerr = 256; ++ else ++ bec->txerr = FIELD_GET(MCP25XXFD_REG_TREC_TEC_MASK, trec); ++ bec->rxerr = FIELD_GET(MCP25XXFD_REG_TREC_REC_MASK, trec); ++ ++ return 0; ++} ++ ++static int mcp25xxfd_get_berr_counter(const struct net_device *ndev, ++ struct can_berr_counter *bec) ++{ ++ const struct mcp25xxfd_priv *priv = netdev_priv(ndev); ++ ++ /* Avoid waking up the controller if the interface is down */ ++ if (!(ndev->flags & IFF_UP)) ++ return 0; ++ ++ /* The controller is powered down during Bus Off, use saved ++ * bec values. ++ */ ++ if (priv->can.state == CAN_STATE_BUS_OFF) { ++ *bec = priv->bec; ++ return 0; ++ } ++ ++ return __mcp25xxfd_get_berr_counter(ndev, bec); ++} ++ ++static int mcp25xxfd_check_tef_tail(const struct mcp25xxfd_priv *priv) ++{ ++ u8 tef_tail_chip, tef_tail; ++ int err; ++ ++ if (!IS_ENABLED(CONFIG_CAN_MCP25XXFD_SANITY)) ++ return 0; ++ ++ err = mcp25xxfd_tef_tail_get_from_chip(priv, &tef_tail_chip); ++ if (err) ++ return err; ++ ++ tef_tail = mcp25xxfd_get_tef_tail(priv); ++ if (tef_tail_chip != tef_tail) { ++ netdev_err(priv->ndev, ++ "TEF tail of chip (0x%02x) and ours (0x%08x) inconsistent.\n", ++ tef_tail_chip, tef_tail); ++ return -EILSEQ; ++ } ++ ++ return 0; ++} ++ ++static int ++mcp25xxfd_check_rx_tail(const struct mcp25xxfd_priv *priv, ++ const struct mcp25xxfd_rx_ring *ring) ++{ ++ u8 rx_tail_chip, rx_tail; ++ int err; ++ ++ if (!IS_ENABLED(CONFIG_CAN_MCP25XXFD_SANITY)) ++ return 0; ++ ++ err = mcp25xxfd_rx_tail_get_from_chip(priv, ring, &rx_tail_chip); ++ if (err) ++ return err; ++ ++ rx_tail = mcp25xxfd_get_rx_tail(ring); ++ if (rx_tail_chip != rx_tail) { ++ netdev_err(priv->ndev, ++ "RX tail of chip (%d) and ours (%d) inconsistent.\n", ++ rx_tail_chip, rx_tail); ++ return -EILSEQ; ++ } ++ ++ return 0; ++} ++ ++static int ++mcp25xxfd_handle_tefif_recover(const struct mcp25xxfd_priv *priv, const u32 seq) ++{ ++ const struct mcp25xxfd_tx_ring *tx_ring = priv->tx; ++ u32 tef_sta; ++ int err; ++ ++ err = regmap_read(priv->map_reg, MCP25XXFD_REG_TEFSTA, &tef_sta); ++ if (err) ++ return err; ++ ++ if (tef_sta & MCP25XXFD_REG_TEFSTA_TEFOVIF) { ++ netdev_err(priv->ndev, ++ "Transmit Event FIFO buffer overflow.\n"); ++ return -ENOBUFS; ++ } ++ ++ netdev_info(priv->ndev, ++ "Transmit Event FIFO buffer %s. (seq=0x%08x, tef_tail=0x%08x, tef_head=0x%08x, tx_head=0x%08x)\n", ++ tef_sta & MCP25XXFD_REG_TEFSTA_TEFFIF ? ++ "full" : tef_sta & MCP25XXFD_REG_TEFSTA_TEFNEIF ? ++ "not empty" : "empty", ++ seq, priv->tef.tail, priv->tef.head, tx_ring->head); ++ ++ /* The Sequence Number in the TEF doesn't match our tef_tail. */ ++ return -EAGAIN; ++} ++ ++static int ++mcp25xxfd_handle_tefif_one(struct mcp25xxfd_priv *priv, ++ const struct mcp25xxfd_hw_tef_obj *hw_tef_obj) ++{ ++ struct mcp25xxfd_tx_ring *tx_ring = priv->tx; ++ struct net_device_stats *stats = &priv->ndev->stats; ++ u32 seq, seq_masked, tef_tail_masked; ++ int err; ++ ++ seq = FIELD_GET(MCP25XXFD_OBJ_FLAGS_SEQ_MCP2518FD_MASK, ++ hw_tef_obj->flags); ++ ++ /* Use the MCP2517FD mask on the MCP2518FD, too. We only ++ * compare 7 bits, this should be enough to detect ++ * net-yet-completed, i.e. old TEF objects. ++ */ ++ seq_masked = seq & ++ field_mask(MCP25XXFD_OBJ_FLAGS_SEQ_MCP2517FD_MASK); ++ tef_tail_masked = priv->tef.tail & ++ field_mask(MCP25XXFD_OBJ_FLAGS_SEQ_MCP2517FD_MASK); ++ if (seq_masked != tef_tail_masked) ++ return mcp25xxfd_handle_tefif_recover(priv, seq); ++ ++ stats->tx_bytes += ++ can_rx_offload_get_echo_skb(&priv->offload, ++ mcp25xxfd_get_tef_tail(priv), ++ hw_tef_obj->ts); ++ stats->tx_packets++; ++ ++ /* finally increment the TEF pointer */ ++ err = regmap_update_bits(priv->map_reg, MCP25XXFD_REG_TEFCON, ++ GENMASK(15, 8), ++ MCP25XXFD_REG_TEFCON_UINC); ++ if (err) ++ return err; ++ ++ priv->tef.tail++; ++ tx_ring->tail++; ++ ++ return mcp25xxfd_check_tef_tail(priv); ++} ++ ++static int mcp25xxfd_tef_ring_update(struct mcp25xxfd_priv *priv) ++{ ++ const struct mcp25xxfd_tx_ring *tx_ring = priv->tx; ++ unsigned int new_head; ++ u8 chip_tx_tail; ++ int err; ++ ++ err = mcp25xxfd_tx_tail_get_from_chip(priv, &chip_tx_tail); ++ if (err) ++ return err; ++ ++ /* chip_tx_tail, is the next TX-Object send by the HW. ++ * The new TEF head must be >= the old head, ... ++ */ ++ new_head = round_down(priv->tef.head, tx_ring->obj_num) + chip_tx_tail; ++ if (new_head <= priv->tef.head) ++ new_head += tx_ring->obj_num; ++ ++ /* ... but it cannot exceed the TX head. */ ++ priv->tef.head = min(new_head, tx_ring->head); ++ ++ return mcp25xxfd_check_tef_tail(priv); ++} ++ ++static inline int ++mcp25xxfd_tef_obj_read(const struct mcp25xxfd_priv *priv, ++ struct mcp25xxfd_hw_tef_obj *hw_tef_obj, ++ const u8 offset, const u8 len) ++{ ++ const struct mcp25xxfd_tx_ring *tx_ring = priv->tx; ++ ++ if (IS_ENABLED(CONFIG_CAN_MCP25XXFD_SANITY) && ++ (offset > tx_ring->obj_num || ++ len > tx_ring->obj_num || ++ offset + len > tx_ring->obj_num)) { ++ netdev_err(priv->ndev, ++ "Trying to read to many TEF objects (max=%d, offset=%d, len=%d).\n", ++ tx_ring->obj_num, offset, len); ++ return -ERANGE; ++ } ++ ++ return regmap_bulk_read(priv->map_rx, ++ mcp25xxfd_get_tef_obj_addr(offset), ++ hw_tef_obj, ++ sizeof(*hw_tef_obj) / sizeof(u32) * len); ++} ++ ++static int mcp25xxfd_handle_tefif(struct mcp25xxfd_priv *priv) ++{ ++ struct mcp25xxfd_hw_tef_obj hw_tef_obj[MCP25XXFD_TX_OBJ_NUM_MAX]; ++ u8 tef_tail, len, l; ++ int err, i; ++ ++ err = mcp25xxfd_tef_ring_update(priv); ++ if (err) ++ return err; ++ ++ tef_tail = mcp25xxfd_get_tef_tail(priv); ++ len = mcp25xxfd_get_tef_len(priv); ++ l = mcp25xxfd_get_tef_linear_len(priv); ++ err = mcp25xxfd_tef_obj_read(priv, hw_tef_obj, tef_tail, l); ++ if (err) ++ return err; ++ ++ if (l < len) { ++ err = mcp25xxfd_tef_obj_read(priv, &hw_tef_obj[l], 0, len - l); ++ if (err) ++ return err; ++ } ++ ++ for (i = 0; i < len; i++) { ++ err = mcp25xxfd_handle_tefif_one(priv, &hw_tef_obj[i]); ++ /* -EAGAIN means the Sequence Number in the TEF ++ * doesn't match our tef_tail. This can happen if we ++ * read the TEF objects too early. Leave loop let the ++ * interrupt handler call us again. ++ */ ++ if (err == -EAGAIN) ++ goto out_netif_wake_queue; ++ if (err) ++ return err; ++ } ++ ++ out_netif_wake_queue: ++ mcp25xxfd_ecc_tefif_successful(priv); ++ ++ if (mcp25xxfd_get_tx_free(priv->tx)) { ++ /* Make sure that anybody stopping the queue after ++ * this sees the new tx_ring->tail. ++ */ ++ smp_mb(); ++ netif_wake_queue(priv->ndev); ++ } ++ ++ return 0; ++} ++ ++static int ++mcp25xxfd_rx_ring_update(const struct mcp25xxfd_priv *priv, ++ struct mcp25xxfd_rx_ring *ring) ++{ ++ u32 new_head; ++ u8 chip_rx_head; ++ int err; ++ ++ err = mcp25xxfd_rx_head_get_from_chip(priv, ring, &chip_rx_head); ++ if (err) ++ return err; ++ ++ /* chip_rx_head, is the next RX-Object filled by the HW. ++ * The new RX head must be >= the old head. ++ */ ++ new_head = round_down(ring->head, ring->obj_num) + chip_rx_head; ++ if (new_head <= ring->head) ++ new_head += ring->obj_num; ++ ++ ring->head = new_head; ++ ++ return mcp25xxfd_check_rx_tail(priv, ring); ++} ++ ++static void ++mcp25xxfd_hw_rx_obj_to_skb(const struct mcp25xxfd_priv *priv, ++ const struct mcp25xxfd_hw_rx_obj_canfd *hw_rx_obj, ++ struct sk_buff *skb) ++{ ++ struct canfd_frame *cfd = (struct canfd_frame *)skb->data; ++ ++ if (hw_rx_obj->flags & MCP25XXFD_OBJ_FLAGS_IDE) { ++ u32 sid, eid; ++ ++ eid = FIELD_GET(MCP25XXFD_OBJ_ID_EID_MASK, hw_rx_obj->id); ++ sid = FIELD_GET(MCP25XXFD_OBJ_ID_SID_MASK, hw_rx_obj->id); ++ ++ cfd->can_id = CAN_EFF_FLAG | ++ FIELD_PREP(MCP25XXFD_REG_FRAME_EFF_EID_MASK, eid) | ++ FIELD_PREP(MCP25XXFD_REG_FRAME_EFF_SID_MASK, sid); ++ } else { ++ cfd->can_id = FIELD_GET(MCP25XXFD_OBJ_ID_SID_MASK, ++ hw_rx_obj->id); ++ } ++ ++ /* CANFD */ ++ if (hw_rx_obj->flags & MCP25XXFD_OBJ_FLAGS_FDF) { ++ u8 dlc; ++ ++ if (hw_rx_obj->flags & MCP25XXFD_OBJ_FLAGS_ESI) ++ cfd->flags |= CANFD_ESI; ++ ++ if (hw_rx_obj->flags & MCP25XXFD_OBJ_FLAGS_BRS) ++ cfd->flags |= CANFD_BRS; ++ ++ dlc = FIELD_GET(MCP25XXFD_OBJ_FLAGS_DLC, hw_rx_obj->flags); ++ cfd->len = can_dlc2len(get_canfd_dlc(dlc)); ++ } else { ++ if (hw_rx_obj->flags & MCP25XXFD_OBJ_FLAGS_RTR) ++ cfd->can_id |= CAN_RTR_FLAG; ++ ++ cfd->len = get_can_dlc(FIELD_GET(MCP25XXFD_OBJ_FLAGS_DLC, ++ hw_rx_obj->flags)); ++ } ++ ++ memcpy(cfd->data, hw_rx_obj->data, cfd->len); ++} ++ ++static int ++mcp25xxfd_handle_rxif_one(struct mcp25xxfd_priv *priv, ++ struct mcp25xxfd_rx_ring *ring, ++ const struct mcp25xxfd_hw_rx_obj_canfd *hw_rx_obj) ++{ ++ struct net_device_stats *stats = &priv->ndev->stats; ++ struct sk_buff *skb; ++ struct canfd_frame *cfd; ++ int err; ++ ++ if (hw_rx_obj->flags & MCP25XXFD_OBJ_FLAGS_FDF) ++ skb = alloc_canfd_skb(priv->ndev, &cfd); ++ else ++ skb = alloc_can_skb(priv->ndev, (struct can_frame **)&cfd); ++ ++ if (!cfd) { ++ stats->rx_dropped++; ++ return 0; ++ } ++ ++ mcp25xxfd_hw_rx_obj_to_skb(priv, hw_rx_obj, skb); ++ err = can_rx_offload_queue_sorted(&priv->offload, skb, hw_rx_obj->ts); ++ if (err) ++ stats->rx_fifo_errors++; ++ ++ ring->tail++; ++ ++ /* finally increment the RX pointer */ ++ return regmap_update_bits(priv->map_reg, ++ MCP25XXFD_REG_FIFOCON(ring->fifo_nr), ++ GENMASK(15, 8), ++ MCP25XXFD_REG_FIFOCON_UINC); ++} ++ ++static inline int ++mcp25xxfd_rx_obj_read(const struct mcp25xxfd_priv *priv, ++ const struct mcp25xxfd_rx_ring *ring, ++ struct mcp25xxfd_hw_rx_obj_canfd *hw_rx_obj, ++ const u8 offset, const u8 len) ++{ ++ int err; ++ ++ err = regmap_bulk_read(priv->map_rx, ++ mcp25xxfd_get_rx_obj_addr(ring, offset), ++ hw_rx_obj, ++ len * ring->obj_size / sizeof(u32)); ++ ++ return err; ++} ++ ++static int ++mcp25xxfd_handle_rxif_ring(struct mcp25xxfd_priv *priv, ++ struct mcp25xxfd_rx_ring *ring) ++{ ++ struct mcp25xxfd_hw_rx_obj_canfd *hw_rx_obj = ring->obj; ++ u8 rx_tail, len; ++ int err, i; ++ ++ err = mcp25xxfd_rx_ring_update(priv, ring); ++ if (err) ++ return err; ++ ++ while ((len = mcp25xxfd_get_rx_linear_len(ring))) { ++ rx_tail = mcp25xxfd_get_rx_tail(ring); ++ ++ err = mcp25xxfd_rx_obj_read(priv, ring, hw_rx_obj, ++ rx_tail, len); ++ if (err) ++ return err; ++ ++ for (i = 0; i < len; i++) { ++ err = mcp25xxfd_handle_rxif_one(priv, ring, ++ (void *)hw_rx_obj + ++ i * ring->obj_size); ++ if (err) ++ return err; ++ } ++ } ++ ++ return 0; ++} ++ ++static int mcp25xxfd_handle_rxif(struct mcp25xxfd_priv *priv) ++{ ++ struct mcp25xxfd_rx_ring *ring; ++ int err, n; ++ ++ mcp25xxfd_for_each_rx_ring(priv, ring, n) { ++ err = mcp25xxfd_handle_rxif_ring(priv, ring); ++ if (err) ++ return err; ++ } ++ ++ return 0; ++} ++ ++static inline int mcp25xxfd_get_timestamp(const struct mcp25xxfd_priv *priv, ++ u32 *timestamp) ++{ ++ return regmap_read(priv->map_reg, MCP25XXFD_REG_TBC, timestamp); ++} ++ ++static struct sk_buff * ++mcp25xxfd_alloc_can_err_skb(const struct mcp25xxfd_priv *priv, ++ struct can_frame **cf, u32 *timestamp) ++{ ++ int err; ++ ++ err = mcp25xxfd_get_timestamp(priv, timestamp); ++ if (err) ++ return NULL; ++ ++ return alloc_can_err_skb(priv->ndev, cf); ++} ++ ++static int mcp25xxfd_handle_rxovif(struct mcp25xxfd_priv *priv) ++{ ++ struct net_device_stats *stats = &priv->ndev->stats; ++ struct mcp25xxfd_rx_ring *ring; ++ struct sk_buff *skb; ++ struct can_frame *cf; ++ u32 timestamp, rxovif; ++ int err, i; ++ ++ stats->rx_over_errors++; ++ stats->rx_errors++; ++ ++ err = regmap_read(priv->map_reg, MCP25XXFD_REG_RXOVIF, &rxovif); ++ if (err) ++ return err; ++ ++ mcp25xxfd_for_each_rx_ring(priv, ring, i) { ++ if (!(rxovif & BIT(ring->fifo_nr))) ++ continue; ++ ++ /* If SERRIF is active, there was a RX MAB overflow. */ ++ if (priv->regs_status.intf & MCP25XXFD_REG_INT_SERRIF) { ++ netdev_info(priv->ndev, ++ "RX-%d: MAB overflow detected.\n", ++ ring->nr); ++ } else { ++ netdev_info(priv->ndev, ++ "RX-%d: FIFO overflow.\n", ring->nr); ++ } ++ ++ err = regmap_update_bits(priv->map_reg, ++ MCP25XXFD_REG_FIFOSTA(ring->fifo_nr), ++ MCP25XXFD_REG_FIFOSTA_RXOVIF, ++ 0x0); ++ if (err) ++ return err; ++ } ++ ++ skb = mcp25xxfd_alloc_can_err_skb(priv, &cf, ×tamp); ++ if (!skb) ++ return 0; ++ ++ cf->can_id |= CAN_ERR_CRTL; ++ cf->data[1] = CAN_ERR_CRTL_RX_OVERFLOW; ++ ++ err = can_rx_offload_queue_sorted(&priv->offload, skb, timestamp); ++ if (err) ++ stats->rx_fifo_errors++; ++ ++ return 0; ++} ++ ++static int mcp25xxfd_handle_txatif(struct mcp25xxfd_priv *priv) ++{ ++ netdev_info(priv->ndev, "%s\n", __func__); ++ ++ return 0; ++} ++ ++static int mcp25xxfd_handle_ivmif(struct mcp25xxfd_priv *priv) ++{ ++ struct net_device_stats *stats = &priv->ndev->stats; ++ u32 bdiag1, timestamp; ++ struct sk_buff *skb; ++ struct can_frame *cf = NULL; ++ int err; ++ ++ err = mcp25xxfd_get_timestamp(priv, ×tamp); ++ if (err) ++ return err; ++ ++ err = regmap_read(priv->map_reg, MCP25XXFD_REG_BDIAG1, &bdiag1); ++ if (err) ++ return err; ++ ++ /* Write 0s to clear error bits, don't write 1s to non active ++ * bits, as they will be set. ++ */ ++ err = regmap_write(priv->map_reg, MCP25XXFD_REG_BDIAG1, 0x0); ++ if (err) ++ return err; ++ ++ priv->can.can_stats.bus_error++; ++ ++ skb = alloc_can_err_skb(priv->ndev, &cf); ++ if (cf) ++ cf->can_id |= CAN_ERR_PROT | CAN_ERR_BUSERROR; ++ ++ /* Controller misconfiguration */ ++ if (WARN_ON(bdiag1 & MCP25XXFD_REG_BDIAG1_DLCMM)) ++ netdev_err(priv->ndev, ++ "recv'd DLC is larger than PLSIZE of FIFO element."); ++ ++ /* RX errors */ ++ if (bdiag1 & (MCP25XXFD_REG_BDIAG1_DCRCERR | ++ MCP25XXFD_REG_BDIAG1_NCRCERR)) { ++ netdev_dbg(priv->ndev, "CRC error\n"); ++ ++ stats->rx_errors++; ++ if (cf) ++ cf->data[3] |= CAN_ERR_PROT_LOC_CRC_SEQ; ++ } ++ if (bdiag1 & (MCP25XXFD_REG_BDIAG1_DSTUFERR | ++ MCP25XXFD_REG_BDIAG1_NSTUFERR)) { ++ netdev_dbg(priv->ndev, "Stuff error\n"); ++ ++ stats->rx_errors++; ++ if (cf) ++ cf->data[2] |= CAN_ERR_PROT_STUFF; ++ } ++ if (bdiag1 & (MCP25XXFD_REG_BDIAG1_DFORMERR | ++ MCP25XXFD_REG_BDIAG1_NFORMERR)) { ++ netdev_dbg(priv->ndev, "Format error\n"); ++ ++ stats->rx_errors++; ++ if (cf) ++ cf->data[2] |= CAN_ERR_PROT_FORM; ++ } ++ ++ /* TX errors */ ++ if (bdiag1 & MCP25XXFD_REG_BDIAG1_NACKERR) { ++ netdev_dbg(priv->ndev, "NACK error\n"); ++ ++ stats->tx_errors++; ++ if (cf) { ++ cf->can_id |= CAN_ERR_ACK; ++ cf->data[2] |= CAN_ERR_PROT_TX; ++ } ++ } ++ if (bdiag1 & (MCP25XXFD_REG_BDIAG1_DBIT1ERR | ++ MCP25XXFD_REG_BDIAG1_NBIT1ERR)) { ++ netdev_dbg(priv->ndev, "Bit1 error\n"); ++ ++ stats->tx_errors++; ++ if (cf) ++ cf->data[2] |= CAN_ERR_PROT_TX | CAN_ERR_PROT_BIT1; ++ } ++ if (bdiag1 & (MCP25XXFD_REG_BDIAG1_DBIT0ERR | ++ MCP25XXFD_REG_BDIAG1_NBIT0ERR)) { ++ netdev_dbg(priv->ndev, "Bit0 error\n"); ++ ++ stats->tx_errors++; ++ if (cf) ++ cf->data[2] |= CAN_ERR_PROT_TX | CAN_ERR_PROT_BIT0; ++ } ++ ++ if (!cf) ++ return 0; ++ ++ err = can_rx_offload_queue_sorted(&priv->offload, skb, timestamp); ++ if (err) ++ stats->rx_fifo_errors++; ++ ++ return 0; ++} ++ ++static int mcp25xxfd_handle_cerrif(struct mcp25xxfd_priv *priv) ++{ ++ struct net_device_stats *stats = &priv->ndev->stats; ++ struct sk_buff *skb; ++ struct can_frame *cf = NULL; ++ enum can_state new_state, rx_state, tx_state; ++ u32 trec, timestamp; ++ int err; ++ ++ err = regmap_read(priv->map_reg, MCP25XXFD_REG_TREC, &trec); ++ if (err) ++ return err; ++ ++ if (trec & MCP25XXFD_REG_TREC_TXBO) ++ tx_state = CAN_STATE_BUS_OFF; ++ else if (trec & MCP25XXFD_REG_TREC_TXBP) ++ tx_state = CAN_STATE_ERROR_PASSIVE; ++ else if (trec & MCP25XXFD_REG_TREC_TXWARN) ++ tx_state = CAN_STATE_ERROR_WARNING; ++ else ++ tx_state = CAN_STATE_ERROR_ACTIVE; ++ ++ if (trec & MCP25XXFD_REG_TREC_RXBP) ++ rx_state = CAN_STATE_ERROR_PASSIVE; ++ else if (trec & MCP25XXFD_REG_TREC_RXWARN) ++ rx_state = CAN_STATE_ERROR_WARNING; ++ else ++ rx_state = CAN_STATE_ERROR_ACTIVE; ++ ++ new_state = max(tx_state, rx_state); ++ if (new_state == priv->can.state) ++ return 0; ++ ++ /* The skb allocation might fail, but can_change_state() ++ * handles cf == NULL. ++ */ ++ skb = mcp25xxfd_alloc_can_err_skb(priv, &cf, ×tamp); ++ can_change_state(priv->ndev, cf, tx_state, rx_state); ++ ++ if (new_state == CAN_STATE_BUS_OFF) { ++ /* As we're going to switch off the chip now, let's ++ * save the error counters and return them to ++ * userspace, if do_get_berr_counter() is called while ++ * the chip is in Bus Off. ++ */ ++ err = __mcp25xxfd_get_berr_counter(priv->ndev, &priv->bec); ++ if (err) ++ return err; ++ ++ mcp25xxfd_chip_stop(priv, CAN_STATE_BUS_OFF); ++ can_bus_off(priv->ndev); ++ } ++ ++ if (!skb) ++ return 0; ++ ++ if (new_state != CAN_STATE_BUS_OFF) { ++ struct can_berr_counter bec; ++ ++ err = mcp25xxfd_get_berr_counter(priv->ndev, &bec); ++ if (err) ++ return err; ++ cf->data[6] = bec.txerr; ++ cf->data[7] = bec.rxerr; ++ } ++ ++ err = can_rx_offload_queue_sorted(&priv->offload, skb, timestamp); ++ if (err) ++ stats->rx_fifo_errors++; ++ ++ return 0; ++} ++ ++static int ++mcp25xxfd_handle_modif(const struct mcp25xxfd_priv *priv, bool *set_normal_mode) ++{ ++ const u8 mode_reference = mcp25xxfd_get_normal_mode(priv); ++ u8 mode; ++ int err; ++ ++ err = mcp25xxfd_chip_get_mode(priv, &mode); ++ if (err) ++ return err; ++ ++ if (mode == mode_reference) { ++ netdev_dbg(priv->ndev, ++ "Controller changed into %s Mode (%u).\n", ++ mcp25xxfd_get_mode_str(mode), mode); ++ return 0; ++ } ++ ++ /* According to MCP2517FD errata DS80000792B 1., during a TX ++ * MAB underflow, the controller will transition to Restricted ++ * Operation Mode or Listen Only Mode (depending on SERR2LOM). ++ * ++ * However this is not always the case. If SERR2LOM is ++ * configured for Restricted Operation Mode (SERR2LOM not set) ++ * the MCP2517FD will sometimes transition to Listen Only Mode ++ * first. When polling this bit we see that it will transition ++ * to Restricted Operation Mode shortly after. ++ */ ++ if ((priv->devtype_data.quirks & MCP25XXFD_QUIRK_MAB_NO_WARN) && ++ (mode == MCP25XXFD_REG_CON_MODE_RESTRICTED || ++ mode == MCP25XXFD_REG_CON_MODE_LISTENONLY)) ++ netdev_dbg(priv->ndev, ++ "Controller changed into %s Mode (%u).\n", ++ mcp25xxfd_get_mode_str(mode), mode); ++ else ++ netdev_err(priv->ndev, ++ "Controller changed into %s Mode (%u).\n", ++ mcp25xxfd_get_mode_str(mode), mode); ++ ++ /* After the application requests Normal mode, the Controller ++ * will automatically attempt to retransmit the message that ++ * caused the TX MAB underflow. ++ * ++ * However, if there is an ECC error in the TX-RAM, we first ++ * have to reload the tx-object before requesting Normal ++ * mode. This is done later in mcp25xxfd_handle_eccif(). ++ */ ++ if (priv->regs_status.intf & MCP25XXFD_REG_INT_ECCIF) { ++ *set_normal_mode = true; ++ return 0; ++ } ++ ++ return mcp25xxfd_chip_set_normal_mode_nowait(priv); ++} ++ ++static int mcp25xxfd_handle_serrif(struct mcp25xxfd_priv *priv) ++{ ++ struct mcp25xxfd_ecc *ecc = &priv->ecc; ++ struct net_device_stats *stats = &priv->ndev->stats; ++ bool handled = false; ++ ++ /* TX MAB underflow ++ * ++ * According to MCP2517FD Errata DS80000792B 1. a TX MAB ++ * underflow is indicated by SERRIF and MODIF. ++ * ++ * In addition to the effects mentioned in the Errata, there ++ * are Bus Errors due to the aborted CAN frame, so a IVMIF ++ * will be seen as well. ++ * ++ * Sometimes there is an ECC error in the TX-RAM, which leads ++ * to a TX MAB underflow. ++ * ++ * However, probably due to a race condition, there is no ++ * associated MODIF pending. ++ * ++ * Further, there are situations, where the SERRIF is caused ++ * by an ECC error in the TX-RAM, but not even the ECCIF is ++ * set. This only seems to happen _after_ the first occurrence ++ * of a ECCIF (which is tracked in ecc->cnt). ++ * ++ * Treat all as a known system errors.. ++ */ ++ if ((priv->regs_status.intf & MCP25XXFD_REG_INT_MODIF && ++ priv->regs_status.intf & MCP25XXFD_REG_INT_IVMIF) || ++ priv->regs_status.intf & MCP25XXFD_REG_INT_ECCIF || ++ ecc->cnt) { ++ const char *msg; ++ ++ if (priv->regs_status.intf & MCP25XXFD_REG_INT_ECCIF || ++ ecc->cnt) ++ msg = "TX MAB underflow due to ECC error detected."; ++ else ++ msg = "TX MAB underflow detected."; ++ ++ if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_MAB_NO_WARN) ++ netdev_dbg(priv->ndev, "%s\n", msg); ++ else ++ netdev_info(priv->ndev, "%s\n", msg); ++ ++ stats->tx_aborted_errors++; ++ stats->tx_errors++; ++ handled = true; ++ } ++ ++ /* RX MAB overflow ++ * ++ * According to MCP2517FD Errata DS80000792B 1. a RX MAB ++ * overflow is indicated by SERRIF. ++ * ++ * In addition to the effects mentioned in the Errata, (most ++ * of the times) a RXOVIF is raised, if the FIFO that is being ++ * received into has the RXOVIE activated (and we have enabled ++ * RXOVIE on all FIFOs). ++ * ++ * Sometimes there is no RXOVIF just a RXIF is pending. ++ * ++ * Treat all as a known system errors.. ++ */ ++ if (priv->regs_status.intf & MCP25XXFD_REG_INT_RXOVIF || ++ priv->regs_status.intf & MCP25XXFD_REG_INT_RXIF) { ++ stats->rx_dropped++; ++ handled = true; ++ } ++ ++ if (!handled) ++ netdev_err(priv->ndev, ++ "Unhandled System Error Interrupt (intf=0x%08x)!\n", ++ priv->regs_status.intf); ++ ++ return 0; ++} ++ ++static int ++mcp25xxfd_handle_eccif_recover(struct mcp25xxfd_priv *priv, u8 nr) ++{ ++ struct mcp25xxfd_tx_ring *tx_ring = priv->tx; ++ struct mcp25xxfd_ecc *ecc = &priv->ecc; ++ struct mcp25xxfd_tx_obj *tx_obj; ++ u8 chip_tx_tail, tx_tail, offset; ++ u16 addr; ++ int err; ++ ++ addr = FIELD_GET(MCP25XXFD_REG_ECCSTAT_ERRADDR_MASK, ecc->ecc_stat); ++ ++ err = mcp25xxfd_tx_tail_get_from_chip(priv, &chip_tx_tail); ++ if (err) ++ return err; ++ ++ tx_tail = mcp25xxfd_get_tx_tail(tx_ring); ++ offset = (nr - chip_tx_tail) & (tx_ring->obj_num - 1); ++ ++ /* Bail out if one of the following is met: ++ * - tx_tail information is inconsistent ++ * - for mcp2517fd: offset not 0 ++ * - for mcp2518fd: offset not 0 or 1 ++ */ ++ if (chip_tx_tail != tx_tail || ++ !(offset == 0 || (offset == 1 && mcp25xxfd_is_2518(priv)))) { ++ netdev_err(priv->ndev, ++ "ECC Error information inconsistent (addr=0x%04x, nr=%d, tx_tail=0x%08x(%d), chip_tx_tail=%d, offset=%d).\n", ++ addr, nr, tx_ring->tail, tx_tail, chip_tx_tail, ++ offset); ++ return -EINVAL; ++ } ++ ++ netdev_info(priv->ndev, ++ "Recovering %s ECC Error at address 0x%04x (in TX-RAM, tx_obj=%d, tx_tail=0x%08x(%d), offset=%d).\n", ++ ecc->ecc_stat & MCP25XXFD_REG_ECCSTAT_SECIF ? ++ "Single" : "Double", ++ addr, nr, tx_ring->tail, tx_tail, offset); ++ ++ /* reload tx_obj into controller RAM ... */ ++ tx_obj = &tx_ring->obj[nr]; ++ err = spi_sync_transfer(priv->spi, tx_obj->xfer, 1); ++ if (err) ++ return err; ++ ++ /* ... and trigger retransmit */ ++ return mcp25xxfd_chip_set_normal_mode(priv); ++} ++ ++static int ++mcp25xxfd_handle_eccif(struct mcp25xxfd_priv *priv, bool set_normal_mode) ++{ ++ struct mcp25xxfd_ecc *ecc = &priv->ecc; ++ const char *msg; ++ bool in_tx_ram; ++ u32 ecc_stat; ++ u16 addr; ++ u8 nr; ++ int err; ++ ++ err = regmap_read(priv->map_reg, MCP25XXFD_REG_ECCSTAT, &ecc_stat); ++ if (err) ++ return err; ++ ++ err = regmap_update_bits(priv->map_reg, MCP25XXFD_REG_ECCSTAT, ++ MCP25XXFD_REG_ECCSTAT_IF_MASK, ~ecc_stat); ++ if (err) ++ return err; ++ ++ /* Check if ECC error occurred in TX-RAM */ ++ addr = FIELD_GET(MCP25XXFD_REG_ECCSTAT_ERRADDR_MASK, ecc_stat); ++ err = mcp25xxfd_get_tx_nr_by_addr(priv->tx, &nr, addr); ++ if (!err) ++ in_tx_ram = true; ++ else if (err == -ENOENT) ++ in_tx_ram = false; ++ else ++ return err; ++ ++ if (ecc_stat & MCP25XXFD_REG_ECCSTAT_SECIF) ++ msg = "Single ECC Error corrected at address"; ++ else if (ecc_stat & MCP25XXFD_REG_ECCSTAT_DEDIF) ++ msg = "Double ECC Error detected at address"; ++ else ++ return -EINVAL; ++ ++ if (!in_tx_ram) { ++ ecc->ecc_stat = 0; ++ ++ if (ecc_stat & MCP25XXFD_REG_ECCSTAT_SECIF) ++ netdev_info(priv->ndev, "%s 0x%04x.\n", ++ msg, addr); ++ else ++ netdev_notice(priv->ndev, "%s 0x%04x.\n", ++ msg, addr); ++ } else { ++ /* Re-occurring error? */ ++ if (ecc->ecc_stat == ecc_stat) { ++ ecc->cnt++; ++ } else { ++ ecc->ecc_stat = ecc_stat; ++ ecc->cnt = 1; ++ } ++ ++ netdev_info(priv->ndev, ++ "%s 0x%04x (in TX-RAM, tx_obj=%d), occurred %d time%s.\n", ++ msg, addr, nr, ecc->cnt, ecc->cnt > 1 ? "s" : ""); ++ ++ if (ecc->cnt >= MCP25XXFD_ECC_CNT_MAX) ++ return mcp25xxfd_handle_eccif_recover(priv, nr); ++ } ++ ++ if (set_normal_mode) ++ return mcp25xxfd_chip_set_normal_mode_nowait(priv); ++ ++ return 0; ++} ++ ++static int mcp25xxfd_handle_spicrcif(struct mcp25xxfd_priv *priv) ++{ ++ int err; ++ u32 crc; ++ ++ err = regmap_read(priv->map_reg, MCP25XXFD_REG_CRC, &crc); ++ if (err) ++ return err; ++ ++ err = regmap_update_bits(priv->map_reg, MCP25XXFD_REG_CRC, ++ MCP25XXFD_REG_CRC_IF_MASK, ++ ~crc); ++ if (err) ++ return err; ++ ++ if (crc & MCP25XXFD_REG_CRC_FERRIF) ++ netdev_notice(priv->ndev, "CRC write command format error.\n"); ++ else if (crc & MCP25XXFD_REG_CRC_CRCERRIF) ++ netdev_notice(priv->ndev, ++ "CRC write error detected. CRC=0x%04lx.\n", ++ FIELD_GET(MCP25XXFD_REG_CRC_MASK, crc)); ++ ++ return 0; ++} ++ ++#define mcp25xxfd_handle(priv, irq, ...) \ ++({ \ ++ struct mcp25xxfd_priv *_priv = (priv); \ ++ int err; \ ++\ ++ err = mcp25xxfd_handle_##irq(_priv, ## __VA_ARGS__); \ ++ if (err) \ ++ netdev_err(_priv->ndev, \ ++ "IRQ handler mcp25xxfd_handle_%s() returned %d.\n", \ ++ __stringify(irq), err); \ ++ err; \ ++}) ++ ++static irqreturn_t mcp25xxfd_irq(int irq, void *dev_id) ++{ ++ struct mcp25xxfd_priv *priv = dev_id; ++ irqreturn_t handled = IRQ_NONE; ++ int err; ++ ++ if (priv->rx_int) ++ do { ++ int rx_pending; ++ ++ rx_pending = gpiod_get_value_cansleep(priv->rx_int); ++ if (!rx_pending) ++ break; ++ ++ err = mcp25xxfd_handle(priv, rxif); ++ if (err) ++ goto out_fail; ++ ++ handled = IRQ_HANDLED; ++ } while (1); ++ ++ do { ++ u32 intf_pending, intf_pending_clearable; ++ bool set_normal_mode; ++ ++ err = regmap_bulk_read(priv->map_reg, MCP25XXFD_REG_INT, ++ &priv->regs_status, ++ sizeof(priv->regs_status) / ++ sizeof(u32)); ++ if (err) ++ goto out_fail; ++ ++ intf_pending = FIELD_GET(MCP25XXFD_REG_INT_IF_MASK, ++ priv->regs_status.intf) & ++ FIELD_GET(MCP25XXFD_REG_INT_IE_MASK, ++ priv->regs_status.intf); ++ ++ if (!(intf_pending)) ++ return handled; ++ ++ /* Some interrupts must be ACKed in the ++ * MCP25XXFD_REG_INT register. ++ * - First ACK then handle, to avoid lost-IRQ race ++ * condition on fast re-occurring interrupts. ++ * - Write "0" to clear active IRQs, "1" to all other, ++ * to avoid r/m/w race condition on the ++ * MCP25XXFD_REG_INT register. ++ */ ++ intf_pending_clearable = intf_pending & ++ MCP25XXFD_REG_INT_IF_CLEARABLE_MASK; ++ if (intf_pending_clearable) { ++ err = regmap_update_bits(priv->map_reg, ++ MCP25XXFD_REG_INT, ++ MCP25XXFD_REG_INT_IF_MASK, ++ ~intf_pending_clearable); ++ if (err) ++ goto out_fail; ++ } ++ ++ if (intf_pending & MCP25XXFD_REG_INT_MODIF) { ++ err = mcp25xxfd_handle(priv, modif, &set_normal_mode); ++ if (err) ++ goto out_fail; ++ } ++ ++ if (intf_pending & MCP25XXFD_REG_INT_RXIF) { ++ err = mcp25xxfd_handle(priv, rxif); ++ if (err) ++ goto out_fail; ++ } ++ ++ if (intf_pending & MCP25XXFD_REG_INT_TEFIF) { ++ err = mcp25xxfd_handle(priv, tefif); ++ if (err) ++ goto out_fail; ++ } ++ ++ if (intf_pending & MCP25XXFD_REG_INT_RXOVIF) { ++ err = mcp25xxfd_handle(priv, rxovif); ++ if (err) ++ goto out_fail; ++ } ++ ++ if (intf_pending & MCP25XXFD_REG_INT_TXATIF) { ++ err = mcp25xxfd_handle(priv, txatif); ++ if (err) ++ goto out_fail; ++ } ++ ++ if (intf_pending & MCP25XXFD_REG_INT_IVMIF) { ++ err = mcp25xxfd_handle(priv, ivmif); ++ if (err) ++ goto out_fail; ++ } ++ ++ if (intf_pending & MCP25XXFD_REG_INT_SERRIF) { ++ err = mcp25xxfd_handle(priv, serrif); ++ if (err) ++ goto out_fail; ++ } ++ ++ if (intf_pending & MCP25XXFD_REG_INT_ECCIF) { ++ err = mcp25xxfd_handle(priv, eccif, set_normal_mode); ++ if (err) ++ goto out_fail; ++ } ++ ++ if (intf_pending & MCP25XXFD_REG_INT_SPICRCIF) { ++ err = mcp25xxfd_handle(priv, spicrcif); ++ if (err) ++ goto out_fail; ++ } ++ ++ /* On the MCP2527FD and MCP2518FD, we don't get a ++ * CERRIF IRQ on the transition TX ERROR_WARNING -> TX ++ * ERROR_ACTIVE. ++ */ ++ if (intf_pending & MCP25XXFD_REG_INT_CERRIF || ++ priv->can.state > CAN_STATE_ERROR_ACTIVE) { ++ err = mcp25xxfd_handle(priv, cerrif); ++ if (err) ++ goto out_fail; ++ ++ /* In Bus Off we completely shut down the ++ * controller. Every subsequent register read ++ * will read bogus data, and if ++ * MCP25XXFD_QUIRK_CRC_REG is enabled the CRC ++ * check will fail, too. So leave IRQ handler ++ * directly. ++ */ ++ if (priv->can.state == CAN_STATE_BUS_OFF) ++ return IRQ_HANDLED; ++ } ++ ++ handled = IRQ_HANDLED; ++ } while (1); ++ ++ out_fail: ++ netdev_err(priv->ndev, "IRQ handler returned %d (intf=0x%08x).\n", ++ err, priv->regs_status.intf); ++ mcp25xxfd_chip_interrupts_disable(priv); ++ ++ return handled; ++} ++ ++static inline struct ++mcp25xxfd_tx_obj *mcp25xxfd_get_tx_obj_next(struct mcp25xxfd_tx_ring *tx_ring) ++{ ++ u8 tx_head; ++ ++ tx_head = mcp25xxfd_get_tx_head(tx_ring); ++ ++ return &tx_ring->obj[tx_head]; ++} ++ ++static void ++mcp25xxfd_tx_obj_from_skb(const struct mcp25xxfd_priv *priv, ++ struct mcp25xxfd_tx_obj *tx_obj, ++ const struct sk_buff *skb, ++ unsigned int seq) ++{ ++ const struct canfd_frame *cfd = (struct canfd_frame *)skb->data; ++ struct mcp25xxfd_hw_tx_obj_raw *hw_tx_obj; ++ union mcp25xxfd_tx_obj_load_buf *load_buf; ++ u8 dlc; ++ u32 id, flags; ++ int offset, len; ++ ++ if (cfd->can_id & CAN_EFF_FLAG) { ++ u32 sid, eid; ++ ++ sid = FIELD_GET(MCP25XXFD_REG_FRAME_EFF_SID_MASK, cfd->can_id); ++ eid = FIELD_GET(MCP25XXFD_REG_FRAME_EFF_EID_MASK, cfd->can_id); ++ ++ id = FIELD_PREP(MCP25XXFD_OBJ_ID_EID_MASK, eid) | ++ FIELD_PREP(MCP25XXFD_OBJ_ID_SID_MASK, sid); ++ ++ flags = MCP25XXFD_OBJ_FLAGS_IDE; ++ } else { ++ id = FIELD_PREP(MCP25XXFD_OBJ_ID_SID_MASK, cfd->can_id); ++ flags = 0; ++ } ++ ++ /* Use the MCP2518FD mask even on the MCP2517FD. It doesn't ++ * harm, only the lower 7 bits will be transferred into the ++ * TEF object. ++ */ ++ dlc = can_len2dlc(cfd->len); ++ flags |= FIELD_PREP(MCP25XXFD_OBJ_FLAGS_SEQ_MCP2518FD_MASK, seq) | ++ FIELD_PREP(MCP25XXFD_OBJ_FLAGS_DLC, dlc); ++ ++ if (cfd->can_id & CAN_RTR_FLAG) ++ flags |= MCP25XXFD_OBJ_FLAGS_RTR; ++ ++ /* CANFD */ ++ if (can_is_canfd_skb(skb)) { ++ if (cfd->flags & CANFD_ESI) ++ flags |= MCP25XXFD_OBJ_FLAGS_ESI; ++ ++ flags |= MCP25XXFD_OBJ_FLAGS_FDF; ++ ++ if (cfd->flags & CANFD_BRS) ++ flags |= MCP25XXFD_OBJ_FLAGS_BRS; ++ } ++ ++ load_buf = &tx_obj->buf; ++ if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_TX) ++ hw_tx_obj = &load_buf->crc.hw_tx_obj; ++ else ++ hw_tx_obj = &load_buf->nocrc.hw_tx_obj; ++ ++ put_unaligned_le32(id, &hw_tx_obj->id); ++ put_unaligned_le32(flags, &hw_tx_obj->flags); ++ ++ /* Clear data at end of CAN frame */ ++ offset = round_down(cfd->len, sizeof(u32)); ++ len = round_up(can_dlc2len(dlc), sizeof(u32)) - offset; ++ if (MCP25XXFD_SANITIZE_CAN && len) ++ memset(hw_tx_obj->data + offset, 0x0, len); ++ memcpy(hw_tx_obj->data, cfd->data, cfd->len); ++ ++ /* Number of bytes to be written into the RAM of the controller */ ++ len = sizeof(hw_tx_obj->id) + sizeof(hw_tx_obj->flags); ++ if (MCP25XXFD_SANITIZE_CAN) ++ len += round_up(can_dlc2len(dlc), sizeof(u32)); ++ else ++ len += round_up(cfd->len, sizeof(u32)); ++ ++ if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_TX) { ++ u16 crc; ++ ++ mcp25xxfd_spi_cmd_crc_set_len_in_ram(&load_buf->crc.cmd, ++ len); ++ /* CRC */ ++ len += sizeof(load_buf->crc.cmd); ++ crc = mcp25xxfd_crc16_compute(&load_buf->crc, len); ++ put_unaligned_be16(crc, (void *)load_buf + len); ++ ++ /* Total length */ ++ len += sizeof(load_buf->crc.crc); ++ } else { ++ len += sizeof(load_buf->nocrc.cmd); ++ } ++ ++ tx_obj->xfer[0].len = len; ++} ++ ++static int mcp25xxfd_tx_obj_write(const struct mcp25xxfd_priv *priv, ++ struct mcp25xxfd_tx_obj *tx_obj) ++{ ++ return spi_async(priv->spi, &tx_obj->msg); ++} ++ ++static bool mcp25xxfd_tx_busy(const struct mcp25xxfd_priv *priv, ++ struct mcp25xxfd_tx_ring *tx_ring) ++{ ++ if (mcp25xxfd_get_tx_free(tx_ring) > 0) ++ return false; ++ ++ netif_stop_queue(priv->ndev); ++ ++ /* Memory barrier before checking tx_free (head and tail) */ ++ smp_mb(); ++ ++ if (mcp25xxfd_get_tx_free(tx_ring) == 0) { ++ netdev_dbg(priv->ndev, ++ "Stopping tx-queue (tx_head=0x%08x, tx_tail=0x%08x, len=%d).\n", ++ tx_ring->head, tx_ring->tail, ++ tx_ring->head - tx_ring->tail); ++ ++ return true; ++ } ++ ++ netif_start_queue(priv->ndev); ++ ++ return false; ++} ++ ++static netdev_tx_t mcp25xxfd_start_xmit(struct sk_buff *skb, ++ struct net_device *ndev) ++{ ++ struct mcp25xxfd_priv *priv = netdev_priv(ndev); ++ struct mcp25xxfd_tx_ring *tx_ring = priv->tx; ++ struct mcp25xxfd_tx_obj *tx_obj; ++ u8 tx_head; ++ int err; ++ ++ if (can_dropped_invalid_skb(ndev, skb)) ++ return NETDEV_TX_OK; ++ ++ if (mcp25xxfd_tx_busy(priv, tx_ring)) ++ return NETDEV_TX_BUSY; ++ ++ tx_obj = mcp25xxfd_get_tx_obj_next(tx_ring); ++ mcp25xxfd_tx_obj_from_skb(priv, tx_obj, skb, tx_ring->head); ++ ++ /* Stop queue if we occupy the complete TX FIFO */ ++ tx_head = mcp25xxfd_get_tx_head(tx_ring); ++ tx_ring->head++; ++ if (tx_ring->head - tx_ring->tail >= tx_ring->obj_num) ++ netif_stop_queue(ndev); ++ ++ can_put_echo_skb(skb, ndev, tx_head); ++ ++ err = mcp25xxfd_tx_obj_write(priv, tx_obj); ++ if (err) ++ goto out_err; ++ ++ return NETDEV_TX_OK; ++ ++ out_err: ++ netdev_err(priv->ndev, "ERROR in %s: %d\n", __func__, err); ++ ++ return NETDEV_TX_OK; ++} ++ ++static int mcp25xxfd_open(struct net_device *ndev) ++{ ++ struct mcp25xxfd_priv *priv = netdev_priv(ndev); ++ const struct spi_device *spi = priv->spi; ++ int err; ++ ++ err = pm_runtime_get_sync(ndev->dev.parent); ++ if (err < 0) { ++ pm_runtime_put_noidle(ndev->dev.parent); ++ return err; ++ } ++ ++ err = open_candev(ndev); ++ if (err) ++ goto out_pm_runtime_put; ++ ++ err = mcp25xxfd_ring_alloc(priv); ++ if (err) ++ goto out_close_candev; ++ ++ err = mcp25xxfd_transceiver_enable(priv); ++ if (err) ++ goto out_mcp25xxfd_ring_free; ++ ++ err = mcp25xxfd_chip_start(priv); ++ if (err) ++ goto out_transceiver_disable; ++ ++ can_rx_offload_enable(&priv->offload); ++ ++ err = request_threaded_irq(spi->irq, NULL, mcp25xxfd_irq, ++ IRQF_ONESHOT, dev_name(&spi->dev), ++ priv); ++ if (err) ++ goto out_can_rx_offload_disable; ++ ++ err = mcp25xxfd_chip_interrupts_enable(priv); ++ if (err) ++ goto out_free_irq; ++ ++ netif_start_queue(ndev); ++ ++ return 0; ++ ++ out_free_irq: ++ free_irq(spi->irq, priv); ++ out_can_rx_offload_disable: ++ can_rx_offload_disable(&priv->offload); ++ out_transceiver_disable: ++ mcp25xxfd_transceiver_disable(priv); ++ out_mcp25xxfd_ring_free: ++ mcp25xxfd_ring_free(priv); ++ out_close_candev: ++ close_candev(ndev); ++ out_pm_runtime_put: ++ mcp25xxfd_chip_stop(priv, CAN_STATE_STOPPED); ++ pm_runtime_put(ndev->dev.parent); ++ ++ return err; ++} ++ ++static int mcp25xxfd_stop(struct net_device *ndev) ++{ ++ struct mcp25xxfd_priv *priv = netdev_priv(ndev); ++ ++ netif_stop_queue(ndev); ++ mcp25xxfd_chip_interrupts_disable(priv); ++ free_irq(ndev->irq, priv); ++ can_rx_offload_disable(&priv->offload); ++ mcp25xxfd_chip_stop(priv, CAN_STATE_STOPPED); ++ mcp25xxfd_transceiver_disable(priv); ++ mcp25xxfd_ring_free(priv); ++ close_candev(ndev); ++ ++ pm_runtime_put(ndev->dev.parent); ++ ++ return 0; ++} ++ ++static const struct net_device_ops mcp25xxfd_netdev_ops = { ++ .ndo_open = mcp25xxfd_open, ++ .ndo_stop = mcp25xxfd_stop, ++ .ndo_start_xmit = mcp25xxfd_start_xmit, ++ .ndo_change_mtu = can_change_mtu, ++}; ++ ++static void ++mcp25xxfd_register_quirks(struct mcp25xxfd_priv *priv) ++{ ++ const struct spi_device *spi = priv->spi; ++ const struct spi_controller *ctlr = spi->controller; ++ ++ if (ctlr->flags & SPI_CONTROLLER_HALF_DUPLEX) ++ priv->devtype_data.quirks |= MCP25XXFD_QUIRK_HALF_DUPLEX; ++} ++ ++static int mcp25xxfd_register_chip_detect(struct mcp25xxfd_priv *priv) ++{ ++ const struct net_device *ndev = priv->ndev; ++ const struct mcp25xxfd_devtype_data *devtype_data; ++ u32 osc; ++ int err; ++ ++ /* The OSC_LPMEN is only supported on MCP2518FD, so use it to ++ * autodetect the model. ++ */ ++ err = regmap_update_bits(priv->map_reg, MCP25XXFD_REG_OSC, ++ MCP25XXFD_REG_OSC_LPMEN, ++ MCP25XXFD_REG_OSC_LPMEN); ++ if (err) ++ return err; ++ ++ err = regmap_read(priv->map_reg, MCP25XXFD_REG_OSC, &osc); ++ if (err) ++ return err; ++ ++ if (osc & MCP25XXFD_REG_OSC_LPMEN) ++ devtype_data = &mcp25xxfd_devtype_data_mcp2518fd; ++ else ++ devtype_data = &mcp25xxfd_devtype_data_mcp2517fd; ++ ++ if (!mcp25xxfd_is_25XX(priv) && ++ priv->devtype_data.model != devtype_data->model) { ++ netdev_info(ndev, ++ "Detected %s, but firmware specifies a %s. Fixing up.", ++ __mcp25xxfd_get_model_str(devtype_data->model), ++ mcp25xxfd_get_model_str(priv)); ++ } ++ priv->devtype_data = *devtype_data; ++ ++ /* We need to preserve the Half Duplex Quirk. */ ++ mcp25xxfd_register_quirks(priv); ++ ++ /* Re-init regmap with quirks of detected model. */ ++ return mcp25xxfd_regmap_init(priv); ++} ++ ++static int mcp25xxfd_register_check_rx_int(struct mcp25xxfd_priv *priv) ++{ ++ int err, rx_pending; ++ ++ if (!priv->rx_int) ++ return 0; ++ ++ err = mcp25xxfd_chip_rx_int_enable(priv); ++ if (err) ++ return err; ++ ++ /* Check if RX_INT is properly working. The RX_INT should not ++ * be active after a softreset. ++ */ ++ rx_pending = gpiod_get_value_cansleep(priv->rx_int); ++ ++ err = mcp25xxfd_chip_rx_int_disable(priv); ++ if (err) ++ return err; ++ ++ if (!rx_pending) ++ return 0; ++ ++ netdev_info(priv->ndev, ++ "RX_INT active after softreset, disabling RX_INT support."); ++ devm_gpiod_put(&priv->spi->dev, priv->rx_int); ++ priv->rx_int = NULL; ++ ++ return 0; ++} ++ ++static int ++mcp25xxfd_register_get_dev_id(const struct mcp25xxfd_priv *priv, ++ u32 *dev_id, u32 *effective_speed_hz) ++{ ++ struct mcp25xxfd_map_buf_nocrc *buf_rx; ++ struct mcp25xxfd_map_buf_nocrc *buf_tx; ++ struct spi_transfer xfer[2] = { }; ++ int err; ++ ++ buf_rx = kzalloc(sizeof(*buf_rx), GFP_KERNEL); ++ if (!buf_rx) ++ return -ENOMEM; ++ ++ buf_tx = kzalloc(sizeof(*buf_tx), GFP_KERNEL); ++ if (!buf_tx) { ++ err = -ENOMEM; ++ goto out_kfree_buf_rx; ++ } ++ ++ xfer[0].tx_buf = buf_tx; ++ xfer[0].len = sizeof(buf_tx->cmd); ++ xfer[1].rx_buf = buf_rx->data; ++ xfer[1].len = sizeof(dev_id); ++ ++ mcp25xxfd_spi_cmd_read_nocrc(&buf_tx->cmd, MCP25XXFD_REG_DEVID); ++ err = spi_sync_transfer(priv->spi, xfer, ARRAY_SIZE(xfer)); ++ if (err) ++ goto out_kfree_buf_tx; ++ ++ *dev_id = be32_to_cpup((__be32 *)buf_rx->data); ++ *effective_speed_hz = xfer->effective_speed_hz; ++ ++ out_kfree_buf_tx: ++ kfree(buf_tx); ++ out_kfree_buf_rx: ++ kfree(buf_rx); ++ ++ return 0; ++} ++ ++#define MCP25XXFD_QUIRK_ACTIVE(quirk) \ ++ (priv->devtype_data.quirks & MCP25XXFD_QUIRK_##quirk ? '+' : '-') ++ ++static int ++mcp25xxfd_register_done(const struct mcp25xxfd_priv *priv) ++{ ++ u32 dev_id, effective_speed_hz; ++ int err; ++ ++ err = mcp25xxfd_register_get_dev_id(priv, &dev_id, ++ &effective_speed_hz); ++ if (err) ++ return err; ++ ++ netdev_info(priv->ndev, ++ "%s rev%lu.%lu (%cRX_INT %cMAB_NO_WARN %cCRC_REG %cCRC_RX %cCRC_TX %cECC %cHD c:%u.%02uMHz m:%u.%02uMHz r:%u.%02uMHz e:%u.%02uMHz) successfully initialized.\n", ++ mcp25xxfd_get_model_str(priv), ++ FIELD_GET(MCP25XXFD_REG_DEVID_ID_MASK, dev_id), ++ FIELD_GET(MCP25XXFD_REG_DEVID_REV_MASK, dev_id), ++ priv->rx_int ? '+' : '-', ++ MCP25XXFD_QUIRK_ACTIVE(MAB_NO_WARN), ++ MCP25XXFD_QUIRK_ACTIVE(CRC_REG), ++ MCP25XXFD_QUIRK_ACTIVE(CRC_RX), ++ MCP25XXFD_QUIRK_ACTIVE(CRC_TX), ++ MCP25XXFD_QUIRK_ACTIVE(ECC), ++ MCP25XXFD_QUIRK_ACTIVE(HALF_DUPLEX), ++ priv->can.clock.freq / 1000000, ++ priv->can.clock.freq % 1000000 / 1000 / 10, ++ priv->spi_max_speed_hz_orig / 1000000, ++ priv->spi_max_speed_hz_orig % 1000000 / 1000 / 10, ++ priv->spi->max_speed_hz / 1000000, ++ priv->spi->max_speed_hz % 1000000 / 1000 / 10, ++ effective_speed_hz / 1000000, ++ effective_speed_hz % 1000000 / 1000 / 10); ++ ++ return 0; ++} ++ ++static int mcp25xxfd_register(struct mcp25xxfd_priv *priv) ++{ ++ struct net_device *ndev = priv->ndev; ++ int err; ++ ++ err = mcp25xxfd_clks_and_vdd_enable(priv); ++ if (err) ++ return err; ++ ++ pm_runtime_get_noresume(ndev->dev.parent); ++ err = pm_runtime_set_active(ndev->dev.parent); ++ if (err) ++ goto out_runtime_put_noidle; ++ pm_runtime_enable(ndev->dev.parent); ++ ++ mcp25xxfd_register_quirks(priv); ++ ++ err = mcp25xxfd_chip_softreset(priv); ++ if (err == -ENODEV) ++ goto out_runtime_disable; ++ if (err) ++ goto out_chip_set_mode_sleep; ++ ++ err = mcp25xxfd_register_chip_detect(priv); ++ if (err) ++ goto out_chip_set_mode_sleep; ++ ++ err = mcp25xxfd_register_check_rx_int(priv); ++ if (err) ++ goto out_chip_set_mode_sleep; ++ ++ err = register_candev(ndev); ++ if (err) ++ goto out_chip_set_mode_sleep; ++ ++ err = mcp25xxfd_register_done(priv); ++ if (err) ++ goto out_unregister_candev; ++ ++ /* Put controller into sleep mode and let pm_runtime_put() ++ * disable the clocks and vdd. If CONFIG_PM is not enabled, ++ * the clocks and vdd will stay powered. ++ */ ++ err = mcp25xxfd_chip_set_mode(priv, MCP25XXFD_REG_CON_MODE_SLEEP); ++ if (err) ++ goto out_unregister_candev; ++ ++ pm_runtime_put(ndev->dev.parent); ++ ++ return 0; ++ ++ out_unregister_candev: ++ unregister_candev(ndev); ++ out_chip_set_mode_sleep: ++ mcp25xxfd_chip_set_mode(priv, MCP25XXFD_REG_CON_MODE_SLEEP); ++ out_runtime_disable: ++ pm_runtime_disable(ndev->dev.parent); ++ out_runtime_put_noidle: ++ pm_runtime_put_noidle(ndev->dev.parent); ++ mcp25xxfd_clks_and_vdd_disable(priv); ++ ++ return err; ++} ++ ++static inline void mcp25xxfd_unregister(struct mcp25xxfd_priv *priv) ++{ ++ struct net_device *ndev = priv->ndev; ++ ++ unregister_candev(ndev); ++ ++ pm_runtime_get_sync(ndev->dev.parent); ++ pm_runtime_put_noidle(ndev->dev.parent); ++ mcp25xxfd_clks_and_vdd_disable(priv); ++ pm_runtime_disable(ndev->dev.parent); ++} ++ ++static const struct of_device_id mcp25xxfd_of_match[] = { ++ { ++ .compatible = "microchip,mcp2517fd", ++ .data = &mcp25xxfd_devtype_data_mcp2517fd, ++ }, { ++ .compatible = "microchip,mcp2518fd", ++ .data = &mcp25xxfd_devtype_data_mcp2518fd, ++ }, { ++ .compatible = "microchip,mcp25xxfd", ++ .data = &mcp25xxfd_devtype_data_mcp25xxfd, ++ }, { ++ /* sentinel */ ++ }, ++}; ++MODULE_DEVICE_TABLE(of, mcp25xxfd_of_match); ++ ++static const struct spi_device_id mcp25xxfd_id_table[] = { ++ { ++ .name = "mcp2517fd", ++ .driver_data = (kernel_ulong_t)&mcp25xxfd_devtype_data_mcp2517fd, ++ }, { ++ .name = "mcp2518fd", ++ .driver_data = (kernel_ulong_t)&mcp25xxfd_devtype_data_mcp2518fd, ++ }, { ++ .name = "mcp25xxfd", ++ .driver_data = (kernel_ulong_t)&mcp25xxfd_devtype_data_mcp25xxfd, ++ }, { ++ /* sentinel */ ++ }, ++}; ++MODULE_DEVICE_TABLE(spi, mcp25xxfd_id_table); ++ ++static int mcp25xxfd_probe(struct spi_device *spi) ++{ ++ const void *match; ++ struct net_device *ndev; ++ struct mcp25xxfd_priv *priv; ++ struct gpio_desc *rx_int; ++ struct regulator *reg_vdd, *reg_xceiver; ++ struct clk *clk; ++ u32 freq; ++ int err; ++ ++ rx_int = devm_gpiod_get_optional(&spi->dev, "microchip,rx-int", ++ GPIOD_IN); ++ if (PTR_ERR(rx_int) == -EPROBE_DEFER) ++ return -EPROBE_DEFER; ++ else if (IS_ERR(rx_int)) ++ return PTR_ERR(rx_int); ++ ++ reg_vdd = devm_regulator_get_optional(&spi->dev, "vdd"); ++ if (PTR_ERR(reg_vdd) == -EPROBE_DEFER) ++ return -EPROBE_DEFER; ++ else if (PTR_ERR(reg_vdd) == -ENODEV) ++ reg_vdd = NULL; ++ else if (IS_ERR(reg_vdd)) ++ return PTR_ERR(reg_vdd); ++ ++ reg_xceiver = devm_regulator_get_optional(&spi->dev, "xceiver"); ++ if (PTR_ERR(reg_xceiver) == -EPROBE_DEFER) ++ return -EPROBE_DEFER; ++ else if (PTR_ERR(reg_xceiver) == -ENODEV) ++ reg_xceiver = NULL; ++ else if (IS_ERR(reg_xceiver)) ++ return PTR_ERR(reg_xceiver); ++ ++ clk = devm_clk_get(&spi->dev, NULL); ++ if (IS_ERR(clk)) { ++ dev_err(&spi->dev, "No Oscillator (clock) defined.\n"); ++ return PTR_ERR(clk); ++ } ++ freq = clk_get_rate(clk); ++ ++ /* Sanity check */ ++ if (freq < MCP25XXFD_SYSCLOCK_HZ_MIN || ++ freq > MCP25XXFD_SYSCLOCK_HZ_MAX) { ++ dev_err(&spi->dev, ++ "Oscillator frequency (%u Hz) is too low or high.\n", ++ freq); ++ return -ERANGE; ++ } ++ ++ if (freq <= MCP25XXFD_SYSCLOCK_HZ_MAX / MCP25XXFD_OSC_PLL_MULTIPLIER) { ++ dev_err(&spi->dev, ++ "Oscillator frequency (%u Hz) is too low and PLL is not supported.\n", ++ freq); ++ return -ERANGE; ++ } ++ ++ ndev = alloc_candev(sizeof(struct mcp25xxfd_priv), ++ MCP25XXFD_TX_OBJ_NUM_MAX); ++ if (!ndev) ++ return -ENOMEM; ++ ++ SET_NETDEV_DEV(ndev, &spi->dev); ++ ++ ndev->netdev_ops = &mcp25xxfd_netdev_ops; ++ ndev->irq = spi->irq; ++ ndev->flags |= IFF_ECHO; ++ ++ priv = netdev_priv(ndev); ++ spi_set_drvdata(spi, priv); ++ priv->can.clock.freq = freq; ++ priv->can.do_set_mode = mcp25xxfd_set_mode; ++ priv->can.do_get_berr_counter = mcp25xxfd_get_berr_counter; ++ priv->can.bittiming_const = &mcp25xxfd_bittiming_const; ++ priv->can.data_bittiming_const = &mcp25xxfd_data_bittiming_const; ++ priv->can.ctrlmode_supported = CAN_CTRLMODE_BERR_REPORTING | ++ CAN_CTRLMODE_FD | CAN_CTRLMODE_FD_NON_ISO; ++ priv->ndev = ndev; ++ priv->spi = spi; ++ priv->rx_int = rx_int; ++ priv->clk = clk; ++ priv->reg_vdd = reg_vdd; ++ priv->reg_xceiver = reg_xceiver; ++ ++ match = device_get_match_data(&spi->dev); ++ if (match) ++ priv->devtype_data = *(struct mcp25xxfd_devtype_data *)match; ++ else ++ priv->devtype_data = *(struct mcp25xxfd_devtype_data *) ++ spi_get_device_id(spi)->driver_data; ++ ++ /* According to the datasheet the SPI clock must be less or ++ * equal SYSCLOCK / 2. ++ * ++ * It turns out, that the Controller is not stable at this ++ * rate. Known good and bad combinations are: ++ * ++ * MCP ext-clk SoC SPI SPI-clk max-clk parent-clk Status config ++ * ++ * 2518 20 MHz allwinner,sun8i-h3 allwinner,sun8i-h3-spi 8333333 Hz 83.33% 600000000 Hz good assigned-clocks = <&ccu CLK_SPIx> ++ * 2518 20 MHz allwinner,sun8i-h3 allwinner,sun8i-h3-spi 9375000 Hz 93.75% 600000000 Hz bad assigned-clocks = <&ccu CLK_SPIx> ++ * 2518 40 MHz allwinner,sun8i-h3 allwinner,sun8i-h3-spi 16666667 Hz 83.33% 600000000 Hz good assigned-clocks = <&ccu CLK_SPIx> ++ * 2518 40 MHz allwinner,sun8i-h3 allwinner,sun8i-h3-spi 18750000 Hz 93.75% 600000000 Hz bad assigned-clocks = <&ccu CLK_SPIx> ++ * 2517 20 MHz fsl,imx8mm fsl,imx51-ecspi 8333333 Hz 83.33% 16666667 Hz good assigned-clocks = <&clk IMX8MM_CLK_ECSPIx_ROOT> ++ * 2517 20 MHz fsl,imx8mm fsl,imx51-ecspi 9523809 Hz 95.34% 28571429 Hz bad assigned-clocks = <&clk IMX8MM_CLK_ECSPIx_ROOT> ++ * 2517 40 MHz atmel,sama5d27 atmel,at91rm9200-spi 16400000 Hz 82.00% 82000000 Hz good default ++ * 2518 40 MHz atmel,sama5d27 atmel,at91rm9200-spi 16400000 Hz 82.00% 82000000 Hz good default ++ * ++ * Limit SPI clock to 85% of SYSCLOCK / 2 for now. ++ */ ++ priv->spi_max_speed_hz_orig = spi->max_speed_hz; ++ spi->max_speed_hz = min(spi->max_speed_hz, freq / 2 / 1000 * 850); ++ spi->bits_per_word = 8; ++ spi->rt = true; ++ err = spi_setup(spi); ++ if (err) ++ goto out_free_candev; ++ ++ err = mcp25xxfd_regmap_init(priv); ++ if (err) ++ goto out_free_candev; ++ ++ err = can_rx_offload_add_manual(ndev, &priv->offload, ++ MCP25XXFD_NAPI_WEIGHT); ++ if (err) ++ goto out_free_candev; ++ ++ err = mcp25xxfd_register(priv); ++ if (err) ++ goto out_free_candev; ++ ++ return 0; ++ ++ out_free_candev: ++ spi->max_speed_hz = priv->spi_max_speed_hz_orig; ++ ++ free_candev(ndev); ++ ++ return err; ++} ++ ++static int mcp25xxfd_remove(struct spi_device *spi) ++{ ++ struct mcp25xxfd_priv *priv = spi_get_drvdata(spi); ++ struct net_device *ndev = priv->ndev; ++ ++ can_rx_offload_del(&priv->offload); ++ mcp25xxfd_unregister(priv); ++ spi->max_speed_hz = priv->spi_max_speed_hz_orig; ++ free_candev(ndev); ++ ++ return 0; ++} ++ ++static int __maybe_unused mcp25xxfd_runtime_suspend(struct device *device) ++{ ++ const struct mcp25xxfd_priv *priv = dev_get_drvdata(device); ++ ++ return mcp25xxfd_clks_and_vdd_disable(priv); ++} ++ ++static int __maybe_unused mcp25xxfd_runtime_resume(struct device *device) ++{ ++ const struct mcp25xxfd_priv *priv = dev_get_drvdata(device); ++ ++ return mcp25xxfd_clks_and_vdd_enable(priv); ++} ++ ++static const struct dev_pm_ops mcp25xxfd_pm_ops = { ++ SET_RUNTIME_PM_OPS(mcp25xxfd_runtime_suspend, ++ mcp25xxfd_runtime_resume, NULL) ++}; ++ ++static struct spi_driver mcp25xxfd_driver = { ++ .driver = { ++ .name = DEVICE_NAME, ++ .pm = &mcp25xxfd_pm_ops, ++ .of_match_table = mcp25xxfd_of_match, ++ }, ++ .probe = mcp25xxfd_probe, ++ .remove = mcp25xxfd_remove, ++ .id_table = mcp25xxfd_id_table, ++}; ++module_spi_driver(mcp25xxfd_driver); ++ ++MODULE_AUTHOR("Marc Kleine-Budde "); ++MODULE_DESCRIPTION("Microchip MCP25xxFD Family CAN controller driver"); ++MODULE_LICENSE("GPL v2"); +-- +2.18.4 + + +From a30b7433921569fd6821d9452310b1fb78a1bce9 Mon Sep 17 00:00:00 2001 +From: Kurt Van Dijck +Date: Fri, 18 Sep 2020 19:25:34 +0200 +Subject: [PATCH 1181/1209] can: mcp25xxfd: add listen-only mode + +This commit enables listen-only mode, which works internally like CANFD mode. + +Signed-off-by: Kurt Van Dijck +Signed-off-by: Marc Kleine-Budde +Link: https://lore.kernel.org/r/20200918172536.2074504-5-mkl@pengutronix.de +(cherry picked from commit 33ea42f69f194ee6f00761e14d0f9db9b1701c1e) +Signed-off-by: Marc Kleine-Budde +--- + drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +diff --git a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c +index eed20e132ddb..fd736fc13396 100644 +--- a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c ++++ b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c +@@ -392,7 +392,8 @@ static int mcp25xxfd_ring_alloc(struct mcp25xxfd_priv *priv) + int ram_free, i; + + tef_obj_size = sizeof(struct mcp25xxfd_hw_tef_obj); +- if (priv->can.ctrlmode & CAN_CTRLMODE_FD) { ++ /* listen-only mode works like FD mode */ ++ if (priv->can.ctrlmode & (CAN_CTRLMODE_LISTENONLY | CAN_CTRLMODE_FD)) { + tx_obj_num = MCP25XXFD_TX_OBJ_NUM_CANFD; + tx_obj_size = sizeof(struct mcp25xxfd_hw_tx_obj_canfd); + rx_obj_size = sizeof(struct mcp25xxfd_hw_rx_obj_canfd); +@@ -807,7 +808,7 @@ mcp25xxfd_chip_rx_fifo_init_one(const struct mcp25xxfd_priv *priv, + MCP25XXFD_REG_FIFOCON_RXOVIE | + MCP25XXFD_REG_FIFOCON_TFNRFNIE; + +- if (priv->can.ctrlmode & CAN_CTRLMODE_FD) ++ if (priv->can.ctrlmode & (CAN_CTRLMODE_LISTENONLY | CAN_CTRLMODE_FD)) + fifo_con |= FIELD_PREP(MCP25XXFD_REG_FIFOCON_PLSIZE_MASK, + MCP25XXFD_REG_FIFOCON_PLSIZE_64); + else +@@ -857,7 +858,7 @@ static int mcp25xxfd_chip_fifo_init(const struct mcp25xxfd_priv *priv) + MCP25XXFD_REG_FIFOCON_TXEN | + MCP25XXFD_REG_FIFOCON_TXATIE; + +- if (priv->can.ctrlmode & CAN_CTRLMODE_FD) ++ if (priv->can.ctrlmode & (CAN_CTRLMODE_LISTENONLY | CAN_CTRLMODE_FD)) + val |= FIELD_PREP(MCP25XXFD_REG_FIFOCON_PLSIZE_MASK, + MCP25XXFD_REG_FIFOCON_PLSIZE_64); + else +@@ -930,7 +931,9 @@ static u8 mcp25xxfd_get_normal_mode(const struct mcp25xxfd_priv *priv) + { + u8 mode; + +- if (priv->can.ctrlmode & CAN_CTRLMODE_FD) ++ if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY) ++ mode = MCP25XXFD_REG_CON_MODE_LISTENONLY; ++ else if (priv->can.ctrlmode & CAN_CTRLMODE_FD) + mode = MCP25XXFD_REG_CON_MODE_MIXED; + else + mode = MCP25XXFD_REG_CON_MODE_CAN2_0; +@@ -2792,8 +2795,9 @@ static int mcp25xxfd_probe(struct spi_device *spi) + priv->can.do_get_berr_counter = mcp25xxfd_get_berr_counter; + priv->can.bittiming_const = &mcp25xxfd_bittiming_const; + priv->can.data_bittiming_const = &mcp25xxfd_data_bittiming_const; +- priv->can.ctrlmode_supported = CAN_CTRLMODE_BERR_REPORTING | +- CAN_CTRLMODE_FD | CAN_CTRLMODE_FD_NON_ISO; ++ priv->can.ctrlmode_supported = CAN_CTRLMODE_LISTENONLY | ++ CAN_CTRLMODE_BERR_REPORTING | CAN_CTRLMODE_FD | ++ CAN_CTRLMODE_FD_NON_ISO; + priv->ndev = ndev; + priv->spi = spi; + priv->rx_int = rx_int; +-- +2.18.4 + + +From a2b29b11bd6877cc2e0af613c679065a90b17c6e Mon Sep 17 00:00:00 2001 +From: Thomas Kopp +Date: Fri, 25 Sep 2020 08:56:06 +0200 +Subject: [PATCH 1182/1209] can: mcp25xxfd: mcp25xxfd_handle_eccif(): add ECC + related errata and update log messages + +This patch adds a reference to the recent released MCP2517FD and MCP2518FD +errata sheets and paste the explanation. + +The single error correction does not always work, so always indicate that a +single error occurred. If the location of the ECC error is outside of the +TX-RAM always use netdev_notice() to log the problem. For ECC errors in the +TX-RAM, there is a recovery procedure. + +Signed-off-by: Thomas Kopp +Link: https://lore.kernel.org/r/20200925065606.358-1-thomas.kopp@microchip.com +[mkl: split into two patches, adjust subject and commit message] +Signed-off-by: Marc Kleine-Budde +(cherry picked from commit 788b83ea2ccc6a7d8ab3177ad9448597e96cbb4b) +Signed-off-by: Marc Kleine-Budde +--- + .../net/can/spi/mcp25xxfd/mcp25xxfd-core.c | 21 ++++++++++++------- + 1 file changed, 14 insertions(+), 7 deletions(-) + +diff --git a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c +index fd736fc13396..cad6f139bcf6 100644 +--- a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c ++++ b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c +@@ -1973,8 +1973,20 @@ mcp25xxfd_handle_eccif(struct mcp25xxfd_priv *priv, bool set_normal_mode) + else + return err; + ++ /* Errata Reference: ++ * mcp2517fd: DS80000789B, mcp2518fd: DS80000792C 2. ++ * ++ * ECC single error correction does not work in all cases: ++ * ++ * Fix/Work Around: ++ * Enable single error correction and double error detection ++ * interrupts by setting SECIE and DEDIE. Handle SECIF as a ++ * detection interrupt and do not rely on the error ++ * correction. Instead, handle both interrupts as a ++ * notification that the RAM word at ERRADDR was corrupted. ++ */ + if (ecc_stat & MCP25XXFD_REG_ECCSTAT_SECIF) +- msg = "Single ECC Error corrected at address"; ++ msg = "Single ECC Error detected at address"; + else if (ecc_stat & MCP25XXFD_REG_ECCSTAT_DEDIF) + msg = "Double ECC Error detected at address"; + else +@@ -1983,12 +1995,7 @@ mcp25xxfd_handle_eccif(struct mcp25xxfd_priv *priv, bool set_normal_mode) + if (!in_tx_ram) { + ecc->ecc_stat = 0; + +- if (ecc_stat & MCP25XXFD_REG_ECCSTAT_SECIF) +- netdev_info(priv->ndev, "%s 0x%04x.\n", +- msg, addr); +- else +- netdev_notice(priv->ndev, "%s 0x%04x.\n", +- msg, addr); ++ netdev_notice(priv->ndev, "%s 0x%04x.\n", msg, addr); + } else { + /* Re-occurring error? */ + if (ecc->ecc_stat == ecc_stat) { +-- +2.18.4 + + +From 728cb015ad6725909b4b1f55051b9778e7de98e7 Mon Sep 17 00:00:00 2001 +From: Thomas Kopp +Date: Fri, 25 Sep 2020 08:56:06 +0200 +Subject: [PATCH 1183/1209] can: mcp25xxfd: mcp25xxfd_probe(): add SPI clk + limit related errata information + +This patch adds a reference to the recent released MCP2517FD and MCP2518FD +errata sheets and paste the explanation. + +The driver already implements the proposed fix. + +Signed-off-by: Thomas Kopp +Link: https://lore.kernel.org/r/20200925065606.358-1-thomas.kopp@microchip.com +[mkl: split into two patches, adjust subject and commit message] +Signed-off-by: Marc Kleine-Budde +(cherry picked from commit f5b84dedf7ebf56f4af25b72aadd1a4122759b62) +Signed-off-by: Marc Kleine-Budde +--- + .../net/can/spi/mcp25xxfd/mcp25xxfd-core.c | 19 ++++++++++++++----- + 1 file changed, 14 insertions(+), 5 deletions(-) + +diff --git a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c +index cad6f139bcf6..310bc93c69f8 100644 +--- a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c ++++ b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c +@@ -2819,11 +2819,21 @@ static int mcp25xxfd_probe(struct spi_device *spi) + priv->devtype_data = *(struct mcp25xxfd_devtype_data *) + spi_get_device_id(spi)->driver_data; + +- /* According to the datasheet the SPI clock must be less or +- * equal SYSCLOCK / 2. ++ /* Errata Reference: ++ * mcp2517fd: DS80000789B, mcp2518fd: DS80000792C 4. ++ * ++ * The SPI can write corrupted data to the RAM at fast SPI ++ * speeds: ++ * ++ * Simultaneous activity on the CAN bus while writing data to ++ * RAM via the SPI interface, with high SCK frequency, can ++ * lead to corrupted data being written to RAM. ++ * ++ * Fix/Work Around: ++ * Ensure that FSCK is less than or equal to 0.85 * ++ * (FSYSCLK/2). + * +- * It turns out, that the Controller is not stable at this +- * rate. Known good and bad combinations are: ++ * Known good and bad combinations are: + * + * MCP ext-clk SoC SPI SPI-clk max-clk parent-clk Status config + * +@@ -2836,7 +2846,6 @@ static int mcp25xxfd_probe(struct spi_device *spi) + * 2517 40 MHz atmel,sama5d27 atmel,at91rm9200-spi 16400000 Hz 82.00% 82000000 Hz good default + * 2518 40 MHz atmel,sama5d27 atmel,at91rm9200-spi 16400000 Hz 82.00% 82000000 Hz good default + * +- * Limit SPI clock to 85% of SYSCLOCK / 2 for now. + */ + priv->spi_max_speed_hz_orig = spi->max_speed_hz; + spi->max_speed_hz = min(spi->max_speed_hz, freq / 2 / 1000 * 850); +-- +2.18.4 + + +From b965df0566d64d8d1314ad4b30f00d8a77b35435 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Wed, 23 Sep 2020 14:27:52 +0300 +Subject: [PATCH 1184/1209] can: mcp25xxfd: mcp25xxfd_ring_free(): fix memory + leak during cleanup + +This loop doesn't free the first element of the array. The "i > 0" has +to be changed to "i >= 0". + +Fixes: 55e5b97f003e ("can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN") +Signed-off-by: Dan Carpenter +Link: https://lore.kernel.org/r/20200923112752.GA1473821@mwanda +Signed-off-by: Marc Kleine-Budde +(cherry picked from commit 8cffc6fe65108e66c8cfe46307bf2325a4434056) +Signed-off-by: Marc Kleine-Budde +--- + drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c +index 310bc93c69f8..edcf9e287284 100644 +--- a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c ++++ b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c +@@ -377,7 +377,7 @@ static void mcp25xxfd_ring_free(struct mcp25xxfd_priv *priv) + { + int i; + +- for (i = ARRAY_SIZE(priv->rx) - 1; i > 0; i--) { ++ for (i = ARRAY_SIZE(priv->rx) - 1; i >= 0; i--) { + kfree(priv->rx[i]); + priv->rx[i] = NULL; + } +-- +2.18.4 + + +From f9404e60bcad9eb5d35346baa212c943924b64b8 Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde +Date: Wed, 23 Sep 2020 13:44:36 +0200 +Subject: [PATCH 1185/1209] can: mcp25xxfd: mcp25xxfd_irq(): add missing + initialization of variable set_normal mode + +This patch fixes the following warning: + + drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c:2155 mcp25xxfd_irq() + error: uninitialized symbol 'set_normal_mode'. + +by adding the missing initialization. + +Reported-by: Dan Carpenter +Reviewed-by: Manivannan Sadhasivam +Fixes: 55e5b97f003e ("can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN") +Link: https://lore.kernel.org/r/20200923114726.2704426-1-mkl@pengutronix.de +Signed-off-by: Marc Kleine-Budde +(cherry picked from commit 727fba74b51175972b72dc26d225833b977a69f7) +Signed-off-by: Marc Kleine-Budde +--- + drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c +index edcf9e287284..7fb654edfc9f 100644 +--- a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c ++++ b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c +@@ -2080,7 +2080,7 @@ static irqreturn_t mcp25xxfd_irq(int irq, void *dev_id) + + do { + u32 intf_pending, intf_pending_clearable; +- bool set_normal_mode; ++ bool set_normal_mode = false; + + err = regmap_bulk_read(priv->map_reg, MCP25XXFD_REG_INT, + &priv->regs_status, +-- +2.18.4 + + +From 39e207ef14a91446757bc94558fc1012935e96c0 Mon Sep 17 00:00:00 2001 +From: Oleksij Rempel +Date: Wed, 23 Sep 2020 14:53:01 +0200 +Subject: [PATCH 1186/1209] dt-binding: can: mcp25xxfd: documentation fixes + +Apply following fixes: +- Use 'interrupts'. (interrupts-extended will automagically be supported + by the tools) +- *-supply is always a single item. So, drop maxItems=1 +- add "additionalProperties: false" flag to detect unneeded properties. + +Signed-off-by: Oleksij Rempel +Link: https://lore.kernel.org/r/20200923125301.27200-1-o.rempel@pengutronix.de +Reported-by: Rob Herring +Reviewed-by: Rob Herring +Fixes: 1b5a78e69c1f ("dt-binding: can: mcp25xxfd: document device tree bindings") +Signed-off-by: Marc Kleine-Budde +(cherry picked from commit 9d5c8df1b93999191856533ead6c4ff21b13c44b) +Signed-off-by: Marc Kleine-Budde +--- + .../devicetree/bindings/net/can/microchip,mcp25xxfd.yaml | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Documentation/devicetree/bindings/net/can/microchip,mcp25xxfd.yaml b/Documentation/devicetree/bindings/net/can/microchip,mcp25xxfd.yaml +index aa2cad14d6d7..5beb00a614bf 100644 +--- a/Documentation/devicetree/bindings/net/can/microchip,mcp25xxfd.yaml ++++ b/Documentation/devicetree/bindings/net/can/microchip,mcp25xxfd.yaml +@@ -24,7 +24,7 @@ properties: + reg: + maxItems: 1 + +- interrupts-extended: ++ interrupts: + maxItems: 1 + + clocks: +@@ -32,11 +32,9 @@ properties: + + vdd-supply: + description: Regulator that powers the CAN controller. +- maxItems: 1 + + xceiver-supply: + description: Regulator that powers the CAN transceiver. +- maxItems: 1 + + microchip,rx-int-gpios: + description: +@@ -52,9 +50,11 @@ properties: + required: + - compatible + - reg +- - interrupts-extended ++ - interrupts + - clocks + ++additionalProperties: false ++ + examples: + - | + #include +-- +2.18.4 + + +From 6dd0c42ce15f4377e1f1e9f775b21e10e170eb9d Mon Sep 17 00:00:00 2001 +From: Thomas Kopp +Date: Wed, 30 Sep 2020 11:14:23 +0200 +Subject: [PATCH 1187/1209] dt-binding: can: mcp251xfd: narrow down wildcards + in device tree bindings to "microchip,mcp251xfd" + +The wildcard should be narrowed down to prevent existing and future devices +that are not compatible from matching. It is very unlikely that incompatible +devices will be released that do not match the wildcard. + +This is the documentation part of the commit. + +Discussion Reference: https://lore.kernel.org/r/CAMuHMdVkwGjr6dJuMyhQNqFoJqbh6Ec5V2b5LenCshwpM2SDsQ@mail.gmail.com + +Reported-by: Geert Uytterhoeven +Signed-off-by: Thomas Kopp +Link: https://lore.kernel.org/r/20200930091423.755-2-thomas.kopp@microchip.com +[mkl: rename file, too] +Signed-off-by: Marc Kleine-Budde +(cherry picked from commit 0e051294c03e84e1dcb9c84d105d762aedb27364) +Signed-off-by: Marc Kleine-Budde +--- + ...{microchip,mcp25xxfd.yaml => microchip,mcp251xfd.yaml} | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + rename Documentation/devicetree/bindings/net/can/{microchip,mcp25xxfd.yaml => microchip,mcp251xfd.yaml} (91%) + +diff --git a/Documentation/devicetree/bindings/net/can/microchip,mcp25xxfd.yaml b/Documentation/devicetree/bindings/net/can/microchip,mcp251xfd.yaml +similarity index 91% +rename from Documentation/devicetree/bindings/net/can/microchip,mcp25xxfd.yaml +rename to Documentation/devicetree/bindings/net/can/microchip,mcp251xfd.yaml +index 5beb00a614bf..2a884c1fe0e0 100644 +--- a/Documentation/devicetree/bindings/net/can/microchip,mcp25xxfd.yaml ++++ b/Documentation/devicetree/bindings/net/can/microchip,mcp251xfd.yaml +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) + %YAML 1.2 + --- +-$id: http://devicetree.org/schemas/net/can/microchip,mcp25xxfd.yaml# ++$id: http://devicetree.org/schemas/net/can/microchip,mcp251xfd.yaml# + $schema: http://devicetree.org/meta-schemas/core.yaml# + + title: +@@ -18,7 +18,7 @@ properties: + description: for MCP2517FD + - const: microchip,mcp2518fd + description: for MCP2518FD +- - const: microchip,mcp25xxfd ++ - const: microchip,mcp251xfd + description: to autodetect chip variant + + reg: +@@ -38,7 +38,7 @@ properties: + + microchip,rx-int-gpios: + description: +- GPIO phandle of GPIO connected to to INT1 pin of the MCP25XXFD, which ++ GPIO phandle of GPIO connected to to INT1 pin of the MCP251XFD, which + signals a pending RX interrupt. + maxItems: 1 + +@@ -65,7 +65,7 @@ examples: + #size-cells = <0>; + + can@0 { +- compatible = "microchip,mcp25xxfd"; ++ compatible = "microchip,mcp251xfd"; + reg = <0>; + clocks = <&can0_osc>; + pinctrl-names = "default"; +-- +2.18.4 + + +From c85e2a7456a9a9ee9f4813dbe14e10c559619754 Mon Sep 17 00:00:00 2001 +From: Thomas Kopp +Date: Wed, 30 Sep 2020 11:14:22 +0200 +Subject: [PATCH 1188/1209] can: mcp25xxfd: narrow down wildcards in device + tree bindings to "microchip,mcp251xfd" + +The wildcard should be narrowed down to prevent existing and future devices +that are not compatible from matching. It is very unlikely that incompatible +devices will be released that do not match the wildcard. + +Discussion Reference: https://lore.kernel.org/r/CAMuHMdVkwGjr6dJuMyhQNqFoJqbh6Ec5V2b5LenCshwpM2SDsQ@mail.gmail.com + +Reported-by: Geert Uytterhoeven +Signed-off-by: Thomas Kopp +Link: https://lore.kernel.org/r/20200930091423.755-1-thomas.kopp@microchip.com +Signed-off-by: Marc Kleine-Budde +(cherry picked from commit dba1572c23601025b99e418066c82105eca950bc) +Signed-off-by: Marc Kleine-Budde +--- + drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c | 18 +++++++++--------- + drivers/net/can/spi/mcp25xxfd/mcp25xxfd.h | 4 ++-- + 2 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c +index 7fb654edfc9f..409367e894b2 100644 +--- a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c ++++ b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c +@@ -41,10 +41,10 @@ static const struct mcp25xxfd_devtype_data mcp25xxfd_devtype_data_mcp2518fd = { + }; + + /* Autodetect model, start with CRC enabled. */ +-static const struct mcp25xxfd_devtype_data mcp25xxfd_devtype_data_mcp25xxfd = { ++static const struct mcp25xxfd_devtype_data mcp25xxfd_devtype_data_mcp251xfd = { + .quirks = MCP25XXFD_QUIRK_CRC_REG | MCP25XXFD_QUIRK_CRC_RX | + MCP25XXFD_QUIRK_CRC_TX | MCP25XXFD_QUIRK_ECC, +- .model = MCP25XXFD_MODEL_MCP25XXFD, ++ .model = MCP25XXFD_MODEL_MCP251XFD, + }; + + static const struct can_bittiming_const mcp25xxfd_bittiming_const = { +@@ -78,8 +78,8 @@ static const char *__mcp25xxfd_get_model_str(enum mcp25xxfd_model model) + return "MCP2517FD"; break; + case MCP25XXFD_MODEL_MCP2518FD: + return "MCP2518FD"; break; +- case MCP25XXFD_MODEL_MCP25XXFD: +- return "MCP25xxFD"; break; ++ case MCP25XXFD_MODEL_MCP251XFD: ++ return "MCP251xFD"; break; + } + + return ""; +@@ -2494,7 +2494,7 @@ static int mcp25xxfd_register_chip_detect(struct mcp25xxfd_priv *priv) + else + devtype_data = &mcp25xxfd_devtype_data_mcp2517fd; + +- if (!mcp25xxfd_is_25XX(priv) && ++ if (!mcp25xxfd_is_251X(priv) && + priv->devtype_data.model != devtype_data->model) { + netdev_info(ndev, + "Detected %s, but firmware specifies a %s. Fixing up.", +@@ -2703,8 +2703,8 @@ static const struct of_device_id mcp25xxfd_of_match[] = { + .compatible = "microchip,mcp2518fd", + .data = &mcp25xxfd_devtype_data_mcp2518fd, + }, { +- .compatible = "microchip,mcp25xxfd", +- .data = &mcp25xxfd_devtype_data_mcp25xxfd, ++ .compatible = "microchip,mcp251xfd", ++ .data = &mcp25xxfd_devtype_data_mcp251xfd, + }, { + /* sentinel */ + }, +@@ -2719,8 +2719,8 @@ static const struct spi_device_id mcp25xxfd_id_table[] = { + .name = "mcp2518fd", + .driver_data = (kernel_ulong_t)&mcp25xxfd_devtype_data_mcp2518fd, + }, { +- .name = "mcp25xxfd", +- .driver_data = (kernel_ulong_t)&mcp25xxfd_devtype_data_mcp25xxfd, ++ .name = "mcp251xfd", ++ .driver_data = (kernel_ulong_t)&mcp25xxfd_devtype_data_mcp251xfd, + }, { + /* sentinel */ + }, +diff --git a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd.h b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd.h +index 3bc799204cb0..b1b5d7fd33ea 100644 +--- a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd.h ++++ b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd.h +@@ -553,7 +553,7 @@ struct mcp25xxfd_regs_status { + enum mcp25xxfd_model { + MCP25XXFD_MODEL_MCP2517FD = 0x2517, + MCP25XXFD_MODEL_MCP2518FD = 0x2518, +- MCP25XXFD_MODEL_MCP25XXFD = 0xffff, /* autodetect model */ ++ MCP25XXFD_MODEL_MCP251XFD = 0xffff, /* autodetect model */ + }; + + struct mcp25xxfd_devtype_data { +@@ -607,7 +607,7 @@ mcp25xxfd_is_##_model(const struct mcp25xxfd_priv *priv) \ + + MCP25XXFD_IS(2517); + MCP25XXFD_IS(2518); +-MCP25XXFD_IS(25XX); ++MCP25XXFD_IS(251X); + + static inline u8 mcp25xxfd_first_byte_set(u32 mask) + { +-- +2.18.4 + + +From c298d55f7f9907491a9a3d47498838a3d25b7982 Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde +Date: Wed, 30 Sep 2020 10:49:00 +0200 +Subject: [PATCH 1189/1209] can: mcp251xfd: rename driver files and subdir to + mcp251xfd + +In [1] Geert noted that the autodetect compatible for the mcp25xxfd driver, +which is "microchip,mcp25xxfd" might be too generic and overlap with upcoming, +but incompatible chips. + +In the previous patch the autodetect DT compatbile has been renamed to +"microchip,mcp251xfd", this patch changes the name of the driver subdir and the +individual files accordinly. + +[1] http://lore.kernel.org/r/CAMuHMdVkwGjr6dJuMyhQNqFoJqbh6Ec5V2b5LenCshwpM2SDsQ@mail.gmail.com + +Link: https://lore.kernel.org/r/20200930091424.792165-8-mkl@pengutronix.de +Signed-off-by: Marc Kleine-Budde +(cherry picked from commit 1f0e21a0c0651ce3d837f8f76b44bf9de2b030cd) +Signed-off-by: Marc Kleine-Budde +--- + drivers/net/can/spi/Kconfig | 2 +- + drivers/net/can/spi/Makefile | 2 +- + drivers/net/can/spi/{mcp25xxfd => mcp251xfd}/Kconfig | 0 + drivers/net/can/spi/mcp251xfd/Makefile | 8 ++++++++ + .../mcp25xxfd-core.c => mcp251xfd/mcp251xfd-core.c} | 2 +- + .../mcp25xxfd-crc16.c => mcp251xfd/mcp251xfd-crc16.c} | 2 +- + .../mcp25xxfd-regmap.c => mcp251xfd/mcp251xfd-regmap.c} | 2 +- + .../spi/{mcp25xxfd/mcp25xxfd.h => mcp251xfd/mcp251xfd.h} | 0 + drivers/net/can/spi/mcp25xxfd/Makefile | 8 -------- + 9 files changed, 13 insertions(+), 13 deletions(-) + rename drivers/net/can/spi/{mcp25xxfd => mcp251xfd}/Kconfig (100%) + create mode 100644 drivers/net/can/spi/mcp251xfd/Makefile + rename drivers/net/can/spi/{mcp25xxfd/mcp25xxfd-core.c => mcp251xfd/mcp251xfd-core.c} (99%) + rename drivers/net/can/spi/{mcp25xxfd/mcp25xxfd-crc16.c => mcp251xfd/mcp251xfd-crc16.c} (99%) + rename drivers/net/can/spi/{mcp25xxfd/mcp25xxfd-regmap.c => mcp251xfd/mcp251xfd-regmap.c} (99%) + rename drivers/net/can/spi/{mcp25xxfd/mcp25xxfd.h => mcp251xfd/mcp251xfd.h} (100%) + delete mode 100644 drivers/net/can/spi/mcp25xxfd/Makefile + +diff --git a/drivers/net/can/spi/Kconfig b/drivers/net/can/spi/Kconfig +index d4b68eb5d386..8f145a2daf57 100644 +--- a/drivers/net/can/spi/Kconfig ++++ b/drivers/net/can/spi/Kconfig +@@ -15,6 +15,6 @@ config CAN_MCP251X + Driver for the Microchip MCP251x and MCP25625 SPI CAN + controllers. + +-source "drivers/net/can/spi/mcp25xxfd/Kconfig" ++source "drivers/net/can/spi/mcp251xfd/Kconfig" + + endmenu +diff --git a/drivers/net/can/spi/Makefile b/drivers/net/can/spi/Makefile +index 20c18ac96b1c..33e3f60bbc10 100644 +--- a/drivers/net/can/spi/Makefile ++++ b/drivers/net/can/spi/Makefile +@@ -6,4 +6,4 @@ + + obj-$(CONFIG_CAN_HI311X) += hi311x.o + obj-$(CONFIG_CAN_MCP251X) += mcp251x.o +-obj-y += mcp25xxfd/ ++obj-y += mcp251xfd/ +diff --git a/drivers/net/can/spi/mcp25xxfd/Kconfig b/drivers/net/can/spi/mcp251xfd/Kconfig +similarity index 100% +rename from drivers/net/can/spi/mcp25xxfd/Kconfig +rename to drivers/net/can/spi/mcp251xfd/Kconfig +diff --git a/drivers/net/can/spi/mcp251xfd/Makefile b/drivers/net/can/spi/mcp251xfd/Makefile +new file mode 100644 +index 000000000000..e943e6a2db0c +--- /dev/null ++++ b/drivers/net/can/spi/mcp251xfd/Makefile +@@ -0,0 +1,8 @@ ++# SPDX-License-Identifier: GPL-2.0-only ++ ++obj-$(CONFIG_CAN_MCP25XXFD) += mcp25xxfd.o ++ ++mcp25xxfd-objs := ++mcp25xxfd-objs += mcp251xfd-core.o ++mcp25xxfd-objs += mcp251xfd-crc16.o ++mcp25xxfd-objs += mcp251xfd-regmap.o +diff --git a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c +similarity index 99% +rename from drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c +rename to drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c +index 409367e894b2..a1561d6e2326 100644 +--- a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c ++++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c +@@ -23,7 +23,7 @@ + + #include + +-#include "mcp25xxfd.h" ++#include "mcp251xfd.h" + + #define DEVICE_NAME "mcp25xxfd" + +diff --git a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-crc16.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-crc16.c +similarity index 99% +rename from drivers/net/can/spi/mcp25xxfd/mcp25xxfd-crc16.c +rename to drivers/net/can/spi/mcp251xfd/mcp251xfd-crc16.c +index 79d09aaebf33..bc90afb34df2 100644 +--- a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-crc16.c ++++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-crc16.c +@@ -12,7 +12,7 @@ + // Copyright (c) 2019 Martin Sperl + // + +-#include "mcp25xxfd.h" ++#include "mcp251xfd.h" + + /* The standard crc16 in linux/crc16.h is unfortunately not computing + * the correct results (left shift vs. right shift). So here an +diff --git a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-regmap.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c +similarity index 99% +rename from drivers/net/can/spi/mcp25xxfd/mcp25xxfd-regmap.c +rename to drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c +index 376649c7e443..3511317bb49b 100644 +--- a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-regmap.c ++++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c +@@ -6,7 +6,7 @@ + // Marc Kleine-Budde + // + +-#include "mcp25xxfd.h" ++#include "mcp251xfd.h" + + #include + +diff --git a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd.h b/drivers/net/can/spi/mcp251xfd/mcp251xfd.h +similarity index 100% +rename from drivers/net/can/spi/mcp25xxfd/mcp25xxfd.h +rename to drivers/net/can/spi/mcp251xfd/mcp251xfd.h +diff --git a/drivers/net/can/spi/mcp25xxfd/Makefile b/drivers/net/can/spi/mcp25xxfd/Makefile +deleted file mode 100644 +index 4e17f592e22e..000000000000 +--- a/drivers/net/can/spi/mcp25xxfd/Makefile ++++ /dev/null +@@ -1,8 +0,0 @@ +-# SPDX-License-Identifier: GPL-2.0-only +- +-obj-$(CONFIG_CAN_MCP25XXFD) += mcp25xxfd.o +- +-mcp25xxfd-objs := +-mcp25xxfd-objs += mcp25xxfd-core.o +-mcp25xxfd-objs += mcp25xxfd-crc16.o +-mcp25xxfd-objs += mcp25xxfd-regmap.o +-- +2.18.4 + + +From c427c4f2edf8e76afb9bff09ee4d792382b50ce1 Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde +Date: Wed, 30 Sep 2020 10:49:00 +0200 +Subject: [PATCH 1190/1209] can: mcp251xfd: rename all user facing strings to + mcp251xfd + +In [1] Geert noted that the autodetect compatible for the mcp25xxfd driver, +which is "microchip,mcp25xxfd" might be too generic and overlap with upcoming, +but incompatible chips. + +In the previous patch the autodetect DT compatbile has been renamed to +"microchip,mcp251xfd", this patch changes all user facing strings from +"mcp25xxfd" to "mcp251xfd" and "MCP25XXFD" to "MCP251XFD", including: +- kconfig symbols +- name of kernel module +- DT and SPI compatible + +[1] http://lore.kernel.org/r/CAMuHMdVkwGjr6dJuMyhQNqFoJqbh6Ec5V2b5LenCshwpM2SDsQ@mail.gmail.com + +Link: https://lore.kernel.org/r/20200930091424.792165-9-mkl@pengutronix.de +Signed-off-by: Marc Kleine-Budde +(cherry picked from commit f4f77366f21dfd6ac69a902313367d638b328ba1) +Signed-off-by: Marc Kleine-Budde +--- + drivers/net/can/spi/mcp251xfd/Kconfig | 10 +++++----- + drivers/net/can/spi/mcp251xfd/Makefile | 10 +++++----- + drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 4 ++-- + 3 files changed, 12 insertions(+), 12 deletions(-) + +diff --git a/drivers/net/can/spi/mcp251xfd/Kconfig b/drivers/net/can/spi/mcp251xfd/Kconfig +index 9eb596019a58..f5a147a92cb2 100644 +--- a/drivers/net/can/spi/mcp251xfd/Kconfig ++++ b/drivers/net/can/spi/mcp251xfd/Kconfig +@@ -1,14 +1,14 @@ + # SPDX-License-Identifier: GPL-2.0-only + +-config CAN_MCP25XXFD +- tristate "Microchip MCP25xxFD SPI CAN controllers" ++config CAN_MCP251XFD ++ tristate "Microchip MCP251xFD SPI CAN controllers" + select REGMAP + help +- Driver for the Microchip MCP25XXFD SPI FD-CAN controller ++ Driver for the Microchip MCP251XFD SPI FD-CAN controller + family. + +-config CAN_MCP25XXFD_SANITY +- depends on CAN_MCP25XXFD ++config CAN_MCP251XFD_SANITY ++ depends on CAN_MCP251XFD + bool "Additional Sanity Checks" + help + This option enables additional sanity checks in the driver, +diff --git a/drivers/net/can/spi/mcp251xfd/Makefile b/drivers/net/can/spi/mcp251xfd/Makefile +index e943e6a2db0c..cb71244cbe89 100644 +--- a/drivers/net/can/spi/mcp251xfd/Makefile ++++ b/drivers/net/can/spi/mcp251xfd/Makefile +@@ -1,8 +1,8 @@ + # SPDX-License-Identifier: GPL-2.0-only + +-obj-$(CONFIG_CAN_MCP25XXFD) += mcp25xxfd.o ++obj-$(CONFIG_CAN_MCP251XFD) += mcp251xfd.o + +-mcp25xxfd-objs := +-mcp25xxfd-objs += mcp251xfd-core.o +-mcp25xxfd-objs += mcp251xfd-crc16.o +-mcp25xxfd-objs += mcp251xfd-regmap.o ++mcp251xfd-objs := ++mcp251xfd-objs += mcp251xfd-core.o ++mcp251xfd-objs += mcp251xfd-crc16.o ++mcp251xfd-objs += mcp251xfd-regmap.o +diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c +index a1561d6e2326..147af29e6759 100644 +--- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c ++++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c +@@ -25,7 +25,7 @@ + + #include "mcp251xfd.h" + +-#define DEVICE_NAME "mcp25xxfd" ++#define DEVICE_NAME "mcp251xfd" + + static const struct mcp25xxfd_devtype_data mcp25xxfd_devtype_data_mcp2517fd = { + .quirks = MCP25XXFD_QUIRK_MAB_NO_WARN | MCP25XXFD_QUIRK_CRC_REG | +@@ -2923,5 +2923,5 @@ static struct spi_driver mcp25xxfd_driver = { + module_spi_driver(mcp25xxfd_driver); + + MODULE_AUTHOR("Marc Kleine-Budde "); +-MODULE_DESCRIPTION("Microchip MCP25xxFD Family CAN controller driver"); ++MODULE_DESCRIPTION("Microchip MCP251xFD Family CAN controller driver"); + MODULE_LICENSE("GPL v2"); +-- +2.18.4 + + +From efa4b76c357bb7ac46bafd69d85684005fe89c41 Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde +Date: Wed, 30 Sep 2020 10:49:00 +0200 +Subject: [PATCH 1191/1209] can: mcp251xfd: rename all remaining occurrence to + mcp251xfd + +In [1] Geert noted that the autodetect compatible for the mcp25xxfd driver, +which is "microchip,mcp25xxfd" might be too generic and overlap with upcoming, +but incompatible chips. + +In the previous patch the autodetect DT compatbile has been renamed to +"microchip,mcp251xfd", this patch changes all non user facing occurrence of +"mcp25xxfd" to "mcp251xfd" and "MCP25XXFD" to "MCP251XFD". + +[1] http://lore.kernel.org/r/CAMuHMdVkwGjr6dJuMyhQNqFoJqbh6Ec5V2b5LenCshwpM2SDsQ@mail.gmail.com + +Link: https://lore.kernel.org/r/20200930091424.792165-10-mkl@pengutronix.de +Signed-off-by: Marc Kleine-Budde +(cherry picked from commit eb79a267c9b3e608e7762a1b221428f37ace3aa3) +Signed-off-by: Marc Kleine-Budde +--- + .../net/can/spi/mcp251xfd/mcp251xfd-core.c | 1330 ++++++++--------- + .../net/can/spi/mcp251xfd/mcp251xfd-crc16.c | 22 +- + .../net/can/spi/mcp251xfd/mcp251xfd-regmap.c | 230 +-- + drivers/net/can/spi/mcp251xfd/mcp251xfd.h | 972 ++++++------ + 4 files changed, 1277 insertions(+), 1277 deletions(-) + +diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c +index 147af29e6759..dffa5d81a7c7 100644 +--- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c ++++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c +@@ -1,6 +1,6 @@ + // SPDX-License-Identifier: GPL-2.0 + // +-// mcp25xxfd - Microchip MCP25xxFD Family CAN controller driver ++// mcp251xfd - Microchip MCP251xFD Family CAN controller driver + // + // Copyright (c) 2019, 2020 Pengutronix, + // Marc Kleine-Budde +@@ -27,27 +27,27 @@ + + #define DEVICE_NAME "mcp251xfd" + +-static const struct mcp25xxfd_devtype_data mcp25xxfd_devtype_data_mcp2517fd = { +- .quirks = MCP25XXFD_QUIRK_MAB_NO_WARN | MCP25XXFD_QUIRK_CRC_REG | +- MCP25XXFD_QUIRK_CRC_RX | MCP25XXFD_QUIRK_CRC_TX | +- MCP25XXFD_QUIRK_ECC, +- .model = MCP25XXFD_MODEL_MCP2517FD, ++static const struct mcp251xfd_devtype_data mcp251xfd_devtype_data_mcp2517fd = { ++ .quirks = MCP251XFD_QUIRK_MAB_NO_WARN | MCP251XFD_QUIRK_CRC_REG | ++ MCP251XFD_QUIRK_CRC_RX | MCP251XFD_QUIRK_CRC_TX | ++ MCP251XFD_QUIRK_ECC, ++ .model = MCP251XFD_MODEL_MCP2517FD, + }; + +-static const struct mcp25xxfd_devtype_data mcp25xxfd_devtype_data_mcp2518fd = { +- .quirks = MCP25XXFD_QUIRK_CRC_REG | MCP25XXFD_QUIRK_CRC_RX | +- MCP25XXFD_QUIRK_CRC_TX | MCP25XXFD_QUIRK_ECC, +- .model = MCP25XXFD_MODEL_MCP2518FD, ++static const struct mcp251xfd_devtype_data mcp251xfd_devtype_data_mcp2518fd = { ++ .quirks = MCP251XFD_QUIRK_CRC_REG | MCP251XFD_QUIRK_CRC_RX | ++ MCP251XFD_QUIRK_CRC_TX | MCP251XFD_QUIRK_ECC, ++ .model = MCP251XFD_MODEL_MCP2518FD, + }; + + /* Autodetect model, start with CRC enabled. */ +-static const struct mcp25xxfd_devtype_data mcp25xxfd_devtype_data_mcp251xfd = { +- .quirks = MCP25XXFD_QUIRK_CRC_REG | MCP25XXFD_QUIRK_CRC_RX | +- MCP25XXFD_QUIRK_CRC_TX | MCP25XXFD_QUIRK_ECC, +- .model = MCP25XXFD_MODEL_MCP251XFD, ++static const struct mcp251xfd_devtype_data mcp251xfd_devtype_data_mcp251xfd = { ++ .quirks = MCP251XFD_QUIRK_CRC_REG | MCP251XFD_QUIRK_CRC_RX | ++ MCP251XFD_QUIRK_CRC_TX | MCP251XFD_QUIRK_ECC, ++ .model = MCP251XFD_MODEL_MCP251XFD, + }; + +-static const struct can_bittiming_const mcp25xxfd_bittiming_const = { ++static const struct can_bittiming_const mcp251xfd_bittiming_const = { + .name = DEVICE_NAME, + .tseg1_min = 2, + .tseg1_max = 256, +@@ -59,7 +59,7 @@ static const struct can_bittiming_const mcp25xxfd_bittiming_const = { + .brp_inc = 1, + }; + +-static const struct can_bittiming_const mcp25xxfd_data_bittiming_const = { ++static const struct can_bittiming_const mcp251xfd_data_bittiming_const = { + .name = DEVICE_NAME, + .tseg1_min = 1, + .tseg1_max = 32, +@@ -71,14 +71,14 @@ static const struct can_bittiming_const mcp25xxfd_data_bittiming_const = { + .brp_inc = 1, + }; + +-static const char *__mcp25xxfd_get_model_str(enum mcp25xxfd_model model) ++static const char *__mcp251xfd_get_model_str(enum mcp251xfd_model model) + { + switch (model) { +- case MCP25XXFD_MODEL_MCP2517FD: ++ case MCP251XFD_MODEL_MCP2517FD: + return "MCP2517FD"; break; +- case MCP25XXFD_MODEL_MCP2518FD: ++ case MCP251XFD_MODEL_MCP2518FD: + return "MCP2518FD"; break; +- case MCP25XXFD_MODEL_MCP251XFD: ++ case MCP251XFD_MODEL_MCP251XFD: + return "MCP251xFD"; break; + } + +@@ -86,36 +86,36 @@ static const char *__mcp25xxfd_get_model_str(enum mcp25xxfd_model model) + } + + static inline const char * +-mcp25xxfd_get_model_str(const struct mcp25xxfd_priv *priv) ++mcp251xfd_get_model_str(const struct mcp251xfd_priv *priv) + { +- return __mcp25xxfd_get_model_str(priv->devtype_data.model); ++ return __mcp251xfd_get_model_str(priv->devtype_data.model); + } + +-static const char *mcp25xxfd_get_mode_str(const u8 mode) ++static const char *mcp251xfd_get_mode_str(const u8 mode) + { + switch (mode) { +- case MCP25XXFD_REG_CON_MODE_MIXED: ++ case MCP251XFD_REG_CON_MODE_MIXED: + return "Mixed (CAN FD/CAN 2.0)"; break; +- case MCP25XXFD_REG_CON_MODE_SLEEP: ++ case MCP251XFD_REG_CON_MODE_SLEEP: + return "Sleep"; break; +- case MCP25XXFD_REG_CON_MODE_INT_LOOPBACK: ++ case MCP251XFD_REG_CON_MODE_INT_LOOPBACK: + return "Internal Loopback"; break; +- case MCP25XXFD_REG_CON_MODE_LISTENONLY: ++ case MCP251XFD_REG_CON_MODE_LISTENONLY: + return "Listen Only"; break; +- case MCP25XXFD_REG_CON_MODE_CONFIG: ++ case MCP251XFD_REG_CON_MODE_CONFIG: + return "Configuration"; break; +- case MCP25XXFD_REG_CON_MODE_EXT_LOOPBACK: ++ case MCP251XFD_REG_CON_MODE_EXT_LOOPBACK: + return "External Loopback"; break; +- case MCP25XXFD_REG_CON_MODE_CAN2_0: ++ case MCP251XFD_REG_CON_MODE_CAN2_0: + return "CAN 2.0"; break; +- case MCP25XXFD_REG_CON_MODE_RESTRICTED: ++ case MCP251XFD_REG_CON_MODE_RESTRICTED: + return "Restricted Operation"; break; + } + + return ""; + } + +-static inline int mcp25xxfd_vdd_enable(const struct mcp25xxfd_priv *priv) ++static inline int mcp251xfd_vdd_enable(const struct mcp251xfd_priv *priv) + { + if (!priv->reg_vdd) + return 0; +@@ -123,7 +123,7 @@ static inline int mcp25xxfd_vdd_enable(const struct mcp25xxfd_priv *priv) + return regulator_enable(priv->reg_vdd); + } + +-static inline int mcp25xxfd_vdd_disable(const struct mcp25xxfd_priv *priv) ++static inline int mcp251xfd_vdd_disable(const struct mcp251xfd_priv *priv) + { + if (!priv->reg_vdd) + return 0; +@@ -132,7 +132,7 @@ static inline int mcp25xxfd_vdd_disable(const struct mcp25xxfd_priv *priv) + } + + static inline int +-mcp25xxfd_transceiver_enable(const struct mcp25xxfd_priv *priv) ++mcp251xfd_transceiver_enable(const struct mcp251xfd_priv *priv) + { + if (!priv->reg_xceiver) + return 0; +@@ -141,7 +141,7 @@ mcp25xxfd_transceiver_enable(const struct mcp25xxfd_priv *priv) + } + + static inline int +-mcp25xxfd_transceiver_disable(const struct mcp25xxfd_priv *priv) ++mcp251xfd_transceiver_disable(const struct mcp251xfd_priv *priv) + { + if (!priv->reg_xceiver) + return 0; +@@ -149,7 +149,7 @@ mcp25xxfd_transceiver_disable(const struct mcp25xxfd_priv *priv) + return regulator_disable(priv->reg_xceiver); + } + +-static int mcp25xxfd_clks_and_vdd_enable(const struct mcp25xxfd_priv *priv) ++static int mcp251xfd_clks_and_vdd_enable(const struct mcp251xfd_priv *priv) + { + int err; + +@@ -157,22 +157,22 @@ static int mcp25xxfd_clks_and_vdd_enable(const struct mcp25xxfd_priv *priv) + if (err) + return err; + +- err = mcp25xxfd_vdd_enable(priv); ++ err = mcp251xfd_vdd_enable(priv); + if (err) + clk_disable_unprepare(priv->clk); + + /* Wait for oscillator stabilisation time after power up */ +- usleep_range(MCP25XXFD_OSC_STAB_SLEEP_US, +- 2 * MCP25XXFD_OSC_STAB_SLEEP_US); ++ usleep_range(MCP251XFD_OSC_STAB_SLEEP_US, ++ 2 * MCP251XFD_OSC_STAB_SLEEP_US); + + return err; + } + +-static int mcp25xxfd_clks_and_vdd_disable(const struct mcp25xxfd_priv *priv) ++static int mcp251xfd_clks_and_vdd_disable(const struct mcp251xfd_priv *priv) + { + int err; + +- err = mcp25xxfd_vdd_disable(priv); ++ err = mcp251xfd_vdd_disable(priv); + if (err) + return err; + +@@ -182,30 +182,30 @@ static int mcp25xxfd_clks_and_vdd_disable(const struct mcp25xxfd_priv *priv) + } + + static inline u8 +-mcp25xxfd_cmd_prepare_write_reg(const struct mcp25xxfd_priv *priv, +- union mcp25xxfd_write_reg_buf *write_reg_buf, ++mcp251xfd_cmd_prepare_write_reg(const struct mcp251xfd_priv *priv, ++ union mcp251xfd_write_reg_buf *write_reg_buf, + const u16 reg, const u32 mask, const u32 val) + { + u8 first_byte, last_byte, len; + u8 *data; + __le32 val_le32; + +- first_byte = mcp25xxfd_first_byte_set(mask); +- last_byte = mcp25xxfd_last_byte_set(mask); ++ first_byte = mcp251xfd_first_byte_set(mask); ++ last_byte = mcp251xfd_last_byte_set(mask); + len = last_byte - first_byte + 1; + +- data = mcp25xxfd_spi_cmd_write(priv, write_reg_buf, reg + first_byte); ++ data = mcp251xfd_spi_cmd_write(priv, write_reg_buf, reg + first_byte); + val_le32 = cpu_to_le32(val >> BITS_PER_BYTE * first_byte); + memcpy(data, &val_le32, len); + +- if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_REG) { ++ if (priv->devtype_data.quirks & MCP251XFD_QUIRK_CRC_REG) { + u16 crc; + +- mcp25xxfd_spi_cmd_crc_set_len_in_reg(&write_reg_buf->crc.cmd, ++ mcp251xfd_spi_cmd_crc_set_len_in_reg(&write_reg_buf->crc.cmd, + len); + /* CRC */ + len += sizeof(write_reg_buf->crc.cmd); +- crc = mcp25xxfd_crc16_compute(&write_reg_buf->crc, len); ++ crc = mcp251xfd_crc16_compute(&write_reg_buf->crc, len); + put_unaligned_be16(crc, (void *)write_reg_buf + len); + + /* Total length */ +@@ -218,80 +218,80 @@ mcp25xxfd_cmd_prepare_write_reg(const struct mcp25xxfd_priv *priv, + } + + static inline int +-mcp25xxfd_tef_tail_get_from_chip(const struct mcp25xxfd_priv *priv, ++mcp251xfd_tef_tail_get_from_chip(const struct mcp251xfd_priv *priv, + u8 *tef_tail) + { + u32 tef_ua; + int err; + +- err = regmap_read(priv->map_reg, MCP25XXFD_REG_TEFUA, &tef_ua); ++ err = regmap_read(priv->map_reg, MCP251XFD_REG_TEFUA, &tef_ua); + if (err) + return err; + +- *tef_tail = tef_ua / sizeof(struct mcp25xxfd_hw_tef_obj); ++ *tef_tail = tef_ua / sizeof(struct mcp251xfd_hw_tef_obj); + + return 0; + } + + static inline int +-mcp25xxfd_tx_tail_get_from_chip(const struct mcp25xxfd_priv *priv, ++mcp251xfd_tx_tail_get_from_chip(const struct mcp251xfd_priv *priv, + u8 *tx_tail) + { + u32 fifo_sta; + int err; + + err = regmap_read(priv->map_reg, +- MCP25XXFD_REG_FIFOSTA(MCP25XXFD_TX_FIFO), ++ MCP251XFD_REG_FIFOSTA(MCP251XFD_TX_FIFO), + &fifo_sta); + if (err) + return err; + +- *tx_tail = FIELD_GET(MCP25XXFD_REG_FIFOSTA_FIFOCI_MASK, fifo_sta); ++ *tx_tail = FIELD_GET(MCP251XFD_REG_FIFOSTA_FIFOCI_MASK, fifo_sta); + + return 0; + } + + static inline int +-mcp25xxfd_rx_head_get_from_chip(const struct mcp25xxfd_priv *priv, +- const struct mcp25xxfd_rx_ring *ring, ++mcp251xfd_rx_head_get_from_chip(const struct mcp251xfd_priv *priv, ++ const struct mcp251xfd_rx_ring *ring, + u8 *rx_head) + { + u32 fifo_sta; + int err; + +- err = regmap_read(priv->map_reg, MCP25XXFD_REG_FIFOSTA(ring->fifo_nr), ++ err = regmap_read(priv->map_reg, MCP251XFD_REG_FIFOSTA(ring->fifo_nr), + &fifo_sta); + if (err) + return err; + +- *rx_head = FIELD_GET(MCP25XXFD_REG_FIFOSTA_FIFOCI_MASK, fifo_sta); ++ *rx_head = FIELD_GET(MCP251XFD_REG_FIFOSTA_FIFOCI_MASK, fifo_sta); + + return 0; + } + + static inline int +-mcp25xxfd_rx_tail_get_from_chip(const struct mcp25xxfd_priv *priv, +- const struct mcp25xxfd_rx_ring *ring, ++mcp251xfd_rx_tail_get_from_chip(const struct mcp251xfd_priv *priv, ++ const struct mcp251xfd_rx_ring *ring, + u8 *rx_tail) + { + u32 fifo_ua; + int err; + +- err = regmap_read(priv->map_reg, MCP25XXFD_REG_FIFOUA(ring->fifo_nr), ++ err = regmap_read(priv->map_reg, MCP251XFD_REG_FIFOUA(ring->fifo_nr), + &fifo_ua); + if (err) + return err; + +- fifo_ua -= ring->base - MCP25XXFD_RAM_START; ++ fifo_ua -= ring->base - MCP251XFD_RAM_START; + *rx_tail = fifo_ua / ring->obj_size; + + return 0; + } + + static void +-mcp25xxfd_tx_ring_init_tx_obj(const struct mcp25xxfd_priv *priv, +- const struct mcp25xxfd_tx_ring *ring, +- struct mcp25xxfd_tx_obj *tx_obj, ++mcp251xfd_tx_ring_init_tx_obj(const struct mcp251xfd_priv *priv, ++ const struct mcp251xfd_tx_ring *ring, ++ struct mcp251xfd_tx_obj *tx_obj, + const u8 rts_buf_len, + const u8 n) + { +@@ -299,12 +299,12 @@ mcp25xxfd_tx_ring_init_tx_obj(const struct mcp25xxfd_priv *priv, + u16 addr; + + /* FIFO load */ +- addr = mcp25xxfd_get_tx_obj_addr(ring, n); +- if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_TX) +- mcp25xxfd_spi_cmd_write_crc_set_addr(&tx_obj->buf.crc.cmd, ++ addr = mcp251xfd_get_tx_obj_addr(ring, n); ++ if (priv->devtype_data.quirks & MCP251XFD_QUIRK_CRC_TX) ++ mcp251xfd_spi_cmd_write_crc_set_addr(&tx_obj->buf.crc.cmd, + addr); + else +- mcp25xxfd_spi_cmd_write_nocrc(&tx_obj->buf.nocrc.cmd, ++ mcp251xfd_spi_cmd_write_nocrc(&tx_obj->buf.nocrc.cmd, + addr); + + xfer = &tx_obj->xfer[0]; +@@ -324,11 +324,11 @@ mcp25xxfd_tx_ring_init_tx_obj(const struct mcp25xxfd_priv *priv, + ARRAY_SIZE(tx_obj->xfer)); + } + +-static void mcp25xxfd_ring_init(struct mcp25xxfd_priv *priv) ++static void mcp251xfd_ring_init(struct mcp251xfd_priv *priv) + { +- struct mcp25xxfd_tx_ring *tx_ring; +- struct mcp25xxfd_rx_ring *rx_ring, *prev_rx_ring = NULL; +- struct mcp25xxfd_tx_obj *tx_obj; ++ struct mcp251xfd_tx_ring *tx_ring; ++ struct mcp251xfd_rx_ring *rx_ring, *prev_rx_ring = NULL; ++ struct mcp251xfd_tx_obj *tx_obj; + u32 val; + u16 addr; + u8 len; +@@ -342,27 +342,27 @@ static void mcp25xxfd_ring_init(struct mcp25xxfd_priv *priv) + tx_ring = priv->tx; + tx_ring->head = 0; + tx_ring->tail = 0; +- tx_ring->base = mcp25xxfd_get_tef_obj_addr(tx_ring->obj_num); ++ tx_ring->base = mcp251xfd_get_tef_obj_addr(tx_ring->obj_num); + + /* FIFO request to send */ +- addr = MCP25XXFD_REG_FIFOCON(MCP25XXFD_TX_FIFO); +- val = MCP25XXFD_REG_FIFOCON_TXREQ | MCP25XXFD_REG_FIFOCON_UINC; +- len = mcp25xxfd_cmd_prepare_write_reg(priv, &tx_ring->rts_buf, ++ addr = MCP251XFD_REG_FIFOCON(MCP251XFD_TX_FIFO); ++ val = MCP251XFD_REG_FIFOCON_TXREQ | MCP251XFD_REG_FIFOCON_UINC; ++ len = mcp251xfd_cmd_prepare_write_reg(priv, &tx_ring->rts_buf, + addr, val, val); + +- mcp25xxfd_for_each_tx_obj(tx_ring, tx_obj, i) +- mcp25xxfd_tx_ring_init_tx_obj(priv, tx_ring, tx_obj, len, i); ++ mcp251xfd_for_each_tx_obj(tx_ring, tx_obj, i) ++ mcp251xfd_tx_ring_init_tx_obj(priv, tx_ring, tx_obj, len, i); + + /* RX */ +- mcp25xxfd_for_each_rx_ring(priv, rx_ring, i) { ++ mcp251xfd_for_each_rx_ring(priv, rx_ring, i) { + rx_ring->head = 0; + rx_ring->tail = 0; + rx_ring->nr = i; +- rx_ring->fifo_nr = MCP25XXFD_RX_FIFO(i); ++ rx_ring->fifo_nr = MCP251XFD_RX_FIFO(i); + + if (!prev_rx_ring) + rx_ring->base = +- mcp25xxfd_get_tx_obj_addr(tx_ring, ++ mcp251xfd_get_tx_obj_addr(tx_ring, + tx_ring->obj_num); + else + rx_ring->base = prev_rx_ring->base + +@@ -373,7 +373,7 @@ static void mcp25xxfd_ring_init(struct mcp25xxfd_priv *priv) + } + } + +-static void mcp25xxfd_ring_free(struct mcp25xxfd_priv *priv) ++static void mcp251xfd_ring_free(struct mcp251xfd_priv *priv) + { + int i; + +@@ -383,31 +383,31 @@ static void mcp25xxfd_ring_free(struct mcp25xxfd_priv *priv) + } + } + +-static int mcp25xxfd_ring_alloc(struct mcp25xxfd_priv *priv) ++static int mcp251xfd_ring_alloc(struct mcp251xfd_priv *priv) + { +- struct mcp25xxfd_tx_ring *tx_ring; +- struct mcp25xxfd_rx_ring *rx_ring; ++ struct mcp251xfd_tx_ring *tx_ring; ++ struct mcp251xfd_rx_ring *rx_ring; + int tef_obj_size, tx_obj_size, rx_obj_size; + int tx_obj_num; + int ram_free, i; + +- tef_obj_size = sizeof(struct mcp25xxfd_hw_tef_obj); ++ tef_obj_size = sizeof(struct mcp251xfd_hw_tef_obj); + /* listen-only mode works like FD mode */ + if (priv->can.ctrlmode & (CAN_CTRLMODE_LISTENONLY | CAN_CTRLMODE_FD)) { +- tx_obj_num = MCP25XXFD_TX_OBJ_NUM_CANFD; +- tx_obj_size = sizeof(struct mcp25xxfd_hw_tx_obj_canfd); +- rx_obj_size = sizeof(struct mcp25xxfd_hw_rx_obj_canfd); ++ tx_obj_num = MCP251XFD_TX_OBJ_NUM_CANFD; ++ tx_obj_size = sizeof(struct mcp251xfd_hw_tx_obj_canfd); ++ rx_obj_size = sizeof(struct mcp251xfd_hw_rx_obj_canfd); + } else { +- tx_obj_num = MCP25XXFD_TX_OBJ_NUM_CAN; +- tx_obj_size = sizeof(struct mcp25xxfd_hw_tx_obj_can); +- rx_obj_size = sizeof(struct mcp25xxfd_hw_rx_obj_can); ++ tx_obj_num = MCP251XFD_TX_OBJ_NUM_CAN; ++ tx_obj_size = sizeof(struct mcp251xfd_hw_tx_obj_can); ++ rx_obj_size = sizeof(struct mcp251xfd_hw_rx_obj_can); + } + + tx_ring = priv->tx; + tx_ring->obj_num = tx_obj_num; + tx_ring->obj_size = tx_obj_size; + +- ram_free = MCP25XXFD_RAM_SIZE - tx_obj_num * ++ ram_free = MCP251XFD_RAM_SIZE - tx_obj_num * + (tef_obj_size + tx_obj_size); + + for (i = 0; +@@ -421,7 +421,7 @@ static int mcp25xxfd_ring_alloc(struct mcp25xxfd_priv *priv) + rx_ring = kzalloc(sizeof(*rx_ring) + rx_obj_size * rx_obj_num, + GFP_KERNEL); + if (!rx_ring) { +- mcp25xxfd_ring_free(priv); ++ mcp251xfd_ring_free(priv); + return -ENOMEM; + } + rx_ring->obj_num = rx_obj_num; +@@ -437,7 +437,7 @@ static int mcp25xxfd_ring_alloc(struct mcp25xxfd_priv *priv) + tx_obj_num, tef_obj_size, tef_obj_size * tx_obj_num, + tx_obj_num, tx_obj_size, tx_obj_size * tx_obj_num); + +- mcp25xxfd_for_each_rx_ring(priv, rx_ring, i) { ++ mcp251xfd_for_each_rx_ring(priv, rx_ring, i) { + netdev_dbg(priv->ndev, + "FIFO setup: RX-%d: %d*%d bytes = %d bytes\n", + i, rx_ring->obj_num, rx_ring->obj_size, +@@ -452,48 +452,48 @@ static int mcp25xxfd_ring_alloc(struct mcp25xxfd_priv *priv) + } + + static inline int +-mcp25xxfd_chip_get_mode(const struct mcp25xxfd_priv *priv, u8 *mode) ++mcp251xfd_chip_get_mode(const struct mcp251xfd_priv *priv, u8 *mode) + { + u32 val; + int err; + +- err = regmap_read(priv->map_reg, MCP25XXFD_REG_CON, &val); ++ err = regmap_read(priv->map_reg, MCP251XFD_REG_CON, &val); + if (err) + return err; + +- *mode = FIELD_GET(MCP25XXFD_REG_CON_OPMOD_MASK, val); ++ *mode = FIELD_GET(MCP251XFD_REG_CON_OPMOD_MASK, val); + + return 0; + } + + static int +-__mcp25xxfd_chip_set_mode(const struct mcp25xxfd_priv *priv, ++__mcp251xfd_chip_set_mode(const struct mcp251xfd_priv *priv, + const u8 mode_req, bool nowait) + { + u32 con, con_reqop; + int err; + +- con_reqop = FIELD_PREP(MCP25XXFD_REG_CON_REQOP_MASK, mode_req); +- err = regmap_update_bits(priv->map_reg, MCP25XXFD_REG_CON, +- MCP25XXFD_REG_CON_REQOP_MASK, con_reqop); ++ con_reqop = FIELD_PREP(MCP251XFD_REG_CON_REQOP_MASK, mode_req); ++ err = regmap_update_bits(priv->map_reg, MCP251XFD_REG_CON, ++ MCP251XFD_REG_CON_REQOP_MASK, con_reqop); + if (err) + return err; + +- if (mode_req == MCP25XXFD_REG_CON_MODE_SLEEP || nowait) ++ if (mode_req == MCP251XFD_REG_CON_MODE_SLEEP || nowait) + return 0; + +- err = regmap_read_poll_timeout(priv->map_reg, MCP25XXFD_REG_CON, con, +- FIELD_GET(MCP25XXFD_REG_CON_OPMOD_MASK, ++ err = regmap_read_poll_timeout(priv->map_reg, MCP251XFD_REG_CON, con, ++ FIELD_GET(MCP251XFD_REG_CON_OPMOD_MASK, + con) == mode_req, +- MCP25XXFD_POLL_SLEEP_US, +- MCP25XXFD_POLL_TIMEOUT_US); ++ MCP251XFD_POLL_SLEEP_US, ++ MCP251XFD_POLL_TIMEOUT_US); + if (err) { +- u8 mode = FIELD_GET(MCP25XXFD_REG_CON_OPMOD_MASK, con); ++ u8 mode = FIELD_GET(MCP251XFD_REG_CON_OPMOD_MASK, con); + + netdev_err(priv->ndev, + "Controller failed to enter mode %s Mode (%u) and stays in %s Mode (%u).\n", +- mcp25xxfd_get_mode_str(mode_req), mode_req, +- mcp25xxfd_get_mode_str(mode), mode); ++ mcp251xfd_get_mode_str(mode_req), mode_req, ++ mcp251xfd_get_mode_str(mode), mode); + return err; + } + +@@ -501,25 +501,25 @@ __mcp25xxfd_chip_set_mode(const struct mcp25xxfd_priv *priv, + } + + static inline int +-mcp25xxfd_chip_set_mode(const struct mcp25xxfd_priv *priv, ++mcp251xfd_chip_set_mode(const struct mcp251xfd_priv *priv, + const u8 mode_req) + { +- return __mcp25xxfd_chip_set_mode(priv, mode_req, false); ++ return __mcp251xfd_chip_set_mode(priv, mode_req, false); + } + + static inline int +-mcp25xxfd_chip_set_mode_nowait(const struct mcp25xxfd_priv *priv, ++mcp251xfd_chip_set_mode_nowait(const struct mcp251xfd_priv *priv, + const u8 mode_req) + { +- return __mcp25xxfd_chip_set_mode(priv, mode_req, true); ++ return __mcp251xfd_chip_set_mode(priv, mode_req, true); + } + +-static inline bool mcp25xxfd_osc_invalid(u32 reg) ++static inline bool mcp251xfd_osc_invalid(u32 reg) + { + return reg == 0x0 || reg == 0xffffffff; + } + +-static int mcp25xxfd_chip_clock_enable(const struct mcp25xxfd_priv *priv) ++static int mcp251xfd_chip_clock_enable(const struct mcp251xfd_priv *priv) + { + u32 osc, osc_reference, osc_mask; + int err; +@@ -527,10 +527,10 @@ static int mcp25xxfd_chip_clock_enable(const struct mcp25xxfd_priv *priv) + /* Set Power On Defaults for "Clock Output Divisor" and remove + * "Oscillator Disable" bit. + */ +- osc = FIELD_PREP(MCP25XXFD_REG_OSC_CLKODIV_MASK, +- MCP25XXFD_REG_OSC_CLKODIV_10); +- osc_reference = MCP25XXFD_REG_OSC_OSCRDY; +- osc_mask = MCP25XXFD_REG_OSC_OSCRDY | MCP25XXFD_REG_OSC_PLLRDY; ++ osc = FIELD_PREP(MCP251XFD_REG_OSC_CLKODIV_MASK, ++ MCP251XFD_REG_OSC_CLKODIV_10); ++ osc_reference = MCP251XFD_REG_OSC_OSCRDY; ++ osc_mask = MCP251XFD_REG_OSC_OSCRDY | MCP251XFD_REG_OSC_PLLRDY; + + /* Note: + * +@@ -538,19 +538,19 @@ static int mcp25xxfd_chip_clock_enable(const struct mcp25xxfd_priv *priv) + * removes the "Oscillator Disable" bit and powers it up. All + * other bits are unaffected. + */ +- err = regmap_write(priv->map_reg, MCP25XXFD_REG_OSC, osc); ++ err = regmap_write(priv->map_reg, MCP251XFD_REG_OSC, osc); + if (err) + return err; + + /* Wait for "Oscillator Ready" bit */ +- err = regmap_read_poll_timeout(priv->map_reg, MCP25XXFD_REG_OSC, osc, ++ err = regmap_read_poll_timeout(priv->map_reg, MCP251XFD_REG_OSC, osc, + (osc & osc_mask) == osc_reference, +- MCP25XXFD_OSC_STAB_SLEEP_US, +- MCP25XXFD_OSC_STAB_TIMEOUT_US); +- if (mcp25xxfd_osc_invalid(osc)) { ++ MCP251XFD_OSC_STAB_SLEEP_US, ++ MCP251XFD_OSC_STAB_TIMEOUT_US); ++ if (mcp251xfd_osc_invalid(osc)) { + netdev_err(priv->ndev, + "Failed to detect %s (osc=0x%08x).\n", +- mcp25xxfd_get_model_str(priv), osc); ++ mcp251xfd_get_model_str(priv), osc); + return -ENODEV; + } else if (err == -ETIMEDOUT) { + netdev_err(priv->ndev, +@@ -564,19 +564,19 @@ static int mcp25xxfd_chip_clock_enable(const struct mcp25xxfd_priv *priv) + return 0; + } + +-static int mcp25xxfd_chip_softreset_do(const struct mcp25xxfd_priv *priv) ++static int mcp251xfd_chip_softreset_do(const struct mcp251xfd_priv *priv) + { +- const __be16 cmd = mcp25xxfd_cmd_reset(); ++ const __be16 cmd = mcp251xfd_cmd_reset(); + int err; + + /* The Set Mode and SPI Reset command only seems to works if + * the controller is not in Sleep Mode. + */ +- err = mcp25xxfd_chip_clock_enable(priv); ++ err = mcp251xfd_chip_clock_enable(priv); + if (err) + return err; + +- err = mcp25xxfd_chip_set_mode(priv, MCP25XXFD_REG_CON_MODE_CONFIG); ++ err = mcp251xfd_chip_set_mode(priv, MCP251XFD_REG_CON_MODE_CONFIG); + if (err) + return err; + +@@ -584,29 +584,29 @@ static int mcp25xxfd_chip_softreset_do(const struct mcp25xxfd_priv *priv) + return spi_write_then_read(priv->spi, &cmd, sizeof(cmd), NULL, 0); + } + +-static int mcp25xxfd_chip_softreset_check(const struct mcp25xxfd_priv *priv) ++static int mcp251xfd_chip_softreset_check(const struct mcp251xfd_priv *priv) + { + u32 osc, osc_reference; + u8 mode; + int err; + +- err = mcp25xxfd_chip_get_mode(priv, &mode); ++ err = mcp251xfd_chip_get_mode(priv, &mode); + if (err) + return err; + +- if (mode != MCP25XXFD_REG_CON_MODE_CONFIG) { ++ if (mode != MCP251XFD_REG_CON_MODE_CONFIG) { + netdev_info(priv->ndev, + "Controller not in Config Mode after reset, but in %s Mode (%u).\n", +- mcp25xxfd_get_mode_str(mode), mode); ++ mcp251xfd_get_mode_str(mode), mode); + return -ETIMEDOUT; + } + +- osc_reference = MCP25XXFD_REG_OSC_OSCRDY | +- FIELD_PREP(MCP25XXFD_REG_OSC_CLKODIV_MASK, +- MCP25XXFD_REG_OSC_CLKODIV_10); ++ osc_reference = MCP251XFD_REG_OSC_OSCRDY | ++ FIELD_PREP(MCP251XFD_REG_OSC_CLKODIV_MASK, ++ MCP251XFD_REG_OSC_CLKODIV_10); + + /* check reset defaults of OSC reg */ +- err = regmap_read(priv->map_reg, MCP25XXFD_REG_OSC, &osc); ++ err = regmap_read(priv->map_reg, MCP251XFD_REG_OSC, &osc); + if (err) + return err; + +@@ -620,22 +620,22 @@ static int mcp25xxfd_chip_softreset_check(const struct mcp25xxfd_priv *priv) + return 0; + } + +-static int mcp25xxfd_chip_softreset(const struct mcp25xxfd_priv *priv) ++static int mcp251xfd_chip_softreset(const struct mcp251xfd_priv *priv) + { + int err, i; + +- for (i = 0; i < MCP25XXFD_SOFTRESET_RETRIES_MAX; i++) { ++ for (i = 0; i < MCP251XFD_SOFTRESET_RETRIES_MAX; i++) { + if (i) + netdev_info(priv->ndev, + "Retrying to reset Controller.\n"); + +- err = mcp25xxfd_chip_softreset_do(priv); ++ err = mcp251xfd_chip_softreset_do(priv); + if (err == -ETIMEDOUT) + continue; + if (err) + return err; + +- err = mcp25xxfd_chip_softreset_check(priv); ++ err = mcp251xfd_chip_softreset_check(priv); + if (err == -ETIMEDOUT) + continue; + if (err) +@@ -650,7 +650,7 @@ static int mcp25xxfd_chip_softreset(const struct mcp25xxfd_priv *priv) + return -ETIMEDOUT; + } + +-static int mcp25xxfd_chip_clock_init(const struct mcp25xxfd_priv *priv) ++static int mcp251xfd_chip_clock_init(const struct mcp251xfd_priv *priv) + { + u32 osc; + int err; +@@ -659,10 +659,10 @@ static int mcp25xxfd_chip_clock_init(const struct mcp25xxfd_priv *priv) + * works on the MCP2518FD. The MCP2517FD will go into normal + * Sleep Mode instead. + */ +- osc = MCP25XXFD_REG_OSC_LPMEN | +- FIELD_PREP(MCP25XXFD_REG_OSC_CLKODIV_MASK, +- MCP25XXFD_REG_OSC_CLKODIV_10); +- err = regmap_write(priv->map_reg, MCP25XXFD_REG_OSC, osc); ++ osc = MCP251XFD_REG_OSC_LPMEN | ++ FIELD_PREP(MCP251XFD_REG_OSC_CLKODIV_MASK, ++ MCP251XFD_REG_OSC_CLKODIV_10); ++ err = regmap_write(priv->map_reg, MCP251XFD_REG_OSC, osc); + if (err) + return err; + +@@ -671,11 +671,11 @@ static int mcp25xxfd_chip_clock_init(const struct mcp25xxfd_priv *priv) + * This means an overflow of the 32 bit Time Base Counter + * register at 40 MHz every 107 seconds. + */ +- return regmap_write(priv->map_reg, MCP25XXFD_REG_TSCON, +- MCP25XXFD_REG_TSCON_TBCEN); ++ return regmap_write(priv->map_reg, MCP251XFD_REG_TSCON, ++ MCP251XFD_REG_TSCON_TBCEN); + } + +-static int mcp25xxfd_set_bittiming(const struct mcp25xxfd_priv *priv) ++static int mcp251xfd_set_bittiming(const struct mcp251xfd_priv *priv) + { + const struct can_bittiming *bt = &priv->can.bittiming; + const struct can_bittiming *dbt = &priv->can.data_bittiming; +@@ -699,32 +699,32 @@ static int mcp25xxfd_set_bittiming(const struct mcp25xxfd_priv *priv) + * - protocol exception is treated as a form error + * - Do not compare data bytes + */ +- val = FIELD_PREP(MCP25XXFD_REG_CON_REQOP_MASK, +- MCP25XXFD_REG_CON_MODE_CONFIG) | +- MCP25XXFD_REG_CON_STEF | +- MCP25XXFD_REG_CON_ESIGM | +- MCP25XXFD_REG_CON_RTXAT | +- FIELD_PREP(MCP25XXFD_REG_CON_WFT_MASK, +- MCP25XXFD_REG_CON_WFT_T11FILTER) | +- MCP25XXFD_REG_CON_WAKFIL | +- MCP25XXFD_REG_CON_PXEDIS; ++ val = FIELD_PREP(MCP251XFD_REG_CON_REQOP_MASK, ++ MCP251XFD_REG_CON_MODE_CONFIG) | ++ MCP251XFD_REG_CON_STEF | ++ MCP251XFD_REG_CON_ESIGM | ++ MCP251XFD_REG_CON_RTXAT | ++ FIELD_PREP(MCP251XFD_REG_CON_WFT_MASK, ++ MCP251XFD_REG_CON_WFT_T11FILTER) | ++ MCP251XFD_REG_CON_WAKFIL | ++ MCP251XFD_REG_CON_PXEDIS; + + if (!(priv->can.ctrlmode & CAN_CTRLMODE_FD_NON_ISO)) +- val |= MCP25XXFD_REG_CON_ISOCRCEN; ++ val |= MCP251XFD_REG_CON_ISOCRCEN; + +- err = regmap_write(priv->map_reg, MCP25XXFD_REG_CON, val); ++ err = regmap_write(priv->map_reg, MCP251XFD_REG_CON, val); + if (err) + return err; + + /* Nominal Bit Time */ +- val = FIELD_PREP(MCP25XXFD_REG_NBTCFG_BRP_MASK, bt->brp - 1) | +- FIELD_PREP(MCP25XXFD_REG_NBTCFG_TSEG1_MASK, ++ val = FIELD_PREP(MCP251XFD_REG_NBTCFG_BRP_MASK, bt->brp - 1) | ++ FIELD_PREP(MCP251XFD_REG_NBTCFG_TSEG1_MASK, + bt->prop_seg + bt->phase_seg1 - 1) | +- FIELD_PREP(MCP25XXFD_REG_NBTCFG_TSEG2_MASK, ++ FIELD_PREP(MCP251XFD_REG_NBTCFG_TSEG2_MASK, + bt->phase_seg2 - 1) | +- FIELD_PREP(MCP25XXFD_REG_NBTCFG_SJW_MASK, bt->sjw - 1); ++ FIELD_PREP(MCP251XFD_REG_NBTCFG_SJW_MASK, bt->sjw - 1); + +- err = regmap_write(priv->map_reg, MCP25XXFD_REG_NBTCFG, val); ++ err = regmap_write(priv->map_reg, MCP251XFD_REG_NBTCFG, val); + if (err) + return err; + +@@ -732,28 +732,28 @@ static int mcp25xxfd_set_bittiming(const struct mcp25xxfd_priv *priv) + return 0; + + /* Data Bit Time */ +- val = FIELD_PREP(MCP25XXFD_REG_DBTCFG_BRP_MASK, dbt->brp - 1) | +- FIELD_PREP(MCP25XXFD_REG_DBTCFG_TSEG1_MASK, ++ val = FIELD_PREP(MCP251XFD_REG_DBTCFG_BRP_MASK, dbt->brp - 1) | ++ FIELD_PREP(MCP251XFD_REG_DBTCFG_TSEG1_MASK, + dbt->prop_seg + dbt->phase_seg1 - 1) | +- FIELD_PREP(MCP25XXFD_REG_DBTCFG_TSEG2_MASK, ++ FIELD_PREP(MCP251XFD_REG_DBTCFG_TSEG2_MASK, + dbt->phase_seg2 - 1) | +- FIELD_PREP(MCP25XXFD_REG_DBTCFG_SJW_MASK, dbt->sjw - 1); ++ FIELD_PREP(MCP251XFD_REG_DBTCFG_SJW_MASK, dbt->sjw - 1); + +- err = regmap_write(priv->map_reg, MCP25XXFD_REG_DBTCFG, val); ++ err = regmap_write(priv->map_reg, MCP251XFD_REG_DBTCFG, val); + if (err) + return err; + + /* Transmitter Delay Compensation */ + tdco = clamp_t(int, dbt->brp * (dbt->prop_seg + dbt->phase_seg1), + -64, 63); +- val = FIELD_PREP(MCP25XXFD_REG_TDC_TDCMOD_MASK, +- MCP25XXFD_REG_TDC_TDCMOD_AUTO) | +- FIELD_PREP(MCP25XXFD_REG_TDC_TDCO_MASK, tdco); ++ val = FIELD_PREP(MCP251XFD_REG_TDC_TDCMOD_MASK, ++ MCP251XFD_REG_TDC_TDCMOD_AUTO) | ++ FIELD_PREP(MCP251XFD_REG_TDC_TDCO_MASK, tdco); + +- return regmap_write(priv->map_reg, MCP25XXFD_REG_TDC, val); ++ return regmap_write(priv->map_reg, MCP251XFD_REG_TDC, val); + } + +-static int mcp25xxfd_chip_rx_int_enable(const struct mcp25xxfd_priv *priv) ++static int mcp251xfd_chip_rx_int_enable(const struct mcp251xfd_priv *priv) + { + u32 val; + +@@ -769,12 +769,12 @@ static int mcp25xxfd_chip_rx_int_enable(const struct mcp25xxfd_priv *priv) + * (in the first byte of the SPI transfer) and configuring the + * PIN as interrupt (in the last byte of the SPI transfer). + */ +- val = MCP25XXFD_REG_IOCON_PM0 | MCP25XXFD_REG_IOCON_TRIS1 | +- MCP25XXFD_REG_IOCON_TRIS0; +- return regmap_write(priv->map_reg, MCP25XXFD_REG_IOCON, val); ++ val = MCP251XFD_REG_IOCON_PM0 | MCP251XFD_REG_IOCON_TRIS1 | ++ MCP251XFD_REG_IOCON_TRIS0; ++ return regmap_write(priv->map_reg, MCP251XFD_REG_IOCON, val); + } + +-static int mcp25xxfd_chip_rx_int_disable(const struct mcp25xxfd_priv *priv) ++static int mcp251xfd_chip_rx_int_disable(const struct mcp251xfd_priv *priv) + { + u32 val; + +@@ -785,14 +785,14 @@ static int mcp25xxfd_chip_rx_int_disable(const struct mcp25xxfd_priv *priv) + * - PIN0: GPIO Input + * - PIN1: GPIO Input + */ +- val = MCP25XXFD_REG_IOCON_PM1 | MCP25XXFD_REG_IOCON_PM0 | +- MCP25XXFD_REG_IOCON_TRIS1 | MCP25XXFD_REG_IOCON_TRIS0; +- return regmap_write(priv->map_reg, MCP25XXFD_REG_IOCON, val); ++ val = MCP251XFD_REG_IOCON_PM1 | MCP251XFD_REG_IOCON_PM0 | ++ MCP251XFD_REG_IOCON_TRIS1 | MCP251XFD_REG_IOCON_TRIS0; ++ return regmap_write(priv->map_reg, MCP251XFD_REG_IOCON, val); + } + + static int +-mcp25xxfd_chip_rx_fifo_init_one(const struct mcp25xxfd_priv *priv, +- const struct mcp25xxfd_rx_ring *ring) ++mcp251xfd_chip_rx_fifo_init_one(const struct mcp251xfd_priv *priv, ++ const struct mcp251xfd_rx_ring *ring) + { + u32 fifo_con; + +@@ -802,89 +802,89 @@ mcp25xxfd_chip_rx_fifo_init_one(const struct mcp25xxfd_priv *priv, + * generate a RXOVIF, use this to properly detect RX MAB + * overflows. + */ +- fifo_con = FIELD_PREP(MCP25XXFD_REG_FIFOCON_FSIZE_MASK, ++ fifo_con = FIELD_PREP(MCP251XFD_REG_FIFOCON_FSIZE_MASK, + ring->obj_num - 1) | +- MCP25XXFD_REG_FIFOCON_RXTSEN | +- MCP25XXFD_REG_FIFOCON_RXOVIE | +- MCP25XXFD_REG_FIFOCON_TFNRFNIE; ++ MCP251XFD_REG_FIFOCON_RXTSEN | ++ MCP251XFD_REG_FIFOCON_RXOVIE | ++ MCP251XFD_REG_FIFOCON_TFNRFNIE; + + if (priv->can.ctrlmode & (CAN_CTRLMODE_LISTENONLY | CAN_CTRLMODE_FD)) +- fifo_con |= FIELD_PREP(MCP25XXFD_REG_FIFOCON_PLSIZE_MASK, +- MCP25XXFD_REG_FIFOCON_PLSIZE_64); ++ fifo_con |= FIELD_PREP(MCP251XFD_REG_FIFOCON_PLSIZE_MASK, ++ MCP251XFD_REG_FIFOCON_PLSIZE_64); + else +- fifo_con |= FIELD_PREP(MCP25XXFD_REG_FIFOCON_PLSIZE_MASK, +- MCP25XXFD_REG_FIFOCON_PLSIZE_8); ++ fifo_con |= FIELD_PREP(MCP251XFD_REG_FIFOCON_PLSIZE_MASK, ++ MCP251XFD_REG_FIFOCON_PLSIZE_8); + + return regmap_write(priv->map_reg, +- MCP25XXFD_REG_FIFOCON(ring->fifo_nr), fifo_con); ++ MCP251XFD_REG_FIFOCON(ring->fifo_nr), fifo_con); + } + + static int +-mcp25xxfd_chip_rx_filter_init_one(const struct mcp25xxfd_priv *priv, +- const struct mcp25xxfd_rx_ring *ring) ++mcp251xfd_chip_rx_filter_init_one(const struct mcp251xfd_priv *priv, ++ const struct mcp251xfd_rx_ring *ring) + { + u32 fltcon; + +- fltcon = MCP25XXFD_REG_FLTCON_FLTEN(ring->nr) | +- MCP25XXFD_REG_FLTCON_FBP(ring->nr, ring->fifo_nr); ++ fltcon = MCP251XFD_REG_FLTCON_FLTEN(ring->nr) | ++ MCP251XFD_REG_FLTCON_FBP(ring->nr, ring->fifo_nr); + + return regmap_update_bits(priv->map_reg, +- MCP25XXFD_REG_FLTCON(ring->nr >> 2), +- MCP25XXFD_REG_FLTCON_FLT_MASK(ring->nr), ++ MCP251XFD_REG_FLTCON(ring->nr >> 2), ++ MCP251XFD_REG_FLTCON_FLT_MASK(ring->nr), + fltcon); + } + +-static int mcp25xxfd_chip_fifo_init(const struct mcp25xxfd_priv *priv) ++static int mcp251xfd_chip_fifo_init(const struct mcp251xfd_priv *priv) + { +- const struct mcp25xxfd_tx_ring *tx_ring = priv->tx; +- const struct mcp25xxfd_rx_ring *rx_ring; ++ const struct mcp251xfd_tx_ring *tx_ring = priv->tx; ++ const struct mcp251xfd_rx_ring *rx_ring; + u32 val; + int err, n; + + /* TEF */ +- val = FIELD_PREP(MCP25XXFD_REG_TEFCON_FSIZE_MASK, ++ val = FIELD_PREP(MCP251XFD_REG_TEFCON_FSIZE_MASK, + tx_ring->obj_num - 1) | +- MCP25XXFD_REG_TEFCON_TEFTSEN | +- MCP25XXFD_REG_TEFCON_TEFOVIE | +- MCP25XXFD_REG_TEFCON_TEFNEIE; ++ MCP251XFD_REG_TEFCON_TEFTSEN | ++ MCP251XFD_REG_TEFCON_TEFOVIE | ++ MCP251XFD_REG_TEFCON_TEFNEIE; + +- err = regmap_write(priv->map_reg, MCP25XXFD_REG_TEFCON, val); ++ err = regmap_write(priv->map_reg, MCP251XFD_REG_TEFCON, val); + if (err) + return err; + + /* FIFO 1 - TX */ +- val = FIELD_PREP(MCP25XXFD_REG_FIFOCON_FSIZE_MASK, ++ val = FIELD_PREP(MCP251XFD_REG_FIFOCON_FSIZE_MASK, + tx_ring->obj_num - 1) | +- MCP25XXFD_REG_FIFOCON_TXEN | +- MCP25XXFD_REG_FIFOCON_TXATIE; ++ MCP251XFD_REG_FIFOCON_TXEN | ++ MCP251XFD_REG_FIFOCON_TXATIE; + + if (priv->can.ctrlmode & (CAN_CTRLMODE_LISTENONLY | CAN_CTRLMODE_FD)) +- val |= FIELD_PREP(MCP25XXFD_REG_FIFOCON_PLSIZE_MASK, +- MCP25XXFD_REG_FIFOCON_PLSIZE_64); ++ val |= FIELD_PREP(MCP251XFD_REG_FIFOCON_PLSIZE_MASK, ++ MCP251XFD_REG_FIFOCON_PLSIZE_64); + else +- val |= FIELD_PREP(MCP25XXFD_REG_FIFOCON_PLSIZE_MASK, +- MCP25XXFD_REG_FIFOCON_PLSIZE_8); ++ val |= FIELD_PREP(MCP251XFD_REG_FIFOCON_PLSIZE_MASK, ++ MCP251XFD_REG_FIFOCON_PLSIZE_8); + + if (priv->can.ctrlmode & CAN_CTRLMODE_ONE_SHOT) +- val |= FIELD_PREP(MCP25XXFD_REG_FIFOCON_TXAT_MASK, +- MCP25XXFD_REG_FIFOCON_TXAT_ONE_SHOT); ++ val |= FIELD_PREP(MCP251XFD_REG_FIFOCON_TXAT_MASK, ++ MCP251XFD_REG_FIFOCON_TXAT_ONE_SHOT); + else +- val |= FIELD_PREP(MCP25XXFD_REG_FIFOCON_TXAT_MASK, +- MCP25XXFD_REG_FIFOCON_TXAT_UNLIMITED); ++ val |= FIELD_PREP(MCP251XFD_REG_FIFOCON_TXAT_MASK, ++ MCP251XFD_REG_FIFOCON_TXAT_UNLIMITED); + + err = regmap_write(priv->map_reg, +- MCP25XXFD_REG_FIFOCON(MCP25XXFD_TX_FIFO), ++ MCP251XFD_REG_FIFOCON(MCP251XFD_TX_FIFO), + val); + if (err) + return err; + + /* RX FIFOs */ +- mcp25xxfd_for_each_rx_ring(priv, rx_ring, n) { +- err = mcp25xxfd_chip_rx_fifo_init_one(priv, rx_ring); ++ mcp251xfd_for_each_rx_ring(priv, rx_ring, n) { ++ err = mcp251xfd_chip_rx_fifo_init_one(priv, rx_ring); + if (err) + return err; + +- err = mcp25xxfd_chip_rx_filter_init_one(priv, rx_ring); ++ err = mcp251xfd_chip_rx_filter_init_one(priv, rx_ring); + if (err) + return err; + } +@@ -892,195 +892,195 @@ static int mcp25xxfd_chip_fifo_init(const struct mcp25xxfd_priv *priv) + return 0; + } + +-static int mcp25xxfd_chip_ecc_init(struct mcp25xxfd_priv *priv) ++static int mcp251xfd_chip_ecc_init(struct mcp251xfd_priv *priv) + { +- struct mcp25xxfd_ecc *ecc = &priv->ecc; ++ struct mcp251xfd_ecc *ecc = &priv->ecc; + void *ram; + u32 val = 0; + int err; + + ecc->ecc_stat = 0; + +- if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_ECC) +- val = MCP25XXFD_REG_ECCCON_ECCEN; ++ if (priv->devtype_data.quirks & MCP251XFD_QUIRK_ECC) ++ val = MCP251XFD_REG_ECCCON_ECCEN; + +- err = regmap_update_bits(priv->map_reg, MCP25XXFD_REG_ECCCON, +- MCP25XXFD_REG_ECCCON_ECCEN, val); ++ err = regmap_update_bits(priv->map_reg, MCP251XFD_REG_ECCCON, ++ MCP251XFD_REG_ECCCON_ECCEN, val); + if (err) + return err; + +- ram = kzalloc(MCP25XXFD_RAM_SIZE, GFP_KERNEL); ++ ram = kzalloc(MCP251XFD_RAM_SIZE, GFP_KERNEL); + if (!ram) + return -ENOMEM; + +- err = regmap_raw_write(priv->map_reg, MCP25XXFD_RAM_START, ram, +- MCP25XXFD_RAM_SIZE); ++ err = regmap_raw_write(priv->map_reg, MCP251XFD_RAM_START, ram, ++ MCP251XFD_RAM_SIZE); + kfree(ram); + + return err; + } + +-static inline void mcp25xxfd_ecc_tefif_successful(struct mcp25xxfd_priv *priv) ++static inline void mcp251xfd_ecc_tefif_successful(struct mcp251xfd_priv *priv) + { +- struct mcp25xxfd_ecc *ecc = &priv->ecc; ++ struct mcp251xfd_ecc *ecc = &priv->ecc; + + ecc->ecc_stat = 0; + } + +-static u8 mcp25xxfd_get_normal_mode(const struct mcp25xxfd_priv *priv) ++static u8 mcp251xfd_get_normal_mode(const struct mcp251xfd_priv *priv) + { + u8 mode; + + if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY) +- mode = MCP25XXFD_REG_CON_MODE_LISTENONLY; ++ mode = MCP251XFD_REG_CON_MODE_LISTENONLY; + else if (priv->can.ctrlmode & CAN_CTRLMODE_FD) +- mode = MCP25XXFD_REG_CON_MODE_MIXED; ++ mode = MCP251XFD_REG_CON_MODE_MIXED; + else +- mode = MCP25XXFD_REG_CON_MODE_CAN2_0; ++ mode = MCP251XFD_REG_CON_MODE_CAN2_0; + + return mode; + } + + static int +-__mcp25xxfd_chip_set_normal_mode(const struct mcp25xxfd_priv *priv, ++__mcp251xfd_chip_set_normal_mode(const struct mcp251xfd_priv *priv, + bool nowait) + { + u8 mode; + +- mode = mcp25xxfd_get_normal_mode(priv); ++ mode = mcp251xfd_get_normal_mode(priv); + +- return __mcp25xxfd_chip_set_mode(priv, mode, nowait); ++ return __mcp251xfd_chip_set_mode(priv, mode, nowait); + } + + static inline int +-mcp25xxfd_chip_set_normal_mode(const struct mcp25xxfd_priv *priv) ++mcp251xfd_chip_set_normal_mode(const struct mcp251xfd_priv *priv) + { +- return __mcp25xxfd_chip_set_normal_mode(priv, false); ++ return __mcp251xfd_chip_set_normal_mode(priv, false); + } + + static inline int +-mcp25xxfd_chip_set_normal_mode_nowait(const struct mcp25xxfd_priv *priv) ++mcp251xfd_chip_set_normal_mode_nowait(const struct mcp251xfd_priv *priv) + { +- return __mcp25xxfd_chip_set_normal_mode(priv, true); ++ return __mcp251xfd_chip_set_normal_mode(priv, true); + } + +-static int mcp25xxfd_chip_interrupts_enable(const struct mcp25xxfd_priv *priv) ++static int mcp251xfd_chip_interrupts_enable(const struct mcp251xfd_priv *priv) + { + u32 val; + int err; + +- val = MCP25XXFD_REG_CRC_FERRIE | MCP25XXFD_REG_CRC_CRCERRIE; +- err = regmap_write(priv->map_reg, MCP25XXFD_REG_CRC, val); ++ val = MCP251XFD_REG_CRC_FERRIE | MCP251XFD_REG_CRC_CRCERRIE; ++ err = regmap_write(priv->map_reg, MCP251XFD_REG_CRC, val); + if (err) + return err; + +- val = MCP25XXFD_REG_ECCCON_DEDIE | MCP25XXFD_REG_ECCCON_SECIE; +- err = regmap_update_bits(priv->map_reg, MCP25XXFD_REG_ECCCON, val, val); ++ val = MCP251XFD_REG_ECCCON_DEDIE | MCP251XFD_REG_ECCCON_SECIE; ++ err = regmap_update_bits(priv->map_reg, MCP251XFD_REG_ECCCON, val, val); + if (err) + return err; + +- val = MCP25XXFD_REG_INT_CERRIE | +- MCP25XXFD_REG_INT_SERRIE | +- MCP25XXFD_REG_INT_RXOVIE | +- MCP25XXFD_REG_INT_TXATIE | +- MCP25XXFD_REG_INT_SPICRCIE | +- MCP25XXFD_REG_INT_ECCIE | +- MCP25XXFD_REG_INT_TEFIE | +- MCP25XXFD_REG_INT_MODIE | +- MCP25XXFD_REG_INT_RXIE; ++ val = MCP251XFD_REG_INT_CERRIE | ++ MCP251XFD_REG_INT_SERRIE | ++ MCP251XFD_REG_INT_RXOVIE | ++ MCP251XFD_REG_INT_TXATIE | ++ MCP251XFD_REG_INT_SPICRCIE | ++ MCP251XFD_REG_INT_ECCIE | ++ MCP251XFD_REG_INT_TEFIE | ++ MCP251XFD_REG_INT_MODIE | ++ MCP251XFD_REG_INT_RXIE; + + if (priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING) +- val |= MCP25XXFD_REG_INT_IVMIE; ++ val |= MCP251XFD_REG_INT_IVMIE; + +- return regmap_write(priv->map_reg, MCP25XXFD_REG_INT, val); ++ return regmap_write(priv->map_reg, MCP251XFD_REG_INT, val); + } + +-static int mcp25xxfd_chip_interrupts_disable(const struct mcp25xxfd_priv *priv) ++static int mcp251xfd_chip_interrupts_disable(const struct mcp251xfd_priv *priv) + { + int err; + u32 mask; + +- err = regmap_write(priv->map_reg, MCP25XXFD_REG_INT, 0); ++ err = regmap_write(priv->map_reg, MCP251XFD_REG_INT, 0); + if (err) + return err; + +- mask = MCP25XXFD_REG_ECCCON_DEDIE | MCP25XXFD_REG_ECCCON_SECIE; +- err = regmap_update_bits(priv->map_reg, MCP25XXFD_REG_ECCCON, ++ mask = MCP251XFD_REG_ECCCON_DEDIE | MCP251XFD_REG_ECCCON_SECIE; ++ err = regmap_update_bits(priv->map_reg, MCP251XFD_REG_ECCCON, + mask, 0x0); + if (err) + return err; + +- return regmap_write(priv->map_reg, MCP25XXFD_REG_CRC, 0); ++ return regmap_write(priv->map_reg, MCP251XFD_REG_CRC, 0); + } + +-static int mcp25xxfd_chip_stop(struct mcp25xxfd_priv *priv, ++static int mcp251xfd_chip_stop(struct mcp251xfd_priv *priv, + const enum can_state state) + { + priv->can.state = state; + +- mcp25xxfd_chip_interrupts_disable(priv); +- mcp25xxfd_chip_rx_int_disable(priv); +- return mcp25xxfd_chip_set_mode(priv, MCP25XXFD_REG_CON_MODE_SLEEP); ++ mcp251xfd_chip_interrupts_disable(priv); ++ mcp251xfd_chip_rx_int_disable(priv); ++ return mcp251xfd_chip_set_mode(priv, MCP251XFD_REG_CON_MODE_SLEEP); + } + +-static int mcp25xxfd_chip_start(struct mcp25xxfd_priv *priv) ++static int mcp251xfd_chip_start(struct mcp251xfd_priv *priv) + { + int err; + +- err = mcp25xxfd_chip_softreset(priv); ++ err = mcp251xfd_chip_softreset(priv); + if (err) + goto out_chip_stop; + +- err = mcp25xxfd_chip_clock_init(priv); ++ err = mcp251xfd_chip_clock_init(priv); + if (err) + goto out_chip_stop; + +- err = mcp25xxfd_set_bittiming(priv); ++ err = mcp251xfd_set_bittiming(priv); + if (err) + goto out_chip_stop; + +- err = mcp25xxfd_chip_rx_int_enable(priv); ++ err = mcp251xfd_chip_rx_int_enable(priv); + if (err) + return err; + +- err = mcp25xxfd_chip_ecc_init(priv); ++ err = mcp251xfd_chip_ecc_init(priv); + if (err) + goto out_chip_stop; + +- mcp25xxfd_ring_init(priv); ++ mcp251xfd_ring_init(priv); + +- err = mcp25xxfd_chip_fifo_init(priv); ++ err = mcp251xfd_chip_fifo_init(priv); + if (err) + goto out_chip_stop; + + priv->can.state = CAN_STATE_ERROR_ACTIVE; + +- err = mcp25xxfd_chip_set_normal_mode(priv); ++ err = mcp251xfd_chip_set_normal_mode(priv); + if (err) + goto out_chip_stop; + + return 0; + + out_chip_stop: +- mcp25xxfd_chip_stop(priv, CAN_STATE_STOPPED); ++ mcp251xfd_chip_stop(priv, CAN_STATE_STOPPED); + + return err; + } + +-static int mcp25xxfd_set_mode(struct net_device *ndev, enum can_mode mode) ++static int mcp251xfd_set_mode(struct net_device *ndev, enum can_mode mode) + { +- struct mcp25xxfd_priv *priv = netdev_priv(ndev); ++ struct mcp251xfd_priv *priv = netdev_priv(ndev); + int err; + + switch (mode) { + case CAN_MODE_START: +- err = mcp25xxfd_chip_start(priv); ++ err = mcp251xfd_chip_start(priv); + if (err) + return err; + +- err = mcp25xxfd_chip_interrupts_enable(priv); ++ err = mcp251xfd_chip_interrupts_enable(priv); + if (err) { +- mcp25xxfd_chip_stop(priv, CAN_STATE_STOPPED); ++ mcp251xfd_chip_stop(priv, CAN_STATE_STOPPED); + return err; + } + +@@ -1094,30 +1094,30 @@ static int mcp25xxfd_set_mode(struct net_device *ndev, enum can_mode mode) + return 0; + } + +-static int __mcp25xxfd_get_berr_counter(const struct net_device *ndev, ++static int __mcp251xfd_get_berr_counter(const struct net_device *ndev, + struct can_berr_counter *bec) + { +- const struct mcp25xxfd_priv *priv = netdev_priv(ndev); ++ const struct mcp251xfd_priv *priv = netdev_priv(ndev); + u32 trec; + int err; + +- err = regmap_read(priv->map_reg, MCP25XXFD_REG_TREC, &trec); ++ err = regmap_read(priv->map_reg, MCP251XFD_REG_TREC, &trec); + if (err) + return err; + +- if (trec & MCP25XXFD_REG_TREC_TXBO) ++ if (trec & MCP251XFD_REG_TREC_TXBO) + bec->txerr = 256; + else +- bec->txerr = FIELD_GET(MCP25XXFD_REG_TREC_TEC_MASK, trec); +- bec->rxerr = FIELD_GET(MCP25XXFD_REG_TREC_REC_MASK, trec); ++ bec->txerr = FIELD_GET(MCP251XFD_REG_TREC_TEC_MASK, trec); ++ bec->rxerr = FIELD_GET(MCP251XFD_REG_TREC_REC_MASK, trec); + + return 0; + } + +-static int mcp25xxfd_get_berr_counter(const struct net_device *ndev, ++static int mcp251xfd_get_berr_counter(const struct net_device *ndev, + struct can_berr_counter *bec) + { +- const struct mcp25xxfd_priv *priv = netdev_priv(ndev); ++ const struct mcp251xfd_priv *priv = netdev_priv(ndev); + + /* Avoid waking up the controller if the interface is down */ + if (!(ndev->flags & IFF_UP)) +@@ -1131,22 +1131,22 @@ static int mcp25xxfd_get_berr_counter(const struct net_device *ndev, + return 0; + } + +- return __mcp25xxfd_get_berr_counter(ndev, bec); ++ return __mcp251xfd_get_berr_counter(ndev, bec); + } + +-static int mcp25xxfd_check_tef_tail(const struct mcp25xxfd_priv *priv) ++static int mcp251xfd_check_tef_tail(const struct mcp251xfd_priv *priv) + { + u8 tef_tail_chip, tef_tail; + int err; + +- if (!IS_ENABLED(CONFIG_CAN_MCP25XXFD_SANITY)) ++ if (!IS_ENABLED(CONFIG_CAN_MCP251XFD_SANITY)) + return 0; + +- err = mcp25xxfd_tef_tail_get_from_chip(priv, &tef_tail_chip); ++ err = mcp251xfd_tef_tail_get_from_chip(priv, &tef_tail_chip); + if (err) + return err; + +- tef_tail = mcp25xxfd_get_tef_tail(priv); ++ tef_tail = mcp251xfd_get_tef_tail(priv); + if (tef_tail_chip != tef_tail) { + netdev_err(priv->ndev, + "TEF tail of chip (0x%02x) and ours (0x%08x) inconsistent.\n", +@@ -1158,20 +1158,20 @@ static int mcp25xxfd_check_tef_tail(const struct mcp25xxfd_priv *priv) + } + + static int +-mcp25xxfd_check_rx_tail(const struct mcp25xxfd_priv *priv, +- const struct mcp25xxfd_rx_ring *ring) ++mcp251xfd_check_rx_tail(const struct mcp251xfd_priv *priv, ++ const struct mcp251xfd_rx_ring *ring) + { + u8 rx_tail_chip, rx_tail; + int err; + +- if (!IS_ENABLED(CONFIG_CAN_MCP25XXFD_SANITY)) ++ if (!IS_ENABLED(CONFIG_CAN_MCP251XFD_SANITY)) + return 0; + +- err = mcp25xxfd_rx_tail_get_from_chip(priv, ring, &rx_tail_chip); ++ err = mcp251xfd_rx_tail_get_from_chip(priv, ring, &rx_tail_chip); + if (err) + return err; + +- rx_tail = mcp25xxfd_get_rx_tail(ring); ++ rx_tail = mcp251xfd_get_rx_tail(ring); + if (rx_tail_chip != rx_tail) { + netdev_err(priv->ndev, + "RX tail of chip (%d) and ours (%d) inconsistent.\n", +@@ -1183,17 +1183,17 @@ mcp25xxfd_check_rx_tail(const struct mcp25xxfd_priv *priv, + } + + static int +-mcp25xxfd_handle_tefif_recover(const struct mcp25xxfd_priv *priv, const u32 seq) ++mcp251xfd_handle_tefif_recover(const struct mcp251xfd_priv *priv, const u32 seq) + { +- const struct mcp25xxfd_tx_ring *tx_ring = priv->tx; ++ const struct mcp251xfd_tx_ring *tx_ring = priv->tx; + u32 tef_sta; + int err; + +- err = regmap_read(priv->map_reg, MCP25XXFD_REG_TEFSTA, &tef_sta); ++ err = regmap_read(priv->map_reg, MCP251XFD_REG_TEFSTA, &tef_sta); + if (err) + return err; + +- if (tef_sta & MCP25XXFD_REG_TEFSTA_TEFOVIF) { ++ if (tef_sta & MCP251XFD_REG_TEFSTA_TEFOVIF) { + netdev_err(priv->ndev, + "Transmit Event FIFO buffer overflow.\n"); + return -ENOBUFS; +@@ -1201,8 +1201,8 @@ mcp25xxfd_handle_tefif_recover(const struct mcp25xxfd_priv *priv, const u32 seq) + + netdev_info(priv->ndev, + "Transmit Event FIFO buffer %s. (seq=0x%08x, tef_tail=0x%08x, tef_head=0x%08x, tx_head=0x%08x)\n", +- tef_sta & MCP25XXFD_REG_TEFSTA_TEFFIF ? +- "full" : tef_sta & MCP25XXFD_REG_TEFSTA_TEFNEIF ? ++ tef_sta & MCP251XFD_REG_TEFSTA_TEFFIF ? ++ "full" : tef_sta & MCP251XFD_REG_TEFSTA_TEFNEIF ? + "not empty" : "empty", + seq, priv->tef.tail, priv->tef.head, tx_ring->head); + +@@ -1211,15 +1211,15 @@ mcp25xxfd_handle_tefif_recover(const struct mcp25xxfd_priv *priv, const u32 seq) + } + + static int +-mcp25xxfd_handle_tefif_one(struct mcp25xxfd_priv *priv, +- const struct mcp25xxfd_hw_tef_obj *hw_tef_obj) ++mcp251xfd_handle_tefif_one(struct mcp251xfd_priv *priv, ++ const struct mcp251xfd_hw_tef_obj *hw_tef_obj) + { +- struct mcp25xxfd_tx_ring *tx_ring = priv->tx; ++ struct mcp251xfd_tx_ring *tx_ring = priv->tx; + struct net_device_stats *stats = &priv->ndev->stats; + u32 seq, seq_masked, tef_tail_masked; + int err; + +- seq = FIELD_GET(MCP25XXFD_OBJ_FLAGS_SEQ_MCP2518FD_MASK, ++ seq = FIELD_GET(MCP251XFD_OBJ_FLAGS_SEQ_MCP2518FD_MASK, + hw_tef_obj->flags); + + /* Use the MCP2517FD mask on the MCP2518FD, too. We only +@@ -1227,39 +1227,39 @@ mcp25xxfd_handle_tefif_one(struct mcp25xxfd_priv *priv, + * net-yet-completed, i.e. old TEF objects. + */ + seq_masked = seq & +- field_mask(MCP25XXFD_OBJ_FLAGS_SEQ_MCP2517FD_MASK); ++ field_mask(MCP251XFD_OBJ_FLAGS_SEQ_MCP2517FD_MASK); + tef_tail_masked = priv->tef.tail & +- field_mask(MCP25XXFD_OBJ_FLAGS_SEQ_MCP2517FD_MASK); ++ field_mask(MCP251XFD_OBJ_FLAGS_SEQ_MCP2517FD_MASK); + if (seq_masked != tef_tail_masked) +- return mcp25xxfd_handle_tefif_recover(priv, seq); ++ return mcp251xfd_handle_tefif_recover(priv, seq); + + stats->tx_bytes += + can_rx_offload_get_echo_skb(&priv->offload, +- mcp25xxfd_get_tef_tail(priv), ++ mcp251xfd_get_tef_tail(priv), + hw_tef_obj->ts); + stats->tx_packets++; + + /* finally increment the TEF pointer */ +- err = regmap_update_bits(priv->map_reg, MCP25XXFD_REG_TEFCON, ++ err = regmap_update_bits(priv->map_reg, MCP251XFD_REG_TEFCON, + GENMASK(15, 8), +- MCP25XXFD_REG_TEFCON_UINC); ++ MCP251XFD_REG_TEFCON_UINC); + if (err) + return err; + + priv->tef.tail++; + tx_ring->tail++; + +- return mcp25xxfd_check_tef_tail(priv); ++ return mcp251xfd_check_tef_tail(priv); + } + +-static int mcp25xxfd_tef_ring_update(struct mcp25xxfd_priv *priv) ++static int mcp251xfd_tef_ring_update(struct mcp251xfd_priv *priv) + { +- const struct mcp25xxfd_tx_ring *tx_ring = priv->tx; ++ const struct mcp251xfd_tx_ring *tx_ring = priv->tx; + unsigned int new_head; + u8 chip_tx_tail; + int err; + +- err = mcp25xxfd_tx_tail_get_from_chip(priv, &chip_tx_tail); ++ err = mcp251xfd_tx_tail_get_from_chip(priv, &chip_tx_tail); + if (err) + return err; + +@@ -1273,17 +1273,17 @@ static int mcp25xxfd_tef_ring_update(struct mcp25xxfd_priv *priv) + /* ... but it cannot exceed the TX head. */ + priv->tef.head = min(new_head, tx_ring->head); + +- return mcp25xxfd_check_tef_tail(priv); ++ return mcp251xfd_check_tef_tail(priv); + } + + static inline int +-mcp25xxfd_tef_obj_read(const struct mcp25xxfd_priv *priv, +- struct mcp25xxfd_hw_tef_obj *hw_tef_obj, ++mcp251xfd_tef_obj_read(const struct mcp251xfd_priv *priv, ++ struct mcp251xfd_hw_tef_obj *hw_tef_obj, + const u8 offset, const u8 len) + { +- const struct mcp25xxfd_tx_ring *tx_ring = priv->tx; ++ const struct mcp251xfd_tx_ring *tx_ring = priv->tx; + +- if (IS_ENABLED(CONFIG_CAN_MCP25XXFD_SANITY) && ++ if (IS_ENABLED(CONFIG_CAN_MCP251XFD_SANITY) && + (offset > tx_ring->obj_num || + len > tx_ring->obj_num || + offset + len > tx_ring->obj_num)) { +@@ -1294,36 +1294,36 @@ mcp25xxfd_tef_obj_read(const struct mcp25xxfd_priv *priv, + } + + return regmap_bulk_read(priv->map_rx, +- mcp25xxfd_get_tef_obj_addr(offset), ++ mcp251xfd_get_tef_obj_addr(offset), + hw_tef_obj, + sizeof(*hw_tef_obj) / sizeof(u32) * len); + } + +-static int mcp25xxfd_handle_tefif(struct mcp25xxfd_priv *priv) ++static int mcp251xfd_handle_tefif(struct mcp251xfd_priv *priv) + { +- struct mcp25xxfd_hw_tef_obj hw_tef_obj[MCP25XXFD_TX_OBJ_NUM_MAX]; ++ struct mcp251xfd_hw_tef_obj hw_tef_obj[MCP251XFD_TX_OBJ_NUM_MAX]; + u8 tef_tail, len, l; + int err, i; + +- err = mcp25xxfd_tef_ring_update(priv); ++ err = mcp251xfd_tef_ring_update(priv); + if (err) + return err; + +- tef_tail = mcp25xxfd_get_tef_tail(priv); +- len = mcp25xxfd_get_tef_len(priv); +- l = mcp25xxfd_get_tef_linear_len(priv); +- err = mcp25xxfd_tef_obj_read(priv, hw_tef_obj, tef_tail, l); ++ tef_tail = mcp251xfd_get_tef_tail(priv); ++ len = mcp251xfd_get_tef_len(priv); ++ l = mcp251xfd_get_tef_linear_len(priv); ++ err = mcp251xfd_tef_obj_read(priv, hw_tef_obj, tef_tail, l); + if (err) + return err; + + if (l < len) { +- err = mcp25xxfd_tef_obj_read(priv, &hw_tef_obj[l], 0, len - l); ++ err = mcp251xfd_tef_obj_read(priv, &hw_tef_obj[l], 0, len - l); + if (err) + return err; + } + + for (i = 0; i < len; i++) { +- err = mcp25xxfd_handle_tefif_one(priv, &hw_tef_obj[i]); ++ err = mcp251xfd_handle_tefif_one(priv, &hw_tef_obj[i]); + /* -EAGAIN means the Sequence Number in the TEF + * doesn't match our tef_tail. This can happen if we + * read the TEF objects too early. Leave loop let the +@@ -1336,9 +1336,9 @@ static int mcp25xxfd_handle_tefif(struct mcp25xxfd_priv *priv) + } + + out_netif_wake_queue: +- mcp25xxfd_ecc_tefif_successful(priv); ++ mcp251xfd_ecc_tefif_successful(priv); + +- if (mcp25xxfd_get_tx_free(priv->tx)) { ++ if (mcp251xfd_get_tx_free(priv->tx)) { + /* Make sure that anybody stopping the queue after + * this sees the new tx_ring->tail. + */ +@@ -1350,14 +1350,14 @@ static int mcp25xxfd_handle_tefif(struct mcp25xxfd_priv *priv) + } + + static int +-mcp25xxfd_rx_ring_update(const struct mcp25xxfd_priv *priv, +- struct mcp25xxfd_rx_ring *ring) ++mcp251xfd_rx_ring_update(const struct mcp251xfd_priv *priv, ++ struct mcp251xfd_rx_ring *ring) + { + u32 new_head; + u8 chip_rx_head; + int err; + +- err = mcp25xxfd_rx_head_get_from_chip(priv, ring, &chip_rx_head); ++ err = mcp251xfd_rx_head_get_from_chip(priv, ring, &chip_rx_head); + if (err) + return err; + +@@ -1370,47 +1370,47 @@ mcp25xxfd_rx_ring_update(const struct mcp25xxfd_priv *priv, + + ring->head = new_head; + +- return mcp25xxfd_check_rx_tail(priv, ring); ++ return mcp251xfd_check_rx_tail(priv, ring); + } + + static void +-mcp25xxfd_hw_rx_obj_to_skb(const struct mcp25xxfd_priv *priv, +- const struct mcp25xxfd_hw_rx_obj_canfd *hw_rx_obj, ++mcp251xfd_hw_rx_obj_to_skb(const struct mcp251xfd_priv *priv, ++ const struct mcp251xfd_hw_rx_obj_canfd *hw_rx_obj, + struct sk_buff *skb) + { + struct canfd_frame *cfd = (struct canfd_frame *)skb->data; + +- if (hw_rx_obj->flags & MCP25XXFD_OBJ_FLAGS_IDE) { ++ if (hw_rx_obj->flags & MCP251XFD_OBJ_FLAGS_IDE) { + u32 sid, eid; + +- eid = FIELD_GET(MCP25XXFD_OBJ_ID_EID_MASK, hw_rx_obj->id); +- sid = FIELD_GET(MCP25XXFD_OBJ_ID_SID_MASK, hw_rx_obj->id); ++ eid = FIELD_GET(MCP251XFD_OBJ_ID_EID_MASK, hw_rx_obj->id); ++ sid = FIELD_GET(MCP251XFD_OBJ_ID_SID_MASK, hw_rx_obj->id); + + cfd->can_id = CAN_EFF_FLAG | +- FIELD_PREP(MCP25XXFD_REG_FRAME_EFF_EID_MASK, eid) | +- FIELD_PREP(MCP25XXFD_REG_FRAME_EFF_SID_MASK, sid); ++ FIELD_PREP(MCP251XFD_REG_FRAME_EFF_EID_MASK, eid) | ++ FIELD_PREP(MCP251XFD_REG_FRAME_EFF_SID_MASK, sid); + } else { +- cfd->can_id = FIELD_GET(MCP25XXFD_OBJ_ID_SID_MASK, ++ cfd->can_id = FIELD_GET(MCP251XFD_OBJ_ID_SID_MASK, + hw_rx_obj->id); + } + + /* CANFD */ +- if (hw_rx_obj->flags & MCP25XXFD_OBJ_FLAGS_FDF) { ++ if (hw_rx_obj->flags & MCP251XFD_OBJ_FLAGS_FDF) { + u8 dlc; + +- if (hw_rx_obj->flags & MCP25XXFD_OBJ_FLAGS_ESI) ++ if (hw_rx_obj->flags & MCP251XFD_OBJ_FLAGS_ESI) + cfd->flags |= CANFD_ESI; + +- if (hw_rx_obj->flags & MCP25XXFD_OBJ_FLAGS_BRS) ++ if (hw_rx_obj->flags & MCP251XFD_OBJ_FLAGS_BRS) + cfd->flags |= CANFD_BRS; + +- dlc = FIELD_GET(MCP25XXFD_OBJ_FLAGS_DLC, hw_rx_obj->flags); ++ dlc = FIELD_GET(MCP251XFD_OBJ_FLAGS_DLC, hw_rx_obj->flags); + cfd->len = can_dlc2len(get_canfd_dlc(dlc)); + } else { +- if (hw_rx_obj->flags & MCP25XXFD_OBJ_FLAGS_RTR) ++ if (hw_rx_obj->flags & MCP251XFD_OBJ_FLAGS_RTR) + cfd->can_id |= CAN_RTR_FLAG; + +- cfd->len = get_can_dlc(FIELD_GET(MCP25XXFD_OBJ_FLAGS_DLC, ++ cfd->len = get_can_dlc(FIELD_GET(MCP251XFD_OBJ_FLAGS_DLC, + hw_rx_obj->flags)); + } + +@@ -1418,16 +1418,16 @@ mcp25xxfd_hw_rx_obj_to_skb(const struct mcp25xxfd_priv *priv, + } + + static int +-mcp25xxfd_handle_rxif_one(struct mcp25xxfd_priv *priv, +- struct mcp25xxfd_rx_ring *ring, +- const struct mcp25xxfd_hw_rx_obj_canfd *hw_rx_obj) ++mcp251xfd_handle_rxif_one(struct mcp251xfd_priv *priv, ++ struct mcp251xfd_rx_ring *ring, ++ const struct mcp251xfd_hw_rx_obj_canfd *hw_rx_obj) + { + struct net_device_stats *stats = &priv->ndev->stats; + struct sk_buff *skb; + struct canfd_frame *cfd; + int err; + +- if (hw_rx_obj->flags & MCP25XXFD_OBJ_FLAGS_FDF) ++ if (hw_rx_obj->flags & MCP251XFD_OBJ_FLAGS_FDF) + skb = alloc_canfd_skb(priv->ndev, &cfd); + else + skb = alloc_can_skb(priv->ndev, (struct can_frame **)&cfd); +@@ -1437,7 +1437,7 @@ mcp25xxfd_handle_rxif_one(struct mcp25xxfd_priv *priv, + return 0; + } + +- mcp25xxfd_hw_rx_obj_to_skb(priv, hw_rx_obj, skb); ++ mcp251xfd_hw_rx_obj_to_skb(priv, hw_rx_obj, skb); + err = can_rx_offload_queue_sorted(&priv->offload, skb, hw_rx_obj->ts); + if (err) + stats->rx_fifo_errors++; +@@ -1446,21 +1446,21 @@ mcp25xxfd_handle_rxif_one(struct mcp25xxfd_priv *priv, + + /* finally increment the RX pointer */ + return regmap_update_bits(priv->map_reg, +- MCP25XXFD_REG_FIFOCON(ring->fifo_nr), ++ MCP251XFD_REG_FIFOCON(ring->fifo_nr), + GENMASK(15, 8), +- MCP25XXFD_REG_FIFOCON_UINC); ++ MCP251XFD_REG_FIFOCON_UINC); + } + + static inline int +-mcp25xxfd_rx_obj_read(const struct mcp25xxfd_priv *priv, +- const struct mcp25xxfd_rx_ring *ring, +- struct mcp25xxfd_hw_rx_obj_canfd *hw_rx_obj, ++mcp251xfd_rx_obj_read(const struct mcp251xfd_priv *priv, ++ const struct mcp251xfd_rx_ring *ring, ++ struct mcp251xfd_hw_rx_obj_canfd *hw_rx_obj, + const u8 offset, const u8 len) + { + int err; + + err = regmap_bulk_read(priv->map_rx, +- mcp25xxfd_get_rx_obj_addr(ring, offset), ++ mcp251xfd_get_rx_obj_addr(ring, offset), + hw_rx_obj, + len * ring->obj_size / sizeof(u32)); + +@@ -1468,27 +1468,27 @@ mcp25xxfd_rx_obj_read(const struct mcp25xxfd_priv *priv, + } + + static int +-mcp25xxfd_handle_rxif_ring(struct mcp25xxfd_priv *priv, +- struct mcp25xxfd_rx_ring *ring) ++mcp251xfd_handle_rxif_ring(struct mcp251xfd_priv *priv, ++ struct mcp251xfd_rx_ring *ring) + { +- struct mcp25xxfd_hw_rx_obj_canfd *hw_rx_obj = ring->obj; ++ struct mcp251xfd_hw_rx_obj_canfd *hw_rx_obj = ring->obj; + u8 rx_tail, len; + int err, i; + +- err = mcp25xxfd_rx_ring_update(priv, ring); ++ err = mcp251xfd_rx_ring_update(priv, ring); + if (err) + return err; + +- while ((len = mcp25xxfd_get_rx_linear_len(ring))) { +- rx_tail = mcp25xxfd_get_rx_tail(ring); ++ while ((len = mcp251xfd_get_rx_linear_len(ring))) { ++ rx_tail = mcp251xfd_get_rx_tail(ring); + +- err = mcp25xxfd_rx_obj_read(priv, ring, hw_rx_obj, ++ err = mcp251xfd_rx_obj_read(priv, ring, hw_rx_obj, + rx_tail, len); + if (err) + return err; + + for (i = 0; i < len; i++) { +- err = mcp25xxfd_handle_rxif_one(priv, ring, ++ err = mcp251xfd_handle_rxif_one(priv, ring, + (void *)hw_rx_obj + + i * ring->obj_size); + if (err) +@@ -1499,13 +1499,13 @@ mcp25xxfd_handle_rxif_ring(struct mcp25xxfd_priv *priv, + return 0; + } + +-static int mcp25xxfd_handle_rxif(struct mcp25xxfd_priv *priv) ++static int mcp251xfd_handle_rxif(struct mcp251xfd_priv *priv) + { +- struct mcp25xxfd_rx_ring *ring; ++ struct mcp251xfd_rx_ring *ring; + int err, n; + +- mcp25xxfd_for_each_rx_ring(priv, ring, n) { +- err = mcp25xxfd_handle_rxif_ring(priv, ring); ++ mcp251xfd_for_each_rx_ring(priv, ring, n) { ++ err = mcp251xfd_handle_rxif_ring(priv, ring); + if (err) + return err; + } +@@ -1513,29 +1513,29 @@ static int mcp25xxfd_handle_rxif(struct mcp25xxfd_priv *priv) + return 0; + } + +-static inline int mcp25xxfd_get_timestamp(const struct mcp25xxfd_priv *priv, ++static inline int mcp251xfd_get_timestamp(const struct mcp251xfd_priv *priv, + u32 *timestamp) + { +- return regmap_read(priv->map_reg, MCP25XXFD_REG_TBC, timestamp); ++ return regmap_read(priv->map_reg, MCP251XFD_REG_TBC, timestamp); + } + + static struct sk_buff * +-mcp25xxfd_alloc_can_err_skb(const struct mcp25xxfd_priv *priv, ++mcp251xfd_alloc_can_err_skb(const struct mcp251xfd_priv *priv, + struct can_frame **cf, u32 *timestamp) + { + int err; + +- err = mcp25xxfd_get_timestamp(priv, timestamp); ++ err = mcp251xfd_get_timestamp(priv, timestamp); + if (err) + return NULL; + + return alloc_can_err_skb(priv->ndev, cf); + } + +-static int mcp25xxfd_handle_rxovif(struct mcp25xxfd_priv *priv) ++static int mcp251xfd_handle_rxovif(struct mcp251xfd_priv *priv) + { + struct net_device_stats *stats = &priv->ndev->stats; +- struct mcp25xxfd_rx_ring *ring; ++ struct mcp251xfd_rx_ring *ring; + struct sk_buff *skb; + struct can_frame *cf; + u32 timestamp, rxovif; +@@ -1544,16 +1544,16 @@ static int mcp25xxfd_handle_rxovif(struct mcp25xxfd_priv *priv) + stats->rx_over_errors++; + stats->rx_errors++; + +- err = regmap_read(priv->map_reg, MCP25XXFD_REG_RXOVIF, &rxovif); ++ err = regmap_read(priv->map_reg, MCP251XFD_REG_RXOVIF, &rxovif); + if (err) + return err; + +- mcp25xxfd_for_each_rx_ring(priv, ring, i) { ++ mcp251xfd_for_each_rx_ring(priv, ring, i) { + if (!(rxovif & BIT(ring->fifo_nr))) + continue; + + /* If SERRIF is active, there was a RX MAB overflow. */ +- if (priv->regs_status.intf & MCP25XXFD_REG_INT_SERRIF) { ++ if (priv->regs_status.intf & MCP251XFD_REG_INT_SERRIF) { + netdev_info(priv->ndev, + "RX-%d: MAB overflow detected.\n", + ring->nr); +@@ -1563,14 +1563,14 @@ static int mcp25xxfd_handle_rxovif(struct mcp25xxfd_priv *priv) + } + + err = regmap_update_bits(priv->map_reg, +- MCP25XXFD_REG_FIFOSTA(ring->fifo_nr), +- MCP25XXFD_REG_FIFOSTA_RXOVIF, ++ MCP251XFD_REG_FIFOSTA(ring->fifo_nr), ++ MCP251XFD_REG_FIFOSTA_RXOVIF, + 0x0); + if (err) + return err; + } + +- skb = mcp25xxfd_alloc_can_err_skb(priv, &cf, ×tamp); ++ skb = mcp251xfd_alloc_can_err_skb(priv, &cf, ×tamp); + if (!skb) + return 0; + +@@ -1584,14 +1584,14 @@ static int mcp25xxfd_handle_rxovif(struct mcp25xxfd_priv *priv) + return 0; + } + +-static int mcp25xxfd_handle_txatif(struct mcp25xxfd_priv *priv) ++static int mcp251xfd_handle_txatif(struct mcp251xfd_priv *priv) + { + netdev_info(priv->ndev, "%s\n", __func__); + + return 0; + } + +-static int mcp25xxfd_handle_ivmif(struct mcp25xxfd_priv *priv) ++static int mcp251xfd_handle_ivmif(struct mcp251xfd_priv *priv) + { + struct net_device_stats *stats = &priv->ndev->stats; + u32 bdiag1, timestamp; +@@ -1599,18 +1599,18 @@ static int mcp25xxfd_handle_ivmif(struct mcp25xxfd_priv *priv) + struct can_frame *cf = NULL; + int err; + +- err = mcp25xxfd_get_timestamp(priv, ×tamp); ++ err = mcp251xfd_get_timestamp(priv, ×tamp); + if (err) + return err; + +- err = regmap_read(priv->map_reg, MCP25XXFD_REG_BDIAG1, &bdiag1); ++ err = regmap_read(priv->map_reg, MCP251XFD_REG_BDIAG1, &bdiag1); + if (err) + return err; + + /* Write 0s to clear error bits, don't write 1s to non active + * bits, as they will be set. + */ +- err = regmap_write(priv->map_reg, MCP25XXFD_REG_BDIAG1, 0x0); ++ err = regmap_write(priv->map_reg, MCP251XFD_REG_BDIAG1, 0x0); + if (err) + return err; + +@@ -1621,29 +1621,29 @@ static int mcp25xxfd_handle_ivmif(struct mcp25xxfd_priv *priv) + cf->can_id |= CAN_ERR_PROT | CAN_ERR_BUSERROR; + + /* Controller misconfiguration */ +- if (WARN_ON(bdiag1 & MCP25XXFD_REG_BDIAG1_DLCMM)) ++ if (WARN_ON(bdiag1 & MCP251XFD_REG_BDIAG1_DLCMM)) + netdev_err(priv->ndev, + "recv'd DLC is larger than PLSIZE of FIFO element."); + + /* RX errors */ +- if (bdiag1 & (MCP25XXFD_REG_BDIAG1_DCRCERR | +- MCP25XXFD_REG_BDIAG1_NCRCERR)) { ++ if (bdiag1 & (MCP251XFD_REG_BDIAG1_DCRCERR | ++ MCP251XFD_REG_BDIAG1_NCRCERR)) { + netdev_dbg(priv->ndev, "CRC error\n"); + + stats->rx_errors++; + if (cf) + cf->data[3] |= CAN_ERR_PROT_LOC_CRC_SEQ; + } +- if (bdiag1 & (MCP25XXFD_REG_BDIAG1_DSTUFERR | +- MCP25XXFD_REG_BDIAG1_NSTUFERR)) { ++ if (bdiag1 & (MCP251XFD_REG_BDIAG1_DSTUFERR | ++ MCP251XFD_REG_BDIAG1_NSTUFERR)) { + netdev_dbg(priv->ndev, "Stuff error\n"); + + stats->rx_errors++; + if (cf) + cf->data[2] |= CAN_ERR_PROT_STUFF; + } +- if (bdiag1 & (MCP25XXFD_REG_BDIAG1_DFORMERR | +- MCP25XXFD_REG_BDIAG1_NFORMERR)) { ++ if (bdiag1 & (MCP251XFD_REG_BDIAG1_DFORMERR | ++ MCP251XFD_REG_BDIAG1_NFORMERR)) { + netdev_dbg(priv->ndev, "Format error\n"); + + stats->rx_errors++; +@@ -1652,7 +1652,7 @@ static int mcp25xxfd_handle_ivmif(struct mcp25xxfd_priv *priv) + } + + /* TX errors */ +- if (bdiag1 & MCP25XXFD_REG_BDIAG1_NACKERR) { ++ if (bdiag1 & MCP251XFD_REG_BDIAG1_NACKERR) { + netdev_dbg(priv->ndev, "NACK error\n"); + + stats->tx_errors++; +@@ -1661,16 +1661,16 @@ static int mcp25xxfd_handle_ivmif(struct mcp25xxfd_priv *priv) + cf->data[2] |= CAN_ERR_PROT_TX; + } + } +- if (bdiag1 & (MCP25XXFD_REG_BDIAG1_DBIT1ERR | +- MCP25XXFD_REG_BDIAG1_NBIT1ERR)) { ++ if (bdiag1 & (MCP251XFD_REG_BDIAG1_DBIT1ERR | ++ MCP251XFD_REG_BDIAG1_NBIT1ERR)) { + netdev_dbg(priv->ndev, "Bit1 error\n"); + + stats->tx_errors++; + if (cf) + cf->data[2] |= CAN_ERR_PROT_TX | CAN_ERR_PROT_BIT1; + } +- if (bdiag1 & (MCP25XXFD_REG_BDIAG1_DBIT0ERR | +- MCP25XXFD_REG_BDIAG1_NBIT0ERR)) { ++ if (bdiag1 & (MCP251XFD_REG_BDIAG1_DBIT0ERR | ++ MCP251XFD_REG_BDIAG1_NBIT0ERR)) { + netdev_dbg(priv->ndev, "Bit0 error\n"); + + stats->tx_errors++; +@@ -1688,7 +1688,7 @@ static int mcp25xxfd_handle_ivmif(struct mcp25xxfd_priv *priv) + return 0; + } + +-static int mcp25xxfd_handle_cerrif(struct mcp25xxfd_priv *priv) ++static int mcp251xfd_handle_cerrif(struct mcp251xfd_priv *priv) + { + struct net_device_stats *stats = &priv->ndev->stats; + struct sk_buff *skb; +@@ -1697,22 +1697,22 @@ static int mcp25xxfd_handle_cerrif(struct mcp25xxfd_priv *priv) + u32 trec, timestamp; + int err; + +- err = regmap_read(priv->map_reg, MCP25XXFD_REG_TREC, &trec); ++ err = regmap_read(priv->map_reg, MCP251XFD_REG_TREC, &trec); + if (err) + return err; + +- if (trec & MCP25XXFD_REG_TREC_TXBO) ++ if (trec & MCP251XFD_REG_TREC_TXBO) + tx_state = CAN_STATE_BUS_OFF; +- else if (trec & MCP25XXFD_REG_TREC_TXBP) ++ else if (trec & MCP251XFD_REG_TREC_TXBP) + tx_state = CAN_STATE_ERROR_PASSIVE; +- else if (trec & MCP25XXFD_REG_TREC_TXWARN) ++ else if (trec & MCP251XFD_REG_TREC_TXWARN) + tx_state = CAN_STATE_ERROR_WARNING; + else + tx_state = CAN_STATE_ERROR_ACTIVE; + +- if (trec & MCP25XXFD_REG_TREC_RXBP) ++ if (trec & MCP251XFD_REG_TREC_RXBP) + rx_state = CAN_STATE_ERROR_PASSIVE; +- else if (trec & MCP25XXFD_REG_TREC_RXWARN) ++ else if (trec & MCP251XFD_REG_TREC_RXWARN) + rx_state = CAN_STATE_ERROR_WARNING; + else + rx_state = CAN_STATE_ERROR_ACTIVE; +@@ -1724,7 +1724,7 @@ static int mcp25xxfd_handle_cerrif(struct mcp25xxfd_priv *priv) + /* The skb allocation might fail, but can_change_state() + * handles cf == NULL. + */ +- skb = mcp25xxfd_alloc_can_err_skb(priv, &cf, ×tamp); ++ skb = mcp251xfd_alloc_can_err_skb(priv, &cf, ×tamp); + can_change_state(priv->ndev, cf, tx_state, rx_state); + + if (new_state == CAN_STATE_BUS_OFF) { +@@ -1733,11 +1733,11 @@ static int mcp25xxfd_handle_cerrif(struct mcp25xxfd_priv *priv) + * userspace, if do_get_berr_counter() is called while + * the chip is in Bus Off. + */ +- err = __mcp25xxfd_get_berr_counter(priv->ndev, &priv->bec); ++ err = __mcp251xfd_get_berr_counter(priv->ndev, &priv->bec); + if (err) + return err; + +- mcp25xxfd_chip_stop(priv, CAN_STATE_BUS_OFF); ++ mcp251xfd_chip_stop(priv, CAN_STATE_BUS_OFF); + can_bus_off(priv->ndev); + } + +@@ -1747,7 +1747,7 @@ static int mcp25xxfd_handle_cerrif(struct mcp25xxfd_priv *priv) + if (new_state != CAN_STATE_BUS_OFF) { + struct can_berr_counter bec; + +- err = mcp25xxfd_get_berr_counter(priv->ndev, &bec); ++ err = mcp251xfd_get_berr_counter(priv->ndev, &bec); + if (err) + return err; + cf->data[6] = bec.txerr; +@@ -1762,20 +1762,20 @@ static int mcp25xxfd_handle_cerrif(struct mcp25xxfd_priv *priv) + } + + static int +-mcp25xxfd_handle_modif(const struct mcp25xxfd_priv *priv, bool *set_normal_mode) ++mcp251xfd_handle_modif(const struct mcp251xfd_priv *priv, bool *set_normal_mode) + { +- const u8 mode_reference = mcp25xxfd_get_normal_mode(priv); ++ const u8 mode_reference = mcp251xfd_get_normal_mode(priv); + u8 mode; + int err; + +- err = mcp25xxfd_chip_get_mode(priv, &mode); ++ err = mcp251xfd_chip_get_mode(priv, &mode); + if (err) + return err; + + if (mode == mode_reference) { + netdev_dbg(priv->ndev, + "Controller changed into %s Mode (%u).\n", +- mcp25xxfd_get_mode_str(mode), mode); ++ mcp251xfd_get_mode_str(mode), mode); + return 0; + } + +@@ -1789,16 +1789,16 @@ mcp25xxfd_handle_modif(const struct mcp25xxfd_priv *priv, bool *set_normal_mode) + * first. When polling this bit we see that it will transition + * to Restricted Operation Mode shortly after. + */ +- if ((priv->devtype_data.quirks & MCP25XXFD_QUIRK_MAB_NO_WARN) && +- (mode == MCP25XXFD_REG_CON_MODE_RESTRICTED || +- mode == MCP25XXFD_REG_CON_MODE_LISTENONLY)) ++ if ((priv->devtype_data.quirks & MCP251XFD_QUIRK_MAB_NO_WARN) && ++ (mode == MCP251XFD_REG_CON_MODE_RESTRICTED || ++ mode == MCP251XFD_REG_CON_MODE_LISTENONLY)) + netdev_dbg(priv->ndev, + "Controller changed into %s Mode (%u).\n", +- mcp25xxfd_get_mode_str(mode), mode); ++ mcp251xfd_get_mode_str(mode), mode); + else + netdev_err(priv->ndev, + "Controller changed into %s Mode (%u).\n", +- mcp25xxfd_get_mode_str(mode), mode); ++ mcp251xfd_get_mode_str(mode), mode); + + /* After the application requests Normal mode, the Controller + * will automatically attempt to retransmit the message that +@@ -1806,19 +1806,19 @@ mcp25xxfd_handle_modif(const struct mcp25xxfd_priv *priv, bool *set_normal_mode) + * + * However, if there is an ECC error in the TX-RAM, we first + * have to reload the tx-object before requesting Normal +- * mode. This is done later in mcp25xxfd_handle_eccif(). ++ * mode. This is done later in mcp251xfd_handle_eccif(). + */ +- if (priv->regs_status.intf & MCP25XXFD_REG_INT_ECCIF) { ++ if (priv->regs_status.intf & MCP251XFD_REG_INT_ECCIF) { + *set_normal_mode = true; + return 0; + } + +- return mcp25xxfd_chip_set_normal_mode_nowait(priv); ++ return mcp251xfd_chip_set_normal_mode_nowait(priv); + } + +-static int mcp25xxfd_handle_serrif(struct mcp25xxfd_priv *priv) ++static int mcp251xfd_handle_serrif(struct mcp251xfd_priv *priv) + { +- struct mcp25xxfd_ecc *ecc = &priv->ecc; ++ struct mcp251xfd_ecc *ecc = &priv->ecc; + struct net_device_stats *stats = &priv->ndev->stats; + bool handled = false; + +@@ -1844,19 +1844,19 @@ static int mcp25xxfd_handle_serrif(struct mcp25xxfd_priv *priv) + * + * Treat all as a known system errors.. + */ +- if ((priv->regs_status.intf & MCP25XXFD_REG_INT_MODIF && +- priv->regs_status.intf & MCP25XXFD_REG_INT_IVMIF) || +- priv->regs_status.intf & MCP25XXFD_REG_INT_ECCIF || ++ if ((priv->regs_status.intf & MCP251XFD_REG_INT_MODIF && ++ priv->regs_status.intf & MCP251XFD_REG_INT_IVMIF) || ++ priv->regs_status.intf & MCP251XFD_REG_INT_ECCIF || + ecc->cnt) { + const char *msg; + +- if (priv->regs_status.intf & MCP25XXFD_REG_INT_ECCIF || ++ if (priv->regs_status.intf & MCP251XFD_REG_INT_ECCIF || + ecc->cnt) + msg = "TX MAB underflow due to ECC error detected."; + else + msg = "TX MAB underflow detected."; + +- if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_MAB_NO_WARN) ++ if (priv->devtype_data.quirks & MCP251XFD_QUIRK_MAB_NO_WARN) + netdev_dbg(priv->ndev, "%s\n", msg); + else + netdev_info(priv->ndev, "%s\n", msg); +@@ -1880,8 +1880,8 @@ static int mcp25xxfd_handle_serrif(struct mcp25xxfd_priv *priv) + * + * Treat all as a known system errors.. + */ +- if (priv->regs_status.intf & MCP25XXFD_REG_INT_RXOVIF || +- priv->regs_status.intf & MCP25XXFD_REG_INT_RXIF) { ++ if (priv->regs_status.intf & MCP251XFD_REG_INT_RXOVIF || ++ priv->regs_status.intf & MCP251XFD_REG_INT_RXIF) { + stats->rx_dropped++; + handled = true; + } +@@ -1895,22 +1895,22 @@ static int mcp25xxfd_handle_serrif(struct mcp25xxfd_priv *priv) + } + + static int +-mcp25xxfd_handle_eccif_recover(struct mcp25xxfd_priv *priv, u8 nr) ++mcp251xfd_handle_eccif_recover(struct mcp251xfd_priv *priv, u8 nr) + { +- struct mcp25xxfd_tx_ring *tx_ring = priv->tx; +- struct mcp25xxfd_ecc *ecc = &priv->ecc; +- struct mcp25xxfd_tx_obj *tx_obj; ++ struct mcp251xfd_tx_ring *tx_ring = priv->tx; ++ struct mcp251xfd_ecc *ecc = &priv->ecc; ++ struct mcp251xfd_tx_obj *tx_obj; + u8 chip_tx_tail, tx_tail, offset; + u16 addr; + int err; + +- addr = FIELD_GET(MCP25XXFD_REG_ECCSTAT_ERRADDR_MASK, ecc->ecc_stat); ++ addr = FIELD_GET(MCP251XFD_REG_ECCSTAT_ERRADDR_MASK, ecc->ecc_stat); + +- err = mcp25xxfd_tx_tail_get_from_chip(priv, &chip_tx_tail); ++ err = mcp251xfd_tx_tail_get_from_chip(priv, &chip_tx_tail); + if (err) + return err; + +- tx_tail = mcp25xxfd_get_tx_tail(tx_ring); ++ tx_tail = mcp251xfd_get_tx_tail(tx_ring); + offset = (nr - chip_tx_tail) & (tx_ring->obj_num - 1); + + /* Bail out if one of the following is met: +@@ -1919,7 +1919,7 @@ mcp25xxfd_handle_eccif_recover(struct mcp25xxfd_priv *priv, u8 nr) + * - for mcp2518fd: offset not 0 or 1 + */ + if (chip_tx_tail != tx_tail || +- !(offset == 0 || (offset == 1 && mcp25xxfd_is_2518(priv)))) { ++ !(offset == 0 || (offset == 1 && mcp251xfd_is_2518(priv)))) { + netdev_err(priv->ndev, + "ECC Error information inconsistent (addr=0x%04x, nr=%d, tx_tail=0x%08x(%d), chip_tx_tail=%d, offset=%d).\n", + addr, nr, tx_ring->tail, tx_tail, chip_tx_tail, +@@ -1929,7 +1929,7 @@ mcp25xxfd_handle_eccif_recover(struct mcp25xxfd_priv *priv, u8 nr) + + netdev_info(priv->ndev, + "Recovering %s ECC Error at address 0x%04x (in TX-RAM, tx_obj=%d, tx_tail=0x%08x(%d), offset=%d).\n", +- ecc->ecc_stat & MCP25XXFD_REG_ECCSTAT_SECIF ? ++ ecc->ecc_stat & MCP251XFD_REG_ECCSTAT_SECIF ? + "Single" : "Double", + addr, nr, tx_ring->tail, tx_tail, offset); + +@@ -1940,13 +1940,13 @@ mcp25xxfd_handle_eccif_recover(struct mcp25xxfd_priv *priv, u8 nr) + return err; + + /* ... and trigger retransmit */ +- return mcp25xxfd_chip_set_normal_mode(priv); ++ return mcp251xfd_chip_set_normal_mode(priv); + } + + static int +-mcp25xxfd_handle_eccif(struct mcp25xxfd_priv *priv, bool set_normal_mode) ++mcp251xfd_handle_eccif(struct mcp251xfd_priv *priv, bool set_normal_mode) + { +- struct mcp25xxfd_ecc *ecc = &priv->ecc; ++ struct mcp251xfd_ecc *ecc = &priv->ecc; + const char *msg; + bool in_tx_ram; + u32 ecc_stat; +@@ -1954,18 +1954,18 @@ mcp25xxfd_handle_eccif(struct mcp25xxfd_priv *priv, bool set_normal_mode) + u8 nr; + int err; + +- err = regmap_read(priv->map_reg, MCP25XXFD_REG_ECCSTAT, &ecc_stat); ++ err = regmap_read(priv->map_reg, MCP251XFD_REG_ECCSTAT, &ecc_stat); + if (err) + return err; + +- err = regmap_update_bits(priv->map_reg, MCP25XXFD_REG_ECCSTAT, +- MCP25XXFD_REG_ECCSTAT_IF_MASK, ~ecc_stat); ++ err = regmap_update_bits(priv->map_reg, MCP251XFD_REG_ECCSTAT, ++ MCP251XFD_REG_ECCSTAT_IF_MASK, ~ecc_stat); + if (err) + return err; + + /* Check if ECC error occurred in TX-RAM */ +- addr = FIELD_GET(MCP25XXFD_REG_ECCSTAT_ERRADDR_MASK, ecc_stat); +- err = mcp25xxfd_get_tx_nr_by_addr(priv->tx, &nr, addr); ++ addr = FIELD_GET(MCP251XFD_REG_ECCSTAT_ERRADDR_MASK, ecc_stat); ++ err = mcp251xfd_get_tx_nr_by_addr(priv->tx, &nr, addr); + if (!err) + in_tx_ram = true; + else if (err == -ENOENT) +@@ -1985,9 +1985,9 @@ mcp25xxfd_handle_eccif(struct mcp25xxfd_priv *priv, bool set_normal_mode) + * correction. Instead, handle both interrupts as a + * notification that the RAM word at ERRADDR was corrupted. + */ +- if (ecc_stat & MCP25XXFD_REG_ECCSTAT_SECIF) ++ if (ecc_stat & MCP251XFD_REG_ECCSTAT_SECIF) + msg = "Single ECC Error detected at address"; +- else if (ecc_stat & MCP25XXFD_REG_ECCSTAT_DEDIF) ++ else if (ecc_stat & MCP251XFD_REG_ECCSTAT_DEDIF) + msg = "Double ECC Error detected at address"; + else + return -EINVAL; +@@ -2009,57 +2009,57 @@ mcp25xxfd_handle_eccif(struct mcp25xxfd_priv *priv, bool set_normal_mode) + "%s 0x%04x (in TX-RAM, tx_obj=%d), occurred %d time%s.\n", + msg, addr, nr, ecc->cnt, ecc->cnt > 1 ? "s" : ""); + +- if (ecc->cnt >= MCP25XXFD_ECC_CNT_MAX) +- return mcp25xxfd_handle_eccif_recover(priv, nr); ++ if (ecc->cnt >= MCP251XFD_ECC_CNT_MAX) ++ return mcp251xfd_handle_eccif_recover(priv, nr); + } + + if (set_normal_mode) +- return mcp25xxfd_chip_set_normal_mode_nowait(priv); ++ return mcp251xfd_chip_set_normal_mode_nowait(priv); + + return 0; + } + +-static int mcp25xxfd_handle_spicrcif(struct mcp25xxfd_priv *priv) ++static int mcp251xfd_handle_spicrcif(struct mcp251xfd_priv *priv) + { + int err; + u32 crc; + +- err = regmap_read(priv->map_reg, MCP25XXFD_REG_CRC, &crc); ++ err = regmap_read(priv->map_reg, MCP251XFD_REG_CRC, &crc); + if (err) + return err; + +- err = regmap_update_bits(priv->map_reg, MCP25XXFD_REG_CRC, +- MCP25XXFD_REG_CRC_IF_MASK, ++ err = regmap_update_bits(priv->map_reg, MCP251XFD_REG_CRC, ++ MCP251XFD_REG_CRC_IF_MASK, + ~crc); + if (err) + return err; + +- if (crc & MCP25XXFD_REG_CRC_FERRIF) ++ if (crc & MCP251XFD_REG_CRC_FERRIF) + netdev_notice(priv->ndev, "CRC write command format error.\n"); +- else if (crc & MCP25XXFD_REG_CRC_CRCERRIF) ++ else if (crc & MCP251XFD_REG_CRC_CRCERRIF) + netdev_notice(priv->ndev, + "CRC write error detected. CRC=0x%04lx.\n", +- FIELD_GET(MCP25XXFD_REG_CRC_MASK, crc)); ++ FIELD_GET(MCP251XFD_REG_CRC_MASK, crc)); + + return 0; + } + +-#define mcp25xxfd_handle(priv, irq, ...) \ ++#define mcp251xfd_handle(priv, irq, ...) \ + ({ \ +- struct mcp25xxfd_priv *_priv = (priv); \ ++ struct mcp251xfd_priv *_priv = (priv); \ + int err; \ + \ +- err = mcp25xxfd_handle_##irq(_priv, ## __VA_ARGS__); \ ++ err = mcp251xfd_handle_##irq(_priv, ## __VA_ARGS__); \ + if (err) \ + netdev_err(_priv->ndev, \ +- "IRQ handler mcp25xxfd_handle_%s() returned %d.\n", \ ++ "IRQ handler mcp251xfd_handle_%s() returned %d.\n", \ + __stringify(irq), err); \ + err; \ + }) + +-static irqreturn_t mcp25xxfd_irq(int irq, void *dev_id) ++static irqreturn_t mcp251xfd_irq(int irq, void *dev_id) + { +- struct mcp25xxfd_priv *priv = dev_id; ++ struct mcp251xfd_priv *priv = dev_id; + irqreturn_t handled = IRQ_NONE; + int err; + +@@ -2071,7 +2071,7 @@ static irqreturn_t mcp25xxfd_irq(int irq, void *dev_id) + if (!rx_pending) + break; + +- err = mcp25xxfd_handle(priv, rxif); ++ err = mcp251xfd_handle(priv, rxif); + if (err) + goto out_fail; + +@@ -2082,90 +2082,90 @@ static irqreturn_t mcp25xxfd_irq(int irq, void *dev_id) + u32 intf_pending, intf_pending_clearable; + bool set_normal_mode = false; + +- err = regmap_bulk_read(priv->map_reg, MCP25XXFD_REG_INT, ++ err = regmap_bulk_read(priv->map_reg, MCP251XFD_REG_INT, + &priv->regs_status, + sizeof(priv->regs_status) / + sizeof(u32)); + if (err) + goto out_fail; + +- intf_pending = FIELD_GET(MCP25XXFD_REG_INT_IF_MASK, ++ intf_pending = FIELD_GET(MCP251XFD_REG_INT_IF_MASK, + priv->regs_status.intf) & +- FIELD_GET(MCP25XXFD_REG_INT_IE_MASK, ++ FIELD_GET(MCP251XFD_REG_INT_IE_MASK, + priv->regs_status.intf); + + if (!(intf_pending)) + return handled; + + /* Some interrupts must be ACKed in the +- * MCP25XXFD_REG_INT register. ++ * MCP251XFD_REG_INT register. + * - First ACK then handle, to avoid lost-IRQ race + * condition on fast re-occurring interrupts. + * - Write "0" to clear active IRQs, "1" to all other, + * to avoid r/m/w race condition on the +- * MCP25XXFD_REG_INT register. ++ * MCP251XFD_REG_INT register. + */ + intf_pending_clearable = intf_pending & +- MCP25XXFD_REG_INT_IF_CLEARABLE_MASK; ++ MCP251XFD_REG_INT_IF_CLEARABLE_MASK; + if (intf_pending_clearable) { + err = regmap_update_bits(priv->map_reg, +- MCP25XXFD_REG_INT, +- MCP25XXFD_REG_INT_IF_MASK, ++ MCP251XFD_REG_INT, ++ MCP251XFD_REG_INT_IF_MASK, + ~intf_pending_clearable); + if (err) + goto out_fail; + } + +- if (intf_pending & MCP25XXFD_REG_INT_MODIF) { +- err = mcp25xxfd_handle(priv, modif, &set_normal_mode); ++ if (intf_pending & MCP251XFD_REG_INT_MODIF) { ++ err = mcp251xfd_handle(priv, modif, &set_normal_mode); + if (err) + goto out_fail; + } + +- if (intf_pending & MCP25XXFD_REG_INT_RXIF) { +- err = mcp25xxfd_handle(priv, rxif); ++ if (intf_pending & MCP251XFD_REG_INT_RXIF) { ++ err = mcp251xfd_handle(priv, rxif); + if (err) + goto out_fail; + } + +- if (intf_pending & MCP25XXFD_REG_INT_TEFIF) { +- err = mcp25xxfd_handle(priv, tefif); ++ if (intf_pending & MCP251XFD_REG_INT_TEFIF) { ++ err = mcp251xfd_handle(priv, tefif); + if (err) + goto out_fail; + } + +- if (intf_pending & MCP25XXFD_REG_INT_RXOVIF) { +- err = mcp25xxfd_handle(priv, rxovif); ++ if (intf_pending & MCP251XFD_REG_INT_RXOVIF) { ++ err = mcp251xfd_handle(priv, rxovif); + if (err) + goto out_fail; + } + +- if (intf_pending & MCP25XXFD_REG_INT_TXATIF) { +- err = mcp25xxfd_handle(priv, txatif); ++ if (intf_pending & MCP251XFD_REG_INT_TXATIF) { ++ err = mcp251xfd_handle(priv, txatif); + if (err) + goto out_fail; + } + +- if (intf_pending & MCP25XXFD_REG_INT_IVMIF) { +- err = mcp25xxfd_handle(priv, ivmif); ++ if (intf_pending & MCP251XFD_REG_INT_IVMIF) { ++ err = mcp251xfd_handle(priv, ivmif); + if (err) + goto out_fail; + } + +- if (intf_pending & MCP25XXFD_REG_INT_SERRIF) { +- err = mcp25xxfd_handle(priv, serrif); ++ if (intf_pending & MCP251XFD_REG_INT_SERRIF) { ++ err = mcp251xfd_handle(priv, serrif); + if (err) + goto out_fail; + } + +- if (intf_pending & MCP25XXFD_REG_INT_ECCIF) { +- err = mcp25xxfd_handle(priv, eccif, set_normal_mode); ++ if (intf_pending & MCP251XFD_REG_INT_ECCIF) { ++ err = mcp251xfd_handle(priv, eccif, set_normal_mode); + if (err) + goto out_fail; + } + +- if (intf_pending & MCP25XXFD_REG_INT_SPICRCIF) { +- err = mcp25xxfd_handle(priv, spicrcif); ++ if (intf_pending & MCP251XFD_REG_INT_SPICRCIF) { ++ err = mcp251xfd_handle(priv, spicrcif); + if (err) + goto out_fail; + } +@@ -2174,16 +2174,16 @@ static irqreturn_t mcp25xxfd_irq(int irq, void *dev_id) + * CERRIF IRQ on the transition TX ERROR_WARNING -> TX + * ERROR_ACTIVE. + */ +- if (intf_pending & MCP25XXFD_REG_INT_CERRIF || ++ if (intf_pending & MCP251XFD_REG_INT_CERRIF || + priv->can.state > CAN_STATE_ERROR_ACTIVE) { +- err = mcp25xxfd_handle(priv, cerrif); ++ err = mcp251xfd_handle(priv, cerrif); + if (err) + goto out_fail; + + /* In Bus Off we completely shut down the + * controller. Every subsequent register read + * will read bogus data, and if +- * MCP25XXFD_QUIRK_CRC_REG is enabled the CRC ++ * MCP251XFD_QUIRK_CRC_REG is enabled the CRC + * check will fail, too. So leave IRQ handler + * directly. + */ +@@ -2197,30 +2197,30 @@ static irqreturn_t mcp25xxfd_irq(int irq, void *dev_id) + out_fail: + netdev_err(priv->ndev, "IRQ handler returned %d (intf=0x%08x).\n", + err, priv->regs_status.intf); +- mcp25xxfd_chip_interrupts_disable(priv); ++ mcp251xfd_chip_interrupts_disable(priv); + + return handled; + } + + static inline struct +-mcp25xxfd_tx_obj *mcp25xxfd_get_tx_obj_next(struct mcp25xxfd_tx_ring *tx_ring) ++mcp251xfd_tx_obj *mcp251xfd_get_tx_obj_next(struct mcp251xfd_tx_ring *tx_ring) + { + u8 tx_head; + +- tx_head = mcp25xxfd_get_tx_head(tx_ring); ++ tx_head = mcp251xfd_get_tx_head(tx_ring); + + return &tx_ring->obj[tx_head]; + } + + static void +-mcp25xxfd_tx_obj_from_skb(const struct mcp25xxfd_priv *priv, +- struct mcp25xxfd_tx_obj *tx_obj, ++mcp251xfd_tx_obj_from_skb(const struct mcp251xfd_priv *priv, ++ struct mcp251xfd_tx_obj *tx_obj, + const struct sk_buff *skb, + unsigned int seq) + { + const struct canfd_frame *cfd = (struct canfd_frame *)skb->data; +- struct mcp25xxfd_hw_tx_obj_raw *hw_tx_obj; +- union mcp25xxfd_tx_obj_load_buf *load_buf; ++ struct mcp251xfd_hw_tx_obj_raw *hw_tx_obj; ++ union mcp251xfd_tx_obj_load_buf *load_buf; + u8 dlc; + u32 id, flags; + int offset, len; +@@ -2228,15 +2228,15 @@ mcp25xxfd_tx_obj_from_skb(const struct mcp25xxfd_priv *priv, + if (cfd->can_id & CAN_EFF_FLAG) { + u32 sid, eid; + +- sid = FIELD_GET(MCP25XXFD_REG_FRAME_EFF_SID_MASK, cfd->can_id); +- eid = FIELD_GET(MCP25XXFD_REG_FRAME_EFF_EID_MASK, cfd->can_id); ++ sid = FIELD_GET(MCP251XFD_REG_FRAME_EFF_SID_MASK, cfd->can_id); ++ eid = FIELD_GET(MCP251XFD_REG_FRAME_EFF_EID_MASK, cfd->can_id); + +- id = FIELD_PREP(MCP25XXFD_OBJ_ID_EID_MASK, eid) | +- FIELD_PREP(MCP25XXFD_OBJ_ID_SID_MASK, sid); ++ id = FIELD_PREP(MCP251XFD_OBJ_ID_EID_MASK, eid) | ++ FIELD_PREP(MCP251XFD_OBJ_ID_SID_MASK, sid); + +- flags = MCP25XXFD_OBJ_FLAGS_IDE; ++ flags = MCP251XFD_OBJ_FLAGS_IDE; + } else { +- id = FIELD_PREP(MCP25XXFD_OBJ_ID_SID_MASK, cfd->can_id); ++ id = FIELD_PREP(MCP251XFD_OBJ_ID_SID_MASK, cfd->can_id); + flags = 0; + } + +@@ -2245,25 +2245,25 @@ mcp25xxfd_tx_obj_from_skb(const struct mcp25xxfd_priv *priv, + * TEF object. + */ + dlc = can_len2dlc(cfd->len); +- flags |= FIELD_PREP(MCP25XXFD_OBJ_FLAGS_SEQ_MCP2518FD_MASK, seq) | +- FIELD_PREP(MCP25XXFD_OBJ_FLAGS_DLC, dlc); ++ flags |= FIELD_PREP(MCP251XFD_OBJ_FLAGS_SEQ_MCP2518FD_MASK, seq) | ++ FIELD_PREP(MCP251XFD_OBJ_FLAGS_DLC, dlc); + + if (cfd->can_id & CAN_RTR_FLAG) +- flags |= MCP25XXFD_OBJ_FLAGS_RTR; ++ flags |= MCP251XFD_OBJ_FLAGS_RTR; + + /* CANFD */ + if (can_is_canfd_skb(skb)) { + if (cfd->flags & CANFD_ESI) +- flags |= MCP25XXFD_OBJ_FLAGS_ESI; ++ flags |= MCP251XFD_OBJ_FLAGS_ESI; + +- flags |= MCP25XXFD_OBJ_FLAGS_FDF; ++ flags |= MCP251XFD_OBJ_FLAGS_FDF; + + if (cfd->flags & CANFD_BRS) +- flags |= MCP25XXFD_OBJ_FLAGS_BRS; ++ flags |= MCP251XFD_OBJ_FLAGS_BRS; + } + + load_buf = &tx_obj->buf; +- if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_TX) ++ if (priv->devtype_data.quirks & MCP251XFD_QUIRK_CRC_TX) + hw_tx_obj = &load_buf->crc.hw_tx_obj; + else + hw_tx_obj = &load_buf->nocrc.hw_tx_obj; +@@ -2274,25 +2274,25 @@ mcp25xxfd_tx_obj_from_skb(const struct mcp25xxfd_priv *priv, + /* Clear data at end of CAN frame */ + offset = round_down(cfd->len, sizeof(u32)); + len = round_up(can_dlc2len(dlc), sizeof(u32)) - offset; +- if (MCP25XXFD_SANITIZE_CAN && len) ++ if (MCP251XFD_SANITIZE_CAN && len) + memset(hw_tx_obj->data + offset, 0x0, len); + memcpy(hw_tx_obj->data, cfd->data, cfd->len); + + /* Number of bytes to be written into the RAM of the controller */ + len = sizeof(hw_tx_obj->id) + sizeof(hw_tx_obj->flags); +- if (MCP25XXFD_SANITIZE_CAN) ++ if (MCP251XFD_SANITIZE_CAN) + len += round_up(can_dlc2len(dlc), sizeof(u32)); + else + len += round_up(cfd->len, sizeof(u32)); + +- if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_TX) { ++ if (priv->devtype_data.quirks & MCP251XFD_QUIRK_CRC_TX) { + u16 crc; + +- mcp25xxfd_spi_cmd_crc_set_len_in_ram(&load_buf->crc.cmd, ++ mcp251xfd_spi_cmd_crc_set_len_in_ram(&load_buf->crc.cmd, + len); + /* CRC */ + len += sizeof(load_buf->crc.cmd); +- crc = mcp25xxfd_crc16_compute(&load_buf->crc, len); ++ crc = mcp251xfd_crc16_compute(&load_buf->crc, len); + put_unaligned_be16(crc, (void *)load_buf + len); + + /* Total length */ +@@ -2304,16 +2304,16 @@ mcp25xxfd_tx_obj_from_skb(const struct mcp25xxfd_priv *priv, + tx_obj->xfer[0].len = len; + } + +-static int mcp25xxfd_tx_obj_write(const struct mcp25xxfd_priv *priv, +- struct mcp25xxfd_tx_obj *tx_obj) ++static int mcp251xfd_tx_obj_write(const struct mcp251xfd_priv *priv, ++ struct mcp251xfd_tx_obj *tx_obj) + { + return spi_async(priv->spi, &tx_obj->msg); + } + +-static bool mcp25xxfd_tx_busy(const struct mcp25xxfd_priv *priv, +- struct mcp25xxfd_tx_ring *tx_ring) ++static bool mcp251xfd_tx_busy(const struct mcp251xfd_priv *priv, ++ struct mcp251xfd_tx_ring *tx_ring) + { +- if (mcp25xxfd_get_tx_free(tx_ring) > 0) ++ if (mcp251xfd_get_tx_free(tx_ring) > 0) + return false; + + netif_stop_queue(priv->ndev); +@@ -2321,7 +2321,7 @@ static bool mcp25xxfd_tx_busy(const struct mcp25xxfd_priv *priv, + /* Memory barrier before checking tx_free (head and tail) */ + smp_mb(); + +- if (mcp25xxfd_get_tx_free(tx_ring) == 0) { ++ if (mcp251xfd_get_tx_free(tx_ring) == 0) { + netdev_dbg(priv->ndev, + "Stopping tx-queue (tx_head=0x%08x, tx_tail=0x%08x, len=%d).\n", + tx_ring->head, tx_ring->tail, +@@ -2335,33 +2335,33 @@ static bool mcp25xxfd_tx_busy(const struct mcp25xxfd_priv *priv, + return false; + } + +-static netdev_tx_t mcp25xxfd_start_xmit(struct sk_buff *skb, ++static netdev_tx_t mcp251xfd_start_xmit(struct sk_buff *skb, + struct net_device *ndev) + { +- struct mcp25xxfd_priv *priv = netdev_priv(ndev); +- struct mcp25xxfd_tx_ring *tx_ring = priv->tx; +- struct mcp25xxfd_tx_obj *tx_obj; ++ struct mcp251xfd_priv *priv = netdev_priv(ndev); ++ struct mcp251xfd_tx_ring *tx_ring = priv->tx; ++ struct mcp251xfd_tx_obj *tx_obj; + u8 tx_head; + int err; + + if (can_dropped_invalid_skb(ndev, skb)) + return NETDEV_TX_OK; + +- if (mcp25xxfd_tx_busy(priv, tx_ring)) ++ if (mcp251xfd_tx_busy(priv, tx_ring)) + return NETDEV_TX_BUSY; + +- tx_obj = mcp25xxfd_get_tx_obj_next(tx_ring); +- mcp25xxfd_tx_obj_from_skb(priv, tx_obj, skb, tx_ring->head); ++ tx_obj = mcp251xfd_get_tx_obj_next(tx_ring); ++ mcp251xfd_tx_obj_from_skb(priv, tx_obj, skb, tx_ring->head); + + /* Stop queue if we occupy the complete TX FIFO */ +- tx_head = mcp25xxfd_get_tx_head(tx_ring); ++ tx_head = mcp251xfd_get_tx_head(tx_ring); + tx_ring->head++; + if (tx_ring->head - tx_ring->tail >= tx_ring->obj_num) + netif_stop_queue(ndev); + + can_put_echo_skb(skb, ndev, tx_head); + +- err = mcp25xxfd_tx_obj_write(priv, tx_obj); ++ err = mcp251xfd_tx_obj_write(priv, tx_obj); + if (err) + goto out_err; + +@@ -2373,9 +2373,9 @@ static netdev_tx_t mcp25xxfd_start_xmit(struct sk_buff *skb, + return NETDEV_TX_OK; + } + +-static int mcp25xxfd_open(struct net_device *ndev) ++static int mcp251xfd_open(struct net_device *ndev) + { +- struct mcp25xxfd_priv *priv = netdev_priv(ndev); ++ struct mcp251xfd_priv *priv = netdev_priv(ndev); + const struct spi_device *spi = priv->spi; + int err; + +@@ -2389,27 +2389,27 @@ static int mcp25xxfd_open(struct net_device *ndev) + if (err) + goto out_pm_runtime_put; + +- err = mcp25xxfd_ring_alloc(priv); ++ err = mcp251xfd_ring_alloc(priv); + if (err) + goto out_close_candev; + +- err = mcp25xxfd_transceiver_enable(priv); ++ err = mcp251xfd_transceiver_enable(priv); + if (err) +- goto out_mcp25xxfd_ring_free; ++ goto out_mcp251xfd_ring_free; + +- err = mcp25xxfd_chip_start(priv); ++ err = mcp251xfd_chip_start(priv); + if (err) + goto out_transceiver_disable; + + can_rx_offload_enable(&priv->offload); + +- err = request_threaded_irq(spi->irq, NULL, mcp25xxfd_irq, ++ err = request_threaded_irq(spi->irq, NULL, mcp251xfd_irq, + IRQF_ONESHOT, dev_name(&spi->dev), + priv); + if (err) + goto out_can_rx_offload_disable; + +- err = mcp25xxfd_chip_interrupts_enable(priv); ++ err = mcp251xfd_chip_interrupts_enable(priv); + if (err) + goto out_free_irq; + +@@ -2422,29 +2422,29 @@ static int mcp25xxfd_open(struct net_device *ndev) + out_can_rx_offload_disable: + can_rx_offload_disable(&priv->offload); + out_transceiver_disable: +- mcp25xxfd_transceiver_disable(priv); +- out_mcp25xxfd_ring_free: +- mcp25xxfd_ring_free(priv); ++ mcp251xfd_transceiver_disable(priv); ++ out_mcp251xfd_ring_free: ++ mcp251xfd_ring_free(priv); + out_close_candev: + close_candev(ndev); + out_pm_runtime_put: +- mcp25xxfd_chip_stop(priv, CAN_STATE_STOPPED); ++ mcp251xfd_chip_stop(priv, CAN_STATE_STOPPED); + pm_runtime_put(ndev->dev.parent); + + return err; + } + +-static int mcp25xxfd_stop(struct net_device *ndev) ++static int mcp251xfd_stop(struct net_device *ndev) + { +- struct mcp25xxfd_priv *priv = netdev_priv(ndev); ++ struct mcp251xfd_priv *priv = netdev_priv(ndev); + + netif_stop_queue(ndev); +- mcp25xxfd_chip_interrupts_disable(priv); ++ mcp251xfd_chip_interrupts_disable(priv); + free_irq(ndev->irq, priv); + can_rx_offload_disable(&priv->offload); +- mcp25xxfd_chip_stop(priv, CAN_STATE_STOPPED); +- mcp25xxfd_transceiver_disable(priv); +- mcp25xxfd_ring_free(priv); ++ mcp251xfd_chip_stop(priv, CAN_STATE_STOPPED); ++ mcp251xfd_transceiver_disable(priv); ++ mcp251xfd_ring_free(priv); + close_candev(ndev); + + pm_runtime_put(ndev->dev.parent); +@@ -2452,72 +2452,72 @@ static int mcp25xxfd_stop(struct net_device *ndev) + return 0; + } + +-static const struct net_device_ops mcp25xxfd_netdev_ops = { +- .ndo_open = mcp25xxfd_open, +- .ndo_stop = mcp25xxfd_stop, +- .ndo_start_xmit = mcp25xxfd_start_xmit, ++static const struct net_device_ops mcp251xfd_netdev_ops = { ++ .ndo_open = mcp251xfd_open, ++ .ndo_stop = mcp251xfd_stop, ++ .ndo_start_xmit = mcp251xfd_start_xmit, + .ndo_change_mtu = can_change_mtu, + }; + + static void +-mcp25xxfd_register_quirks(struct mcp25xxfd_priv *priv) ++mcp251xfd_register_quirks(struct mcp251xfd_priv *priv) + { + const struct spi_device *spi = priv->spi; + const struct spi_controller *ctlr = spi->controller; + + if (ctlr->flags & SPI_CONTROLLER_HALF_DUPLEX) +- priv->devtype_data.quirks |= MCP25XXFD_QUIRK_HALF_DUPLEX; ++ priv->devtype_data.quirks |= MCP251XFD_QUIRK_HALF_DUPLEX; + } + +-static int mcp25xxfd_register_chip_detect(struct mcp25xxfd_priv *priv) ++static int mcp251xfd_register_chip_detect(struct mcp251xfd_priv *priv) + { + const struct net_device *ndev = priv->ndev; +- const struct mcp25xxfd_devtype_data *devtype_data; ++ const struct mcp251xfd_devtype_data *devtype_data; + u32 osc; + int err; + + /* The OSC_LPMEN is only supported on MCP2518FD, so use it to + * autodetect the model. + */ +- err = regmap_update_bits(priv->map_reg, MCP25XXFD_REG_OSC, +- MCP25XXFD_REG_OSC_LPMEN, +- MCP25XXFD_REG_OSC_LPMEN); ++ err = regmap_update_bits(priv->map_reg, MCP251XFD_REG_OSC, ++ MCP251XFD_REG_OSC_LPMEN, ++ MCP251XFD_REG_OSC_LPMEN); + if (err) + return err; + +- err = regmap_read(priv->map_reg, MCP25XXFD_REG_OSC, &osc); ++ err = regmap_read(priv->map_reg, MCP251XFD_REG_OSC, &osc); + if (err) + return err; + +- if (osc & MCP25XXFD_REG_OSC_LPMEN) +- devtype_data = &mcp25xxfd_devtype_data_mcp2518fd; ++ if (osc & MCP251XFD_REG_OSC_LPMEN) ++ devtype_data = &mcp251xfd_devtype_data_mcp2518fd; + else +- devtype_data = &mcp25xxfd_devtype_data_mcp2517fd; ++ devtype_data = &mcp251xfd_devtype_data_mcp2517fd; + +- if (!mcp25xxfd_is_251X(priv) && ++ if (!mcp251xfd_is_251X(priv) && + priv->devtype_data.model != devtype_data->model) { + netdev_info(ndev, + "Detected %s, but firmware specifies a %s. Fixing up.", +- __mcp25xxfd_get_model_str(devtype_data->model), +- mcp25xxfd_get_model_str(priv)); ++ __mcp251xfd_get_model_str(devtype_data->model), ++ mcp251xfd_get_model_str(priv)); + } + priv->devtype_data = *devtype_data; + + /* We need to preserve the Half Duplex Quirk. */ +- mcp25xxfd_register_quirks(priv); ++ mcp251xfd_register_quirks(priv); + + /* Re-init regmap with quirks of detected model. */ +- return mcp25xxfd_regmap_init(priv); ++ return mcp251xfd_regmap_init(priv); + } + +-static int mcp25xxfd_register_check_rx_int(struct mcp25xxfd_priv *priv) ++static int mcp251xfd_register_check_rx_int(struct mcp251xfd_priv *priv) + { + int err, rx_pending; + + if (!priv->rx_int) + return 0; + +- err = mcp25xxfd_chip_rx_int_enable(priv); ++ err = mcp251xfd_chip_rx_int_enable(priv); + if (err) + return err; + +@@ -2526,7 +2526,7 @@ static int mcp25xxfd_register_check_rx_int(struct mcp25xxfd_priv *priv) + */ + rx_pending = gpiod_get_value_cansleep(priv->rx_int); + +- err = mcp25xxfd_chip_rx_int_disable(priv); ++ err = mcp251xfd_chip_rx_int_disable(priv); + if (err) + return err; + +@@ -2542,11 +2542,11 @@ static int mcp25xxfd_register_check_rx_int(struct mcp25xxfd_priv *priv) + } + + static int +-mcp25xxfd_register_get_dev_id(const struct mcp25xxfd_priv *priv, ++mcp251xfd_register_get_dev_id(const struct mcp251xfd_priv *priv, + u32 *dev_id, u32 *effective_speed_hz) + { +- struct mcp25xxfd_map_buf_nocrc *buf_rx; +- struct mcp25xxfd_map_buf_nocrc *buf_tx; ++ struct mcp251xfd_map_buf_nocrc *buf_rx; ++ struct mcp251xfd_map_buf_nocrc *buf_tx; + struct spi_transfer xfer[2] = { }; + int err; + +@@ -2565,7 +2565,7 @@ mcp25xxfd_register_get_dev_id(const struct mcp25xxfd_priv *priv, + xfer[1].rx_buf = buf_rx->data; + xfer[1].len = sizeof(dev_id); + +- mcp25xxfd_spi_cmd_read_nocrc(&buf_tx->cmd, MCP25XXFD_REG_DEVID); ++ mcp251xfd_spi_cmd_read_nocrc(&buf_tx->cmd, MCP251XFD_REG_DEVID); + err = spi_sync_transfer(priv->spi, xfer, ARRAY_SIZE(xfer)); + if (err) + goto out_kfree_buf_tx; +@@ -2581,32 +2581,32 @@ mcp25xxfd_register_get_dev_id(const struct mcp25xxfd_priv *priv, + return 0; + } + +-#define MCP25XXFD_QUIRK_ACTIVE(quirk) \ +- (priv->devtype_data.quirks & MCP25XXFD_QUIRK_##quirk ? '+' : '-') ++#define MCP251XFD_QUIRK_ACTIVE(quirk) \ ++ (priv->devtype_data.quirks & MCP251XFD_QUIRK_##quirk ? '+' : '-') + + static int +-mcp25xxfd_register_done(const struct mcp25xxfd_priv *priv) ++mcp251xfd_register_done(const struct mcp251xfd_priv *priv) + { + u32 dev_id, effective_speed_hz; + int err; + +- err = mcp25xxfd_register_get_dev_id(priv, &dev_id, ++ err = mcp251xfd_register_get_dev_id(priv, &dev_id, + &effective_speed_hz); + if (err) + return err; + + netdev_info(priv->ndev, + "%s rev%lu.%lu (%cRX_INT %cMAB_NO_WARN %cCRC_REG %cCRC_RX %cCRC_TX %cECC %cHD c:%u.%02uMHz m:%u.%02uMHz r:%u.%02uMHz e:%u.%02uMHz) successfully initialized.\n", +- mcp25xxfd_get_model_str(priv), +- FIELD_GET(MCP25XXFD_REG_DEVID_ID_MASK, dev_id), +- FIELD_GET(MCP25XXFD_REG_DEVID_REV_MASK, dev_id), ++ mcp251xfd_get_model_str(priv), ++ FIELD_GET(MCP251XFD_REG_DEVID_ID_MASK, dev_id), ++ FIELD_GET(MCP251XFD_REG_DEVID_REV_MASK, dev_id), + priv->rx_int ? '+' : '-', +- MCP25XXFD_QUIRK_ACTIVE(MAB_NO_WARN), +- MCP25XXFD_QUIRK_ACTIVE(CRC_REG), +- MCP25XXFD_QUIRK_ACTIVE(CRC_RX), +- MCP25XXFD_QUIRK_ACTIVE(CRC_TX), +- MCP25XXFD_QUIRK_ACTIVE(ECC), +- MCP25XXFD_QUIRK_ACTIVE(HALF_DUPLEX), ++ MCP251XFD_QUIRK_ACTIVE(MAB_NO_WARN), ++ MCP251XFD_QUIRK_ACTIVE(CRC_REG), ++ MCP251XFD_QUIRK_ACTIVE(CRC_RX), ++ MCP251XFD_QUIRK_ACTIVE(CRC_TX), ++ MCP251XFD_QUIRK_ACTIVE(ECC), ++ MCP251XFD_QUIRK_ACTIVE(HALF_DUPLEX), + priv->can.clock.freq / 1000000, + priv->can.clock.freq % 1000000 / 1000 / 10, + priv->spi_max_speed_hz_orig / 1000000, +@@ -2619,12 +2619,12 @@ mcp25xxfd_register_done(const struct mcp25xxfd_priv *priv) + return 0; + } + +-static int mcp25xxfd_register(struct mcp25xxfd_priv *priv) ++static int mcp251xfd_register(struct mcp251xfd_priv *priv) + { + struct net_device *ndev = priv->ndev; + int err; + +- err = mcp25xxfd_clks_and_vdd_enable(priv); ++ err = mcp251xfd_clks_and_vdd_enable(priv); + if (err) + return err; + +@@ -2634,19 +2634,19 @@ static int mcp25xxfd_register(struct mcp25xxfd_priv *priv) + goto out_runtime_put_noidle; + pm_runtime_enable(ndev->dev.parent); + +- mcp25xxfd_register_quirks(priv); ++ mcp251xfd_register_quirks(priv); + +- err = mcp25xxfd_chip_softreset(priv); ++ err = mcp251xfd_chip_softreset(priv); + if (err == -ENODEV) + goto out_runtime_disable; + if (err) + goto out_chip_set_mode_sleep; + +- err = mcp25xxfd_register_chip_detect(priv); ++ err = mcp251xfd_register_chip_detect(priv); + if (err) + goto out_chip_set_mode_sleep; + +- err = mcp25xxfd_register_check_rx_int(priv); ++ err = mcp251xfd_register_check_rx_int(priv); + if (err) + goto out_chip_set_mode_sleep; + +@@ -2654,7 +2654,7 @@ static int mcp25xxfd_register(struct mcp25xxfd_priv *priv) + if (err) + goto out_chip_set_mode_sleep; + +- err = mcp25xxfd_register_done(priv); ++ err = mcp251xfd_register_done(priv); + if (err) + goto out_unregister_candev; + +@@ -2662,7 +2662,7 @@ static int mcp25xxfd_register(struct mcp25xxfd_priv *priv) + * disable the clocks and vdd. If CONFIG_PM is not enabled, + * the clocks and vdd will stay powered. + */ +- err = mcp25xxfd_chip_set_mode(priv, MCP25XXFD_REG_CON_MODE_SLEEP); ++ err = mcp251xfd_chip_set_mode(priv, MCP251XFD_REG_CON_MODE_SLEEP); + if (err) + goto out_unregister_candev; + +@@ -2673,17 +2673,17 @@ static int mcp25xxfd_register(struct mcp25xxfd_priv *priv) + out_unregister_candev: + unregister_candev(ndev); + out_chip_set_mode_sleep: +- mcp25xxfd_chip_set_mode(priv, MCP25XXFD_REG_CON_MODE_SLEEP); ++ mcp251xfd_chip_set_mode(priv, MCP251XFD_REG_CON_MODE_SLEEP); + out_runtime_disable: + pm_runtime_disable(ndev->dev.parent); + out_runtime_put_noidle: + pm_runtime_put_noidle(ndev->dev.parent); +- mcp25xxfd_clks_and_vdd_disable(priv); ++ mcp251xfd_clks_and_vdd_disable(priv); + + return err; + } + +-static inline void mcp25xxfd_unregister(struct mcp25xxfd_priv *priv) ++static inline void mcp251xfd_unregister(struct mcp251xfd_priv *priv) + { + struct net_device *ndev = priv->ndev; + +@@ -2691,47 +2691,47 @@ static inline void mcp25xxfd_unregister(struct mcp25xxfd_priv *priv) + + pm_runtime_get_sync(ndev->dev.parent); + pm_runtime_put_noidle(ndev->dev.parent); +- mcp25xxfd_clks_and_vdd_disable(priv); ++ mcp251xfd_clks_and_vdd_disable(priv); + pm_runtime_disable(ndev->dev.parent); + } + +-static const struct of_device_id mcp25xxfd_of_match[] = { ++static const struct of_device_id mcp251xfd_of_match[] = { + { + .compatible = "microchip,mcp2517fd", +- .data = &mcp25xxfd_devtype_data_mcp2517fd, ++ .data = &mcp251xfd_devtype_data_mcp2517fd, + }, { + .compatible = "microchip,mcp2518fd", +- .data = &mcp25xxfd_devtype_data_mcp2518fd, ++ .data = &mcp251xfd_devtype_data_mcp2518fd, + }, { + .compatible = "microchip,mcp251xfd", +- .data = &mcp25xxfd_devtype_data_mcp251xfd, ++ .data = &mcp251xfd_devtype_data_mcp251xfd, + }, { + /* sentinel */ + }, + }; +-MODULE_DEVICE_TABLE(of, mcp25xxfd_of_match); ++MODULE_DEVICE_TABLE(of, mcp251xfd_of_match); + +-static const struct spi_device_id mcp25xxfd_id_table[] = { ++static const struct spi_device_id mcp251xfd_id_table[] = { + { + .name = "mcp2517fd", +- .driver_data = (kernel_ulong_t)&mcp25xxfd_devtype_data_mcp2517fd, ++ .driver_data = (kernel_ulong_t)&mcp251xfd_devtype_data_mcp2517fd, + }, { + .name = "mcp2518fd", +- .driver_data = (kernel_ulong_t)&mcp25xxfd_devtype_data_mcp2518fd, ++ .driver_data = (kernel_ulong_t)&mcp251xfd_devtype_data_mcp2518fd, + }, { + .name = "mcp251xfd", +- .driver_data = (kernel_ulong_t)&mcp25xxfd_devtype_data_mcp251xfd, ++ .driver_data = (kernel_ulong_t)&mcp251xfd_devtype_data_mcp251xfd, + }, { + /* sentinel */ + }, + }; +-MODULE_DEVICE_TABLE(spi, mcp25xxfd_id_table); ++MODULE_DEVICE_TABLE(spi, mcp251xfd_id_table); + +-static int mcp25xxfd_probe(struct spi_device *spi) ++static int mcp251xfd_probe(struct spi_device *spi) + { + const void *match; + struct net_device *ndev; +- struct mcp25xxfd_priv *priv; ++ struct mcp251xfd_priv *priv; + struct gpio_desc *rx_int; + struct regulator *reg_vdd, *reg_xceiver; + struct clk *clk; +@@ -2769,39 +2769,39 @@ static int mcp25xxfd_probe(struct spi_device *spi) + freq = clk_get_rate(clk); + + /* Sanity check */ +- if (freq < MCP25XXFD_SYSCLOCK_HZ_MIN || +- freq > MCP25XXFD_SYSCLOCK_HZ_MAX) { ++ if (freq < MCP251XFD_SYSCLOCK_HZ_MIN || ++ freq > MCP251XFD_SYSCLOCK_HZ_MAX) { + dev_err(&spi->dev, + "Oscillator frequency (%u Hz) is too low or high.\n", + freq); + return -ERANGE; + } + +- if (freq <= MCP25XXFD_SYSCLOCK_HZ_MAX / MCP25XXFD_OSC_PLL_MULTIPLIER) { ++ if (freq <= MCP251XFD_SYSCLOCK_HZ_MAX / MCP251XFD_OSC_PLL_MULTIPLIER) { + dev_err(&spi->dev, + "Oscillator frequency (%u Hz) is too low and PLL is not supported.\n", + freq); + return -ERANGE; + } + +- ndev = alloc_candev(sizeof(struct mcp25xxfd_priv), +- MCP25XXFD_TX_OBJ_NUM_MAX); ++ ndev = alloc_candev(sizeof(struct mcp251xfd_priv), ++ MCP251XFD_TX_OBJ_NUM_MAX); + if (!ndev) + return -ENOMEM; + + SET_NETDEV_DEV(ndev, &spi->dev); + +- ndev->netdev_ops = &mcp25xxfd_netdev_ops; ++ ndev->netdev_ops = &mcp251xfd_netdev_ops; + ndev->irq = spi->irq; + ndev->flags |= IFF_ECHO; + + priv = netdev_priv(ndev); + spi_set_drvdata(spi, priv); + priv->can.clock.freq = freq; +- priv->can.do_set_mode = mcp25xxfd_set_mode; +- priv->can.do_get_berr_counter = mcp25xxfd_get_berr_counter; +- priv->can.bittiming_const = &mcp25xxfd_bittiming_const; +- priv->can.data_bittiming_const = &mcp25xxfd_data_bittiming_const; ++ priv->can.do_set_mode = mcp251xfd_set_mode; ++ priv->can.do_get_berr_counter = mcp251xfd_get_berr_counter; ++ priv->can.bittiming_const = &mcp251xfd_bittiming_const; ++ priv->can.data_bittiming_const = &mcp251xfd_data_bittiming_const; + priv->can.ctrlmode_supported = CAN_CTRLMODE_LISTENONLY | + CAN_CTRLMODE_BERR_REPORTING | CAN_CTRLMODE_FD | + CAN_CTRLMODE_FD_NON_ISO; +@@ -2814,9 +2814,9 @@ static int mcp25xxfd_probe(struct spi_device *spi) + + match = device_get_match_data(&spi->dev); + if (match) +- priv->devtype_data = *(struct mcp25xxfd_devtype_data *)match; ++ priv->devtype_data = *(struct mcp251xfd_devtype_data *)match; + else +- priv->devtype_data = *(struct mcp25xxfd_devtype_data *) ++ priv->devtype_data = *(struct mcp251xfd_devtype_data *) + spi_get_device_id(spi)->driver_data; + + /* Errata Reference: +@@ -2855,16 +2855,16 @@ static int mcp25xxfd_probe(struct spi_device *spi) + if (err) + goto out_free_candev; + +- err = mcp25xxfd_regmap_init(priv); ++ err = mcp251xfd_regmap_init(priv); + if (err) + goto out_free_candev; + + err = can_rx_offload_add_manual(ndev, &priv->offload, +- MCP25XXFD_NAPI_WEIGHT); ++ MCP251XFD_NAPI_WEIGHT); + if (err) + goto out_free_candev; + +- err = mcp25xxfd_register(priv); ++ err = mcp251xfd_register(priv); + if (err) + goto out_free_candev; + +@@ -2878,49 +2878,49 @@ static int mcp25xxfd_probe(struct spi_device *spi) + return err; + } + +-static int mcp25xxfd_remove(struct spi_device *spi) ++static int mcp251xfd_remove(struct spi_device *spi) + { +- struct mcp25xxfd_priv *priv = spi_get_drvdata(spi); ++ struct mcp251xfd_priv *priv = spi_get_drvdata(spi); + struct net_device *ndev = priv->ndev; + + can_rx_offload_del(&priv->offload); +- mcp25xxfd_unregister(priv); ++ mcp251xfd_unregister(priv); + spi->max_speed_hz = priv->spi_max_speed_hz_orig; + free_candev(ndev); + + return 0; + } + +-static int __maybe_unused mcp25xxfd_runtime_suspend(struct device *device) ++static int __maybe_unused mcp251xfd_runtime_suspend(struct device *device) + { +- const struct mcp25xxfd_priv *priv = dev_get_drvdata(device); ++ const struct mcp251xfd_priv *priv = dev_get_drvdata(device); + +- return mcp25xxfd_clks_and_vdd_disable(priv); ++ return mcp251xfd_clks_and_vdd_disable(priv); + } + +-static int __maybe_unused mcp25xxfd_runtime_resume(struct device *device) ++static int __maybe_unused mcp251xfd_runtime_resume(struct device *device) + { +- const struct mcp25xxfd_priv *priv = dev_get_drvdata(device); ++ const struct mcp251xfd_priv *priv = dev_get_drvdata(device); + +- return mcp25xxfd_clks_and_vdd_enable(priv); ++ return mcp251xfd_clks_and_vdd_enable(priv); + } + +-static const struct dev_pm_ops mcp25xxfd_pm_ops = { +- SET_RUNTIME_PM_OPS(mcp25xxfd_runtime_suspend, +- mcp25xxfd_runtime_resume, NULL) ++static const struct dev_pm_ops mcp251xfd_pm_ops = { ++ SET_RUNTIME_PM_OPS(mcp251xfd_runtime_suspend, ++ mcp251xfd_runtime_resume, NULL) + }; + +-static struct spi_driver mcp25xxfd_driver = { ++static struct spi_driver mcp251xfd_driver = { + .driver = { + .name = DEVICE_NAME, +- .pm = &mcp25xxfd_pm_ops, +- .of_match_table = mcp25xxfd_of_match, ++ .pm = &mcp251xfd_pm_ops, ++ .of_match_table = mcp251xfd_of_match, + }, +- .probe = mcp25xxfd_probe, +- .remove = mcp25xxfd_remove, +- .id_table = mcp25xxfd_id_table, ++ .probe = mcp251xfd_probe, ++ .remove = mcp251xfd_remove, ++ .id_table = mcp251xfd_id_table, + }; +-module_spi_driver(mcp25xxfd_driver); ++module_spi_driver(mcp251xfd_driver); + + MODULE_AUTHOR("Marc Kleine-Budde "); + MODULE_DESCRIPTION("Microchip MCP251xFD Family CAN controller driver"); +diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-crc16.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-crc16.c +index bc90afb34df2..a02ca76ac239 100644 +--- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-crc16.c ++++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-crc16.c +@@ -1,6 +1,6 @@ + // SPDX-License-Identifier: GPL-2.0 + // +-// mcp25xxfd - Microchip MCP25xxFD Family CAN controller driver ++// mcp251xfd - Microchip MCP251xFD Family CAN controller driver + // + // Copyright (c) 2020 Pengutronix, + // Marc Kleine-Budde +@@ -20,7 +20,7 @@ + * + * http://lkml.iu.edu/hypermail/linux/kernel/0508.1/1085.html + */ +-static const u16 mcp25xxfd_crc16_table[] = { ++static const u16 mcp251xfd_crc16_table[] = { + 0x0000, 0x8005, 0x800f, 0x000a, 0x801b, 0x001e, 0x0014, 0x8011, + 0x8033, 0x0036, 0x003c, 0x8039, 0x0028, 0x802d, 0x8027, 0x0022, + 0x8063, 0x0066, 0x006c, 0x8069, 0x0078, 0x807d, 0x8077, 0x0072, +@@ -55,35 +55,35 @@ static const u16 mcp25xxfd_crc16_table[] = { + 0x8213, 0x0216, 0x021c, 0x8219, 0x0208, 0x820d, 0x8207, 0x0202 + }; + +-static inline u16 mcp25xxfd_crc16_byte(u16 crc, const u8 data) ++static inline u16 mcp251xfd_crc16_byte(u16 crc, const u8 data) + { + u8 index = (crc >> 8) ^ data; + +- return (crc << 8) ^ mcp25xxfd_crc16_table[index]; ++ return (crc << 8) ^ mcp251xfd_crc16_table[index]; + } + +-static u16 mcp25xxfd_crc16(u16 crc, u8 const *buffer, size_t len) ++static u16 mcp251xfd_crc16(u16 crc, u8 const *buffer, size_t len) + { + while (len--) +- crc = mcp25xxfd_crc16_byte(crc, *buffer++); ++ crc = mcp251xfd_crc16_byte(crc, *buffer++); + + return crc; + } + +-u16 mcp25xxfd_crc16_compute(const void *data, size_t data_size) ++u16 mcp251xfd_crc16_compute(const void *data, size_t data_size) + { + u16 crc = 0xffff; + +- return mcp25xxfd_crc16(crc, data, data_size); ++ return mcp251xfd_crc16(crc, data, data_size); + } + +-u16 mcp25xxfd_crc16_compute2(const void *cmd, size_t cmd_size, ++u16 mcp251xfd_crc16_compute2(const void *cmd, size_t cmd_size, + const void *data, size_t data_size) + { + u16 crc; + +- crc = mcp25xxfd_crc16_compute(cmd, cmd_size); +- crc = mcp25xxfd_crc16(crc, data, data_size); ++ crc = mcp251xfd_crc16_compute(cmd, cmd_size); ++ crc = mcp251xfd_crc16(crc, data, data_size); + + return crc; + } +diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c +index 3511317bb49b..ba25902dd78c 100644 +--- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c ++++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c +@@ -1,6 +1,6 @@ + // SPDX-License-Identifier: GPL-2.0 + // +-// mcp25xxfd - Microchip MCP25xxFD Family CAN controller driver ++// mcp251xfd - Microchip MCP251xFD Family CAN controller driver + // + // Copyright (c) 2019, 2020 Pengutronix, + // Marc Kleine-Budde +@@ -10,10 +10,10 @@ + + #include + +-static const struct regmap_config mcp25xxfd_regmap_crc; ++static const struct regmap_config mcp251xfd_regmap_crc; + + static int +-mcp25xxfd_regmap_nocrc_write(void *context, const void *data, size_t count) ++mcp251xfd_regmap_nocrc_write(void *context, const void *data, size_t count) + { + struct spi_device *spi = context; + +@@ -21,13 +21,13 @@ mcp25xxfd_regmap_nocrc_write(void *context, const void *data, size_t count) + } + + static int +-mcp25xxfd_regmap_nocrc_gather_write(void *context, ++mcp251xfd_regmap_nocrc_gather_write(void *context, + const void *reg, size_t reg_len, + const void *val, size_t val_len) + { + struct spi_device *spi = context; +- struct mcp25xxfd_priv *priv = spi_get_drvdata(spi); +- struct mcp25xxfd_map_buf_nocrc *buf_tx = priv->map_buf_nocrc_tx; ++ struct mcp251xfd_priv *priv = spi_get_drvdata(spi); ++ struct mcp251xfd_map_buf_nocrc *buf_tx = priv->map_buf_nocrc_tx; + struct spi_transfer xfer[] = { + { + .tx_buf = buf_tx, +@@ -37,7 +37,7 @@ mcp25xxfd_regmap_nocrc_gather_write(void *context, + + BUILD_BUG_ON(sizeof(buf_tx->cmd) != sizeof(__be16)); + +- if (IS_ENABLED(CONFIG_CAN_MCP25XXFD_SANITY) && ++ if (IS_ENABLED(CONFIG_CAN_MCP251XFD_SANITY) && + reg_len != sizeof(buf_tx->cmd.cmd)) + return -EINVAL; + +@@ -47,20 +47,20 @@ mcp25xxfd_regmap_nocrc_gather_write(void *context, + return spi_sync_transfer(spi, xfer, ARRAY_SIZE(xfer)); + } + +-static inline bool mcp25xxfd_update_bits_read_reg(unsigned int reg) ++static inline bool mcp251xfd_update_bits_read_reg(unsigned int reg) + { + switch (reg) { +- case MCP25XXFD_REG_INT: +- case MCP25XXFD_REG_TEFCON: +- case MCP25XXFD_REG_FIFOCON(MCP25XXFD_RX_FIFO(0)): +- case MCP25XXFD_REG_FLTCON(0): +- case MCP25XXFD_REG_ECCSTAT: +- case MCP25XXFD_REG_CRC: ++ case MCP251XFD_REG_INT: ++ case MCP251XFD_REG_TEFCON: ++ case MCP251XFD_REG_FIFOCON(MCP251XFD_RX_FIFO(0)): ++ case MCP251XFD_REG_FLTCON(0): ++ case MCP251XFD_REG_ECCSTAT: ++ case MCP251XFD_REG_CRC: + return false; +- case MCP25XXFD_REG_CON: +- case MCP25XXFD_REG_FIFOSTA(MCP25XXFD_RX_FIFO(0)): +- case MCP25XXFD_REG_OSC: +- case MCP25XXFD_REG_ECCCON: ++ case MCP251XFD_REG_CON: ++ case MCP251XFD_REG_FIFOSTA(MCP251XFD_RX_FIFO(0)): ++ case MCP251XFD_REG_OSC: ++ case MCP251XFD_REG_ECCCON: + return true; + default: + WARN(1, "Status of reg 0x%04x unknown.\n", reg); +@@ -70,13 +70,13 @@ static inline bool mcp25xxfd_update_bits_read_reg(unsigned int reg) + } + + static int +-mcp25xxfd_regmap_nocrc_update_bits(void *context, unsigned int reg, ++mcp251xfd_regmap_nocrc_update_bits(void *context, unsigned int reg, + unsigned int mask, unsigned int val) + { + struct spi_device *spi = context; +- struct mcp25xxfd_priv *priv = spi_get_drvdata(spi); +- struct mcp25xxfd_map_buf_nocrc *buf_rx = priv->map_buf_nocrc_rx; +- struct mcp25xxfd_map_buf_nocrc *buf_tx = priv->map_buf_nocrc_tx; ++ struct mcp251xfd_priv *priv = spi_get_drvdata(spi); ++ struct mcp251xfd_map_buf_nocrc *buf_rx = priv->map_buf_nocrc_rx; ++ struct mcp251xfd_map_buf_nocrc *buf_tx = priv->map_buf_nocrc_tx; + __le32 orig_le32 = 0, mask_le32, val_le32, tmp_le32; + u8 first_byte, last_byte, len; + int err; +@@ -84,22 +84,22 @@ mcp25xxfd_regmap_nocrc_update_bits(void *context, unsigned int reg, + BUILD_BUG_ON(sizeof(buf_rx->cmd) != sizeof(__be16)); + BUILD_BUG_ON(sizeof(buf_tx->cmd) != sizeof(__be16)); + +- if (IS_ENABLED(CONFIG_CAN_MCP25XXFD_SANITY) && ++ if (IS_ENABLED(CONFIG_CAN_MCP251XFD_SANITY) && + mask == 0) + return -EINVAL; + +- first_byte = mcp25xxfd_first_byte_set(mask); +- last_byte = mcp25xxfd_last_byte_set(mask); ++ first_byte = mcp251xfd_first_byte_set(mask); ++ last_byte = mcp251xfd_last_byte_set(mask); + len = last_byte - first_byte + 1; + +- if (mcp25xxfd_update_bits_read_reg(reg)) { ++ if (mcp251xfd_update_bits_read_reg(reg)) { + struct spi_transfer xfer[2] = { }; + struct spi_message msg; + + spi_message_init(&msg); + spi_message_add_tail(&xfer[0], &msg); + +- if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_HALF_DUPLEX) { ++ if (priv->devtype_data.quirks & MCP251XFD_QUIRK_HALF_DUPLEX) { + xfer[0].tx_buf = buf_tx; + xfer[0].len = sizeof(buf_tx->cmd); + +@@ -111,11 +111,11 @@ mcp25xxfd_regmap_nocrc_update_bits(void *context, unsigned int reg, + xfer[0].rx_buf = buf_rx; + xfer[0].len = sizeof(buf_tx->cmd) + len; + +- if (MCP25XXFD_SANITIZE_SPI) ++ if (MCP251XFD_SANITIZE_SPI) + memset(buf_tx->data, 0x0, len); + } + +- mcp25xxfd_spi_cmd_read_nocrc(&buf_tx->cmd, reg + first_byte); ++ mcp251xfd_spi_cmd_read_nocrc(&buf_tx->cmd, reg + first_byte); + err = spi_sync(spi, &msg); + if (err) + return err; +@@ -129,21 +129,21 @@ mcp25xxfd_regmap_nocrc_update_bits(void *context, unsigned int reg, + tmp_le32 = orig_le32 & ~mask_le32; + tmp_le32 |= val_le32 & mask_le32; + +- mcp25xxfd_spi_cmd_write_nocrc(&buf_tx->cmd, reg + first_byte); ++ mcp251xfd_spi_cmd_write_nocrc(&buf_tx->cmd, reg + first_byte); + memcpy(buf_tx->data, &tmp_le32, len); + + return spi_write(spi, buf_tx, sizeof(buf_tx->cmd) + len); + } + + static int +-mcp25xxfd_regmap_nocrc_read(void *context, ++mcp251xfd_regmap_nocrc_read(void *context, + const void *reg, size_t reg_len, + void *val_buf, size_t val_len) + { + struct spi_device *spi = context; +- struct mcp25xxfd_priv *priv = spi_get_drvdata(spi); +- struct mcp25xxfd_map_buf_nocrc *buf_rx = priv->map_buf_nocrc_rx; +- struct mcp25xxfd_map_buf_nocrc *buf_tx = priv->map_buf_nocrc_tx; ++ struct mcp251xfd_priv *priv = spi_get_drvdata(spi); ++ struct mcp251xfd_map_buf_nocrc *buf_rx = priv->map_buf_nocrc_rx; ++ struct mcp251xfd_map_buf_nocrc *buf_tx = priv->map_buf_nocrc_tx; + struct spi_transfer xfer[2] = { }; + struct spi_message msg; + int err; +@@ -151,14 +151,14 @@ mcp25xxfd_regmap_nocrc_read(void *context, + BUILD_BUG_ON(sizeof(buf_rx->cmd) != sizeof(__be16)); + BUILD_BUG_ON(sizeof(buf_tx->cmd) != sizeof(__be16)); + +- if (IS_ENABLED(CONFIG_CAN_MCP25XXFD_SANITY) && ++ if (IS_ENABLED(CONFIG_CAN_MCP251XFD_SANITY) && + reg_len != sizeof(buf_tx->cmd.cmd)) + return -EINVAL; + + spi_message_init(&msg); + spi_message_add_tail(&xfer[0], &msg); + +- if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_HALF_DUPLEX) { ++ if (priv->devtype_data.quirks & MCP251XFD_QUIRK_HALF_DUPLEX) { + xfer[0].tx_buf = reg; + xfer[0].len = sizeof(buf_tx->cmd); + +@@ -171,7 +171,7 @@ mcp25xxfd_regmap_nocrc_read(void *context, + xfer[0].len = sizeof(buf_tx->cmd) + val_len; + + memcpy(&buf_tx->cmd, reg, sizeof(buf_tx->cmd)); +- if (MCP25XXFD_SANITIZE_SPI) ++ if (MCP251XFD_SANITIZE_SPI) + memset(buf_tx->data, 0x0, val_len); + }; + +@@ -179,20 +179,20 @@ mcp25xxfd_regmap_nocrc_read(void *context, + if (err) + return err; + +- if (!(priv->devtype_data.quirks & MCP25XXFD_QUIRK_HALF_DUPLEX)) ++ if (!(priv->devtype_data.quirks & MCP251XFD_QUIRK_HALF_DUPLEX)) + memcpy(val_buf, buf_rx->data, val_len); + + return 0; + } + + static int +-mcp25xxfd_regmap_crc_gather_write(void *context, ++mcp251xfd_regmap_crc_gather_write(void *context, + const void *reg_p, size_t reg_len, + const void *val, size_t val_len) + { + struct spi_device *spi = context; +- struct mcp25xxfd_priv *priv = spi_get_drvdata(spi); +- struct mcp25xxfd_map_buf_crc *buf_tx = priv->map_buf_crc_tx; ++ struct mcp251xfd_priv *priv = spi_get_drvdata(spi); ++ struct mcp251xfd_map_buf_crc *buf_tx = priv->map_buf_crc_tx; + struct spi_transfer xfer[] = { + { + .tx_buf = buf_tx, +@@ -205,39 +205,39 @@ mcp25xxfd_regmap_crc_gather_write(void *context, + + BUILD_BUG_ON(sizeof(buf_tx->cmd) != sizeof(__be16) + sizeof(u8)); + +- if (IS_ENABLED(CONFIG_CAN_MCP25XXFD_SANITY) && ++ if (IS_ENABLED(CONFIG_CAN_MCP251XFD_SANITY) && + reg_len != sizeof(buf_tx->cmd.cmd) + +- mcp25xxfd_regmap_crc.pad_bits / BITS_PER_BYTE) ++ mcp251xfd_regmap_crc.pad_bits / BITS_PER_BYTE) + return -EINVAL; + +- mcp25xxfd_spi_cmd_write_crc(&buf_tx->cmd, reg, val_len); ++ mcp251xfd_spi_cmd_write_crc(&buf_tx->cmd, reg, val_len); + memcpy(buf_tx->data, val, val_len); + +- crc = mcp25xxfd_crc16_compute(buf_tx, sizeof(buf_tx->cmd) + val_len); ++ crc = mcp251xfd_crc16_compute(buf_tx, sizeof(buf_tx->cmd) + val_len); + put_unaligned_be16(crc, buf_tx->data + val_len); + + return spi_sync_transfer(spi, xfer, ARRAY_SIZE(xfer)); + } + + static int +-mcp25xxfd_regmap_crc_write(void *context, ++mcp251xfd_regmap_crc_write(void *context, + const void *data, size_t count) + { + const size_t data_offset = sizeof(__be16) + +- mcp25xxfd_regmap_crc.pad_bits / BITS_PER_BYTE; ++ mcp251xfd_regmap_crc.pad_bits / BITS_PER_BYTE; + +- return mcp25xxfd_regmap_crc_gather_write(context, ++ return mcp251xfd_regmap_crc_gather_write(context, + data, data_offset, + data + data_offset, + count - data_offset); + } + + static int +-mcp25xxfd_regmap_crc_read_one(struct mcp25xxfd_priv *priv, ++mcp251xfd_regmap_crc_read_one(struct mcp251xfd_priv *priv, + struct spi_message *msg, unsigned int data_len) + { +- const struct mcp25xxfd_map_buf_crc *buf_rx = priv->map_buf_crc_rx; +- const struct mcp25xxfd_map_buf_crc *buf_tx = priv->map_buf_crc_tx; ++ const struct mcp251xfd_map_buf_crc *buf_rx = priv->map_buf_crc_rx; ++ const struct mcp251xfd_map_buf_crc *buf_tx = priv->map_buf_crc_tx; + u16 crc_received, crc_calculated; + int err; + +@@ -249,7 +249,7 @@ mcp25xxfd_regmap_crc_read_one(struct mcp25xxfd_priv *priv, + return err; + + crc_received = get_unaligned_be16(buf_rx->data + data_len); +- crc_calculated = mcp25xxfd_crc16_compute2(&buf_tx->cmd, ++ crc_calculated = mcp251xfd_crc16_compute2(&buf_tx->cmd, + sizeof(buf_tx->cmd), + buf_rx->data, + data_len); +@@ -260,14 +260,14 @@ mcp25xxfd_regmap_crc_read_one(struct mcp25xxfd_priv *priv, + } + + static int +-mcp25xxfd_regmap_crc_read(void *context, ++mcp251xfd_regmap_crc_read(void *context, + const void *reg_p, size_t reg_len, + void *val_buf, size_t val_len) + { + struct spi_device *spi = context; +- struct mcp25xxfd_priv *priv = spi_get_drvdata(spi); +- struct mcp25xxfd_map_buf_crc *buf_rx = priv->map_buf_crc_rx; +- struct mcp25xxfd_map_buf_crc *buf_tx = priv->map_buf_crc_tx; ++ struct mcp251xfd_priv *priv = spi_get_drvdata(spi); ++ struct mcp251xfd_map_buf_crc *buf_rx = priv->map_buf_crc_rx; ++ struct mcp251xfd_map_buf_crc *buf_tx = priv->map_buf_crc_tx; + struct spi_transfer xfer[2] = { }; + struct spi_message msg; + u16 reg = *(u16 *)reg_p; +@@ -276,15 +276,15 @@ mcp25xxfd_regmap_crc_read(void *context, + BUILD_BUG_ON(sizeof(buf_rx->cmd) != sizeof(__be16) + sizeof(u8)); + BUILD_BUG_ON(sizeof(buf_tx->cmd) != sizeof(__be16) + sizeof(u8)); + +- if (IS_ENABLED(CONFIG_CAN_MCP25XXFD_SANITY) && ++ if (IS_ENABLED(CONFIG_CAN_MCP251XFD_SANITY) && + reg_len != sizeof(buf_tx->cmd.cmd) + +- mcp25xxfd_regmap_crc.pad_bits / BITS_PER_BYTE) ++ mcp251xfd_regmap_crc.pad_bits / BITS_PER_BYTE) + return -EINVAL; + + spi_message_init(&msg); + spi_message_add_tail(&xfer[0], &msg); + +- if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_HALF_DUPLEX) { ++ if (priv->devtype_data.quirks & MCP251XFD_QUIRK_HALF_DUPLEX) { + xfer[0].tx_buf = buf_tx; + xfer[0].len = sizeof(buf_tx->cmd); + +@@ -297,21 +297,21 @@ mcp25xxfd_regmap_crc_read(void *context, + xfer[0].len = sizeof(buf_tx->cmd) + val_len + + sizeof(buf_tx->crc); + +- if (MCP25XXFD_SANITIZE_SPI) ++ if (MCP251XFD_SANITIZE_SPI) + memset(buf_tx->data, 0x0, val_len + + sizeof(buf_tx->crc)); + } + +- mcp25xxfd_spi_cmd_read_crc(&buf_tx->cmd, reg, val_len); ++ mcp251xfd_spi_cmd_read_crc(&buf_tx->cmd, reg, val_len); + +- for (i = 0; i < MCP25XXFD_READ_CRC_RETRIES_MAX; i++) { +- err = mcp25xxfd_regmap_crc_read_one(priv, &msg, val_len); ++ for (i = 0; i < MCP251XFD_READ_CRC_RETRIES_MAX; i++) { ++ err = mcp251xfd_regmap_crc_read_one(priv, &msg, val_len); + if (!err) + goto out; + if (err != -EBADMSG) + return err; + +- /* MCP25XXFD_REG_OSC is the first ever reg we read from. ++ /* MCP251XFD_REG_OSC is the first ever reg we read from. + * + * The chip may be in deep sleep and this SPI transfer + * (i.e. the assertion of the CS) will wake the chip +@@ -325,7 +325,7 @@ mcp25xxfd_regmap_crc_read(void *context, + * to the caller. It will take care of both cases. + * + */ +- if (reg == MCP25XXFD_REG_OSC) { ++ if (reg == MCP251XFD_REG_OSC) { + err = 0; + goto out; + } +@@ -350,88 +350,88 @@ mcp25xxfd_regmap_crc_read(void *context, + return 0; + } + +-static const struct regmap_range mcp25xxfd_reg_table_yes_range[] = { ++static const struct regmap_range mcp251xfd_reg_table_yes_range[] = { + regmap_reg_range(0x000, 0x2ec), /* CAN FD Controller Module SFR */ + regmap_reg_range(0x400, 0xbfc), /* RAM */ + regmap_reg_range(0xe00, 0xe14), /* MCP2517/18FD SFR */ + }; + +-static const struct regmap_access_table mcp25xxfd_reg_table = { +- .yes_ranges = mcp25xxfd_reg_table_yes_range, +- .n_yes_ranges = ARRAY_SIZE(mcp25xxfd_reg_table_yes_range), ++static const struct regmap_access_table mcp251xfd_reg_table = { ++ .yes_ranges = mcp251xfd_reg_table_yes_range, ++ .n_yes_ranges = ARRAY_SIZE(mcp251xfd_reg_table_yes_range), + }; + +-static const struct regmap_config mcp25xxfd_regmap_nocrc = { ++static const struct regmap_config mcp251xfd_regmap_nocrc = { + .name = "nocrc", + .reg_bits = 16, + .reg_stride = 4, + .pad_bits = 0, + .val_bits = 32, + .max_register = 0xffc, +- .wr_table = &mcp25xxfd_reg_table, +- .rd_table = &mcp25xxfd_reg_table, ++ .wr_table = &mcp251xfd_reg_table, ++ .rd_table = &mcp251xfd_reg_table, + .cache_type = REGCACHE_NONE, + .read_flag_mask = (__force unsigned long) +- cpu_to_be16(MCP25XXFD_SPI_INSTRUCTION_READ), ++ cpu_to_be16(MCP251XFD_SPI_INSTRUCTION_READ), + .write_flag_mask = (__force unsigned long) +- cpu_to_be16(MCP25XXFD_SPI_INSTRUCTION_WRITE), ++ cpu_to_be16(MCP251XFD_SPI_INSTRUCTION_WRITE), + }; + +-static const struct regmap_bus mcp25xxfd_bus_nocrc = { +- .write = mcp25xxfd_regmap_nocrc_write, +- .gather_write = mcp25xxfd_regmap_nocrc_gather_write, +- .reg_update_bits = mcp25xxfd_regmap_nocrc_update_bits, +- .read = mcp25xxfd_regmap_nocrc_read, ++static const struct regmap_bus mcp251xfd_bus_nocrc = { ++ .write = mcp251xfd_regmap_nocrc_write, ++ .gather_write = mcp251xfd_regmap_nocrc_gather_write, ++ .reg_update_bits = mcp251xfd_regmap_nocrc_update_bits, ++ .read = mcp251xfd_regmap_nocrc_read, + .reg_format_endian_default = REGMAP_ENDIAN_BIG, + .val_format_endian_default = REGMAP_ENDIAN_LITTLE, +- .max_raw_read = sizeof_field(struct mcp25xxfd_map_buf_nocrc, data), +- .max_raw_write = sizeof_field(struct mcp25xxfd_map_buf_nocrc, data), ++ .max_raw_read = sizeof_field(struct mcp251xfd_map_buf_nocrc, data), ++ .max_raw_write = sizeof_field(struct mcp251xfd_map_buf_nocrc, data), + }; + +-static const struct regmap_config mcp25xxfd_regmap_crc = { ++static const struct regmap_config mcp251xfd_regmap_crc = { + .name = "crc", + .reg_bits = 16, + .reg_stride = 4, + .pad_bits = 16, /* keep data bits aligned */ + .val_bits = 32, + .max_register = 0xffc, +- .wr_table = &mcp25xxfd_reg_table, +- .rd_table = &mcp25xxfd_reg_table, ++ .wr_table = &mcp251xfd_reg_table, ++ .rd_table = &mcp251xfd_reg_table, + .cache_type = REGCACHE_NONE, + }; + +-static const struct regmap_bus mcp25xxfd_bus_crc = { +- .write = mcp25xxfd_regmap_crc_write, +- .gather_write = mcp25xxfd_regmap_crc_gather_write, +- .read = mcp25xxfd_regmap_crc_read, ++static const struct regmap_bus mcp251xfd_bus_crc = { ++ .write = mcp251xfd_regmap_crc_write, ++ .gather_write = mcp251xfd_regmap_crc_gather_write, ++ .read = mcp251xfd_regmap_crc_read, + .reg_format_endian_default = REGMAP_ENDIAN_NATIVE, + .val_format_endian_default = REGMAP_ENDIAN_LITTLE, +- .max_raw_read = sizeof_field(struct mcp25xxfd_map_buf_crc, data), +- .max_raw_write = sizeof_field(struct mcp25xxfd_map_buf_crc, data), ++ .max_raw_read = sizeof_field(struct mcp251xfd_map_buf_crc, data), ++ .max_raw_write = sizeof_field(struct mcp251xfd_map_buf_crc, data), + }; + + static inline bool +-mcp25xxfd_regmap_use_nocrc(struct mcp25xxfd_priv *priv) ++mcp251xfd_regmap_use_nocrc(struct mcp251xfd_priv *priv) + { +- return (!(priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_REG)) || +- (!(priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_RX)); ++ return (!(priv->devtype_data.quirks & MCP251XFD_QUIRK_CRC_REG)) || ++ (!(priv->devtype_data.quirks & MCP251XFD_QUIRK_CRC_RX)); + } + + static inline bool +-mcp25xxfd_regmap_use_crc(struct mcp25xxfd_priv *priv) ++mcp251xfd_regmap_use_crc(struct mcp251xfd_priv *priv) + { +- return (priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_REG) || +- (priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_RX); ++ return (priv->devtype_data.quirks & MCP251XFD_QUIRK_CRC_REG) || ++ (priv->devtype_data.quirks & MCP251XFD_QUIRK_CRC_RX); + } + + static int +-mcp25xxfd_regmap_init_nocrc(struct mcp25xxfd_priv *priv) ++mcp251xfd_regmap_init_nocrc(struct mcp251xfd_priv *priv) + { + if (!priv->map_nocrc) { + struct regmap *map; + +- map = devm_regmap_init(&priv->spi->dev, &mcp25xxfd_bus_nocrc, +- priv->spi, &mcp25xxfd_regmap_nocrc); ++ map = devm_regmap_init(&priv->spi->dev, &mcp251xfd_bus_nocrc, ++ priv->spi, &mcp251xfd_regmap_nocrc); + if (IS_ERR(map)) + return PTR_ERR(map); + +@@ -456,16 +456,16 @@ mcp25xxfd_regmap_init_nocrc(struct mcp25xxfd_priv *priv) + return -ENOMEM; + } + +- if (!(priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_REG)) ++ if (!(priv->devtype_data.quirks & MCP251XFD_QUIRK_CRC_REG)) + priv->map_reg = priv->map_nocrc; + +- if (!(priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_RX)) ++ if (!(priv->devtype_data.quirks & MCP251XFD_QUIRK_CRC_RX)) + priv->map_rx = priv->map_nocrc; + + return 0; + } + +-static void mcp25xxfd_regmap_destroy_nocrc(struct mcp25xxfd_priv *priv) ++static void mcp251xfd_regmap_destroy_nocrc(struct mcp251xfd_priv *priv) + { + if (priv->map_buf_nocrc_rx) { + devm_kfree(&priv->spi->dev, priv->map_buf_nocrc_rx); +@@ -478,13 +478,13 @@ static void mcp25xxfd_regmap_destroy_nocrc(struct mcp25xxfd_priv *priv) + } + + static int +-mcp25xxfd_regmap_init_crc(struct mcp25xxfd_priv *priv) ++mcp251xfd_regmap_init_crc(struct mcp251xfd_priv *priv) + { + if (!priv->map_crc) { + struct regmap *map; + +- map = devm_regmap_init(&priv->spi->dev, &mcp25xxfd_bus_crc, +- priv->spi, &mcp25xxfd_regmap_crc); ++ map = devm_regmap_init(&priv->spi->dev, &mcp251xfd_bus_crc, ++ priv->spi, &mcp251xfd_regmap_crc); + if (IS_ERR(map)) + return PTR_ERR(map); + +@@ -509,16 +509,16 @@ mcp25xxfd_regmap_init_crc(struct mcp25xxfd_priv *priv) + return -ENOMEM; + } + +- if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_REG) ++ if (priv->devtype_data.quirks & MCP251XFD_QUIRK_CRC_REG) + priv->map_reg = priv->map_crc; + +- if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_RX) ++ if (priv->devtype_data.quirks & MCP251XFD_QUIRK_CRC_RX) + priv->map_rx = priv->map_crc; + + return 0; + } + +-static void mcp25xxfd_regmap_destroy_crc(struct mcp25xxfd_priv *priv) ++static void mcp251xfd_regmap_destroy_crc(struct mcp251xfd_priv *priv) + { + if (priv->map_buf_crc_rx) { + devm_kfree(&priv->spi->dev, priv->map_buf_crc_rx); +@@ -530,26 +530,26 @@ static void mcp25xxfd_regmap_destroy_crc(struct mcp25xxfd_priv *priv) + } + } + +-int mcp25xxfd_regmap_init(struct mcp25xxfd_priv *priv) ++int mcp251xfd_regmap_init(struct mcp251xfd_priv *priv) + { + int err; + +- if (mcp25xxfd_regmap_use_nocrc(priv)) { +- err = mcp25xxfd_regmap_init_nocrc(priv); ++ if (mcp251xfd_regmap_use_nocrc(priv)) { ++ err = mcp251xfd_regmap_init_nocrc(priv); + + if (err) + return err; + } else { +- mcp25xxfd_regmap_destroy_nocrc(priv); ++ mcp251xfd_regmap_destroy_nocrc(priv); + } + +- if (mcp25xxfd_regmap_use_crc(priv)) { +- err = mcp25xxfd_regmap_init_crc(priv); ++ if (mcp251xfd_regmap_use_crc(priv)) { ++ err = mcp251xfd_regmap_init_crc(priv); + + if (err) + return err; + } else { +- mcp25xxfd_regmap_destroy_crc(priv); ++ mcp251xfd_regmap_destroy_crc(priv); + } + + return 0; +diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd.h b/drivers/net/can/spi/mcp251xfd/mcp251xfd.h +index b1b5d7fd33ea..fa1246e39980 100644 +--- a/drivers/net/can/spi/mcp251xfd/mcp251xfd.h ++++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd.h +@@ -1,14 +1,14 @@ + /* SPDX-License-Identifier: GPL-2.0 + * +- * mcp25xxfd - Microchip MCP25xxFD Family CAN controller driver ++ * mcp251xfd - Microchip MCP251xFD Family CAN controller driver + * + * Copyright (c) 2019 Pengutronix, + * Marc Kleine-Budde + * Copyright (c) 2019 Martin Sperl + */ + +-#ifndef _MCP25XXFD_H +-#define _MCP25XXFD_H ++#ifndef _MCP251XFD_H ++#define _MCP251XFD_H + + #include + #include +@@ -19,405 +19,405 @@ + #include + #include + +-/* MPC25xx registers */ ++/* MPC251x registers */ + + /* CAN FD Controller Module SFR */ +-#define MCP25XXFD_REG_CON 0x00 +-#define MCP25XXFD_REG_CON_TXBWS_MASK GENMASK(31, 28) +-#define MCP25XXFD_REG_CON_ABAT BIT(27) +-#define MCP25XXFD_REG_CON_REQOP_MASK GENMASK(26, 24) +-#define MCP25XXFD_REG_CON_MODE_MIXED 0 +-#define MCP25XXFD_REG_CON_MODE_SLEEP 1 +-#define MCP25XXFD_REG_CON_MODE_INT_LOOPBACK 2 +-#define MCP25XXFD_REG_CON_MODE_LISTENONLY 3 +-#define MCP25XXFD_REG_CON_MODE_CONFIG 4 +-#define MCP25XXFD_REG_CON_MODE_EXT_LOOPBACK 5 +-#define MCP25XXFD_REG_CON_MODE_CAN2_0 6 +-#define MCP25XXFD_REG_CON_MODE_RESTRICTED 7 +-#define MCP25XXFD_REG_CON_OPMOD_MASK GENMASK(23, 21) +-#define MCP25XXFD_REG_CON_TXQEN BIT(20) +-#define MCP25XXFD_REG_CON_STEF BIT(19) +-#define MCP25XXFD_REG_CON_SERR2LOM BIT(18) +-#define MCP25XXFD_REG_CON_ESIGM BIT(17) +-#define MCP25XXFD_REG_CON_RTXAT BIT(16) +-#define MCP25XXFD_REG_CON_BRSDIS BIT(12) +-#define MCP25XXFD_REG_CON_BUSY BIT(11) +-#define MCP25XXFD_REG_CON_WFT_MASK GENMASK(10, 9) +-#define MCP25XXFD_REG_CON_WFT_T00FILTER 0x0 +-#define MCP25XXFD_REG_CON_WFT_T01FILTER 0x1 +-#define MCP25XXFD_REG_CON_WFT_T10FILTER 0x2 +-#define MCP25XXFD_REG_CON_WFT_T11FILTER 0x3 +-#define MCP25XXFD_REG_CON_WAKFIL BIT(8) +-#define MCP25XXFD_REG_CON_PXEDIS BIT(6) +-#define MCP25XXFD_REG_CON_ISOCRCEN BIT(5) +-#define MCP25XXFD_REG_CON_DNCNT_MASK GENMASK(4, 0) +- +-#define MCP25XXFD_REG_NBTCFG 0x04 +-#define MCP25XXFD_REG_NBTCFG_BRP_MASK GENMASK(31, 24) +-#define MCP25XXFD_REG_NBTCFG_TSEG1_MASK GENMASK(23, 16) +-#define MCP25XXFD_REG_NBTCFG_TSEG2_MASK GENMASK(14, 8) +-#define MCP25XXFD_REG_NBTCFG_SJW_MASK GENMASK(6, 0) +- +-#define MCP25XXFD_REG_DBTCFG 0x08 +-#define MCP25XXFD_REG_DBTCFG_BRP_MASK GENMASK(31, 24) +-#define MCP25XXFD_REG_DBTCFG_TSEG1_MASK GENMASK(20, 16) +-#define MCP25XXFD_REG_DBTCFG_TSEG2_MASK GENMASK(11, 8) +-#define MCP25XXFD_REG_DBTCFG_SJW_MASK GENMASK(3, 0) +- +-#define MCP25XXFD_REG_TDC 0x0c +-#define MCP25XXFD_REG_TDC_EDGFLTEN BIT(25) +-#define MCP25XXFD_REG_TDC_SID11EN BIT(24) +-#define MCP25XXFD_REG_TDC_TDCMOD_MASK GENMASK(17, 16) +-#define MCP25XXFD_REG_TDC_TDCMOD_AUTO 2 +-#define MCP25XXFD_REG_TDC_TDCMOD_MANUAL 1 +-#define MCP25XXFD_REG_TDC_TDCMOD_DISABLED 0 +-#define MCP25XXFD_REG_TDC_TDCO_MASK GENMASK(14, 8) +-#define MCP25XXFD_REG_TDC_TDCV_MASK GENMASK(5, 0) +- +-#define MCP25XXFD_REG_TBC 0x10 +- +-#define MCP25XXFD_REG_TSCON 0x14 +-#define MCP25XXFD_REG_TSCON_TSRES BIT(18) +-#define MCP25XXFD_REG_TSCON_TSEOF BIT(17) +-#define MCP25XXFD_REG_TSCON_TBCEN BIT(16) +-#define MCP25XXFD_REG_TSCON_TBCPRE_MASK GENMASK(9, 0) +- +-#define MCP25XXFD_REG_VEC 0x18 +-#define MCP25XXFD_REG_VEC_RXCODE_MASK GENMASK(30, 24) +-#define MCP25XXFD_REG_VEC_TXCODE_MASK GENMASK(22, 16) +-#define MCP25XXFD_REG_VEC_FILHIT_MASK GENMASK(12, 8) +-#define MCP25XXFD_REG_VEC_ICODE_MASK GENMASK(6, 0) +- +-#define MCP25XXFD_REG_INT 0x1c +-#define MCP25XXFD_REG_INT_IF_MASK GENMASK(15, 0) +-#define MCP25XXFD_REG_INT_IE_MASK GENMASK(31, 16) +-#define MCP25XXFD_REG_INT_IVMIE BIT(31) +-#define MCP25XXFD_REG_INT_WAKIE BIT(30) +-#define MCP25XXFD_REG_INT_CERRIE BIT(29) +-#define MCP25XXFD_REG_INT_SERRIE BIT(28) +-#define MCP25XXFD_REG_INT_RXOVIE BIT(27) +-#define MCP25XXFD_REG_INT_TXATIE BIT(26) +-#define MCP25XXFD_REG_INT_SPICRCIE BIT(25) +-#define MCP25XXFD_REG_INT_ECCIE BIT(24) +-#define MCP25XXFD_REG_INT_TEFIE BIT(20) +-#define MCP25XXFD_REG_INT_MODIE BIT(19) +-#define MCP25XXFD_REG_INT_TBCIE BIT(18) +-#define MCP25XXFD_REG_INT_RXIE BIT(17) +-#define MCP25XXFD_REG_INT_TXIE BIT(16) +-#define MCP25XXFD_REG_INT_IVMIF BIT(15) +-#define MCP25XXFD_REG_INT_WAKIF BIT(14) +-#define MCP25XXFD_REG_INT_CERRIF BIT(13) +-#define MCP25XXFD_REG_INT_SERRIF BIT(12) +-#define MCP25XXFD_REG_INT_RXOVIF BIT(11) +-#define MCP25XXFD_REG_INT_TXATIF BIT(10) +-#define MCP25XXFD_REG_INT_SPICRCIF BIT(9) +-#define MCP25XXFD_REG_INT_ECCIF BIT(8) +-#define MCP25XXFD_REG_INT_TEFIF BIT(4) +-#define MCP25XXFD_REG_INT_MODIF BIT(3) +-#define MCP25XXFD_REG_INT_TBCIF BIT(2) +-#define MCP25XXFD_REG_INT_RXIF BIT(1) +-#define MCP25XXFD_REG_INT_TXIF BIT(0) ++#define MCP251XFD_REG_CON 0x00 ++#define MCP251XFD_REG_CON_TXBWS_MASK GENMASK(31, 28) ++#define MCP251XFD_REG_CON_ABAT BIT(27) ++#define MCP251XFD_REG_CON_REQOP_MASK GENMASK(26, 24) ++#define MCP251XFD_REG_CON_MODE_MIXED 0 ++#define MCP251XFD_REG_CON_MODE_SLEEP 1 ++#define MCP251XFD_REG_CON_MODE_INT_LOOPBACK 2 ++#define MCP251XFD_REG_CON_MODE_LISTENONLY 3 ++#define MCP251XFD_REG_CON_MODE_CONFIG 4 ++#define MCP251XFD_REG_CON_MODE_EXT_LOOPBACK 5 ++#define MCP251XFD_REG_CON_MODE_CAN2_0 6 ++#define MCP251XFD_REG_CON_MODE_RESTRICTED 7 ++#define MCP251XFD_REG_CON_OPMOD_MASK GENMASK(23, 21) ++#define MCP251XFD_REG_CON_TXQEN BIT(20) ++#define MCP251XFD_REG_CON_STEF BIT(19) ++#define MCP251XFD_REG_CON_SERR2LOM BIT(18) ++#define MCP251XFD_REG_CON_ESIGM BIT(17) ++#define MCP251XFD_REG_CON_RTXAT BIT(16) ++#define MCP251XFD_REG_CON_BRSDIS BIT(12) ++#define MCP251XFD_REG_CON_BUSY BIT(11) ++#define MCP251XFD_REG_CON_WFT_MASK GENMASK(10, 9) ++#define MCP251XFD_REG_CON_WFT_T00FILTER 0x0 ++#define MCP251XFD_REG_CON_WFT_T01FILTER 0x1 ++#define MCP251XFD_REG_CON_WFT_T10FILTER 0x2 ++#define MCP251XFD_REG_CON_WFT_T11FILTER 0x3 ++#define MCP251XFD_REG_CON_WAKFIL BIT(8) ++#define MCP251XFD_REG_CON_PXEDIS BIT(6) ++#define MCP251XFD_REG_CON_ISOCRCEN BIT(5) ++#define MCP251XFD_REG_CON_DNCNT_MASK GENMASK(4, 0) ++ ++#define MCP251XFD_REG_NBTCFG 0x04 ++#define MCP251XFD_REG_NBTCFG_BRP_MASK GENMASK(31, 24) ++#define MCP251XFD_REG_NBTCFG_TSEG1_MASK GENMASK(23, 16) ++#define MCP251XFD_REG_NBTCFG_TSEG2_MASK GENMASK(14, 8) ++#define MCP251XFD_REG_NBTCFG_SJW_MASK GENMASK(6, 0) ++ ++#define MCP251XFD_REG_DBTCFG 0x08 ++#define MCP251XFD_REG_DBTCFG_BRP_MASK GENMASK(31, 24) ++#define MCP251XFD_REG_DBTCFG_TSEG1_MASK GENMASK(20, 16) ++#define MCP251XFD_REG_DBTCFG_TSEG2_MASK GENMASK(11, 8) ++#define MCP251XFD_REG_DBTCFG_SJW_MASK GENMASK(3, 0) ++ ++#define MCP251XFD_REG_TDC 0x0c ++#define MCP251XFD_REG_TDC_EDGFLTEN BIT(25) ++#define MCP251XFD_REG_TDC_SID11EN BIT(24) ++#define MCP251XFD_REG_TDC_TDCMOD_MASK GENMASK(17, 16) ++#define MCP251XFD_REG_TDC_TDCMOD_AUTO 2 ++#define MCP251XFD_REG_TDC_TDCMOD_MANUAL 1 ++#define MCP251XFD_REG_TDC_TDCMOD_DISABLED 0 ++#define MCP251XFD_REG_TDC_TDCO_MASK GENMASK(14, 8) ++#define MCP251XFD_REG_TDC_TDCV_MASK GENMASK(5, 0) ++ ++#define MCP251XFD_REG_TBC 0x10 ++ ++#define MCP251XFD_REG_TSCON 0x14 ++#define MCP251XFD_REG_TSCON_TSRES BIT(18) ++#define MCP251XFD_REG_TSCON_TSEOF BIT(17) ++#define MCP251XFD_REG_TSCON_TBCEN BIT(16) ++#define MCP251XFD_REG_TSCON_TBCPRE_MASK GENMASK(9, 0) ++ ++#define MCP251XFD_REG_VEC 0x18 ++#define MCP251XFD_REG_VEC_RXCODE_MASK GENMASK(30, 24) ++#define MCP251XFD_REG_VEC_TXCODE_MASK GENMASK(22, 16) ++#define MCP251XFD_REG_VEC_FILHIT_MASK GENMASK(12, 8) ++#define MCP251XFD_REG_VEC_ICODE_MASK GENMASK(6, 0) ++ ++#define MCP251XFD_REG_INT 0x1c ++#define MCP251XFD_REG_INT_IF_MASK GENMASK(15, 0) ++#define MCP251XFD_REG_INT_IE_MASK GENMASK(31, 16) ++#define MCP251XFD_REG_INT_IVMIE BIT(31) ++#define MCP251XFD_REG_INT_WAKIE BIT(30) ++#define MCP251XFD_REG_INT_CERRIE BIT(29) ++#define MCP251XFD_REG_INT_SERRIE BIT(28) ++#define MCP251XFD_REG_INT_RXOVIE BIT(27) ++#define MCP251XFD_REG_INT_TXATIE BIT(26) ++#define MCP251XFD_REG_INT_SPICRCIE BIT(25) ++#define MCP251XFD_REG_INT_ECCIE BIT(24) ++#define MCP251XFD_REG_INT_TEFIE BIT(20) ++#define MCP251XFD_REG_INT_MODIE BIT(19) ++#define MCP251XFD_REG_INT_TBCIE BIT(18) ++#define MCP251XFD_REG_INT_RXIE BIT(17) ++#define MCP251XFD_REG_INT_TXIE BIT(16) ++#define MCP251XFD_REG_INT_IVMIF BIT(15) ++#define MCP251XFD_REG_INT_WAKIF BIT(14) ++#define MCP251XFD_REG_INT_CERRIF BIT(13) ++#define MCP251XFD_REG_INT_SERRIF BIT(12) ++#define MCP251XFD_REG_INT_RXOVIF BIT(11) ++#define MCP251XFD_REG_INT_TXATIF BIT(10) ++#define MCP251XFD_REG_INT_SPICRCIF BIT(9) ++#define MCP251XFD_REG_INT_ECCIF BIT(8) ++#define MCP251XFD_REG_INT_TEFIF BIT(4) ++#define MCP251XFD_REG_INT_MODIF BIT(3) ++#define MCP251XFD_REG_INT_TBCIF BIT(2) ++#define MCP251XFD_REG_INT_RXIF BIT(1) ++#define MCP251XFD_REG_INT_TXIF BIT(0) + /* These IRQ flags must be cleared by SW in the CAN_INT register */ +-#define MCP25XXFD_REG_INT_IF_CLEARABLE_MASK \ +- (MCP25XXFD_REG_INT_IVMIF | MCP25XXFD_REG_INT_WAKIF | \ +- MCP25XXFD_REG_INT_CERRIF | MCP25XXFD_REG_INT_SERRIF | \ +- MCP25XXFD_REG_INT_MODIF) +- +-#define MCP25XXFD_REG_RXIF 0x20 +-#define MCP25XXFD_REG_TXIF 0x24 +-#define MCP25XXFD_REG_RXOVIF 0x28 +-#define MCP25XXFD_REG_TXATIF 0x2c +-#define MCP25XXFD_REG_TXREQ 0x30 +- +-#define MCP25XXFD_REG_TREC 0x34 +-#define MCP25XXFD_REG_TREC_TXBO BIT(21) +-#define MCP25XXFD_REG_TREC_TXBP BIT(20) +-#define MCP25XXFD_REG_TREC_RXBP BIT(19) +-#define MCP25XXFD_REG_TREC_TXWARN BIT(18) +-#define MCP25XXFD_REG_TREC_RXWARN BIT(17) +-#define MCP25XXFD_REG_TREC_EWARN BIT(16) +-#define MCP25XXFD_REG_TREC_TEC_MASK GENMASK(15, 8) +-#define MCP25XXFD_REG_TREC_REC_MASK GENMASK(7, 0) +- +-#define MCP25XXFD_REG_BDIAG0 0x38 +-#define MCP25XXFD_REG_BDIAG0_DTERRCNT_MASK GENMASK(31, 24) +-#define MCP25XXFD_REG_BDIAG0_DRERRCNT_MASK GENMASK(23, 16) +-#define MCP25XXFD_REG_BDIAG0_NTERRCNT_MASK GENMASK(15, 8) +-#define MCP25XXFD_REG_BDIAG0_NRERRCNT_MASK GENMASK(7, 0) +- +-#define MCP25XXFD_REG_BDIAG1 0x3c +-#define MCP25XXFD_REG_BDIAG1_DLCMM BIT(31) +-#define MCP25XXFD_REG_BDIAG1_ESI BIT(30) +-#define MCP25XXFD_REG_BDIAG1_DCRCERR BIT(29) +-#define MCP25XXFD_REG_BDIAG1_DSTUFERR BIT(28) +-#define MCP25XXFD_REG_BDIAG1_DFORMERR BIT(27) +-#define MCP25XXFD_REG_BDIAG1_DBIT1ERR BIT(25) +-#define MCP25XXFD_REG_BDIAG1_DBIT0ERR BIT(24) +-#define MCP25XXFD_REG_BDIAG1_TXBOERR BIT(23) +-#define MCP25XXFD_REG_BDIAG1_NCRCERR BIT(21) +-#define MCP25XXFD_REG_BDIAG1_NSTUFERR BIT(20) +-#define MCP25XXFD_REG_BDIAG1_NFORMERR BIT(19) +-#define MCP25XXFD_REG_BDIAG1_NACKERR BIT(18) +-#define MCP25XXFD_REG_BDIAG1_NBIT1ERR BIT(17) +-#define MCP25XXFD_REG_BDIAG1_NBIT0ERR BIT(16) +-#define MCP25XXFD_REG_BDIAG1_BERR_MASK \ +- (MCP25XXFD_REG_BDIAG1_DLCMM | MCP25XXFD_REG_BDIAG1_ESI | \ +- MCP25XXFD_REG_BDIAG1_DCRCERR | MCP25XXFD_REG_BDIAG1_DSTUFERR | \ +- MCP25XXFD_REG_BDIAG1_DFORMERR | MCP25XXFD_REG_BDIAG1_DBIT1ERR | \ +- MCP25XXFD_REG_BDIAG1_DBIT0ERR | MCP25XXFD_REG_BDIAG1_TXBOERR | \ +- MCP25XXFD_REG_BDIAG1_NCRCERR | MCP25XXFD_REG_BDIAG1_NSTUFERR | \ +- MCP25XXFD_REG_BDIAG1_NFORMERR | MCP25XXFD_REG_BDIAG1_NACKERR | \ +- MCP25XXFD_REG_BDIAG1_NBIT1ERR | MCP25XXFD_REG_BDIAG1_NBIT0ERR) +-#define MCP25XXFD_REG_BDIAG1_EFMSGCNT_MASK GENMASK(15, 0) +- +-#define MCP25XXFD_REG_TEFCON 0x40 +-#define MCP25XXFD_REG_TEFCON_FSIZE_MASK GENMASK(28, 24) +-#define MCP25XXFD_REG_TEFCON_FRESET BIT(10) +-#define MCP25XXFD_REG_TEFCON_UINC BIT(8) +-#define MCP25XXFD_REG_TEFCON_TEFTSEN BIT(5) +-#define MCP25XXFD_REG_TEFCON_TEFOVIE BIT(3) +-#define MCP25XXFD_REG_TEFCON_TEFFIE BIT(2) +-#define MCP25XXFD_REG_TEFCON_TEFHIE BIT(1) +-#define MCP25XXFD_REG_TEFCON_TEFNEIE BIT(0) +- +-#define MCP25XXFD_REG_TEFSTA 0x44 +-#define MCP25XXFD_REG_TEFSTA_TEFOVIF BIT(3) +-#define MCP25XXFD_REG_TEFSTA_TEFFIF BIT(2) +-#define MCP25XXFD_REG_TEFSTA_TEFHIF BIT(1) +-#define MCP25XXFD_REG_TEFSTA_TEFNEIF BIT(0) +- +-#define MCP25XXFD_REG_TEFUA 0x48 +- +-#define MCP25XXFD_REG_TXQCON 0x50 +-#define MCP25XXFD_REG_TXQCON_PLSIZE_MASK GENMASK(31, 29) +-#define MCP25XXFD_REG_TXQCON_PLSIZE_8 0 +-#define MCP25XXFD_REG_TXQCON_PLSIZE_12 1 +-#define MCP25XXFD_REG_TXQCON_PLSIZE_16 2 +-#define MCP25XXFD_REG_TXQCON_PLSIZE_20 3 +-#define MCP25XXFD_REG_TXQCON_PLSIZE_24 4 +-#define MCP25XXFD_REG_TXQCON_PLSIZE_32 5 +-#define MCP25XXFD_REG_TXQCON_PLSIZE_48 6 +-#define MCP25XXFD_REG_TXQCON_PLSIZE_64 7 +-#define MCP25XXFD_REG_TXQCON_FSIZE_MASK GENMASK(28, 24) +-#define MCP25XXFD_REG_TXQCON_TXAT_UNLIMITED 3 +-#define MCP25XXFD_REG_TXQCON_TXAT_THREE_SHOT 1 +-#define MCP25XXFD_REG_TXQCON_TXAT_ONE_SHOT 0 +-#define MCP25XXFD_REG_TXQCON_TXAT_MASK GENMASK(22, 21) +-#define MCP25XXFD_REG_TXQCON_TXPRI_MASK GENMASK(20, 16) +-#define MCP25XXFD_REG_TXQCON_FRESET BIT(10) +-#define MCP25XXFD_REG_TXQCON_TXREQ BIT(9) +-#define MCP25XXFD_REG_TXQCON_UINC BIT(8) +-#define MCP25XXFD_REG_TXQCON_TXEN BIT(7) +-#define MCP25XXFD_REG_TXQCON_TXATIE BIT(4) +-#define MCP25XXFD_REG_TXQCON_TXQEIE BIT(2) +-#define MCP25XXFD_REG_TXQCON_TXQNIE BIT(0) +- +-#define MCP25XXFD_REG_TXQSTA 0x54 +-#define MCP25XXFD_REG_TXQSTA_TXQCI_MASK GENMASK(12, 8) +-#define MCP25XXFD_REG_TXQSTA_TXABT BIT(7) +-#define MCP25XXFD_REG_TXQSTA_TXLARB BIT(6) +-#define MCP25XXFD_REG_TXQSTA_TXERR BIT(5) +-#define MCP25XXFD_REG_TXQSTA_TXATIF BIT(4) +-#define MCP25XXFD_REG_TXQSTA_TXQEIF BIT(2) +-#define MCP25XXFD_REG_TXQSTA_TXQNIF BIT(0) +- +-#define MCP25XXFD_REG_TXQUA 0x58 +- +-#define MCP25XXFD_REG_FIFOCON(x) (0x50 + 0xc * (x)) +-#define MCP25XXFD_REG_FIFOCON_PLSIZE_MASK GENMASK(31, 29) +-#define MCP25XXFD_REG_FIFOCON_PLSIZE_8 0 +-#define MCP25XXFD_REG_FIFOCON_PLSIZE_12 1 +-#define MCP25XXFD_REG_FIFOCON_PLSIZE_16 2 +-#define MCP25XXFD_REG_FIFOCON_PLSIZE_20 3 +-#define MCP25XXFD_REG_FIFOCON_PLSIZE_24 4 +-#define MCP25XXFD_REG_FIFOCON_PLSIZE_32 5 +-#define MCP25XXFD_REG_FIFOCON_PLSIZE_48 6 +-#define MCP25XXFD_REG_FIFOCON_PLSIZE_64 7 +-#define MCP25XXFD_REG_FIFOCON_FSIZE_MASK GENMASK(28, 24) +-#define MCP25XXFD_REG_FIFOCON_TXAT_MASK GENMASK(22, 21) +-#define MCP25XXFD_REG_FIFOCON_TXAT_ONE_SHOT 0 +-#define MCP25XXFD_REG_FIFOCON_TXAT_THREE_SHOT 1 +-#define MCP25XXFD_REG_FIFOCON_TXAT_UNLIMITED 3 +-#define MCP25XXFD_REG_FIFOCON_TXPRI_MASK GENMASK(20, 16) +-#define MCP25XXFD_REG_FIFOCON_FRESET BIT(10) +-#define MCP25XXFD_REG_FIFOCON_TXREQ BIT(9) +-#define MCP25XXFD_REG_FIFOCON_UINC BIT(8) +-#define MCP25XXFD_REG_FIFOCON_TXEN BIT(7) +-#define MCP25XXFD_REG_FIFOCON_RTREN BIT(6) +-#define MCP25XXFD_REG_FIFOCON_RXTSEN BIT(5) +-#define MCP25XXFD_REG_FIFOCON_TXATIE BIT(4) +-#define MCP25XXFD_REG_FIFOCON_RXOVIE BIT(3) +-#define MCP25XXFD_REG_FIFOCON_TFERFFIE BIT(2) +-#define MCP25XXFD_REG_FIFOCON_TFHRFHIE BIT(1) +-#define MCP25XXFD_REG_FIFOCON_TFNRFNIE BIT(0) +- +-#define MCP25XXFD_REG_FIFOSTA(x) (0x54 + 0xc * (x)) +-#define MCP25XXFD_REG_FIFOSTA_FIFOCI_MASK GENMASK(12, 8) +-#define MCP25XXFD_REG_FIFOSTA_TXABT BIT(7) +-#define MCP25XXFD_REG_FIFOSTA_TXLARB BIT(6) +-#define MCP25XXFD_REG_FIFOSTA_TXERR BIT(5) +-#define MCP25XXFD_REG_FIFOSTA_TXATIF BIT(4) +-#define MCP25XXFD_REG_FIFOSTA_RXOVIF BIT(3) +-#define MCP25XXFD_REG_FIFOSTA_TFERFFIF BIT(2) +-#define MCP25XXFD_REG_FIFOSTA_TFHRFHIF BIT(1) +-#define MCP25XXFD_REG_FIFOSTA_TFNRFNIF BIT(0) +- +-#define MCP25XXFD_REG_FIFOUA(x) (0x58 + 0xc * (x)) +- +-#define MCP25XXFD_REG_FLTCON(x) (0x1d0 + 0x4 * (x)) +-#define MCP25XXFD_REG_FLTCON_FLTEN3 BIT(31) +-#define MCP25XXFD_REG_FLTCON_F3BP_MASK GENMASK(28, 24) +-#define MCP25XXFD_REG_FLTCON_FLTEN2 BIT(23) +-#define MCP25XXFD_REG_FLTCON_F2BP_MASK GENMASK(20, 16) +-#define MCP25XXFD_REG_FLTCON_FLTEN1 BIT(15) +-#define MCP25XXFD_REG_FLTCON_F1BP_MASK GENMASK(12, 8) +-#define MCP25XXFD_REG_FLTCON_FLTEN0 BIT(7) +-#define MCP25XXFD_REG_FLTCON_F0BP_MASK GENMASK(4, 0) +-#define MCP25XXFD_REG_FLTCON_FLTEN(x) (BIT(7) << 8 * ((x) & 0x3)) +-#define MCP25XXFD_REG_FLTCON_FLT_MASK(x) (GENMASK(7, 0) << (8 * ((x) & 0x3))) +-#define MCP25XXFD_REG_FLTCON_FBP(x, fifo) ((fifo) << 8 * ((x) & 0x3)) +- +-#define MCP25XXFD_REG_FLTOBJ(x) (0x1f0 + 0x8 * (x)) +-#define MCP25XXFD_REG_FLTOBJ_EXIDE BIT(30) +-#define MCP25XXFD_REG_FLTOBJ_SID11 BIT(29) +-#define MCP25XXFD_REG_FLTOBJ_EID_MASK GENMASK(28, 11) +-#define MCP25XXFD_REG_FLTOBJ_SID_MASK GENMASK(10, 0) +- +-#define MCP25XXFD_REG_FLTMASK(x) (0x1f4 + 0x8 * (x)) +-#define MCP25XXFD_REG_MASK_MIDE BIT(30) +-#define MCP25XXFD_REG_MASK_MSID11 BIT(29) +-#define MCP25XXFD_REG_MASK_MEID_MASK GENMASK(28, 11) +-#define MCP25XXFD_REG_MASK_MSID_MASK GENMASK(10, 0) ++#define MCP251XFD_REG_INT_IF_CLEARABLE_MASK \ ++ (MCP251XFD_REG_INT_IVMIF | MCP251XFD_REG_INT_WAKIF | \ ++ MCP251XFD_REG_INT_CERRIF | MCP251XFD_REG_INT_SERRIF | \ ++ MCP251XFD_REG_INT_MODIF) ++ ++#define MCP251XFD_REG_RXIF 0x20 ++#define MCP251XFD_REG_TXIF 0x24 ++#define MCP251XFD_REG_RXOVIF 0x28 ++#define MCP251XFD_REG_TXATIF 0x2c ++#define MCP251XFD_REG_TXREQ 0x30 ++ ++#define MCP251XFD_REG_TREC 0x34 ++#define MCP251XFD_REG_TREC_TXBO BIT(21) ++#define MCP251XFD_REG_TREC_TXBP BIT(20) ++#define MCP251XFD_REG_TREC_RXBP BIT(19) ++#define MCP251XFD_REG_TREC_TXWARN BIT(18) ++#define MCP251XFD_REG_TREC_RXWARN BIT(17) ++#define MCP251XFD_REG_TREC_EWARN BIT(16) ++#define MCP251XFD_REG_TREC_TEC_MASK GENMASK(15, 8) ++#define MCP251XFD_REG_TREC_REC_MASK GENMASK(7, 0) ++ ++#define MCP251XFD_REG_BDIAG0 0x38 ++#define MCP251XFD_REG_BDIAG0_DTERRCNT_MASK GENMASK(31, 24) ++#define MCP251XFD_REG_BDIAG0_DRERRCNT_MASK GENMASK(23, 16) ++#define MCP251XFD_REG_BDIAG0_NTERRCNT_MASK GENMASK(15, 8) ++#define MCP251XFD_REG_BDIAG0_NRERRCNT_MASK GENMASK(7, 0) ++ ++#define MCP251XFD_REG_BDIAG1 0x3c ++#define MCP251XFD_REG_BDIAG1_DLCMM BIT(31) ++#define MCP251XFD_REG_BDIAG1_ESI BIT(30) ++#define MCP251XFD_REG_BDIAG1_DCRCERR BIT(29) ++#define MCP251XFD_REG_BDIAG1_DSTUFERR BIT(28) ++#define MCP251XFD_REG_BDIAG1_DFORMERR BIT(27) ++#define MCP251XFD_REG_BDIAG1_DBIT1ERR BIT(25) ++#define MCP251XFD_REG_BDIAG1_DBIT0ERR BIT(24) ++#define MCP251XFD_REG_BDIAG1_TXBOERR BIT(23) ++#define MCP251XFD_REG_BDIAG1_NCRCERR BIT(21) ++#define MCP251XFD_REG_BDIAG1_NSTUFERR BIT(20) ++#define MCP251XFD_REG_BDIAG1_NFORMERR BIT(19) ++#define MCP251XFD_REG_BDIAG1_NACKERR BIT(18) ++#define MCP251XFD_REG_BDIAG1_NBIT1ERR BIT(17) ++#define MCP251XFD_REG_BDIAG1_NBIT0ERR BIT(16) ++#define MCP251XFD_REG_BDIAG1_BERR_MASK \ ++ (MCP251XFD_REG_BDIAG1_DLCMM | MCP251XFD_REG_BDIAG1_ESI | \ ++ MCP251XFD_REG_BDIAG1_DCRCERR | MCP251XFD_REG_BDIAG1_DSTUFERR | \ ++ MCP251XFD_REG_BDIAG1_DFORMERR | MCP251XFD_REG_BDIAG1_DBIT1ERR | \ ++ MCP251XFD_REG_BDIAG1_DBIT0ERR | MCP251XFD_REG_BDIAG1_TXBOERR | \ ++ MCP251XFD_REG_BDIAG1_NCRCERR | MCP251XFD_REG_BDIAG1_NSTUFERR | \ ++ MCP251XFD_REG_BDIAG1_NFORMERR | MCP251XFD_REG_BDIAG1_NACKERR | \ ++ MCP251XFD_REG_BDIAG1_NBIT1ERR | MCP251XFD_REG_BDIAG1_NBIT0ERR) ++#define MCP251XFD_REG_BDIAG1_EFMSGCNT_MASK GENMASK(15, 0) ++ ++#define MCP251XFD_REG_TEFCON 0x40 ++#define MCP251XFD_REG_TEFCON_FSIZE_MASK GENMASK(28, 24) ++#define MCP251XFD_REG_TEFCON_FRESET BIT(10) ++#define MCP251XFD_REG_TEFCON_UINC BIT(8) ++#define MCP251XFD_REG_TEFCON_TEFTSEN BIT(5) ++#define MCP251XFD_REG_TEFCON_TEFOVIE BIT(3) ++#define MCP251XFD_REG_TEFCON_TEFFIE BIT(2) ++#define MCP251XFD_REG_TEFCON_TEFHIE BIT(1) ++#define MCP251XFD_REG_TEFCON_TEFNEIE BIT(0) ++ ++#define MCP251XFD_REG_TEFSTA 0x44 ++#define MCP251XFD_REG_TEFSTA_TEFOVIF BIT(3) ++#define MCP251XFD_REG_TEFSTA_TEFFIF BIT(2) ++#define MCP251XFD_REG_TEFSTA_TEFHIF BIT(1) ++#define MCP251XFD_REG_TEFSTA_TEFNEIF BIT(0) ++ ++#define MCP251XFD_REG_TEFUA 0x48 ++ ++#define MCP251XFD_REG_TXQCON 0x50 ++#define MCP251XFD_REG_TXQCON_PLSIZE_MASK GENMASK(31, 29) ++#define MCP251XFD_REG_TXQCON_PLSIZE_8 0 ++#define MCP251XFD_REG_TXQCON_PLSIZE_12 1 ++#define MCP251XFD_REG_TXQCON_PLSIZE_16 2 ++#define MCP251XFD_REG_TXQCON_PLSIZE_20 3 ++#define MCP251XFD_REG_TXQCON_PLSIZE_24 4 ++#define MCP251XFD_REG_TXQCON_PLSIZE_32 5 ++#define MCP251XFD_REG_TXQCON_PLSIZE_48 6 ++#define MCP251XFD_REG_TXQCON_PLSIZE_64 7 ++#define MCP251XFD_REG_TXQCON_FSIZE_MASK GENMASK(28, 24) ++#define MCP251XFD_REG_TXQCON_TXAT_UNLIMITED 3 ++#define MCP251XFD_REG_TXQCON_TXAT_THREE_SHOT 1 ++#define MCP251XFD_REG_TXQCON_TXAT_ONE_SHOT 0 ++#define MCP251XFD_REG_TXQCON_TXAT_MASK GENMASK(22, 21) ++#define MCP251XFD_REG_TXQCON_TXPRI_MASK GENMASK(20, 16) ++#define MCP251XFD_REG_TXQCON_FRESET BIT(10) ++#define MCP251XFD_REG_TXQCON_TXREQ BIT(9) ++#define MCP251XFD_REG_TXQCON_UINC BIT(8) ++#define MCP251XFD_REG_TXQCON_TXEN BIT(7) ++#define MCP251XFD_REG_TXQCON_TXATIE BIT(4) ++#define MCP251XFD_REG_TXQCON_TXQEIE BIT(2) ++#define MCP251XFD_REG_TXQCON_TXQNIE BIT(0) ++ ++#define MCP251XFD_REG_TXQSTA 0x54 ++#define MCP251XFD_REG_TXQSTA_TXQCI_MASK GENMASK(12, 8) ++#define MCP251XFD_REG_TXQSTA_TXABT BIT(7) ++#define MCP251XFD_REG_TXQSTA_TXLARB BIT(6) ++#define MCP251XFD_REG_TXQSTA_TXERR BIT(5) ++#define MCP251XFD_REG_TXQSTA_TXATIF BIT(4) ++#define MCP251XFD_REG_TXQSTA_TXQEIF BIT(2) ++#define MCP251XFD_REG_TXQSTA_TXQNIF BIT(0) ++ ++#define MCP251XFD_REG_TXQUA 0x58 ++ ++#define MCP251XFD_REG_FIFOCON(x) (0x50 + 0xc * (x)) ++#define MCP251XFD_REG_FIFOCON_PLSIZE_MASK GENMASK(31, 29) ++#define MCP251XFD_REG_FIFOCON_PLSIZE_8 0 ++#define MCP251XFD_REG_FIFOCON_PLSIZE_12 1 ++#define MCP251XFD_REG_FIFOCON_PLSIZE_16 2 ++#define MCP251XFD_REG_FIFOCON_PLSIZE_20 3 ++#define MCP251XFD_REG_FIFOCON_PLSIZE_24 4 ++#define MCP251XFD_REG_FIFOCON_PLSIZE_32 5 ++#define MCP251XFD_REG_FIFOCON_PLSIZE_48 6 ++#define MCP251XFD_REG_FIFOCON_PLSIZE_64 7 ++#define MCP251XFD_REG_FIFOCON_FSIZE_MASK GENMASK(28, 24) ++#define MCP251XFD_REG_FIFOCON_TXAT_MASK GENMASK(22, 21) ++#define MCP251XFD_REG_FIFOCON_TXAT_ONE_SHOT 0 ++#define MCP251XFD_REG_FIFOCON_TXAT_THREE_SHOT 1 ++#define MCP251XFD_REG_FIFOCON_TXAT_UNLIMITED 3 ++#define MCP251XFD_REG_FIFOCON_TXPRI_MASK GENMASK(20, 16) ++#define MCP251XFD_REG_FIFOCON_FRESET BIT(10) ++#define MCP251XFD_REG_FIFOCON_TXREQ BIT(9) ++#define MCP251XFD_REG_FIFOCON_UINC BIT(8) ++#define MCP251XFD_REG_FIFOCON_TXEN BIT(7) ++#define MCP251XFD_REG_FIFOCON_RTREN BIT(6) ++#define MCP251XFD_REG_FIFOCON_RXTSEN BIT(5) ++#define MCP251XFD_REG_FIFOCON_TXATIE BIT(4) ++#define MCP251XFD_REG_FIFOCON_RXOVIE BIT(3) ++#define MCP251XFD_REG_FIFOCON_TFERFFIE BIT(2) ++#define MCP251XFD_REG_FIFOCON_TFHRFHIE BIT(1) ++#define MCP251XFD_REG_FIFOCON_TFNRFNIE BIT(0) ++ ++#define MCP251XFD_REG_FIFOSTA(x) (0x54 + 0xc * (x)) ++#define MCP251XFD_REG_FIFOSTA_FIFOCI_MASK GENMASK(12, 8) ++#define MCP251XFD_REG_FIFOSTA_TXABT BIT(7) ++#define MCP251XFD_REG_FIFOSTA_TXLARB BIT(6) ++#define MCP251XFD_REG_FIFOSTA_TXERR BIT(5) ++#define MCP251XFD_REG_FIFOSTA_TXATIF BIT(4) ++#define MCP251XFD_REG_FIFOSTA_RXOVIF BIT(3) ++#define MCP251XFD_REG_FIFOSTA_TFERFFIF BIT(2) ++#define MCP251XFD_REG_FIFOSTA_TFHRFHIF BIT(1) ++#define MCP251XFD_REG_FIFOSTA_TFNRFNIF BIT(0) ++ ++#define MCP251XFD_REG_FIFOUA(x) (0x58 + 0xc * (x)) ++ ++#define MCP251XFD_REG_FLTCON(x) (0x1d0 + 0x4 * (x)) ++#define MCP251XFD_REG_FLTCON_FLTEN3 BIT(31) ++#define MCP251XFD_REG_FLTCON_F3BP_MASK GENMASK(28, 24) ++#define MCP251XFD_REG_FLTCON_FLTEN2 BIT(23) ++#define MCP251XFD_REG_FLTCON_F2BP_MASK GENMASK(20, 16) ++#define MCP251XFD_REG_FLTCON_FLTEN1 BIT(15) ++#define MCP251XFD_REG_FLTCON_F1BP_MASK GENMASK(12, 8) ++#define MCP251XFD_REG_FLTCON_FLTEN0 BIT(7) ++#define MCP251XFD_REG_FLTCON_F0BP_MASK GENMASK(4, 0) ++#define MCP251XFD_REG_FLTCON_FLTEN(x) (BIT(7) << 8 * ((x) & 0x3)) ++#define MCP251XFD_REG_FLTCON_FLT_MASK(x) (GENMASK(7, 0) << (8 * ((x) & 0x3))) ++#define MCP251XFD_REG_FLTCON_FBP(x, fifo) ((fifo) << 8 * ((x) & 0x3)) ++ ++#define MCP251XFD_REG_FLTOBJ(x) (0x1f0 + 0x8 * (x)) ++#define MCP251XFD_REG_FLTOBJ_EXIDE BIT(30) ++#define MCP251XFD_REG_FLTOBJ_SID11 BIT(29) ++#define MCP251XFD_REG_FLTOBJ_EID_MASK GENMASK(28, 11) ++#define MCP251XFD_REG_FLTOBJ_SID_MASK GENMASK(10, 0) ++ ++#define MCP251XFD_REG_FLTMASK(x) (0x1f4 + 0x8 * (x)) ++#define MCP251XFD_REG_MASK_MIDE BIT(30) ++#define MCP251XFD_REG_MASK_MSID11 BIT(29) ++#define MCP251XFD_REG_MASK_MEID_MASK GENMASK(28, 11) ++#define MCP251XFD_REG_MASK_MSID_MASK GENMASK(10, 0) + + /* RAM */ +-#define MCP25XXFD_RAM_START 0x400 +-#define MCP25XXFD_RAM_SIZE SZ_2K ++#define MCP251XFD_RAM_START 0x400 ++#define MCP251XFD_RAM_SIZE SZ_2K + + /* Message Object */ +-#define MCP25XXFD_OBJ_ID_SID11 BIT(29) +-#define MCP25XXFD_OBJ_ID_EID_MASK GENMASK(28, 11) +-#define MCP25XXFD_OBJ_ID_SID_MASK GENMASK(10, 0) +-#define MCP25XXFD_OBJ_FLAGS_SEQ_MCP2518FD_MASK GENMASK(31, 9) +-#define MCP25XXFD_OBJ_FLAGS_SEQ_MCP2517FD_MASK GENMASK(15, 9) +-#define MCP25XXFD_OBJ_FLAGS_SEQ_MASK MCP25XXFD_OBJ_FLAGS_SEQ_MCP2518FD_MASK +-#define MCP25XXFD_OBJ_FLAGS_ESI BIT(8) +-#define MCP25XXFD_OBJ_FLAGS_FDF BIT(7) +-#define MCP25XXFD_OBJ_FLAGS_BRS BIT(6) +-#define MCP25XXFD_OBJ_FLAGS_RTR BIT(5) +-#define MCP25XXFD_OBJ_FLAGS_IDE BIT(4) +-#define MCP25XXFD_OBJ_FLAGS_DLC GENMASK(3, 0) +- +-#define MCP25XXFD_REG_FRAME_EFF_SID_MASK GENMASK(28, 18) +-#define MCP25XXFD_REG_FRAME_EFF_EID_MASK GENMASK(17, 0) ++#define MCP251XFD_OBJ_ID_SID11 BIT(29) ++#define MCP251XFD_OBJ_ID_EID_MASK GENMASK(28, 11) ++#define MCP251XFD_OBJ_ID_SID_MASK GENMASK(10, 0) ++#define MCP251XFD_OBJ_FLAGS_SEQ_MCP2518FD_MASK GENMASK(31, 9) ++#define MCP251XFD_OBJ_FLAGS_SEQ_MCP2517FD_MASK GENMASK(15, 9) ++#define MCP251XFD_OBJ_FLAGS_SEQ_MASK MCP251XFD_OBJ_FLAGS_SEQ_MCP2518FD_MASK ++#define MCP251XFD_OBJ_FLAGS_ESI BIT(8) ++#define MCP251XFD_OBJ_FLAGS_FDF BIT(7) ++#define MCP251XFD_OBJ_FLAGS_BRS BIT(6) ++#define MCP251XFD_OBJ_FLAGS_RTR BIT(5) ++#define MCP251XFD_OBJ_FLAGS_IDE BIT(4) ++#define MCP251XFD_OBJ_FLAGS_DLC GENMASK(3, 0) ++ ++#define MCP251XFD_REG_FRAME_EFF_SID_MASK GENMASK(28, 18) ++#define MCP251XFD_REG_FRAME_EFF_EID_MASK GENMASK(17, 0) + + /* MCP2517/18FD SFR */ +-#define MCP25XXFD_REG_OSC 0xe00 +-#define MCP25XXFD_REG_OSC_SCLKRDY BIT(12) +-#define MCP25XXFD_REG_OSC_OSCRDY BIT(10) +-#define MCP25XXFD_REG_OSC_PLLRDY BIT(8) +-#define MCP25XXFD_REG_OSC_CLKODIV_10 3 +-#define MCP25XXFD_REG_OSC_CLKODIV_4 2 +-#define MCP25XXFD_REG_OSC_CLKODIV_2 1 +-#define MCP25XXFD_REG_OSC_CLKODIV_1 0 +-#define MCP25XXFD_REG_OSC_CLKODIV_MASK GENMASK(6, 5) +-#define MCP25XXFD_REG_OSC_SCLKDIV BIT(4) +-#define MCP25XXFD_REG_OSC_LPMEN BIT(3) /* MCP2518FD only */ +-#define MCP25XXFD_REG_OSC_OSCDIS BIT(2) +-#define MCP25XXFD_REG_OSC_PLLEN BIT(0) +- +-#define MCP25XXFD_REG_IOCON 0xe04 +-#define MCP25XXFD_REG_IOCON_INTOD BIT(30) +-#define MCP25XXFD_REG_IOCON_SOF BIT(29) +-#define MCP25XXFD_REG_IOCON_TXCANOD BIT(28) +-#define MCP25XXFD_REG_IOCON_PM1 BIT(25) +-#define MCP25XXFD_REG_IOCON_PM0 BIT(24) +-#define MCP25XXFD_REG_IOCON_GPIO1 BIT(17) +-#define MCP25XXFD_REG_IOCON_GPIO0 BIT(16) +-#define MCP25XXFD_REG_IOCON_LAT1 BIT(9) +-#define MCP25XXFD_REG_IOCON_LAT0 BIT(8) +-#define MCP25XXFD_REG_IOCON_XSTBYEN BIT(6) +-#define MCP25XXFD_REG_IOCON_TRIS1 BIT(1) +-#define MCP25XXFD_REG_IOCON_TRIS0 BIT(0) +- +-#define MCP25XXFD_REG_CRC 0xe08 +-#define MCP25XXFD_REG_CRC_FERRIE BIT(25) +-#define MCP25XXFD_REG_CRC_CRCERRIE BIT(24) +-#define MCP25XXFD_REG_CRC_FERRIF BIT(17) +-#define MCP25XXFD_REG_CRC_CRCERRIF BIT(16) +-#define MCP25XXFD_REG_CRC_IF_MASK GENMASK(17, 16) +-#define MCP25XXFD_REG_CRC_MASK GENMASK(15, 0) +- +-#define MCP25XXFD_REG_ECCCON 0xe0c +-#define MCP25XXFD_REG_ECCCON_PARITY_MASK GENMASK(14, 8) +-#define MCP25XXFD_REG_ECCCON_DEDIE BIT(2) +-#define MCP25XXFD_REG_ECCCON_SECIE BIT(1) +-#define MCP25XXFD_REG_ECCCON_ECCEN BIT(0) +- +-#define MCP25XXFD_REG_ECCSTAT 0xe10 +-#define MCP25XXFD_REG_ECCSTAT_ERRADDR_MASK GENMASK(27, 16) +-#define MCP25XXFD_REG_ECCSTAT_IF_MASK GENMASK(2, 1) +-#define MCP25XXFD_REG_ECCSTAT_DEDIF BIT(2) +-#define MCP25XXFD_REG_ECCSTAT_SECIF BIT(1) +- +-#define MCP25XXFD_REG_DEVID 0xe14 /* MCP2518FD only */ +-#define MCP25XXFD_REG_DEVID_ID_MASK GENMASK(7, 4) +-#define MCP25XXFD_REG_DEVID_REV_MASK GENMASK(3, 0) ++#define MCP251XFD_REG_OSC 0xe00 ++#define MCP251XFD_REG_OSC_SCLKRDY BIT(12) ++#define MCP251XFD_REG_OSC_OSCRDY BIT(10) ++#define MCP251XFD_REG_OSC_PLLRDY BIT(8) ++#define MCP251XFD_REG_OSC_CLKODIV_10 3 ++#define MCP251XFD_REG_OSC_CLKODIV_4 2 ++#define MCP251XFD_REG_OSC_CLKODIV_2 1 ++#define MCP251XFD_REG_OSC_CLKODIV_1 0 ++#define MCP251XFD_REG_OSC_CLKODIV_MASK GENMASK(6, 5) ++#define MCP251XFD_REG_OSC_SCLKDIV BIT(4) ++#define MCP251XFD_REG_OSC_LPMEN BIT(3) /* MCP2518FD only */ ++#define MCP251XFD_REG_OSC_OSCDIS BIT(2) ++#define MCP251XFD_REG_OSC_PLLEN BIT(0) ++ ++#define MCP251XFD_REG_IOCON 0xe04 ++#define MCP251XFD_REG_IOCON_INTOD BIT(30) ++#define MCP251XFD_REG_IOCON_SOF BIT(29) ++#define MCP251XFD_REG_IOCON_TXCANOD BIT(28) ++#define MCP251XFD_REG_IOCON_PM1 BIT(25) ++#define MCP251XFD_REG_IOCON_PM0 BIT(24) ++#define MCP251XFD_REG_IOCON_GPIO1 BIT(17) ++#define MCP251XFD_REG_IOCON_GPIO0 BIT(16) ++#define MCP251XFD_REG_IOCON_LAT1 BIT(9) ++#define MCP251XFD_REG_IOCON_LAT0 BIT(8) ++#define MCP251XFD_REG_IOCON_XSTBYEN BIT(6) ++#define MCP251XFD_REG_IOCON_TRIS1 BIT(1) ++#define MCP251XFD_REG_IOCON_TRIS0 BIT(0) ++ ++#define MCP251XFD_REG_CRC 0xe08 ++#define MCP251XFD_REG_CRC_FERRIE BIT(25) ++#define MCP251XFD_REG_CRC_CRCERRIE BIT(24) ++#define MCP251XFD_REG_CRC_FERRIF BIT(17) ++#define MCP251XFD_REG_CRC_CRCERRIF BIT(16) ++#define MCP251XFD_REG_CRC_IF_MASK GENMASK(17, 16) ++#define MCP251XFD_REG_CRC_MASK GENMASK(15, 0) ++ ++#define MCP251XFD_REG_ECCCON 0xe0c ++#define MCP251XFD_REG_ECCCON_PARITY_MASK GENMASK(14, 8) ++#define MCP251XFD_REG_ECCCON_DEDIE BIT(2) ++#define MCP251XFD_REG_ECCCON_SECIE BIT(1) ++#define MCP251XFD_REG_ECCCON_ECCEN BIT(0) ++ ++#define MCP251XFD_REG_ECCSTAT 0xe10 ++#define MCP251XFD_REG_ECCSTAT_ERRADDR_MASK GENMASK(27, 16) ++#define MCP251XFD_REG_ECCSTAT_IF_MASK GENMASK(2, 1) ++#define MCP251XFD_REG_ECCSTAT_DEDIF BIT(2) ++#define MCP251XFD_REG_ECCSTAT_SECIF BIT(1) ++ ++#define MCP251XFD_REG_DEVID 0xe14 /* MCP2518FD only */ ++#define MCP251XFD_REG_DEVID_ID_MASK GENMASK(7, 4) ++#define MCP251XFD_REG_DEVID_REV_MASK GENMASK(3, 0) + + /* number of TX FIFO objects, depending on CAN mode + * + * FIFO setup: tef: 8*12 bytes = 96 bytes, tx: 8*16 bytes = 128 bytes + * FIFO setup: tef: 4*12 bytes = 48 bytes, tx: 4*72 bytes = 288 bytes + */ +-#define MCP25XXFD_TX_OBJ_NUM_CAN 8 +-#define MCP25XXFD_TX_OBJ_NUM_CANFD 4 ++#define MCP251XFD_TX_OBJ_NUM_CAN 8 ++#define MCP251XFD_TX_OBJ_NUM_CANFD 4 + +-#if MCP25XXFD_TX_OBJ_NUM_CAN > MCP25XXFD_TX_OBJ_NUM_CANFD +-#define MCP25XXFD_TX_OBJ_NUM_MAX MCP25XXFD_TX_OBJ_NUM_CAN ++#if MCP251XFD_TX_OBJ_NUM_CAN > MCP251XFD_TX_OBJ_NUM_CANFD ++#define MCP251XFD_TX_OBJ_NUM_MAX MCP251XFD_TX_OBJ_NUM_CAN + #else +-#define MCP25XXFD_TX_OBJ_NUM_MAX MCP25XXFD_TX_OBJ_NUM_CANFD ++#define MCP251XFD_TX_OBJ_NUM_MAX MCP251XFD_TX_OBJ_NUM_CANFD + #endif + +-#define MCP25XXFD_NAPI_WEIGHT 32 +-#define MCP25XXFD_TX_FIFO 1 +-#define MCP25XXFD_RX_FIFO(x) (MCP25XXFD_TX_FIFO + 1 + (x)) ++#define MCP251XFD_NAPI_WEIGHT 32 ++#define MCP251XFD_TX_FIFO 1 ++#define MCP251XFD_RX_FIFO(x) (MCP251XFD_TX_FIFO + 1 + (x)) + + /* SPI commands */ +-#define MCP25XXFD_SPI_INSTRUCTION_RESET 0x0000 +-#define MCP25XXFD_SPI_INSTRUCTION_WRITE 0x2000 +-#define MCP25XXFD_SPI_INSTRUCTION_READ 0x3000 +-#define MCP25XXFD_SPI_INSTRUCTION_WRITE_CRC 0xa000 +-#define MCP25XXFD_SPI_INSTRUCTION_READ_CRC 0xb000 +-#define MCP25XXFD_SPI_INSTRUCTION_WRITE_CRC_SAFE 0xc000 +-#define MCP25XXFD_SPI_ADDRESS_MASK GENMASK(11, 0) +- +-#define MCP25XXFD_SYSCLOCK_HZ_MAX 40000000 +-#define MCP25XXFD_SYSCLOCK_HZ_MIN 1000000 +-#define MCP25XXFD_SPICLOCK_HZ_MAX 20000000 +-#define MCP25XXFD_OSC_PLL_MULTIPLIER 10 +-#define MCP25XXFD_OSC_STAB_SLEEP_US (3 * USEC_PER_MSEC) +-#define MCP25XXFD_OSC_STAB_TIMEOUT_US (10 * MCP25XXFD_OSC_STAB_SLEEP_US) +-#define MCP25XXFD_POLL_SLEEP_US (10) +-#define MCP25XXFD_POLL_TIMEOUT_US (USEC_PER_MSEC) +-#define MCP25XXFD_SOFTRESET_RETRIES_MAX 3 +-#define MCP25XXFD_READ_CRC_RETRIES_MAX 3 +-#define MCP25XXFD_ECC_CNT_MAX 2 +-#define MCP25XXFD_SANITIZE_SPI 1 +-#define MCP25XXFD_SANITIZE_CAN 1 ++#define MCP251XFD_SPI_INSTRUCTION_RESET 0x0000 ++#define MCP251XFD_SPI_INSTRUCTION_WRITE 0x2000 ++#define MCP251XFD_SPI_INSTRUCTION_READ 0x3000 ++#define MCP251XFD_SPI_INSTRUCTION_WRITE_CRC 0xa000 ++#define MCP251XFD_SPI_INSTRUCTION_READ_CRC 0xb000 ++#define MCP251XFD_SPI_INSTRUCTION_WRITE_CRC_SAFE 0xc000 ++#define MCP251XFD_SPI_ADDRESS_MASK GENMASK(11, 0) ++ ++#define MCP251XFD_SYSCLOCK_HZ_MAX 40000000 ++#define MCP251XFD_SYSCLOCK_HZ_MIN 1000000 ++#define MCP251XFD_SPICLOCK_HZ_MAX 20000000 ++#define MCP251XFD_OSC_PLL_MULTIPLIER 10 ++#define MCP251XFD_OSC_STAB_SLEEP_US (3 * USEC_PER_MSEC) ++#define MCP251XFD_OSC_STAB_TIMEOUT_US (10 * MCP251XFD_OSC_STAB_SLEEP_US) ++#define MCP251XFD_POLL_SLEEP_US (10) ++#define MCP251XFD_POLL_TIMEOUT_US (USEC_PER_MSEC) ++#define MCP251XFD_SOFTRESET_RETRIES_MAX 3 ++#define MCP251XFD_READ_CRC_RETRIES_MAX 3 ++#define MCP251XFD_ECC_CNT_MAX 2 ++#define MCP251XFD_SANITIZE_SPI 1 ++#define MCP251XFD_SANITIZE_CAN 1 + + /* Silence TX MAB overflow warnings */ +-#define MCP25XXFD_QUIRK_MAB_NO_WARN BIT(0) ++#define MCP251XFD_QUIRK_MAB_NO_WARN BIT(0) + /* Use CRC to access registers */ +-#define MCP25XXFD_QUIRK_CRC_REG BIT(1) ++#define MCP251XFD_QUIRK_CRC_REG BIT(1) + /* Use CRC to access RX/TEF-RAM */ +-#define MCP25XXFD_QUIRK_CRC_RX BIT(2) ++#define MCP251XFD_QUIRK_CRC_RX BIT(2) + /* Use CRC to access TX-RAM */ +-#define MCP25XXFD_QUIRK_CRC_TX BIT(3) ++#define MCP251XFD_QUIRK_CRC_TX BIT(3) + /* Enable ECC for RAM */ +-#define MCP25XXFD_QUIRK_ECC BIT(4) ++#define MCP251XFD_QUIRK_ECC BIT(4) + /* Use Half Duplex SPI transfers */ +-#define MCP25XXFD_QUIRK_HALF_DUPLEX BIT(5) ++#define MCP251XFD_QUIRK_HALF_DUPLEX BIT(5) + +-struct mcp25xxfd_hw_tef_obj { ++struct mcp251xfd_hw_tef_obj { + u32 id; + u32 flags; + u32 ts; +@@ -426,86 +426,86 @@ struct mcp25xxfd_hw_tef_obj { + /* The tx_obj_raw version is used in spi async, i.e. without + * regmap. We have to take care of endianness ourselves. + */ +-struct mcp25xxfd_hw_tx_obj_raw { ++struct mcp251xfd_hw_tx_obj_raw { + __le32 id; + __le32 flags; + u8 data[sizeof_field(struct canfd_frame, data)]; + }; + +-struct mcp25xxfd_hw_tx_obj_can { ++struct mcp251xfd_hw_tx_obj_can { + u32 id; + u32 flags; + u8 data[sizeof_field(struct can_frame, data)]; + }; + +-struct mcp25xxfd_hw_tx_obj_canfd { ++struct mcp251xfd_hw_tx_obj_canfd { + u32 id; + u32 flags; + u8 data[sizeof_field(struct canfd_frame, data)]; + }; + +-struct mcp25xxfd_hw_rx_obj_can { ++struct mcp251xfd_hw_rx_obj_can { + u32 id; + u32 flags; + u32 ts; + u8 data[sizeof_field(struct can_frame, data)]; + }; + +-struct mcp25xxfd_hw_rx_obj_canfd { ++struct mcp251xfd_hw_rx_obj_canfd { + u32 id; + u32 flags; + u32 ts; + u8 data[sizeof_field(struct canfd_frame, data)]; + }; + +-struct mcp25xxfd_tef_ring { ++struct mcp251xfd_tef_ring { + unsigned int head; + unsigned int tail; + + /* u8 obj_num equals tx_ring->obj_num */ +- /* u8 obj_size equals sizeof(struct mcp25xxfd_hw_tef_obj) */ ++ /* u8 obj_size equals sizeof(struct mcp251xfd_hw_tef_obj) */ + }; + +-struct __packed mcp25xxfd_buf_cmd { ++struct __packed mcp251xfd_buf_cmd { + __be16 cmd; + }; + +-struct __packed mcp25xxfd_buf_cmd_crc { ++struct __packed mcp251xfd_buf_cmd_crc { + __be16 cmd; + u8 len; + }; + +-union mcp25xxfd_tx_obj_load_buf { ++union mcp251xfd_tx_obj_load_buf { + struct __packed { +- struct mcp25xxfd_buf_cmd cmd; +- struct mcp25xxfd_hw_tx_obj_raw hw_tx_obj; ++ struct mcp251xfd_buf_cmd cmd; ++ struct mcp251xfd_hw_tx_obj_raw hw_tx_obj; + } nocrc; + struct __packed { +- struct mcp25xxfd_buf_cmd_crc cmd; +- struct mcp25xxfd_hw_tx_obj_raw hw_tx_obj; ++ struct mcp251xfd_buf_cmd_crc cmd; ++ struct mcp251xfd_hw_tx_obj_raw hw_tx_obj; + __be16 crc; + } crc; + } ____cacheline_aligned; + +-union mcp25xxfd_write_reg_buf { ++union mcp251xfd_write_reg_buf { + struct __packed { +- struct mcp25xxfd_buf_cmd cmd; ++ struct mcp251xfd_buf_cmd cmd; + u8 data[4]; + } nocrc; + struct __packed { +- struct mcp25xxfd_buf_cmd_crc cmd; ++ struct mcp251xfd_buf_cmd_crc cmd; + u8 data[4]; + __be16 crc; + } crc; + } ____cacheline_aligned; + +-struct mcp25xxfd_tx_obj { ++struct mcp251xfd_tx_obj { + struct spi_message msg; + struct spi_transfer xfer[2]; +- union mcp25xxfd_tx_obj_load_buf buf; ++ union mcp251xfd_tx_obj_load_buf buf; + }; + +-struct mcp25xxfd_tx_ring { ++struct mcp251xfd_tx_ring { + unsigned int head; + unsigned int tail; + +@@ -513,11 +513,11 @@ struct mcp25xxfd_tx_ring { + u8 obj_num; + u8 obj_size; + +- struct mcp25xxfd_tx_obj obj[MCP25XXFD_TX_OBJ_NUM_MAX]; +- union mcp25xxfd_write_reg_buf rts_buf; ++ struct mcp251xfd_tx_obj obj[MCP251XFD_TX_OBJ_NUM_MAX]; ++ union mcp251xfd_write_reg_buf rts_buf; + }; + +-struct mcp25xxfd_rx_ring { ++struct mcp251xfd_rx_ring { + unsigned int head; + unsigned int tail; + +@@ -527,41 +527,41 @@ struct mcp25xxfd_rx_ring { + u8 obj_num; + u8 obj_size; + +- struct mcp25xxfd_hw_rx_obj_canfd obj[]; ++ struct mcp251xfd_hw_rx_obj_canfd obj[]; + }; + +-struct __packed mcp25xxfd_map_buf_nocrc { +- struct mcp25xxfd_buf_cmd cmd; ++struct __packed mcp251xfd_map_buf_nocrc { ++ struct mcp251xfd_buf_cmd cmd; + u8 data[256]; + } ____cacheline_aligned; + +-struct __packed mcp25xxfd_map_buf_crc { +- struct mcp25xxfd_buf_cmd_crc cmd; ++struct __packed mcp251xfd_map_buf_crc { ++ struct mcp251xfd_buf_cmd_crc cmd; + u8 data[256 - 4]; + __be16 crc; + } ____cacheline_aligned; + +-struct mcp25xxfd_ecc { ++struct mcp251xfd_ecc { + u32 ecc_stat; + int cnt; + }; + +-struct mcp25xxfd_regs_status { ++struct mcp251xfd_regs_status { + u32 intf; + }; + +-enum mcp25xxfd_model { +- MCP25XXFD_MODEL_MCP2517FD = 0x2517, +- MCP25XXFD_MODEL_MCP2518FD = 0x2518, +- MCP25XXFD_MODEL_MCP251XFD = 0xffff, /* autodetect model */ ++enum mcp251xfd_model { ++ MCP251XFD_MODEL_MCP2517FD = 0x2517, ++ MCP251XFD_MODEL_MCP2518FD = 0x2518, ++ MCP251XFD_MODEL_MCP251XFD = 0xffff, /* autodetect model */ + }; + +-struct mcp25xxfd_devtype_data { +- enum mcp25xxfd_model model; ++struct mcp251xfd_devtype_data { ++ enum mcp251xfd_model model; + u32 quirks; + }; + +-struct mcp25xxfd_priv { ++struct mcp251xfd_priv { + struct can_priv can; + struct can_rx_offload offload; + struct net_device *ndev; +@@ -570,87 +570,87 @@ struct mcp25xxfd_priv { + struct regmap *map_rx; /* RX/TEF RAM access */ + + struct regmap *map_nocrc; +- struct mcp25xxfd_map_buf_nocrc *map_buf_nocrc_rx; +- struct mcp25xxfd_map_buf_nocrc *map_buf_nocrc_tx; ++ struct mcp251xfd_map_buf_nocrc *map_buf_nocrc_rx; ++ struct mcp251xfd_map_buf_nocrc *map_buf_nocrc_tx; + + struct regmap *map_crc; +- struct mcp25xxfd_map_buf_crc *map_buf_crc_rx; +- struct mcp25xxfd_map_buf_crc *map_buf_crc_tx; ++ struct mcp251xfd_map_buf_crc *map_buf_crc_rx; ++ struct mcp251xfd_map_buf_crc *map_buf_crc_tx; + + struct spi_device *spi; + u32 spi_max_speed_hz_orig; + +- struct mcp25xxfd_tef_ring tef; +- struct mcp25xxfd_tx_ring tx[1]; +- struct mcp25xxfd_rx_ring *rx[1]; ++ struct mcp251xfd_tef_ring tef; ++ struct mcp251xfd_tx_ring tx[1]; ++ struct mcp251xfd_rx_ring *rx[1]; + + u8 rx_ring_num; + +- struct mcp25xxfd_ecc ecc; +- struct mcp25xxfd_regs_status regs_status; ++ struct mcp251xfd_ecc ecc; ++ struct mcp251xfd_regs_status regs_status; + + struct gpio_desc *rx_int; + struct clk *clk; + struct regulator *reg_vdd; + struct regulator *reg_xceiver; + +- struct mcp25xxfd_devtype_data devtype_data; ++ struct mcp251xfd_devtype_data devtype_data; + struct can_berr_counter bec; + }; + +-#define MCP25XXFD_IS(_model) \ ++#define MCP251XFD_IS(_model) \ + static inline bool \ +-mcp25xxfd_is_##_model(const struct mcp25xxfd_priv *priv) \ ++mcp251xfd_is_##_model(const struct mcp251xfd_priv *priv) \ + { \ +- return priv->devtype_data.model == MCP25XXFD_MODEL_MCP##_model##FD; \ ++ return priv->devtype_data.model == MCP251XFD_MODEL_MCP##_model##FD; \ + } + +-MCP25XXFD_IS(2517); +-MCP25XXFD_IS(2518); +-MCP25XXFD_IS(251X); ++MCP251XFD_IS(2517); ++MCP251XFD_IS(2518); ++MCP251XFD_IS(251X); + +-static inline u8 mcp25xxfd_first_byte_set(u32 mask) ++static inline u8 mcp251xfd_first_byte_set(u32 mask) + { + return (mask & 0x0000ffff) ? + ((mask & 0x000000ff) ? 0 : 1) : + ((mask & 0x00ff0000) ? 2 : 3); + } + +-static inline u8 mcp25xxfd_last_byte_set(u32 mask) ++static inline u8 mcp251xfd_last_byte_set(u32 mask) + { + return (mask & 0xffff0000) ? + ((mask & 0xff000000) ? 3 : 2) : + ((mask & 0x0000ff00) ? 1 : 0); + } + +-static inline __be16 mcp25xxfd_cmd_reset(void) ++static inline __be16 mcp251xfd_cmd_reset(void) + { +- return cpu_to_be16(MCP25XXFD_SPI_INSTRUCTION_RESET); ++ return cpu_to_be16(MCP251XFD_SPI_INSTRUCTION_RESET); + } + + static inline void +-mcp25xxfd_spi_cmd_read_nocrc(struct mcp25xxfd_buf_cmd *cmd, u16 addr) ++mcp251xfd_spi_cmd_read_nocrc(struct mcp251xfd_buf_cmd *cmd, u16 addr) + { +- cmd->cmd = cpu_to_be16(MCP25XXFD_SPI_INSTRUCTION_READ | addr); ++ cmd->cmd = cpu_to_be16(MCP251XFD_SPI_INSTRUCTION_READ | addr); + } + + static inline void +-mcp25xxfd_spi_cmd_write_nocrc(struct mcp25xxfd_buf_cmd *cmd, u16 addr) ++mcp251xfd_spi_cmd_write_nocrc(struct mcp251xfd_buf_cmd *cmd, u16 addr) + { +- cmd->cmd = cpu_to_be16(MCP25XXFD_SPI_INSTRUCTION_WRITE | addr); ++ cmd->cmd = cpu_to_be16(MCP251XFD_SPI_INSTRUCTION_WRITE | addr); + } + +-static inline bool mcp25xxfd_reg_in_ram(unsigned int reg) ++static inline bool mcp251xfd_reg_in_ram(unsigned int reg) + { + static const struct regmap_range range = +- regmap_reg_range(MCP25XXFD_RAM_START, +- MCP25XXFD_RAM_START + MCP25XXFD_RAM_SIZE - 4); ++ regmap_reg_range(MCP251XFD_RAM_START, ++ MCP251XFD_RAM_START + MCP251XFD_RAM_SIZE - 4); + + return regmap_reg_in_range(reg, &range); + } + + static inline void +-__mcp25xxfd_spi_cmd_crc_set_len(struct mcp25xxfd_buf_cmd_crc *cmd, ++__mcp251xfd_spi_cmd_crc_set_len(struct mcp251xfd_buf_cmd_crc *cmd, + u16 len, bool in_ram) + { + /* Number of u32 for RAM access, number of u8 otherwise. */ +@@ -661,59 +661,59 @@ __mcp25xxfd_spi_cmd_crc_set_len(struct mcp25xxfd_buf_cmd_crc *cmd, + } + + static inline void +-mcp25xxfd_spi_cmd_crc_set_len_in_ram(struct mcp25xxfd_buf_cmd_crc *cmd, u16 len) ++mcp251xfd_spi_cmd_crc_set_len_in_ram(struct mcp251xfd_buf_cmd_crc *cmd, u16 len) + { +- __mcp25xxfd_spi_cmd_crc_set_len(cmd, len, true); ++ __mcp251xfd_spi_cmd_crc_set_len(cmd, len, true); + } + + static inline void +-mcp25xxfd_spi_cmd_crc_set_len_in_reg(struct mcp25xxfd_buf_cmd_crc *cmd, u16 len) ++mcp251xfd_spi_cmd_crc_set_len_in_reg(struct mcp251xfd_buf_cmd_crc *cmd, u16 len) + { +- __mcp25xxfd_spi_cmd_crc_set_len(cmd, len, false); ++ __mcp251xfd_spi_cmd_crc_set_len(cmd, len, false); + } + + static inline void +-mcp25xxfd_spi_cmd_read_crc_set_addr(struct mcp25xxfd_buf_cmd_crc *cmd, u16 addr) ++mcp251xfd_spi_cmd_read_crc_set_addr(struct mcp251xfd_buf_cmd_crc *cmd, u16 addr) + { +- cmd->cmd = cpu_to_be16(MCP25XXFD_SPI_INSTRUCTION_READ_CRC | addr); ++ cmd->cmd = cpu_to_be16(MCP251XFD_SPI_INSTRUCTION_READ_CRC | addr); + } + + static inline void +-mcp25xxfd_spi_cmd_read_crc(struct mcp25xxfd_buf_cmd_crc *cmd, ++mcp251xfd_spi_cmd_read_crc(struct mcp251xfd_buf_cmd_crc *cmd, + u16 addr, u16 len) + { +- mcp25xxfd_spi_cmd_read_crc_set_addr(cmd, addr); +- __mcp25xxfd_spi_cmd_crc_set_len(cmd, len, mcp25xxfd_reg_in_ram(addr)); ++ mcp251xfd_spi_cmd_read_crc_set_addr(cmd, addr); ++ __mcp251xfd_spi_cmd_crc_set_len(cmd, len, mcp251xfd_reg_in_ram(addr)); + } + + static inline void +-mcp25xxfd_spi_cmd_write_crc_set_addr(struct mcp25xxfd_buf_cmd_crc *cmd, ++mcp251xfd_spi_cmd_write_crc_set_addr(struct mcp251xfd_buf_cmd_crc *cmd, + u16 addr) + { +- cmd->cmd = cpu_to_be16(MCP25XXFD_SPI_INSTRUCTION_WRITE_CRC | addr); ++ cmd->cmd = cpu_to_be16(MCP251XFD_SPI_INSTRUCTION_WRITE_CRC | addr); + } + + static inline void +-mcp25xxfd_spi_cmd_write_crc(struct mcp25xxfd_buf_cmd_crc *cmd, ++mcp251xfd_spi_cmd_write_crc(struct mcp251xfd_buf_cmd_crc *cmd, + u16 addr, u16 len) + { +- mcp25xxfd_spi_cmd_write_crc_set_addr(cmd, addr); +- __mcp25xxfd_spi_cmd_crc_set_len(cmd, len, mcp25xxfd_reg_in_ram(addr)); ++ mcp251xfd_spi_cmd_write_crc_set_addr(cmd, addr); ++ __mcp251xfd_spi_cmd_crc_set_len(cmd, len, mcp251xfd_reg_in_ram(addr)); + } + + static inline u8 * +-mcp25xxfd_spi_cmd_write(const struct mcp25xxfd_priv *priv, +- union mcp25xxfd_write_reg_buf *write_reg_buf, ++mcp251xfd_spi_cmd_write(const struct mcp251xfd_priv *priv, ++ union mcp251xfd_write_reg_buf *write_reg_buf, + u16 addr) + { + u8 *data; + +- if (priv->devtype_data.quirks & MCP25XXFD_QUIRK_CRC_REG) { +- mcp25xxfd_spi_cmd_write_crc_set_addr(&write_reg_buf->crc.cmd, ++ if (priv->devtype_data.quirks & MCP251XFD_QUIRK_CRC_REG) { ++ mcp251xfd_spi_cmd_write_crc_set_addr(&write_reg_buf->crc.cmd, + addr); + data = write_reg_buf->crc.data; + } else { +- mcp25xxfd_spi_cmd_write_nocrc(&write_reg_buf->nocrc.cmd, ++ mcp251xfd_spi_cmd_write_nocrc(&write_reg_buf->nocrc.cmd, + addr); + data = write_reg_buf->nocrc.data; + } +@@ -721,115 +721,115 @@ mcp25xxfd_spi_cmd_write(const struct mcp25xxfd_priv *priv, + return data; + } + +-static inline u16 mcp25xxfd_get_tef_obj_addr(u8 n) ++static inline u16 mcp251xfd_get_tef_obj_addr(u8 n) + { +- return MCP25XXFD_RAM_START + +- sizeof(struct mcp25xxfd_hw_tef_obj) * n; ++ return MCP251XFD_RAM_START + ++ sizeof(struct mcp251xfd_hw_tef_obj) * n; + } + + static inline u16 +-mcp25xxfd_get_tx_obj_addr(const struct mcp25xxfd_tx_ring *ring, u8 n) ++mcp251xfd_get_tx_obj_addr(const struct mcp251xfd_tx_ring *ring, u8 n) + { + return ring->base + ring->obj_size * n; + } + + static inline u16 +-mcp25xxfd_get_rx_obj_addr(const struct mcp25xxfd_rx_ring *ring, u8 n) ++mcp251xfd_get_rx_obj_addr(const struct mcp251xfd_rx_ring *ring, u8 n) + { + return ring->base + ring->obj_size * n; + } + +-static inline u8 mcp25xxfd_get_tef_head(const struct mcp25xxfd_priv *priv) ++static inline u8 mcp251xfd_get_tef_head(const struct mcp251xfd_priv *priv) + { + return priv->tef.head & (priv->tx->obj_num - 1); + } + +-static inline u8 mcp25xxfd_get_tef_tail(const struct mcp25xxfd_priv *priv) ++static inline u8 mcp251xfd_get_tef_tail(const struct mcp251xfd_priv *priv) + { + return priv->tef.tail & (priv->tx->obj_num - 1); + } + +-static inline u8 mcp25xxfd_get_tef_len(const struct mcp25xxfd_priv *priv) ++static inline u8 mcp251xfd_get_tef_len(const struct mcp251xfd_priv *priv) + { + return priv->tef.head - priv->tef.tail; + } + +-static inline u8 mcp25xxfd_get_tef_linear_len(const struct mcp25xxfd_priv *priv) ++static inline u8 mcp251xfd_get_tef_linear_len(const struct mcp251xfd_priv *priv) + { + u8 len; + +- len = mcp25xxfd_get_tef_len(priv); ++ len = mcp251xfd_get_tef_len(priv); + +- return min_t(u8, len, priv->tx->obj_num - mcp25xxfd_get_tef_tail(priv)); ++ return min_t(u8, len, priv->tx->obj_num - mcp251xfd_get_tef_tail(priv)); + } + +-static inline u8 mcp25xxfd_get_tx_head(const struct mcp25xxfd_tx_ring *ring) ++static inline u8 mcp251xfd_get_tx_head(const struct mcp251xfd_tx_ring *ring) + { + return ring->head & (ring->obj_num - 1); + } + +-static inline u8 mcp25xxfd_get_tx_tail(const struct mcp25xxfd_tx_ring *ring) ++static inline u8 mcp251xfd_get_tx_tail(const struct mcp251xfd_tx_ring *ring) + { + return ring->tail & (ring->obj_num - 1); + } + +-static inline u8 mcp25xxfd_get_tx_free(const struct mcp25xxfd_tx_ring *ring) ++static inline u8 mcp251xfd_get_tx_free(const struct mcp251xfd_tx_ring *ring) + { + return ring->obj_num - (ring->head - ring->tail); + } + + static inline int +-mcp25xxfd_get_tx_nr_by_addr(const struct mcp25xxfd_tx_ring *tx_ring, u8 *nr, ++mcp251xfd_get_tx_nr_by_addr(const struct mcp251xfd_tx_ring *tx_ring, u8 *nr, + u16 addr) + { +- if (addr < mcp25xxfd_get_tx_obj_addr(tx_ring, 0) || +- addr >= mcp25xxfd_get_tx_obj_addr(tx_ring, tx_ring->obj_num)) ++ if (addr < mcp251xfd_get_tx_obj_addr(tx_ring, 0) || ++ addr >= mcp251xfd_get_tx_obj_addr(tx_ring, tx_ring->obj_num)) + return -ENOENT; + +- *nr = (addr - mcp25xxfd_get_tx_obj_addr(tx_ring, 0)) / ++ *nr = (addr - mcp251xfd_get_tx_obj_addr(tx_ring, 0)) / + tx_ring->obj_size; + + return 0; + } + +-static inline u8 mcp25xxfd_get_rx_head(const struct mcp25xxfd_rx_ring *ring) ++static inline u8 mcp251xfd_get_rx_head(const struct mcp251xfd_rx_ring *ring) + { + return ring->head & (ring->obj_num - 1); + } + +-static inline u8 mcp25xxfd_get_rx_tail(const struct mcp25xxfd_rx_ring *ring) ++static inline u8 mcp251xfd_get_rx_tail(const struct mcp251xfd_rx_ring *ring) + { + return ring->tail & (ring->obj_num - 1); + } + +-static inline u8 mcp25xxfd_get_rx_len(const struct mcp25xxfd_rx_ring *ring) ++static inline u8 mcp251xfd_get_rx_len(const struct mcp251xfd_rx_ring *ring) + { + return ring->head - ring->tail; + } + + static inline u8 +-mcp25xxfd_get_rx_linear_len(const struct mcp25xxfd_rx_ring *ring) ++mcp251xfd_get_rx_linear_len(const struct mcp251xfd_rx_ring *ring) + { + u8 len; + +- len = mcp25xxfd_get_rx_len(ring); ++ len = mcp251xfd_get_rx_len(ring); + +- return min_t(u8, len, ring->obj_num - mcp25xxfd_get_rx_tail(ring)); ++ return min_t(u8, len, ring->obj_num - mcp251xfd_get_rx_tail(ring)); + } + +-#define mcp25xxfd_for_each_tx_obj(ring, _obj, n) \ ++#define mcp251xfd_for_each_tx_obj(ring, _obj, n) \ + for ((n) = 0, (_obj) = &(ring)->obj[(n)]; \ + (n) < (ring)->obj_num; \ + (n)++, (_obj) = &(ring)->obj[(n)]) + +-#define mcp25xxfd_for_each_rx_ring(priv, ring, n) \ ++#define mcp251xfd_for_each_rx_ring(priv, ring, n) \ + for ((n) = 0, (ring) = *((priv)->rx + (n)); \ + (n) < (priv)->rx_ring_num; \ + (n)++, (ring) = *((priv)->rx + (n))) + +-int mcp25xxfd_regmap_init(struct mcp25xxfd_priv *priv); +-u16 mcp25xxfd_crc16_compute2(const void *cmd, size_t cmd_size, ++int mcp251xfd_regmap_init(struct mcp251xfd_priv *priv); ++u16 mcp251xfd_crc16_compute2(const void *cmd, size_t cmd_size, + const void *data, size_t data_size); +-u16 mcp25xxfd_crc16_compute(const void *data, size_t data_size); ++u16 mcp251xfd_crc16_compute(const void *data, size_t data_size); + + #endif +-- +2.18.4 + + +From 29015ade4ce97f485c62d60b0f614e1f0a0acd49 Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde +Date: Thu, 15 Oct 2020 21:16:37 +0200 +Subject: [PATCH 1192/1209] can: mcp251xfd: mcp251xfd_regmap_crc_read(): + increase severity of CRC read error messages + +During debugging it turned out that some people have setups where the SPI +communication is more prone to CRC errors. + +Increase the severity of both the transfer retry and transfer failure message +to give users feedback without the need to recompile the driver with debug +enabled. + +Cc: Manivannan Sadhasivam +Cc: Thomas Kopp +Link: http://lore.kernel.org/r/20201019190524.1285319-15-mkl@pengutronix.de +Signed-off-by: Marc Kleine-Budde +(cherry picked from commit b4728920aefaf6cd10e3d9330805f7d2354c342f) +Signed-off-by: Marc Kleine-Budde +--- + drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c +index ba25902dd78c..c9ffc5ea2b25 100644 +--- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c ++++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c +@@ -330,17 +330,17 @@ mcp251xfd_regmap_crc_read(void *context, + goto out; + } + +- netdev_dbg(priv->ndev, +- "CRC read error at address 0x%04x (length=%zd, data=%*ph, CRC=0x%04x) retrying.\n", +- reg, val_len, (int)val_len, buf_rx->data, +- get_unaligned_be16(buf_rx->data + val_len)); +- } +- +- if (err) { + netdev_info(priv->ndev, +- "CRC read error at address 0x%04x (length=%zd, data=%*ph, CRC=0x%04x).\n", ++ "CRC read error at address 0x%04x (length=%zd, data=%*ph, CRC=0x%04x) retrying.\n", + reg, val_len, (int)val_len, buf_rx->data, + get_unaligned_be16(buf_rx->data + val_len)); ++ } ++ ++ if (err) { ++ netdev_err(priv->ndev, ++ "CRC read error at address 0x%04x (length=%zd, data=%*ph, CRC=0x%04x).\n", ++ reg, val_len, (int)val_len, buf_rx->data, ++ get_unaligned_be16(buf_rx->data + val_len)); + + return err; + } +-- +2.18.4 + + +From 7f32e873dceffefc28003823f11517204e89dc7a Mon Sep 17 00:00:00 2001 +From: kernel test robot +Date: Mon, 19 Oct 2020 20:08:05 +0800 +Subject: [PATCH 1193/1209] can: mcp251xfd: mcp251xfd_regmap_nocrc_read(): fix + semicolon.cocci warnings + +drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c:176:2-3: Unneeded semicolon + + Remove unneeded semicolon. + +Generated by: scripts/coccinelle/misc/semicolon.cocci + +Fixes: 875347fe5756 ("can: mcp25xxfd: add regmap infrastructure") +Signed-off-by: kernel test robot +Link: https://lore.kernel.org/r/20201019120805.GA63693@ae4257e0ab22 +Signed-off-by: Marc Kleine-Budde +(cherry picked from commit da623840d8237ba6f4ec8f427e85bffb8fd4c3ec) +Signed-off-by: Marc Kleine-Budde +--- + drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c +index c9ffc5ea2b25..314f868b3465 100644 +--- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c ++++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c +@@ -173,7 +173,7 @@ mcp251xfd_regmap_nocrc_read(void *context, + memcpy(&buf_tx->cmd, reg, sizeof(buf_tx->cmd)); + if (MCP251XFD_SANITIZE_SPI) + memset(buf_tx->data, 0x0, val_len); +- }; ++ } + + err = spi_sync(spi, &msg); + if (err) +-- +2.18.4 + + +From b3643113ef9d256eae949bac7a035dc309bcc6d0 Mon Sep 17 00:00:00 2001 +From: Tom Rix +Date: Mon, 19 Oct 2020 10:24:12 -0700 +Subject: [PATCH 1194/1209] can: mcp251xfd: remove unneeded break + +A break is not needed if it is preceded by a return. + +Signed-off-by: Tom Rix +Link: https://lore.kernel.org/r/20201019172412.31143-1-trix@redhat.com +Signed-off-by: Marc Kleine-Budde +(cherry picked from commit 78db1aa8b552d2b99e9cbcaf461a5976a1d0d442) +Signed-off-by: Marc Kleine-Budde +--- + .../net/can/spi/mcp251xfd/mcp251xfd-core.c | 22 +++++++++---------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c +index dffa5d81a7c7..ac3025ccd9d5 100644 +--- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c ++++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c +@@ -75,11 +75,11 @@ static const char *__mcp251xfd_get_model_str(enum mcp251xfd_model model) + { + switch (model) { + case MCP251XFD_MODEL_MCP2517FD: +- return "MCP2517FD"; break; ++ return "MCP2517FD"; + case MCP251XFD_MODEL_MCP2518FD: +- return "MCP2518FD"; break; ++ return "MCP2518FD"; + case MCP251XFD_MODEL_MCP251XFD: +- return "MCP251xFD"; break; ++ return "MCP251xFD"; + } + + return ""; +@@ -95,21 +95,21 @@ static const char *mcp251xfd_get_mode_str(const u8 mode) + { + switch (mode) { + case MCP251XFD_REG_CON_MODE_MIXED: +- return "Mixed (CAN FD/CAN 2.0)"; break; ++ return "Mixed (CAN FD/CAN 2.0)"; + case MCP251XFD_REG_CON_MODE_SLEEP: +- return "Sleep"; break; ++ return "Sleep"; + case MCP251XFD_REG_CON_MODE_INT_LOOPBACK: +- return "Internal Loopback"; break; ++ return "Internal Loopback"; + case MCP251XFD_REG_CON_MODE_LISTENONLY: +- return "Listen Only"; break; ++ return "Listen Only"; + case MCP251XFD_REG_CON_MODE_CONFIG: +- return "Configuration"; break; ++ return "Configuration"; + case MCP251XFD_REG_CON_MODE_EXT_LOOPBACK: +- return "External Loopback"; break; ++ return "External Loopback"; + case MCP251XFD_REG_CON_MODE_CAN2_0: +- return "CAN 2.0"; break; ++ return "CAN 2.0"; + case MCP251XFD_REG_CON_MODE_RESTRICTED: +- return "Restricted Operation"; break; ++ return "Restricted Operation"; + } + + return ""; +-- +2.18.4 + + +From e6d8fa15632953f761f4ebb45de1e4024e9dbc2e Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde +Date: Fri, 15 Nov 2019 00:54:07 +0100 +Subject: [PATCH 1195/1209] mcp251xfd: add overlay + +Signed-off-by: Marc Kleine-Budde +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 22 ++ + .../boot/dts/overlays/mcp251xfd-overlay.dts | 226 ++++++++++++++++++ + 3 files changed, 249 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/mcp251xfd-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 467cc0ae9194..04219c05c385 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -108,6 +108,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ + mcp23s17.dtbo \ + mcp2515-can0.dtbo \ + mcp2515-can1.dtbo \ ++ mcp251xfd.dtbo \ + mcp3008.dtbo \ + mcp3202.dtbo \ + mcp342x.dtbo \ +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index dd33a27178b5..ea76358a7ff4 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -1763,6 +1763,28 @@ Params: oscillator Clock frequency for the CAN controller (Hz) + interrupt GPIO for interrupt signal + + ++Name: mcp251xfd ++Info: Configures the MCP251XFD CAN controller family ++ For devices on spi1 or spi2, the interfaces should be enabled ++ with one of the spi1-1/2/3cs and/or spi2-1/2/3cs overlays. ++Load: dtoverlay=mcp251xfd,= ++Params: spi- Configure device at spi, cs ++ (boolean, required) ++ ++ oscillator Clock frequency for the CAN controller (Hz) ++ ++ speed Maximum SPI frequence (Hz) ++ ++ interrupt GPIO for interrupt signal ++ ++ rx_interrupt GPIO for RX interrupt signal (nINT1) (optional) ++ ++ xceiver_enable GPIO for CAN transceiver enable (optional) ++ ++ xceiver_active_high specifiy if CAN transceiver enable pin is ++ active high (optional, default: active low) ++ ++ + Name: mcp3008 + Info: Configures MCP3008 A/D converters + For devices on spi1 or spi2, the interfaces should be enabled +diff --git a/arch/arm/boot/dts/overlays/mcp251xfd-overlay.dts b/arch/arm/boot/dts/overlays/mcp251xfd-overlay.dts +new file mode 100644 +index 000000000000..65c861bbd340 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/mcp251xfd-overlay.dts +@@ -0,0 +1,226 @@ ++// SPDX-License-Identifier: (GPL-2.0 OR MIT) ++ ++/dts-v1/; ++/plugin/; ++ ++#include ++#include ++#include ++ ++/ { ++ compatible = "brcm,bcm2835"; ++ ++ fragment@0 { ++ target = <&spidev0>; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&spidev1>; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ fragment@2 { ++ target-path = "spi1/spidev@0"; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ fragment@3 { ++ target-path = "spi1/spidev@1"; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ fragment@4 { ++ target-path = "spi1/spidev@2"; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ fragment@5 { ++ target-path = "spi2/spidev@0"; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ fragment@6 { ++ target-path = "spi2/spidev@1"; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ fragment@7 { ++ target-path = "spi2/spidev@2"; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ fragment@8 { ++ target = <&gpio>; ++ __overlay__ { ++ mcp251xfd_pins: mcp251xfd_pins { ++ brcm,pins = <25>; ++ brcm,function = ; ++ }; ++ }; ++ }; ++ ++ fragment@9 { ++ target-path = "/clocks"; ++ __overlay__ { ++ clk_mcp251xfd_osc: mcp251xfd-osc { ++ #clock-cells = <0>; ++ compatible = "fixed-clock"; ++ clock-frequency = <40000000>; ++ }; ++ }; ++ }; ++ ++ mcp251xfd_frag: fragment@10 { ++ target = <&spi0>; ++ __overlay__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ mcp251xfd: mcp251xfd@0 { ++ compatible = "microchip,mcp251xfd"; ++ reg = <0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mcp251xfd_pins>; ++ spi-max-frequency = <20000000>; ++ interrupt-parent = <&gpio>; ++ interrupts = <25 IRQ_TYPE_LEVEL_LOW>; ++ clocks = <&clk_mcp251xfd_osc>; ++ }; ++ }; ++ }; ++ ++ fragment@11 { ++ target = <&mcp251xfd>; ++ mcp251xfd_rx_int_gpios: __dormant__ { ++ microchip,rx-int-gpios = <&gpio 255 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ fragment@12 { ++ target = <&gpio>; ++ __dormant__ { ++ mcp251xfd_xceiver_pins: mcp251xfd_xceiver_pins { ++ brcm,pins = <255>; ++ brcm,function = ; ++ }; ++ }; ++ }; ++ ++ fragment@13 { ++ target-path = "/"; ++ __dormant__ { ++ reg_mcp251xfd_xceiver: reg_mcp251xfd_xceiver { ++ compatible = "regulator-fixed"; ++ regulator-name = "mcp251xfd_xceiver"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ gpio = <&gpio 4 GPIO_ACTIVE_HIGH>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mcp251xfd_xceiver_pins>; ++ }; ++ }; ++ }; ++ ++ fragment@14 { ++ target = <&mcp251xfd>; ++ __dormant__ { ++ xceiver-supply = <®_mcp251xfd_xceiver>; ++ }; ++ }; ++ ++ __overrides__ { ++ spi0-0 = <0>, "+0", ++ <&mcp251xfd_frag>, "target:0=", <&spi0>, ++ <&mcp251xfd>, "reg:0=0", ++ <&mcp251xfd_pins>, "name=mcp251xfd_spi0_0_pins", ++ <&clk_mcp251xfd_osc>, "name=mcp251xfd-spi0-0-osc", ++ <&mcp251xfd_xceiver_pins>, "name=mcp251xfd_spi0_0_xceiver_pins", ++ <®_mcp251xfd_xceiver>, "name=reg-mcp251xfd-spi0-0-xceiver", ++ <®_mcp251xfd_xceiver>, "regulator-name=mcp251xfd-spi0-0-xceiver"; ++ spi0-1 = <0>, "+1", ++ <&mcp251xfd_frag>, "target:0=", <&spi0>, ++ <&mcp251xfd>, "reg:0=1", ++ <&mcp251xfd_pins>, "name=mcp251xfd_spi0_1_pins", ++ <&clk_mcp251xfd_osc>, "name=mcp251xfd-spi0-1-osc", ++ <&mcp251xfd_xceiver_pins>, "name=mcp251xfd_spi0_1_xceiver_pins", ++ <®_mcp251xfd_xceiver>, "name=reg-mcp251xfd-spi0-1-xceiver", ++ <®_mcp251xfd_xceiver>, "regulator-name=mcp251xfd-spi0-1-xceiver"; ++ spi1-0 = <0>, "+2", ++ <&mcp251xfd_frag>, "target:0=", <&spi1>, ++ <&mcp251xfd>, "reg:0=0", ++ <&mcp251xfd_pins>, "name=mcp251xfd_spi1_0_pins", ++ <&clk_mcp251xfd_osc>, "name=mcp251xfd-spi1-0-osc", ++ <&mcp251xfd_xceiver_pins>, "name=mcp251xfd_spi1_0_xceiver_pins", ++ <®_mcp251xfd_xceiver>, "name=reg-mcp251xfd-spi1-0-xceiver", ++ <®_mcp251xfd_xceiver>, "regulator-name=mcp251xfd-spi1-0-xceiver"; ++ spi1-1 = <0>, "+3", ++ <&mcp251xfd_frag>, "target:0=", <&spi1>, ++ <&mcp251xfd>, "reg:0=1", ++ <&mcp251xfd_pins>, "name=mcp251xfd_spi1_1_pins", ++ <&clk_mcp251xfd_osc>, "name=mcp251xfd-spi1-1-osc", ++ <&mcp251xfd_xceiver_pins>, "name=mcp251xfd_spi1_1_xceiver_pins", ++ <®_mcp251xfd_xceiver>, "name=reg-mcp251xfd-spi1-1-xceiver", ++ <®_mcp251xfd_xceiver>, "regulator-name=mcp251xfd-spi1-1-xceiver"; ++ spi1-2 = <0>, "+4", ++ <&mcp251xfd_frag>, "target:0=", <&spi1>, ++ <&mcp251xfd>, "reg:0=2", ++ <&mcp251xfd_pins>, "name=mcp251xfd_spi1_2_pins", ++ <&clk_mcp251xfd_osc>, "name=mcp251xfd-spi1-2-osc", ++ <&mcp251xfd_xceiver_pins>, "name=mcp251xfd_spi1_2_xceiver_pins", ++ <®_mcp251xfd_xceiver>, "name=reg-mcp251xfd-spi1-2-xceiver", ++ <®_mcp251xfd_xceiver>, "regulator-name=mcp251xfd-spi1-2-xceiver"; ++ spi2-0 = <0>, "+5", ++ <&mcp251xfd_frag>, "target:0=", <&spi2>, ++ <&mcp251xfd>, "reg:0=0", ++ <&mcp251xfd_pins>, "name=mcp251xfd_spi2_0_pins", ++ <&clk_mcp251xfd_osc>, "name=mcp251xfd-spi2-0-osc", ++ <&mcp251xfd_xceiver_pins>, "name=mcp251xfd_spi2_0_xceiver_pins", ++ <®_mcp251xfd_xceiver>, "name=reg-mcp251xfd-spi2-0-xceiver", ++ <®_mcp251xfd_xceiver>, "regulator-name=mcp251xfd-spi2-0-xceiver"; ++ spi2-1 = <0>, "+6", ++ <&mcp251xfd_frag>, "target:0=", <&spi2>, ++ <&mcp251xfd>, "reg:0=1", ++ <&mcp251xfd_pins>, "name=mcp251xfd_spi2_1_pins", ++ <&clk_mcp251xfd_osc>, "name=mcp251xfd-spi2-1-osc", ++ <&mcp251xfd_xceiver_pins>, "name=mcp251xfd_spi2_1_xceiver_pins", ++ <®_mcp251xfd_xceiver>, "name=reg-mcp251xfd-spi2-1-xceiver", ++ <®_mcp251xfd_xceiver>, "regulator-name=mcp251xfd-spi2-1-xceiver"; ++ spi2-2 = <0>, "+7", ++ <&mcp251xfd_frag>, "target:0=", <&spi2>, ++ <&mcp251xfd>, "reg:0=2", ++ <&mcp251xfd_pins>, "name=mcp251xfd_spi2_2_pins", ++ <&clk_mcp251xfd_osc>, "name=mcp251xfd-spi2-2-osc", ++ <&mcp251xfd_xceiver_pins>, "name=mcp251xfd_spi2_2_xceiver_pins", ++ <®_mcp251xfd_xceiver>, "name=reg-mcp251xfd-spi2-2-xceiver", ++ <®_mcp251xfd_xceiver>, "regulator-name=mcp251xfd-spi2-2-xceiver"; ++ oscillator = <&clk_mcp251xfd_osc>, "clock-frequency:0"; ++ speed = <&mcp251xfd>, "spi-max-frequency:0"; ++ interrupt = <&mcp251xfd_pins>, "brcm,pins:0", ++ <&mcp251xfd>, "interrupts:0"; ++ rx_interrupt = <0>, "+11", ++ <&mcp251xfd_pins>, "brcm,pins:4", ++ <&mcp251xfd_rx_int_gpios>, "microchip,rx-int-gpios:4"; ++ xceiver_enable = <0>, "+12+13+14", ++ <&mcp251xfd_xceiver_pins>, "brcm,pins:0", ++ <®_mcp251xfd_xceiver>, "gpio:4"; ++ xceiver_active_high = <®_mcp251xfd_xceiver>, "enable-active-high?"; ++ }; ++}; +-- +2.18.4 + + +From 3ab3d3d456f56e3cd9abea4661660ce24a79b512 Mon Sep 17 00:00:00 2001 +From: Patrick Menschel +Date: Wed, 28 Oct 2020 20:35:35 +0100 +Subject: [PATCH 1196/1209] Add mcp251xfd driver as module to RPI build + configuration + +This Patch adds MCP251XFD=m Kconfig flag to the 32 bit RPI defconfig files: + +bcmrpi_defconfig: Pi 1, Pi Zero, Pi Zero W +bcm2709_defconfig: Pi 2, Pi 3, Pi 3+, Pi CM3 +bcm2711_defconfig: Pi 4 + +...and the 64 RPI defconfig files. +bcmrpi3_defconfig: Pi 3, Pi 3+, Pi CM3 +bcm2711_defconfig: Pi 4 + +Signed-off-by: Patrick Menschel +Signed-off-by: Marc Kleine-Budde +--- + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcm2711_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + arch/arm64/configs/bcm2711_defconfig | 1 + + arch/arm64/configs/bcmrpi3_defconfig | 1 + + 5 files changed, 5 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index b062fead409b..096894330856 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -416,6 +416,7 @@ CONFIG_CAN=m + CONFIG_CAN_VCAN=m + CONFIG_CAN_SLCAN=m + CONFIG_CAN_MCP251X=m ++CONFIG_CAN_MCP251XFD=m + CONFIG_CAN_EMS_USB=m + CONFIG_CAN_GS_USB=m + CONFIG_BT=m +diff --git a/arch/arm/configs/bcm2711_defconfig b/arch/arm/configs/bcm2711_defconfig +index 598e9e198951..1a6853beda54 100644 +--- a/arch/arm/configs/bcm2711_defconfig ++++ b/arch/arm/configs/bcm2711_defconfig +@@ -417,6 +417,7 @@ CONFIG_CAN=m + CONFIG_CAN_VCAN=m + CONFIG_CAN_SLCAN=m + CONFIG_CAN_MCP251X=m ++CONFIG_CAN_MCP251XFD=m + CONFIG_CAN_EMS_USB=m + CONFIG_CAN_GS_USB=m + CONFIG_BT=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 520d0bf8c700..bd00983d72a9 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -410,6 +410,7 @@ CONFIG_CAN=m + CONFIG_CAN_VCAN=m + CONFIG_CAN_SLCAN=m + CONFIG_CAN_MCP251X=m ++CONFIG_CAN_MCP251XFD=m + CONFIG_CAN_EMS_USB=m + CONFIG_CAN_GS_USB=m + CONFIG_BT=m +diff --git a/arch/arm64/configs/bcm2711_defconfig b/arch/arm64/configs/bcm2711_defconfig +index 39f2fc51de4d..3de6d6dd9ed3 100644 +--- a/arch/arm64/configs/bcm2711_defconfig ++++ b/arch/arm64/configs/bcm2711_defconfig +@@ -416,6 +416,7 @@ CONFIG_CAN=m + CONFIG_CAN_VCAN=m + CONFIG_CAN_SLCAN=m + CONFIG_CAN_MCP251X=m ++CONFIG_CAN_MCP251XFD=m + CONFIG_CAN_EMS_USB=m + CONFIG_CAN_GS_USB=m + CONFIG_BT=m +diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig +index 3d43b416bce4..3c2980cc8f35 100644 +--- a/arch/arm64/configs/bcmrpi3_defconfig ++++ b/arch/arm64/configs/bcmrpi3_defconfig +@@ -407,6 +407,7 @@ CONFIG_YAM=m + CONFIG_CAN=m + CONFIG_CAN_VCAN=m + CONFIG_CAN_MCP251X=m ++CONFIG_CAN_MCP251XFD=m + CONFIG_CAN_EMS_USB=m + CONFIG_BT=m + CONFIG_BT_RFCOMM=m +-- +2.18.4 + + +From a25e5fe6b673b2f0746660d0a4885700ec50eaa4 Mon Sep 17 00:00:00 2001 +From: Hans Verkuil +Date: Wed, 5 Aug 2020 12:57:21 +0200 +Subject: [PATCH 1197/1209] media: i2c: imx219: Selection compliance fixes + +To comply with the intended usage of the V4L2 selection target when +used to retrieve a sensor image properties, adjust the rectangles +returned by the imx219 driver. + +The top/left crop coordinates of the TGT_CROP rectangle were set to +(0, 0) instead of (8, 8) which is the offset from the larger physical +pixel array rectangle. This was also a mismatch with the default values +crop rectangle value, so this is corrected. Found with v4l2-compliance. + +While at it, add V4L2_SEL_TGT_CROP_BOUNDS support: CROP_DEFAULT and +CROP_BOUNDS have the same size as the non-active pixels are not readable +using the selection API. Found with v4l2-compliance. + +Fixes: e6d4ef7d58aa7 ("media: i2c: imx219: Implement get_selection") +Signed-off-by: Hans Verkuil +[reword commit message, use macros for pixel offsets] +Signed-off-by: Jacopo Mondi +--- + drivers/media/i2c/imx219.c | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) + +diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c +index 812323107f36..fbbee1b08a8c 100644 +--- a/drivers/media/i2c/imx219.c ++++ b/drivers/media/i2c/imx219.c +@@ -485,8 +485,8 @@ static const struct imx219_mode supported_modes[] = { + .width = 3280, + .height = 2464, + .crop = { +- .left = 0, +- .top = 0, ++ .left = IMX219_PIXEL_ARRAY_LEFT, ++ .top = IMX219_PIXEL_ARRAY_TOP, + .width = 3280, + .height = 2464 + }, +@@ -501,8 +501,8 @@ static const struct imx219_mode supported_modes[] = { + .width = 1920, + .height = 1080, + .crop = { +- .left = 680, +- .top = 692, ++ .left = 688, ++ .top = 700, + .width = 1920, + .height = 1080 + }, +@@ -517,8 +517,8 @@ static const struct imx219_mode supported_modes[] = { + .width = 1640, + .height = 1232, + .crop = { +- .left = 0, +- .top = 0, ++ .left = IMX219_PIXEL_ARRAY_LEFT, ++ .top = IMX219_PIXEL_ARRAY_TOP, + .width = 3280, + .height = 2464 + }, +@@ -533,8 +533,8 @@ static const struct imx219_mode supported_modes[] = { + .width = 640, + .height = 480, + .crop = { +- .left = 1000, +- .top = 752, ++ .left = 1008, ++ .top = 760, + .width = 1280, + .height = 960 + }, +@@ -1093,6 +1093,7 @@ static int imx219_get_selection(struct v4l2_subdev *sd, + return 0; + + case V4L2_SEL_TGT_CROP_DEFAULT: ++ case V4L2_SEL_TGT_CROP_BOUNDS: + sel->r.top = IMX219_PIXEL_ARRAY_TOP; + sel->r.left = IMX219_PIXEL_ARRAY_LEFT; + sel->r.width = IMX219_PIXEL_ARRAY_WIDTH; +-- +2.18.4 + + +From 9cbff9fd717a824841d85c04dcc1ec2fa1bf14a7 Mon Sep 17 00:00:00 2001 +From: Naushir Patuck +Date: Wed, 2 Dec 2020 15:22:23 +0000 +Subject: [PATCH 1198/1209] media: bcm2835-unicam: Correctly handle error + propagation for stream on + +On a failure in start_streaming(), the error code would not propagate to +the calling function on all conditions. This would cause the userland +caller to not know of the failure. + +Signed-off-by: Naushir Patuck +--- + drivers/media/platform/bcm2835/bcm2835-unicam.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-unicam.c b/drivers/media/platform/bcm2835/bcm2835-unicam.c +index 6501fb205e20..c13a0a20fd12 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-unicam.c ++++ b/drivers/media/platform/bcm2835/bcm2835-unicam.c +@@ -1730,8 +1730,7 @@ static int unicam_start_streaming(struct vb2_queue *vq, unsigned int count) + unicam_disable(dev); + clk_disable_unprepare(dev->clock); + err_vpu_clock: +- ret = clk_set_min_rate(dev->vpu_clock, 0); +- if (ret) ++ if (clk_set_min_rate(dev->vpu_clock, 0)) + unicam_err(dev, "failed to reset the VPU clock\n"); + clk_disable_unprepare(dev->vpu_clock); + err_pm_put: +-- +2.18.4 + + +From c1924c183a9ea4f2537f3789093816426bfa62d2 Mon Sep 17 00:00:00 2001 +From: Naushir Patuck +Date: Wed, 2 Dec 2020 15:26:09 +0000 +Subject: [PATCH 1199/1209] media: bcm2835-unicam: Return early from + stop_streaming() if stopped + +clk_disable_unprepare() is called unconditionally in stop_streaming(). +This is incorrect in the cases where start_streaming() fails, and +unprepares all clocks as part of the failure cleanup. To avoid this, +ensure that clk_disable_unprepare() is only called in stop_streaming() +if the clocks are in a prepared state. + +Signed-off-by: Naushir Patuck +--- + drivers/media/platform/bcm2835/bcm2835-unicam.c | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-unicam.c b/drivers/media/platform/bcm2835/bcm2835-unicam.c +index c13a0a20fd12..60309de02369 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-unicam.c ++++ b/drivers/media/platform/bcm2835/bcm2835-unicam.c +@@ -426,6 +426,8 @@ struct unicam_device { + struct clk *clock; + /* vpu clock handle */ + struct clk *vpu_clock; ++ /* clock status for error handling */ ++ bool clocks_enabled; + /* V4l2 device */ + struct v4l2_device v4l2_dev; + struct media_device mdev; +@@ -1724,6 +1726,7 @@ static int unicam_start_streaming(struct vb2_queue *vq, unsigned int count) + goto err_disable_unicam; + } + ++ dev->clocks_enabled = true; + return 0; + + err_disable_unicam: +@@ -1750,8 +1753,6 @@ static void unicam_stop_streaming(struct vb2_queue *vq) + node->streaming = false; + + if (node->pad_id == IMAGE_PAD) { +- int ret; +- + /* + * Stop streaming the sensor and disable the peripheral. + * We cannot continue streaming embedded data with the +@@ -1762,12 +1763,13 @@ static void unicam_stop_streaming(struct vb2_queue *vq) + + unicam_disable(dev); + +- ret = clk_set_min_rate(dev->vpu_clock, 0); +- if (ret) +- unicam_err(dev, "failed to reset the min VPU clock\n"); ++ if (dev->clocks_enabled) { ++ if (clk_set_min_rate(dev->vpu_clock, 0)) ++ unicam_err(dev, "failed to reset the min VPU clock\n"); + +- clk_disable_unprepare(dev->vpu_clock); +- clk_disable_unprepare(dev->clock); ++ clk_disable_unprepare(dev->vpu_clock); ++ clk_disable_unprepare(dev->clock); ++ } + unicam_runtime_put(dev); + + } else if (node->pad_id == METADATA_PAD) { +-- +2.18.4 + + +From 0370db18db97ccbe35642b3ea1372d8d43e4383a Mon Sep 17 00:00:00 2001 +From: Naushir Patuck +Date: Wed, 2 Dec 2020 16:48:41 +0000 +Subject: [PATCH 1200/1209] media: bcm2835-unicam: Clear clock state when + stopping streaming + +Commit 65e08c465020d4c5b51afb452efc2246d80fd66f failed to clear the +clock state when the device stopped streaming. Fix this, as it might +again cause the same problems when doing an unprepare. + +Signed-off-by: Naushir Patuck +--- + drivers/media/platform/bcm2835/bcm2835-unicam.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-unicam.c b/drivers/media/platform/bcm2835/bcm2835-unicam.c +index 60309de02369..a8b3f5433f04 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-unicam.c ++++ b/drivers/media/platform/bcm2835/bcm2835-unicam.c +@@ -1769,6 +1769,7 @@ static void unicam_stop_streaming(struct vb2_queue *vq) + + clk_disable_unprepare(dev->vpu_clock); + clk_disable_unprepare(dev->clock); ++ dev->clocks_enabled = false; + } + unicam_runtime_put(dev); + +-- +2.18.4 + + +From c8d9dcdabbb0019d213aa2dd97f3313099aabacd Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 7 Dec 2020 09:35:57 +0000 +Subject: [PATCH 1201/1209] ARM: dts: CM4 audio pins are not connected + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/bcm2711-rpi-cm4.dts | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4.dts +index a969000c0b89..fc3f062fd820 100644 +--- a/arch/arm/boot/dts/bcm2711-rpi-cm4.dts ++++ b/arch/arm/boot/dts/bcm2711-rpi-cm4.dts +@@ -434,8 +434,6 @@ + + &gpio { + audio_pins: audio_pins { +- brcm,pins = <40 41>; +- brcm,function = <4>; + }; + }; + +-- +2.18.4 + + +From c177b115ecbd71efd2980b0c5399bb5a2b99d858 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 7 Dec 2020 08:33:19 +0000 +Subject: [PATCH 1202/1209] configs: Add RTC_DRV_PCF85063=m + +Include the driver module for the PCF85063 and PCF85063A RTC devices. + +Signed-off-by: Phil Elwell +--- + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcm2711_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + arch/arm64/configs/bcm2711_defconfig | 1 + + arch/arm64/configs/bcmrpi3_defconfig | 1 + + 5 files changed, 5 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 096894330856..9df5d9941791 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -1238,6 +1238,7 @@ CONFIG_RTC_DRV_ISL1208=m + CONFIG_RTC_DRV_ISL12022=m + CONFIG_RTC_DRV_X1205=m + CONFIG_RTC_DRV_PCF8523=m ++CONFIG_RTC_DRV_PCF85063=m + CONFIG_RTC_DRV_PCF85363=m + CONFIG_RTC_DRV_PCF8563=m + CONFIG_RTC_DRV_PCF8583=m +diff --git a/arch/arm/configs/bcm2711_defconfig b/arch/arm/configs/bcm2711_defconfig +index 1a6853beda54..e3b19eba75a6 100644 +--- a/arch/arm/configs/bcm2711_defconfig ++++ b/arch/arm/configs/bcm2711_defconfig +@@ -1274,6 +1274,7 @@ CONFIG_RTC_DRV_ISL1208=m + CONFIG_RTC_DRV_ISL12022=m + CONFIG_RTC_DRV_X1205=m + CONFIG_RTC_DRV_PCF8523=m ++CONFIG_RTC_DRV_PCF85063=m + CONFIG_RTC_DRV_PCF85363=m + CONFIG_RTC_DRV_PCF8563=m + CONFIG_RTC_DRV_PCF8583=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index bd00983d72a9..1f2c5558453f 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -1248,6 +1248,7 @@ CONFIG_RTC_DRV_ISL1208=m + CONFIG_RTC_DRV_ISL12022=m + CONFIG_RTC_DRV_X1205=m + CONFIG_RTC_DRV_PCF8523=m ++CONFIG_RTC_DRV_PCF85063=m + CONFIG_RTC_DRV_PCF85363=m + CONFIG_RTC_DRV_PCF8563=m + CONFIG_RTC_DRV_PCF8583=m +diff --git a/arch/arm64/configs/bcm2711_defconfig b/arch/arm64/configs/bcm2711_defconfig +index 3de6d6dd9ed3..c37aa87597df 100644 +--- a/arch/arm64/configs/bcm2711_defconfig ++++ b/arch/arm64/configs/bcm2711_defconfig +@@ -1273,6 +1273,7 @@ CONFIG_RTC_DRV_ISL1208=m + CONFIG_RTC_DRV_ISL12022=m + CONFIG_RTC_DRV_X1205=m + CONFIG_RTC_DRV_PCF8523=m ++CONFIG_RTC_DRV_PCF85063=m + CONFIG_RTC_DRV_PCF85363=m + CONFIG_RTC_DRV_PCF8563=m + CONFIG_RTC_DRV_PCF8583=m +diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig +index 3c2980cc8f35..599472e99d39 100644 +--- a/arch/arm64/configs/bcmrpi3_defconfig ++++ b/arch/arm64/configs/bcmrpi3_defconfig +@@ -1131,6 +1131,7 @@ CONFIG_RTC_DRV_ISL1208=m + CONFIG_RTC_DRV_ISL12022=m + CONFIG_RTC_DRV_X1205=m + CONFIG_RTC_DRV_PCF8523=m ++CONFIG_RTC_DRV_PCF85063=m + CONFIG_RTC_DRV_PCF85363=m + CONFIG_RTC_DRV_PCF8563=m + CONFIG_RTC_DRV_PCF8583=m +-- +2.18.4 + + +From aa436479c87fcbbeda1bc0f35258e97241770647 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 7 Dec 2020 08:49:53 +0000 +Subject: [PATCH 1203/1209] overlays: Add PCF85063 and PCF85063A to i2c-rtc + +Add support for the PCF85063 and PCF85063A RTC devices to the +i2c-rtc overlay. + +Also enable the device to be used on i2c0 (i2c_vc) on GPIOs 0&1 (use +parameter "i2c0") and GPIOs 44 & 45 (use parameter "i2c_csi_dsi"). + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/README | 8 ++ + .../arm/boot/dts/overlays/i2c-rtc-overlay.dts | 98 ++++++++++--------- + 2 files changed, 61 insertions(+), 45 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index ea76358a7ff4..cc380d8049c1 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -1243,6 +1243,10 @@ Params: abx80x Select one of the ABx80x family: + + pcf2129 Select the PCF2129 device + ++ pcf85063 Select the PCF85363 device ++ ++ pcf85063a Select the PCF85363A device ++ + pcf8523 Select the PCF8523 device + + pcf85363 Select the PCF85363 device +@@ -1255,6 +1259,10 @@ Params: abx80x Select one of the ABx80x family: + + sd3078 Select the ZXW Shenzhen whwave SD3078 device + ++ i2c0 Choose the I2C0 bus on GPIOs 0&1 ++ ++ i2c_csi_dsi Choose the I2C0 bus on GPIOs 44&45 ++ + addr Sets the address for the RTC. Note that the + device must be configured to use the specified + address. +diff --git a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts +index 735ca303e4fa..759f532d5be1 100644 +--- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts ++++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts +@@ -6,235 +6,238 @@ + compatible = "brcm,bcm2835"; + + fragment@0 { +- target = <&i2c_arm>; ++ target = <&i2cbus>; + __dormant__ { + #address-cells = <1>; + #size-cells = <0>; +- status = "okay"; + + abx80x: abx80x@69 { + compatible = "abracon,abx80x"; + reg = <0x69>; + abracon,tc-diode = "standard"; + abracon,tc-resistor = <0>; +- status = "okay"; + }; + }; + }; + + fragment@1 { +- target = <&i2c_arm>; ++ target = <&i2cbus>; + __dormant__ { + #address-cells = <1>; + #size-cells = <0>; +- status = "okay"; + + ds1307: ds1307@68 { + compatible = "dallas,ds1307"; + reg = <0x68>; +- status = "okay"; + }; + }; + }; + + fragment@2 { +- target = <&i2c_arm>; ++ target = <&i2cbus>; + __dormant__ { + #address-cells = <1>; + #size-cells = <0>; +- status = "okay"; + + ds1339: ds1339@68 { + compatible = "dallas,ds1339"; + trickle-resistor-ohms = <0>; + reg = <0x68>; +- status = "okay"; + }; + }; + }; + + fragment@3 { +- target = <&i2c_arm>; ++ target = <&i2cbus>; + __dormant__ { + #address-cells = <1>; + #size-cells = <0>; +- status = "okay"; + + ds3231: ds3231@68 { + compatible = "maxim,ds3231"; + reg = <0x68>; +- status = "okay"; + }; + }; + }; + + fragment@4 { +- target = <&i2c_arm>; ++ target = <&i2cbus>; + __dormant__ { + #address-cells = <1>; + #size-cells = <0>; +- status = "okay"; + + mcp7940x: mcp7940x@6f { + compatible = "microchip,mcp7940x"; + reg = <0x6f>; +- status = "okay"; + }; + }; + }; + + fragment@5 { +- target = <&i2c_arm>; ++ target = <&i2cbus>; + __dormant__ { + #address-cells = <1>; + #size-cells = <0>; +- status = "okay"; + + mcp7941x: mcp7941x@6f { + compatible = "microchip,mcp7941x"; + reg = <0x6f>; +- status = "okay"; + }; + }; + }; + + fragment@6 { +- target = <&i2c_arm>; ++ target = <&i2cbus>; + __dormant__ { + #address-cells = <1>; + #size-cells = <0>; +- status = "okay"; + + pcf2127@51 { + compatible = "nxp,pcf2127"; + reg = <0x51>; +- status = "okay"; + }; + }; + }; + + fragment@7 { +- target = <&i2c_arm>; ++ target = <&i2cbus>; + __dormant__ { + #address-cells = <1>; + #size-cells = <0>; +- status = "okay"; + + pcf8523: pcf8523@68 { + compatible = "nxp,pcf8523"; + reg = <0x68>; +- status = "okay"; + }; + }; + }; + + fragment@8 { +- target = <&i2c_arm>; ++ target = <&i2cbus>; + __dormant__ { + #address-cells = <1>; + #size-cells = <0>; +- status = "okay"; + + pcf8563: pcf8563@51 { + compatible = "nxp,pcf8563"; + reg = <0x51>; +- status = "okay"; + }; + }; + }; + + fragment@9 { +- target = <&i2c_arm>; ++ target = <&i2cbus>; + __dormant__ { + #address-cells = <1>; + #size-cells = <0>; +- status = "okay"; + + m41t62: m41t62@68 { + compatible = "st,m41t62"; + reg = <0x68>; +- status = "okay"; + }; + }; + }; + + fragment@10 { +- target = <&i2c_arm>; ++ target = <&i2cbus>; + __dormant__ { + #address-cells = <1>; + #size-cells = <0>; +- status = "okay"; + + rv3028: rv3028@52 { + compatible = "microcrystal,rv3028"; + reg = <0x52>; +- status = "okay"; + }; + }; + }; + + fragment@11 { +- target = <&i2c_arm>; ++ target = <&i2cbus>; + __dormant__ { + #address-cells = <1>; + #size-cells = <0>; +- status = "okay"; + + pcf2129@51 { + compatible = "nxp,pcf2129"; + reg = <0x51>; +- status = "okay"; + }; + }; + }; + + fragment@12 { +- target = <&i2c_arm>; ++ target = <&i2cbus>; + __dormant__ { + #address-cells = <1>; + #size-cells = <0>; +- status = "okay"; + + pcf85363@51 { + compatible = "nxp,pcf85363"; + reg = <0x51>; +- status = "okay"; + }; + }; + }; + + fragment@13 { +- target = <&i2c_arm>; ++ target = <&i2cbus>; + __dormant__ { + #address-cells = <1>; + #size-cells = <0>; +- status = "okay"; + + rv1805: rv1805@69 { + compatible = "microcrystal,rv1805"; + reg = <0x69>; + abracon,tc-diode = "standard"; + abracon,tc-resistor = <0>; +- status = "okay"; + }; + }; + }; + + fragment@14 { +- target = <&i2c_arm>; ++ target = <&i2cbus>; + __dormant__ { + #address-cells = <1>; + #size-cells = <0>; +- status = "okay"; + + sd3078: sd3078@32 { + compatible = "whwave,sd3078"; + reg = <0x32>; +- status = "okay"; + }; + }; + }; + ++ fragment@15 { ++ target = <&i2cbus>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ pcf85063@51 { ++ compatible = "nxp,pcf85063"; ++ reg = <0x51>; ++ }; ++ }; ++ }; ++ ++ fragment@16 { ++ target = <&i2cbus>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ pcf85063a@51 { ++ compatible = "nxp,pcf85063a"; ++ reg = <0x51>; ++ }; ++ }; ++ }; ++ ++ frag100: fragment@100 { ++ target = <&i2c_arm>; ++ i2cbus: __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ + __overrides__ { + abx80x = <0>,"+0"; + ds1307 = <0>,"+1"; +@@ -251,6 +254,11 @@ + pcf85363 = <0>,"+12"; + rv1805 = <0>,"+13"; + sd3078 = <0>,"+14"; ++ pcf85063 = <0>,"+15"; ++ pcf85063a = <0>,"+16"; ++ ++ i2c0 = <&frag100>, "target:0=",<&i2c0>; ++ i2c_csi_dsi = <&frag100>, "target:0=",<&i2c_csi_dsi>; + + addr = <&abx80x>, "reg:0", + <&ds1307>, "reg:0", +-- +2.18.4 + + +From 1a2ebc3178429a6c01ff00379d5e59e4f8324500 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 7 Dec 2020 17:18:39 +0000 +Subject: [PATCH 1204/1209] overlays: Fix cut-and-paste error in README + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/README | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index cc380d8049c1..b393c9651d08 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -1243,9 +1243,9 @@ Params: abx80x Select one of the ABx80x family: + + pcf2129 Select the PCF2129 device + +- pcf85063 Select the PCF85363 device ++ pcf85063 Select the PCF85063 device + +- pcf85063a Select the PCF85363A device ++ pcf85063a Select the PCF85063A device + + pcf8523 Select the PCF8523 device + +-- +2.18.4 + + +From 60c1bb63759ff94def8338e435c9927dda43598f Mon Sep 17 00:00:00 2001 +From: Naushir Patuck +Date: Wed, 9 Dec 2020 11:30:12 +0000 +Subject: [PATCH 1205/1209] media: i2c: imx477: Selection compliance fixes + +To comply with the intended usage of the V4L2 selection target when +used to retrieve a sensor image properties, adjust the rectangles +returned by the imx477 driver. + +The top/left crop coordinates of the TGT_CROP rectangle were set to +(0, 0) instead of (8, 16) which is the offset from the larger physical +pixel array rectangle. This was also a mismatch with the default values +crop rectangle value, so this is corrected. Found with v4l2-compliance. + +While at it, add V4L2_SEL_TGT_CROP_BOUNDS support: CROP_DEFAULT and +CROP_BOUNDS have the same size as the non-active pixels are not readable +using the selection API. Found with v4l2-compliance. + +This commit mirrors 543790f777ba1b3264c168c653db6d415e7c983f done for +the imx219 sensor. + +Signed-off-by: Naushir Patuck +--- + drivers/media/i2c/imx477.c | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) + +diff --git a/drivers/media/i2c/imx477.c b/drivers/media/i2c/imx477.c +index 3fbb173fa079..f68e7718b09c 100644 +--- a/drivers/media/i2c/imx477.c ++++ b/drivers/media/i2c/imx477.c +@@ -900,8 +900,8 @@ static const struct imx477_mode supported_modes_12bit[] = { + .height = 3040, + .line_length_pix = 0x5dc0, + .crop = { +- .left = 0, +- .top = 0, ++ .left = IMX477_PIXEL_ARRAY_LEFT, ++ .top = IMX477_PIXEL_ARRAY_TOP, + .width = 4056, + .height = 3040, + }, +@@ -924,8 +924,8 @@ static const struct imx477_mode supported_modes_12bit[] = { + .height = 1520, + .line_length_pix = 0x31c4, + .crop = { +- .left = 0, +- .top = 0, ++ .left = IMX477_PIXEL_ARRAY_LEFT, ++ .top = IMX477_PIXEL_ARRAY_TOP, + .width = 4056, + .height = 3040, + }, +@@ -948,8 +948,8 @@ static const struct imx477_mode supported_modes_12bit[] = { + .height = 1080, + .line_length_pix = 0x31c4, + .crop = { +- .left = 0, +- .top = 440, ++ .left = IMX477_PIXEL_ARRAY_LEFT, ++ .top = IMX477_PIXEL_ARRAY_TOP + 440, + .width = 4056, + .height = 2600, + }, +@@ -983,8 +983,8 @@ static const struct imx477_mode supported_modes_10bit[] = { + * rectangle once the driver is expanded to represent + * its processing blocks with multiple subdevs. + */ +- .left = 4, +- .top = 0, ++ .left = IMX477_PIXEL_ARRAY_LEFT + 4, ++ .top = IMX477_PIXEL_ARRAY_TOP, + .width = 4052, + .height = 3040, + }, +@@ -1696,6 +1696,7 @@ static int imx477_get_selection(struct v4l2_subdev *sd, + return 0; + + case V4L2_SEL_TGT_CROP_DEFAULT: ++ case V4L2_SEL_TGT_CROP_BOUNDS: + sel->r.left = IMX477_PIXEL_ARRAY_LEFT; + sel->r.top = IMX477_PIXEL_ARRAY_TOP; + sel->r.width = IMX477_PIXEL_ARRAY_WIDTH; +-- +2.18.4 + + +From 6a4881e624f8c86702c1ec21403fad7f2613258a Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 15 Dec 2020 16:38:37 +0000 +Subject: [PATCH 1206/1209] net: lan78xx: Ack pending PHY ints when resetting + +lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ +status. In doing so it potentially leaves the PHY with a pending +interrupt that will never be acknowledged, at which point no further +interrupts will be generated. + +Avoid the problem by acknowledging any pending PHY interrupt after +clearing the MAC's status bit. + +See: https://github.com/raspberrypi/linux/issues/2937 + +Signed-off-by: Phil Elwell +--- + drivers/net/usb/lan78xx.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c +index f72ab25e7d06..fc14099fc4b2 100644 +--- a/drivers/net/usb/lan78xx.c ++++ b/drivers/net/usb/lan78xx.c +@@ -1181,6 +1181,9 @@ static int lan78xx_link_reset(struct lan78xx_net *dev) + if (unlikely(ret < 0)) + return -EIO; + ++ /* Acknowledge any pending PHY interrupt, lest it be the last */ ++ phy_read(phydev, LAN88XX_INT_STS); ++ + phy_read_status(phydev); + + if (!phydev->link && dev->link_on) { +-- +2.18.4 + + +From 6f58dfce24ebe9c6b51b7d0e8579ee82b2d1bdec Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 15 Dec 2020 17:02:17 +0000 +Subject: [PATCH 1207/1209] overlays: mpu6050: Add 'addr' parameter + +The mpu6050 starts up at address 0x68 by default, but can be set to +0x69 if the ADO pin is pulled high. Give the overlay an addr parameter +to allow devices at the alternate address to be used. + +See: https://github.com/Hexxeh/rpi-firmware/issues/252 + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/README | 1 + + arch/arm/boot/dts/overlays/mpu6050-overlay.dts | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index b393c9651d08..c95f06407c5f 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -1898,6 +1898,7 @@ Name: mpu6050 + Info: Overlay for i2c connected mpu6050 imu + Load: dtoverlay=mpu6050,= + Params: interrupt GPIO pin for interrupt (default 4) ++ addr I2C address of the device (default 0x68) + + + Name: mz61581 +diff --git a/arch/arm/boot/dts/overlays/mpu6050-overlay.dts b/arch/arm/boot/dts/overlays/mpu6050-overlay.dts +index 3109d90562ae..1b4c06535687 100644 +--- a/arch/arm/boot/dts/overlays/mpu6050-overlay.dts ++++ b/arch/arm/boot/dts/overlays/mpu6050-overlay.dts +@@ -24,5 +24,6 @@ + + __overrides__ { + interrupt = <&mpu6050>,"interrupts:0"; ++ addr = <&mpu6050>,"reg:0"; + }; + }; +-- +2.18.4 + + +From 63f79f7960ab6c6a3a5f93436ac360c403c6d25d Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 16 Dec 2020 09:28:17 +0000 +Subject: [PATCH 1208/1209] overlays: Add missing addresses to ads1015/ads1115 + +The overlays for the ads1015 and ads1115 I2C ADCs omitted the addresses +in the main device node names. As well as breaking the conventions for +I2C devices, this prevents the firmware from renaming them when the +"reg" property is modified, which in turn stops the overlays from being +instantiated multiple times. + +See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=294465 + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/ads1015-overlay.dts | 2 +- + arch/arm/boot/dts/overlays/ads1115-overlay.dts | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/ads1015-overlay.dts b/arch/arm/boot/dts/overlays/ads1015-overlay.dts +index deeee1228395..dc1764613a8b 100644 +--- a/arch/arm/boot/dts/overlays/ads1015-overlay.dts ++++ b/arch/arm/boot/dts/overlays/ads1015-overlay.dts +@@ -13,7 +13,7 @@ + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; +- ads1015: ads1015 { ++ ads1015: ads1015@48 { + compatible = "ti,ads1015"; + status = "okay"; + #address-cells = <1>; +diff --git a/arch/arm/boot/dts/overlays/ads1115-overlay.dts b/arch/arm/boot/dts/overlays/ads1115-overlay.dts +index 4fc571c2db33..e44ced704ee2 100644 +--- a/arch/arm/boot/dts/overlays/ads1115-overlay.dts ++++ b/arch/arm/boot/dts/overlays/ads1115-overlay.dts +@@ -15,7 +15,7 @@ + #size-cells = <0>; + status = "okay"; + +- ads1115: ads1115 { ++ ads1115: ads1115@48 { + compatible = "ti,ads1115"; + status = "okay"; + #address-cells = <1>; +-- +2.18.4 + + +From 8ab5f88ba48079adafca185c73f15af8aee85c74 Mon Sep 17 00:00:00 2001 +From: Jonathan Bell +Date: Mon, 26 Oct 2020 14:03:35 +0000 +Subject: [PATCH 1209/1209] xhci: quirks: add link TRB quirk for VL805 + +The VL805 controller can't cope with the TR Dequeue Pointer for an endpoint +being set to a Link TRB. The hardware-maintained endpoint context ends up +stuck at the address of the Link TRB, leading to erroneous ring expansion +events whenever the enqueue pointer wraps to the dequeue position. + +If the search for the end of the current TD and ring cycle state lands on +a Link TRB, move to the next segment. + +See: https://github.com/raspberrypi/linux/issues/3919 + +Signed-off-by: Jonathan Bell +--- + drivers/usb/host/xhci-pci.c | 1 + + drivers/usb/host/xhci-ring.c | 10 ++++++++++ + drivers/usb/host/xhci.h | 1 + + 3 files changed, 12 insertions(+) + +diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c +index 6bf5e13e0325..66545e684d8b 100644 +--- a/drivers/usb/host/xhci-pci.c ++++ b/drivers/usb/host/xhci-pci.c +@@ -256,6 +256,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) + pdev->device == 0x3483) { + xhci->quirks |= XHCI_LPM_SUPPORT; + xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; ++ xhci->quirks |= XHCI_AVOID_DQ_ON_LINK; + } + + if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && +diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c +index d99e636f3844..8149abff857c 100644 +--- a/drivers/usb/host/xhci-ring.c ++++ b/drivers/usb/host/xhci-ring.c +@@ -624,6 +624,16 @@ void xhci_find_new_dequeue_state(struct xhci_hcd *xhci, + + } while (!cycle_found || !td_last_trb_found); + ++ /* ++ * Quirk: the xHC does not correctly parse link TRBs if the HW Dequeue ++ * pointer is set to one. Advance to the next TRB (and next segment). ++ */ ++ if (xhci->quirks & XHCI_AVOID_DQ_ON_LINK && trb_is_link(new_deq)) { ++ if (link_trb_toggles_cycle(new_deq)) ++ state->new_cycle_state ^= 0x1; ++ next_trb(xhci, ep_ring, &new_seg, &new_deq); ++ } ++ + state->new_deq_seg = new_seg; + state->new_deq_ptr = new_deq; + +diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h +index 1bd165cbd74f..77594e7c8bb2 100644 +--- a/drivers/usb/host/xhci.h ++++ b/drivers/usb/host/xhci.h +@@ -1874,6 +1874,7 @@ struct xhci_hcd { + #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) + #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35) + #define XHCI_EP_CTX_BROKEN_DCS BIT_ULL(36) ++#define XHCI_AVOID_DQ_ON_LINK BIT_ULL(37) + #define XHCI_DISABLE_SPARSE BIT_ULL(38) + + unsigned int num_active_eps; +-- +2.18.4 + diff --git a/SOURCES/wireguard.patch b/SOURCES/wireguard.patch index 038bc38..9d200b0 100644 --- a/SOURCES/wireguard.patch +++ b/SOURCES/wireguard.patch @@ -1,7 +1,7 @@ -From bbf4bb1aec9b0737d88cd74d133ee8b530c308fc Mon Sep 17 00:00:00 2001 +From f6ccc0027d3b18f38c5f96f8bae522fad2492c98 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:07 +0100 -Subject: [PATCH 001/111] crypto: lib - tidy up lib/crypto Kconfig and Makefile +Subject: [PATCH 001/117] crypto: lib - tidy up lib/crypto Kconfig and Makefile commit 746b2e024c67aa605ac12d135cd7085a49cf9dc4 upstream. @@ -118,13 +118,13 @@ index cbe0b6a6450d..63de4cb3fcf8 100644 +obj-$(CONFIG_CRYPTO_LIB_SHA256) += libsha256.o +libsha256-y := sha256.o -- -2.18.2 +2.18.4 -From 4ee599cdfc21e09b47c574c05d8d6fa5ff2c39d5 Mon Sep 17 00:00:00 2001 +From 6b2cb077c6b1fb093ec8174a8ddce787446c9e57 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:08 +0100 -Subject: [PATCH 002/111] crypto: chacha - move existing library code into +Subject: [PATCH 002/117] crypto: chacha - move existing library code into lib/crypto commit 5fb8ef25803ef33e2eb60b626435828b937bed75 upstream. @@ -645,13 +645,13 @@ index 000000000000..dabc3accae05 + +MODULE_LICENSE("GPL"); -- -2.18.2 +2.18.4 -From 7aeacfe16716998be9827d1b7211e3665caf0786 Mon Sep 17 00:00:00 2001 +From b6aac23330329ba2fd5953a2a9e954970b40044a Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:09 +0100 -Subject: [PATCH 003/111] crypto: x86/chacha - depend on generic chacha library +Subject: [PATCH 003/117] crypto: x86/chacha - depend on generic chacha library instead of crypto driver commit 28e8d89b1ce8d2e7badfb5f69971dd635acb8863 upstream. @@ -846,13 +846,13 @@ index f29bf10c0462..564a3f7b40b8 100644 SSSE3, AVX2, and AVX-512VL optimized implementations of the ChaCha20, XChaCha20, and XChaCha12 stream ciphers. -- -2.18.2 +2.18.4 -From 9872e8231411c094377e97c3e92f623205c6e7ff Mon Sep 17 00:00:00 2001 +From 52c0e077b10f891001bc79c8ce063ccc6d46f5b2 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:10 +0100 -Subject: [PATCH 004/111] crypto: x86/chacha - expose SIMD ChaCha routine as +Subject: [PATCH 004/117] crypto: x86/chacha - expose SIMD ChaCha routine as library function commit 84e03fa39fbe95a5567d43bff458c6d3b3a23ad1 upstream. @@ -1062,13 +1062,13 @@ index 5c662f8fecac..2676f4fbd4c1 100644 #define XCHACHA_IV_SIZE 32 -- -2.18.2 +2.18.4 -From 26b3eccf1b4cae251e956a7df640daf6393bc4d3 Mon Sep 17 00:00:00 2001 +From d03f16ef93414148a4f767850e973fdbc862565c Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:11 +0100 -Subject: [PATCH 005/111] crypto: arm64/chacha - depend on generic chacha +Subject: [PATCH 005/117] crypto: arm64/chacha - depend on generic chacha library instead of crypto driver commit c77da4867cbb7841177275dbb250f5c09679fae4 upstream. @@ -1199,13 +1199,13 @@ index d4cc61bfe79d..cae2cb92eca8 100644 .decrypt = xchacha_neon, } -- -2.18.2 +2.18.4 -From 14b5fac4ecdf01d965c1f43ab735ac06a2299faf Mon Sep 17 00:00:00 2001 +From 9323bf4eee0b433671e3aa6511d9fe4244fc653d Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:12 +0100 -Subject: [PATCH 006/111] crypto: arm64/chacha - expose arm64 ChaCha routine as +Subject: [PATCH 006/117] crypto: arm64/chacha - expose arm64 ChaCha routine as library function commit b3aad5bad26a01a4bd8c49a5c5f52aec665f3b7c upstream. @@ -1345,13 +1345,13 @@ index cae2cb92eca8..46cd4297761c 100644 module_init(chacha_simd_mod_init); -- -2.18.2 +2.18.4 -From 01d8a2d19bc5f75b5e8c00dd13139ff1dc915789 Mon Sep 17 00:00:00 2001 +From b857fdbbb1f25ec31d1c8f8cc5412f4ab489e7df Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:13 +0100 -Subject: [PATCH 007/111] crypto: arm/chacha - import Eric Biggers's scalar +Subject: [PATCH 007/117] crypto: arm/chacha - import Eric Biggers's scalar accelerated ChaCha code commit 29621d099f9c642b22a69dc8e7e20c108473a392 upstream. @@ -1832,13 +1832,13 @@ index 000000000000..2140319b64a0 + pop {r4-r11,pc} +ENDPROC(hchacha20_arm) -- -2.18.2 +2.18.4 -From 6d85165f03549d41259e3228ba1212d5a7a4c68e Mon Sep 17 00:00:00 2001 +From 4635c03f1686b8ada9ecd42700f82d66412d509d Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:14 +0100 -Subject: [PATCH 008/111] crypto: arm/chacha - remove dependency on generic +Subject: [PATCH 008/117] crypto: arm/chacha - remove dependency on generic ChaCha driver commit b36d8c09e710c71f6a9690b6586fea2d1c9e1e27 upstream. @@ -2541,13 +2541,13 @@ index 46cd4297761c..b08029d7bde6 100644 * * Copyright (C) 2016 - 2017 Linaro, Ltd. -- -2.18.2 +2.18.4 -From 9ae5b2c138a05d387abc3e4062a09f8064307a40 Mon Sep 17 00:00:00 2001 +From 08b87f4bde29a6bffb50c0aaa3b5acc9b9d1be1e Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:15 +0100 -Subject: [PATCH 009/111] crypto: arm/chacha - expose ARM ChaCha routine as +Subject: [PATCH 009/117] crypto: arm/chacha - expose ARM ChaCha routine as library function commit a44a3430d71bad4ee56788a59fff099b291ea54c upstream. @@ -2657,13 +2657,13 @@ index eb40efb3eb34..3f0c057aa050 100644 err = crypto_register_skciphers(neon_algs, ARRAY_SIZE(neon_algs)); -- -2.18.2 +2.18.4 -From d1597bbeb1abe97d6368467801d6aa3eedcba07a Mon Sep 17 00:00:00 2001 +From 1d0c6e6f6a9977ebac942667c6f8a3d0d36710a1 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 8 Nov 2019 13:22:16 +0100 -Subject: [PATCH 010/111] crypto: mips/chacha - import 32r2 ChaCha code from +Subject: [PATCH 010/117] crypto: mips/chacha - import 32r2 ChaCha code from Zinc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -3116,13 +3116,13 @@ index 000000000000..a81e02db95e7 +.end chacha20_mips +.set at -- -2.18.2 +2.18.4 -From 62a678a7aba7506f44e8ea2fec45a709dad8fb4a Mon Sep 17 00:00:00 2001 +From 222e72f837e62ce3e85751f973e52243832d3388 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:17 +0100 -Subject: [PATCH 011/111] crypto: mips/chacha - wire up accelerated 32r2 code +Subject: [PATCH 011/117] crypto: mips/chacha - wire up accelerated 32r2 code from Zinc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -3691,13 +3691,13 @@ index 649dc564f242..6b5e14cee475 100644 tristate "SEED cipher algorithm" select CRYPTO_ALGAPI -- -2.18.2 +2.18.4 -From e4638e0c1d51441930995140083b66817f4ad10c Mon Sep 17 00:00:00 2001 +From 88565e6edc8ecc3eb7eda65c14a8e91da2a27b9b Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:18 +0100 -Subject: [PATCH 012/111] crypto: chacha - unexport chacha_generic routines +Subject: [PATCH 012/117] crypto: chacha - unexport chacha_generic routines commit 22cf705360707ced15f9fe5423938f313c7df536 upstream. @@ -3814,13 +3814,13 @@ index c0e40b245431..aa5d4a16aac5 100644 - #endif /* _CRYPTO_CHACHA_H */ -- -2.18.2 +2.18.4 -From cb79241e8feac37fa381e6e7a6a92ee00d5e97f0 Mon Sep 17 00:00:00 2001 +From de61b50f3440e3ea5a46678a997fcd4ee88624ca Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:19 +0100 -Subject: [PATCH 013/111] crypto: poly1305 - move core routines into a separate +Subject: [PATCH 013/117] crypto: poly1305 - move core routines into a separate library commit 48ea8c6ebc96bc0990e12ee1c43d0832c23576bb upstream. @@ -4490,13 +4490,13 @@ index 000000000000..f019a57dbc1b +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Martin Willi "); -- -2.18.2 +2.18.4 -From a91c6520226129e73a042da46a68fdd1ed462b3f Mon Sep 17 00:00:00 2001 +From bc730a749174bf0429e0b186a75378db13c25cd7 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:20 +0100 -Subject: [PATCH 014/111] crypto: x86/poly1305 - unify Poly1305 state struct +Subject: [PATCH 014/117] crypto: x86/poly1305 - unify Poly1305 state struct with generic code commit ad8f5b88383ea685f2b8df2a12ee3e08089a1287 upstream. @@ -4753,13 +4753,13 @@ index f5a4319c2a1f..36b5886cb50c 100644 #endif -- -2.18.2 +2.18.4 -From e8933a8cc2291cdc5f351ba62583b19016ba7558 Mon Sep 17 00:00:00 2001 +From e9e675a106b550e653744cbe5e4e4f6845f66aba Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:21 +0100 -Subject: [PATCH 015/111] crypto: poly1305 - expose init/update/final library +Subject: [PATCH 015/117] crypto: poly1305 - expose init/update/final library interface commit a1d93064094cc5e24d64e35cf093e7191d0c9344 upstream. @@ -4990,13 +4990,13 @@ index f019a57dbc1b..32ec293c65ae 100644 MODULE_LICENSE("GPL"); MODULE_AUTHOR("Martin Willi "); -- -2.18.2 +2.18.4 -From fdfafd6a5df551a278ca3ec07f5cc909e7dba007 Mon Sep 17 00:00:00 2001 +From 93baad7ba81bf360b41969758112e5a487d55662 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:22 +0100 -Subject: [PATCH 016/111] crypto: x86/poly1305 - depend on generic library not +Subject: [PATCH 016/117] crypto: x86/poly1305 - depend on generic library not generic shash commit 1b2c6a5120489d41c8ea3b8dacd0b4586289b158 upstream. @@ -5219,13 +5219,13 @@ index 04fa269e5534..479b0cab2a1a 100644 * Poly1305 requires a unique key for each tag, which implies that we can't set * it on the tfm that gets accessed by multiple users simultaneously. Instead we -- -2.18.2 +2.18.4 -From b095e7c38359ffa613d0c18e3cc68e40d9288816 Mon Sep 17 00:00:00 2001 +From 459fb048bbcc9c07f559cbf6a37b4bb2cb14c519 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:23 +0100 -Subject: [PATCH 017/111] crypto: x86/poly1305 - expose existing driver as +Subject: [PATCH 017/117] crypto: x86/poly1305 - expose existing driver as poly1305 library commit f0e89bcfbb894e5844cd1bbf6b3cf7c63cb0f5ac upstream. @@ -5393,13 +5393,13 @@ index a731ea36bd5c..181754615f73 100644 config CRYPTO_ARCH_HAVE_LIB_POLY1305 -- -2.18.2 +2.18.4 -From a7b0cee7ad132cbe5ca7ca07c56cc012390bf367 Mon Sep 17 00:00:00 2001 +From e9816596e34dbdfd87ee1b3f9482bcc998ced2fc Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:24 +0100 -Subject: [PATCH 018/111] crypto: arm64/poly1305 - incorporate +Subject: [PATCH 018/117] crypto: arm64/poly1305 - incorporate OpenSSL/CRYPTOGAMS NEON implementation commit f569ca16475155013525686d0f73bc379c67e635 upstream. @@ -7495,13 +7495,13 @@ index 181754615f73..9923445e8225 100644 config CRYPTO_ARCH_HAVE_LIB_POLY1305 -- -2.18.2 +2.18.4 -From ce86f9037d86325458407eb786584e6302f98e5b Mon Sep 17 00:00:00 2001 +From b3af3aefd51d8f57070fee8f8074f0c537f23938 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:25 +0100 -Subject: [PATCH 019/111] crypto: arm/poly1305 - incorporate OpenSSL/CRYPTOGAMS +Subject: [PATCH 019/117] crypto: arm/poly1305 - incorporate OpenSSL/CRYPTOGAMS NEON implementation commit a6b803b3ddc793d6db0c16f12fc12d30d20fa9cc upstream. @@ -10290,13 +10290,13 @@ index 9923445e8225..9bd15b227e78 100644 config CRYPTO_ARCH_HAVE_LIB_POLY1305 -- -2.18.2 +2.18.4 -From 73b23c5b957adcda6ed1c8d7dba488d56d45719d Mon Sep 17 00:00:00 2001 +From 187998df04dbbdd4298014f8ad95477cc14b2dc8 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:26 +0100 -Subject: [PATCH 020/111] crypto: mips/poly1305 - incorporate +Subject: [PATCH 020/117] crypto: mips/poly1305 - incorporate OpenSSL/CRYPTOGAMS optimized implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -11869,13 +11869,13 @@ index 9bd15b227e78..d15ec5382986 100644 default 9 if ARM || ARM64 default 1 -- -2.18.2 +2.18.4 -From 0eb7f58b6196fee0fce5fdc0d2da5c2030b82c33 Mon Sep 17 00:00:00 2001 +From 0e008d9ec1da5489db00a542a88f89e29307ad39 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 8 Nov 2019 13:22:28 +0100 -Subject: [PATCH 021/111] crypto: blake2s - generic C library implementation +Subject: [PATCH 021/117] crypto: blake2s - generic C library implementation and selftest commit 66d7fb94e4ffe5acc589e0b2b4710aecc1f07a28 upstream. @@ -12989,13 +12989,13 @@ index 000000000000..41025a30c524 +MODULE_DESCRIPTION("BLAKE2s hash function"); +MODULE_AUTHOR("Jason A. Donenfeld "); -- -2.18.2 +2.18.4 -From 6af7e478d1106c23001e33297f3220d3e279ed95 Mon Sep 17 00:00:00 2001 +From 9f42471294df40d5298cb9f5c5d0dc39a39b25ae Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:29 +0100 -Subject: [PATCH 022/111] crypto: testmgr - add test cases for Blake2s +Subject: [PATCH 022/117] crypto: testmgr - add test cases for Blake2s commit 17e1df67023a5c9ccaeb5de8bf5b88f63127ecf7 upstream. @@ -13319,13 +13319,13 @@ index ef7d21f39d4a..102fcad54966 100644 + #endif /* _CRYPTO_TESTMGR_H */ -- -2.18.2 +2.18.4 -From 08bf11c5062fa6d1fade35a4df7d7ec4060de58c Mon Sep 17 00:00:00 2001 +From 424391960ba71b4c1489700275b1786b3679642d Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:30 +0100 -Subject: [PATCH 023/111] crypto: blake2s - implement generic shash driver +Subject: [PATCH 023/117] crypto: blake2s - implement generic shash driver commit 7f9b0880925f1f9d7d59504ea0892d2ae9cfc233 upstream. @@ -13577,13 +13577,13 @@ index 941693effc7d..74ff77032e52 100644 size_t nblocks, const u32 inc); -- -2.18.2 +2.18.4 -From 606aebe720cfafeb48102c050b4f200176b8fbd7 Mon Sep 17 00:00:00 2001 +From 338024d73271473dbada45b583fa4b1ae6ed4153 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 8 Nov 2019 13:22:31 +0100 -Subject: [PATCH 024/111] crypto: blake2s - x86_64 SIMD implementation +Subject: [PATCH 024/117] crypto: blake2s - x86_64 SIMD implementation commit ed0356eda153f6a95649e11feb7b07083caf9e20 upstream. @@ -14148,13 +14148,13 @@ index 81c8a4059afc..8fd3954bf64c 100644 tristate "CRCT10DIF algorithm" select CRYPTO_HASH -- -2.18.2 +2.18.4 -From bbd50c0a415eecea9f6043f63d65a966c201d1bc Mon Sep 17 00:00:00 2001 +From 2c61e345954094816c7b2f1acb21e04935efc2c3 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 8 Nov 2019 13:22:32 +0100 -Subject: [PATCH 025/111] crypto: curve25519 - generic C library +Subject: [PATCH 025/117] crypto: curve25519 - generic C library implementations commit 0ed42a6f431e930b2e8fae21955406e09fe75d70 upstream. @@ -16018,13 +16018,13 @@ index 000000000000..0106bebe6900 +MODULE_DESCRIPTION("Curve25519 scalar multiplication"); +MODULE_AUTHOR("Jason A. Donenfeld "); -- -2.18.2 +2.18.4 -From 38af1a26c91e3c45ab0d0296e471e088b5d82580 Mon Sep 17 00:00:00 2001 +From 02e6878712b24efce89e3abee79df1218f60d1c4 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:33 +0100 -Subject: [PATCH 026/111] crypto: curve25519 - add kpp selftest +Subject: [PATCH 026/117] crypto: curve25519 - add kpp selftest commit f613457a7af085728297bef71233c37faf3c01b1 upstream. @@ -17294,13 +17294,13 @@ index 102fcad54966..5d132ae996b4 100644 { #ifndef CONFIG_CRYPTO_FIPS -- -2.18.2 +2.18.4 -From aa7da815fcab6a235c14ec4191a11d0f1dd969f8 Mon Sep 17 00:00:00 2001 +From 3951d5b12d76eefa2a00056eed4a16243379deae Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:34 +0100 -Subject: [PATCH 027/111] crypto: curve25519 - implement generic KPP driver +Subject: [PATCH 027/117] crypto: curve25519 - implement generic KPP driver commit ee772cb641135739c1530647391d5a04c39db192 upstream. @@ -17441,13 +17441,13 @@ index 000000000000..bd88fd571393 +MODULE_ALIAS_CRYPTO("curve25519-generic"); +MODULE_LICENSE("GPL"); -- -2.18.2 +2.18.4 -From 5cbd392593fa11f939bae7f95b9763ad61962fe6 Mon Sep 17 00:00:00 2001 +From 8c6522f3a73d68c4ccef0f0850e9c34e144de042 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:35 +0100 -Subject: [PATCH 028/111] crypto: lib/curve25519 - work around Clang stack +Subject: [PATCH 028/117] crypto: lib/curve25519 - work around Clang stack spilling issue commit 660bb8e1f833ea63185fe80fde847e3e42f18e3b upstream. @@ -17522,13 +17522,13 @@ index 1c455207341d..2fde0ec33dbd 100644 unsigned i; b = 0 - b; -- -2.18.2 +2.18.4 -From ec54cbc43bda3479e5d82164bd2986e12bc09ff1 Mon Sep 17 00:00:00 2001 +From b61eb8cd17fecacf95a07d9d9cba19c05015a770 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 8 Nov 2019 13:22:36 +0100 -Subject: [PATCH 029/111] crypto: curve25519 - x86_64 library and KPP +Subject: [PATCH 029/117] crypto: curve25519 - x86_64 library and KPP implementations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -20070,13 +20070,13 @@ index a3fc859830c1..b8b738bcc312 100644 config CRYPTO_CCM -- -2.18.2 +2.18.4 -From 444a6f273657190124123d509567970e9bc02ec5 Mon Sep 17 00:00:00 2001 +From 3ad42670d1a9a760cc14405a60f0c68b6246accb Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 8 Nov 2019 13:22:37 +0100 -Subject: [PATCH 030/111] crypto: arm/curve25519 - import Bernstein and +Subject: [PATCH 030/117] crypto: arm/curve25519 - import Bernstein and Schwabe's Curve25519 ARM implementation commit f0fb006b604f98e2309a30f34ef455ac734f7c1c upstream. @@ -22212,13 +22212,13 @@ index 000000000000..f33b85fef382 + vpop {q4, q5, q6, q7} + bx lr -- -2.18.2 +2.18.4 -From 9c14e32439d17664117aff577311c6d529d3c0dd Mon Sep 17 00:00:00 2001 +From 02073ed5ab5ec53969d0b7ed3e41f070f4e61864 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 8 Nov 2019 13:22:38 +0100 -Subject: [PATCH 031/111] crypto: arm/curve25519 - wire up NEON implementation +Subject: [PATCH 031/117] crypto: arm/curve25519 - wire up NEON implementation commit d8f1308a025fc7e00414194ed742d5f05a21e13c upstream. @@ -23283,13 +23283,13 @@ index 000000000000..2e9e12d2f642 +MODULE_ALIAS_CRYPTO("curve25519-neon"); +MODULE_LICENSE("GPL v2"); -- -2.18.2 +2.18.4 -From b8003c55005c87f763b6c6a3a04610ba79d0ba07 Mon Sep 17 00:00:00 2001 +From ac04076064addfc5598008e780dd3a8777c3cec8 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:39 +0100 -Subject: [PATCH 032/111] crypto: chacha20poly1305 - import construction and +Subject: [PATCH 032/117] crypto: chacha20poly1305 - import construction and selftest from Zinc commit ed20078b7e3331e82828be357147af6a3282e4ce upstream. @@ -30977,13 +30977,13 @@ index 000000000000..c12ddbe9eb92 +MODULE_DESCRIPTION("ChaCha20Poly1305 AEAD construction"); +MODULE_AUTHOR("Jason A. Donenfeld "); -- -2.18.2 +2.18.4 -From ad1e02414b6baaf029d1ba95a1ff5b962f142c5f Mon Sep 17 00:00:00 2001 +From 11518a9a623618b7a02d621f75f341770185e44d Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Nov 2019 13:22:40 +0100 -Subject: [PATCH 033/111] crypto: lib/chacha20poly1305 - reimplement +Subject: [PATCH 033/117] crypto: lib/chacha20poly1305 - reimplement crypt_from_sg() routine commit d95312a3ccc0cd544d374be2fc45aeaa803e5fd9 upstream. @@ -31282,13 +31282,13 @@ index c12ddbe9eb92..821e5cc9b14e 100644 { if (!IS_ENABLED(CONFIG_CRYPTO_MANAGER_DISABLE_TESTS) && -- -2.18.2 +2.18.4 -From 142a6533c36fa2289ed7c8e28cdd947100b2c5d6 Mon Sep 17 00:00:00 2001 +From 43eef635407f6e17a86aedf9302d60bf595af851 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sun, 17 Nov 2019 23:21:29 -0800 -Subject: [PATCH 034/111] crypto: chacha_generic - remove unnecessary setkey() +Subject: [PATCH 034/117] crypto: chacha_generic - remove unnecessary setkey() functions commit 2043323a799a660bc84bbee404cf7a2617ec6157 upstream. @@ -31356,13 +31356,13 @@ index c1b147318393..8beea79ab117 100644 .decrypt = crypto_xchacha_crypt, } -- -2.18.2 +2.18.4 -From ef82f9452678441afb721aeb23bb53c3210c0f80 Mon Sep 17 00:00:00 2001 +From 3ef9f1930acdb457134a24dabfb719073d63a8be Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sun, 17 Nov 2019 23:21:58 -0800 -Subject: [PATCH 035/111] crypto: x86/chacha - only unregister algorithms if +Subject: [PATCH 035/117] crypto: x86/chacha - only unregister algorithms if registered commit b62755aed3a3f5ca9edd2718339ccea3b6bbbe57 upstream. @@ -31394,13 +31394,13 @@ index b391e13a9e41..a94e30b6f941 100644 module_init(chacha_simd_mod_init); -- -2.18.2 +2.18.4 -From e63c6fd00d7c0b6250beae7372115f3cbf83ddb5 Mon Sep 17 00:00:00 2001 +From e01b39b5457012eb184ed3058222f0276401be12 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sun, 17 Nov 2019 23:22:16 -0800 -Subject: [PATCH 036/111] crypto: lib/chacha20poly1305 - use chacha20_crypt() +Subject: [PATCH 036/117] crypto: lib/chacha20poly1305 - use chacha20_crypt() commit 413808b71e6204b0cc1eeaa77960f7c3cd381d33 upstream. @@ -31483,13 +31483,13 @@ index 821e5cc9b14e..6d83cafebc69 100644 partial = length; } -- -2.18.2 +2.18.4 -From 45d145f70e1cb895cb22815dfb2108b1b7b6f52f Mon Sep 17 00:00:00 2001 +From 7553c9edd4fc620058f9149d1db82dba088cff68 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 25 Nov 2019 11:31:12 +0100 -Subject: [PATCH 037/111] crypto: arch - conditionalize crypto api in arch glue +Subject: [PATCH 037/117] crypto: arch - conditionalize crypto api in arch glue for lib code commit 8394bfec51e0e565556101bcc4e2fe7551104cd8 upstream. @@ -31784,13 +31784,13 @@ index 370cd88068ec..0cc4537e6617 100644 module_init(poly1305_simd_mod_init); -- -2.18.2 +2.18.4 -From 3444a13a6fb12b49ab71dd3c9dbac0a21789ca63 Mon Sep 17 00:00:00 2001 +From 43a81baff514a4fdc89594156a520b9f86c8bfb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valdis=20Kl=C4=93tnieks?= Date: Thu, 5 Dec 2019 20:58:36 -0500 -Subject: [PATCH 038/111] crypto: chacha - fix warning message in header file +Subject: [PATCH 038/117] crypto: chacha - fix warning message in header file commit 579d705cd64e44f3fcda1a6cfd5f37468a5ddf63 upstream. @@ -31825,13 +31825,13 @@ index aa5d4a16aac5..b085dc1ac151 100644 { return chacha_setkey(tfm, key, keysize, 12); -- -2.18.2 +2.18.4 -From 8da51cbbeda9be60b2e2b2052236880b33ecd6e3 Mon Sep 17 00:00:00 2001 +From ea1b43de85bc840383235c460b249d326a4ab8ad Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 11 Dec 2019 10:26:39 +0100 -Subject: [PATCH 039/111] crypto: arm/curve25519 - add arch-specific key +Subject: [PATCH 039/117] crypto: arm/curve25519 - add arch-specific key generation function commit 84faa307249b341f6ad8de3e1869d77a65e26669 upstream. @@ -31869,13 +31869,13 @@ index f3f42cf3b893..776ae07e0469 100644 unsigned int len) { -- -2.18.2 +2.18.4 -From 1f1a39f93a47971b5a909cc583fb7a4a11c28f91 Mon Sep 17 00:00:00 2001 +From fae58695a6e4bb3a22a234a3bd212c65daaf3183 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 16 Dec 2019 19:53:26 +0100 -Subject: [PATCH 040/111] crypto: lib/curve25519 - re-add selftests +Subject: [PATCH 040/117] crypto: lib/curve25519 - re-add selftests commit aa127963f1cab2b93c74c9b128a84610203fb674 upstream. @@ -33267,13 +33267,13 @@ index 0106bebe6900..c03ccdb99434 100644 MODULE_DESCRIPTION("Curve25519 scalar multiplication"); MODULE_AUTHOR("Jason A. Donenfeld "); -- -2.18.2 +2.18.4 -From 4c7f288fcf26efce71a1baad7f2eb097519b6797 Mon Sep 17 00:00:00 2001 +From 5f996db51979df92dc9ee78a1101bec85a9a04af Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 5 Jan 2020 22:40:46 -0500 -Subject: [PATCH 041/111] crypto: poly1305 - add new 32 and 64-bit generic +Subject: [PATCH 041/117] crypto: poly1305 - add new 32 and 64-bit generic versions commit 1c08a104360f3e18f4ee6346c21cc3923efb952e upstream. @@ -34462,13 +34462,13 @@ index 32ec293c65ae..9d2d14df0fee 100644 } EXPORT_SYMBOL_GPL(poly1305_final_generic); -- -2.18.2 +2.18.4 -From 9d7baa7058da6b1cb82ef52986bacc9b566a72b5 Mon Sep 17 00:00:00 2001 +From cf9813215cb5b32c82af3d478c2ccc538d006af4 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 5 Jan 2020 22:40:47 -0500 -Subject: [PATCH 042/111] crypto: x86/poly1305 - import unmodified cryptogams +Subject: [PATCH 042/117] crypto: x86/poly1305 - import unmodified cryptogams implementation commit 0896ca2a0cb6127e8a129f1f2a680d49b6b0f65c upstream. @@ -38652,13 +38652,13 @@ index 000000000000..342ad7f18aa7 +} +close STDOUT; -- -2.18.2 +2.18.4 -From 817bb9dc4136715aa625c4c97af8136b94cd2b9b Mon Sep 17 00:00:00 2001 +From a24ec3524a4acab25230f46ff6660f432419d9bc Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 5 Jan 2020 22:40:48 -0500 -Subject: [PATCH 043/111] crypto: x86/poly1305 - wire up faster implementations +Subject: [PATCH 043/117] crypto: x86/poly1305 - wire up faster implementations for kernel commit d7d7b853566254648df59f7ea27ea05952a6cfa8 upstream. @@ -41589,13 +41589,13 @@ index 0b2c4fce26d9..14c032de276e 100644 default 1 -- -2.18.2 +2.18.4 -From 53fb1d044bf5ed226e54504e4e3bf6c1c20c1026 Mon Sep 17 00:00:00 2001 +From 30fba118109bf9f9246d8fee7841e7c1a4f10512 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 5 Jan 2020 22:40:49 -0500 -Subject: [PATCH 044/111] crypto: {arm,arm64,mips}/poly1305 - remove redundant +Subject: [PATCH 044/117] crypto: {arm,arm64,mips}/poly1305 - remove redundant non-reduction from emit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -41770,13 +41770,13 @@ index b37d29cf5d0a..fc881b46d911 100644 } EXPORT_SYMBOL(poly1305_final_arch); -- -2.18.2 +2.18.4 -From 053e1885ce870a29cf558a21c59e319a3ffcf4b8 Mon Sep 17 00:00:00 2001 +From 6737f9545cacd65ae9799a645b620347ee7a51d2 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Wed, 8 Jan 2020 12:37:35 +0800 -Subject: [PATCH 045/111] crypto: curve25519 - Fix selftest build error +Subject: [PATCH 045/117] crypto: curve25519 - Fix selftest build error commit a8bdf2c42ee4d1ee42af1f3601f85de94e70a421 upstream. @@ -41883,13 +41883,13 @@ index c03ccdb99434..288a62cd29b2 100644 { if (!IS_ENABLED(CONFIG_CRYPTO_MANAGER_DISABLE_TESTS) && -- -2.18.2 +2.18.4 -From eb414e7bf531a0a53c01d1b5be35013136120b9c Mon Sep 17 00:00:00 2001 +From e702869c233b03f1d1d767c036a03c09606419ea Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 16 Jan 2020 18:23:55 +0100 -Subject: [PATCH 046/111] crypto: x86/poly1305 - fix .gitignore typo +Subject: [PATCH 046/117] crypto: x86/poly1305 - fix .gitignore typo commit 1f6868995326cc82102049e349d8dbd116bdb656 upstream. @@ -41912,13 +41912,13 @@ index c406ea6571fa..30be0400a439 100644 -poly1305-x86_64.S +poly1305-x86_64-cryptogams.S -- -2.18.2 +2.18.4 -From a7d7e36d71f2963cd1e286cb5be322dd3b1f25ba Mon Sep 17 00:00:00 2001 +From 3dc8b37f6bcbf7e98b786c34370960d7470ba724 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 16 Jan 2020 21:26:34 +0100 -Subject: [PATCH 047/111] crypto: chacha20poly1305 - add back missing test +Subject: [PATCH 047/117] crypto: chacha20poly1305 - add back missing test vectors and test chunking commit 72c7943792c9e7788ddd182337bcf8f650cf56f5 upstream. @@ -43776,13 +43776,13 @@ index 465de46dbdef..c391a91364e9 100644 return success; } -- -2.18.2 +2.18.4 -From a8744d0d02b93347f58372088794085f1c8c2674 Mon Sep 17 00:00:00 2001 +From ce650dc24906469138236b00ef851cb7e32e84f7 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 17 Jan 2020 11:42:22 +0100 -Subject: [PATCH 048/111] crypto: x86/poly1305 - emit does base conversion +Subject: [PATCH 048/117] crypto: x86/poly1305 - emit does base conversion itself commit f9e7fe32a792726186301423ff63a465d63386e1 upstream. @@ -43819,13 +43819,13 @@ index 657363588e0c..79bb58737d52 100644 } -- -2.18.2 +2.18.4 -From 72125bc90af545c0ea95d1180234ee985e1947b1 Mon Sep 17 00:00:00 2001 +From 761be588ab38a61c4b7288322750b02ddc4da2ee Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 17 Jan 2020 17:43:18 +0100 -Subject: [PATCH 049/111] crypto: arm/chacha - fix build failured when kernel +Subject: [PATCH 049/117] crypto: arm/chacha - fix build failured when kernel mode NEON is disabled commit 0bc81767c5bd9d005fae1099fb39eb3688370cb1 upstream. @@ -43883,13 +43883,13 @@ index 7bdf8823066d..893692ed12b7 100644 } else { kernel_neon_begin(); -- -2.18.2 +2.18.4 -From ce524bfa47574457f01439ad02e1cb16e3235c98 Mon Sep 17 00:00:00 2001 +From c3efcd3d0abfa6027751040d89c769bcd10e1667 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 17 Jan 2020 12:01:36 +0100 -Subject: [PATCH 050/111] crypto: Kconfig - allow tests to be disabled when +Subject: [PATCH 050/117] crypto: Kconfig - allow tests to be disabled when manager is disabled commit 2343d1529aff8b552589f622c23932035ed7a05d upstream. @@ -43929,13 +43929,13 @@ index b8b738bcc312..8fcf630471dc 100644 tristate -- -2.18.2 +2.18.4 -From 229f75b9db2ecce24734ea40184e40658d42cd57 Mon Sep 17 00:00:00 2001 +From 48681c2021772277b48acd1069157075d352f40d Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 6 Feb 2020 12:42:01 +0100 -Subject: [PATCH 051/111] crypto: chacha20poly1305 - prevent integer overflow +Subject: [PATCH 051/117] crypto: chacha20poly1305 - prevent integer overflow on large input commit c9cc0517bba9f0213f1e55172feceb99e5512daf upstream. @@ -43975,13 +43975,13 @@ index 6d83cafebc69..ad0699ce702f 100644 b.iv[0] = 0; -- -2.18.2 +2.18.4 -From d16d04b184b9cd7bc8a91dec6403a433a0ac5018 Mon Sep 17 00:00:00 2001 +From c0726d01004c0f482aed8ef2bc71726ce4d327e4 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 1 Mar 2020 22:52:35 +0800 -Subject: [PATCH 052/111] crypto: x86/curve25519 - support assemblers with no +Subject: [PATCH 052/117] crypto: x86/curve25519 - support assemblers with no adx support commit 1579f1bc3b753d17a44de3457d5c6f4a5b14c752 upstream. @@ -44069,13 +44069,13 @@ index 4e6dc840b159..9ecb3c1f0f15 100644 else curve25519_generic(pub, secret, curve25519_base_point); -- -2.18.2 +2.18.4 -From 1a572ff1421939ba931b2bd05041b62b53e9e216 Mon Sep 17 00:00:00 2001 +From 589bee17e20a2ad4b8b20955ee9c970e4a377a2a Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 18 Mar 2020 20:27:32 -0600 -Subject: [PATCH 053/111] crypto: arm64/chacha - correctly walk through blocks +Subject: [PATCH 053/117] crypto: arm64/chacha - correctly walk through blocks commit c8cfcb78c65877313cda7bcbace624d3dbd1f3b3 upstream. @@ -44145,13 +44145,13 @@ index c391a91364e9..fa43deda2660 100644 memset(input, 0, total_len); -- -2.18.2 +2.18.4 -From 33efbbcd684c9461aa13c3ede481ebd997295019 Mon Sep 17 00:00:00 2001 +From d9083adec8a8c5f981dcb02daf8eac99d682946b Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 20 Jan 2020 18:18:15 +0100 -Subject: [PATCH 054/111] crypto: x86/curve25519 - replace with formally +Subject: [PATCH 054/117] crypto: x86/curve25519 - replace with formally verified implementation commit 07b586fe06625b0b610dc3d3a969c51913d143d4 upstream. @@ -47902,13 +47902,13 @@ index eec7d2d24239..e4e58b8e9afe 100644 MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Jason A. Donenfeld "); -- -2.18.2 +2.18.4 -From b8344fcd3bee836dc627c8d36f92579a80bca65d Mon Sep 17 00:00:00 2001 +From 6eef3f525ec5236732d20e8a1177fd8cf8cb25bb Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 1 Mar 2020 16:06:56 +0800 -Subject: [PATCH 055/111] crypto: x86/curve25519 - leave r12 as spare register +Subject: [PATCH 055/117] crypto: x86/curve25519 - leave r12 as spare register commit dc7fc3a53ae158263196b1892b672aedf67796c5 upstream. @@ -48284,13 +48284,13 @@ index e4e58b8e9afe..8a17621f7d3a 100644 } -- -2.18.2 +2.18.4 -From 86c46383822fdd1a29422968a4cc14f177ff52f6 Mon Sep 17 00:00:00 2001 +From e43146bf39f9bf1210d49fe6aefc4937f88b8a62 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 19 Mar 2020 11:56:17 -0600 -Subject: [PATCH 056/111] crypto: arm[64]/poly1305 - add artifact to .gitignore +Subject: [PATCH 056/117] crypto: arm[64]/poly1305 - add artifact to .gitignore files commit 6e4e00d8b68ca7eb30d08afb740033e0d36abe55 upstream. @@ -48328,13 +48328,13 @@ index 879df8781ed5..e403b1343328 100644 sha512-core.S +poly1305-core.S -- -2.18.2 +2.18.4 -From 7b34cc188560dd1e11f3b94381f16859216e8206 Mon Sep 17 00:00:00 2001 +From 0d3456f5b8bf4246e5f9ec45f688a6f6586a38dd Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 23 Apr 2020 15:54:04 -0600 -Subject: [PATCH 057/111] crypto: arch/lib - limit simd usage to 4k chunks +Subject: [PATCH 057/117] crypto: arch/lib - limit simd usage to 4k chunks commit 706024a52c614b478b63f7728d202532ce6591a9 upstream. @@ -48589,13 +48589,13 @@ index 79bb58737d52..61b2bc8b6986 100644 static void poly1305_simd_emit(void *ctx, u8 mac[POLY1305_DIGEST_SIZE], -- -2.18.2 +2.18.4 -From c96659dc4d1e056882851b8ef301946fdde59a1f Mon Sep 17 00:00:00 2001 +From 7b7550e61d7662fe40c6a31e0c9a131e21c2b518 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Wed, 8 Jul 2020 12:41:13 +1000 -Subject: [PATCH 058/111] crypto: lib/chacha20poly1305 - Add missing function +Subject: [PATCH 058/117] crypto: lib/chacha20poly1305 - Add missing function declaration commit 06cc2afbbdf9a9e8df3e2f8db724997dd6e1b4ac upstream. @@ -48635,13 +48635,13 @@ index ad0699ce702f..431e04280332 100644 { k[0] = get_unaligned_le32(in); -- -2.18.2 +2.18.4 -From d41126beaf21859ab04b29afd19e9d14202cb29e Mon Sep 17 00:00:00 2001 +From 46032c60e3eaf64fe98fac85e658c15137140ab1 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Wed, 8 Jul 2020 12:11:18 +0300 -Subject: [PATCH 059/111] crypto: x86/chacha-sse3 - use unaligned loads for +Subject: [PATCH 059/117] crypto: x86/chacha-sse3 - use unaligned loads for state array commit e79a31715193686e92dadb4caedfbb1f5de3659c upstream. @@ -48793,13 +48793,13 @@ index 2676f4fbd4c1..3a1c72fdb7cf 100644 /* 192-bit nonce, then 64-bit stream position */ #define XCHACHA_IV_SIZE 32 -- -2.18.2 +2.18.4 -From 303ee70fd1b5e802dff37e0a81e4c28ca998207f Mon Sep 17 00:00:00 2001 +From d187d34e30b2e271c8f1df2d4b3f64c931d970d2 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Thu, 23 Jul 2020 17:50:48 +1000 -Subject: [PATCH 060/111] crypto: x86/curve25519 - Remove unused carry +Subject: [PATCH 060/117] crypto: x86/curve25519 - Remove unused carry variables commit 054a5540fb8f7268e2c79e9deab4242db15c8cba upstream. @@ -48846,13 +48846,13 @@ index 8a17621f7d3a..8acbb6584a37 100644 f1 = f[1U]; f2 = f[2U]; -- -2.18.2 +2.18.4 -From 010a71d67061f58bc36ae7349c6f87aac46326bf Mon Sep 17 00:00:00 2001 +From 4b4f358b85ee2326462429c7769133396f3aac3b Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 24 Aug 2020 11:09:53 -0300 -Subject: [PATCH 061/111] crypto: arm/curve25519 - include +Subject: [PATCH 061/117] crypto: arm/curve25519 - include commit 6779d0e6b0fe193ab3010ea201782ca6f75a3862 upstream. @@ -48889,13 +48889,13 @@ index 776ae07e0469..31eb75b6002f 100644 asmlinkage void curve25519_neon(u8 mypublic[CURVE25519_KEY_SIZE], -- -2.18.2 +2.18.4 -From 13335bdbea0d55b2b2d2393f551997ce7ad6bf15 Mon Sep 17 00:00:00 2001 +From e1ef395778860e98d3a5bb72cb9752e4708edf4a Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Tue, 25 Aug 2020 11:23:00 +1000 -Subject: [PATCH 062/111] crypto: arm/poly1305 - Add prototype for +Subject: [PATCH 062/117] crypto: arm/poly1305 - Add prototype for poly1305_blocks_neon commit 51982ea02aef972132eb35c583d3e4c5b83166e5 upstream. @@ -48929,13 +48929,13 @@ index 13cfef4ae22e..3023c1acfa19 100644 void __weak poly1305_blocks_neon(void *state, const u8 *src, u32 len, u32 hibit) -- -2.18.2 +2.18.4 -From ed226e02d6d925659250beac5e1b94689df046bd Mon Sep 17 00:00:00 2001 +From 9cae67a1eae75350c36e399f47b9a73d9d3633fe Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Thu, 27 Aug 2020 19:30:58 +0200 -Subject: [PATCH 063/111] crypto: curve25519-x86_64 - Use XORL r32,32 +Subject: [PATCH 063/117] crypto: curve25519-x86_64 - Use XORL r32,32 commit db719539fd3889836900bf912755aa30a5985e9a upstream. @@ -49196,13 +49196,13 @@ index 8acbb6584a37..a9edb6f8a0ba 100644 " mulxq 104(%1), %%r9, %%rbx;" " adcx %%r13, %%r9;" -- -2.18.2 +2.18.4 -From 5e15835b8473c841abfe7a8540e2994d4d0f1a66 Mon Sep 17 00:00:00 2001 +From 6f0e39358e26838078348467159fe1c87ba52761 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Thu, 27 Aug 2020 19:38:31 +0200 -Subject: [PATCH 064/111] crypto: poly1305-x86_64 - Use XORL r32,32 +Subject: [PATCH 064/117] crypto: poly1305-x86_64 - Use XORL r32,32 commit 7dfd1e01b3dfc13431b1b25720cf2692a7e111ef upstream. @@ -49261,13 +49261,737 @@ index 80061bea6b16..5b593990501d 100644 mov 0(%rsi),%r8 # arg3, disp->ControlPc mov 16(%rsi),%r9 # arg4, disp->FunctionEntry -- -2.18.2 +2.18.4 -From 1ed9bf88b9cfa8eb51a5450f04a38aebee733963 Mon Sep 17 00:00:00 2001 +From 2482cf2431216e859c36dcd145d2c6bbcef81062 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Thu, 24 Sep 2020 13:29:04 +1000 +Subject: [PATCH 065/117] crypto: x86/poly1305 - Remove assignments with no + effect + +commit 4a0c1de64bf9d9027a6f19adfba89fc27893db23 upstream. + +This patch removes a few ineffectual assignments from the function +crypto_poly1305_setdctxkey. + +Reported-by: kernel test robot +Signed-off-by: Herbert Xu +Signed-off-by: Jason A. Donenfeld +--- + arch/x86/crypto/poly1305_glue.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/arch/x86/crypto/poly1305_glue.c b/arch/x86/crypto/poly1305_glue.c +index 61b2bc8b6986..7de5046fe583 100644 +--- a/arch/x86/crypto/poly1305_glue.c ++++ b/arch/x86/crypto/poly1305_glue.c +@@ -157,9 +157,6 @@ static unsigned int crypto_poly1305_setdctxkey(struct poly1305_desc_ctx *dctx, + dctx->s[1] = get_unaligned_le32(&inp[4]); + dctx->s[2] = get_unaligned_le32(&inp[8]); + dctx->s[3] = get_unaligned_le32(&inp[12]); +- inp += POLY1305_BLOCK_SIZE; +- len -= POLY1305_BLOCK_SIZE; +- acc += POLY1305_BLOCK_SIZE; + dctx->sset = true; + } + } +-- +2.18.4 + + +From 4e551d7df6818bbe788c01da7d2c6a3af0c2f5c5 Mon Sep 17 00:00:00 2001 +From: Eric Biggers +Date: Fri, 23 Oct 2020 15:27:48 -0700 +Subject: [PATCH 066/117] crypto: x86/poly1305 - add back a needed assignment + +commit c3a98c3ad5c0dc60a1ac66bf91147a3f39cac96b upstream. + +One of the assignments that was removed by commit 4a0c1de64bf9 ("crypto: +x86/poly1305 - Remove assignments with no effect") is actually needed, +since it affects the return value. + +This fixes the following crypto self-test failure: + + alg: shash: poly1305-simd test failed (wrong result) on test vector 2, cfg="init+update+final aligned buffer" + +Fixes: 4a0c1de64bf9 ("crypto: x86/poly1305 - Remove assignments with no effect") +Signed-off-by: Eric Biggers +Signed-off-by: Herbert Xu +Signed-off-by: Jason A. Donenfeld +--- + arch/x86/crypto/poly1305_glue.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/x86/crypto/poly1305_glue.c b/arch/x86/crypto/poly1305_glue.c +index 7de5046fe583..b69e362730d0 100644 +--- a/arch/x86/crypto/poly1305_glue.c ++++ b/arch/x86/crypto/poly1305_glue.c +@@ -157,6 +157,7 @@ static unsigned int crypto_poly1305_setdctxkey(struct poly1305_desc_ctx *dctx, + dctx->s[1] = get_unaligned_le32(&inp[4]); + dctx->s[2] = get_unaligned_le32(&inp[8]); + dctx->s[3] = get_unaligned_le32(&inp[12]); ++ acc += POLY1305_BLOCK_SIZE; + dctx->sset = true; + } + } +-- +2.18.4 + + +From 6a36f18ecb9d1454314a5d8860f82906ca3e5188 Mon Sep 17 00:00:00 2001 +From: "Jason A. Donenfeld" +Date: Mon, 2 Nov 2020 14:48:15 +0100 +Subject: [PATCH 067/117] crypto: Kconfig - CRYPTO_MANAGER_EXTRA_TESTS requires + the manager + +commit 6569e3097f1c4a490bdf2b23d326855e04942dfd upstream. + +The extra tests in the manager actually require the manager to be +selected too. Otherwise the linker gives errors like: + +ld: arch/x86/crypto/chacha_glue.o: in function `chacha_simd_stream_xor': +chacha_glue.c:(.text+0x422): undefined reference to `crypto_simd_disabled_for_test' + +Fixes: 2343d1529aff ("crypto: Kconfig - allow tests to be disabled when manager is disabled") +Signed-off-by: Jason A. Donenfeld +Signed-off-by: Herbert Xu +Signed-off-by: Jason A. Donenfeld +--- + crypto/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/crypto/Kconfig b/crypto/Kconfig +index 8fcf630471dc..fd5a8724ed38 100644 +--- a/crypto/Kconfig ++++ b/crypto/Kconfig +@@ -145,7 +145,7 @@ config CRYPTO_MANAGER_DISABLE_TESTS + + config CRYPTO_MANAGER_EXTRA_TESTS + bool "Enable extra run-time crypto self tests" +- depends on DEBUG_KERNEL && !CRYPTO_MANAGER_DISABLE_TESTS ++ depends on DEBUG_KERNEL && !CRYPTO_MANAGER_DISABLE_TESTS && CRYPTO_MANAGER + help + Enable extra run-time self tests of registered crypto algorithms, + including randomized fuzz tests. +-- +2.18.4 + + +From d847e1ea725d22908f4e1e8b723205939d3a947a Mon Sep 17 00:00:00 2001 +From: Ard Biesheuvel +Date: Tue, 3 Nov 2020 17:28:09 +0100 +Subject: [PATCH 068/117] crypto: arm/chacha-neon - optimize for non-block size + multiples + +commit 86cd97ec4b943af35562a74688bc4e909b32c3d1 upstream. + +The current NEON based ChaCha implementation for ARM is optimized for +multiples of 4x the ChaCha block size (64 bytes). This makes sense for +block encryption, but given that ChaCha is also often used in the +context of networking, it makes sense to consider arbitrary length +inputs as well. + +For example, WireGuard typically uses 1420 byte packets, and performing +ChaCha encryption involves 5 invocations of chacha_4block_xor_neon() +and 3 invocations of chacha_block_xor_neon(), where the last one also +involves a memcpy() using a buffer on the stack to process the final +chunk of 1420 % 64 == 12 bytes. + +Let's optimize for this case as well, by letting chacha_4block_xor_neon() +deal with any input size between 64 and 256 bytes, using NEON permutation +instructions and overlapping loads and stores. This way, the 140 byte +tail of a 1420 byte input buffer can simply be processed in one go. + +This results in the following performance improvements for 1420 byte +blocks, without significant impact on power-of-2 input sizes. (Note +that Raspberry Pi is widely used in combination with a 32-bit kernel, +even though the core is 64-bit capable) + + Cortex-A8 (BeagleBone) : 7% + Cortex-A15 (Calxeda Midway) : 21% + Cortex-A53 (Raspberry Pi 3) : 3% + Cortex-A72 (Raspberry Pi 4) : 19% + +Cc: Eric Biggers +Cc: "Jason A . Donenfeld" +Signed-off-by: Ard Biesheuvel +Signed-off-by: Herbert Xu +Signed-off-by: Jason A. Donenfeld +--- + arch/arm/crypto/chacha-glue.c | 34 +++++------ + arch/arm/crypto/chacha-neon-core.S | 97 +++++++++++++++++++++++++++--- + 2 files changed, 107 insertions(+), 24 deletions(-) + +diff --git a/arch/arm/crypto/chacha-glue.c b/arch/arm/crypto/chacha-glue.c +index cd131b454c2e..f603184dc0f5 100644 +--- a/arch/arm/crypto/chacha-glue.c ++++ b/arch/arm/crypto/chacha-glue.c +@@ -23,7 +23,7 @@ + asmlinkage void chacha_block_xor_neon(const u32 *state, u8 *dst, const u8 *src, + int nrounds); + asmlinkage void chacha_4block_xor_neon(const u32 *state, u8 *dst, const u8 *src, +- int nrounds); ++ int nrounds, unsigned int nbytes); + asmlinkage void hchacha_block_arm(const u32 *state, u32 *out, int nrounds); + asmlinkage void hchacha_block_neon(const u32 *state, u32 *out, int nrounds); + +@@ -42,24 +42,24 @@ static void chacha_doneon(u32 *state, u8 *dst, const u8 *src, + { + u8 buf[CHACHA_BLOCK_SIZE]; + +- while (bytes >= CHACHA_BLOCK_SIZE * 4) { +- chacha_4block_xor_neon(state, dst, src, nrounds); +- bytes -= CHACHA_BLOCK_SIZE * 4; +- src += CHACHA_BLOCK_SIZE * 4; +- dst += CHACHA_BLOCK_SIZE * 4; +- state[12] += 4; +- } +- while (bytes >= CHACHA_BLOCK_SIZE) { +- chacha_block_xor_neon(state, dst, src, nrounds); +- bytes -= CHACHA_BLOCK_SIZE; +- src += CHACHA_BLOCK_SIZE; +- dst += CHACHA_BLOCK_SIZE; +- state[12]++; ++ while (bytes > CHACHA_BLOCK_SIZE) { ++ unsigned int l = min(bytes, CHACHA_BLOCK_SIZE * 4U); ++ ++ chacha_4block_xor_neon(state, dst, src, nrounds, l); ++ bytes -= l; ++ src += l; ++ dst += l; ++ state[12] += DIV_ROUND_UP(l, CHACHA_BLOCK_SIZE); + } + if (bytes) { +- memcpy(buf, src, bytes); +- chacha_block_xor_neon(state, buf, buf, nrounds); +- memcpy(dst, buf, bytes); ++ const u8 *s = src; ++ u8 *d = dst; ++ ++ if (bytes != CHACHA_BLOCK_SIZE) ++ s = d = memcpy(buf, src, bytes); ++ chacha_block_xor_neon(state, d, s, nrounds); ++ if (d != dst) ++ memcpy(dst, buf, bytes); + } + } + +diff --git a/arch/arm/crypto/chacha-neon-core.S b/arch/arm/crypto/chacha-neon-core.S +index eb22926d4912..13d12f672656 100644 +--- a/arch/arm/crypto/chacha-neon-core.S ++++ b/arch/arm/crypto/chacha-neon-core.S +@@ -47,6 +47,7 @@ + */ + + #include ++#include + + .text + .fpu neon +@@ -205,7 +206,7 @@ ENDPROC(hchacha_block_neon) + + .align 5 + ENTRY(chacha_4block_xor_neon) +- push {r4-r5} ++ push {r4, lr} + mov r4, sp // preserve the stack pointer + sub ip, sp, #0x20 // allocate a 32 byte buffer + bic ip, ip, #0x1f // aligned to 32 bytes +@@ -229,10 +230,10 @@ ENTRY(chacha_4block_xor_neon) + vld1.32 {q0-q1}, [r0] + vld1.32 {q2-q3}, [ip] + +- adr r5, .Lctrinc ++ adr lr, .Lctrinc + vdup.32 q15, d7[1] + vdup.32 q14, d7[0] +- vld1.32 {q4}, [r5, :128] ++ vld1.32 {q4}, [lr, :128] + vdup.32 q13, d6[1] + vdup.32 q12, d6[0] + vdup.32 q11, d5[1] +@@ -455,7 +456,7 @@ ENTRY(chacha_4block_xor_neon) + + // Re-interleave the words in the first two rows of each block (x0..7). + // Also add the counter values 0-3 to x12[0-3]. +- vld1.32 {q8}, [r5, :128] // load counter values 0-3 ++ vld1.32 {q8}, [lr, :128] // load counter values 0-3 + vzip.32 q0, q1 // => (0 1 0 1) (0 1 0 1) + vzip.32 q2, q3 // => (2 3 2 3) (2 3 2 3) + vzip.32 q4, q5 // => (4 5 4 5) (4 5 4 5) +@@ -493,6 +494,8 @@ ENTRY(chacha_4block_xor_neon) + + // Re-interleave the words in the last two rows of each block (x8..15). + vld1.32 {q8-q9}, [sp, :256] ++ mov sp, r4 // restore original stack pointer ++ ldr r4, [r4, #8] // load number of bytes + vzip.32 q12, q13 // => (12 13 12 13) (12 13 12 13) + vzip.32 q14, q15 // => (14 15 14 15) (14 15 14 15) + vzip.32 q8, q9 // => (8 9 8 9) (8 9 8 9) +@@ -520,41 +523,121 @@ ENTRY(chacha_4block_xor_neon) + // XOR the rest of the data with the keystream + + vld1.8 {q0-q1}, [r2]! ++ subs r4, r4, #96 + veor q0, q0, q8 + veor q1, q1, q12 ++ ble .Lle96 + vst1.8 {q0-q1}, [r1]! + + vld1.8 {q0-q1}, [r2]! ++ subs r4, r4, #32 + veor q0, q0, q2 + veor q1, q1, q6 ++ ble .Lle128 + vst1.8 {q0-q1}, [r1]! + + vld1.8 {q0-q1}, [r2]! ++ subs r4, r4, #32 + veor q0, q0, q10 + veor q1, q1, q14 ++ ble .Lle160 + vst1.8 {q0-q1}, [r1]! + + vld1.8 {q0-q1}, [r2]! ++ subs r4, r4, #32 + veor q0, q0, q4 + veor q1, q1, q5 ++ ble .Lle192 + vst1.8 {q0-q1}, [r1]! + + vld1.8 {q0-q1}, [r2]! ++ subs r4, r4, #32 + veor q0, q0, q9 + veor q1, q1, q13 ++ ble .Lle224 + vst1.8 {q0-q1}, [r1]! + + vld1.8 {q0-q1}, [r2]! ++ subs r4, r4, #32 + veor q0, q0, q3 + veor q1, q1, q7 ++ blt .Llt256 ++.Lout: + vst1.8 {q0-q1}, [r1]! + + vld1.8 {q0-q1}, [r2] +- mov sp, r4 // restore original stack pointer + veor q0, q0, q11 + veor q1, q1, q15 + vst1.8 {q0-q1}, [r1] + +- pop {r4-r5} +- bx lr ++ pop {r4, pc} ++ ++.Lle192: ++ vmov q4, q9 ++ vmov q5, q13 ++ ++.Lle160: ++ // nothing to do ++ ++.Lfinalblock: ++ // Process the final block if processing less than 4 full blocks. ++ // Entered with 32 bytes of ChaCha cipher stream in q4-q5, and the ++ // previous 32 byte output block that still needs to be written at ++ // [r1] in q0-q1. ++ beq .Lfullblock ++ ++.Lpartialblock: ++ adr lr, .Lpermute + 32 ++ add r2, r2, r4 ++ add lr, lr, r4 ++ add r4, r4, r1 ++ ++ vld1.8 {q2-q3}, [lr] ++ vld1.8 {q6-q7}, [r2] ++ ++ add r4, r4, #32 ++ ++ vtbl.8 d4, {q4-q5}, d4 ++ vtbl.8 d5, {q4-q5}, d5 ++ vtbl.8 d6, {q4-q5}, d6 ++ vtbl.8 d7, {q4-q5}, d7 ++ ++ veor q6, q6, q2 ++ veor q7, q7, q3 ++ ++ vst1.8 {q6-q7}, [r4] // overlapping stores ++ vst1.8 {q0-q1}, [r1] ++ pop {r4, pc} ++ ++.Lfullblock: ++ vmov q11, q4 ++ vmov q15, q5 ++ b .Lout ++.Lle96: ++ vmov q4, q2 ++ vmov q5, q6 ++ b .Lfinalblock ++.Lle128: ++ vmov q4, q10 ++ vmov q5, q14 ++ b .Lfinalblock ++.Lle224: ++ vmov q4, q3 ++ vmov q5, q7 ++ b .Lfinalblock ++.Llt256: ++ vmov q4, q11 ++ vmov q5, q15 ++ b .Lpartialblock + ENDPROC(chacha_4block_xor_neon) ++ ++ .align L1_CACHE_SHIFT ++.Lpermute: ++ .byte 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 ++ .byte 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f ++ .byte 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 ++ .byte 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f ++ .byte 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 ++ .byte 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f ++ .byte 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 ++ .byte 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f +-- +2.18.4 + + +From c5520fdf42a2d4f06ae977e2f6da1216b73a180a Mon Sep 17 00:00:00 2001 +From: Ard Biesheuvel +Date: Fri, 6 Nov 2020 17:39:38 +0100 +Subject: [PATCH 069/117] crypto: arm64/chacha - simplify tail block handling + +commit c4fc6328d6c67690a7e6e03f43a5a976a13120ef upstream. + +Based on lessons learnt from optimizing the 32-bit version of this driver, +we can simplify the arm64 version considerably, by reordering the final +two stores when the last block is not a multiple of 64 bytes. This removes +the need to use permutation instructions to calculate the elements that are +clobbered by the final overlapping store, given that the store of the +penultimate block now follows it, and that one carries the correct values +for those elements already. + +While at it, simplify the overlapping loads as well, by calculating the +address of the final overlapping load upfront, and switching to this +address for every load that would otherwise extend past the end of the +source buffer. + +There is no impact on performance, but the resulting code is substantially +smaller and easier to follow. + +Cc: Eric Biggers +Cc: "Jason A . Donenfeld" +Signed-off-by: Ard Biesheuvel +Signed-off-by: Herbert Xu +Signed-off-by: Jason A. Donenfeld +--- + arch/arm64/crypto/chacha-neon-core.S | 193 ++++++++++----------------- + 1 file changed, 69 insertions(+), 124 deletions(-) + +diff --git a/arch/arm64/crypto/chacha-neon-core.S b/arch/arm64/crypto/chacha-neon-core.S +index 706c4e10e9e2..50d9dd173be7 100644 +--- a/arch/arm64/crypto/chacha-neon-core.S ++++ b/arch/arm64/crypto/chacha-neon-core.S +@@ -195,7 +195,6 @@ ENTRY(chacha_4block_xor_neon) + adr_l x10, .Lpermute + and x5, x4, #63 + add x10, x10, x5 +- add x11, x10, #64 + + // + // This function encrypts four consecutive ChaCha blocks by loading +@@ -645,11 +644,11 @@ CPU_BE( rev a15, a15 ) + zip2 v31.4s, v14.4s, v15.4s + eor a15, a15, w9 + +- mov x3, #64 ++ add x3, x2, x4 ++ sub x3, x3, #128 // start of last block ++ + subs x5, x4, #128 +- add x6, x5, x2 +- csel x3, x3, xzr, ge +- csel x2, x2, x6, ge ++ csel x2, x2, x3, ge + + // interleave 64-bit words in state n, n+2 + zip1 v0.2d, v16.2d, v18.2d +@@ -658,13 +657,10 @@ CPU_BE( rev a15, a15 ) + zip1 v8.2d, v17.2d, v19.2d + zip2 v12.2d, v17.2d, v19.2d + stp a2, a3, [x1, #-56] +- ld1 {v16.16b-v19.16b}, [x2], x3 + + subs x6, x4, #192 +- ccmp x3, xzr, #4, lt +- add x7, x6, x2 +- csel x3, x3, xzr, eq +- csel x2, x2, x7, eq ++ ld1 {v16.16b-v19.16b}, [x2], #64 ++ csel x2, x2, x3, ge + + zip1 v1.2d, v20.2d, v22.2d + zip2 v5.2d, v20.2d, v22.2d +@@ -672,13 +668,10 @@ CPU_BE( rev a15, a15 ) + zip1 v9.2d, v21.2d, v23.2d + zip2 v13.2d, v21.2d, v23.2d + stp a6, a7, [x1, #-40] +- ld1 {v20.16b-v23.16b}, [x2], x3 + + subs x7, x4, #256 +- ccmp x3, xzr, #4, lt +- add x8, x7, x2 +- csel x3, x3, xzr, eq +- csel x2, x2, x8, eq ++ ld1 {v20.16b-v23.16b}, [x2], #64 ++ csel x2, x2, x3, ge + + zip1 v2.2d, v24.2d, v26.2d + zip2 v6.2d, v24.2d, v26.2d +@@ -686,12 +679,10 @@ CPU_BE( rev a15, a15 ) + zip1 v10.2d, v25.2d, v27.2d + zip2 v14.2d, v25.2d, v27.2d + stp a10, a11, [x1, #-24] +- ld1 {v24.16b-v27.16b}, [x2], x3 + + subs x8, x4, #320 +- ccmp x3, xzr, #4, lt +- add x9, x8, x2 +- csel x2, x2, x9, eq ++ ld1 {v24.16b-v27.16b}, [x2], #64 ++ csel x2, x2, x3, ge + + zip1 v3.2d, v28.2d, v30.2d + zip2 v7.2d, v28.2d, v30.2d +@@ -699,151 +690,105 @@ CPU_BE( rev a15, a15 ) + zip1 v11.2d, v29.2d, v31.2d + zip2 v15.2d, v29.2d, v31.2d + stp a14, a15, [x1, #-8] ++ ++ tbnz x5, #63, .Lt128 + ld1 {v28.16b-v31.16b}, [x2] + + // xor with corresponding input, write to output +- tbnz x5, #63, 0f + eor v16.16b, v16.16b, v0.16b + eor v17.16b, v17.16b, v1.16b + eor v18.16b, v18.16b, v2.16b + eor v19.16b, v19.16b, v3.16b +- st1 {v16.16b-v19.16b}, [x1], #64 +- cbz x5, .Lout + +- tbnz x6, #63, 1f ++ tbnz x6, #63, .Lt192 ++ + eor v20.16b, v20.16b, v4.16b + eor v21.16b, v21.16b, v5.16b + eor v22.16b, v22.16b, v6.16b + eor v23.16b, v23.16b, v7.16b +- st1 {v20.16b-v23.16b}, [x1], #64 +- cbz x6, .Lout + +- tbnz x7, #63, 2f ++ st1 {v16.16b-v19.16b}, [x1], #64 ++ tbnz x7, #63, .Lt256 ++ + eor v24.16b, v24.16b, v8.16b + eor v25.16b, v25.16b, v9.16b + eor v26.16b, v26.16b, v10.16b + eor v27.16b, v27.16b, v11.16b +- st1 {v24.16b-v27.16b}, [x1], #64 +- cbz x7, .Lout + +- tbnz x8, #63, 3f ++ st1 {v20.16b-v23.16b}, [x1], #64 ++ tbnz x8, #63, .Lt320 ++ + eor v28.16b, v28.16b, v12.16b + eor v29.16b, v29.16b, v13.16b + eor v30.16b, v30.16b, v14.16b + eor v31.16b, v31.16b, v15.16b ++ ++ st1 {v24.16b-v27.16b}, [x1], #64 + st1 {v28.16b-v31.16b}, [x1] + + .Lout: frame_pop + ret + +- // fewer than 128 bytes of in/output +-0: ld1 {v8.16b}, [x10] +- ld1 {v9.16b}, [x11] +- movi v10.16b, #16 +- sub x2, x1, #64 +- add x1, x1, x5 +- ld1 {v16.16b-v19.16b}, [x2] +- tbl v4.16b, {v0.16b-v3.16b}, v8.16b +- tbx v20.16b, {v16.16b-v19.16b}, v9.16b +- add v8.16b, v8.16b, v10.16b +- add v9.16b, v9.16b, v10.16b +- tbl v5.16b, {v0.16b-v3.16b}, v8.16b +- tbx v21.16b, {v16.16b-v19.16b}, v9.16b +- add v8.16b, v8.16b, v10.16b +- add v9.16b, v9.16b, v10.16b +- tbl v6.16b, {v0.16b-v3.16b}, v8.16b +- tbx v22.16b, {v16.16b-v19.16b}, v9.16b +- add v8.16b, v8.16b, v10.16b +- add v9.16b, v9.16b, v10.16b +- tbl v7.16b, {v0.16b-v3.16b}, v8.16b +- tbx v23.16b, {v16.16b-v19.16b}, v9.16b +- +- eor v20.16b, v20.16b, v4.16b +- eor v21.16b, v21.16b, v5.16b +- eor v22.16b, v22.16b, v6.16b +- eor v23.16b, v23.16b, v7.16b +- st1 {v20.16b-v23.16b}, [x1] +- b .Lout +- + // fewer than 192 bytes of in/output +-1: ld1 {v8.16b}, [x10] +- ld1 {v9.16b}, [x11] +- movi v10.16b, #16 +- add x1, x1, x6 +- tbl v0.16b, {v4.16b-v7.16b}, v8.16b +- tbx v20.16b, {v16.16b-v19.16b}, v9.16b +- add v8.16b, v8.16b, v10.16b +- add v9.16b, v9.16b, v10.16b +- tbl v1.16b, {v4.16b-v7.16b}, v8.16b +- tbx v21.16b, {v16.16b-v19.16b}, v9.16b +- add v8.16b, v8.16b, v10.16b +- add v9.16b, v9.16b, v10.16b +- tbl v2.16b, {v4.16b-v7.16b}, v8.16b +- tbx v22.16b, {v16.16b-v19.16b}, v9.16b +- add v8.16b, v8.16b, v10.16b +- add v9.16b, v9.16b, v10.16b +- tbl v3.16b, {v4.16b-v7.16b}, v8.16b +- tbx v23.16b, {v16.16b-v19.16b}, v9.16b +- +- eor v20.16b, v20.16b, v0.16b +- eor v21.16b, v21.16b, v1.16b +- eor v22.16b, v22.16b, v2.16b +- eor v23.16b, v23.16b, v3.16b +- st1 {v20.16b-v23.16b}, [x1] ++.Lt192: cbz x5, 1f // exactly 128 bytes? ++ ld1 {v28.16b-v31.16b}, [x10] ++ add x5, x5, x1 ++ tbl v28.16b, {v4.16b-v7.16b}, v28.16b ++ tbl v29.16b, {v4.16b-v7.16b}, v29.16b ++ tbl v30.16b, {v4.16b-v7.16b}, v30.16b ++ tbl v31.16b, {v4.16b-v7.16b}, v31.16b ++ ++0: eor v20.16b, v20.16b, v28.16b ++ eor v21.16b, v21.16b, v29.16b ++ eor v22.16b, v22.16b, v30.16b ++ eor v23.16b, v23.16b, v31.16b ++ st1 {v20.16b-v23.16b}, [x5] // overlapping stores ++1: st1 {v16.16b-v19.16b}, [x1] + b .Lout + ++ // fewer than 128 bytes of in/output ++.Lt128: ld1 {v28.16b-v31.16b}, [x10] ++ add x5, x5, x1 ++ sub x1, x1, #64 ++ tbl v28.16b, {v0.16b-v3.16b}, v28.16b ++ tbl v29.16b, {v0.16b-v3.16b}, v29.16b ++ tbl v30.16b, {v0.16b-v3.16b}, v30.16b ++ tbl v31.16b, {v0.16b-v3.16b}, v31.16b ++ ld1 {v16.16b-v19.16b}, [x1] // reload first output block ++ b 0b ++ + // fewer than 256 bytes of in/output +-2: ld1 {v4.16b}, [x10] +- ld1 {v5.16b}, [x11] +- movi v6.16b, #16 +- add x1, x1, x7 ++.Lt256: cbz x6, 2f // exactly 192 bytes? ++ ld1 {v4.16b-v7.16b}, [x10] ++ add x6, x6, x1 + tbl v0.16b, {v8.16b-v11.16b}, v4.16b +- tbx v24.16b, {v20.16b-v23.16b}, v5.16b +- add v4.16b, v4.16b, v6.16b +- add v5.16b, v5.16b, v6.16b +- tbl v1.16b, {v8.16b-v11.16b}, v4.16b +- tbx v25.16b, {v20.16b-v23.16b}, v5.16b +- add v4.16b, v4.16b, v6.16b +- add v5.16b, v5.16b, v6.16b +- tbl v2.16b, {v8.16b-v11.16b}, v4.16b +- tbx v26.16b, {v20.16b-v23.16b}, v5.16b +- add v4.16b, v4.16b, v6.16b +- add v5.16b, v5.16b, v6.16b +- tbl v3.16b, {v8.16b-v11.16b}, v4.16b +- tbx v27.16b, {v20.16b-v23.16b}, v5.16b +- +- eor v24.16b, v24.16b, v0.16b +- eor v25.16b, v25.16b, v1.16b +- eor v26.16b, v26.16b, v2.16b +- eor v27.16b, v27.16b, v3.16b +- st1 {v24.16b-v27.16b}, [x1] ++ tbl v1.16b, {v8.16b-v11.16b}, v5.16b ++ tbl v2.16b, {v8.16b-v11.16b}, v6.16b ++ tbl v3.16b, {v8.16b-v11.16b}, v7.16b ++ ++ eor v28.16b, v28.16b, v0.16b ++ eor v29.16b, v29.16b, v1.16b ++ eor v30.16b, v30.16b, v2.16b ++ eor v31.16b, v31.16b, v3.16b ++ st1 {v28.16b-v31.16b}, [x6] // overlapping stores ++2: st1 {v20.16b-v23.16b}, [x1] + b .Lout + + // fewer than 320 bytes of in/output +-3: ld1 {v4.16b}, [x10] +- ld1 {v5.16b}, [x11] +- movi v6.16b, #16 +- add x1, x1, x8 ++.Lt320: cbz x7, 3f // exactly 256 bytes? ++ ld1 {v4.16b-v7.16b}, [x10] ++ add x7, x7, x1 + tbl v0.16b, {v12.16b-v15.16b}, v4.16b +- tbx v28.16b, {v24.16b-v27.16b}, v5.16b +- add v4.16b, v4.16b, v6.16b +- add v5.16b, v5.16b, v6.16b +- tbl v1.16b, {v12.16b-v15.16b}, v4.16b +- tbx v29.16b, {v24.16b-v27.16b}, v5.16b +- add v4.16b, v4.16b, v6.16b +- add v5.16b, v5.16b, v6.16b +- tbl v2.16b, {v12.16b-v15.16b}, v4.16b +- tbx v30.16b, {v24.16b-v27.16b}, v5.16b +- add v4.16b, v4.16b, v6.16b +- add v5.16b, v5.16b, v6.16b +- tbl v3.16b, {v12.16b-v15.16b}, v4.16b +- tbx v31.16b, {v24.16b-v27.16b}, v5.16b ++ tbl v1.16b, {v12.16b-v15.16b}, v5.16b ++ tbl v2.16b, {v12.16b-v15.16b}, v6.16b ++ tbl v3.16b, {v12.16b-v15.16b}, v7.16b + + eor v28.16b, v28.16b, v0.16b + eor v29.16b, v29.16b, v1.16b + eor v30.16b, v30.16b, v2.16b + eor v31.16b, v31.16b, v3.16b +- st1 {v28.16b-v31.16b}, [x1] ++ st1 {v28.16b-v31.16b}, [x7] // overlapping stores ++3: st1 {v24.16b-v27.16b}, [x1] + b .Lout + ENDPROC(chacha_4block_xor_neon) + +@@ -851,7 +796,7 @@ ENDPROC(chacha_4block_xor_neon) + .align L1_CACHE_SHIFT + .Lpermute: + .set .Li, 0 +- .rept 192 ++ .rept 128 + .byte (.Li - 64) + .set .Li, .Li + 1 + .endr +-- +2.18.4 + + +From c896750facb1b60386a2db00930d4f493bf3f9f3 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 11 Feb 2020 20:47:05 +0100 -Subject: [PATCH 065/111] icmp: introduce helper for nat'd source address in +Subject: [PATCH 070/117] icmp: introduce helper for nat'd source address in network device context commit 0b41713b606694257b90d61ba7e2712d8457648b upstream. @@ -49334,10 +50058,10 @@ index 5d4bfdba9adf..9ac2d2672a93 100644 int icmp_err(struct sk_buff *skb, u32 info); int icmp_init(void); diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c -index 73f46cb5e51d..2721e1774e2f 100644 +index d00533aea1f0..5b7717da168d 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c -@@ -747,6 +747,39 @@ out:; +@@ -750,6 +750,39 @@ out:; } EXPORT_SYMBOL(__icmp_send); @@ -49421,13 +50145,13 @@ index 02045494c24c..e0086758b6ee 100644 +#endif #endif -- -2.18.2 +2.18.4 -From 55f44ac0d7ef3d9fe23b66ee91568edcfd0a687c Mon Sep 17 00:00:00 2001 +From d3f3014bf616f4cfadddad719c5fed79c3995612 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 9 Dec 2019 00:27:34 +0100 -Subject: [PATCH 066/111] net: WireGuard secure network tunnel +Subject: [PATCH 071/117] net: WireGuard secure network tunnel commit e7096c131e5161fa3b8e52a650d7719d2857adfd upstream. @@ -57608,13 +58332,13 @@ index 000000000000..e7310d9390f7 +[[ $alldeleted -eq 1 ]] +pretty "" "Objects that were created were also destroyed." -- -2.18.2 +2.18.4 -From 77c9e153f9f0df7f589a9c41b228137eac8a8752 Mon Sep 17 00:00:00 2001 +From ff03dd85c86a85e0a5e0b66cf35d50aa8bdf9e10 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 15 Dec 2019 22:08:00 +0100 -Subject: [PATCH 067/111] wireguard: selftests: import harness makefile for +Subject: [PATCH 072/117] wireguard: selftests: import harness makefile for test suite commit 65d88d04114bca7d85faebd5fed61069cb2b632c upstream. @@ -58745,13 +59469,13 @@ index 000000000000..9cca30206014 +CONFIG_WIREGUARD=y +CONFIG_WIREGUARD_DEBUG=y -- -2.18.2 +2.18.4 -From 15207cd73dd3d5a380c55cd14910d3f5754068c9 Mon Sep 17 00:00:00 2001 +From 66ccca5752057dec27807224049365b2ffe9acc7 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 15 Dec 2019 22:08:01 +0100 -Subject: [PATCH 068/111] wireguard: Kconfig: select parent dependency for +Subject: [PATCH 073/117] wireguard: Kconfig: select parent dependency for crypto commit d7c68a38bb4f9b7c1a2e4a772872c752ee5c44a6 upstream. @@ -58782,13 +59506,13 @@ index 16ad145e22c9..57f1ba924f4e 100644 select CRYPTO_POLY1305_NEON if ARM64 && KERNEL_MODE_NEON select CRYPTO_POLY1305_ARM if ARM -- -2.18.2 +2.18.4 -From 32c53a43704c0dc6a4b3595aaa466e24ef95f2c6 Mon Sep 17 00:00:00 2001 +From c11e11e6b0e6a2397e799c3992181031ed3eae04 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 15 Dec 2019 22:08:02 +0100 -Subject: [PATCH 069/111] wireguard: global: fix spelling mistakes in comments +Subject: [PATCH 074/117] wireguard: global: fix spelling mistakes in comments commit a2ec8b5706944d228181c8b91d815f41d6dd8e7b upstream. @@ -58856,13 +59580,13 @@ index dd8a47c4ad11..ae88be14c947 100644 * of a peer, it likely should not be specified in subsequent fragments. * -- -2.18.2 +2.18.4 -From 21758113061c32da38358a7623db25bea7a1b818 Mon Sep 17 00:00:00 2001 +From 868dfe47cfe68645314493b71fde4eb081bf6fef Mon Sep 17 00:00:00 2001 From: YueHaibing Date: Sun, 15 Dec 2019 22:08:03 +0100 -Subject: [PATCH 070/111] wireguard: main: remove unused include +Subject: [PATCH 075/117] wireguard: main: remove unused include commit 43967b6ff91e53bcce5ae08c16a0588a475b53a1 upstream. @@ -58891,13 +59615,13 @@ index 10c0a40f6a9e..7a7d5f1a80fc 100644 #include #include -- -2.18.2 +2.18.4 -From 484a916ee8c80ab19e0f322a6dc5da72dffc1926 Mon Sep 17 00:00:00 2001 +From 96d9926cb49105e894d6395995fb591542ed36f6 Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Sun, 15 Dec 2019 22:08:04 +0100 -Subject: [PATCH 071/111] wireguard: allowedips: use kfree_rcu() instead of +Subject: [PATCH 076/117] wireguard: allowedips: use kfree_rcu() instead of call_rcu() commit d89ee7d5c73af15c1c6f12b016cdf469742b5726 upstream. @@ -58939,13 +59663,13 @@ index 72667d5399c3..121d9ea0f135 100644 } } -- -2.18.2 +2.18.4 -From 81c5e624093c936565980ead355a4e58278dbfb1 Mon Sep 17 00:00:00 2001 +From c53da73ef139d2cf7f6be32859a3006dc383a52d Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 2 Jan 2020 17:47:49 +0100 -Subject: [PATCH 072/111] wireguard: selftests: remove ancient kernel +Subject: [PATCH 077/117] wireguard: selftests: remove ancient kernel compatibility code commit 9a69a4c8802adf642bc4a13d471b5a86b44ed434 upstream. @@ -59326,13 +60050,13 @@ index 9cca30206014..af9323a0b6e0 100644 CONFIG_FILE_LOCKING=y CONFIG_POSIX_TIMERS=y -- -2.18.2 +2.18.4 -From 0692300b5a34d4de3e6d2f122f9012ebabf1ba70 Mon Sep 17 00:00:00 2001 +From cef197f8fda5274ed18dfac7a9f8b56dacd40375 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 2 Jan 2020 17:47:50 +0100 -Subject: [PATCH 073/111] wireguard: queueing: do not account for pfmemalloc +Subject: [PATCH 078/117] wireguard: queueing: do not account for pfmemalloc when clearing skb header commit 04d2ea92a18417619182cbb79063f154892b0150 upstream. @@ -59371,13 +60095,13 @@ index 58fdd630b246..e62c714a548e 100644 skb->nohdr = 0; skb->peeked = 0; -- -2.18.2 +2.18.4 -From 0a724185216808689541cc36aca39b93eaf8d791 Mon Sep 17 00:00:00 2001 +From 35250a750b764c1cfe9f551ad26e27384de913cc Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 2 Jan 2020 17:47:51 +0100 -Subject: [PATCH 074/111] wireguard: socket: mark skbs as not on list when +Subject: [PATCH 079/117] wireguard: socket: mark skbs as not on list when receiving via gro commit 736775d06bac60d7a353e405398b48b2bd8b1e54 upstream. @@ -59411,13 +60135,13 @@ index c46256d0d81c..262f3b5c819d 100644 return 0; -- -2.18.2 +2.18.4 -From 63d5635fb45747466c1ec35862b88fd720208009 Mon Sep 17 00:00:00 2001 +From 5ec10b531579f77bfc70a15e7418819511a42d73 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 8 Jan 2020 16:59:02 -0500 -Subject: [PATCH 075/111] net: introduce skb_list_walk_safe for skb segment +Subject: [PATCH 080/117] net: introduce skb_list_walk_safe for skb segment walking commit dcfea72e79b0aa7a057c8f6024169d86a1bbc84b upstream. @@ -59473,7 +60197,7 @@ index c91f3051c5c7..b15a8be9d816 100644 - #endif /* _WG_DEVICE_H */ diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h -index 955e1370f033..5e9fe508977f 100644 +index 68139cc2f3ca..03cf61e8a43f 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -1480,6 +1480,11 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb) @@ -59489,13 +60213,13 @@ index 955e1370f033..5e9fe508977f 100644 { __list_del_entry(&skb->list); -- -2.18.2 +2.18.4 -From 73ccb3009a5fbc9cb752633ab1f58ddf5fb3baa2 Mon Sep 17 00:00:00 2001 +From a423ad10a308831d50f86c81f0291b51d801e53c Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 13 Jan 2020 18:42:26 -0500 -Subject: [PATCH 076/111] net: skbuff: disambiguate argument and member for +Subject: [PATCH 081/117] net: skbuff: disambiguate argument and member for skb_list_walk_safe helper commit 5eee7bd7e245914e4e050c413dfe864e31805207 upstream. @@ -59513,7 +60237,7 @@ Signed-off-by: Jason A. Donenfeld 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h -index 5e9fe508977f..3c7755d29636 100644 +index 03cf61e8a43f..6493c98c8631 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -1481,9 +1481,9 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb) @@ -59530,13 +60254,13 @@ index 5e9fe508977f..3c7755d29636 100644 static inline void skb_list_del_init(struct sk_buff *skb) { -- -2.18.2 +2.18.4 -From efa92661e440d0226cefd69c0abf4ca806d477f5 Mon Sep 17 00:00:00 2001 +From e257c5a9de187ade2531a9075aa84a78e182166d Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Tue, 4 Feb 2020 22:17:25 +0100 -Subject: [PATCH 077/111] wireguard: allowedips: fix use-after-free in +Subject: [PATCH 082/117] wireguard: allowedips: fix use-after-free in root_remove_peer_lists commit 9981159fc3b677b357f84e069a11de5a5ec8a2a8 upstream. @@ -59700,13 +60424,13 @@ index 121d9ea0f135..3725e9cd85f4 100644 return -ENOMEM; } -- -2.18.2 +2.18.4 -From b34ba0bc7bcc1ed8f9a98c02ccbe46bb6e9d25ea Mon Sep 17 00:00:00 2001 +From b3d2803255c144d08798504d6885de4ca725b132 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 4 Feb 2020 22:17:26 +0100 -Subject: [PATCH 078/111] wireguard: noise: reject peers with low order public +Subject: [PATCH 083/117] wireguard: noise: reject peers with low order public keys commit ec31c2676a10e064878927b243fada8c2fb0c03c upstream. @@ -59942,13 +60666,13 @@ index d71c8db68a8c..919d9d866446 100644 return ret; } -- -2.18.2 +2.18.4 -From 582b49f3e28a850c5064955c7c6556f29ffa5b73 Mon Sep 17 00:00:00 2001 +From 40409019d17b22d196464112350e574ad17edcf7 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 4 Feb 2020 22:17:27 +0100 -Subject: [PATCH 079/111] wireguard: selftests: ensure non-addition of peers +Subject: [PATCH 084/117] wireguard: selftests: ensure non-addition of peers with failed precomputation commit f9398acba6a4ae9cb98bfe4d56414d376eff8d57 upstream. @@ -59982,13 +60706,13 @@ index d5c85c7494f2..b03647d1bbf6 100755 declare -A objects -- -2.18.2 +2.18.4 -From 07464ba3502e269e5d1b6db1c4f1e60528c07f9f Mon Sep 17 00:00:00 2001 +From b7ddef4ada39278975785409561342e6ab55162e Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 4 Feb 2020 22:17:29 +0100 -Subject: [PATCH 080/111] wireguard: selftests: tie socket waiting to target +Subject: [PATCH 085/117] wireguard: selftests: tie socket waiting to target pid commit 88f404a9b1d75388225b1c67b6dd327cb2182777 upstream. @@ -60066,13 +60790,13 @@ index b03647d1bbf6..f5ab1cda8bb5 100755 ! read -r -N 1 -t 1 out <&4 || false kill $ncat_pid -- -2.18.2 +2.18.4 -From a5f7d81b8eb60585d519ae8b5406ee5299eba56d Mon Sep 17 00:00:00 2001 +From 515d03a657177e95843fe3540e56d162b820c396 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 11 Feb 2020 20:47:08 +0100 -Subject: [PATCH 081/111] wireguard: device: use icmp_ndo_send helper +Subject: [PATCH 086/117] wireguard: device: use icmp_ndo_send helper commit a12d7f3cbdc72c7625881c8dc2660fc2c979fdf2 upstream. @@ -60138,13 +60862,13 @@ index f5ab1cda8bb5..138d46b3f330 100755 ip0 link del vethrs ip1 link del wg0 -- -2.18.2 +2.18.4 -From ef2aa4e86d5cfc85d0c43a9c9258f0358a3416e1 Mon Sep 17 00:00:00 2001 +From 9fb389b4fef1f060e62cb931a07e6c1da5633624 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 14 Feb 2020 23:57:20 +0100 -Subject: [PATCH 082/111] wireguard: selftests: reduce complexity and fix make +Subject: [PATCH 087/117] wireguard: selftests: reduce complexity and fix make races commit 04ddf1208f03e1dbc39a4619c40eba640051b950 upstream. @@ -60248,13 +60972,13 @@ index f10aa3590adc..28d477683e8a 100644 $(STRIP) -s $@ -- -2.18.2 +2.18.4 -From 4290e92a82f97152d012f95bf12749d553657e83 Mon Sep 17 00:00:00 2001 +From 831a463b30cad290fc7d008bdac2845288375602 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 14 Feb 2020 23:57:21 +0100 -Subject: [PATCH 083/111] wireguard: receive: reset last_under_load to zero +Subject: [PATCH 088/117] wireguard: receive: reset last_under_load to zero commit 2a8a4df36462aa85b0db87b7c5ea145ba67e34a8 upstream. @@ -60292,13 +61016,13 @@ index 9c6bab9c981f..4a153894cee2 100644 under_load); if ((under_load && mac_state == VALID_MAC_WITH_COOKIE) || -- -2.18.2 +2.18.4 -From adccd7f3760f71ea360cca23ea61fe98e2570ce7 Mon Sep 17 00:00:00 2001 +From ea70fcce15dab5f0054b4ca65217e5a305e3c145 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 14 Feb 2020 23:57:22 +0100 -Subject: [PATCH 084/111] wireguard: send: account for mtu=0 devices +Subject: [PATCH 089/117] wireguard: send: account for mtu=0 devices commit 175f1ca9a9ed8689d2028da1a7c624bb4fb4ff7e upstream. @@ -60395,13 +61119,13 @@ index c13260563446..7348c10cbae3 100644 } -- -2.18.2 +2.18.4 -From 51e2c40ef1b13f286072ee2830f477cef8de4e51 Mon Sep 17 00:00:00 2001 +From 1d6e9ae34f4a1c67c53b7b715ae514cde6ace0eb Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 14 Feb 2020 23:57:23 +0100 -Subject: [PATCH 085/111] wireguard: socket: remove extra call to +Subject: [PATCH 090/117] wireguard: socket: remove extra call to synchronize_net commit 1fbc33b0a7feb6ca72bf7dc8a05d81485ee8ee2e upstream. @@ -60434,13 +61158,13 @@ index 262f3b5c819d..b0d6541582d3 100644 sock_free(old6); } -- -2.18.2 +2.18.4 -From 644412771742addf9ed055685b9d8625927efbee Mon Sep 17 00:00:00 2001 +From ce08a51556bf3f07c0c8312338a3035d8a2421d1 Mon Sep 17 00:00:00 2001 From: YueHaibing Date: Wed, 18 Mar 2020 18:30:43 -0600 -Subject: [PATCH 086/111] wireguard: selftests: remove duplicated include +Subject: [PATCH 091/117] wireguard: selftests: remove duplicated include commit 166391159c5deb84795d2ff46e95f276177fa5fb upstream. @@ -60468,13 +61192,13 @@ index 90bc9813cadc..c9698120ac9d 100644 #include #include -- -2.18.2 +2.18.4 -From 56136f7d6c86894d708c90f9d900c10eef211f5c Mon Sep 17 00:00:00 2001 +From aac50fb5b0eb9316f18cca18bed61919b88d41a0 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 18 Mar 2020 18:30:45 -0600 -Subject: [PATCH 087/111] wireguard: queueing: account for skb->protocol==0 +Subject: [PATCH 092/117] wireguard: queueing: account for skb->protocol==0 commit a5588604af448664e796daf3c1d5a4523c60667b upstream. @@ -60578,13 +61302,13 @@ index 4a153894cee2..243ed7172dd2 100644 len = ntohs(ip_hdr(skb)->tot_len); if (unlikely(len < sizeof(struct iphdr))) -- -2.18.2 +2.18.4 -From f20dfa360fade00beab3c1fde2484c0af31089e8 Mon Sep 17 00:00:00 2001 +From 964ce837b332aa9bdc060eb00c2211017838cd82 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 18 Mar 2020 18:30:46 -0600 -Subject: [PATCH 088/111] wireguard: receive: remove dead code from default +Subject: [PATCH 093/117] wireguard: receive: remove dead code from default packet type case commit 2b8765c52db24c0fbcc81bac9b5e8390f2c7d3c8 upstream. @@ -60619,13 +61343,13 @@ index 243ed7172dd2..da3b782ab7d3 100644 } return; -- -2.18.2 +2.18.4 -From 454eb2c1f4e51f3075bbe991fa3caec2e9d75dfc Mon Sep 17 00:00:00 2001 +From 27990b9e02e291207a49ea24bd9cd64ab4c53619 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 18 Mar 2020 18:30:47 -0600 -Subject: [PATCH 089/111] wireguard: noise: error out precomputed DH during +Subject: [PATCH 094/117] wireguard: noise: error out precomputed DH during handshake rather than config commit 11a7686aa99c7fe4b3f80f6dcccd54129817984d upstream. @@ -60857,13 +61581,13 @@ index 138d46b3f330..936e1ca9410e 100755 declare -A objects -- -2.18.2 +2.18.4 -From 5927c138a003f8e35ab286bd8521d314b8dba7c7 Mon Sep 17 00:00:00 2001 +From e3d013e38879c1a7e93dad7c4cceec6017d0e71e Mon Sep 17 00:00:00 2001 From: Sultan Alsawaf Date: Wed, 29 Apr 2020 14:59:20 -0600 -Subject: [PATCH 090/111] wireguard: send: remove errant newline from +Subject: [PATCH 095/117] wireguard: send: remove errant newline from packet_encrypt_worker commit d6833e42786e050e7522d6a91a9361e54085897d upstream. @@ -60892,13 +61616,13 @@ index 7348c10cbae3..3e030d614df5 100644 } -- -2.18.2 +2.18.4 -From 84d9e8aed2ff8c27d313c104898197f96db5940c Mon Sep 17 00:00:00 2001 +From 23400553fb68a0eb36708c8a767d68385a795ebf Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 29 Apr 2020 14:59:21 -0600 -Subject: [PATCH 091/111] wireguard: queueing: cleanup ptr_ring in error path +Subject: [PATCH 096/117] wireguard: queueing: cleanup ptr_ring in error path of packet_queue_init commit 130c58606171326c81841a49cc913cd354113dd9 upstream. @@ -60933,13 +61657,13 @@ index 5c964fcb994e..71b8e80b58e1 100644 INIT_WORK(&queue->work, function); } -- -2.18.2 +2.18.4 -From 4679b58795110210caaf0a8dfb0edcb7ee290a95 Mon Sep 17 00:00:00 2001 +From faab18ac509618e078a2b4e125fc2b9b9d01cdc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= Date: Wed, 29 Apr 2020 14:59:22 -0600 -Subject: [PATCH 092/111] wireguard: receive: use tunnel helpers for +Subject: [PATCH 097/117] wireguard: receive: use tunnel helpers for decapsulating ECN markings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -60989,13 +61713,13 @@ index da3b782ab7d3..267f202f1931 100644 goto dishonest_packet_type; } -- -2.18.2 +2.18.4 -From b49ee9516949e76a028cd02a2169bd5eb626f8b2 Mon Sep 17 00:00:00 2001 +From 4df414e69f6e40c5cf8242f301a6cb01226cc8a9 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 6 May 2020 15:33:02 -0600 -Subject: [PATCH 093/111] wireguard: selftests: use normal kernel stack size on +Subject: [PATCH 098/117] wireguard: selftests: use normal kernel stack size on ppc64 commit a0fd7cc87a018df1a17f9d3f0bd994c1f22c6b34 upstream. @@ -61024,13 +61748,13 @@ index 990c510a9cfa..f52f1e2bc7f6 100644 CONFIG_FRAME_WARN=1280 +CONFIG_THREAD_SHIFT=14 -- -2.18.2 +2.18.4 -From ea12677cac264b7ca0b590528811a7adea9dab85 Mon Sep 17 00:00:00 2001 +From a0746efe2e6f0487c565b6c739de99180f829ec8 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 6 May 2020 15:33:03 -0600 -Subject: [PATCH 094/111] wireguard: socket: remove errant restriction on +Subject: [PATCH 099/117] wireguard: socket: remove errant restriction on looping to self commit b673e24aad36981f327a6570412ffa7754de8911 upstream. @@ -61194,13 +61918,13 @@ index 936e1ca9410e..17a1f53ceba0 100755 ip1 -6 addr add fc00::9/96 dev vethc ip1 -6 route add default via fc00::1 -- -2.18.2 +2.18.4 -From 02e4d9d72c88c70cef26e348ef39b6172b9540d2 Mon Sep 17 00:00:00 2001 +From 16cbafae73e8af8c3b283aaaa785c497e9ee89b4 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 6 May 2020 15:33:04 -0600 -Subject: [PATCH 095/111] wireguard: send/receive: cond_resched() when +Subject: [PATCH 100/117] wireguard: send/receive: cond_resched() when processing worker ringbuffers commit 4005f5c3c9d006157ba716594e0d70c88a235c5e upstream. @@ -61260,13 +61984,13 @@ index 3e030d614df5..dc3079e17c7f 100644 } -- -2.18.2 +2.18.4 -From 86bd3f4255cb765f777d0c07e3088690d8f770b5 Mon Sep 17 00:00:00 2001 +From e2fc9350897b60a116ef4e5ab1a37e2122d734ae Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 6 May 2020 15:33:05 -0600 -Subject: [PATCH 096/111] wireguard: selftests: initalize ipv6 members to NULL +Subject: [PATCH 101/117] wireguard: selftests: initalize ipv6 members to NULL to squelch clang warning commit 4fed818ef54b08d4b29200e416cce65546ad5312 upstream. @@ -61317,13 +62041,13 @@ index bcd6462e4540..007cd4457c5f 100644 if (IS_ENABLED(CONFIG_KASAN) || IS_ENABLED(CONFIG_UBSAN)) return true; -- -2.18.2 +2.18.4 -From 9e483eb0a0929a2d41e6bd85050f4cd6df2296f7 Mon Sep 17 00:00:00 2001 +From 7181768ebd2a5227be5150ce3ec0b31cc0526951 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 6 May 2020 15:33:06 -0600 -Subject: [PATCH 097/111] wireguard: send/receive: use explicit unlikely branch +Subject: [PATCH 102/117] wireguard: send/receive: use explicit unlikely branch instead of implicit coalescing commit 243f2148937adc72bcaaa590d482d599c936efde upstream. @@ -61413,13 +62137,13 @@ index dc3079e17c7f..6687db699803 100644 } -- -2.18.2 +2.18.4 -From 63ff63eab82c03f8a704904f2d0053c9483a9963 Mon Sep 17 00:00:00 2001 +From 99d8e0929c8bb68772a3da8669c7a9d7a609deca Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 19 May 2020 22:49:27 -0600 -Subject: [PATCH 098/111] wireguard: selftests: use newer iproute2 for gcc-10 +Subject: [PATCH 103/117] wireguard: selftests: use newer iproute2 for gcc-10 commit ee3c1aa3f34b7842c1557cfe5d8c3f7b8c692de8 upstream. @@ -61450,13 +62174,13 @@ index 28d477683e8a..2dab4f57516d 100644 $(eval $(call tar_download,NMAP,nmap,7.80,.tar.bz2,https://nmap.org/dist/,fcfa5a0e42099e12e4bf7a68ebe6fde05553383a682e816a7ec9256ab4773faa)) $(eval $(call tar_download,IPUTILS,iputils,s20190709,.tar.gz,https://github.com/iputils/iputils/archive/s20190709.tar.gz/#,a15720dd741d7538dd2645f9f516d193636ae4300ff7dbc8bfca757bf166490a)) -- -2.18.2 +2.18.4 -From 16a7e167d711c54e7a7a5cbbeb2248a8d3112be8 Mon Sep 17 00:00:00 2001 +From 0df08bac3b1a5b8b47093b93803943e644b6cf65 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 19 May 2020 22:49:28 -0600 -Subject: [PATCH 099/111] wireguard: noise: read preshared key while taking +Subject: [PATCH 104/117] wireguard: noise: read preshared key while taking lock commit bc67d371256f5c47d824e2eec51e46c8d62d022e upstream. @@ -61518,13 +62242,13 @@ index 708dc61c974f..07eb438a6dee 100644 return ret_peer; } -- -2.18.2 +2.18.4 -From 3dcc39a231f8e089d1f5dfdca1df6a11bafbe6da Mon Sep 17 00:00:00 2001 +From ec6425628d4fa655a92ae6984ebda0be980016ed Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 19 May 2020 22:49:29 -0600 -Subject: [PATCH 100/111] wireguard: queueing: preserve flow hash across packet +Subject: [PATCH 105/117] wireguard: queueing: preserve flow hash across packet scrubbing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -61646,13 +62370,13 @@ index 6687db699803..2f5119ff93d8 100644 state = PACKET_STATE_DEAD; break; -- -2.18.2 +2.18.4 -From dc52db0cf977334487997686486a672a73e6f30a Mon Sep 17 00:00:00 2001 +From 84c0736cea5596e02ecce0bea45a69718704432d Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 19 May 2020 22:49:30 -0600 -Subject: [PATCH 101/111] wireguard: noise: separate receive counter from send +Subject: [PATCH 106/117] wireguard: noise: separate receive counter from send counter commit a9e90d9931f3a474f04bab782ccd9d77904941e9 upstream. @@ -61991,13 +62715,13 @@ index 2f5119ff93d8..f74b9341ab0f 100644 wg_noise_keypair_put(keypair, false); -- -2.18.2 +2.18.4 -From 171ddbce134ea616e96dcdaa759200b2239ffcc0 Mon Sep 17 00:00:00 2001 +From b8b2620c99253cac9a5008249391fee8fb3d0377 Mon Sep 17 00:00:00 2001 From: Frank Werner-Krippendorf Date: Tue, 23 Jun 2020 03:59:44 -0600 -Subject: [PATCH 102/111] wireguard: noise: do not assign initiation time in if +Subject: [PATCH 107/117] wireguard: noise: do not assign initiation time in if condition commit 558b353c9c2a717509f291c066c6bd8f5f5e21be upstream. @@ -62030,13 +62754,13 @@ index 626433690abb..201a22681945 100644 handshake->state = HANDSHAKE_CONSUMED_INITIATION; up_write(&handshake->lock); -- -2.18.2 +2.18.4 -From 69f3584dfb917d2d6ea7cefea968b36df678b5fa Mon Sep 17 00:00:00 2001 +From b1f3bfdc335281a83df2ee57d277345df076043c Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 23 Jun 2020 03:59:45 -0600 -Subject: [PATCH 103/111] wireguard: device: avoid circular netns references +Subject: [PATCH 108/117] wireguard: device: avoid circular netns references commit 900575aa33a3eaaef802b31de187a85c4a4b4bd0 upstream. @@ -62340,13 +63064,13 @@ index 17a1f53ceba0..d77f4829f1e0 100755 done < /dev/kmsg alldeleted=1 -- -2.18.2 +2.18.4 -From 722d6876f6951ed2886d255dc52dfcc2c0a05cb5 Mon Sep 17 00:00:00 2001 +From 6638d3114d662c256cea902f042dc1cf214eb0b5 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 24 Jun 2020 16:06:03 -0600 -Subject: [PATCH 104/111] wireguard: receive: account for napi_gro_receive +Subject: [PATCH 109/117] wireguard: receive: account for napi_gro_receive never returning GRO_DROP commit df08126e3833e9dca19e2407db5f5860a7c194fb upstream. @@ -62388,13 +63112,13 @@ index 91438144e4f7..9b2ab6fc91cd 100644 dishonest_packet_peer: -- -2.18.2 +2.18.4 -From b7f1bfd60e87a24534d5815033b7d35040850bb5 Mon Sep 17 00:00:00 2001 +From cf6318bad2a0c74fa1537902c214db46b2863da6 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 29 Jun 2020 19:06:18 -0600 -Subject: [PATCH 105/111] net: ip_tunnel: add header_ops for layer 3 devices +Subject: [PATCH 110/117] net: ip_tunnel: add header_ops for layer 3 devices commit 2606aff916854b61234bf85001be9777bab2d5f8 upstream. @@ -62414,7 +63138,7 @@ Signed-off-by: Jason A. Donenfeld 2 files changed, 21 insertions(+) diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h -index af645604f328..b0b03a9f7af9 100644 +index 56deb2501e96..8545fa25c7bf 100644 --- a/include/net/ip_tunnels.h +++ b/include/net/ip_tunnels.h @@ -289,6 +289,9 @@ int ip_tunnel_newlink(struct net_device *dev, struct nlattr *tb[], @@ -62454,13 +63178,13 @@ index 1452a97914a0..cfe21c3ddfc2 100644 +const struct header_ops ip_tunnel_header_ops = { .parse_protocol = ip_tunnel_parse_protocol }; +EXPORT_SYMBOL(ip_tunnel_header_ops); -- -2.18.2 +2.18.4 -From 843947533aba46175fdfea9aa6674a5bba321a10 Mon Sep 17 00:00:00 2001 +From e5bb1068b8eeb03f0b5659de02a16c968ce46e0c Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 29 Jun 2020 19:06:20 -0600 -Subject: [PATCH 106/111] wireguard: implement header_ops->parse_protocol for +Subject: [PATCH 111/117] wireguard: implement header_ops->parse_protocol for AF_PACKET commit 01a4967c71c004f8ecad4ab57021348636502fa9 upstream. @@ -62497,13 +63221,13 @@ index a8f151b1b5fa..c9f65e96ccb0 100644 dev->addr_len = 0; dev->needed_headroom = DATA_PACKET_HEAD_ROOM; -- -2.18.2 +2.18.4 -From a5ac0e0c6a686ec42004321a0ab9539364143050 Mon Sep 17 00:00:00 2001 +From 6b54af46ff60f401fdb246c9edc0af9f5ee065f1 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 29 Jun 2020 19:06:21 -0600 -Subject: [PATCH 107/111] wireguard: queueing: make use of +Subject: [PATCH 112/117] wireguard: queueing: make use of ip_tunnel_parse_protocol commit 1a574074ae7d1d745c16f7710655f38a53174c27 upstream. @@ -62574,13 +63298,13 @@ index 9b2ab6fc91cd..2c9551ea6dc7 100644 len = ntohs(ip_hdr(skb)->tot_len); if (unlikely(len < sizeof(struct iphdr))) -- -2.18.2 +2.18.4 -From 851d4971ac7da6fdc9b10adf4010fec13ea61c0d Mon Sep 17 00:00:00 2001 +From ae9aa1fe3f8a82b199ea467ce59bf60ce11728b7 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Tue, 18 Aug 2020 10:17:31 +0200 -Subject: [PATCH 108/111] netlink: consistently use NLA_POLICY_EXACT_LEN() +Subject: [PATCH 113/117] netlink: consistently use NLA_POLICY_EXACT_LEN() commit 8140860c817f3e9f78bcd1e420b9777ddcbaa629 upstream. @@ -62629,13 +63353,13 @@ index 9756239416fd..2a14f564033a 100644 [WGPEER_A_TX_BYTES] = { .type = NLA_U64 }, [WGPEER_A_ALLOWEDIPS] = { .type = NLA_NESTED }, -- -2.18.2 +2.18.4 -From d1b90bd05552e4ae77a5b409ea1215472db522a8 Mon Sep 17 00:00:00 2001 +From 26ffe7c1fb4e919f0fb1182f61fb3ea0b80eaa44 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Tue, 18 Aug 2020 10:17:32 +0200 -Subject: [PATCH 109/111] netlink: consistently use NLA_POLICY_MIN_LEN() +Subject: [PATCH 114/117] netlink: consistently use NLA_POLICY_MIN_LEN() commit bc0435855041d7fff0b83dd992fc4be34aa11afb upstream. @@ -62674,13 +63398,13 @@ index 2a14f564033a..1c69eb8735d5 100644 }; -- -2.18.2 +2.18.4 -From 27ec71c22b1dec44cf144c08d05c880d31d5eae2 Mon Sep 17 00:00:00 2001 +From bd6ee2b1c576a65d4ac641274c36a8e2f9eaa547 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 9 Sep 2020 13:58:14 +0200 -Subject: [PATCH 110/111] wireguard: noise: take lock when removing handshake +Subject: [PATCH 115/117] wireguard: noise: take lock when removing handshake entry from table commit 9179ba31367bcf481c3c79b5f028c94faad9f30a upstream. @@ -62807,13 +63531,13 @@ index 201a22681945..27cb5045bed2 100644 static struct noise_keypair *keypair_create(struct wg_peer *peer) -- -2.18.2 +2.18.4 -From e2b69aa576a3011fc722450f3f296189b1dac3c8 Mon Sep 17 00:00:00 2001 +From 5003c5d6a8698bce404a9e68528ec994ba1a0f12 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 9 Sep 2020 13:58:15 +0200 -Subject: [PATCH 111/111] wireguard: peerlookup: take lock before checking hash +Subject: [PATCH 116/117] wireguard: peerlookup: take lock before checking hash in replace operation commit 6147f7b1e90ff09bd52afc8b9206a7fcd133daf7 upstream. @@ -62875,5 +63599,69 @@ index e4deb331476b..f2783aa7a88f 100644 void wg_index_hashtable_remove(struct index_hashtable *table, -- -2.18.2 +2.18.4 + + +From 2d4c3892646cdd41486dc4b1aab1fc2942b49f10 Mon Sep 17 00:00:00 2001 +From: "Jason A. Donenfeld" +Date: Thu, 29 Oct 2020 03:56:05 +0100 +Subject: [PATCH 117/117] wireguard: selftests: check that route_me_harder + packets use the right sk + +commit af8afcf1fdd5f365f70e2386c2d8c7a1abd853d7 upstream. + +If netfilter changes the packet mark, the packet is rerouted. The +ip_route_me_harder family of functions fails to use the right sk, opting +to instead use skb->sk, resulting in a routing loop when used with +tunnels. With the next change fixing this issue in netfilter, test for +the relevant condition inside our test suite, since wireguard was where +the bug was discovered. + +Reported-by: Chen Minqiang +Signed-off-by: Jason A. Donenfeld +Signed-off-by: Pablo Neira Ayuso +Signed-off-by: Jason A. Donenfeld +--- + tools/testing/selftests/wireguard/netns.sh | 8 ++++++++ + tools/testing/selftests/wireguard/qemu/kernel.config | 2 ++ + 2 files changed, 10 insertions(+) + +diff --git a/tools/testing/selftests/wireguard/netns.sh b/tools/testing/selftests/wireguard/netns.sh +index d77f4829f1e0..74c69b75f6f5 100755 +--- a/tools/testing/selftests/wireguard/netns.sh ++++ b/tools/testing/selftests/wireguard/netns.sh +@@ -316,6 +316,14 @@ pp sleep 3 + n2 ping -W 1 -c 1 192.168.241.1 + n1 wg set wg0 peer "$pub2" persistent-keepalive 0 + ++# Test that sk_bound_dev_if works ++n1 ping -I wg0 -c 1 -W 1 192.168.241.2 ++# What about when the mark changes and the packet must be rerouted? ++n1 iptables -t mangle -I OUTPUT -j MARK --set-xmark 1 ++n1 ping -c 1 -W 1 192.168.241.2 # First the boring case ++n1 ping -I wg0 -c 1 -W 1 192.168.241.2 # Then the sk_bound_dev_if case ++n1 iptables -t mangle -D OUTPUT -j MARK --set-xmark 1 ++ + # Test that onion routing works, even when it loops + n1 wg set wg0 peer "$pub3" allowed-ips 192.168.242.2/32 endpoint 192.168.241.2:5 + ip1 addr add 192.168.242.1/24 dev wg0 +diff --git a/tools/testing/selftests/wireguard/qemu/kernel.config b/tools/testing/selftests/wireguard/qemu/kernel.config +index af9323a0b6e0..9864d106e818 100644 +--- a/tools/testing/selftests/wireguard/qemu/kernel.config ++++ b/tools/testing/selftests/wireguard/qemu/kernel.config +@@ -18,10 +18,12 @@ CONFIG_NF_NAT=y + CONFIG_NETFILTER_XTABLES=y + CONFIG_NETFILTER_XT_NAT=y + CONFIG_NETFILTER_XT_MATCH_LENGTH=y ++CONFIG_NETFILTER_XT_MARK=y + CONFIG_NF_CONNTRACK_IPV4=y + CONFIG_NF_NAT_IPV4=y + CONFIG_IP_NF_IPTABLES=y + CONFIG_IP_NF_FILTER=y ++CONFIG_IP_NF_MANGLE=y + CONFIG_IP_NF_NAT=y + CONFIG_IP_ADVANCED_ROUTER=y + CONFIG_IP_MULTIPLE_TABLES=y +-- +2.18.4 diff --git a/SPECS/raspberrypi2.spec b/SPECS/raspberrypi2.spec index d06ceea..4b1e535 100644 --- a/SPECS/raspberrypi2.spec +++ b/SPECS/raspberrypi2.spec @@ -1,5 +1,5 @@ -%global commit_firmware_long b0f9870274333af93ecc5e779619bf51c092364d -%global commit_linux_long edc21a35b9b7b427716564c3b744ed2a89fcd19a +%global commit_firmware_long d016a6eb01c8c7326a89cb42809fed2a21525de5 +%global commit_linux_long 6da087d0c70c256aeeaa230dd52094d709aef61b ExclusiveArch: aarch64 armv7hl @@ -32,7 +32,7 @@ ExclusiveArch: aarch64 armv7hl %define extra_version 1 %define kversion 5.4 -%define kfullversion %{kversion}.72 +%define kfullversion %{kversion}.84 Name: raspberrypi2 Version: %{kfullversion} @@ -284,6 +284,9 @@ cp $(ls -1d /usr/share/%{name}-kernel/*-*/|sort -V|tail -1)/boot/overlays/README %doc /boot/LICENCE.broadcom %changelog +* Sun Dec 20 2020 Pablo Greco - 5.4.84 +- Update to version v5.4.84 + * Sun Oct 18 2020 Pablo Greco - 5.4.72 - Update to version v5.4.72