drm/bridge: tc358767: clean-up link training
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 28 May 2019 08:27:39 +0000 (11:27 +0300)
committerAndrzej Hajda <a.hajda@samsung.com>
Fri, 31 May 2019 13:41:26 +0000 (15:41 +0200)
commitf9538357760b08cd4c25eefa2d882adae3c9afb2
tree471272e82ede4e366464678c62033dcfd1f9fea7
parent0bf25146511334e5add88f6700aef4309b7e4b55
drm/bridge: tc358767: clean-up link training

The current link training code does unnecessary retry-loops, and does
extra writes to the registers. It is easier to follow the flow and
ensure it's similar to Toshiba's documentation if we deal with LT inside
tc_main_link_enable() function.

This patch adds tc_wait_link_training() which handles waiting for the LT
phase to finish, and does the necessary LT register setups in
tc_main_link_enable, without extra loops.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-17-tomi.valkeinen@ti.com
drivers/gpu/drm/bridge/tc358767.c