Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/58074 )
Change subject: soc/mediatek: add debug dump for ltiming and clock_div ......................................................................
soc/mediatek: add debug dump for ltiming and clock_div
ltiming and clock_div are not support for MT8173, so we separate them to weak function: mtk_i2c_dump_more_info()
Signed-off-by: Rex-BC Chen rex-bc.chen@mediatek.com Change-Id: I3228c6953be5fac18a76029702b878a34c7563f7 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58074 Reviewed-by: Rex-BC Chen rex-bc.chen@mediatek.corp-partner.google.com Reviewed-by: Yu-Ping Wu yupingso@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/mediatek/mt8183/i2c.c M src/soc/mediatek/mt8192/i2c.c M src/soc/mediatek/mt8195/i2c.c 3 files changed, 21 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Yu-Ping Wu: Looks good to me, approved Rex-BC Chen: Looks good to me, but someone else must approve
diff --git a/src/soc/mediatek/mt8183/i2c.c b/src/soc/mediatek/mt8183/i2c.c index ec9b797..3e53a72 100644 --- a/src/soc/mediatek/mt8183/i2c.c +++ b/src/soc/mediatek/mt8183/i2c.c @@ -135,3 +135,10 @@ mtk_i2c_speed_init(bus); mtk_i2c_set_gpio_pinmux(bus); } + +void mtk_i2c_dump_more_info(struct mt_i2c_regs *regs) +{ + printk(BIOS_DEBUG, "LTIMING %x\nCLK_DIV %x\n", + read32(®s->ltiming), + read32(®s->clock_div)); +} diff --git a/src/soc/mediatek/mt8192/i2c.c b/src/soc/mediatek/mt8192/i2c.c index 572c280..a76b039 100644 --- a/src/soc/mediatek/mt8192/i2c.c +++ b/src/soc/mediatek/mt8192/i2c.c @@ -181,3 +181,10 @@ mtk_i2c_speed_init(bus); mtk_i2c_set_gpio_pinmux(bus); } + +void mtk_i2c_dump_more_info(struct mt_i2c_regs *regs) +{ + printk(BIOS_DEBUG, "LTIMING %x\nCLK_DIV %x\n", + read32(®s->ltiming), + read32(®s->clock_div)); +} diff --git a/src/soc/mediatek/mt8195/i2c.c b/src/soc/mediatek/mt8195/i2c.c index 960eb12..1a10eef 100644 --- a/src/soc/mediatek/mt8195/i2c.c +++ b/src/soc/mediatek/mt8195/i2c.c @@ -355,3 +355,10 @@ mtk_i2c_speed_init(bus, speed); mtk_i2c_set_gpio_pinmux(bus); } + +void mtk_i2c_dump_more_info(struct mt_i2c_regs *regs) +{ + printk(BIOS_DEBUG, "LTIMING %x\nCLK_DIV %x\n", + read32(®s->ltiming), + read32(®s->clock_div)); +}