1fa04e4dbSRob Herring/* arch/arm/mach-realview/include/mach/debug-macro.S 2fa04e4dbSRob Herring * 3fa04e4dbSRob Herring * Debugging macro include header 4fa04e4dbSRob Herring * 5fa04e4dbSRob Herring * Copyright (C) 1994-1999 Russell King 6fa04e4dbSRob Herring * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks 7fa04e4dbSRob Herring * 8fa04e4dbSRob Herring * This program is free software; you can redistribute it and/or modify 9fa04e4dbSRob Herring * it under the terms of the GNU General Public License version 2 as 10fa04e4dbSRob Herring * published by the Free Software Foundation. 11fa04e4dbSRob Herring */ 12fa04e4dbSRob Herring 13fa04e4dbSRob Herring#define DEBUG_LL_PHYS_BASE 0x10000000 14fa04e4dbSRob Herring#define DEBUG_LL_UART_OFFSET 0x00009000 15fa04e4dbSRob Herring 16fa04e4dbSRob Herring#define DEBUG_LL_PHYS_BASE_RS1 0x1c000000 17fa04e4dbSRob Herring#define DEBUG_LL_UART_OFFSET_RS1 0x00090000 18fa04e4dbSRob Herring 19ed18bdc8SJonathan Austin#define DEBUG_LL_UART_PHYS_CRX 0xb0090000 20ed18bdc8SJonathan Austin 21fa04e4dbSRob Herring#define DEBUG_LL_VIRT_BASE 0xf8000000 22fa04e4dbSRob Herring 23fa04e4dbSRob Herring#if defined(CONFIG_DEBUG_VEXPRESS_UART0_DETECT) 24fa04e4dbSRob Herring 25fa04e4dbSRob Herring .macro addruart,rp,rv,tmp 26d892a917SArnd Bergmann .arch armv7-a 27fa04e4dbSRob Herring 28fa04e4dbSRob Herring @ Make an educated guess regarding the memory map: 29852663d9SPawel Moll @ - the original A9 core tile (based on ARM Cortex-A9 r0p1) 30852663d9SPawel Moll @ should use UART at 0x10009000 31fa04e4dbSRob Herring @ - all other (RS1 complaint) tiles use UART mapped 32fa04e4dbSRob Herring @ at 0x1c090000 33852663d9SPawel Moll mrc p15, 0, \rp, c0, c0, 0 34852663d9SPawel Moll movw \rv, #0xc091 35852663d9SPawel Moll movt \rv, #0x410f 36852663d9SPawel Moll cmp \rp, \rv 37fa04e4dbSRob Herring 38fa04e4dbSRob Herring @ Original memory map 39fa04e4dbSRob Herring moveq \rp, #DEBUG_LL_UART_OFFSET 40fa04e4dbSRob Herring orreq \rv, \rp, #DEBUG_LL_VIRT_BASE 41fa04e4dbSRob Herring orreq \rp, \rp, #DEBUG_LL_PHYS_BASE 42fa04e4dbSRob Herring 43fa04e4dbSRob Herring @ RS1 memory map 44fa04e4dbSRob Herring movne \rp, #DEBUG_LL_UART_OFFSET_RS1 45fa04e4dbSRob Herring orrne \rv, \rp, #DEBUG_LL_VIRT_BASE 46fa04e4dbSRob Herring orrne \rp, \rp, #DEBUG_LL_PHYS_BASE_RS1 47fa04e4dbSRob Herring 48fa04e4dbSRob Herring .endm 49fa04e4dbSRob Herring 504e218b99SRussell King#include <debug/pl01x.S> 51fa04e4dbSRob Herring#endif 52