soc/mediatek/common: Fix wrong write API for protect_key_setting
When writing key_protect_setting to PMIC, PMIC expects receiving 1 byte per write. PMIC would receive unexpected zero byte if using mt6685_write16. Fix the write operation by using mt6685_write8. TEST=Build pass. BUG=b:388666377 Signed-off-by: Lu Tang <lu.tang@mediatek.corp-partner.google.com> Change-Id: Ib6e79642e813e7a1f0d38243e9c4db5a699cc9e3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/86035 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Reviewed-by: Yidi Lin <yidilin@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
b9a1e64538
commit
3eb39a1a33
1 changed files with 2 additions and 2 deletions
|
|
@ -74,8 +74,8 @@ static const struct mt6685_key_setting key_protect_setting[] = {
|
|||
static void mt6685_unlock(bool unlock)
|
||||
{
|
||||
for (int i = 0; i < ARRAY_SIZE(key_protect_setting); i++)
|
||||
mt6685_write16(key_protect_setting[i].addr,
|
||||
unlock ? key_protect_setting[i].val : 0);
|
||||
mt6685_write8(key_protect_setting[i].addr,
|
||||
unlock ? key_protect_setting[i].val : 0);
|
||||
}
|
||||
|
||||
void mt6685_init_pmif_arb(void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue