Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da1a3dc0 authored by Eric Miao's avatar Eric Miao Committed by Russell King
Browse files

[ARM] pxa: introduce cpu_is_pxa26x()



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: default avatarEric Miao <eric.miao@marvell.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 0ffcbfd5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -202,6 +202,8 @@
		__cpu_is_pxa25x(read_cpuid_id());	\
	})

extern int cpu_is_pxa26x(void);

#define cpu_is_pxa27x()					\
	({						\
		__cpu_is_pxa27x(read_cpuid_id());	\
+7 −1
Original line number Diff line number Diff line
@@ -36,6 +36,12 @@
#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);
	}