diff options
| author | Rob Herring <rob.herring@calxeda.com> | 2012-09-06 15:14:46 -0400 |
|---|---|---|
| committer | Rob Herring <rob.herring@calxeda.com> | 2012-09-14 10:22:03 -0400 |
| commit | 59bba2a9854a2de869440ff799d8e3dfd4779543 (patch) | |
| tree | 531ee615f891c9f52a86524b7b38b8a2af70d29c /arch/arm/include/debug | |
| parent | 6111bf7c578dafc08785c02678bfa1ec9b6f4a73 (diff) | |
ARM: picoxcell: move debug macros to include/debug
Move picoxcell debug-macro.S over to common debug macro directory.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Jamie Iles <jamie@jamieiles.com>
Diffstat (limited to 'arch/arm/include/debug')
| -rw-r--r-- | arch/arm/include/debug/picoxcell.S | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/include/debug/picoxcell.S b/arch/arm/include/debug/picoxcell.S new file mode 100644 index 000000000000..7419deb1b948 --- /dev/null +++ b/arch/arm/include/debug/picoxcell.S | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2011 Picochip Ltd., Jamie Iles | ||
| 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 version 2 as | ||
| 6 | * published by the Free Software Foundation. | ||
| 7 | * | ||
| 8 | * Derived from arch/arm/mach-davinci/include/mach/debug-macro.S to use 32-bit | ||
| 9 | * accesses to the 8250. | ||
| 10 | */ | ||
| 11 | #include <linux/serial_reg.h> | ||
| 12 | |||
| 13 | #define UART_SHIFT 2 | ||
| 14 | #define PICOXCELL_UART1_BASE 0x80230000 | ||
| 15 | #define PHYS_TO_IO(x) (((x) & 0x00ffffff) | 0xfe000000) | ||
| 16 | |||
| 17 | .macro addruart, rp, rv, tmp | ||
| 18 | ldr \rv, =PHYS_TO_IO(PICOXCELL_UART1_BASE) | ||
| 19 | ldr \rp, =PICOXCELL_UART1_BASE | ||
| 20 | .endm | ||
| 21 | |||
| 22 | .macro senduart,rd,rx | ||
| 23 | str \rd, [\rx, #UART_TX << UART_SHIFT] | ||
| 24 | .endm | ||
| 25 | |||
| 26 | .macro busyuart,rd,rx | ||
| 27 | 1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT] | ||
| 28 | and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
| 29 | teq \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
| 30 | bne 1002b | ||
| 31 | .endm | ||
| 32 | |||
| 33 | /* The UART's don't have any flow control IO's wired up. */ | ||
| 34 | .macro waituart,rd,rx | ||
| 35 | .endm | ||
