diff options
author | Arnd Bergmann <arnd@arndb.de> | 2013-03-19 08:52:14 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2013-03-25 07:29:40 -0400 |
commit | 67bdb28718ae6dbdfbfa541161529acfa0f3c137 (patch) | |
tree | 7d0bcbc52c4efd216f91984dead22c93f866fb25 /arch/arm/include | |
parent | 630be7ea2f2d0c2ee5662308297b77087da2ace2 (diff) |
ARM: sirf: move debug-macro.S to include/debug/sirf.S
The new style ll_debug implementation for multiplatform requires the
platform glue to be in include/debug, so let's move it there to
separate the debugging logic from the platform code.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Barry Song <Baohua.Song@csr.com>
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/debug/sirf.S | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/arch/arm/include/debug/sirf.S b/arch/arm/include/debug/sirf.S new file mode 100644 index 000000000000..dbf250cf18e6 --- /dev/null +++ b/arch/arm/include/debug/sirf.S | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-prima2/include/mach/debug-macro.S | ||
3 | * | ||
4 | * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. | ||
5 | * | ||
6 | * Licensed under GPLv2 or later. | ||
7 | */ | ||
8 | |||
9 | #if defined(CONFIG_DEBUG_SIRFPRIMA2_UART1) | ||
10 | #define SIRFSOC_UART1_PA_BASE 0xb0060000 | ||
11 | #elif defined(CONFIG_DEBUG_SIRFMARCO_UART1) | ||
12 | #define SIRFSOC_UART1_PA_BASE 0xcc060000 | ||
13 | #else | ||
14 | #define SIRFSOC_UART1_PA_BASE 0 | ||
15 | #endif | ||
16 | |||
17 | #define SIRFSOC_UART1_VA_BASE 0xFEC60000 | ||
18 | |||
19 | #define SIRFSOC_UART_TXFIFO_STATUS 0x0114 | ||
20 | #define SIRFSOC_UART_TXFIFO_DATA 0x0118 | ||
21 | |||
22 | #define SIRFSOC_UART1_TXFIFO_FULL (1 << 5) | ||
23 | #define SIRFSOC_UART1_TXFIFO_EMPTY (1 << 6) | ||
24 | |||
25 | .macro addruart, rp, rv, tmp | ||
26 | ldr \rp, =SIRFSOC_UART1_PA_BASE @ physical | ||
27 | ldr \rv, =SIRFSOC_UART1_VA_BASE @ virtual | ||
28 | .endm | ||
29 | |||
30 | .macro senduart,rd,rx | ||
31 | str \rd, [\rx, #SIRFSOC_UART_TXFIFO_DATA] | ||
32 | .endm | ||
33 | |||
34 | .macro busyuart,rd,rx | ||
35 | .endm | ||
36 | |||
37 | .macro waituart,rd,rx | ||
38 | 1001: ldr \rd, [\rx, #SIRFSOC_UART_TXFIFO_STATUS] | ||
39 | tst \rd, #SIRFSOC_UART1_TXFIFO_EMPTY | ||
40 | beq 1001b | ||
41 | .endm | ||
42 | |||