Russell King | 268099e | 2006-03-16 20:40:25 +0000 | [diff] [blame] | 1 | /* |
Russell King | 4baa992 | 2008-08-02 10:55:55 +0100 | [diff] [blame] | 2 | * arch/arm/include/asm/hardware/debug-8250.S |
Russell King | 268099e | 2006-03-16 20:40:25 +0000 | [diff] [blame] | 3 | * |
| 4 | * Copyright (C) 1994-1999 Russell King |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | */ |
| 10 | #include <linux/serial_reg.h> |
| 11 | |
| 12 | .macro senduart,rd,rx |
| 13 | strb \rd, [\rx, #UART_TX << UART_SHIFT] |
| 14 | .endm |
| 15 | |
| 16 | .macro busyuart,rd,rx |
| 17 | 1002: ldrb \rd, [\rx, #UART_LSR << UART_SHIFT] |
| 18 | and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE |
| 19 | teq \rd, #UART_LSR_TEMT | UART_LSR_THRE |
| 20 | bne 1002b |
| 21 | .endm |
| 22 | |
| 23 | .macro waituart,rd,rx |
| 24 | #ifdef FLOW_CONTROL |
| 25 | 1001: ldrb \rd, [\rx, #UART_MSR << UART_SHIFT] |
| 26 | tst \rd, #UART_MSR_CTS |
| 27 | beq 1001b |
| 28 | #endif |
| 29 | .endm |