@ -31,22 +31,22 @@
# include < v e r s i o n . h >
# include < a s m / a r c h / m e m . h >
# include < a s m / a r c h / c l o c k s _ o m a p3 . h >
# include < l i n u x / l i n k a g e . h >
_TEXT_BASE :
.word CONFIG_SYS_TEXT_BASE /* sdram load addr from config.mk */
# ifdef C O N F I G _ S P L _ B U I L D
.global save_boot_params
save_boot_params :
ENTRY( s a v e _ b o o t _ p a r a m s )
ldr r4 , =omap3_boot_device
ldr r5 , [ r0 , #0x4 ]
and r5 , r5 , #0xff
str r5 , [ r4 ]
bx l r
ENDPROC( s a v e _ b o o t _ p a r a m s )
# endif
.global omap3_gp_romcode_call
omap3_gp_romcode_call :
ENTRY( o m a p3 _ g p _ r o m c o d e _ c a l l )
PUSH { r4 - r12 , l r } @ Save all registers from ROM code!
MOV r12 , r0 @ Copy the Service ID in R12
MOV r0 , r1 @ Copy parameter to R0
@ -55,6 +55,7 @@ omap3_gp_romcode_call:
.word 0xe1600070 @ SMC #0 to enter monitor - hand assembled
@ because we use -march=armv5
POP { r4 - r12 , p c }
ENDPROC( o m a p3 _ g p _ r o m c o d e _ c a l l )
/ *
* Funtion f o r m a k i n g P P A H A L A P I c a l l s i n s e c u r e d e v i c e s
@ -62,8 +63,7 @@ omap3_gp_romcode_call:
* R0 - S e r v i c e I D
* R1 - p a r a m e r l i s t
* /
.global do_omap3_emu_romcode_call
do_omap3_emu_romcode_call :
ENTRY( d o _ o m a p3 _ e m u _ r o m c o d e _ c a l l )
PUSH { r4 - r12 , l r } @ Save all registers from ROM code!
MOV r12 , r0 @ Copy the Secure Service ID in R12
MOV r3 , r1 @ Copy the pointer to va_list in R3
@ -76,14 +76,14 @@ do_omap3_emu_romcode_call:
.word 0xe1600071 @ SMC #1 to call PPA service - hand assembled
@ because we use -march=armv5
POP { r4 - r12 , p c }
ENDPROC( d o _ o m a p3 _ e m u _ r o m c o d e _ c a l l )
# if ! d e f i n e d ( C O N F I G _ S Y S _ N A N D _ B O O T ) & & ! d e f i n e d ( C O N F I G _ S Y S _ N A N D _ B O O T )
/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* cpy_clk_code : relocates c l o c k c o d e i n t o S R A M w h e r e i t s s a f e r t o e x e c u t e
* R1 = S R A M d e s t i n a t i o n a d d r e s s .
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
.global cpy_clk_code
cpy_clk_code :
ENTRY( c p y _ c l k _ c o d e )
/* Copy DPLL code into SRAM */
adr r0 , g o _ t o _ s p e e d / * g e t a d d r o f c l o c k s e t t i n g c o d e * /
mov r2 , #384 / * r2 s i z e t o c o p y ( d i v b y 3 2 b y t e s ) * /
@ -95,6 +95,7 @@ next2:
cmp r0 , r2 / * u n t i l s o u r c e e n d a d d r e s s [ r2 ] * /
bne n e x t 2
mov p c , l r / * b a c k t o c a l l e r * /
ENDPROC( c p y _ c l k _ c o d e )
/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* go_to_speed : - Moves t o b y p a s s , - C o m m i t s c l o c k d i v i d e r s , - p u t s d p l l a t s p e e d
@ -109,8 +110,7 @@ next2:
* L3 w h e n i t s n o t i n s e l f r e f r e s h s e e m s b a d f o r i t . N o r m a l l y , t h i s
* code r u n s f r o m f l a s h b e f o r e S D R i s i n i t s o t h a t s h o u l d b e o k .
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
.global go_to_speed
go_to_speed :
ENTRY( g o _ t o _ s p e e d )
stmfd s p ! , { r4 - r6 }
/* move into fast relock bypass */
@ -171,6 +171,7 @@ wait2:
nop
ldmfd s p ! , { r4 - r6 }
mov p c , l r / * b a c k t o c a l l e r , l o c k e d * /
ENDPROC( g o _ t o _ s p e e d )
_go_to_speed : .word g o _ t o _ s p e e d
@ -211,8 +212,7 @@ pll_div_val5:
# endif
.globl lowlevel_init
lowlevel_init :
ENTRY( l o w l e v e l _ i n i t )
ldr s p , S R A M _ S T A C K
str i p , [ s p ] / * s t a s h o l d l i n k r e g i s t e r * /
mov i p , l r / * s a v e l i n k r e g a c r o s s c a l l * /
@ -230,6 +230,7 @@ lowlevel_init:
/* back to arch calling code */
mov p c , l r
ENDPROC( l o w l e v e l _ i n i t )
/* the literal pools origin */
.ltorg
@ -480,22 +481,22 @@ per_36x_dpll_param:
.word 2 6 0 0 0 , 4 3 2 , 1 2 , 9 , 1 6 , 9 , 4 , 3 , 1
.word 3 8 4 0 0 , 3 6 0 , 1 5 , 9 , 1 6 , 5 , 4 , 3 , 1
.globl get_36x_mpu_dpll_param
get_36x_mpu_dpll_param :
ENTRY( g e t _ 3 6 x _ m p u _ d p l l _ p a r a m )
adr r0 , m p u _ 3 6 x _ d p l l _ p a r a m
mov p c , l r
ENDPROC( g e t _ 3 6 x _ m p u _ d p l l _ p a r a m )
.globl get_36x_iva_dpll_param
get_36x_iva_dpll_param :
ENTRY( g e t _ 3 6 x _ i v a _ d p l l _ p a r a m )
adr r0 , i v a _ 3 6 x _ d p l l _ p a r a m
mov p c , l r
ENDPROC( g e t _ 3 6 x _ i v a _ d p l l _ p a r a m )
.globl get_36x_core_dpll_param
get_36x_core_dpll_param :
ENTRY( g e t _ 3 6 x _ c o r e _ d p l l _ p a r a m )
adr r0 , c o r e _ 3 6 x _ d p l l _ p a r a m
mov p c , l r
ENDPROC( g e t _ 3 6 x _ c o r e _ d p l l _ p a r a m )
.globl get_36x_per_dpll_param
get_36x_per_dpll_param :
ENTRY( g e t _ 3 6 x _ p e r _ d p l l _ p a r a m )
adr r0 , p e r _ 3 6 x _ d p l l _ p a r a m
mov p c , l r
ENDPROC( g e t _ 3 6 x _ p e r _ d p l l _ p a r a m )