--- /dev/null
+From 81ef447950bf0955aca46f4a7617d8ce435cf0ce Mon Sep 17 00:00:00 2001
+From: Gary Bisson <bisson.gary@gmail.com>
+Date: Wed, 3 Dec 2014 15:03:51 -0800
+Subject: ARM: clk-imx6q: fix video divider for rev T0 1.0
+
+From: Gary Bisson <bisson.gary@gmail.com>
+
+commit 81ef447950bf0955aca46f4a7617d8ce435cf0ce upstream.
+
+The post dividers do not work on i.MX6Q rev T0 1.0 so they must be fixed
+to 1. As the table index was wrong, a divider a of 4 could still be
+requested which implied the clock not to be set properly. This is the
+root cause of the HDMI not working at high resolution on rev T0 1.0 of
+the SoC.
+
+Signed-off-by: Gary Bisson <bisson.gary@gmail.com>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/mach-imx/clk-imx6q.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm/mach-imx/clk-imx6q.c
++++ b/arch/arm/mach-imx/clk-imx6q.c
+@@ -144,7 +144,7 @@ static void __init imx6q_clocks_init(str
+ post_div_table[1].div = 1;
+ post_div_table[2].div = 1;
+ video_div_table[1].div = 1;
+- video_div_table[2].div = 1;
++ video_div_table[3].div = 1;
+ }
+
+ clk[IMX6QDL_PLL1_BYPASS_SRC] = imx_clk_mux("pll1_bypass_src", base + 0x00, 14, 2, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels));
--- /dev/null
+From 5adba7c2daaecccf377e7ed5a2996caedd5384f1 Mon Sep 17 00:00:00 2001
+From: Jisheng Zhang <jszhang@marvell.com>
+Date: Wed, 31 Dec 2014 16:57:51 +0800
+Subject: ARM: dts: berlin: add broken-cd and set bus width for eMMC in
+ Marvell DMP DT
+
+From: Jisheng Zhang <jszhang@marvell.com>
+
+commit 5adba7c2daaecccf377e7ed5a2996caedd5384f1 upstream.
+
+There's no card detection for the eMMC, so this patch adds the missing
+broken-cd property. This patch also sets bus width as 8 to add
+MMC_CAP_8_BIT_DATA in the Host capabilities.
+
+Fixes: 3047086dfd56 ("ARM: dts: berlin: enable SD card reader and eMMC for the BG2Q DMP")
+Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
+Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/berlin2q-marvell-dmp.dts | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
++++ b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
+@@ -30,6 +30,8 @@
+ };
+
+ &sdhci2 {
++ broken-cd;
++ bus-width = <8>;
+ non-removable;
+ status = "okay";
+ };
--- /dev/null
+From 69d2626f97b7f017ee4416b7dc071e9499c2c944 Mon Sep 17 00:00:00 2001
+From: Mugunthan V N <mugunthanvnm@ti.com>
+Date: Mon, 5 Jan 2015 15:45:45 -0800
+Subject: ARM: dts: dra7-evm: fix qspi device tree partition size
+
+From: Mugunthan V N <mugunthanvnm@ti.com>
+
+commit 69d2626f97b7f017ee4416b7dc071e9499c2c944 upstream.
+
+64KiB is allocated for qspi dtb partition which is not
+sufficient, so updating the partition table size to 512KiB
+for device tree partition.
+
+This also aligns the QSPI partition definitions between
+kernel and U-Boot.
+
+Fixes: dc2dd5b8 ("ARM: dts: dra7: Add qspi device")
+
+Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/dra7-evm.dts | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+--- a/arch/arm/boot/dts/dra7-evm.dts
++++ b/arch/arm/boot/dts/dra7-evm.dts
+@@ -399,23 +399,23 @@
+ };
+ partition@5 {
+ label = "QSPI.u-boot-spl-os";
+- reg = <0x00140000 0x00010000>;
++ reg = <0x00140000 0x00080000>;
+ };
+ partition@6 {
+ label = "QSPI.u-boot-env";
+- reg = <0x00150000 0x00010000>;
++ reg = <0x001c0000 0x00010000>;
+ };
+ partition@7 {
+ label = "QSPI.u-boot-env.backup1";
+- reg = <0x00160000 0x0010000>;
++ reg = <0x001d0000 0x0010000>;
+ };
+ partition@8 {
+ label = "QSPI.kernel";
+- reg = <0x00170000 0x0800000>;
++ reg = <0x001e0000 0x0800000>;
+ };
+ partition@9 {
+ label = "QSPI.file-system";
+- reg = <0x00970000 0x01690000>;
++ reg = <0x009e0000 0x01620000>;
+ };
+ };
+ };
--- /dev/null
+From 7a87e9cbc3a2f0ff0955815335e08c9862359130 Mon Sep 17 00:00:00 2001
+From: Fabio Estevam <fabio.estevam@freescale.com>
+Date: Fri, 5 Dec 2014 16:16:07 -0200
+Subject: ARM: dts: imx25: Fix the SPI1 clocks
+
+From: Fabio Estevam <fabio.estevam@freescale.com>
+
+commit 7a87e9cbc3a2f0ff0955815335e08c9862359130 upstream.
+
+From Documentation/devicetree/bindings/clock/imx25-clock.txt:
+
+ cspi1_ipg 78
+ cspi2_ipg 79
+ cspi3_ipg 80
+
+, so fix the SPI1 clocks accordingly to avoid a kernel hang when trying to
+access SPI1.
+
+Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
+Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/imx25.dtsi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm/boot/dts/imx25.dtsi
++++ b/arch/arm/boot/dts/imx25.dtsi
+@@ -162,7 +162,7 @@
+ #size-cells = <0>;
+ compatible = "fsl,imx25-cspi", "fsl,imx35-cspi";
+ reg = <0x43fa4000 0x4000>;
+- clocks = <&clks 62>, <&clks 62>;
++ clocks = <&clks 78>, <&clks 78>;
+ clock-names = "ipg", "per";
+ interrupts = <14>;
+ status = "disabled";
--- /dev/null
+From 7a9f0604bd56936b2b18f49824e0e392dc7878c3 Mon Sep 17 00:00:00 2001
+From: Fabio Estevam <fabio.estevam@freescale.com>
+Date: Mon, 5 Jan 2015 15:19:08 -0200
+Subject: ARM: dts: imx51-babbage: Fix ULPI PHY reset modelling
+
+From: Fabio Estevam <fabio.estevam@freescale.com>
+
+commit 7a9f0604bd56936b2b18f49824e0e392dc7878c3 upstream.
+
+GPIO2_5 is the reset GPIO for the USB3317 ULPI PHY. Instead of modelling it as
+a regulator, the correct approach is to use the 'reset_gpios' property of the
+"usb-nop-xceiv" node.
+
+GPIO1_7 is the reset GPIO for the USB2517 USB hub. As we currently don't have
+dt bindings to describe a HUB reset, let's keep using the regulator approach.
+
+Rename the regulator to 'reg_hub_reset' to better describe its function and bind
+it with the USB host1 port instead.
+
+USB host support has been introduced by commit 9bf206a9d13be3 ("ARM: dts:
+imx51-babbage: Add USB Host1 support"), which landed in 3.16 and it seems that
+USB has only been functional due to previous bootloader initialization.
+
+With this patch applied we can get USB host to work without relying on the
+bootloader.
+
+Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
+Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/imx51-babbage.dts | 22 +++++-----------------
+ 1 file changed, 5 insertions(+), 17 deletions(-)
+
+--- a/arch/arm/boot/dts/imx51-babbage.dts
++++ b/arch/arm/boot/dts/imx51-babbage.dts
+@@ -127,24 +127,12 @@
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+- reg_usbh1_vbus: regulator@0 {
+- compatible = "regulator-fixed";
+- pinctrl-names = "default";
+- pinctrl-0 = <&pinctrl_usbh1reg>;
+- reg = <0>;
+- regulator-name = "usbh1_vbus";
+- regulator-min-microvolt = <5000000>;
+- regulator-max-microvolt = <5000000>;
+- gpio = <&gpio2 5 GPIO_ACTIVE_HIGH>;
+- enable-active-high;
+- };
+-
+- reg_usbotg_vbus: regulator@1 {
++ reg_hub_reset: regulator@0 {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usbotgreg>;
+- reg = <1>;
+- regulator-name = "usbotg_vbus";
++ reg = <0>;
++ regulator-name = "hub_reset";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio1 7 GPIO_ACTIVE_HIGH>;
+@@ -176,6 +164,7 @@
+ reg = <0>;
+ clocks = <&clks IMX5_CLK_DUMMY>;
+ clock-names = "main_clk";
++ reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
+ };
+ };
+ };
+@@ -419,7 +408,7 @@
+ &usbh1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usbh1>;
+- vbus-supply = <®_usbh1_vbus>;
++ vbus-supply = <®_hub_reset>;
+ fsl,usbphy = <&usbh1phy>;
+ phy_type = "ulpi";
+ status = "okay";
+@@ -429,7 +418,6 @@
+ dr_mode = "otg";
+ disable-over-current;
+ phy_type = "utmi_wide";
+- vbus-supply = <®_usbotg_vbus>;
+ status = "okay";
+ };
+
--- /dev/null
+From d2a10a1727b3948019128e83162f22c65859f1fd Mon Sep 17 00:00:00 2001
+From: Dmitry Voytik <voytikd@gmail.com>
+Date: Thu, 6 Nov 2014 22:46:20 +0400
+Subject: ARM: imx6q: drop unnecessary semicolon
+
+From: Dmitry Voytik <voytikd@gmail.com>
+
+commit d2a10a1727b3948019128e83162f22c65859f1fd upstream.
+
+Drop unnecessary semicolon after closing curly bracket.
+
+Signed-off-by: Dmitry Voytik <voytikd@gmail.com>
+Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/mach-imx/clk-imx6q.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm/mach-imx/clk-imx6q.c
++++ b/arch/arm/mach-imx/clk-imx6q.c
+@@ -145,7 +145,7 @@ static void __init imx6q_clocks_init(str
+ post_div_table[2].div = 1;
+ video_div_table[1].div = 1;
+ video_div_table[2].div = 1;
+- };
++ }
+
+ clk[IMX6QDL_PLL1_BYPASS_SRC] = imx_clk_mux("pll1_bypass_src", base + 0x00, 14, 2, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels));
+ clk[IMX6QDL_PLL2_BYPASS_SRC] = imx_clk_mux("pll2_bypass_src", base + 0x30, 14, 2, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels));
--- /dev/null
+From 7c168ed898931f6c3314d696e63cf993378ca192 Mon Sep 17 00:00:00 2001
+From: Fabio Estevam <fabio.estevam@freescale.com>
+Date: Tue, 16 Dec 2014 17:30:28 -0200
+Subject: ARM: imx6sx: Set PLL2 as parent of QSPI clocks
+
+From: Fabio Estevam <fabio.estevam@freescale.com>
+
+commit 7c168ed898931f6c3314d696e63cf993378ca192 upstream.
+
+The default qspi2_clk_sel field of register CCM_CS2CDR contains '110' which is
+marked as 'reserved', so we can't rely on the default value.
+
+Provide a proper parent for QSPI clocks to avoid a kernel oops:
+
+[ 1.037920] Division by zero in kernel.
+[ 1.041807] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.18.0-rc7-next-20141204-00002-g5aa23e1 #2143
+[ 1.050967] Hardware name: Freescale i.MX6 SoloX (Device Tree)
+[ 1.056853] Backtrace:
+[ 1.059360] [<80011ea0>] (dump_backtrace) from [<8001203c>] (show_stack+0x18/0x1c)
+[ 1.066982] r6:00000000 r5:00000000 r4:00000000 r3:00000000
+[ 1.072754] [<80012024>] (show_stack) from [<806b7100>] (dump_stack+0x88/0xa4)
+[ 1.080038] [<806b7078>] (dump_stack) from [<80011d20>] (__div0+0x18/0x20)
+[ 1.086958] r5:be018500 r4:be017c00
+[ 1.090600] [<80011d08>] (__div0) from [<802aa418>] (Ldiv0+0x8/0x10)
+[ 1.097012] [<80504fbc>] (clk_divider_set_rate) from [<80503ddc>] (clk_change_rate+0x14c/0x17c)
+[ 1.105759] r7:00000000 r6:00000000 r5:be018500 r4:00000000
+[ 1.111516] [<80503c90>] (clk_change_rate) from [<80503ea0>] (clk_set_rate+0x94/0x98)
+[ 1.119391] r8:be7e0368 r7:00000000 r6:be11a000 r5:be018500 r4:00000000 r3:00000000
+[ 1.127290] [<80503e0c>] (clk_set_rate) from [<80410558>] (fsl_qspi_probe+0x23c/0x75c)
+[ 1.135260] r5:be11a010 r4:be350010
+[ 1.138900] [<8041031c>] (fsl_qspi_probe) from [<80385a18>] (platform_drv_probe+0x50/0xac)
+
+Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
+Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/mach-imx/clk-imx6sx.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/arch/arm/mach-imx/clk-imx6sx.c
++++ b/arch/arm/mach-imx/clk-imx6sx.c
+@@ -558,6 +558,9 @@ static void __init imx6sx_clocks_init(st
+ clk_set_parent(clks[IMX6SX_CLK_GPU_CORE_SEL], clks[IMX6SX_CLK_PLL3_PFD0]);
+ clk_set_parent(clks[IMX6SX_CLK_GPU_AXI_SEL], clks[IMX6SX_CLK_PLL3_PFD0]);
+
++ clk_set_parent(clks[IMX6SX_CLK_QSPI1_SEL], clks[IMX6SX_CLK_PLL2_BUS]);
++ clk_set_parent(clks[IMX6SX_CLK_QSPI2_SEL], clks[IMX6SX_CLK_PLL2_BUS]);
++
+ /* Set initial power mode */
+ imx6q_set_lpm(WAIT_CLOCKED);
+ }
--- /dev/null
+From 40d1746d2eeec5e05956d749cca6364573b472b6 Mon Sep 17 00:00:00 2001
+From: Nishanth Menon <nm@ti.com>
+Date: Mon, 5 Jan 2015 15:45:45 -0800
+Subject: ARM: omap2plus_defconfig: use CONFIG_CPUFREQ_DT
+
+From: Nishanth Menon <nm@ti.com>
+
+commit 40d1746d2eeec5e05956d749cca6364573b472b6 upstream.
+
+CONFIG_GENERIC_CPUFREQ_CPU0 disappeared with commit bbcf071969b20f
+("cpufreq: cpu0: rename driver and internals to 'cpufreq_dt'")
+
+Use the renamed CONFIG_CPUFREQ_DT generic driver. It looks like with
+v3.18-rc1, commit bbcf071969b20f and fdc509b15eb3eb came in via
+different trees causing the resultant v3.18-rc1 to be non-functional for
+cpufreq as default supported with omap2plus_defconfig.
+
+Fixes: fdc509b15eb3eb ("ARM: omap2plus_defconfig: Add cpufreq to defconfig")
+Signed-off-by: Nishanth Menon <nm@ti.com>
+Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/configs/omap2plus_defconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm/configs/omap2plus_defconfig
++++ b/arch/arm/configs/omap2plus_defconfig
+@@ -68,7 +68,7 @@ CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
+ CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+ CONFIG_CPU_FREQ_GOV_USERSPACE=y
+ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+-CONFIG_GENERIC_CPUFREQ_CPU0=y
++CONFIG_CPUFREQ_DT=y
+ # CONFIG_ARM_OMAP2PLUS_CPUFREQ is not set
+ CONFIG_CPU_IDLE=y
+ CONFIG_BINFMT_MISC=y
--- /dev/null
+From 999f934de195a1506089b52c77429fdba25da688 Mon Sep 17 00:00:00 2001
+From: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
+Date: Mon, 5 Jan 2015 15:45:45 -0800
+Subject: ARM: omap5/dra7xx: Enable booting secondary CPU in HYP mode
+
+From: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
+
+commit 999f934de195a1506089b52c77429fdba25da688 upstream.
+
+If the boot loader enables HYP mode on the boot CPU, the secondary CPU
+also needs to call into the ROM to switch to HYP mode before booting.
+The firmwares on the omap5 and dra7xx unfortunately do not take care
+of this, so it has to be handled by the kernel.
+
+This patch is based on "[PATCH 2/2] ARM: OMAP5: Add HYP mode entry support
+for secondary CPUs" by Santosh Shilimkar <santosh.shilimkar@ti.com>,
+except this version does not require a compile time CONFIG to control
+if it should enable HYP mode or not, it simply does it based on the mode
+of the boot CPU, so it works whether the CPU boots in SVC or HYP mode,
+and should even work as a guest kernel inside kvm if qemu decides to
+support emulating the omap5 or dra7xx.
+
+Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/mach-omap2/common.h | 1 +
+ arch/arm/mach-omap2/omap-headsmp.S | 21 +++++++++++++++++++++
+ arch/arm/mach-omap2/omap-smp.c | 13 +++++++++++--
+ 3 files changed, 33 insertions(+), 2 deletions(-)
+
+--- a/arch/arm/mach-omap2/common.h
++++ b/arch/arm/mach-omap2/common.h
+@@ -249,6 +249,7 @@ extern void omap4_cpu_die(unsigned int c
+ extern struct smp_operations omap4_smp_ops;
+
+ extern void omap5_secondary_startup(void);
++extern void omap5_secondary_hyp_startup(void);
+ #endif
+
+ #if defined(CONFIG_SMP) && defined(CONFIG_PM)
+--- a/arch/arm/mach-omap2/omap-headsmp.S
++++ b/arch/arm/mach-omap2/omap-headsmp.S
+@@ -22,6 +22,7 @@
+
+ /* Physical address needed since MMU not enabled yet on secondary core */
+ #define AUX_CORE_BOOT0_PA 0x48281800
++#define API_HYP_ENTRY 0x102
+
+ /*
+ * OMAP5 specific entry point for secondary CPU to jump from ROM
+@@ -41,6 +42,26 @@ wait: ldr r2, =AUX_CORE_BOOT0_PA @ read
+ b secondary_startup
+ ENDPROC(omap5_secondary_startup)
+ /*
++ * Same as omap5_secondary_startup except we call into the ROM to
++ * enable HYP mode first. This is called instead of
++ * omap5_secondary_startup if the primary CPU was put into HYP mode by
++ * the boot loader.
++ */
++ENTRY(omap5_secondary_hyp_startup)
++wait_2: ldr r2, =AUX_CORE_BOOT0_PA @ read from AuxCoreBoot0
++ ldr r0, [r2]
++ mov r0, r0, lsr #5
++ mrc p15, 0, r4, c0, c0, 5
++ and r4, r4, #0x0f
++ cmp r0, r4
++ bne wait_2
++ ldr r12, =API_HYP_ENTRY
++ adr r0, hyp_boot
++ smc #0
++hyp_boot:
++ b secondary_startup
++ENDPROC(omap5_secondary_hyp_startup)
++/*
+ * OMAP4 specific entry point for secondary CPU to jump from ROM
+ * code. This routine also provides a holding flag into which
+ * secondary core is held until we're ready for it to initialise.
+--- a/arch/arm/mach-omap2/omap-smp.c
++++ b/arch/arm/mach-omap2/omap-smp.c
+@@ -22,6 +22,7 @@
+ #include <linux/irqchip/arm-gic.h>
+
+ #include <asm/smp_scu.h>
++#include <asm/virt.h>
+
+ #include "omap-secure.h"
+ #include "omap-wakeupgen.h"
+@@ -227,8 +228,16 @@ static void __init omap4_smp_prepare_cpu
+ if (omap_secure_apis_support())
+ omap_auxcoreboot_addr(virt_to_phys(startup_addr));
+ else
+- writel_relaxed(virt_to_phys(omap5_secondary_startup),
+- base + OMAP_AUX_CORE_BOOT_1);
++ /*
++ * If the boot CPU is in HYP mode then start secondary
++ * CPU in HYP mode as well.
++ */
++ if ((__boot_cpu_mode & MODE_MASK) == HYP_MODE)
++ writel_relaxed(virt_to_phys(omap5_secondary_hyp_startup),
++ base + OMAP_AUX_CORE_BOOT_1);
++ else
++ writel_relaxed(virt_to_phys(omap5_secondary_startup),
++ base + OMAP_AUX_CORE_BOOT_1);
+
+ }
+
--- /dev/null
+From 572b24e6d85d98cdc552f07e9fb9870d9460d81b Mon Sep 17 00:00:00 2001
+From: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
+Date: Mon, 5 Jan 2015 15:45:45 -0800
+Subject: ARM: omap5/dra7xx: Fix frequency typos
+
+From: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
+
+commit 572b24e6d85d98cdc552f07e9fb9870d9460d81b upstream.
+
+The switch statement of the possible list of SYSCLK1 frequencies is
+missing a 0 in 4 out of the 7 frequencies.
+
+Fixes: fa6d79d27614 ("ARM: OMAP: Add initialisation for the real-time counter")
+Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>
+Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
+Acked-by: Nishanth Menon <nm@ti.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/mach-omap2/timer.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/arch/arm/mach-omap2/timer.c
++++ b/arch/arm/mach-omap2/timer.c
+@@ -513,11 +513,11 @@ static void __init realtime_counter_init
+ rate = clk_get_rate(sys_clk);
+ /* Numerator/denumerator values refer TRM Realtime Counter section */
+ switch (rate) {
+- case 1200000:
++ case 12000000:
+ num = 64;
+ den = 125;
+ break;
+- case 1300000:
++ case 13000000:
+ num = 768;
+ den = 1625;
+ break;
+@@ -529,11 +529,11 @@ static void __init realtime_counter_init
+ num = 192;
+ den = 625;
+ break;
+- case 2600000:
++ case 26000000:
+ num = 384;
+ den = 1625;
+ break;
+- case 2700000:
++ case 27000000:
+ num = 256;
+ den = 1125;
+ break;
--- /dev/null
+From b0ddb319db3d7a1943445f0de0a45c07a7f3457a Mon Sep 17 00:00:00 2001
+From: Geert Uytterhoeven <geert+renesas@glider.be>
+Date: Tue, 6 Jan 2015 14:39:10 +0100
+Subject: ARM: shmobile: sh73a0 legacy: Set .control_parent for all irqpin instances
+
+From: Geert Uytterhoeven <geert+renesas@glider.be>
+
+commit b0ddb319db3d7a1943445f0de0a45c07a7f3457a upstream.
+
+The sh73a0 INTC can't mask interrupts properly most likely due to a
+hardware bug. Set the .control_parent flag to delegate masking to the
+parent interrupt controller, like was already done for irqpin1.
+
+Without this, accessing the three-axis digital accelerometer ADXL345
+on kzm9g through /dev/input/event1 causes an interrupt storm, which
+requires a power-cycle to recover from.
+
+This was inspired by a patch for arch/arm/boot/dts/sh73a0.dtsi from
+Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>.
+
+Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
+Fixes: 341eb5465f67437a ("ARM: shmobile: INTC External IRQ pin driver on sh73a0")
+Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/mach-shmobile/setup-sh73a0.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/arch/arm/mach-shmobile/setup-sh73a0.c
++++ b/arch/arm/mach-shmobile/setup-sh73a0.c
+@@ -598,6 +598,7 @@ static struct platform_device ipmmu_devi
+
+ static struct renesas_intc_irqpin_config irqpin0_platform_data = {
+ .irq_base = irq_pin(0), /* IRQ0 -> IRQ7 */
++ .control_parent = true,
+ };
+
+ static struct resource irqpin0_resources[] = {
+@@ -659,6 +660,7 @@ static struct platform_device irqpin1_de
+
+ static struct renesas_intc_irqpin_config irqpin2_platform_data = {
+ .irq_base = irq_pin(16), /* IRQ16 -> IRQ23 */
++ .control_parent = true,
+ };
+
+ static struct resource irqpin2_resources[] = {
+@@ -689,6 +691,7 @@ static struct platform_device irqpin2_de
+
+ static struct renesas_intc_irqpin_config irqpin3_platform_data = {
+ .irq_base = irq_pin(24), /* IRQ24 -> IRQ31 */
++ .control_parent = true,
+ };
+
+ static struct resource irqpin3_resources[] = {
--- /dev/null
+From 61b43d4e919e8fa5e10c77ee32ba328da07e0264 Mon Sep 17 00:00:00 2001
+From: Keerthy <j-keerthy@ti.com>
+Date: Mon, 10 Nov 2014 23:49:47 +0530
+Subject: bus: omap_l3_noc: Add resume hook to restore context
+
+From: Keerthy <j-keerthy@ti.com>
+
+commit 61b43d4e919e8fa5e10c77ee32ba328da07e0264 upstream.
+
+On certain SoCs such as AM437x SoC, L3_noc error registers are
+maintained in power domain such as per domain which looses context as part
+of low power state such as RTC+DDR mode. On these platforms when we
+mask interrupts which we cannot handle, the source of these interrupts
+still remain on resume, however, the flag mux registers now contain
+their reset value (unmasked) - this breaks the system with infinite
+interrupts since we do not these interrupts to take place ever again.
+
+To handle this: restore the masking of interrupts which we have
+already recorded in the system as ones we cannot handle.
+
+Fixes: 2100b595b7 ("bus: omap_l3_noc: ignore masked out unclearable targets")
+Acked-by: Nishanth Menon <nm@ti.com>
+Signed-off-by: Keerthy <j-keerthy@ti.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/bus/omap_l3_noc.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 55 insertions(+)
+
+--- a/drivers/bus/omap_l3_noc.c
++++ b/drivers/bus/omap_l3_noc.c
+@@ -296,11 +296,66 @@ static int omap_l3_probe(struct platform
+ return ret;
+ }
+
++#ifdef CONFIG_PM
++
++/**
++ * l3_resume_noirq() - resume function for l3_noc
++ * @dev: pointer to l3_noc device structure
++ *
++ * We only have the resume handler only since we
++ * have already maintained the delta register
++ * configuration as part of configuring the system
++ */
++static int l3_resume_noirq(struct device *dev)
++{
++ struct omap_l3 *l3 = dev_get_drvdata(dev);
++ int i;
++ struct l3_flagmux_data *flag_mux;
++ void __iomem *base, *mask_regx = NULL;
++ u32 mask_val;
++
++ for (i = 0; i < l3->num_modules; i++) {
++ base = l3->l3_base[i];
++ flag_mux = l3->l3_flagmux[i];
++ if (!flag_mux->mask_app_bits && !flag_mux->mask_dbg_bits)
++ continue;
++
++ mask_regx = base + flag_mux->offset + L3_FLAGMUX_MASK0 +
++ (L3_APPLICATION_ERROR << 3);
++ mask_val = readl_relaxed(mask_regx);
++ mask_val &= ~(flag_mux->mask_app_bits);
++
++ writel_relaxed(mask_val, mask_regx);
++ mask_regx = base + flag_mux->offset + L3_FLAGMUX_MASK0 +
++ (L3_DEBUG_ERROR << 3);
++ mask_val = readl_relaxed(mask_regx);
++ mask_val &= ~(flag_mux->mask_dbg_bits);
++
++ writel_relaxed(mask_val, mask_regx);
++ }
++
++ /* Dummy read to force OCP barrier */
++ if (mask_regx)
++ (void)readl(mask_regx);
++
++ return 0;
++}
++
++static const struct dev_pm_ops l3_dev_pm_ops = {
++ .resume_noirq = l3_resume_noirq,
++};
++
++#define L3_DEV_PM_OPS (&l3_dev_pm_ops)
++#else
++#define L3_DEV_PM_OPS NULL
++#endif
++
+ static struct platform_driver omap_l3_driver = {
+ .probe = omap_l3_probe,
+ .driver = {
+ .name = "omap_l3_noc",
+ .owner = THIS_MODULE,
++ .pm = L3_DEV_PM_OPS,
+ .of_match_table = of_match_ptr(l3_noc_match),
+ },
+ };
--- /dev/null
+From c4cf0935a2d8fe6d186bf4253ea3c4b4a8a8a710 Mon Sep 17 00:00:00 2001
+From: Keerthy <j-keerthy@ti.com>
+Date: Mon, 10 Nov 2014 23:49:48 +0530
+Subject: bus: omap_l3_noc: Correct returning IRQ_HANDLED
+ unconditionally in the irq handler
+
+From: Keerthy <j-keerthy@ti.com>
+
+commit c4cf0935a2d8fe6d186bf4253ea3c4b4a8a8a710 upstream.
+
+Correct returning IRQ_HANDLED unconditionally in the irq handler.
+Return IRQ_NONE for some interrupt which we do not expect to be
+handled in this handler. This prevents kernel stalling with back
+to back spurious interrupts.
+
+Fixes: 2722e56de6 ("OMAP4: l3: Introduce l3-interconnect error handling driver")
+Acked-by: Nishanth Menon <nm@ti.com>
+Signed-off-by: Keerthy <j-keerthy@ti.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/bus/omap_l3_noc.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/drivers/bus/omap_l3_noc.c
++++ b/drivers/bus/omap_l3_noc.c
+@@ -222,10 +222,14 @@ static irqreturn_t l3_interrupt_handler(
+ }
+
+ /* Error found so break the for loop */
+- break;
++ return IRQ_HANDLED;
+ }
+ }
+- return IRQ_HANDLED;
++
++ dev_err(l3->dev, "L3 %s IRQ not handled!!\n",
++ inttype ? "debug" : "application");
++
++ return IRQ_NONE;
+ }
+
+ static const struct of_device_id l3_noc_match[] = {
--- /dev/null
+From b442723fcec445fb0ae1104888dd22cd285e0a91 Mon Sep 17 00:00:00 2001
+From: "Ahmed S. Darwish" <ahmed.darwish@valeo.com>
+Date: Mon, 5 Jan 2015 12:49:10 -0500
+Subject: can: kvaser_usb: Don't free packets when tight on URBs
+
+From: "Ahmed S. Darwish" <ahmed.darwish@valeo.com>
+
+commit b442723fcec445fb0ae1104888dd22cd285e0a91 upstream.
+
+Flooding the Kvaser CAN to USB dongle with multiple reads and
+writes in high frequency caused seemingly-random panics in the
+kernel.
+
+On further inspection, it seems the driver erroneously freed the
+to-be-transmitted packet upon getting tight on URBs and returning
+NETDEV_TX_BUSY, leading to invalid memory writes and double frees
+at a later point in time.
+
+Note:
+
+Finding no more URBs/transmit-contexts and returning NETDEV_TX_BUSY
+is a driver bug in and out of itself: it means that our start/stop
+queue flow control is broken.
+
+This patch only fixes the (buggy) error handling code; the root
+cause shall be fixed in a later commit.
+
+Acked-by: Olivier Sobrie <olivier@sobrie.be>
+Signed-off-by: Ahmed S. Darwish <ahmed.darwish@valeo.com>
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/can/usb/kvaser_usb.c | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+--- a/drivers/net/can/usb/kvaser_usb.c
++++ b/drivers/net/can/usb/kvaser_usb.c
+@@ -1294,12 +1294,14 @@ static netdev_tx_t kvaser_usb_start_xmit
+ if (!urb) {
+ netdev_err(netdev, "No memory left for URBs\n");
+ stats->tx_dropped++;
+- goto nourbmem;
++ dev_kfree_skb(skb);
++ return NETDEV_TX_OK;
+ }
+
+ buf = kmalloc(sizeof(struct kvaser_msg), GFP_ATOMIC);
+ if (!buf) {
+ stats->tx_dropped++;
++ dev_kfree_skb(skb);
+ goto nobufmem;
+ }
+
+@@ -1334,6 +1336,7 @@ static netdev_tx_t kvaser_usb_start_xmit
+ }
+ }
+
++ /* This should never happen; it implies a flow control bug */
+ if (!context) {
+ netdev_warn(netdev, "cannot find free context\n");
+ ret = NETDEV_TX_BUSY;
+@@ -1364,9 +1367,6 @@ static netdev_tx_t kvaser_usb_start_xmit
+ if (unlikely(err)) {
+ can_free_echo_skb(netdev, context->echo_index);
+
+- skb = NULL; /* set to NULL to avoid double free in
+- * dev_kfree_skb(skb) */
+-
+ atomic_dec(&priv->active_tx_urbs);
+ usb_unanchor_urb(urb);
+
+@@ -1388,8 +1388,6 @@ releasebuf:
+ kfree(buf);
+ nobufmem:
+ usb_free_urb(urb);
+-nourbmem:
+- dev_kfree_skb(skb);
+ return ret;
+ }
+
--- /dev/null
+From 5e7e6e0c9b47a45576c38b4a72d67927a5e049f7 Mon Sep 17 00:00:00 2001
+From: "Ahmed S. Darwish" <ahmed.darwish@valeo.com>
+Date: Mon, 5 Jan 2015 12:57:13 -0500
+Subject: can: kvaser_usb: Don't send a RESET_CHIP for non-existing channels
+
+From: "Ahmed S. Darwish" <ahmed.darwish@valeo.com>
+
+commit 5e7e6e0c9b47a45576c38b4a72d67927a5e049f7 upstream.
+
+Recent Leaf firmware versions (>= 3.1.557) do not allow to send
+commands for non-existing channels. If a command is sent for a
+non-existing channel, the firmware crashes.
+
+Reported-by: Christopher Storah <Christopher.Storah@invetech.com.au>
+Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
+Signed-off-by: Ahmed S. Darwish <ahmed.darwish@valeo.com>
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/can/usb/kvaser_usb.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/can/usb/kvaser_usb.c
++++ b/drivers/net/can/usb/kvaser_usb.c
+@@ -1503,6 +1503,10 @@ static int kvaser_usb_init_one(struct us
+ struct kvaser_usb_net_priv *priv;
+ int i, err;
+
++ err = kvaser_usb_send_simple_msg(dev, CMD_RESET_CHIP, channel);
++ if (err)
++ return err;
++
+ netdev = alloc_candev(sizeof(*priv), MAX_TX_URBS);
+ if (!netdev) {
+ dev_err(&intf->dev, "Cannot alloc candev\n");
+@@ -1607,9 +1611,6 @@ static int kvaser_usb_probe(struct usb_i
+
+ usb_set_intfdata(intf, dev);
+
+- for (i = 0; i < MAX_NET_DEVICES; i++)
+- kvaser_usb_send_simple_msg(dev, CMD_RESET_CHIP, i);
+-
+ err = kvaser_usb_get_software_info(dev);
+ if (err) {
+ dev_err(&intf->dev,
--- /dev/null
+From 889b77f7fd2bcc922493d73a4c51d8a851505815 Mon Sep 17 00:00:00 2001
+From: "Ahmed S. Darwish" <ahmed.darwish@valeo.com>
+Date: Mon, 5 Jan 2015 12:52:06 -0500
+Subject: can: kvaser_usb: Reset all URB tx contexts upon channel close
+
+From: "Ahmed S. Darwish" <ahmed.darwish@valeo.com>
+
+commit 889b77f7fd2bcc922493d73a4c51d8a851505815 upstream.
+
+Flooding the Kvaser CAN to USB dongle with multiple reads and
+writes in very high frequency (*), closing the CAN channel while
+all the transmissions are on (#), opening the device again (@),
+then sending a small number of packets would make the driver
+enter an almost infinite loop of:
+
+[....]
+[15959.853988] kvaser_usb 4-3:1.0 can0: cannot find free context
+[15959.853990] kvaser_usb 4-3:1.0 can0: cannot find free context
+[15959.853991] kvaser_usb 4-3:1.0 can0: cannot find free context
+[15959.853993] kvaser_usb 4-3:1.0 can0: cannot find free context
+[15959.853994] kvaser_usb 4-3:1.0 can0: cannot find free context
+[15959.853995] kvaser_usb 4-3:1.0 can0: cannot find free context
+[....]
+
+_dragging the whole system down_ in the process due to the
+excessive logging output.
+
+Initially, this has caused random panics in the kernel due to a
+buggy error recovery path. That got fixed in an earlier commit.(%)
+This patch aims at solving the root cause. -->
+
+16 tx URBs and contexts are allocated per CAN channel per USB
+device. Such URBs are protected by:
+
+a) A simple atomic counter, up to a value of MAX_TX_URBS (16)
+b) A flag in each URB context, stating if it's free
+c) The fact that ndo_start_xmit calls are themselves protected
+ by the networking layers higher above
+
+After grabbing one of the tx URBs, if the driver noticed that all
+of them are now taken, it stops the netif transmission queue.
+Such queue is worken up again only if an acknowedgment was received
+from the firmware on one of our earlier-sent frames.
+
+Meanwhile, upon channel close (#), the driver sends a CMD_STOP_CHIP
+to the firmware, effectively closing all further communication. In
+the high traffic case, the atomic counter remains at MAX_TX_URBS,
+and all the URB contexts remain marked as active. While opening
+the channel again (@), it cannot send any further frames since no
+more free tx URB contexts are available.
+
+Reset all tx URB contexts upon CAN channel close.
+
+(*) 50 parallel instances of `cangen0 -g 0 -ix`
+(#) `ifconfig can0 down`
+(@) `ifconfig can0 up`
+(%) "can: kvaser_usb: Don't free packets when tight on URBs"
+
+Signed-off-by: Ahmed S. Darwish <ahmed.darwish@valeo.com>
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/can/usb/kvaser_usb.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/net/can/usb/kvaser_usb.c
++++ b/drivers/net/can/usb/kvaser_usb.c
+@@ -1246,6 +1246,9 @@ static int kvaser_usb_close(struct net_d
+ if (err)
+ netdev_warn(netdev, "Cannot stop device, error %d\n", err);
+
++ /* reset tx contexts */
++ kvaser_usb_unlink_tx_urbs(priv);
++
+ priv->can.state = CAN_STATE_STOPPED;
+ close_candev(priv->netdev);
+
--- /dev/null
+From b5c8afe5be51078a979d86ae5ae78c4ac948063d Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Fri, 12 Dec 2014 16:58:05 -0800
+Subject: decompress_bunzip2: off by one in get_next_block()
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit b5c8afe5be51078a979d86ae5ae78c4ac948063d upstream.
+
+"origPtr" is used as an offset into the bd->dbuf[] array. That array is
+allocated in start_bunzip() and has "bd->dbufSize" number of elements so
+the test here should be >= instead of >.
+
+Later we check "origPtr" again before using it as an offset so I don't
+know if this bug can be triggered in real life.
+
+Fixes: bc22c17e12c1 ('bzip2/lzma: library support for gzip, bzip2 and lzma decompression')
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Cc: Alain Knaff <alain@knaff.lu>
+Cc: Yinghai Lu <yinghai@kernel.org>
+Cc: "H. Peter Anvin" <hpa@zytor.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ lib/decompress_bunzip2.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/lib/decompress_bunzip2.c
++++ b/lib/decompress_bunzip2.c
+@@ -184,7 +184,7 @@ static int INIT get_next_block(struct bu
+ if (get_bits(bd, 1))
+ return RETVAL_OBSOLETE_INPUT;
+ origPtr = get_bits(bd, 24);
+- if (origPtr > dbufSize)
++ if (origPtr >= dbufSize)
+ return RETVAL_DATA_ERROR;
+ /* mapping table: if some byte values are never used (encoding things
+ like ascii text), the compression code removes the gaps to have fewer
--- /dev/null
+From 2eacc608b3bf3519fc353c558454873f4589146d Mon Sep 17 00:00:00 2001
+From: Lars-Peter Clausen <lars@metafoo.de>
+Date: Wed, 26 Nov 2014 11:35:35 +0100
+Subject: iio: ad799x: Fix ad7991/ad7995/ad7999 config setup
+
+From: Lars-Peter Clausen <lars@metafoo.de>
+
+commit 2eacc608b3bf3519fc353c558454873f4589146d upstream.
+
+The ad7991/ad7995/ad7999 does not have a configuration register like the
+other devices that can be written and read. The configuration is written as
+part of the conversion sequence.
+
+Fixes: 0f7ddcc1bff1 ("iio:adc:ad799x: Write default config on probe and reset alert status on probe")
+Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
+Tested-by: Mike Looijmans <mike.looijmans@topic.nl>
+Signed-off-by: Jonathan Cameron <jic23@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/iio/adc/ad799x.c | 15 +++++++++++++--
+ 1 file changed, 13 insertions(+), 2 deletions(-)
+
+--- a/drivers/iio/adc/ad799x.c
++++ b/drivers/iio/adc/ad799x.c
+@@ -143,9 +143,15 @@ static int ad799x_write_config(struct ad
+ case ad7998:
+ return i2c_smbus_write_word_swapped(st->client, AD7998_CONF_REG,
+ val);
+- default:
++ case ad7992:
++ case ad7993:
++ case ad7994:
+ return i2c_smbus_write_byte_data(st->client, AD7998_CONF_REG,
+ val);
++ default:
++ /* Will be written when doing a conversion */
++ st->config = val;
++ return 0;
+ }
+ }
+
+@@ -155,8 +161,13 @@ static int ad799x_read_config(struct ad7
+ case ad7997:
+ case ad7998:
+ return i2c_smbus_read_word_swapped(st->client, AD7998_CONF_REG);
+- default:
++ case ad7992:
++ case ad7993:
++ case ad7994:
+ return i2c_smbus_read_byte_data(st->client, AD7998_CONF_REG);
++ default:
++ /* No readback support */
++ return st->config;
+ }
+ }
+
--- /dev/null
+From 810aa0918b2b032684c8cad13f73d6ba37ad11c0 Mon Sep 17 00:00:00 2001
+From: Sam hung <sam.hung@emc.com.tw>
+Date: Thu, 8 Jan 2015 13:22:43 -0800
+Subject: Input: elantech - support new ICs types for version 4
+
+From: Sam hung <sam.hung@emc.com.tw>
+
+commit 810aa0918b2b032684c8cad13f73d6ba37ad11c0 upstream.
+
+This change allows the driver to recognize newer Elantech touchpads.
+
+Signed-off-by: Yi ju Hong <sam.hung@emc.com.tw>
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/input/mouse/elantech.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/input/mouse/elantech.c
++++ b/drivers/input/mouse/elantech.c
+@@ -1520,6 +1520,8 @@ static int elantech_set_properties(struc
+ case 7:
+ case 8:
+ case 9:
++ case 10:
++ case 13:
+ etd->hw_version = 4;
+ break;
+ default:
--- /dev/null
+From 9333caeaeae4f831054e0e127a6ed3948b604d3e Mon Sep 17 00:00:00 2001
+From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Date: Thu, 8 Jan 2015 14:53:23 -0800
+Subject: Input: I8042 - add Acer Aspire 7738 to the nomux list
+
+From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+
+commit 9333caeaeae4f831054e0e127a6ed3948b604d3e upstream.
+
+When KBC is in active multiplexing mode the touchpad on this laptop does
+not work.
+
+Reported-by: Bilal Koc <koc.bilo@googlemail.com>
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/input/serio/i8042-x86ia64io.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/drivers/input/serio/i8042-x86ia64io.h
++++ b/drivers/input/serio/i8042-x86ia64io.h
+@@ -415,6 +415,13 @@ static const struct dmi_system_id __init
+ },
+ },
+ {
++ /* Acer Aspire 7738 */
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 7738"),
++ },
++ },
++ {
+ /* Gericom Bellagio */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Gericom"),
--- /dev/null
+From 148e9a711e034e06310a8c36b64957934ebe30f2 Mon Sep 17 00:00:00 2001
+From: Srihari Vijayaraghavan <linux.bug.reporting@gmail.com>
+Date: Wed, 7 Jan 2015 16:25:53 -0800
+Subject: Input: i8042 - reset keyboard to fix Elantech touchpad detection
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Srihari Vijayaraghavan <linux.bug.reporting@gmail.com>
+
+commit 148e9a711e034e06310a8c36b64957934ebe30f2 upstream.
+
+On some laptops, keyboard needs to be reset in order to successfully detect
+touchpad (e.g., some Gigabyte laptop models with Elantech touchpads).
+Without resettin keyboard touchpad pretends to be completely dead.
+
+Based on the original patch by Mateusz Jończyk this version has been
+expanded to include DMI based detection & application of the fix
+automatically on the affected models of laptops. This has been confirmed to
+fix problem by three users already on three different models of laptops.
+
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=81331
+Signed-off-by: Srihari Vijayaraghavan <linux.bug.reporting@gmail.com>
+Acked-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
+Tested-by: Srihari Vijayaraghavan <linux.bug.reporting@gmail.com>
+Tested by: Zakariya Dehlawi <zdehlawi@gmail.com>
+Tested-by: Guillaum Bouchard <guillaum.bouchard@gmail.com>
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ Documentation/kernel-parameters.txt | 1 +
+ drivers/input/serio/i8042-x86ia64io.h | 32 ++++++++++++++++++++++++++++++++
+ drivers/input/serio/i8042.c | 14 ++++++++++++++
+ 3 files changed, 47 insertions(+)
+
+--- a/Documentation/kernel-parameters.txt
++++ b/Documentation/kernel-parameters.txt
+@@ -1270,6 +1270,7 @@ bytes respectively. Such letter suffixes
+ i8042.notimeout [HW] Ignore timeout condition signalled by controller
+ i8042.reset [HW] Reset the controller during init and cleanup
+ i8042.unlock [HW] Unlock (ignore) the keylock
++ i8042.kbdreset [HW] Reset device connected to KBD port
+
+ i810= [HW,DRM]
+
+--- a/drivers/input/serio/i8042-x86ia64io.h
++++ b/drivers/input/serio/i8042-x86ia64io.h
+@@ -735,6 +735,35 @@ static const struct dmi_system_id __init
+ { }
+ };
+
++/*
++ * Some laptops need keyboard reset before probing for the trackpad to get
++ * it detected, initialised & finally work.
++ */
++static const struct dmi_system_id __initconst i8042_dmi_kbdreset_table[] = {
++ {
++ /* Gigabyte P35 v2 - Elantech touchpad */
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "P35V2"),
++ },
++ },
++ {
++ /* Aorus branded Gigabyte X3 Plus - Elantech touchpad */
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "X3"),
++ },
++ },
++ {
++ /* Gigabyte P34 - Elantech touchpad */
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "P34"),
++ },
++ },
++ { }
++};
++
+ #endif /* CONFIG_X86 */
+
+ #ifdef CONFIG_PNP
+@@ -1030,6 +1059,9 @@ static int __init i8042_platform_init(vo
+ if (dmi_check_system(i8042_dmi_dritek_table))
+ i8042_dritek = true;
+
++ if (dmi_check_system(i8042_dmi_kbdreset_table))
++ i8042_kbdreset = true;
++
+ /*
+ * A20 was already enabled during early kernel init. But some buggy
+ * BIOSes (in MSI Laptops) require A20 to be enabled using 8042 to
+--- a/drivers/input/serio/i8042.c
++++ b/drivers/input/serio/i8042.c
+@@ -67,6 +67,10 @@ static bool i8042_notimeout;
+ module_param_named(notimeout, i8042_notimeout, bool, 0);
+ MODULE_PARM_DESC(notimeout, "Ignore timeouts signalled by i8042");
+
++static bool i8042_kbdreset;
++module_param_named(kbdreset, i8042_kbdreset, bool, 0);
++MODULE_PARM_DESC(kbdreset, "Reset device connected to KBD port");
++
+ #ifdef CONFIG_X86
+ static bool i8042_dritek;
+ module_param_named(dritek, i8042_dritek, bool, 0);
+@@ -790,6 +794,16 @@ static int __init i8042_check_aux(void)
+ return -1;
+
+ /*
++ * Reset keyboard (needed on some laptops to successfully detect
++ * touchpad, e.g., some Gigabyte laptop models with Elantech
++ * touchpads).
++ */
++ if (i8042_kbdreset) {
++ pr_warn("Attempting to reset device connected to KBD port\n");
++ i8042_kbd_write(NULL, (unsigned char) 0xff);
++ }
++
++/*
+ * Test AUX IRQ delivery to make sure BIOS did not grab the IRQ and
+ * used it for a PCI card or somethig else.
+ */
--- /dev/null
+From a16c5f99a28c9945165c46da27fff8e6f26f8736 Mon Sep 17 00:00:00 2001
+From: Michal Marek <mmarek@suse.cz>
+Date: Wed, 31 Dec 2014 16:29:35 +0100
+Subject: kbuild: Fix removal of the debian/ directory
+
+From: Michal Marek <mmarek@suse.cz>
+
+commit a16c5f99a28c9945165c46da27fff8e6f26f8736 upstream.
+
+scripts/Makefile.clean treats absolute path specially, but
+$(objtree)/debian is no longer an absolute path since 7e1c0477 (kbuild:
+Use relative path for $(objtree). Work around this by checking if the
+path starts with $(objtree)/.
+
+Reported-and-tested-by: Sedat Dilek <sedat.dilek@gmail.com>
+Fixes: 7e1c0477 (kbuild: Use relative path for $(objtree)
+Signed-off-by: Michal Marek <mmarek@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ scripts/Makefile.clean | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+--- a/scripts/Makefile.clean
++++ b/scripts/Makefile.clean
+@@ -45,19 +45,19 @@ __clean-files := $(extra-y) $(extra-m) $
+
+ __clean-files := $(filter-out $(no-clean-files), $(__clean-files))
+
+-# as clean-files is given relative to the current directory, this adds
+-# a $(obj) prefix, except for absolute paths
++# clean-files is given relative to the current directory, unless it
++# starts with $(objtree)/ (which means "./", so do not add "./" unless
++# you want to delete a file from the toplevel object directory).
+
+ __clean-files := $(wildcard \
+- $(addprefix $(obj)/, $(filter-out /%, $(__clean-files))) \
+- $(filter /%, $(__clean-files)))
++ $(addprefix $(obj)/, $(filter-out $(objtree)/%, $(__clean-files))) \
++ $(filter $(objtree)/%, $(__clean-files)))
+
+-# as clean-dirs is given relative to the current directory, this adds
+-# a $(obj) prefix, except for absolute paths
++# same as clean-files
+
+ __clean-dirs := $(wildcard \
+- $(addprefix $(obj)/, $(filter-out /%, $(clean-dirs))) \
+- $(filter /%, $(clean-dirs)))
++ $(addprefix $(obj)/, $(filter-out $(objtree)/%, $(clean-dirs))) \
++ $(filter $(objtree)/%, $(clean-dirs)))
+
+ # ==========================================================================
+
usb-gadget-udc-atmel-fix-possible-oops-when-unloading-module.patch
usb-console-fix-uninitialised-ldisc-semaphore.patch
usb-console-fix-potential-use-after-free.patch
+usb-ehci-fix-initialization-bug-in-iso_stream_schedule.patch
+usb-musb-stuff-leak-of-struct-usb_hcd.patch
+can-kvaser_usb-don-t-free-packets-when-tight-on-urbs.patch
+can-kvaser_usb-reset-all-urb-tx-contexts-upon-channel-close.patch
+can-kvaser_usb-don-t-send-a-reset_chip-for-non-existing-channels.patch
+input-elantech-support-new-ics-types-for-version-4.patch
+input-i8042-reset-keyboard-to-fix-elantech-touchpad-detection.patch
+input-i8042-add-acer-aspire-7738-to-the-nomux-list.patch
+arm-omap2plus_defconfig-use-config_cpufreq_dt.patch
+arm-imx6sx-set-pll2-as-parent-of-qspi-clocks.patch
+arm-dts-imx25-fix-the-spi1-clocks.patch
+arm-dts-imx51-babbage-fix-ulpi-phy-reset-modelling.patch
+arm-imx6q-drop-unnecessary-semicolon.patch
+arm-clk-imx6q-fix-video-divider-for-rev-t0-1.0.patch
+arm-omap5-dra7xx-fix-frequency-typos.patch
+arm-omap5-dra7xx-enable-booting-secondary-cpu-in-hyp-mode.patch
+bus-omap_l3_noc-add-resume-hook-to-restore-context.patch
+bus-omap_l3_noc-correct-returning-irq_handled.patch
+arm-dts-berlin-add-broken-cd-and-set-bus-width-for-emmc-in.patch
+arm-shmobile-sh73a0-legacy-set-.control_parent-for-all-irqpin-instances.patch
+arm-dts-dra7-evm-fix-qspi-device-tree-partition-size.patch
+iio-ad799x-fix-ad7991-ad7995-ad7999-config-setup.patch
+decompress_bunzip2-off-by-one-in-get_next_block.patch
+um-skip-futex_atomic_cmpxchg_inatomic-test.patch
+x86-um-actually-mark-system-call-tables-readonly.patch
+kbuild-fix-removal-of-the-debian-directory.patch
--- /dev/null
+From f911d731054ab3d82ee72a16b889e17ca3a2332a Mon Sep 17 00:00:00 2001
+From: Richard Weinberger <richard@nod.at>
+Date: Wed, 10 Dec 2014 13:53:51 +0100
+Subject: um: Skip futex_atomic_cmpxchg_inatomic() test
+
+From: Richard Weinberger <richard@nod.at>
+
+commit f911d731054ab3d82ee72a16b889e17ca3a2332a upstream.
+
+futex_atomic_cmpxchg_inatomic() does not work on UML because
+it triggers a copy_from_user() in kernel context.
+On UML copy_from_user() can only be used if the kernel was called
+by a real user space process such that UML can use ptrace()
+to fetch the value.
+
+Reported-by: Miklos Szeredi <miklos@szeredi.hu>
+Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
+Signed-off-by: Richard Weinberger <richard@nod.at>
+Tested-by: Daniel Walter <d.walter@0x90.at>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/um/Kconfig.common | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/um/Kconfig.common
++++ b/arch/um/Kconfig.common
+@@ -3,6 +3,7 @@ config UML
+ default y
+ select HAVE_ARCH_AUDITSYSCALL
+ select HAVE_UID16
++ select HAVE_FUTEX_CMPXCHG if FUTEX
+ select GENERIC_IRQ_SHOW
+ select GENERIC_CPU_DEVICES
+ select GENERIC_IO
--- /dev/null
+From 6d89252a998a695ecb0348fc2d717dc33d90cae9 Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Thu, 4 Dec 2014 10:21:56 -0500
+Subject: USB: EHCI: fix initialization bug in iso_stream_schedule()
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+commit 6d89252a998a695ecb0348fc2d717dc33d90cae9 upstream.
+
+Commit c3ee9b76aa93 (EHCI: improved logic for isochronous scheduling)
+introduced the idea of using ehci->last_iso_frame as the origin (or
+base) for the circular calculations involved in modifying the
+isochronous schedule. However, the new code it added used
+ehci->last_iso_frame before the value was properly initialized. This
+patch rectifies the mistake by moving the initialization lines earlier
+in iso_stream_schedule().
+
+This fixes Bugzilla #72891.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Fixes: c3ee9b76aa93
+Reported-by: Joe Bryant <tenminjoe@yahoo.com>
+Tested-by: Joe Bryant <tenminjoe@yahoo.com>
+Tested-by: Martin Long <martin@longhome.co.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/ehci-sched.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/usb/host/ehci-sched.c
++++ b/drivers/usb/host/ehci-sched.c
+@@ -1581,6 +1581,10 @@ iso_stream_schedule (
+ else
+ next = (now + 2 + 7) & ~0x07; /* full frame cache */
+
++ /* If needed, initialize last_iso_frame so that this URB will be seen */
++ if (ehci->isoc_count == 0)
++ ehci->last_iso_frame = now >> 3;
++
+ /*
+ * Use ehci->last_iso_frame as the base. There can't be any
+ * TDs scheduled for earlier than that.
+@@ -1671,10 +1675,6 @@ iso_stream_schedule (
+ urb->start_frame = start & (mod - 1);
+ if (!stream->highspeed)
+ urb->start_frame >>= 3;
+-
+- /* Make sure scan_isoc() sees these */
+- if (ehci->isoc_count == 0)
+- ehci->last_iso_frame = now >> 3;
+ return status;
+
+ fail:
--- /dev/null
+From 68693b8ea4e284c46bff919ac62bd9ccdfdbb6ba Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Thu, 11 Dec 2014 18:14:18 +0100
+Subject: usb: musb: stuff leak of struct usb_hcd
+
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+
+commit 68693b8ea4e284c46bff919ac62bd9ccdfdbb6ba upstream.
+
+since the split of host+gadget mode in commit 74c2e9360058 ("usb: musb:
+factor out hcd initalization") we leak the usb_hcd struct. We call now
+musb_host_cleanup() which does basically usb_remove_hcd() and also sets
+the hcd variable to NULL. Doing so makes the finall call to
+musb_host_free() basically a nop and the usb_hcd remains around for ever
+without anowner.
+This patch drops that NULL assignment for that reason.
+
+Fixes: 74c2e9360058 ("usb: musb: factor out hcd initalization")
+Cc: Daniel Mack <zonque@gmail.com>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/musb/musb_host.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/usb/musb/musb_host.c
++++ b/drivers/usb/musb/musb_host.c
+@@ -2663,7 +2663,6 @@ void musb_host_cleanup(struct musb *musb
+ if (musb->port_mode == MUSB_PORT_MODE_GADGET)
+ return;
+ usb_remove_hcd(musb->hcd);
+- musb->hcd = NULL;
+ }
+
+ void musb_host_free(struct musb *musb)
--- /dev/null
+From b485342bd79af363c77ef1a421c4a0aef2de9812 Mon Sep 17 00:00:00 2001
+From: Daniel Borkmann <dborkman@redhat.com>
+Date: Sat, 3 Jan 2015 13:11:10 +0100
+Subject: x86, um: actually mark system call tables readonly
+
+From: Daniel Borkmann <dborkman@redhat.com>
+
+commit b485342bd79af363c77ef1a421c4a0aef2de9812 upstream.
+
+Commit a074335a370e ("x86, um: Mark system call tables readonly") was
+supposed to mark the sys_call_table in UML as RO by adding the const,
+but it doesn't have the desired effect as it's nevertheless being placed
+into the data section since __cacheline_aligned enforces sys_call_table
+being placed into .data..cacheline_aligned instead. We need to use
+the ____cacheline_aligned version instead to fix this issue.
+
+Before:
+
+$ nm -v arch/x86/um/sys_call_table_64.o | grep -1 "sys_call_table"
+ U sys_writev
+0000000000000000 D sys_call_table
+0000000000000000 D syscall_table_size
+
+After:
+
+$ nm -v arch/x86/um/sys_call_table_64.o | grep -1 "sys_call_table"
+ U sys_writev
+0000000000000000 R sys_call_table
+0000000000000000 D syscall_table_size
+
+Fixes: a074335a370e ("x86, um: Mark system call tables readonly")
+Cc: H. Peter Anvin <hpa@zytor.com>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
+Signed-off-by: Richard Weinberger <richard@nod.at>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/um/sys_call_table_32.c | 2 +-
+ arch/x86/um/sys_call_table_64.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/x86/um/sys_call_table_32.c
++++ b/arch/x86/um/sys_call_table_32.c
+@@ -34,7 +34,7 @@ typedef asmlinkage void (*sys_call_ptr_t
+
+ extern asmlinkage void sys_ni_syscall(void);
+
+-const sys_call_ptr_t sys_call_table[] __cacheline_aligned = {
++const sys_call_ptr_t sys_call_table[] ____cacheline_aligned = {
+ /*
+ * Smells like a compiler bug -- it doesn't work
+ * when the & below is removed.
+--- a/arch/x86/um/sys_call_table_64.c
++++ b/arch/x86/um/sys_call_table_64.c
+@@ -46,7 +46,7 @@ typedef void (*sys_call_ptr_t)(void);
+
+ extern void sys_ni_syscall(void);
+
+-const sys_call_ptr_t sys_call_table[] __cacheline_aligned = {
++const sys_call_ptr_t sys_call_table[] ____cacheline_aligned = {
+ /*
+ * Smells like a compiler bug -- it doesn't work
+ * when the & below is removed.