2010-12-01 07:45:00 +01:00
/ *
* The h e a d - f i l e f o r S H - M o b i l e A R M p l a t f o r m s
*
* Kuninori M o r i m o t o < k u n i n o r i . m o r i m o t o . g x @renesas.com>
* Simon H o r m a n < h o r m s @verge.net.au>
*
* 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 ; version 2 of the License.
*
* 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 1 F r a n k l i n S t , F i f t h F l o o r , B o s t o n , M A 0 2 1 1 0 - 1 3 0 1 U S A
* /
# ifdef C O N F I G _ Z B O O T _ R O M
.section " .start " , " ax"
/* load board-specific initialization code */
# include < m a c h / z b o o t . h >
2011-04-26 06:29:53 +01:00
# if d e f i n e d ( C O N F I G _ Z B O O T _ R O M _ M M C I F ) | | d e f i n e d ( C O N F I G _ Z B O O T _ R O M _ S H _ M O B I L E _ S D H I )
/* Load image from MMC/SD */
adr s p , _ _ t m p _ s t a c k + 2 5 6
2011-01-11 04:01:08 +01:00
ldr r0 , _ _ i m a g e _ s t a r t
ldr r1 , _ _ i m a g e _ e n d
subs r1 , r1 , r0
ldr r0 , _ _ l o a d _ b a s e
2011-04-26 06:29:53 +01:00
bl m m c _ l o a d e r
2011-01-11 04:01:08 +01:00
/* Jump to loaded code */
ldr r0 , _ _ l o a d e d
ldr r1 , _ _ i m a g e _ s t a r t
sub r0 , r0 , r1
ldr r1 , _ _ l o a d _ b a s e
add p c , r0 , r1
__image_start :
.long _start
__image_end :
.long _got_end
__load_base :
.long CONFIG_MEMORY_START + 0 x0 2 0 0 0 0 0 0 @ Load at 32Mb into SDRAM
__loaded :
.long __continue
.align
__tmp_stack :
2011-04-26 06:29:53 +01:00
.space 256
2011-01-11 04:01:08 +01:00
__continue :
2011-04-26 06:29:53 +01:00
# endif / * C O N F I G _ Z B O O T _ R O M _ M M C | | C O N F I G _ Z B O O T _ R O M _ S H _ M O B I L E _ S D H I * /
2011-01-11 04:01:08 +01:00
2010-12-01 07:45:00 +01:00
b 1 f
__atags : @ tag #1
.long 12 @ tag->hdr.size = tag_size(tag_core);
.long 0x54410001 @ tag->hdr.tag = ATAG_CORE;
.long 0 @ tag->u.core.flags = 0;
.long 0 @ tag->u.core.pagesize = 0;
.long 0 @ tag->u.core.rootdev = 0;
@ tag #2
.long 8 @ tag->hdr.size = tag_size(tag_mem32);
.long 0x54410002 @ tag->hdr.tag = ATAG_MEM;
.long CONFIG_MEMORY_SIZE @ tag->u.mem.size = CONFIG_MEMORY_SIZE;
.long CONFIG_MEMORY_START @ @ tag->u.mem.start = CONFIG_MEMORY_START;
@ tag #3
.long 0 @ tag->hdr.size = 0
.long 0 @ tag->hdr.tag = ATAG_NONE;
1 :
/* Set board ID necessary for boot */
ldr r7 , 1 f @ Set machine type register
adr r8 , _ _ a t a g s @ Set atag register
b 2 f
1 : .long MACH_TYPE
2 :
# endif / * C O N F I G _ Z B O O T _ R O M * /