ec/google/chromeec: Provide EC access for Retimer firmware upgrade

coreboot needs to access EC RFWU entry in order to suspend and resume PD
and modes setting. This change adds ec_retimer_fw_update implementation
for retimer firmware upgrade.

BUG=b:186521258
TEST=Build image successfully.

Signed-off-by: John Zhao <john.zhao@intel.com>
Change-Id: Ib937d8bd72fc39487854773573b435bf2add672a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52713
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
John Zhao 2021-04-27 11:19:41 -07:00 committed by Tim Wawrzynczak
parent 7e982b1dd9
commit 8bb83a3456
1 changed files with 13 additions and 0 deletions

View File

@ -241,3 +241,16 @@ const char *ec_retimer_fw_update_path(void)
{
return "\\_SB_.PCI0.LPCB.EC0_.RFWU";
}
void ec_retimer_fw_update(uint8_t data)
{
const char *RFWU = ec_retimer_fw_update_path();
/*
* Write the EC RAM for Retimer Upgrade
* RFWU = data
*/
acpigen_write_store();
acpigen_write_byte(data);
acpigen_emit_namestring(RFWU);
}