1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
2 | /* |
3 | * Debugging macro include header |
4 | * |
5 | * Copyright (C) 2009 ST-Ericsson |
6 | */ |
7 | |
8 | |
9 | #if CONFIG_UX500_DEBUG_UART > 2 |
10 | #error Invalid Ux500 debug UART |
11 | #endif |
12 | |
13 | /* |
14 | * DEBUG_LL only works if only one SOC is built in. We don't use #else below |
15 | * in order to get "__UX500_UART redefined" warnings if more than one SOC is |
16 | * built, so that there's some hint during the build that something is wrong. |
17 | */ |
18 | |
19 | #ifdef CONFIG_UX500_SOC_DB8500 |
20 | #define U8500_UART0_PHYS_BASE (0x80120000) |
21 | #define U8500_UART1_PHYS_BASE (0x80121000) |
22 | #define U8500_UART2_PHYS_BASE (0x80007000) |
23 | #define __UX500_PHYS_UART(n) U8500_UART##n##_PHYS_BASE |
24 | #endif |
25 | |
26 | #if !defined(__UX500_PHYS_UART) |
27 | #error Unknown SOC |
28 | #endif |
29 | |
30 | #define UX500_PHYS_UART(n) __UX500_PHYS_UART(n) |
31 | #define UART_PHYS_BASE UX500_PHYS_UART(CONFIG_UX500_DEBUG_UART) |
32 | #define UART_VIRT_BASE (0xfff07000) |
33 | |
34 | .macro addruart, rp, rv, tmp |
35 | ldr \rp, =UART_PHYS_BASE @ no, physical address |
36 | ldr \rv, =UART_VIRT_BASE @ yes, virtual address |
37 | .endm |
38 | |
39 | #include <debug/pl01x.S> |
40 | |