diff options
Diffstat (limited to 'arch/arm/boot')
-rw-r--r-- | arch/arm/boot/compressed/Makefile | 3 | ||||
-rw-r--r-- | arch/arm/boot/compressed/head-xscale.S | 1 | ||||
-rw-r--r-- | arch/arm/boot/compressed/head.S | 2 | ||||
-rw-r--r-- | arch/arm/boot/compressed/misc.c | 61 |
4 files changed, 9 insertions, 58 deletions
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 95baac4939e0..94462a097f86 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -112,6 +112,3 @@ $(obj)/font.c: $(FONTC) | |||
112 | 112 | ||
113 | $(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile .config | 113 | $(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile .config |
114 | @sed "$(SEDFLAGS)" < $< > $@ | 114 | @sed "$(SEDFLAGS)" < $< > $@ |
115 | |||
116 | $(obj)/misc.o: $(obj)/misc.c include/asm/arch/uncompress.h lib/inflate.c | ||
117 | |||
diff --git a/arch/arm/boot/compressed/head-xscale.S b/arch/arm/boot/compressed/head-xscale.S index dd3fbd6766e1..aa5ee49c5c5a 100644 --- a/arch/arm/boot/compressed/head-xscale.S +++ b/arch/arm/boot/compressed/head-xscale.S | |||
@@ -6,7 +6,6 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/linkage.h> | 8 | #include <linux/linkage.h> |
9 | #include <asm/mach-types.h> | ||
10 | 9 | ||
11 | .section ".start", "ax" | 10 | .section ".start", "ax" |
12 | 11 | ||
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index de41daeab5e9..d42f89b7760b 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -37,7 +37,7 @@ | |||
37 | 37 | ||
38 | #else | 38 | #else |
39 | 39 | ||
40 | #include <asm/arch/debug-macro.S> | 40 | #include <mach/debug-macro.S> |
41 | 41 | ||
42 | .macro writeb, ch, rb | 42 | .macro writeb, ch, rb |
43 | senduart \ch, \rb | 43 | senduart \ch, \rb |
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index 9b444022cb9b..65ce8fff29db 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c | |||
@@ -27,7 +27,7 @@ unsigned int __machine_arch_type; | |||
27 | static void putstr(const char *ptr); | 27 | static void putstr(const char *ptr); |
28 | 28 | ||
29 | #include <linux/compiler.h> | 29 | #include <linux/compiler.h> |
30 | #include <asm/arch/uncompress.h> | 30 | #include <mach/uncompress.h> |
31 | 31 | ||
32 | #ifdef CONFIG_DEBUG_ICEDCC | 32 | #ifdef CONFIG_DEBUG_ICEDCC |
33 | 33 | ||
@@ -217,8 +217,6 @@ static unsigned outcnt; /* bytes in output buffer */ | |||
217 | static int fill_inbuf(void); | 217 | static int fill_inbuf(void); |
218 | static void flush_window(void); | 218 | static void flush_window(void); |
219 | static void error(char *m); | 219 | static void error(char *m); |
220 | static void gzip_mark(void **); | ||
221 | static void gzip_release(void **); | ||
222 | 220 | ||
223 | extern char input_data[]; | 221 | extern char input_data[]; |
224 | extern char input_data_end[]; | 222 | extern char input_data_end[]; |
@@ -227,64 +225,21 @@ static uch *output_data; | |||
227 | static ulg output_ptr; | 225 | static ulg output_ptr; |
228 | static ulg bytes_out; | 226 | static ulg bytes_out; |
229 | 227 | ||
230 | static void *malloc(int size); | ||
231 | static void free(void *where); | ||
232 | static void error(char *m); | 228 | static void error(char *m); |
233 | static void gzip_mark(void **); | ||
234 | static void gzip_release(void **); | ||
235 | 229 | ||
236 | static void putstr(const char *); | 230 | static void putstr(const char *); |
237 | 231 | ||
238 | extern int end; | 232 | extern int end; |
239 | static ulg free_mem_ptr; | 233 | static ulg free_mem_ptr; |
240 | static ulg free_mem_ptr_end; | 234 | static ulg free_mem_end_ptr; |
241 | 235 | ||
242 | #define HEAP_SIZE 0x3000 | 236 | #ifdef STANDALONE_DEBUG |
243 | 237 | #define NO_INFLATE_MALLOC | |
244 | #include "../../../../lib/inflate.c" | 238 | #endif |
245 | |||
246 | #ifndef STANDALONE_DEBUG | ||
247 | static void *malloc(int size) | ||
248 | { | ||
249 | void *p; | ||
250 | |||
251 | if (size <0) error("Malloc error"); | ||
252 | if (free_mem_ptr <= 0) error("Memory error"); | ||
253 | |||
254 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
255 | |||
256 | p = (void *)free_mem_ptr; | ||
257 | free_mem_ptr += size; | ||
258 | |||
259 | if (free_mem_ptr >= free_mem_ptr_end) | ||
260 | error("Out of memory"); | ||
261 | return p; | ||
262 | } | ||
263 | |||
264 | static void free(void *where) | ||
265 | { /* gzip_mark & gzip_release do the free */ | ||
266 | } | ||
267 | |||
268 | static void gzip_mark(void **ptr) | ||
269 | { | ||
270 | arch_decomp_wdog(); | ||
271 | *ptr = (void *) free_mem_ptr; | ||
272 | } | ||
273 | 239 | ||
274 | static void gzip_release(void **ptr) | 240 | #define ARCH_HAS_DECOMP_WDOG |
275 | { | ||
276 | arch_decomp_wdog(); | ||
277 | free_mem_ptr = (long) *ptr; | ||
278 | } | ||
279 | #else | ||
280 | static void gzip_mark(void **ptr) | ||
281 | { | ||
282 | } | ||
283 | 241 | ||
284 | static void gzip_release(void **ptr) | 242 | #include "../../../../lib/inflate.c" |
285 | { | ||
286 | } | ||
287 | #endif | ||
288 | 243 | ||
289 | /* =========================================================================== | 244 | /* =========================================================================== |
290 | * Fill the input buffer. This is called only when the buffer is empty | 245 | * Fill the input buffer. This is called only when the buffer is empty |
@@ -348,7 +303,7 @@ decompress_kernel(ulg output_start, ulg free_mem_ptr_p, ulg free_mem_ptr_end_p, | |||
348 | { | 303 | { |
349 | output_data = (uch *)output_start; /* Points to kernel start */ | 304 | output_data = (uch *)output_start; /* Points to kernel start */ |
350 | free_mem_ptr = free_mem_ptr_p; | 305 | free_mem_ptr = free_mem_ptr_p; |
351 | free_mem_ptr_end = free_mem_ptr_end_p; | 306 | free_mem_end_ptr = free_mem_ptr_end_p; |
352 | __machine_arch_type = arch_id; | 307 | __machine_arch_type = arch_id; |
353 | 308 | ||
354 | arch_decomp_setup(); | 309 | arch_decomp_setup(); |