soc/mediatek/mt8196: Add mt6363_read8 API
Add mt6363_read8 API for common use. BUG=b:317009620 TEST=Build pass. Change-Id: I3cca4c2e5f6c2537c9661623260b21fb6088eff9 Signed-off-by: Hope Wang <hope.wang@mediatek.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/85892 Reviewed-by: Yidi Lin <yidilin@google.com> Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
f2caaf3e7f
commit
1920c0cca9
2 changed files with 11 additions and 0 deletions
|
|
@ -109,6 +109,7 @@ void mt6363_enable_vram_digrf(bool enable);
|
|||
void mt6363_enable_vram_mdfe(bool enable);
|
||||
void mt6363_init_pmif_arb(void);
|
||||
u16 mt6363_read16(u32 reg);
|
||||
u8 mt6363_read8(u32 reg);
|
||||
void mt6363_write8(u32 reg, u8 reg_val);
|
||||
void mt6363_write_field(u32 reg, u32 val, u32 mask, u32 shift);
|
||||
void mt6363_init_setting(void);
|
||||
|
|
|
|||
|
|
@ -34,6 +34,16 @@ u16 mt6363_read16(u32 reg)
|
|||
return rdata;
|
||||
}
|
||||
|
||||
u8 mt6363_read8(u32 reg)
|
||||
{
|
||||
u32 rdata = 0;
|
||||
|
||||
assert(pmif_arb);
|
||||
pmif_arb->read(pmif_arb, SPMI_SLAVE_4, reg, &rdata);
|
||||
|
||||
return (u8)rdata;
|
||||
}
|
||||
|
||||
void mt6363_write8(u32 reg, u8 data)
|
||||
{
|
||||
assert(pmif_arb);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue