diff mbox series

[04/13] thermal: imx_tmu: support TMU arch level initialization

Message ID 20200503141957.14635-5-peng.fan@nxp.com
State Accepted
Commit 84897408c688e3d3962e8cd7e92f3ad99c17005d
Headers show
Series imx: tmu support and scu thermal update | expand

Commit Message

Peng Fan May 3, 2020, 2:19 p.m. UTC
i.MX8MM TMU needs to load some registers from fuse, this is arch
dependent operation and may vary on different platforms. So add
a interface for arch level initialization.

Signed-off-by: Peng Fan <peng.fan at nxp.com>
---
 drivers/thermal/imx_tmu.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Stefano Babic May 11, 2020, 10:18 a.m. UTC | #1
> i.MX8MM TMU needs to load some registers from fuse, this is arch
> dependent operation and may vary on different platforms. So add
> a interface for arch level initialization.
> Signed-off-by: Peng Fan <peng.fan at nxp.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/drivers/thermal/imx_tmu.c b/drivers/thermal/imx_tmu.c
index df0b35b7ba..049f32c39e 100644
--- a/drivers/thermal/imx_tmu.c
+++ b/drivers/thermal/imx_tmu.c
@@ -187,6 +187,10 @@  static int imx_tmu_calibration(struct udevice *dev)
 	return 0;
 }
 
+void __weak imx_tmu_arch_init(void *reg_base)
+{
+}
+
 static void imx_tmu_init(struct udevice *dev)
 {
 	struct imx_tmu_plat *pdata = dev_get_platdata(dev);
@@ -210,6 +214,8 @@  static void imx_tmu_init(struct udevice *dev)
 		/* Set update_interval */
 		writel(TMTMIR_DEFAULT, &pdata->regs->regs_v1.tmtmir);
 	}
+
+	imx_tmu_arch_init((void *)pdata->regs);
 }
 
 static int imx_tmu_enable_msite(struct udevice *dev)