Attention is currently required from: Hope Wang, Hung-Te Lin, Yidi Lin, Yu-Ping Wu.
Hello Hope Wang,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/85892?usp=email
to review the following change.
Change subject: soc/mediatek/mt8196: Add mt6363_read8 API ......................................................................
soc/mediatek/mt8196: Add mt6363_read8 API
Add mt6363_read8 API for common use.
Change-Id: I3cca4c2e5f6c2537c9661623260b21fb6088eff9 Signed-off-by: Hope Wang hope.wang@mediatek.corp-partner.google.com --- M src/soc/mediatek/common/include/soc/mt6363.h M src/soc/mediatek/common/mt6363.c 2 files changed, 11 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/92/85892/1
diff --git a/src/soc/mediatek/common/include/soc/mt6363.h b/src/soc/mediatek/common/include/soc/mt6363.h index 19b23d4..7b2ac3a 100644 --- a/src/soc/mediatek/common/include/soc/mt6363.h +++ b/src/soc/mediatek/common/include/soc/mt6363.h @@ -109,6 +109,7 @@ void mt6363_enable_vram_mdfe(bool enable); void mt6363_init_pmif_arb(void); u32 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); diff --git a/src/soc/mediatek/common/mt6363.c b/src/soc/mediatek/common/mt6363.c index 691282b..ddfe6a5 100644 --- a/src/soc/mediatek/common/mt6363.c +++ b/src/soc/mediatek/common/mt6363.c @@ -34,6 +34,16 @@ 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);