From f38daf612e9bd788791191dfd17940d757d303fa Mon Sep 17 00:00:00 2001 From: Mary Ruthven Date: Thu, 1 Apr 2021 07:40:30 +1100 Subject: add 'atboot' arg to rddkeepalive Add 'atboot' arg to rddkeepalive that can be used to store rddkeepalive across cr50 resets. The atboot flag gets cleared with rddkeepalive disable. BUG=b:144724216 TEST=manual # Verify 'rddkeepalive disable' is unchanged rddkeepalive disable Using actual Rdd state rddkeepalive Rdd: connected # Verify 'rddkeepalive enable' is unchanged rddkeepalive enable Forcing Rdd detect keepalive rddkeepalive Rdd: keepalive # Verify 'rddkeepalive disable' disables keepalive rddkeepalive disable Using actual Rdd state rddkeepalive Rdd: connected ccd ... Flags: 0x000000 # Verify 'rddkeepalive enable atboot' enables keepalive and sets # the atboot flag. rddkeepalive enable atboot Forcing Rdd detect keepalive atboot. rddkeepalive Rdd: keepalive (atboot) # check the ccd rddkeepalive atboot flag (0x80000) ccd ... Flags: 0x080000 reboot ... rddkeepalive Rdd: keepalive (atboot) ccd ... Flags: 0x080000 # Verify this new string doesn't break dut-control dut-control cr50.ccd_keepalive_en ccd_keepalive_en:on # 'rddkeepalive enable' doesn't touch the atboot flag rddkeepalive enable Forcing Rdd detect keepalive rddkeepalive Rdd: keepalive (atboot) # 'rddkeepalive disable' clears it. rddkeepalive disable Using actual Rdd state rddkeepalive Rdd: connected Change-Id: I10227e335a5de6ed73290ff5be2e65892913de35 Signed-off-by: Mary Ruthven Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2799441 Reviewed-by: Namyoon Woo --- include/ccd_config.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/ccd_config.h b/include/ccd_config.h index a3d4410244..60abe472e9 100644 --- a/include/ccd_config.h +++ b/include/ccd_config.h @@ -54,6 +54,9 @@ enum ccd_flag { * in ccd_config.c. */ + /* Enable Rddkeepalive at boot */ + CCD_FLAG_RDDKEEPALIVE_AT_BOOT = BIT(19), + /* Override BATT_PRES_L at boot */ CCD_FLAG_OVERRIDE_BATT_AT_BOOT = BIT(20), -- cgit v1.2.1