aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2013-04-05 10:07:31 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-04-08 07:59:14 -0400
commit9bed3e05e94fbdfc986fba4be7fa5e83db909874 (patch)
treea8f2047f62f925747388a742633730b042f129f1 /arch
parentf87b95dd2e4a8832b1d6034f15a5324db42608a0 (diff)
ARM: ux500: make debug macro stand-alone
This pushes the knowledge of physical addresses down into the debug macro so we can get rid of the <mach/hardware.h> dependency. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/debug/ux500.S23
1 files changed, 16 insertions, 7 deletions
diff --git a/arch/arm/include/debug/ux500.S b/arch/arm/include/debug/ux500.S
index 67035223334a..2848857f5b62 100644
--- a/arch/arm/include/debug/ux500.S
+++ b/arch/arm/include/debug/ux500.S
@@ -8,7 +8,7 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 * 9 *
10 */ 10 */
11#include <mach/hardware.h> 11
12 12
13#if CONFIG_UX500_DEBUG_UART > 2 13#if CONFIG_UX500_DEBUG_UART > 2
14#error Invalid Ux500 debug UART 14#error Invalid Ux500 debug UART
@@ -21,19 +21,28 @@
21 */ 21 */
22 22
23#ifdef CONFIG_UX500_SOC_DB8500 23#ifdef CONFIG_UX500_SOC_DB8500
24#define __UX500_UART(n) U8500_UART##n##_BASE 24#define U8500_UART0_PHYS_BASE (0x80120000)
25#define U8500_UART1_PHYS_BASE (0x80121000)
26#define U8500_UART2_PHYS_BASE (0x80007000)
27#define U8500_UART0_VIRT_BASE (0xa8120000)
28#define U8500_UART1_VIRT_BASE (0xa8121000)
29#define U8500_UART2_VIRT_BASE (0xa8007000)
30#define __UX500_PHYS_UART(n) U8500_UART##n##_PHYS_BASE
31#define __UX500_VIRT_UART(n) U8500_UART##n##_VIRT_BASE
25#endif 32#endif
26 33
27#ifndef __UX500_UART 34#if !defined(__UX500_PHYS_UART) || !defined(__UX500_VIRT_UART)
28#error Unknown SOC 35#error Unknown SOC
29#endif 36#endif
30 37
31#define UX500_UART(n) __UX500_UART(n) 38#define UX500_PHYS_UART(n) __UX500_PHYS_UART(n)
32#define UART_BASE UX500_UART(CONFIG_UX500_DEBUG_UART) 39#define UX500_VIRT_UART(n) __UX500_VIRT_UART(n)
40#define UART_PHYS_BASE UX500_PHYS_UART(CONFIG_UX500_DEBUG_UART)
41#define UART_VIRT_BASE UX500_VIRT_UART(CONFIG_UX500_DEBUG_UART)
33 42
34 .macro addruart, rp, rv, tmp 43 .macro addruart, rp, rv, tmp
35 ldr \rp, =UART_BASE @ no, physical address 44 ldr \rp, =UART_PHYS_BASE @ no, physical address
36 ldr \rv, =IO_ADDRESS(UART_BASE) @ yes, virtual address 45 ldr \rv, =UART_VIRT_BASE @ yes, virtual address
37 .endm 46 .endm
38 47
39#include <asm/hardware/debug-pl01x.S> 48#include <asm/hardware/debug-pl01x.S>