2005-04-16 15:20:36 -07:00
/ *
2008-08-05 16:14:15 +01:00
* arch/ a r m / m a c h - i x p4 x x / i n c l u d e / m a c h / e n t r y - m a c r o . S
2005-04-16 15:20:36 -07: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 I X P 4 x x - b a s e d p l a t f o r m s
*
* This f i l e i s l i c e n s e d 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
* License v e r s i o n 2 . T h i s p r o g r a m i s l i c e n s e d " a s i s " w i t h o u t a n y
* warranty o f a n y k i n d , w h e t h e r e x p r e s s o r i m p l i e d .
* /
2008-08-05 16:14:15 +01:00
# include < m a c h / h a r d w a r e . h >
2005-04-16 15:20:36 -07:00
.macro disable_fiq
.endm
2007-02-16 22:16:32 +01:00
.macro get_ i r q n r _ p r e a m b l e , b a s e , t m p
.endm
.macro arch_ r e t _ t o _ u s e r , t m p1 , t m p2
.endm
2005-04-16 15:20:36 -07:00
.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
ldr \ i r q s t a t , = ( I X P 4 X X _ I N T C _ B A S E _ V I R T + I X P 4 X X _ I C I P _ O F F S E T )
ldr \ i r q s t a t , [ \ i r q s t a t ] @ get interrupts
cmp \ i r q s t a t , #0
2005-10-18 07:53:35 +01:00
beq 1 0 0 1 f @ upper IRQ?
2005-04-16 15:20:36 -07:00
clz \ i r q n r , \ i r q s t a t
mov \ b a s e , #31
2005-10-18 07:53:35 +01:00
sub \ i r q n r , \ b a s e , \ i r q n r
b 1 0 0 2 f @ lower IRQ being
@ handled
2005-04-16 15:20:36 -07:00
1001 :
/ *
2007-04-06 15:00:31 +01:00
* IXP4 6 5 / I X P 4 3 5 h a s a n u p p e r I R Q s t a t u s r e g i s t e r
2005-04-16 15:20:36 -07:00
* /
2007-04-06 15:00:31 +01:00
# if d e f i n e d ( C O N F I G _ C P U _ I X P 4 6 X ) | | d e f i n e d ( C O N F I G _ C P U _ I X P 4 3 X )
2005-04-16 15:20:36 -07:00
ldr \ i r q s t a t , = ( I X P 4 X X _ I N T C _ B A S E _ V I R T + I X P 4 X X _ I C I P 2 _ O F F S E T )
ldr \ i r q s t a t , [ \ i r q s t a t ] @ get upper interrupts
mov \ i r q n r , #63
clz \ i r q s t a t , \ i r q s t a t
cmp \ i r q s t a t , #32
subne \ i r q n r , \ i r q n r , \ i r q s t a t
# endif
2005-10-18 07:53:35 +01:00
1002 :
2005-04-16 15:20:36 -07:00
.endm