mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Roland Hieber <r.hieber@pengutronix.de>,
	Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master 2/2] ARM: omap: fix cpu_is_omap on CONFIG_ARM_MULTIARCH configurations
Date: Tue, 20 May 2025 14:17:38 +0200	[thread overview]
Message-ID: <20250520121738.42686-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20250520121738.42686-1-a.fatoum@pengutronix.de>

Normally, <mach/omap/generic.h> would only be included if we are running
on some OMAP SoC. This doesn't hold true anymore with CONFIG_ARM_MULTIARCH
or CONFIG_BOARD_ARM_GENERIC_DT, because we could have CONFIG_ARCH_AM33XX
enabled, but running on some other SoC, which the header doesn't know about.

This cpu_type scheme is only used on one other SoC and that's the i.MX
and there, there is a final #ifdef clause to fix this, so follow suit.

Reported-by: Roland Hieber <r.hieber@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 include/mach/omap/generic.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/mach/omap/generic.h b/include/mach/omap/generic.h
index 2961c530bc93..9802087bf295 100644
--- a/include/mach/omap/generic.h
+++ b/include/mach/omap/generic.h
@@ -56,6 +56,15 @@ extern unsigned int __omap_cpu_type;
 # define cpu_is_am33xx()	(0)
 #endif
 
+#if defined(CONFIG_ARCH_MULTIARCH) || defined(CONFIG_BOARD_ARM_GENERIC_DT)
+# ifdef omap_cpu_type
+#  undef omap_cpu_type
+#  define omap_cpu_type __omap_cpu_type
+# else
+#  define omap_cpu_type 0
+# endif
+#endif
+
 #ifdef omap_cpu_type
 #define cpu_is_omap()			(omap_cpu_type > 0)
 #else
-- 
2.39.5




  reply	other threads:[~2025-05-20 12:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-20 12:17 [PATCH master 1/2] ARM: i.MX: fix cpu_is_imx " Ahmad Fatoum
2025-05-20 12:17 ` Ahmad Fatoum [this message]
2025-05-20 12:29   ` [PATCH master 2/2] ARM: omap: fix cpu_is_omap " Roland Hieber
2025-05-20 12:28 ` [PATCH master 1/2] ARM: i.MX: fix cpu_is_imx " Roland Hieber
2025-05-21  7:35 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250520121738.42686-2-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=r.hieber@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox