[PATCH v2 1/3] pwm: rockchip: Enable APB clock during register access while probing

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Mon Dec 21 03:22:09 EST 2020


Hello,

On Sat, Dec 19, 2020 at 03:44:08PM -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 <thierry.reding at gmail.com>
> Suggested-by: Trent Piepho <tpiepho at gmail.com>
> Signed-off-by: Simon South <simon at simonsouth.net>

Reviewed-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20201221/7ad10dcf/attachment.sig>


More information about the linux-arm-kernel mailing list