]> git.baikalelectronics.ru Git - kernel.git/commit
drm/sun4i: Fix TCON clock and regmap initialization sequence
authorChen-Yu Tsai <wens@csie.org>
Thu, 9 Mar 2017 10:05:24 +0000 (18:05 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Thu, 9 Mar 2017 10:15:53 +0000 (11:15 +0100)
commit6dc8640ddd4ab28e3556b1d17f460584c0984eff
tree2e20e88050e4d2f55ea11f3811d8030de71b6c63
parent5a223298fbb2df03b690a0fbc3a788480bcdcca6
drm/sun4i: Fix TCON clock and regmap initialization sequence

The TCON driver calls sun4i_tcon_init_regmap and sun4i_tcon_init_clocks
in its bind function. The former creates a regmap and writes to several
register to clear its configuration to a known default. The latter
initializes various clocks. This includes enabling the bus clock for
register access and creating the dotclock.

In order for the first step's writes to work, the bus clock must be
enabled which is done in the second step. but the dotclock's ops use
the regmap created in the first step.

Rearrange the function calls such that the clocks are initialized before
the regmap, and split out the dot clock creation to after the regmap is
initialized.

Fixes: e656da9b8498 ("drm: Add Allwinner A10 Display Engine support")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
drivers/gpu/drm/sun4i/sun4i_tcon.c