Commit 67bdb28718ae6dbdfbfa541161529acfa0f3c137
1 parent
630be7ea2f
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 4 changed files with 54 additions and 30 deletions Side-by-side Diff
arch/arm/Kconfig.debug
... | ... | @@ -592,6 +592,7 @@ |
592 | 592 | default "debug/mvebu.S" if DEBUG_MVEBU_UART |
593 | 593 | default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART |
594 | 594 | default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART |
595 | + default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 | |
595 | 596 | default "debug/socfpga.S" if DEBUG_SOCFPGA_UART |
596 | 597 | default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1 |
597 | 598 | default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \ |
arch/arm/include/debug/sirf.S
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 |
arch/arm/mach-prima2/include/mach/debug-macro.S
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 | -#include <mach/hardware.h> | |
10 | -#include <mach/uart.h> | |
11 | - | |
12 | - .macro addruart, rp, rv, tmp | |
13 | - ldr \rp, =SIRFSOC_UART1_PA_BASE @ physical | |
14 | - ldr \rv, =SIRFSOC_UART1_VA_BASE @ virtual | |
15 | - .endm | |
16 | - | |
17 | - .macro senduart,rd,rx | |
18 | - str \rd, [\rx, #SIRFSOC_UART_TXFIFO_DATA] | |
19 | - .endm | |
20 | - | |
21 | - .macro busyuart,rd,rx | |
22 | - .endm | |
23 | - | |
24 | - .macro waituart,rd,rx | |
25 | -1001: ldr \rd, [\rx, #SIRFSOC_UART_TXFIFO_STATUS] | |
26 | - tst \rd, #SIRFSOC_UART1_TXFIFO_EMPTY | |
27 | - beq 1001b | |
28 | - .endm |
arch/arm/mach-prima2/lluart.c
... | ... | @@ -10,7 +10,17 @@ |
10 | 10 | #include <asm/page.h> |
11 | 11 | #include <asm/mach/map.h> |
12 | 12 | #include <mach/map.h> |
13 | -#include <mach/uart.h> | |
13 | + | |
14 | +#if defined(CONFIG_DEBUG_SIRFPRIMA2_UART1) | |
15 | +#define SIRFSOC_UART1_PA_BASE 0xb0060000 | |
16 | +#elif defined(CONFIG_DEBUG_SIRFMARCO_UART1) | |
17 | +#define SIRFSOC_UART1_PA_BASE 0xcc060000 | |
18 | +#else | |
19 | +#define SIRFSOC_UART1_PA_BASE 0 | |
20 | +#endif | |
21 | + | |
22 | +#define SIRFSOC_UART1_VA_BASE SIRFSOC_VA(0x060000) | |
23 | +#define SIRFSOC_UART1_SIZE SZ_4K | |
14 | 24 | |
15 | 25 | void __init sirfsoc_map_lluart(void) |
16 | 26 | { |