Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cd272ab01141c908ccccb068e6d38b7fcd3240ac
Commit:     cd272ab01141c908ccccb068e6d38b7fcd3240ac
Parent:     fa0b62513b7cb55b6764b794b63c6f583b26e813
Author:     eric miao <[EMAIL PROTECTED]>
AuthorDate: Tue Sep 11 19:13:17 2007 -0700
Committer:  Russell King <[EMAIL PROTECTED]>
CommitDate: Fri Oct 12 21:15:28 2007 +0100

    [ARM] pxa: add PXA3 cpu_is_xxx() macros
    
    Extracted from patch by Eric Miao, this adds the cpu_is_xxx() macros
    for identifying PXA3 SoCs.
    
    Signed-off-by: eric miao <[EMAIL PROTECTED]>
    Signed-off-by: Russell King <[EMAIL PROTECTED]>
---
 include/asm-arm/arch-pxa/hardware.h |   65 +++++++++++++++++++++++++++++++++++
 1 files changed, 65 insertions(+), 0 deletions(-)

diff --git a/include/asm-arm/arch-pxa/hardware.h 
b/include/asm-arm/arch-pxa/hardware.h
index 538a34e..fc20d72 100644
--- a/include/asm-arm/arch-pxa/hardware.h
+++ b/include/asm-arm/arch-pxa/hardware.h
@@ -80,6 +80,24 @@
                _id == 0x411;                           \
        })
 
+#define __cpu_is_pxa300(id)                            \
+       ({                                              \
+               unsigned int _id = (id) >> 4 & 0xfff;   \
+               _id == 0x688;                           \
+        })
+
+#define __cpu_is_pxa310(id)                            \
+       ({                                              \
+               unsigned int _id = (id) >> 4 & 0xfff;   \
+               _id == 0x689;                           \
+        })
+
+#define __cpu_is_pxa320(id)                            \
+       ({                                              \
+               unsigned int _id = (id) >> 4 & 0xfff;   \
+               _id == 0x603 || _id == 0x682;           \
+        })
+
 #define cpu_is_pxa21x()                                        \
        ({                                              \
                unsigned int id = read_cpuid(CPUID_ID); \
@@ -98,6 +116,53 @@
                __cpu_is_pxa27x(id);                    \
        })
 
+#define cpu_is_pxa300()                                        \
+       ({                                              \
+               unsigned int id = read_cpuid(CPUID_ID); \
+               __cpu_is_pxa300(id);                    \
+        })
+
+#define cpu_is_pxa310()                                        \
+       ({                                              \
+               unsigned int id = read_cpuid(CPUID_ID); \
+               __cpu_is_pxa310(id);                    \
+        })
+
+#define cpu_is_pxa320()                                        \
+       ({                                              \
+               unsigned int id = read_cpuid(CPUID_ID); \
+               __cpu_is_pxa320(id);                    \
+        })
+
+/*
+ * CPUID Core Generation Bit
+ * <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x
+ * == 0x3 for pxa300/pxa310/pxa320
+ */
+#define __cpu_is_pxa2xx(id)                            \
+       ({                                              \
+               unsigned int _id = (id) >> 13 & 0x7;    \
+               _id <= 0x2;                             \
+        })
+
+#define __cpu_is_pxa3xx(id)                            \
+       ({                                              \
+               unsigned int _id = (id) >> 13 & 0x7;    \
+               _id == 0x3;                             \
+        })
+
+#define cpu_is_pxa2xx()                                        \
+       ({                                              \
+               unsigned int id = read_cpuid(CPUID_ID); \
+               __cpu_is_pxa2xx(id);                    \
+        })
+
+#define cpu_is_pxa3xx()                                        \
+       ({                                              \
+               unsigned int id = read_cpuid(CPUID_ID); \
+               __cpu_is_pxa3xx(id);                    \
+        })
+
 /*
  * Handy routine to set GPIO alternate functions
  */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to