CRIS v10: Update rescue head.s
- Correct whitespace problems. - Add ifdef for ETRAX_AXISFLASHMAP to avoid compile error when not set.
This commit is contained in:
Родитель
63e6b9a0b8
Коммит
8c11bffae7
|
@ -1,5 +1,4 @@
|
|||
/* $Id: head.S,v 1.7 2005/03/07 12:11:06 starvik Exp $
|
||||
*
|
||||
/*
|
||||
* Rescue code, made to reside at the beginning of the
|
||||
* flash-memory. when it starts, it checks a partition
|
||||
* table at the first sector after the rescue sector.
|
||||
|
@ -60,9 +59,11 @@
|
|||
* During the wait for serial input, the status LED will flash so the
|
||||
* user knows something went wrong.
|
||||
*
|
||||
* Copyright (C) 1999, 2000, 2001, 2002, 2003 Axis Communications AB
|
||||
* Copyright (C) 1999-2007 Axis Communications AB
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_ETRAX_AXISFLASHMAP
|
||||
|
||||
#define ASSEMBLER_MACROS_ONLY
|
||||
#include <asm/arch/sv_addr_ag.h>
|
||||
|
||||
|
@ -118,7 +119,7 @@
|
|||
|
||||
;; This is the entry point of the rescue code
|
||||
;; 0x80000000 if loaded in flash (as it should be)
|
||||
;; since etrax actually starts at address 2 when booting from flash, we
|
||||
;; Since etrax actually starts at address 2 when booting from flash, we
|
||||
;; put a nop (2 bytes) here first so we dont accidentally skip the di
|
||||
|
||||
nop
|
||||
|
@ -128,10 +129,11 @@
|
|||
in_cache:
|
||||
|
||||
|
||||
;; first put a jump test to give a possibility of upgrading the rescue code
|
||||
;; without erasing/reflashing the sector. we put a longword of -1 here and if
|
||||
;; it is not -1, we jump using the value as jump target. since we can always
|
||||
;; change 1's to 0's without erasing the sector, it is possible to add new
|
||||
;; First put a jump test to give a possibility of upgrading the
|
||||
;; rescue code without erasing/reflashing the sector.
|
||||
;; We put a longword of -1 here and if it is not -1, we jump using
|
||||
;; the value as jump target. Since we can always change 1's to 0's
|
||||
;; without erasing the sector, it is possible to add new
|
||||
;; code after this and altering the jumptarget in an upgrade.
|
||||
|
||||
jtcd: move.d [jumptarget], $r0
|
||||
|
@ -214,7 +216,6 @@ bosse: move.d [$r3+], $r5 ; checksum
|
|||
nop
|
||||
move.d $r1, $r7 ; remember boot partition offset
|
||||
1:
|
||||
|
||||
add.d PTABLE_START, $r1
|
||||
|
||||
jsr checksum ; checksum the partition
|
||||
|
@ -302,7 +303,8 @@ wait_ser:
|
|||
|
||||
;; jump into downloaded code
|
||||
|
||||
move.d RAM_INIT_MAGIC, $r8 ; Tell next product that DRAM is initialized
|
||||
move.d RAM_INIT_MAGIC, $r8 ; Tell next product that DRAM is
|
||||
; initialized
|
||||
jump CODE_START
|
||||
|
||||
flash_ok:
|
||||
|
@ -313,7 +315,8 @@ flash_ok:
|
|||
nop
|
||||
move.d PTABLE_START, $r7; otherwise use the ptable start
|
||||
1:
|
||||
move.d RAM_INIT_MAGIC, $r8 ; Tell next product that DRAM is initialized
|
||||
move.d RAM_INIT_MAGIC, $r8 ; Tell next product that DRAM is
|
||||
; initialized
|
||||
jump $r7 ; boot!
|
||||
|
||||
|
||||
|
@ -327,7 +330,7 @@ checksum:
|
|||
moveq 0, $r0
|
||||
moveq CONFIG_ETRAX_FLASH1_SIZE, $r6
|
||||
|
||||
;; If the first physical flash memory is exceeded wrap to the second one.
|
||||
;; If the first physical flash memory is exceeded wrap to the second one
|
||||
btstq 26, $r1 ; Are we addressing first flash?
|
||||
bpl 1f
|
||||
nop
|
||||
|
@ -351,3 +354,5 @@ checksum:
|
|||
3: move.d MEM_CSE1_START, $r1 ; wrap to second flash
|
||||
ba 2b
|
||||
nop
|
||||
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче