video: rockchip: hdmi: delete cec grf register operation
authorZheng Yang <zhengyang@rock-chips.com>
Thu, 18 Feb 2016 02:08:58 +0000 (10:08 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 15 Feb 2017 08:55:03 +0000 (16:55 +0800)
CEC GRF register can be replaced by hdmi cec register
CEC_CTRL BIT 5.

Change-Id: Ic27eb242e23c4a9b4de6a77032372eac11b5247c
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit 3a94990c47760102a6b314e7b83c75c86af788e6)

drivers/video/rockchip/hdmi/rockchip-hdmiv2/rockchip_hdmiv2.c
drivers/video/rockchip/hdmi/rockchip-hdmiv2/rockchip_hdmiv2.h
drivers/video/rockchip/hdmi/rockchip-hdmiv2/rockchip_hdmiv2_cec.c
drivers/video/rockchip/hdmi/rockchip-hdmiv2/rockchip_hdmiv2_hw.h

index 2fe24374eff27c6215b7993637d33583962c0e24..fe61586bde45dbf1914a41166e7ea4bec6896ac1 100644 (file)
@@ -553,9 +553,8 @@ static int rockchip_hdmiv2_parse_dt(struct hdmi_dev *hdmi_dev)
        #ifdef CONFIG_MFD_SYSCON
        hdmi_dev->grf_base =
                syscon_regmap_lookup_by_phandle(np, "rockchip,grf");
-       if (IS_ERR(hdmi_dev->grf_base)) {
+       if (IS_ERR(hdmi_dev->grf_base))
                hdmi_dev->grf_base = NULL;
-       }
        #endif
        return 0;
 }
index 885527755de891c437ca0c865453b2598b5ac069..67e4bd76671b981519925a708c907cfafec74b6a 100644 (file)
@@ -36,8 +36,6 @@ struct hdmi_dev {
        void __iomem            *regbase;
        void __iomem            *phybase;
        struct regmap           *grf_base;
-       int                     grf_reg_offset;
-       int                     grf_reg_shift;
        struct reset_control    *reset;
        struct clk              *pd;
        struct clk              *pclk;
index fb7eba309b9d85f5fa117557010de6eb49ce2ed1..fcccc355fdc6d93879317ddae9d0cb4ea6fd10f3 100644 (file)
@@ -113,15 +113,7 @@ void rockchip_hdmiv2_cec_init(struct hdmi *hdmi)
                init = 0;
                /* init_waitqueue_head(&wait); */
        }
-       /*
-        * Enable sending all message even if sink refuse
-        * message broadcasted by us.
-        */
-       if (hdmi_dev->grf_base)
-               regmap_write(hdmi_dev->grf_base,
-                            hdmi_dev->grf_reg_offset,
-                            (1 << hdmi_dev->grf_reg_shift) |
-                            (1 << (hdmi_dev->grf_reg_shift + 16)));
+
        hdmi_writel(hdmi_dev, IH_MUTE_CEC_STAT0, m_ERR_INITIATOR |
                        m_ARB_LOST | m_NACK | m_DONE);
        CECDBG("%s", __func__);
index 37a015b851c873c11e6c4a83d9a44d625e8ab24a..0d763007c3ca596e3914b41b8dc31b4d63f59cbb 100644 (file)
@@ -1356,10 +1356,14 @@ enum {
 #define CEC_ENGINE_BASE                        0x7d00
 
 #define        CEC_CTRL                        0x7d00
+       #define m_CEC_BC_S_NCK          BIT(5)   /* Ignore ack of sending
+                                                 * broadcast message.
+                                                 */
        #define m_CEC_STANBY            BIT(4)
        #define m_CEC_BC_NCK            BIT(3)
        #define m_CEC_FRAME_TYPE        (3 << 1)
        #define m_CEC_SEND              BIT(0)
+       #define v_CEC_BC_S_NCK(n)       (((n) & 0x1) << 4)
        #define v_CEC_STANBY(n)         ((n & 0x1) << 4)
        #define v_CEC_BC_NCK(n)         ((n & 0x1) << 3)
        #define v_CEC_FRAME_TYPE(n)     ((n & 0x3) << 1)