/ * linux/ i n c l u d e / a s m - a r m / a r c h - o m a p / d e b u g - m a c r o . S
*
* Debugging m a c r o i n c l u d e h e a d e r
*
* Copyright ( C ) 1 9 9 4 - 1 9 9 9 R u s s e l l K i n g
* Moved f r o m l i n u x / a r c h / a r m / k e r n e l / d e b u g . S b y B e n D o o k s
*
* This p r o g r a m i s f r e e s o f t w a r e ; you can redistribute it and/or modify
* it u n d e r t h e t e r m s o f t h e G N U G e n e r a l P u b l i c L i c e n s e v e r s i o n 2 a s
* published b y t h e F r e e S o f t w a r e F o u n d a t i o n .
*
* /
.macro addruart,r x
mrc p15 , 0 , \ r x , c1 , c0
tst \ r x , #1 @ MMU enabled?
# ifdef C O N F I G _ A R C H _ O M A P 1
moveq \ r x , #0xff000000 @ physical base address
movne \ r x , #0xfe000000 @ virtual base
orr \ r x , \ r x , #0x00fb0000
# ifdef C O N F I G _ O M A P _ L L _ D E B U G _ U A R T 3
orr \ r x , \ r x , #0x00009000 @ UART 3
# endif
# if d e f i n e d ( C O N F I G _ O M A P _ L L _ D E B U G _ U A R T 2 ) | | d e f i n e d ( C O N F I G _ O M A P _ L L _ D E B U G _ U A R T 3 )
orr \ r x , \ r x , #0x00000800 @ UART 2 & 3
# endif
# elif C O N F I G _ A R C H _ O M A P 2
moveq \ r x , #0x48000000 @ physical base address
movne \ r x , #0xd8000000 @ virtual base
orr \ r x , \ r x , #0x0006a000
# ifdef C O N F I G _ O M A P _ L L _ D E B U G _ U A R T 2
add \ r x , \ r x , #0x00002000 @ UART 2
# endif
# ifdef C O N F I G _ O M A P _ L L _ D E B U G _ U A R T 3
add \ r x , \ r x , #0x00004000 @ UART 3
# endif
# endif
.endm
.macro senduart,r d ,r x
strb \ r d , [ \ r x ]
.endm
.macro busyuart,r d ,r x
1001 : ldrb \ r d , [ \ r x , #( 0x5 < < 2 ) ] @ OMAP-1510 and friends
and \ r d , \ r d , #0x60
teq \ r d , #0x60
beq 1 0 0 2 f
ldrb \ r d , [ \ r x , #( 0x5 < < 0 ) ] @ OMAP-730 only
and \ r d , \ r d , #0x60
teq \ r d , #0x60
bne 1 0 0 1 b
1002 :
.endm
.macro waituart,r d ,r x
.endm