home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / src / linux-headers-2.6.28-15 / arch / arm / mach-aaec2000 / include / mach / debug-macro.S < prev    next >
Encoding:
Text File  |  2008-12-24  |  814 b   |  38 lines

  1. /*  arch/arm/mach-aaec2000/include/mach/debug-macro.S
  2.  *
  3.  *  Debugging macro include header
  4.  *
  5.  *  Copyright (c) 2005 Nicolas Bellido Y Ortega
  6.  *
  7.  *  This program is free software; you can redistribute it and/or modify
  8.  *  it under the terms of the GNU General Public License version 2 as
  9.  *  published by the Free Software Foundation.
  10.  */
  11.  
  12. #include "hardware.h"
  13.         .macro    addruart,rx
  14.         mrc    p15, 0, \rx, c1, c0
  15.         tst    \rx, #1            @ MMU enabled?
  16.         moveq    \rx, #0x80000000        @ physical
  17.         movne    \rx, #io_p2v(0x80000000)    @ virtual
  18.         orr    \rx, \rx, #0x00000800
  19.         .endm
  20.  
  21.         .macro    senduart,rd,rx
  22.         str    \rd, [\rx, #0]
  23.         .endm
  24.  
  25.         .macro    busyuart,rd,rx
  26. 1002:        ldr    \rd, [\rx, #0x10]
  27.         tst    \rd, #(1 << 7)
  28.         beq    1002b
  29.         .endm
  30.  
  31.         .macro    waituart,rd,rx
  32. #if 0
  33. 1001:        ldr    \rd, [\rx, #0x10]
  34.         tst    \rd, #(1 << 5)
  35.         beq    1001b
  36. #endif
  37.         .endm
  38.