drm: bridge/dw_hdmi: clean up phy configuration
authorRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 31 Mar 2015 17:34:11 +0000 (18:34 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 18 Aug 2015 10:27:14 +0000 (11:27 +0100)
commit39cc1535fe1e401c523065f7b219ac1cd76e4a7d
treea17be5e81b6ab7a63d2698892e2c9b6e120828b4
parent36b8ae0d608696cb8b48639813ec22be99c4a8e6
drm: bridge/dw_hdmi: clean up phy configuration

The phy configuration is dependent on the SoC, and we look up values for
some of the registers in SoC specific data.  However, we had partially
programmed the phy before we had successfully looked up the clock rate.
Also, we were only checking that we had a valid configuration for the
currctrl register.

Move all these lookups to the start of this function instead, so we can
check that all lookups were successful before beginning to program the
phy.

Tested-by: Yakir Yang <ykk@rock-chips.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/gpu/drm/bridge/dw_hdmi.c