summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPortisch <hugo.portisch@yahoo.de>2020-02-02 13:14:33 +0300
committerDongjin Kim <tobetter@gmail.com>2020-05-03 15:05:39 +0300
commitdee79560093354224f59d058eb47af2ba10c6bc4 (patch)
tree83711b84e48e0ad7f47bbd09e90d95d3f109e335
parent47fb8f9a084e8244f49c7934ec6f5e1e7f000b62 (diff)
downloadu-boot-dee79560093354224f59d058eb47af2ba10c6bc4.tar.xz
BACKPORT: cec: wake up on CEC_OC_ROUTING_INFORMATION
Change-Id: Ia00c6fd0f3471b66f4370c7f2659900c94554b1e
-rw-r--r--arch/arm/cpu/armv8/g12b/firmware/scp_task/hdmi_cec_arc.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv8/g12b/firmware/scp_task/hdmi_cec_arc.c b/arch/arm/cpu/armv8/g12b/firmware/scp_task/hdmi_cec_arc.c
index d3c7ba52aa..ea4ead5256 100644
--- a/arch/arm/cpu/armv8/g12b/firmware/scp_task/hdmi_cec_arc.c
+++ b/arch/arm/cpu/armv8/g12b/firmware/scp_task/hdmi_cec_arc.c
@@ -451,7 +451,7 @@ void cec_routing_change(void)
{
unsigned char phy_addr_ab = (readl(P_AO_DEBUG_REG1) >> 8) & 0xff;
unsigned char phy_addr_cd = readl(P_AO_DEBUG_REG1) & 0xff;
- cec_dbg_print(", phy_addr_ab:0x", phy_addr_ab);
+ cec_dbg_print("0x80, phy_addr_ab:0x", phy_addr_ab);
cec_dbg_print(", phy_addr_cd:0x", phy_addr_cd);
cec_dbg_print(", msg[4]:0x", cec_msg.buf[cec_msg.rx_read_pos].msg[4]);
cec_dbg_print(", msg[5]:0x", cec_msg.buf[cec_msg.rx_read_pos].msg[5]);
@@ -467,6 +467,26 @@ void cec_routing_change(void)
}
}
+static void cec_routing_information(void)
+{
+ unsigned char phy_addr_ab = (readl(P_AO_DEBUG_REG1) >> 8) & 0xff;
+ unsigned char phy_addr_cd = readl(P_AO_DEBUG_REG1) & 0xff;
+ cec_dbg_print("0x81, phy_addr_ab:0x", phy_addr_ab);
+ cec_dbg_print(", phy_addr_cd:0x", phy_addr_cd);
+ cec_dbg_print(", msg[2]:0x", cec_msg.buf[cec_msg.rx_read_pos].msg[2]);
+ cec_dbg_print(", msg[3]:0x", cec_msg.buf[cec_msg.rx_read_pos].msg[3]);
+ cec_dbg_prints("\n");
+
+ if ((hdmi_cec_func_config >> CEC_FUNC_MASK) & 0x1) {
+ if ((hdmi_cec_func_config >> STREAMPATH_POWER_ON_MASK) & 0x1) {
+ /* wake up if routing destination is self */
+ if ((phy_addr_ab == cec_msg.buf[cec_msg.rx_read_pos].msg[2]) &&
+ (phy_addr_cd == cec_msg.buf[cec_msg.rx_read_pos].msg[3]))
+ cec_msg.cec_power = 0x1;
+ }
+ }
+}
+
static void cec_device_vendor_id(void)
{
unsigned char msg[5];
@@ -591,6 +611,9 @@ static unsigned int cec_handle_message(void)
case CEC_OC_ROUTING_CHANGE:
cec_routing_change();
break;
+ case CEC_OC_ROUTING_INFORMATION:
+ cec_routing_information();
+ break;
case CEC_OC_GIVE_DEVICE_POWER_STATUS:
cec_report_device_power_status(source);
break;