ARM: shmobile: r8a7790: Wait for status on all MSTP clocks
authorShinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Sat, 14 Dec 2013 15:23:53 +0000 (16:23 +0100)
committerSimon Horman <horms@verge.net.au>
Fri, 5 Dec 2014 00:21:57 +0000 (09:21 +0900)
commit5bb112c54fad763c4fdb491a716888768150cd91
tree9eaf33422084183e9121fbe6e45ade2da1a46953
parentba1c72b518dee58ca5dda7602c2d0e39f52fa99f
ARM: shmobile: r8a7790: Wait for status on all MSTP clocks

When enabling a module clock by clearing its bit in the MSTP control
register, the CPG requires waiting for the status register to signal
that the clock has started. Failure to do so will result in returning
from the clk_enable() call with the clock potentially still disabled,
leading to various race conditions and difficult to debug errors.

Enable status wait for all MSTP clocks on the r8a7790.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit cb9ec3adf882688831cdc9e7b84bb388f215f8ce)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/mach-shmobile/clock-r8a7790.c