soc/mediatek/common: Fix wrong write API for protect_key_setting
Fix the issue where the DUT cannot power on during S5. When writing key_protect_setting to PMIC, PMIC expects receiving 1 byte per write. PMIC would receive unexpected zero byte if using mt6363_write16. Fix the write operation by using mt6363_write8. TEST=Build pass, DUT can power on during S5. BUG=b:388666377 Change-Id: I0a7c0d2fa1f93a55731b4b58923d6f80a4c4be89 Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/86034 Reviewed-by: Yidi Lin <yidilin@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
parent
0dbef76544
commit
b9a1e64538
1 changed files with 1 additions and 7 deletions
|
|
@ -50,12 +50,6 @@ void mt6363_write8(u32 reg, u8 data)
|
|||
pmif_arb->write(pmif_arb, SPMI_SLAVE_4, reg, data);
|
||||
}
|
||||
|
||||
static void mt6363_write16(u32 reg, u16 data)
|
||||
{
|
||||
assert(pmif_arb);
|
||||
pmif_arb->write16(pmif_arb, SPMI_SLAVE_4, reg, data);
|
||||
}
|
||||
|
||||
static u32 mt6363_read_field(u32 reg, u32 mask, u32 shift)
|
||||
{
|
||||
assert(pmif_arb);
|
||||
|
|
@ -101,7 +95,7 @@ static void pmic_protect_key_setting(bool lock)
|
|||
|
||||
for (int i = 0; i < ARRAY_SIZE(key_protect_setting); i++) {
|
||||
entry = &key_protect_setting[i];
|
||||
mt6363_write16(entry->addr, lock ? 0 : entry->val);
|
||||
mt6363_write8(entry->addr, lock ? 0 : entry->val);
|
||||
}
|
||||
printk(BIOS_INFO, "%s done\n", __func__);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue