2009-04-28 19:21:52 +04:00
/ *
* Secondary C P U s t a r t u p r o u t i n e s o u r c e f i l e .
*
* Copyright ( C ) 2 0 0 9 T e x a s I n s t r u m e n t s , I n c .
*
* Author :
* Santosh S h i l i m k a r < s a n t o s h . s h i l i m k a r @ti.com>
*
* Interface f u n c t i o n s n e e d e d f o r t h e S M P . T h i s f i l e i s b a s e d o n a r m
* realview s m p p l a t f o r m .
* Copyright ( c ) 2 0 0 3 A R M L i m i t e d .
*
* This p r o g r a m i s f r e e s o f t w a r e ,y o u c a n r e d i s t r i b u t e i t a n d / o r m o d i f y
* 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 .
* /
# include < l i n u x / l i n k a g e . h >
# include < l i n u x / i n i t . h >
/* Physical address needed since MMU not enabled yet on secondary core */
# define O M A P 4 _ A U X _ C O R E _ B O O T 1 _ P A 0 x48 2 8 1 8 0 4
_ _ INIT
/ *
* OMAP4 s p e c i f i c e n t r y p o i n t f o r s e c o n d a r y C P U t o j u m p f r o m R O M
* code. T h i s r o u t i n e a l s o p r o v i d e s a h o l d i n g f l a g i n t o w h i c h
* secondary c o r e i s h e l d u n t i l w e ' r e r e a d y f o r i t t o i n i t i a l i s e .
2009-12-12 03:16:35 +03:00
* The p r i m a r y c o r e w i l l u p d a t e t h i s f l a g u s i n g a h a r d w a r e
* register A u x C o r e B o o t 0 .
2009-04-28 19:21:52 +04:00
* /
ENTRY( o m a p _ s e c o n d a r y _ s t a r t u p )
2009-12-12 03:16:35 +03:00
hold : ldr r12 ,=0x103
dsb
2010-04-07 11:47:21 +04:00
smc #0 @ read from AuxCoreBoot0
2009-12-12 03:16:35 +03:00
mov r0 , r0 , l s r #9
mrc p15 , 0 , r4 , c0 , c0 , 5
and r4 , r4 , #0x0f
cmp r0 , r4
2009-04-28 19:21:52 +04:00
bne h o l d
/ *
2009-12-12 03:16:35 +03:00
* we' v e b e e n r e l e a s e d f r o m t h e w a i t l o o p ,s e c o n d a r y _ s t a c k
2009-04-28 19:21:52 +04:00
* should n o w c o n t a i n t h e S V C s t a c k f o r t h i s c o r e
* /
b s e c o n d a r y _ s t a r t u p
2009-12-12 03:16:35 +03:00
END( o m a p _ s e c o n d a r y _ s t a r t u p )
2009-04-28 19:21:52 +04:00