@ -11,8 +11,6 @@
# include < l i n u x / s i z e s . h >
# include < a s m / s y s t e m . h >
# include " s s c - r e g s . h "
ENTRY( l o w l e v e l _ i n i t )
mov r8 , l r @ persevere link reg across call
@ -88,39 +86,37 @@ ENDPROC(enable_mmu)
* /
# define B O O T _ R A M _ S I Z E ( S Z _ 3 2 K )
# define B O O T _ R A M _ B A S E ( ( C O N F I G _ S P L _ S T A C K ) - ( B O O T _ R A M _ S I Z E ) )
# define B O O T _ W A Y _ B I T S ( 0 x00 0 0 0 1 0 0 ) / * w a y 8 * /
# define B O O T _ R A M _ W A Y S ( 0 x00 0 0 0 1 0 0 ) @ way 8
# define S S C O _ B A S E 0 x50 6 c00 0 0
# define S S C O P E 0 x24 4
# define S S C O Q M 0 x24 8
# define S S C O Q A D 0 x24 c
# define S S C O Q S Z 0 x25 0
# define S S C O Q W N 0 x25 8
# define S S C O P P Q S E F 0 x25 c
# define S S C O L P Q S 0 x26 0
ENTRY( s e t u p _ i n i t _ r a m )
/ *
* Touch t o z e r o f o r t h e b o o t w a y
* /
0 :
/ *
* set U N I P H I E R _ S S C O Q M , U N I P H I E R _ S S C O Q A D , U N I P H I E R _ S S C O Q S Z , U N I P H I E R _ S S C O Q W N i n t h i s o r d e r
* /
ldr r0 , = 0 x00 4 0 8 0 0 6 @ touch to zero with address range
ldr r1 , = U N I P H I E R _ S S C O Q M
str r0 , [ r1 ]
ldr r1 , = S S C O _ B A S E
/* Touch to zero for the boot way */
0 : ldr r0 , = 0 x00 4 0 8 0 0 6 @ touch to zero with address range
str r0 , [ r1 , #S S C O Q M ]
ldr r0 , = B O O T _ R A M _ B A S E
ldr r1 , = U N I P H I E R _ S S C O Q A D
str r0 , [ r1 ]
str r0 , [ r1 , #S S C O Q A D ]
ldr r0 , = B O O T _ R A M _ S I Z E
ldr r1 , = U N I P H I E R _ S S C O Q S Z
str r0 , [ r1 ]
ldr r0 , = B O O T _ W A Y _ B I T S
ldr r1 , = U N I P H I E R _ S S C O Q W N
str r0 , [ r1 ]
ldr r1 , = U N I P H I E R _ S S C O P P Q S E F
ldr r0 , [ r1 ]
str r0 , [ r1 , #S S C O Q S Z ]
ldr r0 , = B O O T _ R A M _ W A Y S
str r0 , [ r1 , #S S C O Q W N ]
ldr r0 , [ r1 , #S S C O P P Q S E F ]
cmp r0 , #0 @ check if the command is successfully set
bne 0 b @ try again if an error occurs
ldr r1 , = U N I P H I E R _ S S C O L P Q S
1 :
ldr r0 , [ r1 ]
1 : ldr r0 , [ r1 , #S S C O L P Q S ]
cmp r0 , #0x4
bne 1 b @ wait until the operation is completed
str r0 , [ r1 ] @ clear the complete notification flag
str r0 , [ r1 , #S S C O L P Q S ] @ c l e a r t h e c o m p l e t e n o t i f i c a t i o n f l a g
mov p c , l r
ENDPROC( s e t u p _ i n i t _ r a m )