diff --git a/patches.suse/0001-Revert-serial-uartlite-Add-runtime-support.patch b/patches.suse/0001-Revert-serial-uartlite-Add-runtime-support.patch new file mode 100644 index 0000000..7e23346 --- /dev/null +++ b/patches.suse/0001-Revert-serial-uartlite-Add-runtime-support.patch @@ -0,0 +1,127 @@ +From 07e5d4ff125ad0c77b129212801155d9f1bc5bdf Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Thu, 14 Nov 2019 06:25:17 +0800 +Subject: [PATCH] Revert "serial-uartlite: Add runtime support" +Git-commit: 07e5d4ff125ad0c77b129212801155d9f1bc5bdf +References: git-fixes +Patch-mainline: v5.5-rc1 + +This reverts commit 0379b1163e509cfc4c18643b27231c04c78981ab. + +As Johan says, this driver needs a lot more work and these changes are +only going in the wrong direction: + https://lkml.kernel.org/r/20190523091839.GC568@localhost + +Reported-by: Johan Hovold +Cc: Shubhrajyoti Datta +Cc: Michal Simek +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Oliver Neukum +--- + drivers/tty/serial/uartlite.c | 52 +++++++----------------------------------- + 1 file changed, 9 insertions(+), 43 deletions(-) + +--- a/drivers/tty/serial/uartlite.c ++++ b/drivers/tty/serial/uartlite.c +@@ -22,7 +22,6 @@ + #include + #include + #include +-#include + + #define ULITE_NAME "ttyUL" + #define ULITE_MAJOR 204 +@@ -55,7 +54,6 @@ + #define ULITE_CONTROL_RST_TX 0x01 + #define ULITE_CONTROL_RST_RX 0x02 + #define ULITE_CONTROL_IE 0x10 +-#define UART_AUTOSUSPEND_TIMEOUT 3000 + + /* Static pointer to console port */ + #ifdef CONFIG_SERIAL_UARTLITE_CONSOLE +@@ -393,12 +391,12 @@ static int ulite_verify_port(struct uart + static void ulite_pm(struct uart_port *port, unsigned int state, + unsigned int oldstate) + { +- if (!state) { +- pm_runtime_get_sync(port->dev); +- } else { +- pm_runtime_mark_last_busy(port->dev); +- pm_runtime_put_autosuspend(port->dev); +- } ++ struct uartlite_data *pdata = port->private_data; ++ ++ if (!state) ++ clk_enable(pdata->clk); ++ else ++ clk_disable(pdata->clk); + } + + #ifdef CONFIG_CONSOLE_POLL +@@ -745,32 +743,11 @@ static int __maybe_unused ulite_resume(s + return 0; + } + +-static int __maybe_unused ulite_runtime_suspend(struct device *dev) +-{ +- struct uart_port *port = dev_get_drvdata(dev); +- struct uartlite_data *pdata = port->private_data; +- +- clk_disable(pdata->clk); +- return 0; +-}; +- +-static int __maybe_unused ulite_runtime_resume(struct device *dev) +-{ +- struct uart_port *port = dev_get_drvdata(dev); +- struct uartlite_data *pdata = port->private_data; +- +- clk_enable(pdata->clk); +- return 0; +-} + /* --------------------------------------------------------------------- + * Platform bus binding + */ + +-static const struct dev_pm_ops ulite_pm_ops = { +- SET_SYSTEM_SLEEP_PM_OPS(ulite_suspend, ulite_resume) +- SET_RUNTIME_PM_OPS(ulite_runtime_suspend, +- ulite_runtime_resume, NULL) +-}; ++static SIMPLE_DEV_PM_OPS(ulite_pm_ops, ulite_suspend, ulite_resume); + + #if defined(CONFIG_OF) + /* Match table for of_platform binding */ +@@ -843,15 +820,9 @@ static int ulite_probe(struct platform_d + return ret; + } + +- pm_runtime_use_autosuspend(&pdev->dev); +- pm_runtime_set_autosuspend_delay(&pdev->dev, UART_AUTOSUSPEND_TIMEOUT); +- pm_runtime_set_active(&pdev->dev); +- pm_runtime_enable(&pdev->dev); +- + ret = ulite_assign(&pdev->dev, id, res->start, irq, pdata); + +- pm_runtime_mark_last_busy(&pdev->dev); +- pm_runtime_put_autosuspend(&pdev->dev); ++ clk_disable(pdata->clk); + + return ret; + } +@@ -860,14 +831,9 @@ static int ulite_remove(struct platform_ + { + struct uart_port *port = dev_get_drvdata(&pdev->dev); + struct uartlite_data *pdata = port->private_data; +- int rc; + + clk_unprepare(pdata->clk); +- rc = ulite_release(&pdev->dev); +- pm_runtime_disable(&pdev->dev); +- pm_runtime_set_suspended(&pdev->dev); +- pm_runtime_dont_use_autosuspend(&pdev->dev); +- return rc; ++ return ulite_release(&pdev->dev); + } + + /* work with hotplug and coldplug */ diff --git a/patches.suse/0001-Revert-serial-uartlite-Do-not-use-static-struct-uart.patch b/patches.suse/0001-Revert-serial-uartlite-Do-not-use-static-struct-uart.patch new file mode 100644 index 0000000..eddda84 --- /dev/null +++ b/patches.suse/0001-Revert-serial-uartlite-Do-not-use-static-struct-uart.patch @@ -0,0 +1,86 @@ +From 5d8508aa079a2aa70d1e67f087c47f459c30ca93 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Thu, 14 Nov 2019 06:28:15 +0800 +Subject: [PATCH] Revert "serial-uartlite: Do not use static struct uart_driver + out of probe()" +Git-commit: 5d8508aa079a2aa70d1e67f087c47f459c30ca93 +References: git-fixes +Patch-mainline: v5.5-rc1 + +This reverts commit 3b209d253e7f8aa01fde0233d38a7239c8f7beb3. + +As Johan says, this driver needs a lot more work and these changes are +only going in the wrong direction: + https://lkml.kernel.org/r/20190523091839.GC568@localhost + +Reported-by: Johan Hovold +Cc: Shubhrajyoti Datta +Cc: Michal Simek +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Oliver Neukum +--- + drivers/tty/serial/uartlite.c | 20 +++++--------------- + 1 file changed, 5 insertions(+), 15 deletions(-) + +diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c +index a713080bccb2..2e93af7893e6 100644 +--- a/drivers/tty/serial/uartlite.c ++++ b/drivers/tty/serial/uartlite.c +@@ -63,7 +63,6 @@ static struct uart_port *console_port; + struct uartlite_data { + const struct uartlite_reg_ops *reg_ops; + struct clk *clk; +- struct uart_driver *ulite_uart_driver; + }; + + struct uartlite_reg_ops { +@@ -695,9 +694,7 @@ static int ulite_release(struct device *dev) + int rc = 0; + + if (port) { +- struct uartlite_data *pdata = port->private_data; +- +- rc = uart_remove_one_port(pdata->ulite_uart_driver, port); ++ rc = uart_remove_one_port(&ulite_uart_driver, port); + dev_set_drvdata(dev, NULL); + port->mapbase = 0; + } +@@ -715,11 +712,8 @@ static int __maybe_unused ulite_suspend(struct device *dev) + { + struct uart_port *port = dev_get_drvdata(dev); + +- if (port) { +- struct uartlite_data *pdata = port->private_data; +- +- uart_suspend_port(pdata->ulite_uart_driver, port); +- } ++ if (port) ++ uart_suspend_port(&ulite_uart_driver, port); + + return 0; + } +@@ -734,11 +728,8 @@ static int __maybe_unused ulite_resume(struct device *dev) + { + struct uart_port *port = dev_get_drvdata(dev); + +- if (port) { +- struct uartlite_data *pdata = port->private_data; +- +- uart_resume_port(pdata->ulite_uart_driver, port); +- } ++ if (port) ++ uart_resume_port(&ulite_uart_driver, port); + + return 0; + } +@@ -813,7 +804,6 @@ static int ulite_probe(struct platform_device *pdev) + pdata->clk = NULL; + } + +- pdata->ulite_uart_driver = &ulite_uart_driver; + ret = clk_prepare_enable(pdata->clk); + if (ret) { + dev_err(&pdev->dev, "Failed to prepare clock\n"); +-- +2.16.4 + diff --git a/patches.suse/0001-Revert-serial-uartlite-Move-the-uart-register.patch b/patches.suse/0001-Revert-serial-uartlite-Move-the-uart-register.patch new file mode 100644 index 0000000..bd71d3a --- /dev/null +++ b/patches.suse/0001-Revert-serial-uartlite-Move-the-uart-register.patch @@ -0,0 +1,57 @@ +From f4c47547b40a212f4eb017297f9d232ac09f7aaf Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Thu, 14 Nov 2019 06:29:08 +0800 +Subject: [PATCH] Revert "serial-uartlite: Move the uart register" +Git-commit: f4c47547b40a212f4eb017297f9d232ac09f7aaf +References: git-fixes +Patch-mainline: v5.5-rc1 + +This reverts commit f33cf776617ba3b0f738cd70c31e0f62ea777a8d. + +As Johan says, this driver needs a lot more work and these changes are +only going in the wrong direction: + https://lkml.kernel.org/r/20190523091839.GC568@localhost + +Reported-by: Johan Hovold +Cc: Shubhrajyoti Datta +Cc: Michal Simek +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Oliver Neukum +--- + drivers/tty/serial/uartlite.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +--- a/drivers/tty/serial/uartlite.c ++++ b/drivers/tty/serial/uartlite.c +@@ -770,15 +770,6 @@ static int ulite_probe(struct platform_d + id = 0; + } + +- if (!ulite_uart_driver.state) { +- dev_dbg(&pdev->dev, "uartlite: calling uart_register_driver()\n"); +- ret = uart_register_driver(&ulite_uart_driver); +- if (ret < 0) { +- dev_err(&pdev->dev, "Failed to register driver\n"); +- return ret; +- } +- } +- + pdata = devm_kzalloc(&pdev->dev, sizeof(struct uartlite_data), + GFP_KERNEL); + if (!pdata) +@@ -810,6 +801,15 @@ static int ulite_probe(struct platform_d + return ret; + } + ++ if (!ulite_uart_driver.state) { ++ dev_dbg(&pdev->dev, "uartlite: calling uart_register_driver()\n"); ++ ret = uart_register_driver(&ulite_uart_driver); ++ if (ret < 0) { ++ dev_err(&pdev->dev, "Failed to register driver\n"); ++ return ret; ++ } ++ } ++ + ret = ulite_assign(&pdev->dev, id, res->start, irq, pdata); + + clk_disable(pdata->clk); diff --git a/patches.suse/0001-pinctrl-baytrail-Really-serialize-all-register-acces.patch b/patches.suse/0001-pinctrl-baytrail-Really-serialize-all-register-acces.patch new file mode 100644 index 0000000..f6793da --- /dev/null +++ b/patches.suse/0001-pinctrl-baytrail-Really-serialize-all-register-acces.patch @@ -0,0 +1,377 @@ +From 40ecab551232972a39cdd8b6f17ede54a3fdb296 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Tue, 19 Nov 2019 16:46:41 +0100 +Subject: [PATCH] pinctrl: baytrail: Really serialize all register accesses +Git-commit: 40ecab551232972a39cdd8b6f17ede54a3fdb296 +References: git-fixes +Patch-mainline: v5.5-rc3 + +Commit 39ce8150a079 ("pinctrl: baytrail: Serialize all register access") +added a spinlock around all register accesses because: + +"There is a hardware issue in Intel Baytrail where concurrent GPIO register + access might result reads of 0xffffffff and writes might get dropped + completely." + +Testing has shown that this does not catch all cases, there are still +2 problems remaining + +1) The original fix uses a spinlock per byt_gpio device / struct, +additional testing has shown that this is not sufficient concurent +accesses to 2 different GPIO banks also suffer from the same problem. + +This commit fixes this by moving to a single global lock. + +2) The original fix did not add a lock around the register accesses in +the suspend/resume handling. + +Since pinctrl-baytrail.c is using normal suspend/resume handlers, +interrupts are still enabled during suspend/resume handling. Nothing +should be using the GPIOs when they are being taken down, _but_ the +GPIOs themselves may still cause interrupts, which are likely to +use (read) the triggering GPIO. So we need to protect against +concurrent GPIO register accesses in the suspend/resume handlers too. + +This commit fixes this by adding the missing spin_lock / unlock calls. + +The 2 fixes together fix the Acer Switch 10 SW5-012 getting completely +confused after a suspend resume. The DSDT for this device has a bug +in its _LID method which reprograms the home and power button trigger- +flags requesting both high and low _level_ interrupts so the IRQs for +these 2 GPIOs continuously fire. This combined with the saving of +registers during suspend, triggers concurrent GPIO register accesses +resulting in saving 0xffffffff as pconf0 value during suspend and then +when restoring this on resume the pinmux settings get all messed up, +resulting in various I2C busses being stuck, the wifi no longer working +and often the tablet simply not coming out of suspend at all. + +Cc: stable@vger.kernel.org +Fixes: 39ce8150a079 ("pinctrl: baytrail: Serialize all register access") +Signed-off-by: Hans de Goede +Acked-by: Mika Westerberg +Signed-off-by: Andy Shevchenko +Signed-off-by: Oliver Neukum +--- + drivers/pinctrl/intel/pinctrl-baytrail.c | 80 +++++++++++++++++-------------- + 1 file changed, 44 insertions(+), 36 deletions(-) + +--- a/drivers/pinctrl/intel/pinctrl-baytrail.c ++++ b/drivers/pinctrl/intel/pinctrl-baytrail.c +@@ -568,6 +568,8 @@ static const struct byt_pinctrl_soc_data + NULL + }; + ++static DEFINE_RAW_SPINLOCK(byt_lock); ++ + static struct byt_community *byt_get_community(struct byt_gpio *vg, + unsigned int pin) + { +@@ -677,7 +679,7 @@ static void byt_set_group_simple_mux(str + unsigned long flags; + int i; + +- raw_spin_lock_irqsave(&vg->lock, flags); ++ raw_spin_lock_irqsave(&byt_lock, flags); + + for (i = 0; i < group.npins; i++) { + void __iomem *padcfg0; +@@ -697,7 +699,7 @@ static void byt_set_group_simple_mux(str + writel(value, padcfg0); + } + +- raw_spin_unlock_irqrestore(&vg->lock, flags); ++ raw_spin_unlock_irqrestore(&byt_lock, flags); + } + + static void byt_set_group_mixed_mux(struct byt_gpio *vg, +@@ -707,7 +709,7 @@ static void byt_set_group_mixed_mux(stru + unsigned long flags; + int i; + +- raw_spin_lock_irqsave(&vg->lock, flags); ++ raw_spin_lock_irqsave(&byt_lock, flags); + + for (i = 0; i < group.npins; i++) { + void __iomem *padcfg0; +@@ -727,7 +729,7 @@ static void byt_set_group_mixed_mux(stru + writel(value, padcfg0); + } + +- raw_spin_unlock_irqrestore(&vg->lock, flags); ++ raw_spin_unlock_irqrestore(&byt_lock, flags); + } + + static int byt_set_mux(struct pinctrl_dev *pctldev, unsigned int func_selector, +@@ -768,11 +770,11 @@ static void byt_gpio_clear_triggering(st + unsigned long flags; + u32 value; + +- raw_spin_lock_irqsave(&vg->lock, flags); ++ raw_spin_lock_irqsave(&byt_lock, flags); + value = readl(reg); + value &= ~(BYT_TRIG_POS | BYT_TRIG_NEG | BYT_TRIG_LVL); + writel(value, reg); +- raw_spin_unlock_irqrestore(&vg->lock, flags); ++ raw_spin_unlock_irqrestore(&byt_lock, flags); + } + + static int byt_gpio_request_enable(struct pinctrl_dev *pctl_dev, +@@ -784,7 +786,7 @@ static int byt_gpio_request_enable(struc + u32 value, gpio_mux; + unsigned long flags; + +- raw_spin_lock_irqsave(&vg->lock, flags); ++ raw_spin_lock_irqsave(&byt_lock, flags); + + /* + * In most cases, func pin mux 000 means GPIO function. +@@ -806,7 +808,7 @@ static int byt_gpio_request_enable(struc + "pin %u forcibly re-configured as GPIO\n", offset); + } + +- raw_spin_unlock_irqrestore(&vg->lock, flags); ++ raw_spin_unlock_irqrestore(&byt_lock, flags); + + pm_runtime_get(&vg->pdev->dev); + +@@ -834,7 +836,7 @@ static int byt_gpio_set_direction(struct + unsigned long flags; + u32 value; + +- raw_spin_lock_irqsave(&vg->lock, flags); ++ raw_spin_lock_irqsave(&byt_lock, flags); + + value = readl(val_reg); + value &= ~BYT_DIR_MASK; +@@ -851,7 +853,7 @@ static int byt_gpio_set_direction(struct + "Potential Error: Setting GPIO with direct_irq_en to output"); + writel(value, val_reg); + +- raw_spin_unlock_irqrestore(&vg->lock, flags); ++ raw_spin_unlock_irqrestore(&byt_lock, flags); + + return 0; + } +@@ -920,11 +922,11 @@ static int byt_pin_config_get(struct pin + u32 conf, pull, val, debounce; + u16 arg = 0; + +- raw_spin_lock_irqsave(&vg->lock, flags); ++ raw_spin_lock_irqsave(&byt_lock, flags); + conf = readl(conf_reg); + pull = conf & BYT_PULL_ASSIGN_MASK; + val = readl(val_reg); +- raw_spin_unlock_irqrestore(&vg->lock, flags); ++ raw_spin_unlock_irqrestore(&byt_lock, flags); + + switch (param) { + case PIN_CONFIG_BIAS_DISABLE: +@@ -951,9 +953,9 @@ static int byt_pin_config_get(struct pin + if (!(conf & BYT_DEBOUNCE_EN)) + return -EINVAL; + +- raw_spin_lock_irqsave(&vg->lock, flags); ++ raw_spin_lock_irqsave(&byt_lock, flags); + debounce = readl(db_reg); +- raw_spin_unlock_irqrestore(&vg->lock, flags); ++ raw_spin_unlock_irqrestore(&byt_lock, flags); + + switch (debounce & BYT_DEBOUNCE_PULSE_MASK) { + case BYT_DEBOUNCE_PULSE_375US: +@@ -1005,7 +1007,7 @@ static int byt_pin_config_set(struct pin + u32 conf, val, debounce; + int i, ret = 0; + +- raw_spin_lock_irqsave(&vg->lock, flags); ++ raw_spin_lock_irqsave(&byt_lock, flags); + + conf = readl(conf_reg); + val = readl(val_reg); +@@ -1113,7 +1115,7 @@ static int byt_pin_config_set(struct pin + if (!ret) + writel(conf, conf_reg); + +- raw_spin_unlock_irqrestore(&vg->lock, flags); ++ raw_spin_unlock_irqrestore(&byt_lock, flags); + + return ret; + } +@@ -1138,9 +1140,9 @@ static int byt_gpio_get(struct gpio_chip + unsigned long flags; + u32 val; + +- raw_spin_lock_irqsave(&vg->lock, flags); ++ raw_spin_lock_irqsave(&byt_lock, flags); + val = readl(reg); +- raw_spin_unlock_irqrestore(&vg->lock, flags); ++ raw_spin_unlock_irqrestore(&byt_lock, flags); + + return !!(val & BYT_LEVEL); + } +@@ -1155,13 +1157,13 @@ static void byt_gpio_set(struct gpio_chi + if (!reg) + return; + +- raw_spin_lock_irqsave(&vg->lock, flags); ++ raw_spin_lock_irqsave(&byt_lock, flags); + old_val = readl(reg); + if (value) + writel(old_val | BYT_LEVEL, reg); + else + writel(old_val & ~BYT_LEVEL, reg); +- raw_spin_unlock_irqrestore(&vg->lock, flags); ++ raw_spin_unlock_irqrestore(&byt_lock, flags); + } + + static int byt_gpio_get_direction(struct gpio_chip *chip, unsigned int offset) +@@ -1174,9 +1176,9 @@ static int byt_gpio_get_direction(struct + if (!reg) + return -EINVAL; + +- raw_spin_lock_irqsave(&vg->lock, flags); ++ raw_spin_lock_irqsave(&byt_lock, flags); + value = readl(reg); +- raw_spin_unlock_irqrestore(&vg->lock, flags); ++ raw_spin_unlock_irqrestore(&byt_lock, flags); + + if (!(value & BYT_OUTPUT_EN)) + return 0; +@@ -1219,14 +1221,14 @@ static void byt_gpio_dbg_show(struct seq + const char *label; + unsigned int pin; + +- raw_spin_lock_irqsave(&vg->lock, flags); ++ raw_spin_lock_irqsave(&byt_lock, flags); + pin = vg->soc_data->pins[i].number; + reg = byt_gpio_reg(vg, pin, BYT_CONF0_REG); + if (!reg) { + seq_printf(s, + "Could not retrieve pin %i conf0 reg\n", + pin); +- raw_spin_unlock_irqrestore(&vg->lock, flags); ++ raw_spin_unlock_irqrestore(&byt_lock, flags); + continue; + } + conf0 = readl(reg); +@@ -1235,11 +1237,11 @@ static void byt_gpio_dbg_show(struct seq + if (!reg) { + seq_printf(s, + "Could not retrieve pin %i val reg\n", pin); +- raw_spin_unlock_irqrestore(&vg->lock, flags); ++ raw_spin_unlock_irqrestore(&byt_lock, flags); + continue; + } + val = readl(reg); +- raw_spin_unlock_irqrestore(&vg->lock, flags); ++ raw_spin_unlock_irqrestore(&byt_lock, flags); + + comm = byt_get_community(vg, pin); + if (!comm) { +@@ -1323,9 +1325,9 @@ static void byt_irq_ack(struct irq_data + if (!reg) + return; + +- raw_spin_lock(&vg->lock); ++ raw_spin_lock(&byt_lock); + writel(BIT(offset % 32), reg); +- raw_spin_unlock(&vg->lock); ++ raw_spin_unlock(&byt_lock); + } + + static void byt_irq_mask(struct irq_data *d) +@@ -1349,7 +1351,7 @@ static void byt_irq_unmask(struct irq_da + if (!reg) + return; + +- raw_spin_lock_irqsave(&vg->lock, flags); ++ raw_spin_lock_irqsave(&byt_lock, flags); + value = readl(reg); + + switch (irqd_get_trigger_type(d)) { +@@ -1372,7 +1374,7 @@ static void byt_irq_unmask(struct irq_da + + writel(value, reg); + +- raw_spin_unlock_irqrestore(&vg->lock, flags); ++ raw_spin_unlock_irqrestore(&byt_lock, flags); + } + + static int byt_irq_type(struct irq_data *d, unsigned int type) +@@ -1386,7 +1388,7 @@ static int byt_irq_type(struct irq_data + if (!reg || offset >= vg->chip.ngpio) + return -EINVAL; + +- raw_spin_lock_irqsave(&vg->lock, flags); ++ raw_spin_lock_irqsave(&byt_lock, flags); + value = readl(reg); + + WARN(value & BYT_DIRECT_IRQ_EN, +@@ -1408,7 +1410,7 @@ static int byt_irq_type(struct irq_data + else if (type & IRQ_TYPE_LEVEL_MASK) + irq_set_handler_locked(d, handle_level_irq); + +- raw_spin_unlock_irqrestore(&vg->lock, flags); ++ raw_spin_unlock_irqrestore(&byt_lock, flags); + + return 0; + } +@@ -1444,9 +1446,9 @@ static void byt_gpio_irq_handler(struct + continue; + } + +- raw_spin_lock(&vg->lock); ++ raw_spin_lock(&byt_lock); + pending = readl(reg); +- raw_spin_unlock(&vg->lock); ++ raw_spin_unlock(&byt_lock); + for_each_set_bit(pin, &pending, 32) { + virq = irq_find_mapping(vg->chip.irq.domain, base + pin); + generic_handle_irq(virq); +@@ -1645,8 +1647,6 @@ static int byt_pinctrl_probe(struct plat + return PTR_ERR(vg->pctl_dev); + } + +- raw_spin_lock_init(&vg->lock); +- + ret = byt_gpio_probe(vg); + if (ret) + return ret; +@@ -1661,8 +1661,11 @@ static int byt_pinctrl_probe(struct plat + static int byt_gpio_suspend(struct device *dev) + { + struct byt_gpio *vg = dev_get_drvdata(dev); ++ unsigned long flags; + int i; + ++ raw_spin_lock_irqsave(&byt_lock, flags); ++ + for (i = 0; i < vg->soc_data->npins; i++) { + void __iomem *reg; + u32 value; +@@ -1683,14 +1686,18 @@ static int byt_gpio_suspend(struct devic + vg->saved_context[i].val = value; + } + ++ raw_spin_unlock_irqrestore(&byt_lock, flags); + return 0; + } + + static int byt_gpio_resume(struct device *dev) + { + struct byt_gpio *vg = dev_get_drvdata(dev); ++ unsigned long flags; + int i; + ++ raw_spin_lock_irqsave(&byt_lock, flags); ++ + for (i = 0; i < vg->soc_data->npins; i++) { + void __iomem *reg; + u32 value; +@@ -1728,6 +1735,7 @@ static int byt_gpio_resume(struct device + } + } + ++ raw_spin_unlock_irqrestore(&byt_lock, flags); + return 0; + } + #endif diff --git a/patches.suse/pinctrl-baytrail-Do-not-clear-IRQ-flags-on-direct-ir.patch b/patches.suse/pinctrl-baytrail-Do-not-clear-IRQ-flags-on-direct-ir.patch index 68972ac..85444cb 100644 --- a/patches.suse/pinctrl-baytrail-Do-not-clear-IRQ-flags-on-direct-ir.patch +++ b/patches.suse/pinctrl-baytrail-Do-not-clear-IRQ-flags-on-direct-ir.patch @@ -38,9 +38,9 @@ Acked-by: Takashi Iwai --- a/drivers/pinctrl/intel/pinctrl-baytrail.c +++ b/drivers/pinctrl/intel/pinctrl-baytrail.c -@@ -770,7 +770,13 @@ static void byt_gpio_clear_triggering(st +@@ -772,7 +772,13 @@ static void byt_gpio_clear_triggering(st - raw_spin_lock_irqsave(&vg->lock, flags); + raw_spin_lock_irqsave(&byt_lock, flags); value = readl(reg); - value &= ~(BYT_TRIG_POS | BYT_TRIG_NEG | BYT_TRIG_LVL); + @@ -51,5 +51,5 @@ Acked-by: Takashi Iwai + value &= ~(BYT_TRIG_POS | BYT_TRIG_NEG | BYT_TRIG_LVL); + writel(value, reg); - raw_spin_unlock_irqrestore(&vg->lock, flags); + raw_spin_unlock_irqrestore(&byt_lock, flags); } diff --git a/series.conf b/series.conf index 6006191..2457b8c 100644 --- a/series.conf +++ b/series.conf @@ -7452,6 +7452,9 @@ patches.suse/tty-serial-fsl_lpuart-use-the-sg-count-from-dma_map_.patch patches.suse/tty-serial-imx-use-the-sg-count-from-dma_map_sg.patch patches.suse/tty-serial-pch_uart-correct-usage-of-dma_unmap_sg.patch + patches.suse/0001-Revert-serial-uartlite-Add-runtime-support.patch + patches.suse/0001-Revert-serial-uartlite-Do-not-use-static-struct-uart.patch + patches.suse/0001-Revert-serial-uartlite-Move-the-uart-register.patch patches.suse/serial-pl011-Fix-DMA-flush_buffer.patch patches.suse/serial-ifx6x60-add-missed-pm_runtime_disable.patch patches.suse/serial-serial_core-Perform-NULL-checks-for-break_ctl.patch @@ -7851,6 +7854,7 @@ patches.suse/tpm_tis-reserve-chip-for-duration-of-tpm_tis_core_in.patch patches.suse/tpm-fix-invalid-locking-in-NONBLOCKING-mode.patch patches.suse/mm-vmscan-protect-shrinker-idr-replace-with-CONFIG_MEMCG.patch + patches.suse/0001-pinctrl-baytrail-Really-serialize-all-register-acces.patch patches.suse/usb-typec-fusb302-Fix-an-undefined-reference-to-extc.patch patches.suse/USB-EHCI-Do-not-return-EPIPE-when-hub-is-disconnecte.patch patches.suse/usbip-Fix-receive-error-in-vhci-hcd-when-using-scatt.patch