diff options
author | Mikael Starvik <mikael.starvik@axis.com> | 2005-07-27 14:44:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-27 19:26:01 -0400 |
commit | 51533b615e605d86154ec1b4e585c8ca1b0b15b7 (patch) | |
tree | 4a6d7d8494d2017632d83624fb71b36031e0e7e5 /arch/cris/arch-v32/boot/rescue | |
parent | 5d01e6ce785884a5db5792cd2e5bb36fa82fe23c (diff) |
[PATCH] CRIS update: new subarchitecture v32
New CRIS sub architecture named v32.
From: Dave Jones <davej@redhat.com>
Fix swapped kmalloc args
Signed-off-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/cris/arch-v32/boot/rescue')
-rw-r--r-- | arch/cris/arch-v32/boot/rescue/Makefile | 36 | ||||
-rw-r--r-- | arch/cris/arch-v32/boot/rescue/head.S | 39 | ||||
-rw-r--r-- | arch/cris/arch-v32/boot/rescue/rescue.ld | 20 |
3 files changed, 95 insertions, 0 deletions
diff --git a/arch/cris/arch-v32/boot/rescue/Makefile b/arch/cris/arch-v32/boot/rescue/Makefile new file mode 100644 index 000000000000..f668a8198724 --- /dev/null +++ b/arch/cris/arch-v32/boot/rescue/Makefile | |||
@@ -0,0 +1,36 @@ | |||
1 | # | ||
2 | # Makefile for rescue code | ||
3 | # | ||
4 | target = $(target_rescue_dir) | ||
5 | src = $(src_rescue_dir) | ||
6 | |||
7 | CC = gcc-cris -mlinux -march=v32 $(LINUXINCLUDE) | ||
8 | CFLAGS = -O2 | ||
9 | LD = gcc-cris -mlinux -march=v32 -nostdlib | ||
10 | OBJCOPY = objcopy-cris | ||
11 | OBJCOPYFLAGS = -O binary --remove-section=.bss | ||
12 | |||
13 | all: $(target)/rescue.bin | ||
14 | |||
15 | rescue: rescue.bin | ||
16 | # do nothing | ||
17 | |||
18 | $(target)/rescue.bin: $(target) $(target)/head.o | ||
19 | $(LD) -T $(src)/rescue.ld -o $(target)/rescue.o $(target)/head.o | ||
20 | $(OBJCOPY) $(OBJCOPYFLAGS) $(target)/rescue.o $(target)/rescue.bin | ||
21 | cp -p $(target)/rescue.bin $(objtree) | ||
22 | |||
23 | $(target): | ||
24 | mkdir -p $(target) | ||
25 | |||
26 | $(target)/head.o: $(src)/head.S | ||
27 | $(CC) -D__ASSEMBLY__ -c $< -o $*.o | ||
28 | |||
29 | clean: | ||
30 | rm -f $(target)/*.o $(target)/*.bin | ||
31 | |||
32 | fastdep: | ||
33 | |||
34 | modules: | ||
35 | |||
36 | modules-install: | ||
diff --git a/arch/cris/arch-v32/boot/rescue/head.S b/arch/cris/arch-v32/boot/rescue/head.S new file mode 100644 index 000000000000..61ede5f30f99 --- /dev/null +++ b/arch/cris/arch-v32/boot/rescue/head.S | |||
@@ -0,0 +1,39 @@ | |||
1 | /* $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 | |||
36 | copy_complete: | ||
37 | move.d 0x38000000 + CONFIG_ETRAX_PTABLE_SECTOR, $r10 | ||
38 | jump $r10 ; Jump to decompresser | ||
39 | nop | ||
diff --git a/arch/cris/arch-v32/boot/rescue/rescue.ld b/arch/cris/arch-v32/boot/rescue/rescue.ld new file mode 100644 index 000000000000..42b11aa122b2 --- /dev/null +++ b/arch/cris/arch-v32/boot/rescue/rescue.ld | |||
@@ -0,0 +1,20 @@ | |||
1 | MEMORY | ||
2 | { | ||
3 | flash : ORIGIN = 0x00000000, | ||
4 | LENGTH = 0x00100000 | ||
5 | } | ||
6 | |||
7 | SECTIONS | ||
8 | { | ||
9 | .text : | ||
10 | { | ||
11 | stext = . ; | ||
12 | *(.text) | ||
13 | etext = . ; | ||
14 | } > flash | ||
15 | .data : | ||
16 | { | ||
17 | *(.data) | ||
18 | edata = . ; | ||
19 | } > flash | ||
20 | } | ||