--- /dev/null
+From e8fd0adf105e132fd84545997bbef3d5edc2c9c1 Mon Sep 17 00:00:00 2001
+From: Nicolas Ferre <nicolas.ferre@microchip.com>
+Date: Tue, 13 Mar 2018 16:20:05 +0100
+Subject: ARM: dts: at91: at91sam9g25: fix mux-mask pinctrl property
+
+From: Nicolas Ferre <nicolas.ferre@microchip.com>
+
+commit e8fd0adf105e132fd84545997bbef3d5edc2c9c1 upstream.
+
+There are only 19 PIOB pins having primary names PB0-PB18. Not all of them
+have a 'C' function. So the pinctrl property mask ends up being the same as the
+other SoC of the at91sam9x5 series.
+
+Reported-by: Marek Sieranski <marek.sieranski@microchip.com>
+Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
+Cc: <stable@vger.kernel.org> # v3.8+
+Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/at91sam9g25.dtsi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm/boot/dts/at91sam9g25.dtsi
++++ b/arch/arm/boot/dts/at91sam9g25.dtsi
+@@ -21,7 +21,7 @@
+ atmel,mux-mask = <
+ /* A B C */
+ 0xffffffff 0xffe0399f 0xc000001c /* pioA */
+- 0x0007ffff 0x8000fe3f 0x00000000 /* pioB */
++ 0x0007ffff 0x00047e3f 0x00000000 /* pioB */
+ 0x80000000 0x07c0ffff 0xb83fffff /* pioC */
+ 0x003fffff 0x003f8000 0x00000000 /* pioD */
+ >;
--- /dev/null
+From 9a06757dcc8509c162ac00488c8c82fc98e04227 Mon Sep 17 00:00:00 2001
+From: Santiago Esteban <Santiago.Esteban@microchip.com>
+Date: Thu, 18 Jan 2018 15:38:47 +0100
+Subject: ARM: dts: at91: sama5d4: fix pinctrl compatible string
+
+From: Santiago Esteban <Santiago.Esteban@microchip.com>
+
+commit 9a06757dcc8509c162ac00488c8c82fc98e04227 upstream.
+
+The compatible string is incorrect. Add atmel,sama5d3-pinctrl since
+it's the appropriate compatible string. Remove the
+atmel,at91rm9200-pinctrl compatible string, this fallback is
+useless, there are too many changes.
+
+Signed-off-by: Santiago Esteban <Santiago.Esteban@microchip.com>
+Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
+Cc: stable@vger.kernel.org #v3.18
+Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/sama5d4.dtsi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm/boot/dts/sama5d4.dtsi
++++ b/arch/arm/boot/dts/sama5d4.dtsi
+@@ -1362,7 +1362,7 @@
+ pinctrl@fc06a000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+- compatible = "atmel,at91sam9x5-pinctrl", "atmel,at91rm9200-pinctrl", "simple-bus";
++ compatible = "atmel,sama5d3-pinctrl", "atmel,at91sam9x5-pinctrl", "simple-bus";
+ ranges = <0xfc068000 0xfc068000 0x100
+ 0xfc06a000 0xfc06a000 0x4000>;
+ /* WARNING: revisit as pin spec has changed */
--- /dev/null
+From 6f4870753f29edf7dc39444246f9e39987b8b158 Mon Sep 17 00:00:00 2001
+From: Marek Szyprowski <m.szyprowski@samsung.com>
+Date: Fri, 2 Mar 2018 17:07:42 +0100
+Subject: ARM: dts: exynos: Fix IOMMU support for GScaler devices on Exynos5250
+
+From: Marek Szyprowski <m.szyprowski@samsung.com>
+
+commit 6f4870753f29edf7dc39444246f9e39987b8b158 upstream.
+
+The proper name for the property, which assign given device to IOMMU is
+'iommus', not 'iommu'. Fix incorrect name and let all GScaler devices
+to be properly handled when IOMMU support is enabled.
+
+Reported-by: Andrzej Hajda <a.hajda@samsung.com>
+Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
+Fixes: 6cbfdd73a94f ("ARM: dts: add sysmmu nodes for exynos5250")
+Cc: <stable@vger.kernel.org> # v4.8+
+Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/exynos5250.dtsi | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/arch/arm/boot/dts/exynos5250.dtsi
++++ b/arch/arm/boot/dts/exynos5250.dtsi
+@@ -640,7 +640,7 @@
+ power-domains = <&pd_gsc>;
+ clocks = <&clock CLK_GSCL0>;
+ clock-names = "gscl";
+- iommu = <&sysmmu_gsc0>;
++ iommus = <&sysmmu_gsc0>;
+ };
+
+ gsc_1: gsc@13e10000 {
+@@ -650,7 +650,7 @@
+ power-domains = <&pd_gsc>;
+ clocks = <&clock CLK_GSCL1>;
+ clock-names = "gscl";
+- iommu = <&sysmmu_gsc1>;
++ iommus = <&sysmmu_gsc1>;
+ };
+
+ gsc_2: gsc@13e20000 {
+@@ -660,7 +660,7 @@
+ power-domains = <&pd_gsc>;
+ clocks = <&clock CLK_GSCL2>;
+ clock-names = "gscl";
+- iommu = <&sysmmu_gsc2>;
++ iommus = <&sysmmu_gsc2>;
+ };
+
+ gsc_3: gsc@13e30000 {
+@@ -670,7 +670,7 @@
+ power-domains = <&pd_gsc>;
+ clocks = <&clock CLK_GSCL3>;
+ clock-names = "gscl";
+- iommu = <&sysmmu_gsc3>;
++ iommus = <&sysmmu_gsc3>;
+ };
+
+ hdmi: hdmi@14530000 {
mm-slab-reschedule-cache_reap-on-the-same-cpu.patch
usb-musb-gadget-misplaced-out-of-bounds-check.patch
usb-gadget-udc-core-update-usb_ep_queue-documentation.patch
+arm-dts-at91-at91sam9g25-fix-mux-mask-pinctrl-property.patch
+arm-dts-exynos-fix-iommu-support-for-gscaler-devices-on-exynos5250.patch
+arm-dts-at91-sama5d4-fix-pinctrl-compatible-string.patch
+spi-fix-scatterlist-elements-size-in-spi_map_buf.patch
--- /dev/null
+From ce99319a182fe766be67f96338386f3ec73e321c Mon Sep 17 00:00:00 2001
+From: Maxime Chevallier <maxime.chevallier@bootlin.com>
+Date: Fri, 2 Mar 2018 15:55:09 +0100
+Subject: spi: Fix scatterlist elements size in spi_map_buf
+
+From: Maxime Chevallier <maxime.chevallier@bootlin.com>
+
+commit ce99319a182fe766be67f96338386f3ec73e321c upstream.
+
+When SPI transfers can be offloaded using DMA, the SPI core need to
+build a scatterlist to make sure that the buffer to be transferred is
+dma-able.
+
+This patch fixes the scatterlist entry size computation in the case
+where the maximum acceptable scatterlist entry supported by the DMA
+controller is less than PAGE_SIZE, when the buffer is vmalloced.
+
+For each entry, the actual size is given by the minimum between the
+desc_len (which is the max buffer size supported by the DMA controller)
+and the remaining buffer length until we cross a page boundary.
+
+Fixes: 65598c13fd66 ("spi: Fix per-page mapping of unaligned vmalloc-ed buffer")
+Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Cc: stable@vger.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/spi/spi.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+--- a/drivers/spi/spi.c
++++ b/drivers/spi/spi.c
+@@ -743,8 +743,14 @@ static int spi_map_buf(struct spi_master
+ for (i = 0; i < sgs; i++) {
+
+ if (vmalloced_buf || kmap_buf) {
+- min = min_t(size_t,
+- len, desc_len - offset_in_page(buf));
++ /*
++ * Next scatterlist entry size is the minimum between
++ * the desc_len and the remaining buffer length that
++ * fits in a page.
++ */
++ min = min_t(size_t, desc_len,
++ min_t(size_t, len,
++ PAGE_SIZE - offset_in_page(buf)));
+ if (vmalloced_buf)
+ vm_page = vmalloc_to_page(buf);
+ else