All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] cpu: imx8: fix type and rate detection
@ 2020-05-16 20:34 Anatolij Gustschin
  2020-05-16 20:34 ` [PATCH 2/2] thermal: imx_scu_thermal: fix getting DT alert property value Anatolij Gustschin
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Anatolij Gustschin @ 2020-05-16 20:34 UTC (permalink / raw)
  To: u-boot

CPU type and rate detection is broken, for A35 cpu we get A53:
...
sc_pm_get_clock_rate: resource:0 clk:2: res:3
Could not read CPU frequency: -22
CPU:   NXP i.MX8QXP RevB A53 at 0 MHz at 47C

Fixes: 55bc96f3b675 ("cpu: imx8: fix get core name and rate")
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
 drivers/cpu/imx8_cpu.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c
index 95c14c98d8..896e1ac776 100644
--- a/drivers/cpu/imx8_cpu.c
+++ b/drivers/cpu/imx8_cpu.c
@@ -52,11 +52,11 @@ const char *get_imx8_rev(u32 rev)
 
 const char *get_core_name(struct udevice *dev)
 {
-	if (!device_is_compatible(dev, "arm,cortex-a35"))
+	if (device_is_compatible(dev, "arm,cortex-a35"))
 		return "A35";
-	else if (!device_is_compatible(dev, "arm,cortex-a53"))
+	else if (device_is_compatible(dev, "arm,cortex-a53"))
 		return "A53";
-	else if (!device_is_compatible(dev, "arm,cortex-a72"))
+	else if (device_is_compatible(dev, "arm,cortex-a72"))
 		return "A72";
 	else
 		return "?";
@@ -183,11 +183,11 @@ static ulong imx8_get_cpu_rate(struct udevice *dev)
 	ulong rate;
 	int ret, type;
 
-	if (!device_is_compatible(dev, "arm,cortex-a35"))
+	if (device_is_compatible(dev, "arm,cortex-a35"))
 		type = SC_R_A35;
-	else if (!device_is_compatible(dev, "arm,cortex-a53"))
+	else if (device_is_compatible(dev, "arm,cortex-a53"))
 		type = SC_R_A53;
-	else if (!device_is_compatible(dev, "arm,cortex-a72"))
+	else if (device_is_compatible(dev, "arm,cortex-a72"))
 		type = SC_R_A72;
 	else
 		return 0;
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-05-22 21:14 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-16 20:34 [PATCH 1/2] cpu: imx8: fix type and rate detection Anatolij Gustschin
2020-05-16 20:34 ` [PATCH 2/2] thermal: imx_scu_thermal: fix getting DT alert property value Anatolij Gustschin
2020-05-17 10:04   ` Peng Fan
2020-05-17 11:18     ` Anatolij Gustschin
2020-05-17 14:43       ` Peng Fan
2020-05-17 14:53         ` Anatolij Gustschin
2020-05-19  9:35           ` Anatolij Gustschin
2020-05-19 10:05             ` Peng Fan
2020-05-19 10:26               ` Anatolij Gustschin
2020-05-19 11:45                 ` Peng Fan
2020-05-19 22:05                   ` Anatolij Gustschin
2020-05-19 23:37                     ` Anatolij Gustschin
2020-05-18 23:32       ` Fabio Estevam
2020-05-19  4:17         ` Heiko Schocher
2020-05-19  8:47           ` Anatolij Gustschin
2020-05-19 11:57           ` Fabio Estevam
2020-05-19  8:19         ` Anatolij Gustschin
2020-05-19 23:31   ` [PATCH] cpu: imx8: use intended cpu-thermal device when getting temp value Anatolij Gustschin
2020-05-20  2:17     ` Peng Fan
2020-05-22 21:14     ` Anatolij Gustschin
2020-05-17 10:02 ` [PATCH 1/2] cpu: imx8: fix type and rate detection Peng Fan
2020-05-22 21:13 ` Anatolij Gustschin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.