]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.14.60/spi-spi-s3c64xx-fix-system-resume-support.patch
Remove duplicated commits
[thirdparty/kernel/stable-queue.git] / releases / 4.14.60 / spi-spi-s3c64xx-fix-system-resume-support.patch
1 From e935dba111621bd6a0c5d48e6511a4d9885103b4 Mon Sep 17 00:00:00 2001
2 From: Marek Szyprowski <m.szyprowski@samsung.com>
3 Date: Wed, 16 May 2018 10:42:39 +0200
4 Subject: spi: spi-s3c64xx: Fix system resume support
5
6 From: Marek Szyprowski <m.szyprowski@samsung.com>
7
8 commit e935dba111621bd6a0c5d48e6511a4d9885103b4 upstream.
9
10 Since Linux v4.10 release (commit 1d9174fbc55e "PM / Runtime: Defer
11 resuming of the device in pm_runtime_force_resume()"),
12 pm_runtime_force_resume() function doesn't runtime resume device if it was
13 not runtime active before system suspend. Thus, driver should not do any
14 register access after pm_runtime_force_resume() without checking the
15 runtime status of the device. To fix this issue, simply move
16 s3c64xx_spi_hwinit() call to s3c64xx_spi_runtime_resume() to ensure that
17 hardware is always properly initialized. This fixes Synchronous external
18 abort issue on system suspend/resume cycle on newer Exynos SoCs.
19
20 Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
21 Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
22 Signed-off-by: Mark Brown <broonie@kernel.org>
23 Cc: stable@vger.kernel.org
24 Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
25 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26 ---
27 drivers/spi/spi-s3c64xx.c | 4 ++--
28 1 file changed, 2 insertions(+), 2 deletions(-)
29
30 --- a/drivers/spi/spi-s3c64xx.c
31 +++ b/drivers/spi/spi-s3c64xx.c
32 @@ -1273,8 +1273,6 @@ static int s3c64xx_spi_resume(struct dev
33 if (ret < 0)
34 return ret;
35
36 - s3c64xx_spi_hwinit(sdd, sdd->port_id);
37 -
38 return spi_master_resume(master);
39 }
40 #endif /* CONFIG_PM_SLEEP */
41 @@ -1312,6 +1310,8 @@ static int s3c64xx_spi_runtime_resume(st
42 if (ret != 0)
43 goto err_disable_src_clk;
44
45 + s3c64xx_spi_hwinit(sdd, sdd->port_id);
46 +
47 return 0;
48
49 err_disable_src_clk: