From: Greg Kroah-Hartman Date: Thu, 26 Apr 2018 15:31:14 +0000 (+0200) Subject: 4.14-stable patches X-Git-Tag: v3.18.107~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c08403dc39d8a10714e38a39c23dac6df3082aa0;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: revert-pinctrl-intel-initialize-gpio-properly-when-used-through-irqchip.patch --- diff --git a/queue-4.14/revert-pinctrl-intel-initialize-gpio-properly-when-used-through-irqchip.patch b/queue-4.14/revert-pinctrl-intel-initialize-gpio-properly-when-used-through-irqchip.patch new file mode 100644 index 00000000000..2e3bdf4c2e2 --- /dev/null +++ b/queue-4.14/revert-pinctrl-intel-initialize-gpio-properly-when-used-through-irqchip.patch @@ -0,0 +1,92 @@ +From ab7ee876c54c0c82d7fd8be267a5c44661e21d31 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Thu, 26 Apr 2018 17:28:00 +0200 +Subject: Revert "pinctrl: intel: Initialize GPIO properly when used through irqchip" + +From: Greg Kroah-Hartman + +This reverts commit f5a26acf0162477af6ee4c11b4fb9cffe5d3e257 + +Mike writes: + It seems that commit f5a26acf0162 ("pinctrl: intel: Initialize GPIO + properly when used through irqchip") can cause problems on some Skylake + systems with Sunrisepoint PCH-H. Namely on certain systems it may turn + the backlight PWM pin from native mode to GPIO which makes the screen + blank during boot. + + There is more information here: + + https://bugzilla.redhat.com/show_bug.cgi?id=1543769 + + The actual reason is that GPIO numbering used in BIOS is using "Windows" + numbers meaning that they don't match the hardware 1:1 and because of + this a wrong pin (backlight PWM) is picked and switched to GPIO mode. + + There is a proper fix for this but since it has quite many dependencies + on commits that cannot be considered stable material, I suggest we + revert commit f5a26acf0162 from stable trees 4.9, 4.14 and 4.15 to + prevent the backlight issue. + +Reported-by: Mika Westerberg +Fixes: f5a26acf0162 ("pinctrl: intel: Initialize GPIO properly when used through irqchip") +Cc: Daniel Drake +Cc: Chris Chiu +Cc: Linus Walleij +Signed-off-by: Greg Kroah-Hartman +--- + drivers/pinctrl/intel/pinctrl-intel.c | 23 ++++++++--------------- + 1 file changed, 8 insertions(+), 15 deletions(-) + +--- a/drivers/pinctrl/intel/pinctrl-intel.c ++++ b/drivers/pinctrl/intel/pinctrl-intel.c +@@ -427,18 +427,6 @@ static void __intel_gpio_set_direction(v + writel(value, padcfg0); + } + +-static void intel_gpio_set_gpio_mode(void __iomem *padcfg0) +-{ +- u32 value; +- +- /* Put the pad into GPIO mode */ +- value = readl(padcfg0) & ~PADCFG0_PMODE_MASK; +- /* Disable SCI/SMI/NMI generation */ +- value &= ~(PADCFG0_GPIROUTIOXAPIC | PADCFG0_GPIROUTSCI); +- value &= ~(PADCFG0_GPIROUTSMI | PADCFG0_GPIROUTNMI); +- writel(value, padcfg0); +-} +- + static int intel_gpio_request_enable(struct pinctrl_dev *pctldev, + struct pinctrl_gpio_range *range, + unsigned pin) +@@ -446,6 +434,7 @@ static int intel_gpio_request_enable(str + struct intel_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); + void __iomem *padcfg0; + unsigned long flags; ++ u32 value; + + raw_spin_lock_irqsave(&pctrl->lock, flags); + +@@ -455,7 +444,13 @@ static int intel_gpio_request_enable(str + } + + padcfg0 = intel_get_padcfg(pctrl, pin, PADCFG0); +- intel_gpio_set_gpio_mode(padcfg0); ++ /* Put the pad into GPIO mode */ ++ value = readl(padcfg0) & ~PADCFG0_PMODE_MASK; ++ /* Disable SCI/SMI/NMI generation */ ++ value &= ~(PADCFG0_GPIROUTIOXAPIC | PADCFG0_GPIROUTSCI); ++ value &= ~(PADCFG0_GPIROUTSMI | PADCFG0_GPIROUTNMI); ++ writel(value, padcfg0); ++ + /* Disable TX buffer and enable RX (this will be input) */ + __intel_gpio_set_direction(padcfg0, true); + +@@ -940,8 +935,6 @@ static int intel_gpio_irq_type(struct ir + + raw_spin_lock_irqsave(&pctrl->lock, flags); + +- intel_gpio_set_gpio_mode(reg); +- + value = readl(reg); + + value &= ~(PADCFG0_RXEVCFG_MASK | PADCFG0_RXINV); diff --git a/queue-4.14/series b/queue-4.14/series new file mode 100644 index 00000000000..74f0ca5f7b7 --- /dev/null +++ b/queue-4.14/series @@ -0,0 +1 @@ +revert-pinctrl-intel-initialize-gpio-properly-when-used-through-irqchip.patch diff --git a/queue-4.16/series b/queue-4.16/series new file mode 100644 index 00000000000..74f0ca5f7b7 --- /dev/null +++ b/queue-4.16/series @@ -0,0 +1 @@ +revert-pinctrl-intel-initialize-gpio-properly-when-used-through-irqchip.patch