aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/arch-v32
diff options
context:
space:
mode:
authorJesper Nilsson <jesper.nilsson@axis.com>2007-11-30 11:20:00 -0500
committerJesper Nilsson <jesper.nilsson@axis.com>2008-02-08 05:06:27 -0500
commit3f50c0673cf5edd2c6bb76243410c3cd59b3b62d (patch)
tree85bdd17d7c9828e47beb1d56595b3d3f136b6404 /arch/cris/arch-v32
parenta5d204bf368ed9f326d0ce46b47523a786203acb (diff)
CRIS v32: Update boot/rescue/head.S code.
- Add ifdef for ETRAX_AXISFLASHMAP to avoid compiling file unless it is set. - Use assembler macros for setting up clocks. - Don't copy image, just jump to it (only works for NOR flash)
Diffstat (limited to 'arch/cris/arch-v32')
-rw-r--r--arch/cris/arch-v32/boot/rescue/head.S42
1 files changed, 15 insertions, 27 deletions
diff --git a/arch/cris/arch-v32/boot/rescue/head.S b/arch/cris/arch-v32/boot/rescue/head.S
index 8cdb4011bc16..5f846b7700a3 100644
--- a/arch/cris/arch-v32/boot/rescue/head.S
+++ b/arch/cris/arch-v32/boot/rescue/head.S
@@ -1,38 +1,26 @@
1/* $Id: head.S,v 1.4 2004/11/01 16:10:28 starvik Exp $ 1/*
2 * Just get started by jumping to CONFIG_ETRAX_PTABLE_SECTOR to start
3 * kernel decompressor.
4 *
5 * In practice, this only works for NOR flash (or some convoluted RAM boot)
6 * and hence is not really useful for Artpec-3, so it's Etrax FS / NOR only.
2 * 7 *
3 * This used to be the rescue code but now that is handled by the
4 * RedBoot based RFL instead. Nothing to see here, move along.
5 */ 8 */
6 9
7#include <asm/arch/hwregs/reg_map_asm.h> 10#include <mach/startup.inc>
8#include <asm/arch/hwregs/config_defs_asm.h>
9 11
10 .text 12#ifdef CONFIG_ETRAX_AXISFLASHMAP
11 13
12 ;; Start clocks for used blocks. 14;; Code
13 move.d REG_ADDR(config, regi_config, rw_clk_ctrl), $r1
14 move.d [$r1], $r0
15 or.d REG_STATE(config, rw_clk_ctrl, cpu, yes) | \
16 REG_STATE(config, rw_clk_ctrl, bif, yes) | \
17 REG_STATE(config, rw_clk_ctrl, fix_io, yes), $r0
18 move.d $r0, [$r1]
19 15
20 ;; Copy 68KB NAND flash to Internal RAM (if NAND boot) 16 .text
21 move.d 0x38004000, $r10 17start:
22 move.d 0x8000, $r11
23 move.d 0x11000, $r12
24 move.d copy_complete, $r13
25 and.d 0x000fffff, $r13
26 or.d 0x38000000, $r13
27 18
28#include "../../lib/nand_init.S" 19 ;; Start clocks for used blocks.
20 START_CLOCKS
29 21
30 ;; No NAND found
31 move.d CONFIG_ETRAX_PTABLE_SECTOR, $r10 22 move.d CONFIG_ETRAX_PTABLE_SECTOR, $r10
32 jump $r10 ; Jump to decompresser 23 jump $r10 ; Jump to decompressor
33 nop 24 nop
34 25
35copy_complete: 26#endif
36 move.d 0x38000000 + CONFIG_ETRAX_PTABLE_SECTOR, $r10
37 jump $r10 ; Jump to decompresser
38 nop