video: rockchip: hdmi: delete cec grf register operation

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)
This commit is contained in:
Zheng Yang
2016-02-18 10:08:58 +08:00
committed by Huang, Tao
parent e436a0784e
commit 5bbc1f6637
4 changed files with 6 additions and 13 deletions

View 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;
}

View 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;

View 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__);

View 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)