Message ID | 20250319014240.592189-1-aford173@gmail.com |
---|---|
State | Superseded |
Delegated to: | Fabio Estevam |
Headers | show |
Series | [1/4] cpu: imx8_cpu: Print Speed grade if IMX_THERMAL or IMX_TMU | expand |
On 3/19/25 2:42 AM, Adam Ford wrote: > Much of the data that is display by imx8_cpu.c is also > displayed from arch/arm/mach-imx/cpu.c, except the > speed grade and temperature unless the SoC is an i.MX9. > Expand this to include checks for IMX_THERMAL or IMX_TMU > in the same way it's done for mach-imx/cpu.c. > > Before: > CPU: NXP i.MX8MP Rev1.1 A53 at 1200 MHz > Model: Beacon EmbeddedWorks i.MX8MPlus Development kit > > After: > CPU: NXP i.MX8MP Rev1.1 A53 at 1200 MHz > CPU: Industrial temperature grade (-40C to 105C) at 28C > Model: Beacon EmbeddedWorks i.MX8MPlus Development kit > > Signed-off-by: Adam Ford <aford173@gmail.com> > > diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c > index 53d31b3c0bf..facd561022f 100644 > --- a/drivers/cpu/imx8_cpu.c > +++ b/drivers/cpu/imx8_cpu.c > @@ -177,7 +177,9 @@ static int cpu_imx_get_desc(const struct udevice *dev, char *buf, int size) > ret = snprintf(buf, size, "NXP i.MX%s Rev%s %s at %u MHz", > plat->type, plat->rev, plat->name, plat->freq_mhz); > > - if (IS_ENABLED(CONFIG_IMX9)) { > + if (IS_ENABLED(CONFIG_IMX9) || > + IS_ENABLED(CONFIG_IMX_THERMAL) || > + IS_ENABLED(CONFIG_IMX_TMU)) { Can CONFIG_IMX9 instead select CONFIG_IMX_THERMAL or CONFIG_IMX_TMU , so the SoC specific check could be removed from here ?
On Tue, Mar 18, 2025 at 9:13 PM Marek Vasut <marek.vasut@mailbox.org> wrote: > > On 3/19/25 2:42 AM, Adam Ford wrote: > > Much of the data that is display by imx8_cpu.c is also > > displayed from arch/arm/mach-imx/cpu.c, except the > > speed grade and temperature unless the SoC is an i.MX9. > > Expand this to include checks for IMX_THERMAL or IMX_TMU > > in the same way it's done for mach-imx/cpu.c. > > > > Before: > > CPU: NXP i.MX8MP Rev1.1 A53 at 1200 MHz > > Model: Beacon EmbeddedWorks i.MX8MPlus Development kit > > > > After: > > CPU: NXP i.MX8MP Rev1.1 A53 at 1200 MHz > > CPU: Industrial temperature grade (-40C to 105C) at 28C > > Model: Beacon EmbeddedWorks i.MX8MPlus Development kit > > > > Signed-off-by: Adam Ford <aford173@gmail.com> > > > > diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c > > index 53d31b3c0bf..facd561022f 100644 > > --- a/drivers/cpu/imx8_cpu.c > > +++ b/drivers/cpu/imx8_cpu.c > > @@ -177,7 +177,9 @@ static int cpu_imx_get_desc(const struct udevice *dev, char *buf, int size) > > ret = snprintf(buf, size, "NXP i.MX%s Rev%s %s at %u MHz", > > plat->type, plat->rev, plat->name, plat->freq_mhz); > > > > - if (IS_ENABLED(CONFIG_IMX9)) { > > + if (IS_ENABLED(CONFIG_IMX9) || > > + IS_ENABLED(CONFIG_IMX_THERMAL) || > > + IS_ENABLED(CONFIG_IMX_TMU)) { > > Can CONFIG_IMX9 instead select CONFIG_IMX_THERMAL or CONFIG_IMX_TMU , so > the SoC specific check could be removed from here ? Any idea which of IMX_THERMAL or IMX_TMU should be selected or implied? I don't have an IMX9 to test. adam
On 3/19/25 8:13 PM, Adam Ford wrote: > On Tue, Mar 18, 2025 at 9:13 PM Marek Vasut <marek.vasut@mailbox.org> wrote: >> >> On 3/19/25 2:42 AM, Adam Ford wrote: >>> Much of the data that is display by imx8_cpu.c is also >>> displayed from arch/arm/mach-imx/cpu.c, except the >>> speed grade and temperature unless the SoC is an i.MX9. >>> Expand this to include checks for IMX_THERMAL or IMX_TMU >>> in the same way it's done for mach-imx/cpu.c. >>> >>> Before: >>> CPU: NXP i.MX8MP Rev1.1 A53 at 1200 MHz >>> Model: Beacon EmbeddedWorks i.MX8MPlus Development kit >>> >>> After: >>> CPU: NXP i.MX8MP Rev1.1 A53 at 1200 MHz >>> CPU: Industrial temperature grade (-40C to 105C) at 28C >>> Model: Beacon EmbeddedWorks i.MX8MPlus Development kit >>> >>> Signed-off-by: Adam Ford <aford173@gmail.com> >>> >>> diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c >>> index 53d31b3c0bf..facd561022f 100644 >>> --- a/drivers/cpu/imx8_cpu.c >>> +++ b/drivers/cpu/imx8_cpu.c >>> @@ -177,7 +177,9 @@ static int cpu_imx_get_desc(const struct udevice *dev, char *buf, int size) >>> ret = snprintf(buf, size, "NXP i.MX%s Rev%s %s at %u MHz", >>> plat->type, plat->rev, plat->name, plat->freq_mhz); >>> >>> - if (IS_ENABLED(CONFIG_IMX9)) { >>> + if (IS_ENABLED(CONFIG_IMX9) || >>> + IS_ENABLED(CONFIG_IMX_THERMAL) || >>> + IS_ENABLED(CONFIG_IMX_TMU)) { >> >> Can CONFIG_IMX9 instead select CONFIG_IMX_THERMAL or CONFIG_IMX_TMU , so >> the SoC specific check could be removed from here ? > > Any idea which of IMX_THERMAL or IMX_TMU should be selected or > implied? I don't have an IMX9 to test. git grep says: drivers/thermal/imx_tmu.c: { .compatible = "fsl,imx93-tmu", .data = FLAGS_VER4, },
diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c index 53d31b3c0bf..facd561022f 100644 --- a/drivers/cpu/imx8_cpu.c +++ b/drivers/cpu/imx8_cpu.c @@ -177,7 +177,9 @@ static int cpu_imx_get_desc(const struct udevice *dev, char *buf, int size) ret = snprintf(buf, size, "NXP i.MX%s Rev%s %s at %u MHz", plat->type, plat->rev, plat->name, plat->freq_mhz); - if (IS_ENABLED(CONFIG_IMX9)) { + if (IS_ENABLED(CONFIG_IMX9) || + IS_ENABLED(CONFIG_IMX_THERMAL) || + IS_ENABLED(CONFIG_IMX_TMU)) { switch (get_cpu_temp_grade(&minc, &maxc)) { case TEMP_AUTOMOTIVE: grade = "Automotive temperature grade ";
Much of the data that is display by imx8_cpu.c is also displayed from arch/arm/mach-imx/cpu.c, except the speed grade and temperature unless the SoC is an i.MX9. Expand this to include checks for IMX_THERMAL or IMX_TMU in the same way it's done for mach-imx/cpu.c. Before: CPU: NXP i.MX8MP Rev1.1 A53 at 1200 MHz Model: Beacon EmbeddedWorks i.MX8MPlus Development kit After: CPU: NXP i.MX8MP Rev1.1 A53 at 1200 MHz CPU: Industrial temperature grade (-40C to 105C) at 28C Model: Beacon EmbeddedWorks i.MX8MPlus Development kit Signed-off-by: Adam Ford <aford173@gmail.com>