drm: bridge/dw_hdmi: add function dw_hdmi_phy_enable_spare
authorAndy Yan <andy.yan@rock-chips.com>
Fri, 5 Dec 2014 06:31:53 +0000 (14:31 +0800)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Wed, 7 Jan 2015 17:31:59 +0000 (18:31 +0100)
RK3288 HDMI will not work without the spare bit of
HDMI_PHY_CONF0 enable

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/gpu/drm/bridge/dw_hdmi.c
drivers/gpu/drm/bridge/dw_hdmi.h

index d39dccd41e5af3fa0e55383f8121bb357807eb5c..3a97c8419d4f80eb289b890749dfddd8b1ad68b2 100644 (file)
@@ -713,6 +713,13 @@ static void dw_hdmi_phy_enable_tmds(struct dw_hdmi *hdmi, u8 enable)
                         HDMI_PHY_CONF0_ENTMDS_MASK);
 }
 
+static void dw_hdmi_phy_enable_spare(struct dw_hdmi *hdmi, u8 enable)
+{
+       hdmi_mask_writeb(hdmi, enable, HDMI_PHY_CONF0,
+                        HDMI_PHY_CONF0_SPARECTRL_OFFSET,
+                        HDMI_PHY_CONF0_SPARECTRL_MASK);
+}
+
 static void dw_hdmi_phy_gen2_pddq(struct dw_hdmi *hdmi, u8 enable)
 {
        hdmi_mask_writeb(hdmi, enable, HDMI_PHY_CONF0,
index baa7849851d41ec6932b4cdc4479b78f8218a8af..175dbc89a824797d1f0ac20ffe2f65cbccbc4efe 100644 (file)
@@ -837,7 +837,8 @@ enum {
        HDMI_PHY_CONF0_PDZ_OFFSET = 7,
        HDMI_PHY_CONF0_ENTMDS_MASK = 0x40,
        HDMI_PHY_CONF0_ENTMDS_OFFSET = 6,
-       HDMI_PHY_CONF0_SPARECTRL = 0x20,
+       HDMI_PHY_CONF0_SPARECTRL_MASK = 0x20,
+       HDMI_PHY_CONF0_SPARECTRL_OFFSET = 5,
        HDMI_PHY_CONF0_GEN2_PDDQ_MASK = 0x10,
        HDMI_PHY_CONF0_GEN2_PDDQ_OFFSET = 4,
        HDMI_PHY_CONF0_GEN2_TXPWRON_MASK = 0x8,