Thread (15 messages) 15 messages, 2 authors, 2021-01-13

Re: [PATCH v3 1/7] pwm: rockchip: Enable APB clock during register access while probing

From: Uwe Kleine-König <hidden>
Date: 2021-01-13 07:25:46
Also in: linux-arm-kernel, linux-pwm

Hello Simon,

On Wed, Dec 23, 2020 at 11:01:03AM -0500, Simon South wrote:
Commit 457f74abbed0 ("pwm: rockchip: Keep enabled PWMs running while
probing") modified rockchip_pwm_probe() to access a PWM device's registers
directly to check whether or not the device is running, but did not also
change the function to first enable the device's APB clock to be certain
the device can respond. This risks hanging the kernel on systems with PWM
devices that use more than a single clock.

Avoid this by enabling the device's APB clock before accessing its
registers (and disabling the clock when register access is complete).

Fixes: 457f74abbed0 ("pwm: rockchip: Keep enabled PWMs running while probing")
Reported-by: Thierry Reding <redacted>
Suggested-by: Trent Piepho <redacted>
Signed-off-by: Simon South <redacted>
Reviewed-by: Uwe Kleine-König <redacted>

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help