debug-macro.S 1007 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* linux/include/asm-arm/arch-epxa10db/debug-macro.S
  2. *
  3. * Debugging macro include header
  4. *
  5. * Copyright (C) 1994-1999 Russell King
  6. * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. *
  12. */
  13. #include <asm/arch/excalibur.h>
  14. #define UART00_TYPE
  15. #include <asm/arch/uart00.h>
  16. .macro addruart,rx
  17. mrc p15, 0, \rx, c1, c0
  18. tst \rx, #1 @ MMU enabled?
  19. ldr \rx, =EXC_UART00_BASE @ physical base address
  20. orrne \rx, \rx, #0xff000000 @ virtual base
  21. orrne \rx, \rx, #0x00f00000
  22. .endm
  23. .macro senduart,rd,rx
  24. str \rd, [\rx, #UART_TD(0)]
  25. .endm
  26. .macro waituart,rd,rx
  27. 1001: ldr \rd, [\rx, #UART_TSR(0)]
  28. and \rd, \rd, #UART_TSR_TX_LEVEL_MSK
  29. cmp \rd, #15
  30. beq 1001b
  31. .endm
  32. .macro busyuart,rd,rx
  33. 1001: ldr \rd, [\rx, #UART_TSR(0)]
  34. ands \rd, \rd, #UART_TSR_TX_LEVEL_MSK
  35. bne 1001b
  36. .endm