]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
thermal: imx_tmu: support TMU arch level initialization
authorPeng Fan <peng.fan@nxp.com>
Sun, 3 May 2020 14:19:48 +0000 (22:19 +0800)
committerStefano Babic <sbabic@denx.de>
Sun, 10 May 2020 18:55:20 +0000 (20:55 +0200)
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@nxp.com>
drivers/thermal/imx_tmu.c

index df0b35b7ba3e0f3279834ed3acdb48d766c7fefc..049f32c39eaed7418e61f85f7fff1cfdbd9b21ca 100644 (file)
@@ -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)