From 7dd19e755dbe481ae42590dbd921dfd47e94779c Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Mon, 4 Feb 2008 17:39:00 +0100 Subject: [ARM] 4818/1: RealView: Add core-tile detection This patch adds the core-tile detection and only enables devices if the corresponding tile is present. It currently detects the ARM11MPCore via the core_tile_eb11mp() macro. Signed-off-by: Catalin Marinas Signed-off-by: Russell King --- include/asm-arm/arch-realview/board-eb.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'include/asm-arm/arch-realview') diff --git a/include/asm-arm/arch-realview/board-eb.h b/include/asm-arm/arch-realview/board-eb.h index 943efc5de4e..9e76b236b52 100644 --- a/include/asm-arm/arch-realview/board-eb.h +++ b/include/asm-arm/arch-realview/board-eb.h @@ -149,4 +149,23 @@ #define MAX_GIC_NR NR_GIC_EB11MP #endif +/* + * Core tile identification (REALVIEW_SYS_PROCID) + */ +#define REALVIEW_EB_PROC_MASK 0xFF000000 +#define REALVIEW_EB_PROC_ARM7TDMI 0x00000000 +#define REALVIEW_EB_PROC_ARM9 0x02000000 +#define REALVIEW_EB_PROC_ARM11 0x04000000 +#define REALVIEW_EB_PROC_ARM11MP 0x06000000 + +#define check_eb_proc(proc_type) \ + ((readl(__io_address(REALVIEW_SYS_PROCID)) & REALVIEW_EB_PROC_MASK) \ + == proc_type) + +#ifdef CONFIG_REALVIEW_MPCORE +#define core_tile_eb11mp() check_eb_proc(REALVIEW_EB_PROC_ARM11MP) +#else +#define core_tile_eb11mp() 0 +#endif + #endif /* __ASM_ARCH_BOARD_EB_H */ -- cgit v1.2.3-70-g09d2