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>
This commit is contained in:
Rex-BC Chen 2021-10-01 14:39:39 +08:00 committed by Felix Held
parent f4b71734b2
commit f4d6e9085d
3 changed files with 21 additions and 0 deletions

View File

@ -135,3 +135,10 @@ void mtk_i2c_bus_init(uint8_t bus)
mtk_i2c_speed_init(bus); mtk_i2c_speed_init(bus);
mtk_i2c_set_gpio_pinmux(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(&regs->ltiming),
read32(&regs->clock_div));
}

View File

@ -181,3 +181,10 @@ void mtk_i2c_bus_init(uint8_t bus)
mtk_i2c_speed_init(bus); mtk_i2c_speed_init(bus);
mtk_i2c_set_gpio_pinmux(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(&regs->ltiming),
read32(&regs->clock_div));
}

View File

@ -355,3 +355,10 @@ void mtk_i2c_bus_init(uint8_t bus, uint32_t speed)
mtk_i2c_speed_init(bus, speed); mtk_i2c_speed_init(bus, speed);
mtk_i2c_set_gpio_pinmux(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(&regs->ltiming),
read32(&regs->clock_div));
}