Skip to content

Commit 9bed3e0

Browse files
author
Linus Walleij
committed
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>
1 parent f87b95d commit 9bed3e0

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

‎arch/arm/include/debug/ux500.S‎

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* published by the Free Software Foundation.
99
*
1010
*/
11-
#include <mach/hardware.h>
11+
1212

1313
#if CONFIG_UX500_DEBUG_UART > 2
1414
#error Invalid Ux500 debug UART
@@ -21,19 +21,28 @@
2121
*/
2222

2323
#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
2532
#endif
2633

27-
#ifndef __UX500_UART
34+
#if !defined(__UX500_PHYS_UART) || !defined(__UX500_VIRT_UART)
2835
#error Unknown SOC
2936
#endif
3037

31-
#define UX500_UART(n) __UX500_UART(n)
32-
#define UART_BASE UX500_UART(CONFIG_UX500_DEBUG_UART)
38+
#define UX500_PHYS_UART(n) __UX500_PHYS_UART(n)
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)
3342

3443
.macro addruart, rp, rv, tmp
35-
ldr \rp, =UART_BASE @ no, physical address
36-
ldr \rv, =IO_ADDRESS(UART_BASE) @ yes, virtual address
44+
ldr \rp, =UART_PHYS_BASE @ no, physical address
45+
ldr \rv, =UART_VIRT_BASE @ yes, virtual address
3746
.endm
3847

3948
#include <asm/hardware/debug-pl01x.S>

0 commit comments

Comments
 (0)