diff options
author | Portisch <hugo.portisch@yahoo.de> | 2018-11-09 09:11:50 +0100 |
---|---|---|
committer | Dongjin Kim <tobetter@gmail.com> | 2020-02-13 17:13:40 +0900 |
commit | 894aa8db6b729546b428ff2b1e135fb38c22d74b (patch) | |
tree | 1b5511133048344dd05323193418aa60d4929786 | |
parent | 2044cc4984e8ad8e924e6ca8061fe6700f37e72a (diff) | |
download | u-boot-odroid-c1-894aa8db6b729546b428ff2b1e135fb38c22d74b.tar.gz |
gxb/gxl/gxm: enable CEC wakeup from power off state
Change-Id: I1e79ef397bb544af125c42889fde5d248a7b8e4b
15 files changed, 35 insertions, 82 deletions
diff --git a/arch/arm/cpu/armv8/gxl/firmware/scp_task/suspend.c b/arch/arm/cpu/armv8/gxl/firmware/scp_task/suspend.c index 00aabec148..e6b29fc737 100755 --- a/arch/arm/cpu/armv8/gxl/firmware/scp_task/suspend.c +++ b/arch/arm/cpu/armv8/gxl/firmware/scp_task/suspend.c @@ -75,7 +75,7 @@ void enter_suspend(unsigned int suspend_from) uart_put_hex(hdmi_cec_func_config, 16); uart_puts("\n"); #endif - p_pwr_op->power_off_at_clk81(suspend_from); + p_pwr_op->power_off_at_clk81(); p_pwr_op->power_off_at_24M(suspend_from); gxbb_com_gate_off(); diff --git a/arch/arm/cpu/armv8/gxl/firmware/scp_task/suspend.h b/arch/arm/cpu/armv8/gxl/firmware/scp_task/suspend.h index bc1a4ca71d..d4de38fd39 100755 --- a/arch/arm/cpu/armv8/gxl/firmware/scp_task/suspend.h +++ b/arch/arm/cpu/armv8/gxl/firmware/scp_task/suspend.h @@ -26,7 +26,7 @@ #define ETH_PHY_WAKEUP_SRC (1<<9) struct pwr_op { - void (*power_off_at_clk81)(unsigned int); + void (*power_off_at_clk81)(void); void (*power_on_at_clk81)(void); void (*power_off_at_24M)(unsigned int); diff --git a/board/amlogic/gxb_p200_v1/firmware/scp_task/pwr_ctrl.c b/board/amlogic/gxb_p200_v1/firmware/scp_task/pwr_ctrl.c index 785b33c709..10af9b14d2 100755 --- a/board/amlogic/gxb_p200_v1/firmware/scp_task/pwr_ctrl.c +++ b/board/amlogic/gxb_p200_v1/firmware/scp_task/pwr_ctrl.c @@ -85,7 +85,7 @@ static void power_on_vcck(void) aml_update_bits(AO_GPIO_O_EN_N, 1<<20, 1<<20); } -static void power_off_at_clk81(unsigned int suspend_from) +static void power_off_at_clk81(void) { power_off_3v3(); power_off_vcck(); diff --git a/board/amlogic/gxb_p201_v1/firmware/scp_task/pwr_ctrl.c b/board/amlogic/gxb_p201_v1/firmware/scp_task/pwr_ctrl.c index 673bf8760c..a6a3d48638 100755 --- a/board/amlogic/gxb_p201_v1/firmware/scp_task/pwr_ctrl.c +++ b/board/amlogic/gxb_p201_v1/firmware/scp_task/pwr_ctrl.c @@ -84,7 +84,7 @@ static void power_on_vcck(void) aml_update_bits(AO_GPIO_O_EN_N, 1<<20, 1<<20); } -static void power_off_at_clk81(unsigned int suspend_from) +static void power_off_at_clk81(void) { power_off_3v3(); power_off_vcck(); diff --git a/board/amlogic/gxb_skt_v1/firmware/scp_task/pwr_ctrl.c b/board/amlogic/gxb_skt_v1/firmware/scp_task/pwr_ctrl.c index a06d2d4d78..20ce1ce948 100755 --- a/board/amlogic/gxb_skt_v1/firmware/scp_task/pwr_ctrl.c +++ b/board/amlogic/gxb_skt_v1/firmware/scp_task/pwr_ctrl.c @@ -85,7 +85,7 @@ static void power_on_vcck(void) aml_update_bits(AO_GPIO_O_EN_N, 1<<20, 1<<20); } -static void power_off_at_clk81(unsigned int suspend_from) +static void power_off_at_clk81(void) { power_off_3v3(); power_off_vcck(); diff --git a/board/amlogic/gxl_p212_v1/firmware/scp_task/pwr_ctrl.c b/board/amlogic/gxl_p212_v1/firmware/scp_task/pwr_ctrl.c index a11133aaf1..e746b189e9 100755 --- a/board/amlogic/gxl_p212_v1/firmware/scp_task/pwr_ctrl.c +++ b/board/amlogic/gxl_p212_v1/firmware/scp_task/pwr_ctrl.c @@ -95,11 +95,8 @@ static void power_off_at_mcu(unsigned int shutdown) } -static void power_off_at_clk81(unsigned int suspend_from) +static void power_off_at_clk81(void) { - if(suspend_from == SYS_POWEROFF) { - hdmi_5v_ctrl(OFF); - } vcck_ctrl(OFF); pwm_set_voltage(pwm_b, CONFIG_VDDEE_SLEEP_VOLTAGE); /* reduce power */ @@ -146,8 +143,7 @@ void get_wakeup_source(void *response, unsigned int suspend_from) val = (POWER_KEY_WAKEUP_SRC | AUTO_WAKEUP_SRC | REMOTE_WAKEUP_SRC | ETH_PHY_WAKEUP_SRC | BT_WAKEUP_SRC); #ifdef CONFIG_CEC_WAKEUP - if (suspend_from != SYS_POWEROFF) - val |= CEC_WAKEUP_SRC; + val |= CEC_WAKEUP_SRC; #endif p->sources = val; @@ -217,8 +213,7 @@ static unsigned int detect_key(unsigned int suspend_from) #ifdef CONFIG_CEC_WAKEUP if (irq[IRQ_AO_CEC] == IRQ_AO_CEC_NUM) { irq[IRQ_AO_CEC] = 0xFFFFFFFF; - if (suspend_from == SYS_POWEROFF) - continue; + if (cec_msg.log_addr) { if (hdmi_cec_func_config & 0x1) { cec_handler(); diff --git a/board/amlogic/gxl_p241_v1/firmware/scp_task/pwr_ctrl.c b/board/amlogic/gxl_p241_v1/firmware/scp_task/pwr_ctrl.c index 3878533c9b..e48ad1d1f5 100755 --- a/board/amlogic/gxl_p241_v1/firmware/scp_task/pwr_ctrl.c +++ b/board/amlogic/gxl_p241_v1/firmware/scp_task/pwr_ctrl.c @@ -98,11 +98,8 @@ static void vcck_ctrl(unsigned int ctrl) } } -static void power_off_at_clk81(unsigned int suspend_from) +static void power_off_at_clk81(void) { - if(suspend_from == SYS_POWEROFF) { - hdmi_5v_ctrl(OFF); - } vcck_ctrl(OFF); pwm_set_voltage(pwm_b, CONFIG_VDDEE_SLEEP_VOLTAGE); /* reduce power */ @@ -149,8 +146,7 @@ void get_wakeup_source(void *response, unsigned int suspend_from) val = (POWER_KEY_WAKEUP_SRC | AUTO_WAKEUP_SRC | REMOTE_WAKEUP_SRC | ETH_PHY_WAKEUP_SRC | BT_WAKEUP_SRC); #ifdef CONFIG_CEC_WAKEUP - if (suspend_from != SYS_POWEROFF) - val |= CEC_WAKEUP_SRC; + val |= CEC_WAKEUP_SRC; #endif p->sources = val; @@ -219,8 +215,7 @@ static unsigned int detect_key(unsigned int suspend_from) #ifdef CONFIG_CEC_WAKEUP if (irq[IRQ_AO_CEC] == IRQ_AO_CEC_NUM) { irq[IRQ_AO_CEC] = 0xFFFFFFFF; - if (suspend_from == SYS_POWEROFF) - continue; + if (cec_msg.log_addr) { if (hdmi_cec_func_config & 0x1) { cec_handler(); diff --git a/board/amlogic/gxl_p281_v1/firmware/scp_task/pwr_ctrl.c b/board/amlogic/gxl_p281_v1/firmware/scp_task/pwr_ctrl.c index 33b840bc5a..d0b9093cac 100755 --- a/board/amlogic/gxl_p281_v1/firmware/scp_task/pwr_ctrl.c +++ b/board/amlogic/gxl_p281_v1/firmware/scp_task/pwr_ctrl.c @@ -97,11 +97,8 @@ static void vcck_ctrl(unsigned int ctrl) } } -static void power_off_at_clk81(unsigned int suspend_from) +static void power_off_at_clk81(void) { - if(suspend_from == SYS_POWEROFF) { - hdmi_5v_ctrl(OFF); - } vcck_ctrl(OFF); pwm_set_voltage(pwm_b, CONFIG_VDDEE_SLEEP_VOLTAGE); /* reduce power */ @@ -147,8 +144,7 @@ void get_wakeup_source(void *response, unsigned int suspend_from) val = (POWER_KEY_WAKEUP_SRC | AUTO_WAKEUP_SRC | REMOTE_WAKEUP_SRC | ETH_PHY_WAKEUP_SRC | BT_WAKEUP_SRC); #ifdef CONFIG_CEC_WAKEUP - if (suspend_from != SYS_POWEROFF) - val |= CEC_WAKEUP_SRC; + val |= CEC_WAKEUP_SRC; #endif p->sources = val; @@ -217,8 +213,7 @@ static unsigned int detect_key(unsigned int suspend_from) #ifdef CONFIG_CEC_WAKEUP if (irq[IRQ_AO_CEC] == IRQ_AO_CEC_NUM) { irq[IRQ_AO_CEC] = 0xFFFFFFFF; - if (suspend_from == SYS_POWEROFF) - continue; + if (cec_msg.log_addr) { if (hdmi_cec_func_config & 0x1) { cec_handler(); diff --git a/board/amlogic/gxl_p400_v1/firmware/scp_task/pwr_ctrl.c b/board/amlogic/gxl_p400_v1/firmware/scp_task/pwr_ctrl.c index 2327faebf0..1db7cbdaf8 100755 --- a/board/amlogic/gxl_p400_v1/firmware/scp_task/pwr_ctrl.c +++ b/board/amlogic/gxl_p400_v1/firmware/scp_task/pwr_ctrl.c @@ -116,11 +116,8 @@ static void vcck_ctrl(unsigned int ctrl) } } -static void power_off_at_clk81(unsigned int suspend_from) +static void power_off_at_clk81(void) { - if(suspend_from == SYS_POWEROFF) { - hdmi_5v_ctrl(OFF); - } vcck_ctrl(OFF); pwm_set_voltage(pwm_b, CONFIG_VDDEE_SLEEP_VOLTAGE); // reduce power } @@ -163,8 +160,7 @@ void get_wakeup_source(void *response, unsigned int suspend_from) p->status = RESPONSE_OK; val = (POWER_KEY_WAKEUP_SRC | AUTO_WAKEUP_SRC | REMOTE_WAKEUP_SRC|ETH_PHY_WAKEUP_SRC); #ifdef CONFIG_CEC_WAKEUP - if (suspend_from != SYS_POWEROFF) - val |= CEC_WAKEUP_SRC; + val |= CEC_WAKEUP_SRC; #endif p->sources = val; @@ -225,8 +221,7 @@ static unsigned int detect_key(unsigned int suspend_from) #ifdef CONFIG_CEC_WAKEUP if (irq[IRQ_AO_CEC] == IRQ_AO_CEC_NUM) { irq[IRQ_AO_CEC] = 0xFFFFFFFF; - if (suspend_from == SYS_POWEROFF) - continue; + if (cec_msg.log_addr) { if (hdmi_cec_func_config & 0x1) { cec_handler(); diff --git a/board/amlogic/gxl_p401_v1/firmware/scp_task/pwr_ctrl.c b/board/amlogic/gxl_p401_v1/firmware/scp_task/pwr_ctrl.c index 2327faebf0..1db7cbdaf8 100755 --- a/board/amlogic/gxl_p401_v1/firmware/scp_task/pwr_ctrl.c +++ b/board/amlogic/gxl_p401_v1/firmware/scp_task/pwr_ctrl.c @@ -116,11 +116,8 @@ static void vcck_ctrl(unsigned int ctrl) } } -static void power_off_at_clk81(unsigned int suspend_from) +static void power_off_at_clk81(void) { - if(suspend_from == SYS_POWEROFF) { - hdmi_5v_ctrl(OFF); - } vcck_ctrl(OFF); pwm_set_voltage(pwm_b, CONFIG_VDDEE_SLEEP_VOLTAGE); // reduce power } @@ -163,8 +160,7 @@ void get_wakeup_source(void *response, unsigned int suspend_from) p->status = RESPONSE_OK; val = (POWER_KEY_WAKEUP_SRC | AUTO_WAKEUP_SRC | REMOTE_WAKEUP_SRC|ETH_PHY_WAKEUP_SRC); #ifdef CONFIG_CEC_WAKEUP - if (suspend_from != SYS_POWEROFF) - val |= CEC_WAKEUP_SRC; + val |= CEC_WAKEUP_SRC; #endif p->sources = val; @@ -225,8 +221,7 @@ static unsigned int detect_key(unsigned int suspend_from) #ifdef CONFIG_CEC_WAKEUP if (irq[IRQ_AO_CEC] == IRQ_AO_CEC_NUM) { irq[IRQ_AO_CEC] = 0xFFFFFFFF; - if (suspend_from == SYS_POWEROFF) - continue; + if (cec_msg.log_addr) { if (hdmi_cec_func_config & 0x1) { cec_handler(); diff --git a/board/amlogic/gxl_skt_v1/firmware/scp_task/pwr_ctrl.c b/board/amlogic/gxl_skt_v1/firmware/scp_task/pwr_ctrl.c index 6debac7d97..039997b239 100755 --- a/board/amlogic/gxl_skt_v1/firmware/scp_task/pwr_ctrl.c +++ b/board/amlogic/gxl_skt_v1/firmware/scp_task/pwr_ctrl.c @@ -93,11 +93,8 @@ static void vcck_ctrl(unsigned int ctrl) } } -static void power_off_at_clk81(unsigned int suspend_from) +static void power_off_at_clk81(void) { - if(suspend_from == SYS_POWEROFF) { - hdmi_5v_ctrl(OFF); - } vcck_ctrl(OFF); pwm_set_voltage(pwm_d, CONFIG_VDDEE_SLEEP_VOLTAGE); // reduce power } @@ -140,8 +137,7 @@ void get_wakeup_source(void *response, unsigned int suspend_from) val = (POWER_KEY_WAKEUP_SRC | AUTO_WAKEUP_SRC | REMOTE_WAKEUP_SRC | ETH_PHY_WAKEUP_SRC | BT_WAKEUP_SRC); #ifdef CONFIG_CEC_WAKEUP - if (suspend_from != SYS_POWEROFF) - val |= CEC_WAKEUP_SRC; + val |= CEC_WAKEUP_SRC; #endif p->sources = val; @@ -210,8 +206,7 @@ static unsigned int detect_key(unsigned int suspend_from) #ifdef CONFIG_CEC_WAKEUP if (irq[IRQ_AO_CEC] == IRQ_AO_CEC_NUM) { irq[IRQ_AO_CEC] = 0xFFFFFFFF; - if (suspend_from == SYS_POWEROFF) - continue; + if (cec_msg.log_addr) { if (hdmi_cec_func_config & 0x1) { cec_handler(); diff --git a/board/amlogic/gxm_q200_v1/firmware/scp_task/pwr_ctrl.c b/board/amlogic/gxm_q200_v1/firmware/scp_task/pwr_ctrl.c index c84d6d231a..c901c2c612 100755 --- a/board/amlogic/gxm_q200_v1/firmware/scp_task/pwr_ctrl.c +++ b/board/amlogic/gxm_q200_v1/firmware/scp_task/pwr_ctrl.c @@ -116,11 +116,8 @@ static void vcck_ctrl(unsigned int ctrl) } } -static void power_off_at_clk81(unsigned int suspend_from) +static void power_off_at_clk81(void) { - if(suspend_from == SYS_POWEROFF) { - hdmi_5v_ctrl(OFF); - } vcck_ctrl(OFF); pwm_set_voltage(pwm_b, CONFIG_VDDEE_SLEEP_VOLTAGE); // reduce power } @@ -164,8 +161,7 @@ void get_wakeup_source(void *response, unsigned int suspend_from) val = (POWER_KEY_WAKEUP_SRC | AUTO_WAKEUP_SRC | REMOTE_WAKEUP_SRC | ETH_PHY_WAKEUP_SRC | BT_WAKEUP_SRC); #ifdef CONFIG_CEC_WAKEUP - if (suspend_from != SYS_POWEROFF) - val |= CEC_WAKEUP_SRC; + val |= CEC_WAKEUP_SRC; #endif p->sources = val; @@ -236,8 +232,7 @@ static unsigned int detect_key(unsigned int suspend_from) #ifdef CONFIG_CEC_WAKEUP if (irq[IRQ_AO_CEC] == IRQ_AO_CEC_NUM) { irq[IRQ_AO_CEC] = 0xFFFFFFFF; - if (suspend_from == SYS_POWEROFF) - continue; + if (cec_msg.log_addr) { if (hdmi_cec_func_config & 0x1) { cec_handler(); diff --git a/board/amlogic/gxm_q201_v1/firmware/scp_task/pwr_ctrl.c b/board/amlogic/gxm_q201_v1/firmware/scp_task/pwr_ctrl.c index 5c8309c01d..79f42d25c2 100755 --- a/board/amlogic/gxm_q201_v1/firmware/scp_task/pwr_ctrl.c +++ b/board/amlogic/gxm_q201_v1/firmware/scp_task/pwr_ctrl.c @@ -116,11 +116,8 @@ static void vcck_ctrl(unsigned int ctrl) } } -static void power_off_at_clk81(unsigned int suspend_from) +static void power_off_at_clk81(void) { - if(suspend_from == SYS_POWEROFF) { - hdmi_5v_ctrl(OFF); - } vcck_ctrl(OFF); pwm_set_voltage(pwm_b, CONFIG_VDDEE_SLEEP_VOLTAGE); // reduce power } @@ -165,8 +162,7 @@ void get_wakeup_source(void *response, unsigned int suspend_from) val = (POWER_KEY_WAKEUP_SRC | AUTO_WAKEUP_SRC | REMOTE_WAKEUP_SRC | ETH_PHY_WAKEUP_SRC | BT_WAKEUP_SRC); #ifdef CONFIG_CEC_WAKEUP - if (suspend_from != SYS_POWEROFF) - val |= CEC_WAKEUP_SRC; + val |= CEC_WAKEUP_SRC; #endif p->sources = val; @@ -237,8 +233,7 @@ static unsigned int detect_key(unsigned int suspend_from) #ifdef CONFIG_CEC_WAKEUP if (irq[IRQ_AO_CEC] == IRQ_AO_CEC_NUM) { irq[IRQ_AO_CEC] = 0xFFFFFFFF; - if (suspend_from == SYS_POWEROFF) - continue; + if (cec_msg.log_addr) { if (hdmi_cec_func_config & 0x1) { cec_handler(); diff --git a/board/amlogic/gxm_skt_v1/firmware/scp_task/pwr_ctrl.c b/board/amlogic/gxm_skt_v1/firmware/scp_task/pwr_ctrl.c index 9cd0be5ca6..db9c93f42a 100755 --- a/board/amlogic/gxm_skt_v1/firmware/scp_task/pwr_ctrl.c +++ b/board/amlogic/gxm_skt_v1/firmware/scp_task/pwr_ctrl.c @@ -115,11 +115,8 @@ static void power_off_at_mcu(unsigned int shutdown) } -static void power_off_at_clk81(unsigned int suspend_from) +static void power_off_at_clk81(void) { - if(suspend_from == SYS_POWEROFF) { - hdmi_5v_ctrl(OFF); - } vcck_ctrl(OFF); pwm_set_voltage(pwm_b, CONFIG_VDDEE_SLEEP_VOLTAGE); // reduce power } @@ -162,8 +159,7 @@ void get_wakeup_source(void *response, unsigned int suspend_from) p->status = RESPONSE_OK; val = (POWER_KEY_WAKEUP_SRC | AUTO_WAKEUP_SRC | REMOTE_WAKEUP_SRC); #ifdef CONFIG_CEC_WAKEUP - if (suspend_from != SYS_POWEROFF) - val |= CEC_WAKEUP_SRC; + val |= CEC_WAKEUP_SRC; #endif p->sources = val; @@ -224,8 +220,7 @@ static unsigned int detect_key(unsigned int suspend_from) #ifdef CONFIG_CEC_WAKEUP if (irq[IRQ_AO_CEC] == IRQ_AO_CEC_NUM) { irq[IRQ_AO_CEC] = 0xFFFFFFFF; - if (suspend_from == SYS_POWEROFF) - continue; + if (cec_msg.log_addr) { if (hdmi_cec_func_config & 0x1) { cec_handler(); diff --git a/board/hardkernel/odroidc2/firmware/scp_task/pwr_ctrl.c b/board/hardkernel/odroidc2/firmware/scp_task/pwr_ctrl.c index 5a50fab7ba..1bc9b79ebf 100755 --- a/board/hardkernel/odroidc2/firmware/scp_task/pwr_ctrl.c +++ b/board/hardkernel/odroidc2/firmware/scp_task/pwr_ctrl.c @@ -85,7 +85,7 @@ static void power_on_vcck(void) aml_update_bits(AO_GPIO_O_EN_N, 1<<20, 1<<20); } -static void power_off_at_clk81(unsigned int suspend_from) +static void power_off_at_clk81(void) { power_off_3v3(); power_off_vcck(); @@ -131,8 +131,7 @@ void get_wakeup_source(void *response, unsigned int suspend_from) #endif #ifdef CONFIG_CEC_WAKEUP - if (suspend_from != SYS_POWEROFF) - val |= CEC_WAKEUP_SRC; + val |= CEC_WAKEUP_SRC; #endif #ifdef CONFIG_WIFI_WAKEUP if (suspend_from != SYS_POWEROFF) @@ -222,8 +221,7 @@ static unsigned int detect_key(unsigned int suspend_from) switch (*irq) { #ifdef CONFIG_CEC_WAKEUP case IRQ_AO_CEC_NUM: - if (suspend_from == SYS_POWEROFF) - break; + if (cec_msg.log_addr) { if (hdmi_cec_func_config & 0x1) { cec_handler(); |