2011-10-04 15:25:51 +04:00
/ * linux/ a r c h / a r m / p l a t - s5 p / s l e e p . S
2011-03-10 07:33:59 +03:00
*
* Copyright ( c ) 2 0 1 1 S a m s u n g E l e c t r o n i c s C o . , L t d .
* http : / / www. s a m s u n g . c o m
*
2011-10-04 15:25:51 +04:00
* Common S 5 P S l e e p C o d e
* Based o n S 3 C 6 4 X X s l e e p c o d e b y :
* Ben D o o k s , ( c ) 2 0 0 8 S i m t e c E l e c t r o n i c s
2011-03-10 07:33:59 +03:00
*
* 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 a s p u b l i s h e d b y
* the F r e e S o f t w a r e F o u n d a t i o n ; either version 2 of the License, or
* ( at y o u r o p t i o n ) a n y l a t e r v e r s i o n .
*
* This p r o g r a m i s d i s t r i b u t e d i n t h e h o p e t h a t i t w i l l b e u s e f u l ,
* but W I T H O U T A N Y W A R R A N T Y ; without even the implied warranty of
* MERCHANTABILITY o r F I T N E S S F O R A P A R T I C U L A R P U R P O S E . S e e t h e
* GNU G e n e r a l P u b l i c L i c e n s e f o r m o r e d e t a i l s .
*
* You s h o u l d h a v e r e c e i v e d a c o p y 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
* along w i t h t h i s p r o g r a m ; if not, write to the Free Software
* Foundation, I n c . , 5 9 T e m p l e P l a c e , S u i t e 3 3 0 , B o s t o n , M A 0 2 1 1 1 - 1 3 0 7 U S A
* /
# include < l i n u x / l i n k a g e . h >
# include < a s m / a s s e m b l e r . h >
.text
/ *
* sleep m a g i c , t o a l l o w t h e b o o t l o a d e r t o c h e c k f o r a n v a l i d
* image t o r e s u m e t o . M u s t b e t h e f i r s t w o r d b e f o r e t h e
* s3 c _ c p u _ r e s u m e e n t r y .
* /
.word 0x2bedf00d
/ *
* s3 c _ c p u _ r e s u m e
*
* resume c o d e e n t r y f o r b o o t l o a d e r t o c a l l
*
* we m u s t p u t t h i s c o d e h e r e i n t h e d a t a s e g m e n t a s w e h a v e n o
* other w a y o f r e s t o r i n g t h e s t a c k p o i n t e r a f t e r s l e e p , a n d w e
* must n o t w r i t e t o t h e c o d e s e g m e n t ( c o d e i s r e a d - o n l y )
* /
ENTRY( s3 c _ c p u _ r e s u m e )
b c p u _ r e s u m e