summaryrefslogtreecommitdiff
path: root/src/soc/mediatek
diff options
context:
space:
mode:
authorRex-BC Chen <rex-bc.chen@mediatek.corp-partner.google.com>2021-10-01 14:39:39 +0800
committerFelix Held <felix-coreboot@felixheld.de>2021-10-02 11:50:22 +0000
commitf4d6e9085d59513b2dccf95138415661a1f7a75a (patch)
treee830973c54bf4458c6cbc9de025a302dffa9dcff /src/soc/mediatek
parentf4b71734b266b5cf276e7bd3b0de45553a0728bd (diff)
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>
Diffstat (limited to 'src/soc/mediatek')
-rw-r--r--src/soc/mediatek/mt8183/i2c.c7
-rw-r--r--src/soc/mediatek/mt8192/i2c.c7
-rw-r--r--src/soc/mediatek/mt8195/i2c.c7
3 files changed, 21 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8183/i2c.c b/src/soc/mediatek/mt8183/i2c.c
index ec9b797934..3e53a72c5e 100644
--- a/src/soc/mediatek/mt8183/i2c.c
+++ b/src/soc/mediatek/mt8183/i2c.c
@@ -135,3 +135,10 @@ void mtk_i2c_bus_init(uint8_t bus)
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(&regs->ltiming),
+ read32(&regs->clock_div));
+}
diff --git a/src/soc/mediatek/mt8192/i2c.c b/src/soc/mediatek/mt8192/i2c.c
index 572c2808d2..a76b0394c7 100644
--- a/src/soc/mediatek/mt8192/i2c.c
+++ b/src/soc/mediatek/mt8192/i2c.c
@@ -181,3 +181,10 @@ void mtk_i2c_bus_init(uint8_t bus)
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(&regs->ltiming),
+ read32(&regs->clock_div));
+}
diff --git a/src/soc/mediatek/mt8195/i2c.c b/src/soc/mediatek/mt8195/i2c.c
index 960eb12a69..1a10eefe49 100644
--- a/src/soc/mediatek/mt8195/i2c.c
+++ b/src/soc/mediatek/mt8195/i2c.c
@@ -355,3 +355,10 @@ void mtk_i2c_bus_init(uint8_t bus, uint32_t speed)
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(&regs->ltiming),
+ read32(&regs->clock_div));
+}