From: Tony Lindgren <tony@atomide.com>
To: linux-omap@vger.kernel.org
Cc: nm@ti.com
Subject: [PATCH 5/5] omap: Allow testing for omap type with omap_has_feature
Date: Thu, 08 Jul 2010 12:38:04 +0300 [thread overview]
Message-ID: <20100708093804.16352.82935.stgit@baageli.muru.com> (raw)
In-Reply-To: <20100708093405.16352.11814.stgit@baageli.muru.com>
Allow testing for omap type with omap_has_feature. This
can be used to leave out cpu_is_omapxxxx checks.
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/include/plat/cpu.h | 38 ++++++++++++++++++++++++++-------
1 files changed, 30 insertions(+), 8 deletions(-)
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 96eac4d..c117c3c 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -437,14 +437,36 @@ int omap_chip_is(struct omap_chip_id oci);
void omap2_check_revision(void);
/*
- * Runtime detection of OMAP3 features
+ * Runtime detection of OMAP features
*/
-#define OMAP3_HAS_L2CACHE BIT(0)
-#define OMAP3_HAS_IVA BIT(1)
-#define OMAP3_HAS_SGX BIT(2)
-#define OMAP3_HAS_NEON BIT(3)
-#define OMAP3_HAS_ISP BIT(4)
-#define OMAP3_HAS_192MHZ_CLK BIT(5)
-#define OMAP3_HAS_IO_WAKEUP BIT(6)
+#define OMAP_FEAT_CLASS_OMAP1 BIT(24)
+#define OMAP_FEAT_CLASS_OMAP2 BIT(25)
+#define OMAP_FEAT_CLASS_OMAP3 BIT(26)
+#define OMAP_FEAT_CLASS_OMAP4 BIT(27)
+
+#define OMAP_HAS_L2CACHE BIT(0)
+#define OMAP_HAS_IVA BIT(1)
+#define OMAP_HAS_SGX BIT(2)
+#define OMAP_HAS_NEON BIT(3)
+#define OMAP_HAS_ISP BIT(4)
+#define OMAP_HAS_192MHZ_CLK BIT(5)
+#define OMAP_HAS_IO_WAKEUP BIT(6)
+
+#define OMAP2_HAS_IVA OMAP_FEAT_CLASS_OMAP2 | OMAP_HAS_IVA
+#define OMAP2_HAS_SGX OMAP_FEAT_CLASS_OMAP2 | OMAP_HAS_SGX
+
+#define OMAP3_HAS_L2CACHE OMAP_FEAT_CLASS_OMAP3 | OMAP_HAS_L2CACHE
+#define OMAP3_HAS_IVA OMAP_FEAT_CLASS_OMAP3 | OMAP_HAS_IVA
+#define OMAP3_HAS_SGX OMAP_FEAT_CLASS_OMAP3 | OMAP_HAS_SGX
+#define OMAP3_HAS_NEON OMAP_FEAT_CLASS_OMAP3 | OMAP_HAS_NEON
+#define OMAP3_HAS_ISP OMAP_FEAT_CLASS_OMAP3 | OMAP_HAS_ISP
+#define OMAP3_HAS_192MHZ_CLK OMAP_FEAT_CLASS_OMAP3 | OMAP_HAS_192MHZ_CLK
+#define OMAP3_HAS_IO_WAKEUP OMAP_FEAT_CLASS_OMAP3 | OMAP_HAS_IOWAKEUP
+
+#define OMAP4_HAS_L2CACHE OMAP_FEAT_CLASS_OMAP4 | OMAP_HAS_L2CACHE
+#define OMAP4_HAS_IVA OMAP_FEAT_CLASS_OMAP4 | OMAP_HAS_IVA
+#define OMAP4_HAS_SGX OMAP_FEAT_CLASS_OMAP4 | OMAP_HAS_SGX
+#define OMAP4_HAS_NEON OMAP_FEAT_CLASS_OMAP4 | OMAP_HAS_NEON
+#define OMAP4_HAS_ISP OMAP_FEAT_CLASS_OMAP4 | OMAP_HAS_ISP
#endif
next prev parent reply other threads:[~2010-07-08 9:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-08 9:37 [RFC 0/5] Introduce omap_has_feature Tony Lindgren
2010-07-08 9:37 ` [PATCH 1/5] omap2/3: id: fix sparse warning Tony Lindgren
2010-07-08 9:37 ` [PATCH 2/5] omap: Implement common omap_has_feature Tony Lindgren
2010-07-08 14:52 ` Nishanth Menon
2010-07-09 7:08 ` Tony Lindgren
2010-07-09 16:53 ` Nishanth Menon
2010-07-08 9:37 ` [PATCH 3/5] omap: Replace omap3_has_ macros with omap_has_feature Tony Lindgren
2010-07-08 14:53 ` Nishanth Menon
2010-07-08 9:38 ` [PATCH 4/5] omap: Remove old omap3_has_ macros Tony Lindgren
2010-07-08 14:54 ` Nishanth Menon
2010-07-08 9:38 ` Tony Lindgren [this message]
2010-07-08 15:03 ` [PATCH 5/5] omap: Allow testing for omap type with omap_has_feature Nishanth Menon
2010-07-08 16:15 ` Venkatraman S
2010-07-08 16:28 ` Nishanth Menon
2010-07-08 19:28 ` Venkatraman S
2010-07-08 19:37 ` Nishanth Menon
2010-07-09 7:04 ` Tony Lindgren
2010-07-09 16:53 ` Nishanth Menon
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=20100708093804.16352.82935.stgit@baageli.muru.com \
--to=tony@atomide.com \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.com \
/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;
as well as URLs for NNTP newsgroup(s).