]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] pxa: introduce cpu_is_pxa26x()
authorEric Miao <eric.miao@marvell.com>
Thu, 11 Sep 2008 02:43:02 +0000 (10:43 +0800)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 25 Sep 2008 08:54:56 +0000 (09:54 +0100)
PXA26x (PXA261/262) is actually a PXA250 with stacked Intel(R)
StartaFlash. And this can be decided by bit 3 (PKG_TYPE) of
BOOT_DEF register.

Due to this extra I/O register access, make cpu_is_pxa26x() a
public function instead of a macro.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-pxa/include/mach/hardware.h
arch/arm/mach-pxa/pxa25x.c

index c9ee4081d533cc38ed76dd9e2a0b6b50339859f5..9dc71114e2871dadc1b9c0dcb73ea1d996dc436f 100644 (file)
                __cpu_is_pxa25x(read_cpuid_id());       \
        })
 
+extern int cpu_is_pxa26x(void);
+
 #define cpu_is_pxa27x()                                        \
        ({                                              \
                __cpu_is_pxa27x(read_cpuid_id());       \
index a3a6aff5f0d4ce7951831ca330c7b95e8c990158..3caa74a10d13ad73c3356b81bd279ab9e567b191 100644 (file)
 #include "devices.h"
 #include "clock.h"
 
+int cpu_is_pxa26x(void)
+{
+       return cpu_is_pxa250() && ((BOOT_DEF & 0x8) == 0);
+}
+EXPORT_SYMBOL_GPL(cpu_is_pxa26x);
+
 /*
  * Various clock factors driven by the CCCR register.
  */
@@ -372,7 +378,7 @@ static int __init pxa25x_init(void)
        }
 
        /* Only add HWUART for PXA255/26x; PXA210/250 do not have it. */
-       if (cpu_is_pxa255()) {
+       if (cpu_is_pxa255() || cpu_is_pxa26x()) {
                clks_register(&pxa25x_hwuart_clk, 1);
                ret = platform_device_register(&pxa_device_hwuart);
        }