blob: 61ede5f30f99451243156d66c25a653788c92b39 [file] [log] [blame]
Mikael Starvik51533b62005-07-27 11:44:44 -07001/* $Id: head.S,v 1.4 2004/11/01 16:10:28 starvik Exp $
2 *
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 */
6
7#include <linux/config.h>
8#include <asm/arch/hwregs/reg_map_asm.h>
9#include <asm/arch/hwregs/config_defs_asm.h>
10
11 .text
12
13 ;; Start clocks for used blocks.
14 move.d REG_ADDR(config, regi_config, rw_clk_ctrl), $r1
15 move.d [$r1], $r0
16 or.d REG_STATE(config, rw_clk_ctrl, cpu, yes) | \
17 REG_STATE(config, rw_clk_ctrl, bif, yes) | \
18 REG_STATE(config, rw_clk_ctrl, fix_io, yes), $r0
19 move.d $r0, [$r1]
20
21 ;; Copy 68KB NAND flash to Internal RAM (if NAND boot)
22 move.d 0x38004000, $r10
23 move.d 0x8000, $r11
24 move.d 0x11000, $r12
25 move.d copy_complete, $r13
26 and.d 0x000fffff, $r13
27 or.d 0x38000000, $r13
28
29#include "../../lib/nand_init.S"
30
31 ;; No NAND found
32 move.d CONFIG_ETRAX_PTABLE_SECTOR, $r10
33 jump $r10 ; Jump to decompresser
34 nop
35
36copy_complete:
37 move.d 0x38000000 + CONFIG_ETRAX_PTABLE_SECTOR, $r10
38 jump $r10 ; Jump to decompresser
39 nop