static bool pin_status;
static unsigned int cec_msg_dbg_en;
-static void cec_hw_reset(void);
-
#define CEC_ERR(format, args...) \
{if (cec_dev->dbg_dev) \
dev_err(cec_dev->dbg_dev, format, ##args); \
hdmirx_cec_write(DWC_CEC_ADDR_L, 1 << l_add);
else
hdmirx_cec_write(DWC_CEC_ADDR_H, 1 << (l_add - 8)|0x80);
+
+ CEC_INFO("set cecb logical addr:0x%x\n", l_add);
return;
}
aocec_wr_reg(CEC_LOGICAL_ADDR0, 0);
udelay(100);
aocec_wr_reg(CEC_LOGICAL_ADDR0, (0x1 << 4) | (l_add & 0xf));
if (cec_msg_dbg_en)
- CEC_INFO("set logical addr:0x%x\n",
+ CEC_INFO("set cec alogical addr:0x%x\n",
aocec_rd_reg(CEC_LOGICAL_ADDR0));
}
-static void cec_hw_reset(void)
+void cec_hw_reset(void)
{
if (ee_cec) {
cecrx_hw_init();
static void cec_clear_logical_addr(void)
{
+ CEC_INFO("clear logical addr\n");
+
if (ee_cec) {
hdmirx_cec_write(DWC_CEC_ADDR_L, 0);
hdmirx_cec_write(DWC_CEC_ADDR_H, 0x80);
writel(val, cec_dev->cec_reg + addr);
CEC_ERR("wao addr:0x%x, val:0x%x", val, addr);
+ } else if (token && strncmp(token, "preinit", 7) == 0) {
+ cec_pre_init();
} else {
if (token)
CEC_ERR("no cmd:%s\n", token);
CEC_ERR("hal_flag:0x%x\n", cec_dev->hal_flag);
CEC_ERR("hpd_state:0x%x\n", cec_dev->tx_dev->hpd_state);
CEC_ERR("cec_config:0x%x\n", cec_config(0, 0));
-
+ CEC_ERR("log_addr:0x%x\n", cec_dev->cec_info.log_addr);
port = kcalloc(cec_dev->port_num, sizeof(*port), GFP_KERNEL);
if (port) {
init_cec_port_info(port, cec_dev);
#ifndef __AO_CEC_H__
#define __AO_CEC_H__
-#define CEC_DRIVER_VERSION "Ver 2018/08/10\n"
+#define CEC_DRIVER_VERSION "Ver 2018/08/13\n"
#define CEC_FRAME_DELAY msecs_to_jiffies(400)
#define CEC_DEV_NAME "cec"
extern void dump_reg(void);
#endif
extern void cec_dump_info(void);
+extern void cec_hw_reset(void);
#endif /* __AO_CEC_H__ */
}
}
-static void cec_hw_reset(void)
+static void ceca_hw_reset(void)
{
writel(0x1, cec_dev->cec_reg + AO_CEC_GEN_CNTL);
/* Enable gated clock (Normal mode). */
aocec_wr_reg(CEC_TX_MSG_CMD, TX_ABORT);
cec_timeout_cnt++;
if (cec_timeout_cnt > 0x08)
- cec_hw_reset();
+ ceca_hw_reset();
break;
}
msleep(20);
if (cec_dev->cec_msg_dbg_en == 1)
CEC_ERR("TX ERROR!!!\n");
if (aocec_rd_reg(CEC_RX_MSG_STATUS) == RX_ERROR)
- cec_hw_reset();
+ ceca_hw_reset();
else
aocec_wr_reg(CEC_TX_MSG_CMD, TX_NO_OP);
cec_dev->cec_tx_result = CEC_FAIL_NACK;
/* timeout or interrupt */
if (ret == 0) {
CEC_ERR("tx timeout\n");
- cec_hw_reset();
+ ceca_hw_reset();
}
ret = CEC_FAIL_OTHER;
} else {