mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: imx6: properly check for IPU presence
@ 2020-01-24 17:46 Lucas Stach
  2020-01-27 13:01 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Lucas Stach @ 2020-01-24 17:46 UTC (permalink / raw)
  To: barebox

Since a73850bd76d0 (ARM: imx: disable IPU QoS setup for correct SoCs), which
fixed the condition to not execute the IPU QoS fixups on SoCs that don't have
a IPU, the fixups aren't applied on i.MX6Q/DP anymore, since those SoCs were
missing from the whitelist.

Add a function to make it a bit more clearer what we are checking here and add
the Q/DP SoCs.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 arch/arm/mach-imx/imx6.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-imx/imx6.c b/arch/arm/mach-imx/imx6.c
index 41e0066add09..e1c821456878 100644
--- a/arch/arm/mach-imx/imx6.c
+++ b/arch/arm/mach-imx/imx6.c
@@ -114,14 +114,23 @@ static void imx6_init_lowlevel(void)
 	}
 }
 
+static bool imx6_has_ipu(void)
+{
+	if (cpu_mx6_is_mx6qp() || cpu_mx6_is_mx6dp() ||
+	    cpu_mx6_is_mx6q() || cpu_mx6_is_mx6d() ||
+	    cpu_mx6_is_mx6dl() || cpu_mx6_is_mx6s())
+		return true;
+
+	return false;
+}
+
 static void imx6_setup_ipu_qos(void)
 {
 	void __iomem *iomux = (void *)MX6_IOMUXC_BASE_ADDR;
 	void __iomem *fast2 = (void *)MX6_FAST2_BASE_ADDR;
 	uint32_t val;
 
-	if (!cpu_mx6_is_mx6q() && !cpu_mx6_is_mx6d() &&
-	    !cpu_mx6_is_mx6dl() && !cpu_mx6_is_mx6s())
+	if (!imx6_has_ipu())
 		return;
 
 	val = readl(iomux + IOMUXC_GPR4);
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] ARM: imx6: properly check for IPU presence
  2020-01-24 17:46 [PATCH] ARM: imx6: properly check for IPU presence Lucas Stach
@ 2020-01-27 13:01 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2020-01-27 13:01 UTC (permalink / raw)
  To: Lucas Stach; +Cc: barebox

On Fri, Jan 24, 2020 at 06:46:48PM +0100, Lucas Stach wrote:
> Since a73850bd76d0 (ARM: imx: disable IPU QoS setup for correct SoCs), which
> fixed the condition to not execute the IPU QoS fixups on SoCs that don't have
> a IPU, the fixups aren't applied on i.MX6Q/DP anymore, since those SoCs were
> missing from the whitelist.
> 
> Add a function to make it a bit more clearer what we are checking here and add
> the Q/DP SoCs.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  arch/arm/mach-imx/imx6.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2020-01-27 13:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-24 17:46 [PATCH] ARM: imx6: properly check for IPU presence Lucas Stach
2020-01-27 13:01 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox