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)
#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;
}
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;
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__);
#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)