mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
Revert "cec: cec a bus busy cause system hold [1/1]"
This reverts commit e5617679de.
Change-Id: I23415ecad6254a65ddcf92b171fbce15ca0fac8c
This commit is contained in:
@@ -95,7 +95,7 @@ struct cec_wakeup_t {
|
||||
|
||||
/* global struct for tx and rx */
|
||||
struct ao_cec_dev {
|
||||
bool probe_finish;
|
||||
bool proble_finish;
|
||||
unsigned long dev_type;
|
||||
struct device_node *node;
|
||||
unsigned int port_num; /*total input hdmi port number*/
|
||||
@@ -170,8 +170,6 @@ static unsigned char rx_msg[MAX_MSG];
|
||||
static unsigned char rx_len;
|
||||
static unsigned int new_msg;
|
||||
|
||||
static bool ceca_err_flag;
|
||||
|
||||
/*static bool wake_ok = 1;*/
|
||||
static bool ee_cec;
|
||||
static bool pin_status;
|
||||
@@ -237,8 +235,8 @@ unsigned int waiting_aocec_free(unsigned int r)
|
||||
while (readl(cec_dev->cec_reg + r) & (1<<23)) {
|
||||
if (cnt++ >= 3500) {
|
||||
pr_info("waiting aocec %x free time out %d\n", r, cnt);
|
||||
/*if (cec_dev->probe_finish)*/
|
||||
/* cec_hw_reset(CEC_A);*/
|
||||
if (cec_dev->proble_finish)
|
||||
cec_hw_reset(CEC_A);
|
||||
ret = false;
|
||||
break;
|
||||
}
|
||||
@@ -253,7 +251,7 @@ unsigned int waiting_aocec_free(unsigned int r)
|
||||
while (readl(cec_dev->cec_reg + r) & (1<<23)) {\
|
||||
if (cnt++ == 3500) { \
|
||||
pr_info("waiting aocec %x free time out\n", r);\
|
||||
if (cec_dev->probe_finish) \
|
||||
if (cec_dev->proble_finish) \
|
||||
cec_hw_reset(CEC_A);\
|
||||
break;\
|
||||
} \
|
||||
@@ -280,7 +278,6 @@ unsigned int aocec_rd_reg(unsigned long addr)
|
||||
spin_lock_irqsave(&cec_dev->cec_reg_lock, flags);
|
||||
if (!waiting_aocec_free(AO_CEC_RW_REG)) {
|
||||
spin_unlock_irqrestore(&cec_dev->cec_reg_lock, flags);
|
||||
ceca_err_flag = 1;
|
||||
return 0;
|
||||
}
|
||||
data32 = 0;
|
||||
@@ -291,7 +288,6 @@ unsigned int aocec_rd_reg(unsigned long addr)
|
||||
|
||||
if (!waiting_aocec_free(AO_CEC_RW_REG)) {
|
||||
spin_unlock_irqrestore(&cec_dev->cec_reg_lock, flags);
|
||||
ceca_err_flag = 1;
|
||||
return 0;
|
||||
}
|
||||
data32 = ((readl(cec_dev->cec_reg + AO_CEC_RW_REG)) >> 24) & 0xff;
|
||||
@@ -307,7 +303,6 @@ void aocec_wr_reg(unsigned long addr, unsigned long data)
|
||||
spin_lock_irqsave(&cec_dev->cec_reg_lock, flags);
|
||||
if (!waiting_aocec_free(AO_CEC_RW_REG)) {
|
||||
spin_unlock_irqrestore(&cec_dev->cec_reg_lock, flags);
|
||||
ceca_err_flag = 1;
|
||||
return;
|
||||
}
|
||||
data32 = 0;
|
||||
@@ -2359,11 +2354,6 @@ static void cec_task(struct work_struct *work)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (ceca_err_flag && cec_dev->probe_finish)
|
||||
cec_hw_reset(CEC_A);
|
||||
|
||||
/*triger next process*/
|
||||
queue_delayed_work(cec_dev->cec_thread, dwork, CEC_FRAME_DELAY);
|
||||
}
|
||||
@@ -3688,7 +3678,7 @@ static int aml_cec_probe(struct platform_device *pdev)
|
||||
cec_dev->tx_dev = get_hdmitx_device();
|
||||
cec_dev->cpu_type = get_cpu_type();
|
||||
cec_dev->node = pdev->dev.of_node;
|
||||
cec_dev->probe_finish = false;
|
||||
cec_dev->proble_finish = false;
|
||||
phy_addr_test = 0;
|
||||
CEC_ERR("cec driver date:%s\n", CEC_DRIVER_VERSION);
|
||||
cec_dbg_init();
|
||||
@@ -4038,7 +4028,7 @@ static int aml_cec_probe(struct platform_device *pdev)
|
||||
|
||||
cec_irq_enable(true);
|
||||
CEC_ERR("%s success end\n", __func__);
|
||||
cec_dev->probe_finish = true;
|
||||
cec_dev->proble_finish = true;
|
||||
return 0;
|
||||
|
||||
tag_cec_msg_alloc_err:
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#ifndef __AO_CEC_H__
|
||||
#define __AO_CEC_H__
|
||||
|
||||
#define CEC_DRIVER_VERSION "2020/04/09:fix cec a recursive call\n"
|
||||
#define CEC_DRIVER_VERSION "2020/03/16:reduece no msg in sleep time\n"
|
||||
|
||||
#define CEC_FRAME_DELAY msecs_to_jiffies(30)
|
||||
#define CEC_CHK_BUS_CNT 20
|
||||
|
||||
Reference in New Issue
Block a user