| * arch/arm/mach-at91/include/mach/debug-macro.S |
| * Copyright (C) 2003-2005 SAN People |
| * Debugging macro include header |
| * This program is free software; you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License version 2 as |
| * published by the Free Software Foundation. |
| #include <mach/hardware.h> |
| #include <mach/at91_dbgu.h> |
| ldr \rp, =(AT91_BASE_SYS + AT91_DBGU) @ System peripherals (phys address) |
| ldr \rv, =(AT91_VA_BASE_SYS + AT91_DBGU) @ System peripherals (virt address) |
| strb \rd, [\rx, #(AT91_DBGU_THR - AT91_DBGU)] @ Write to Transmitter Holding Register |
| 1001: ldr \rd, [\rx, #(AT91_DBGU_SR - AT91_DBGU)] @ Read Status Register |
| tst \rd, #AT91_DBGU_TXRDY @ DBGU_TXRDY = 1 when ready to transmit |
| 1001: ldr \rd, [\rx, #(AT91_DBGU_SR - AT91_DBGU)] @ Read Status Register |
| tst \rd, #AT91_DBGU_TXEMPTY @ DBGU_TXEMPTY = 1 when transmission complete |