From c17104e77635827894a1b98a89600363f19ffc70 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Oct 2025 10:36:11 +0200 Subject: [PATCH] 5.4-stable patches added patches: pwm-berlin-fix-wrong-register-in-suspend-resume.patch --- ...fix-wrong-register-in-suspend-resume.patch | 47 +++++++++++++++++++ queue-5.4/series | 1 + 2 files changed, 48 insertions(+) create mode 100644 queue-5.4/pwm-berlin-fix-wrong-register-in-suspend-resume.patch diff --git a/queue-5.4/pwm-berlin-fix-wrong-register-in-suspend-resume.patch b/queue-5.4/pwm-berlin-fix-wrong-register-in-suspend-resume.patch new file mode 100644 index 0000000000..c5c2cd0039 --- /dev/null +++ b/queue-5.4/pwm-berlin-fix-wrong-register-in-suspend-resume.patch @@ -0,0 +1,47 @@ +From 3a4b9d027e4061766f618292df91760ea64a1fcc Mon Sep 17 00:00:00 2001 +From: Jisheng Zhang +Date: Tue, 19 Aug 2025 19:42:24 +0800 +Subject: pwm: berlin: Fix wrong register in suspend/resume +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Jisheng Zhang + +commit 3a4b9d027e4061766f618292df91760ea64a1fcc upstream. + +The 'enable' register should be BERLIN_PWM_EN rather than +BERLIN_PWM_ENABLE, otherwise, the driver accesses wrong address, there +will be cpu exception then kernel panic during suspend/resume. + +Fixes: bbf0722c1c66 ("pwm: berlin: Add suspend/resume support") +Signed-off-by: Jisheng Zhang +Link: https://lore.kernel.org/r/20250819114224.31825-1-jszhang@kernel.org +Cc: stable@vger.kernel.org +[ukleinek: backport to 5.10] +Signed-off-by: Uwe Kleine-König +Signed-off-by: Greg Kroah-Hartman +--- + drivers/pwm/pwm-berlin.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/pwm/pwm-berlin.c ++++ b/drivers/pwm/pwm-berlin.c +@@ -249,7 +249,7 @@ static int berlin_pwm_suspend(struct dev + if (!channel) + continue; + +- channel->enable = berlin_pwm_readl(pwm, i, BERLIN_PWM_ENABLE); ++ channel->enable = berlin_pwm_readl(pwm, i, BERLIN_PWM_EN); + channel->ctrl = berlin_pwm_readl(pwm, i, BERLIN_PWM_CONTROL); + channel->duty = berlin_pwm_readl(pwm, i, BERLIN_PWM_DUTY); + channel->tcnt = berlin_pwm_readl(pwm, i, BERLIN_PWM_TCNT); +@@ -280,7 +280,7 @@ static int berlin_pwm_resume(struct devi + berlin_pwm_writel(pwm, i, channel->ctrl, BERLIN_PWM_CONTROL); + berlin_pwm_writel(pwm, i, channel->duty, BERLIN_PWM_DUTY); + berlin_pwm_writel(pwm, i, channel->tcnt, BERLIN_PWM_TCNT); +- berlin_pwm_writel(pwm, i, channel->enable, BERLIN_PWM_ENABLE); ++ berlin_pwm_writel(pwm, i, channel->enable, BERLIN_PWM_EN); + } + + return 0; diff --git a/queue-5.4/series b/queue-5.4/series index a3d7b3e186..162a973cfa 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -148,3 +148,4 @@ fs-add-initramfs_options-to-set-initramfs-mount-opti.patch cramfs-verify-inode-mode-when-loading-from-disk.patch xen-events-cleanup-find_virq-return-codes.patch media-cx18-add-missing-check-after-dma-map.patch +pwm-berlin-fix-wrong-register-in-suspend-resume.patch -- 2.47.3