2007-04-30 19:37:19 +01:00
/ *
* Low- l e v e l I R Q h e l p e r m a c r o s f o r T I D a V i n c i - b a s e d p l a t f o r m s
*
* Author : Kevin H i l m a n , M o n t a V i s t a S o f t w a r e , I n c . < s o u r c e @mvista.com>
*
* 2 0 0 7 ( c) M o n t a V i s t a S o f t w a r e , I n c . T h i s f i l e i s l i c e n s e d u n d e r
* the 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 . T h i s p r o g r a m
* is l i c e n s e d " a s i s " w i t h o u t a n y w a r r a n t y o f a n y k i n d , w h e t h e r e x p r e s s
* or i m p l i e d .
* /
2008-08-05 16:14:15 +01:00
# include < m a c h / i o . h >
# include < m a c h / i r q s . h >
2007-04-30 19:37:19 +01:00
.macro disable_fiq
.endm
.macro get_ i r q n r _ p r e a m b l e , b a s e , t m p
2009-04-15 12:40:00 -07:00
ldr \ b a s e , =davinci_intc_base
ldr \ b a s e , [ \ b a s e ]
2007-04-30 19:37:19 +01:00
.endm
.macro arch_ r e t _ t o _ u s e r , t m p1 , t m p2
.endm
.macro get_ i r q n r _ a n d _ b a s e , i r q n r , i r q s t a t , b a s e , t m p
2009-04-15 12:41:40 -07:00
# if d e f i n e d ( C O N F I G _ A I N T C ) & & d e f i n e d ( C O N F I G _ C P _ I N T C )
ldr \ t m p , =davinci_intc_type
ldr \ t m p , [ \ t m p ]
cmp \ t m p , #D A V I N C I _ I N T C _ T Y P E _ C P _ I N T C
beq 1 0 0 1 f
# endif
# if d e f i n e d ( C O N F I G _ A I N T C )
2007-04-30 19:37:19 +01:00
ldr \ t m p , [ \ b a s e , #0x14 ]
2008-02-11 14:44:07 -07:00
movs \ t m p , \ t m p , l s r #2
2007-04-30 19:37:19 +01:00
sub \ i r q n r , \ t m p , #1
2009-04-15 12:41:40 -07:00
b 1 0 0 2 f
# endif
# if d e f i n e d ( C O N F I G _ C P _ I N T C )
1001 : ldr \ i r q n r , [ \ b a s e , #0x80 ] / * g e t i r q n u m b e r * /
and \ i r q n r , \ i r q n r , #0xff / * i r q i s i n b i t s 0 - 9 * /
mov \ t m p , \ i r q n r , l s r #3
and \ t m p , \ t m p , #0xfc
add \ t m p , \ t m p , #0x280 / * g e t t h e r e g i s t e r o f f s e t * /
ldr \ i r q s t a t , [ \ b a s e , \ t m p ] / * g e t t h e i n t c s t a t u s * /
cmp \ i r q s t a t , #0x0
# endif
1002 :
2007-04-30 19:37:19 +01:00
.endm
.macro irq_prio_table
.endm