Skip to content

Commit 65a2613

Browse files
yliu80lijinxia
authored andcommitted
IOC mediator: fix wakeup reason issue when UOS resuming
IOC mediator should keep sending acnrd boot reason until received UOS heartbeat init message, then turn to send SOS wakeup reason through read native cbc lifecycle cdev. Tracked-On: #1727 Signed-off-by: Yuan Liu <yuan1.liu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
1 parent a2516ec commit 65a2613

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

devicemodel/hw/platform/ioc_cbc.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -652,14 +652,14 @@ cbc_process_wakeup_reason(struct cbc_pkt *pkt)
652652
/* Unset RTC bit if UOS sends active heartbeat */
653653
reason &= ~CBC_WK_RSN_RTC;
654654
} else {
655-
reason &= ~CBC_WK_RSN_SOC;
656-
657655
/*
658-
* Set RTC bit when bootup or resuming reason is
659-
* RTC wakeup reason, and hold the bit until UOS
660-
* sends active heartbeat.
656+
* If UOS is inactive, indicate the acrnd boot reason
657+
* as UOS periodic wakeup reason.
661658
*/
662-
reason |= pkt->ioc->boot_reason & CBC_WK_RSN_RTC;
659+
reason = pkt->ioc->boot_reason;
660+
661+
/* Unset SoC bit */
662+
reason &= ~CBC_WK_RSN_SOC;
663663
}
664664

665665
/* Update periodic wakeup reason */
@@ -949,7 +949,8 @@ cbc_tx_handler(struct cbc_pkt *pkt)
949949
/* Heartbeat init also indicates UOS enter active state */
950950
pkt->uos_active = true;
951951
} else if (pkt->req->rtype == CBC_REQ_T_UOS_ACTIVE) {
952-
cbc_update_wakeup_reason(pkt, pkt->reason | CBC_WK_RSN_SOC);
952+
cbc_update_wakeup_reason(pkt, pkt->ioc->boot_reason |
953+
CBC_WK_RSN_SOC);
953954
cbc_send_pkt(pkt);
954955

955956
/* Enable UOS active flag */

0 commit comments

Comments
 (0)