Hi Tony,
On Friday 16 October 2015 11:18 PM, Tony Lindgren wrote:
Hi,
* Keerthy [151013 22:47]:
--- a/arch/arm/mach-omap2/soc.h
+++ b/arch/arm/mach-omap2/soc.h
@@ -155,6 +155,13 @@ static inline int soc_is_omap(void)
* cpu_is_omap443x(): True for OMAP4430
* cpu_is_omap446x(): True for OMAP4460
* cpu_is_omap447x(): True for OMAP4470
+ * soc_is_omap24xx(): True for OMAP2420, OMAP2422, OMAP2423, OMAP2430
+ * soc_is_omap242x(): True for OMAP2420, OMAP2422, OMAP2423
+ * soc_is_omap243x(): True for OMAP2430
+ * soc_is_omap343x(): True for OMAP3430
+ * soc_is_omap443x(): True for OMAP4430
+ * soc_is_omap446x(): True for OMAP4460
+ * soc_is_omap447x(): True for OMAP4470
* soc_is_omap543x(): True for OMAP5430, OMAP5432
*/
#define GET_OMAP_CLASS(omap_rev() & 0xff)
We don't want cpu_is stuff mixed into soc.h at all..
@@ -227,12 +234,24 @@ IS_AM_SUBCLASS(437x, 0x437)
#define cpu_is_omap24xx() 0
#define cpu_is_omap242x() 0
+#define cpu_is_omap2420() 0
#define cpu_is_omap243x() 0
+#define cpu_is_omap2430() 0
#define cpu_is_omap34xx() 0
#define cpu_is_omap343x() 0
+#define cpu_is_omap3430() 0
+#define cpu_is_omap3630() 0
#define cpu_is_ti81xx() 0
#define cpu_is_ti816x() 0
#define cpu_is_ti814x() 0
+#define soc_is_omap24xx() 0
+#define soc_is_omap242x() 0
+#define soc_is_omap243x() 0
+#define soc_is_omap34xx() 0
+#define soc_is_omap343x() 0
+#define soc_is_ti81xx()0
+#define soc_is_ti816x()0
+#define soc_is_ti814x()0
#define soc_is_am35xx() 0
#define soc_is_am33xx() 0
#define soc_is_am335x() 0
Here too..
@@ -250,54 +273,74 @@ IS_AM_SUBCLASS(437x, 0x437)
#if defined(MULTI_OMAP2)
# if defined(CONFIG_ARCH_OMAP2)
+# undef soc_is_omap24xx
+# define soc_is_omap24xx()is_omap24xx()
# undef cpu_is_omap24xx
-# define cpu_is_omap24xx()is_omap24xx()
+# define cpu_is_omap24xx soc_is_omap24xx
# endif
# if defined (CONFIG_SOC_OMAP2420)
+# undef soc_is_omap242x
+# define soc_is_omap242x()is_omap242x()
# undef cpu_is_omap242x
-# define cpu_is_omap242x()is_omap242x()
+# define cpu_is_omap242x soc_is_omap242x
# endif
# if defined (CONFIG_SOC_OMAP2430)
+# undef soc_is_omap243x
+# define soc_is_omap243x()is_omap243x()
# undef cpu_is_omap243x
-# define cpu_is_omap243x()is_omap243x()
+# define cpu_is_omap243x soc_is_omap243x
# endif
...
And so on. And these changes should be kept to minimum, so..
I decided to redo the soc.h changes first with minimal search and replace
to cut down on any chance of errors. And then just added the legacy defines
for cpu_is at the end of the file for the ones that are still in use.
After some testing I'll apply just your id.c related changes on top of
the patch below :)
Regards,
Tony
8< ---
From: Tony Lindgren
Date: Fri, 16 Oct 2015 10:08:45 -0700
Subject: [PATCH] ARM: OMAP2+: Rename cpu_is macros to soc_is
The naming for the cpu_is macros is confusing as the CPU is separate
and within the SoC. Let's rename all the macros to soc_is, and let's
define cpu_is also for the ones still in use. Then we can just remove
the cpu_is macros once the users are fixed up.
To keep the chances of breaking anything, the changes were
generated with the following regular expressions:
s/cpu_is/soc_is/g
s/CPU/SoC/g
Then the list of existing cpu_is users was generated with:
$ $ grep -o -e 'cpu_is_.\+()' arch/arm/mach-omap2/*.[chS] | \
cut -d: -f2 | sort | uniq
And added to the end of the soc.h.
I decided to rework the earlier patches by Keerthy
to keep changes down to minimum to avoid potential errors and stick
to just search and replace.
Compile tested individual SoC Configs and boot tested on: AM437x-gp-evm,
am335x-bone, dra72-evm and dra7-evm.
Tested-by: Keerthy
Signed-off-by: Tony Lindgren
--- a/arch/arm/mach-omap2/soc.h
+++ b/arch/arm/mach-omap2/soc.h
@@ -129,9 +129,9 @@ int omap_type(void);
/*
* omap_rev bits:
- * CPU id bits (0730, 1510, 1710, 2422...) [31:16]
- * CPU revision(See _REV_ defined in cpu.h)[15:08]
- * CPU class bits (15xx, 16xx, 24xx, 34xx...) [07:00]
+ * SoC id bits (0730, 1510, 1710, 2422...) [31:16]
+ * SoC revision(See _REV_ defined in cpu.h)[15:08]
+ * SoC class bits (15xx, 16xx, 24xx, 34xx...) [07:00]
*/
unsigned int omap_rev(void);
@@ -141,20 +141,20 @@ static inline int soc_is_omap(void)
}
/*
- * Get the CPU revision for OMAP