Created
January 8, 2016 06:57
-
-
Save bkrepo/1a1e8d86587990f96b4a to your computer and use it in GitHub Desktop.
ODROID-C1: cec: Fix to the CEC freeze bug after applying disable switch TV on by CEC patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/arch/arm/mach-meson8b/pm.c b/arch/arm/mach-meson8b/pm.c | |
index 2855008..a5b111f 100755 | |
--- a/arch/arm/mach-meson8b/pm.c | |
+++ b/arch/arm/mach-meson8b/pm.c | |
@@ -56,9 +56,8 @@ static int early_suspend_flag = 0; | |
#define ON 1 | |
#define OFF 0 | |
-static unsigned int cec_config; // 4 bytes: use to control cec switch on/off,distinguish between Mbox and Tablet. bit[0]:1:Mbox; 0:Tablet | |
+static unsigned int cec_config = 0; // 4 bytes: use to control cec switch on/off,distinguish between Mbox and Tablet. bit[0]:1:Mbox; 0:Tablet | |
static struct meson_pm_config *pdata; | |
-static struct device_node *cec_np = NULL; | |
#define CLK(addr) \ | |
{ \ | |
@@ -246,7 +245,10 @@ int run_arc_program(void) | |
unsigned vaddr2,v; | |
unsigned* pbuffer; | |
vaddr2 = IO_SRAM_BASE; | |
- | |
+ | |
+ /* Get the cec_config from DEBUG register. */ | |
+ cec_config = aml_read_reg32(P_AO_DEBUG_REG0); | |
+ | |
if(cec_config & 0x1)// 4 bytes: use to control cec switch on/off,distinguish between Mbox and Tablet. bit[0]:1:Mbox; 0:Tablet | |
{ | |
aml_write_reg32(P_AO_REMAP_REG0,0); | |
@@ -449,16 +451,6 @@ static int __init meson_pm_probe(struct platform_device *pdev) | |
clk81 = clk_get_sys("clk81", NULL); | |
clkxtal = clk_get_sys("xtal", NULL); | |
- cec_np = of_find_node_by_name(NULL, "vend_data"); | |
- if(cec_np){ | |
- if(of_property_read_u32(cec_np, "cec_config", &cec_config)) | |
- cec_config = 0x0; | |
- } | |
- else | |
- { | |
- cec_config = 0x0; | |
- } | |
- | |
#ifdef CONFIG_AO_TRIG_CLK | |
return run_arc_program(); | |
#else | |
diff --git a/arch/arm/plat-meson/include/plat/hdmi_config.h b/arch/arm/plat-meson/include/plat/hdmi_config.h | |
index 8590129..f219692 100755 | |
--- a/arch/arm/plat-meson/include/plat/hdmi_config.h | |
+++ b/arch/arm/plat-meson/include/plat/hdmi_config.h | |
@@ -27,7 +27,6 @@ struct vendor_info_data { | |
unsigned int vendor_id; // 3 Bytes, Refer to http://standards.ieee.org/develop/regauth/oui/oui.txt | |
unsigned char *product_desc; // Max Chars: 16 | |
unsigned char *cec_osd_string; // Max Chars: 14 | |
- unsigned int cec_config; // 4 bytes: use to control cec switch on/off | |
unsigned int ao_cec; //switch between ao-cec and ee-cec:: 1: ao-cec; 0: ee-cec | |
}; | |
diff --git a/drivers/amlogic/hdmi/hdmi_tx/hdmi_tx.c b/drivers/amlogic/hdmi/hdmi_tx/hdmi_tx.c | |
index 6134a91..a9eb1ce 100755 | |
--- a/drivers/amlogic/hdmi/hdmi_tx/hdmi_tx.c | |
+++ b/drivers/amlogic/hdmi/hdmi_tx/hdmi_tx.c | |
@@ -1422,11 +1422,6 @@ static int get_dt_vend_init_data(struct device_node *np, struct vendor_info_data | |
return 1; | |
} | |
- ret = of_property_read_u32(np, "cec_config", &(vend->cec_config)); | |
- if(ret) { | |
- hdmi_print(INF, SYS "not find cec config\n"); | |
- return 1; | |
- } | |
ret = of_property_read_u32(np, "ao_cec", &(vend->ao_cec)); | |
if(ret) { | |
hdmi_print(INF, SYS "not find ao cec\n"); | |
diff --git a/drivers/amlogic/hdmi/hdmi_tx/hdmi_tx_cec.c b/drivers/amlogic/hdmi/hdmi_tx/hdmi_tx_cec.c | |
index 0930f4a..3540071 100755 | |
--- a/drivers/amlogic/hdmi/hdmi_tx/hdmi_tx_cec.c | |
+++ b/drivers/amlogic/hdmi/hdmi_tx/hdmi_tx_cec.c | |
@@ -201,13 +201,7 @@ void cec_node_init(hdmitx_dev_t* hdmitx_device) | |
if(hdmitx_device->config_data.vend_data) | |
vend_data = hdmitx_device->config_data.vend_data; | |
- if((vend_data) && (vend_data->cec_config)) | |
- { | |
- hdmitx_device->cec_func_config = vend_data->cec_config; | |
- aml_write_reg32(P_AO_DEBUG_REG0, vend_data->cec_config); | |
- } | |
- | |
- hdmi_print(INF, CEC "cec_config: 0x%x; ao_cec:0x%x\n", vend_data->cec_config, vend_data->ao_cec); | |
+ hdmi_print(INF, CEC "ao_cec:0x%x\n", vend_data->ao_cec); | |
if((vend_data) && (vend_data->cec_osd_string)) { | |
i = strlen(vend_data->cec_osd_string); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment