ARM: shmobile: r8a7791: Wait for status on all MSTP clocks
authorShinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Wed, 8 Jan 2014 07:54:46 +0000 (08:54 +0100)
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>
Wed, 4 Feb 2015 10:13:45 +0000 (11:13 +0100)
commit63d41615b0ec23fbcc4777c6f08a2fbb6db70d30
tree2cf1bc3acbcf32dfba9cc83064583209dc001359
parent78e5b22bd5d8cb6459efdc4fa95bf2ecb2354b98
ARM: shmobile: r8a7791: 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 r8a7791.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit dd6fc76d2f61e732a14f3592bdd83c2c0b7d2dcc)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/mach-shmobile/clock-r8a7791.c