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)
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>
Wed, 4 Feb 2015 10:13:43 +0000 (11:13 +0100)
commit1e7760cd38bb130de4d2b0e50a273585924b61f5
tree523f0c7302a8e78e37ec4649d7f9c617cefbe961
parent7ea482c2bdd78995ed3e9869e04ff784cef91f8a
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