diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2014-06-19 11:26:34 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2014-07-06 19:52:05 -0400 |
commit | dd99eef5f6472e30b6e13f6f4622f58e94d46809 (patch) | |
tree | f3760e780a29dd6261670856774910cd2f325860 /arch/arm/include | |
parent | a8a28affc37a230ce86da01a2de207b55b49bb09 (diff) |
ARM: clps711x: Move debug include into arch/arm/include/debug/
One more step to allowing CLPS711X to participate in the
multi-platform defconfig.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/debug/clps711x.S | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm/include/debug/clps711x.S b/arch/arm/include/debug/clps711x.S new file mode 100644 index 000000000000..abe225436686 --- /dev/null +++ b/arch/arm/include/debug/clps711x.S | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2014 Alexander Shiyan <shc_work@mail.ru> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | */ | ||
9 | |||
10 | #ifndef CONFIG_DEBUG_CLPS711X_UART2 | ||
11 | #define CLPS711X_UART_PADDR (0x80000000 + 0x0000) | ||
12 | #define CLPS711X_UART_VADDR (0xfeff0000 + 0x0000) | ||
13 | #else | ||
14 | #define CLPS711X_UART_PADDR (0x80000000 + 0x1000) | ||
15 | #define CLPS711X_UART_VADDR (0xfeff0000 + 0x1000) | ||
16 | #endif | ||
17 | |||
18 | #define SYSFLG (0x0140) | ||
19 | #define SYSFLG_UBUSY (1 << 11) | ||
20 | #define UARTDR (0x0480) | ||
21 | |||
22 | .macro addruart, rp, rv, tmp | ||
23 | ldr \rv, =CLPS711X_UART_VADDR | ||
24 | ldr \rp, =CLPS711X_UART_PADDR | ||
25 | .endm | ||
26 | |||
27 | .macro waituart,rd,rx | ||
28 | .endm | ||
29 | |||
30 | .macro senduart,rd,rx | ||
31 | str \rd, [\rx, #UARTDR] | ||
32 | .endm | ||
33 | |||
34 | .macro busyuart,rd,rx | ||
35 | 1001: ldr \rd, [\rx, #SYSFLG] | ||
36 | tst \rd, #SYSFLG_UBUSY | ||
37 | bne 1001b | ||
38 | .endm | ||