linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/11] ARM: pxa: redefine the cpu_is_pxa3xx
@ 2010-11-12  7:17 Haojian Zhuang
  2010-11-12  7:17 ` [PATCH 02/11] ARM: pxa: redefine irqs.h Haojian Zhuang
  2010-11-12  8:00 ` [PATCH 01/11] ARM: pxa: redefine the cpu_is_pxa3xx Eric Miao
  0 siblings, 2 replies; 23+ messages in thread
From: Haojian Zhuang @ 2010-11-12  7:17 UTC (permalink / raw)
  To: linux-arm-kernel

PXA300/PXA310/PXA320/PXA930/PXA935 are sharing one cpu family id.
It's a little confusion on cpu_is_pxa3xx().

Now reduce the scope of cpu_is_pxa3xx(). Make it focusing on
PXA300/PXA310/PXA320. PXA930/PXA935 is coverd by cpu_is_pxa93x().

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
---
 arch/arm/mach-pxa/include/mach/hardware.h |   26 +++++++++-----------------
 1 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h
index ca188cd..59f145a 100644
--- a/arch/arm/mach-pxa/include/mach/hardware.h
+++ b/arch/arm/mach-pxa/include/mach/hardware.h
@@ -145,53 +145,44 @@
 #define __cpu_is_pxa27x(id)	(0)
 #endif
 
-#ifdef CONFIG_CPU_PXA300
+#ifdef CONFIG_PXA3xx
 #define __cpu_is_pxa300(id)				\
 	({						\
 		unsigned int _id = (id) >> 4 & 0xfff;	\
 		_id == 0x688;				\
 	 })
-#else
-#define __cpu_is_pxa300(id)	(0)
-#endif
 
-#ifdef CONFIG_CPU_PXA310
 #define __cpu_is_pxa310(id)				\
 	({						\
 		unsigned int _id = (id) >> 4 & 0xfff;	\
 		_id == 0x689;				\
 	 })
-#else
-#define __cpu_is_pxa310(id)	(0)
-#endif
 
-#ifdef CONFIG_CPU_PXA320
 #define __cpu_is_pxa320(id)				\
 	({						\
 		unsigned int _id = (id) >> 4 & 0xfff;	\
 		_id == 0x603 || _id == 0x682;		\
 	 })
 #else
+#define __cpu_is_pxa300(id)	(0)
+#define __cpu_is_pxa310(id)	(0)
 #define __cpu_is_pxa320(id)	(0)
 #endif
 
-#ifdef CONFIG_CPU_PXA930
+#ifdef CONFIG_PXA93x
 #define __cpu_is_pxa930(id)				\
 	({						\
 		unsigned int _id = (id) >> 4 & 0xfff;	\
 		_id == 0x683;				\
 	 })
-#else
-#define __cpu_is_pxa930(id)	(0)
-#endif
 
-#ifdef CONFIG_CPU_PXA935
 #define __cpu_is_pxa935(id)				\
 	({						\
 		unsigned int _id = (id) >> 4 & 0xfff;	\
 		_id == 0x693;				\
 	 })
 #else
+#define __cpu_is_pxa930(id)	(0)
 #define __cpu_is_pxa935(id)	(0)
 #endif
 
@@ -264,7 +255,7 @@
 /*
  * CPUID Core Generation Bit
  * <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x
- * == 0x3 for pxa300/pxa310/pxa320
+ * == 0x3 for pxa300/pxa310/pxa320 and pxa930/pxa935
  */
 #if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x)
 #define __cpu_is_pxa2xx(id)				\
@@ -279,8 +270,9 @@
 #ifdef CONFIG_PXA3xx
 #define __cpu_is_pxa3xx(id)				\
 	({						\
-		unsigned int _id = (id) >> 13 & 0x7;	\
-		_id == 0x3;				\
+		__cpu_is_pxa300(id)			\
+			|| __cpu_is_pxa310(id)		\
+			|| __cpu_is_pxa320(id);		\
 	 })
 #else
 #define __cpu_is_pxa3xx(id)	(0)
-- 
1.5.6.5

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

end of thread, other threads:[~2011-01-09 22:49 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-12  7:17 [PATCH 01/11] ARM: pxa: redefine the cpu_is_pxa3xx Haojian Zhuang
2010-11-12  7:17 ` [PATCH 02/11] ARM: pxa: redefine irqs.h Haojian Zhuang
2010-11-12  7:17   ` [PATCH 03/11] ARM: pxa: split pxa93x from pxa3xx Haojian Zhuang
2010-11-12  7:17     ` [PATCH 04/11] ARM: pxa: update to read ICHP Haojian Zhuang
2010-11-12  7:17       ` [PATCH 05/11] ARM: pxa: support pxa95x Haojian Zhuang
2010-11-12  7:17         ` [PATCH 06/11] ARM: pxa: support saarb platform Haojian Zhuang
2010-11-12  7:17           ` [PATCH 07/11] ARM: mmp: select CPU_PJ4 Haojian Zhuang
2010-11-12  7:17             ` [PATCH 08/11] ARM: pxa: sanitize IRQ registers access based on offset Haojian Zhuang
2010-11-12  7:17               ` [PATCH 09/11] ARM: pxa: auto compute shift and mult of timer Haojian Zhuang
2010-11-12  7:17                 ` [PATCH 10/11] ARM: pxa: add 32KHz timer as clock source Haojian Zhuang
2010-11-12  7:17                   ` [PATCH 11/11] ARM: pxa: add iwmmx support for PJ4 Haojian Zhuang
2010-11-12 18:43                     ` Nicolas Pitre
2010-11-12 17:50                   ` [PATCH 10/11] ARM: pxa: add 32KHz timer as clock source Nicolas Pitre
2010-11-16  5:07                     ` Haojian Zhuang
2011-01-09 22:49               ` [PATCH 08/11] ARM: pxa: sanitize IRQ registers access based on offset Marek Vasut
2010-11-12  8:50         ` [PATCH 05/11] ARM: pxa: support pxa95x Haojian Zhuang
2010-11-12  8:34       ` [PATCH 04/11] ARM: pxa: update to read ICHP Eric Miao
2010-11-12  8:53         ` Haojian Zhuang
2010-11-12  8:07     ` [PATCH 03/11] ARM: pxa: split pxa93x from pxa3xx Eric Miao
2010-11-12  8:47       ` Haojian Zhuang
2010-11-12  8:02   ` [PATCH 02/11] ARM: pxa: redefine irqs.h Eric Miao
2010-11-12  8:00 ` [PATCH 01/11] ARM: pxa: redefine the cpu_is_pxa3xx Eric Miao
2010-11-16 14:24   ` Eric Miao

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).