aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/arch-v32
diff options
context:
space:
mode:
Diffstat (limited to 'arch/cris/arch-v32')
-rw-r--r--arch/cris/arch-v32/boot/Makefile20
-rw-r--r--arch/cris/arch-v32/boot/compressed/Makefile26
-rw-r--r--arch/cris/arch-v32/boot/compressed/README24
-rw-r--r--arch/cris/arch-v32/boot/compressed/decompress.lds30
-rw-r--r--arch/cris/arch-v32/boot/compressed/head.S145
-rw-r--r--arch/cris/arch-v32/boot/compressed/misc.c318
-rw-r--r--arch/cris/arch-v32/boot/rescue/Makefile26
-rw-r--r--arch/cris/arch-v32/boot/rescue/head.S26
-rw-r--r--arch/cris/arch-v32/boot/rescue/rescue.lds43
-rw-r--r--arch/cris/arch-v32/drivers/mach-a3/gpio.c4
-rw-r--r--arch/cris/arch-v32/kernel/Makefile2
-rw-r--r--arch/cris/arch-v32/kernel/entry.S8
12 files changed, 10 insertions, 662 deletions
diff --git a/arch/cris/arch-v32/boot/Makefile b/arch/cris/arch-v32/boot/Makefile
deleted file mode 100644
index 99896ad60b30..000000000000
--- a/arch/cris/arch-v32/boot/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
1#
2# arch/cris/arch-v32/boot/Makefile
3#
4
5OBJCOPYFLAGS = -O binary -R .note -R .comment
6
7subdir- := compressed rescue
8targets := Image
9
10$(obj)/Image: vmlinux FORCE
11 $(call if_changed,objcopy)
12 @echo ' Kernel: $@ is ready'
13
14$(obj)/compressed/vmlinux: $(obj)/Image FORCE
15 $(Q)$(MAKE) $(build)=$(obj)/compressed $@
16 $(Q)$(MAKE) $(build)=$(obj)/rescue $(obj)/rescue/rescue.bin
17
18$(obj)/zImage: $(obj)/compressed/vmlinux
19 @cp $< $@
20 @echo ' Kernel: $@ is ready'
diff --git a/arch/cris/arch-v32/boot/compressed/Makefile b/arch/cris/arch-v32/boot/compressed/Makefile
deleted file mode 100644
index e176b8b69d92..000000000000
--- a/arch/cris/arch-v32/boot/compressed/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
1#
2# arch/cris/arch-v32/boot/compressed/Makefile
3#
4
5asflags-y += -I$(srctree)/include/asm/mach/ -I$(srctree)/include/asm/arch
6ccflags-y += -O2 -I$(srctree)/include/asm/mach/ -I$(srctree)/include/asm/arch
7ldflags-y += -T$(srctree)/$(src)/decompress.lds
8OBJECTS = $(obj)/head.o $(obj)/misc.o
9OBJCOPYFLAGS = -O binary --remove-section=.bss
10
11quiet_cmd_image = BUILD $@
12cmd_image = cat $(obj)/decompress.bin $(obj)/piggy.gz > $@
13
14targets := vmlinux piggy.gz decompress.o decompress.bin
15
16$(obj)/decompress.o: $(OBJECTS) FORCE
17 $(call if_changed,ld)
18
19$(obj)/decompress.bin: $(obj)/decompress.o FORCE
20 $(call if_changed,objcopy)
21
22$(obj)/vmlinux: $(obj)/piggy.gz $(obj)/decompress.bin FORCE
23 $(call if_changed,image)
24
25$(obj)/piggy.gz: $(obj)/../Image FORCE
26 $(call if_changed,gzip)
diff --git a/arch/cris/arch-v32/boot/compressed/README b/arch/cris/arch-v32/boot/compressed/README
deleted file mode 100644
index 182c5d75784b..000000000000
--- a/arch/cris/arch-v32/boot/compressed/README
+++ /dev/null
@@ -1,24 +0,0 @@
1Creation of the self-extracting compressed kernel image (vmlinuz)
2-----------------------------------------------------------------
3
4This can be slightly confusing because it's a process with many steps.
5
6The kernel object built by the arch/etrax100/Makefile, vmlinux, is split
7by that makefile into text and data binary files, vmlinux.text and
8vmlinux.data.
9
10Those files together with a ROM filesystem can be catted together and
11burned into a flash or executed directly at the DRAM origin.
12
13They can also be catted together and compressed with gzip, which is what
14happens in this makefile. Together they make up piggy.img.
15
16The decompressor is built into the file decompress.o. It is turned into
17the binary file decompress.bin, which is catted together with piggy.img
18into the file vmlinuz. It can be executed in an arbitrary place in flash.
19
20Be careful - it assumes some things about free locations in DRAM. It
21assumes the DRAM starts at 0x40000000 and that it is at least 8 MB,
22so it puts its code at 0x40700000, and initial stack at 0x40800000.
23
24-Bjorn
diff --git a/arch/cris/arch-v32/boot/compressed/decompress.lds b/arch/cris/arch-v32/boot/compressed/decompress.lds
deleted file mode 100644
index 3c837feca3ac..000000000000
--- a/arch/cris/arch-v32/boot/compressed/decompress.lds
+++ /dev/null
@@ -1,30 +0,0 @@
1/*#OUTPUT_FORMAT(elf32-us-cris) */
2OUTPUT_ARCH (crisv32)
3
4MEMORY
5 {
6 dram : ORIGIN = 0x40700000,
7 LENGTH = 0x00100000
8 }
9
10SECTIONS
11{
12 .text :
13 {
14 _stext = . ;
15 *(.text)
16 *(.rodata)
17 *(.rodata.*)
18 _etext = . ;
19 } > dram
20 .data :
21 {
22 *(.data)
23 _edata = . ;
24 } > dram
25 .bss :
26 {
27 *(.bss)
28 _end = ALIGN( 0x10 ) ;
29 } > dram
30}
diff --git a/arch/cris/arch-v32/boot/compressed/head.S b/arch/cris/arch-v32/boot/compressed/head.S
deleted file mode 100644
index a4a65c5c669e..000000000000
--- a/arch/cris/arch-v32/boot/compressed/head.S
+++ /dev/null
@@ -1,145 +0,0 @@
1/*
2 * Code that sets up the DRAM registers, calls the
3 * decompressor to unpack the piggybacked kernel, and jumps.
4 *
5 * Copyright (C) 1999 - 2006, Axis Communications AB
6 */
7
8#define ASSEMBLER_MACROS_ONLY
9#include <hwregs/asm/reg_map_asm.h>
10#include <mach/startup.inc>
11
12#define RAM_INIT_MAGIC 0x56902387
13#define COMMAND_LINE_MAGIC 0x87109563
14
15 ;; Exported symbols
16
17 .globl input_data
18
19 .text
20_start:
21 di
22
23 ;; Start clocks for used blocks.
24 START_CLOCKS
25
26 ;; Initialize the DRAM registers.
27 cmp.d RAM_INIT_MAGIC, $r8 ; Already initialized?
28 beq dram_init_finished
29 nop
30
31#if defined CONFIG_ETRAXFS
32#include "../../mach-fs/dram_init.S"
33#elif defined CONFIG_CRIS_MACH_ARTPEC3
34#include "../../mach-a3/dram_init.S"
35#else
36#error Only ETRAXFS and ARTPEC-3 supported!
37#endif
38
39dram_init_finished:
40
41 GIO_INIT
42 ;; Setup the stack to a suitably high address.
43 ;; We assume 8 MB is the minimum DRAM and put
44 ;; the SP at the top for now.
45
46 move.d 0x40800000, $sp
47
48 ;; Figure out where the compressed piggyback image is.
49 ;; It is either in [NOR] flash (we don't want to copy it
50 ;; to DRAM before unpacking), or copied to DRAM
51 ;; by the [NAND] flash boot loader.
52 ;; The piggyback image is at _edata, but relative to where the
53 ;; image is actually located in memory, not where it is linked
54 ;; (the decompressor is linked at 0x40700000+ and runs there).
55 ;; Use (_edata - herami) as offset to the current PC.
56
57hereami:
58 lapcq ., $r5 ; get PC
59 and.d 0x7fffffff, $r5 ; strip any non-cache bit
60 move.d $r5, $r0 ; source address of 'herami'
61 add.d _edata, $r5
62 sub.d hereami, $r5 ; r5 = flash address of '_edata'
63 move.d hereami, $r1 ; destination
64
65 ;; Copy text+data to DRAM
66
67 move.d _edata, $r2 ; end destination
681: move.w [$r0+], $r3 ; from herami+ source
69 move.w $r3, [$r1+] ; to hereami+ destination (linked address)
70 cmp.d $r2, $r1 ; finish when destination == _edata
71 bcs 1b
72 nop
73 move.d input_data, $r0 ; for the decompressor
74 move.d $r5, [$r0] ; for the decompressor
75
76 ;; Clear the decompressors BSS (between _edata and _end)
77
78 moveq 0, $r0
79 move.d _edata, $r1
80 move.d _end, $r2
811: move.w $r0, [$r1+]
82 cmp.d $r2, $r1
83 bcs 1b
84 nop
85
86 ;; Save command line magic and address.
87 move.d _cmd_line_magic, $r0
88 move.d $r10, [$r0]
89 move.d _cmd_line_addr, $r0
90 move.d $r11, [$r0]
91
92 ;; Save boot source indicator
93 move.d _boot_source, $r0
94 move.d $r12, [$r0]
95
96 ;; Do the decompression and save compressed size in _inptr
97
98 jsr decompress_kernel
99 nop
100
101 ;; Restore boot source indicator
102 move.d _boot_source, $r12
103 move.d [$r12], $r12
104
105 ;; Restore command line magic and address.
106 move.d _cmd_line_magic, $r10
107 move.d [$r10], $r10
108 move.d _cmd_line_addr, $r11
109 move.d [$r11], $r11
110
111 ;; Put start address of root partition in r9 so the kernel can use it
112 ;; when mounting from flash
113 move.d input_data, $r0
114 move.d [$r0], $r9 ; flash address of compressed kernel
115 move.d inptr, $r0
116 add.d [$r0], $r9 ; size of compressed kernel
117 cmp.d 0x40000000, $r9 ; image in DRAM ?
118 blo enter_kernel ; no, must be [NOR] flash, jump
119 nop ; delay slot
120 and.d 0x001fffff, $r9 ; assume compressed kernel was < 2M
121
122enter_kernel:
123 ;; Enter the decompressed kernel
124 move.d RAM_INIT_MAGIC, $r8 ; Tell kernel that DRAM is initialized
125 jump 0x40004000 ; kernel is linked to this address
126 nop
127
128 .data
129
130input_data:
131 .dword 0 ; used by the decompressor
132_cmd_line_magic:
133 .dword 0
134_cmd_line_addr:
135 .dword 0
136_boot_source:
137 .dword 0
138
139#if defined CONFIG_ETRAXFS
140#include "../../mach-fs/hw_settings.S"
141#elif defined CONFIG_CRIS_MACH_ARTPEC3
142#include "../../mach-a3/hw_settings.S"
143#else
144#error Only ETRAXFS and ARTPEC-3 supported!
145#endif
diff --git a/arch/cris/arch-v32/boot/compressed/misc.c b/arch/cris/arch-v32/boot/compressed/misc.c
deleted file mode 100644
index 3595e16e82bc..000000000000
--- a/arch/cris/arch-v32/boot/compressed/misc.c
+++ /dev/null
@@ -1,318 +0,0 @@
1/*
2 * misc.c
3 *
4 * This is a collection of several routines from gzip-1.0.3
5 * adapted for Linux.
6 *
7 * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
8 * puts by Nick Holloway 1993, better puts by Martin Mares 1995
9 * adaptation for Linux/CRIS Axis Communications AB, 1999
10 *
11 */
12
13/* where the piggybacked kernel image expects itself to live.
14 * it is the same address we use when we network load an uncompressed
15 * image into DRAM, and it is the address the kernel is linked to live
16 * at by vmlinux.lds.S
17 */
18
19#define KERNEL_LOAD_ADR 0x40004000
20
21
22#include <linux/types.h>
23#include <hwregs/reg_rdwr.h>
24#include <hwregs/reg_map.h>
25#include <hwregs/ser_defs.h>
26#include <hwregs/pinmux_defs.h>
27#ifdef CONFIG_CRIS_MACH_ARTPEC3
28#include <hwregs/clkgen_defs.h>
29#endif
30
31/*
32 * gzip declarations
33 */
34
35#define OF(args) args
36#define STATIC static
37
38void* memset(void* s, int c, size_t n);
39void* memcpy(void* __dest, __const void* __src,
40 size_t __n);
41
42#define memzero(s, n) memset ((s), 0, (n))
43
44
45typedef unsigned char uch;
46typedef unsigned short ush;
47typedef unsigned long ulg;
48
49#define WSIZE 0x8000 /* Window size must be at least 32k, */
50 /* and a power of two */
51
52static uch *inbuf; /* input buffer */
53static uch window[WSIZE]; /* Sliding window buffer */
54
55unsigned inptr = 0; /* index of next byte to be processed in inbuf
56 * After decompression it will contain the
57 * compressed size, and head.S will read it.
58 */
59
60static unsigned outcnt = 0; /* bytes in output buffer */
61
62/* gzip flag byte */
63#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */
64#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */
65#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
66#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
67#define COMMENT 0x10 /* bit 4 set: file comment present */
68#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */
69#define RESERVED 0xC0 /* bit 6,7: reserved */
70
71#define get_byte() inbuf[inptr++]
72
73/* Diagnostic functions */
74#ifdef DEBUG
75# define Assert(cond,msg) {if(!(cond)) error(msg);}
76# define Trace(x) fprintf x
77# define Tracev(x) {if (verbose) fprintf x ;}
78# define Tracevv(x) {if (verbose>1) fprintf x ;}
79# define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
80# define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
81#else
82# define Assert(cond,msg)
83# define Trace(x)
84# define Tracev(x)
85# define Tracevv(x)
86# define Tracec(c,x)
87# define Tracecv(c,x)
88#endif
89
90static void flush_window(void);
91static void error(char *m);
92
93extern char *input_data; /* lives in head.S */
94
95static long bytes_out;
96static uch *output_data;
97static unsigned long output_ptr;
98
99static void error(char *m);
100
101static void puts(const char *);
102
103/* the "heap" is put directly after the BSS ends, at end */
104
105extern int _end;
106static long free_mem_ptr = (long)&_end;
107static long free_mem_end_ptr;
108
109#include "../../../../../lib/inflate.c"
110
111/* decompressor info and error messages to serial console */
112
113static inline void
114serout(const char *s, reg_scope_instances regi_ser)
115{
116 reg_ser_rs_stat_din rs;
117 reg_ser_rw_dout dout = {.data = *s};
118
119 do {
120 rs = REG_RD(ser, regi_ser, rs_stat_din);
121 }
122 while (!rs.tr_rdy);/* Wait for transceiver. */
123
124 REG_WR(ser, regi_ser, rw_dout, dout);
125}
126
127static void
128puts(const char *s)
129{
130#ifndef CONFIG_ETRAX_DEBUG_PORT_NULL
131 while (*s) {
132#ifdef CONFIG_ETRAX_DEBUG_PORT0
133 serout(s, regi_ser0);
134#endif
135#ifdef CONFIG_ETRAX_DEBUG_PORT1
136 serout(s, regi_ser1);
137#endif
138#ifdef CONFIG_ETRAX_DEBUG_PORT2
139 serout(s, regi_ser2);
140#endif
141#ifdef CONFIG_ETRAX_DEBUG_PORT3
142 serout(s, regi_ser3);
143#endif
144 *s++;
145 }
146/* CONFIG_ETRAX_DEBUG_PORT_NULL */
147#endif
148}
149
150void*
151memset(void* s, int c, size_t n)
152{
153 int i;
154 char *ss = (char*)s;
155
156 for (i=0;i<n;i++) ss[i] = c;
157
158 return s;
159}
160
161void*
162memcpy(void* __dest, __const void* __src,
163 size_t __n)
164{
165 int i;
166 char *d = (char *)__dest, *s = (char *)__src;
167
168 for (i=0;i<__n;i++) d[i] = s[i];
169
170 return __dest;
171}
172
173/* ===========================================================================
174 * Write the output window window[0..outcnt-1] and update crc and bytes_out.
175 * (Used for the decompressed data only.)
176 */
177
178static void
179flush_window()
180{
181 ulg c = crc; /* temporary variable */
182 unsigned n;
183 uch *in, *out, ch;
184
185 in = window;
186 out = &output_data[output_ptr];
187 for (n = 0; n < outcnt; n++) {
188 ch = *out++ = *in++;
189 c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8);
190 }
191 crc = c;
192 bytes_out += (ulg)outcnt;
193 output_ptr += (ulg)outcnt;
194 outcnt = 0;
195}
196
197static void
198error(char *x)
199{
200 puts("\r\n\n");
201 puts(x);
202 puts("\r\n\n -- System halted\n");
203
204 while(1); /* Halt */
205}
206
207void
208setup_normal_output_buffer(void)
209{
210 output_data = (char *)KERNEL_LOAD_ADR;
211}
212
213static inline void
214serial_setup(reg_scope_instances regi_ser)
215{
216 reg_ser_rw_xoff xoff;
217 reg_ser_rw_tr_ctrl tr_ctrl;
218 reg_ser_rw_rec_ctrl rec_ctrl;
219 reg_ser_rw_tr_baud_div tr_baud;
220 reg_ser_rw_rec_baud_div rec_baud;
221
222 /* Turn off XOFF. */
223 xoff = REG_RD(ser, regi_ser, rw_xoff);
224
225 xoff.chr = 0;
226 xoff.automatic = regk_ser_no;
227
228 REG_WR(ser, regi_ser, rw_xoff, xoff);
229
230 /* Set baudrate and stopbits. */
231 tr_ctrl = REG_RD(ser, regi_ser, rw_tr_ctrl);
232 rec_ctrl = REG_RD(ser, regi_ser, rw_rec_ctrl);
233 tr_baud = REG_RD(ser, regi_ser, rw_tr_baud_div);
234 rec_baud = REG_RD(ser, regi_ser, rw_rec_baud_div);
235
236 tr_ctrl.stop_bits = 1; /* 2 stop bits. */
237 tr_ctrl.en = 1; /* enable transmitter */
238 rec_ctrl.en = 1; /* enabler receiver */
239
240 /*
241 * The baudrate setup used to be a bit fishy, but now transmitter and
242 * receiver are both set to the intended baud rate, 115200.
243 * The magic value is 29.493 MHz.
244 */
245 tr_ctrl.base_freq = regk_ser_f29_493;
246 rec_ctrl.base_freq = regk_ser_f29_493;
247 tr_baud.div = (29493000 / 8) / 115200;
248 rec_baud.div = (29493000 / 8) / 115200;
249
250 REG_WR(ser, regi_ser, rw_tr_ctrl, tr_ctrl);
251 REG_WR(ser, regi_ser, rw_tr_baud_div, tr_baud);
252 REG_WR(ser, regi_ser, rw_rec_ctrl, rec_ctrl);
253 REG_WR(ser, regi_ser, rw_rec_baud_div, rec_baud);
254}
255
256void
257decompress_kernel(void)
258{
259 char revision;
260
261#if defined(CONFIG_ETRAX_DEBUG_PORT1) || \
262 defined(CONFIG_ETRAX_DEBUG_PORT2) || \
263 defined(CONFIG_ETRAX_DEBUG_PORT3)
264 reg_pinmux_rw_hwprot hwprot;
265
266#ifdef CONFIG_CRIS_MACH_ARTPEC3
267 reg_clkgen_rw_clk_ctrl clk_ctrl;
268
269 /* Enable corresponding clock region when serial 1..3 selected */
270
271 clk_ctrl = REG_RD(clkgen, regi_clkgen, rw_clk_ctrl);
272 clk_ctrl.sser_ser_dma6_7 = regk_clkgen_yes;
273 REG_WR(clkgen, regi_clkgen, rw_clk_ctrl, clk_ctrl);
274#endif
275
276 /* pinmux setup for ports 1..3 */
277 hwprot = REG_RD(pinmux, regi_pinmux, rw_hwprot);
278#endif
279
280#ifdef CONFIG_ETRAX_DEBUG_PORT0
281 serial_setup(regi_ser0);
282#endif
283#ifdef CONFIG_ETRAX_DEBUG_PORT1
284 hwprot.ser1 = regk_pinmux_yes;
285 serial_setup(regi_ser1);
286#endif
287#ifdef CONFIG_ETRAX_DEBUG_PORT2
288 hwprot.ser2 = regk_pinmux_yes;
289 serial_setup(regi_ser2);
290#endif
291#ifdef CONFIG_ETRAX_DEBUG_PORT3
292 hwprot.ser3 = regk_pinmux_yes;
293 serial_setup(regi_ser3);
294#endif
295#if defined(CONFIG_ETRAX_DEBUG_PORT1) || \
296 defined(CONFIG_ETRAX_DEBUG_PORT2) || \
297 defined(CONFIG_ETRAX_DEBUG_PORT3)
298 REG_WR(pinmux, regi_pinmux, rw_hwprot, hwprot);
299#endif
300
301 /* input_data is set in head.S */
302 inbuf = input_data;
303
304 setup_normal_output_buffer();
305
306 makecrc();
307
308 __asm__ volatile ("move $vr,%0" : "=rm" (revision));
309 if (revision < 32)
310 {
311 puts("You need an ETRAX FS to run Linux 2.6/crisv32.\r\n");
312 while(1);
313 }
314
315 puts("Uncompressing Linux...\r\n");
316 gunzip();
317 puts("Done. Now booting the kernel.\r\n");
318}
diff --git a/arch/cris/arch-v32/boot/rescue/Makefile b/arch/cris/arch-v32/boot/rescue/Makefile
deleted file mode 100644
index 566aac663a38..000000000000
--- a/arch/cris/arch-v32/boot/rescue/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
1#
2# Makefile for rescue (bootstrap) code
3#
4
5CC = gcc-cris -mlinux -march=v32 $(LINUXINCLUDE)
6ccflags-y += -O2 -I $(srctree)/include/asm/arch/mach/ \
7 -I $(srctree)/include/asm/arch
8asflags-y += -I $(srctree)/include/asm/arch/mach/ -I $(srctree)/include/asm/arch
9LD = gcc-cris -mlinux -march=v32 -nostdlib
10ldflags-y += -T $(srctree)/$(src)/rescue.lds
11LDPOSTFLAGS = -lgcc
12OBJCOPYFLAGS = -O binary --remove-section=.bss
13obj-$(CONFIG_ETRAX_AXISFLASHMAP) = head.o
14OBJECT := $(obj)/head.o
15
16targets := rescue.o rescue.bin
17
18quiet_cmd_ldlibgcc = LD $@
19cmd_ldlibgcc = $(LD) $(LDFLAGS) $(filter-out FORCE,$^) $(LDPOSTFLAGS) -o $@
20
21$(obj)/rescue.o: $(OBJECTS) FORCE
22 $(call if_changed,ldlibgcc)
23
24$(obj)/rescue.bin: $(obj)/rescue.o FORCE
25 $(call if_changed,objcopy)
26 cp -p $(obj)/rescue.bin $(objtree)
diff --git a/arch/cris/arch-v32/boot/rescue/head.S b/arch/cris/arch-v32/boot/rescue/head.S
deleted file mode 100644
index 5f846b7700a3..000000000000
--- a/arch/cris/arch-v32/boot/rescue/head.S
+++ /dev/null
@@ -1,26 +0,0 @@
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.
7 *
8 */
9
10#include <mach/startup.inc>
11
12#ifdef CONFIG_ETRAX_AXISFLASHMAP
13
14;; Code
15
16 .text
17start:
18
19 ;; Start clocks for used blocks.
20 START_CLOCKS
21
22 move.d CONFIG_ETRAX_PTABLE_SECTOR, $r10
23 jump $r10 ; Jump to decompressor
24 nop
25
26#endif
diff --git a/arch/cris/arch-v32/boot/rescue/rescue.lds b/arch/cris/arch-v32/boot/rescue/rescue.lds
deleted file mode 100644
index 8ac646bc1a2b..000000000000
--- a/arch/cris/arch-v32/boot/rescue/rescue.lds
+++ /dev/null
@@ -1,43 +0,0 @@
1/*#OUTPUT_FORMAT(elf32-us-cris) */
2OUTPUT_ARCH (crisv32)
3/* Now that NAND support has been stripped, this file could be simplified,
4 * but it doesn't do any harm on the other hand so why bother. */
5
6MEMORY
7 {
8 bootblk : ORIGIN = 0x38000000,
9 LENGTH = 0x00004000
10 intmem : ORIGIN = 0x38004000,
11 LENGTH = 0x00005000
12 }
13
14SECTIONS
15{
16 .text :
17 {
18 _stext = . ;
19 *(.text)
20 *(.init.text)
21 *(.rodata)
22 *(.rodata.*)
23 _etext = . ;
24 } > bootblk
25 .data :
26 {
27 *(.data)
28 _edata = . ;
29 } > bootblk
30 .bss :
31 {
32 _bss = . ;
33 *(.bss)
34 _end = ALIGN( 0x10 ) ;
35 } > intmem
36
37 /* Get rid of stuff from EXPORT_SYMBOL(foo). */
38 /DISCARD/ :
39 {
40 *(__ksymtab_strings)
41 *(__ksymtab)
42 }
43}
diff --git a/arch/cris/arch-v32/drivers/mach-a3/gpio.c b/arch/cris/arch-v32/drivers/mach-a3/gpio.c
index 7a87bc0ae2e8..97357cfd17bb 100644
--- a/arch/cris/arch-v32/drivers/mach-a3/gpio.c
+++ b/arch/cris/arch-v32/drivers/mach-a3/gpio.c
@@ -681,7 +681,7 @@ static int virtual_gpio_ioctl(struct file *file, unsigned int cmd,
681 shadow |= ~readl(dir_oe[priv->minor]) | 681 shadow |= ~readl(dir_oe[priv->minor]) |
682 (arg & changeable_bits[priv->minor]); 682 (arg & changeable_bits[priv->minor]);
683 i2c_write(VIRT_I2C_ADDR, (void *)&shadow, sizeof(shadow)); 683 i2c_write(VIRT_I2C_ADDR, (void *)&shadow, sizeof(shadow));
684 spin_lock_irqrestore(&gpio_lock, flags); 684 spin_unlock_irqrestore(&gpio_lock, flags);
685 break; 685 break;
686 case IO_CLRBITS: 686 case IO_CLRBITS:
687 spin_lock_irqsave(&gpio_lock, flags); 687 spin_lock_irqsave(&gpio_lock, flags);
@@ -690,7 +690,7 @@ static int virtual_gpio_ioctl(struct file *file, unsigned int cmd,
690 shadow |= ~readl(dir_oe[priv->minor]) & 690 shadow |= ~readl(dir_oe[priv->minor]) &
691 ~(arg & changeable_bits[priv->minor]); 691 ~(arg & changeable_bits[priv->minor]);
692 i2c_write(VIRT_I2C_ADDR, (void *)&shadow, sizeof(shadow)); 692 i2c_write(VIRT_I2C_ADDR, (void *)&shadow, sizeof(shadow));
693 spin_lock_irqrestore(&gpio_lock, flags); 693 spin_unlock_irqrestore(&gpio_lock, flags);
694 break; 694 break;
695 case IO_HIGHALARM: 695 case IO_HIGHALARM:
696 /* Set alarm when bits with 1 in arg go high. */ 696 /* Set alarm when bits with 1 in arg go high. */
diff --git a/arch/cris/arch-v32/kernel/Makefile b/arch/cris/arch-v32/kernel/Makefile
index 993d987b0078..40358355d0cb 100644
--- a/arch/cris/arch-v32/kernel/Makefile
+++ b/arch/cris/arch-v32/kernel/Makefile
@@ -9,8 +9,6 @@ obj-y := entry.o traps.o irq.o debugport.o \
9 process.o ptrace.o setup.o signal.o traps.o time.o \ 9 process.o ptrace.o setup.o signal.o traps.o time.o \
10 cache.o cacheflush.o 10 cache.o cacheflush.o
11 11
12obj-$(CONFIG_ETRAXFS_SIM) += vcs_hook.o
13
14obj-$(CONFIG_SMP) += smp.o 12obj-$(CONFIG_SMP) += smp.o
15obj-$(CONFIG_ETRAX_KGDB) += kgdb.o kgdb_asm.o 13obj-$(CONFIG_ETRAX_KGDB) += kgdb.o kgdb_asm.o
16obj-$(CONFIG_ETRAX_FAST_TIMER) += fasttimer.o 14obj-$(CONFIG_ETRAX_FAST_TIMER) += fasttimer.o
diff --git a/arch/cris/arch-v32/kernel/entry.S b/arch/cris/arch-v32/kernel/entry.S
index 5e674c8f7c51..435b9671bd4b 100644
--- a/arch/cris/arch-v32/kernel/entry.S
+++ b/arch/cris/arch-v32/kernel/entry.S
@@ -852,6 +852,14 @@ sys_call_table:
852 .long sys_fallocate 852 .long sys_fallocate
853 .long sys_timerfd_settime /* 325 */ 853 .long sys_timerfd_settime /* 325 */
854 .long sys_timerfd_gettime 854 .long sys_timerfd_gettime
855 .long sys_signalfd4
856 .long sys_eventfd2
857 .long sys_epoll_create1
858 .long sys_dup3 /* 330 */
859 .long sys_pipe2
860 .long sys_inotify_init1
861 .long sys_preadv
862 .long sys_pwritev
855 863
856 /* 864 /*
857 * NOTE!! This doesn't have to be exact - we just have 865 * NOTE!! This doesn't have to be exact - we just have