summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJernej Skrabec <jernej.skrabec@siol.net>2021-04-22 03:14:33 +0300
committerAnatolij Gustschin <agust@denx.de>2021-04-24 14:44:59 +0300
commit59dd8622d0dc7dd9054b5f4f5f0fca50f4c1b0cb (patch)
tree2c5e0d0cca5dee5edb6f4f569ac356f48c72bb11
parentc439b5636464e029ee0e8cf434f0dc36d09fac92 (diff)
downloadu-boot-59dd8622d0dc7dd9054b5f4f5f0fca50f4c1b0cb.tar.xz
video: sunxi: dw-hdmi: read source_id later
There is no real need to read source_id at probe time. It also doesn't make sense to store it in driver private data since it's already stored in class platform data. While this looks like cleanup (and it is), it's also important for DE2 driver rework because this info will be filled later (after probe is already executed). Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-rw-r--r--drivers/video/sunxi/sunxi_dw_hdmi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/video/sunxi/sunxi_dw_hdmi.c b/drivers/video/sunxi/sunxi_dw_hdmi.c
index 6d2bc206fc..19ed80b48a 100644
--- a/drivers/video/sunxi/sunxi_dw_hdmi.c
+++ b/drivers/video/sunxi/sunxi_dw_hdmi.c
@@ -20,7 +20,6 @@
struct sunxi_dw_hdmi_priv {
struct dw_hdmi hdmi;
- int mux;
};
struct sunxi_hdmi_phy {
@@ -294,6 +293,7 @@ static int sunxi_dw_hdmi_enable(struct udevice *dev, int panel_bpp,
{
struct sunxi_hdmi_phy * const phy =
(struct sunxi_hdmi_phy *)(SUNXI_HDMI_BASE + HDMI_PHY_OFFS);
+ struct display_plat *uc_plat = dev_get_uclass_plat(dev);
struct sunxi_dw_hdmi_priv *priv = dev_get_priv(dev);
int ret;
@@ -301,7 +301,7 @@ static int sunxi_dw_hdmi_enable(struct udevice *dev, int panel_bpp,
if (ret)
return ret;
- sunxi_dw_hdmi_lcdc_init(priv->mux, edid, panel_bpp);
+ sunxi_dw_hdmi_lcdc_init(uc_plat->source_id, edid, panel_bpp);
if (edid->flags & DISPLAY_FLAGS_VSYNC_LOW)
setbits_le32(&phy->pol, 0x200);
@@ -324,7 +324,6 @@ static int sunxi_dw_hdmi_enable(struct udevice *dev, int panel_bpp,
static int sunxi_dw_hdmi_probe(struct udevice *dev)
{
- struct display_plat *uc_plat = dev_get_uclass_plat(dev);
struct sunxi_dw_hdmi_priv *priv = dev_get_priv(dev);
struct sunxi_ccm_reg * const ccm =
(struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
@@ -353,7 +352,6 @@ static int sunxi_dw_hdmi_probe(struct udevice *dev)
priv->hdmi.i2c_clk_low = 0xfe;
priv->hdmi.reg_io_width = 1;
priv->hdmi.phy_set = sunxi_dw_hdmi_phy_cfg;
- priv->mux = uc_plat->source_id;
ret = dw_hdmi_phy_wait_for_hpd(&priv->hdmi);
if (ret < 0) {