aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boot
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-07-11 13:32:24 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-07-11 13:32:24 -0400
commit59f002964f4e6668a0132cd796b82f7f8a4803f0 (patch)
tree457381be67d7884e11846ed585940c9ef7024d40 /arch/sh/boot
parentb14c6d428a54fb3235e69fd78fba9080c96645be (diff)
sh: rename arch/sh/boot/compressed/misc_32.c -> misc.c
This is now used by both sh64 and regular sh, kill off the old sh64 version now too. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boot')
-rw-r--r--arch/sh/boot/compressed/Makefile4
-rw-r--r--arch/sh/boot/compressed/misc.c (renamed from arch/sh/boot/compressed/misc_32.c)0
-rw-r--r--arch/sh/boot/compressed/misc_64.c109
3 files changed, 2 insertions, 111 deletions
diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile
index 0a4e7af8a71b..3324019e207e 100644
--- a/arch/sh/boot/compressed/Makefile
+++ b/arch/sh/boot/compressed/Makefile
@@ -6,9 +6,9 @@
6 6
7targets := vmlinux vmlinux.bin vmlinux.bin.gz \ 7targets := vmlinux vmlinux.bin vmlinux.bin.gz \
8 vmlinux.bin.bz2 vmlinux.bin.lzma \ 8 vmlinux.bin.bz2 vmlinux.bin.lzma \
9 head_$(BITS).o misc_$(BITS).o piggy.o 9 head_$(BITS).o misc.o piggy.o
10 10
11OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc_$(BITS).o $(obj)/cache.o 11OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/cache.o
12 12
13ifdef CONFIG_SH_STANDARD_BIOS 13ifdef CONFIG_SH_STANDARD_BIOS
14OBJECTS += $(obj)/../../kernel/sh_bios.o 14OBJECTS += $(obj)/../../kernel/sh_bios.o
diff --git a/arch/sh/boot/compressed/misc_32.c b/arch/sh/boot/compressed/misc.c
index 4eb27e61f8e3..4eb27e61f8e3 100644
--- a/arch/sh/boot/compressed/misc_32.c
+++ b/arch/sh/boot/compressed/misc.c
diff --git a/arch/sh/boot/compressed/misc_64.c b/arch/sh/boot/compressed/misc_64.c
deleted file mode 100644
index 09b7b7cd24f9..000000000000
--- a/arch/sh/boot/compressed/misc_64.c
+++ /dev/null
@@ -1,109 +0,0 @@
1/*
2 * arch/sh/boot/compressed/misc_64.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 *
9 * Adapted for SHmedia from sh by Stuart Menefy, May 2002
10 */
11
12#include <asm/uaccess.h>
13
14/* cache.c */
15#define CACHE_ENABLE 0
16#define CACHE_DISABLE 1
17int cache_control(unsigned int command);
18
19/*
20 * gzip declarations
21 */
22
23#define STATIC static
24
25#undef memset
26#undef memcpy
27#define memzero(s, n) memset ((s), 0, (n))
28
29static void error(char *m);
30
31extern char input_data[];
32extern int input_len;
33
34static unsigned char *output_data;
35
36static void puts(const char *);
37
38extern int _text; /* Defined in vmlinux.lds.S */
39extern int _end;
40static unsigned long free_mem_ptr;
41static unsigned long free_mem_end_ptr;
42
43#ifdef CONFIG_HAVE_KERNEL_BZIP2
44#define HEAP_SIZE 0x400000
45#else
46#define HEAP_SIZE 0x10000
47#endif
48
49#ifdef CONFIG_KERNEL_GZIP
50#include "../../../../lib/decompress_inflate.c"
51#endif
52
53#ifdef CONFIG_KERNEL_BZIP2
54#include "../../../../lib/decompress_bunzip2.c"
55#endif
56
57#ifdef CONFIG_KERNEL_LZMA
58#include "../../../../lib/decompress_unlzma.c"
59#endif
60
61void puts(const char *s)
62{
63}
64
65void *memset(void *s, int c, size_t n)
66{
67 int i;
68 char *ss = (char *) s;
69
70 for (i = 0; i < n; i++)
71 ss[i] = c;
72 return s;
73}
74
75void *memcpy(void *__dest, __const void *__src, size_t __n)
76{
77 int i;
78 char *d = (char *) __dest, *s = (char *) __src;
79
80 for (i = 0; i < __n; i++)
81 d[i] = s[i];
82 return __dest;
83}
84
85static void error(char *x)
86{
87 puts("\n\n");
88 puts(x);
89 puts("\n\n -- System halted");
90
91 while (1) ; /* Halt */
92}
93
94#define STACK_SIZE (4096)
95long __attribute__ ((aligned(8))) user_stack[STACK_SIZE];
96long *stack_start = &user_stack[STACK_SIZE];
97
98void decompress_kernel(void)
99{
100 output_data = (unsigned char *) (CONFIG_MEMORY_START + 0x2000);
101 free_mem_ptr = (unsigned long) &_end;
102 free_mem_end_ptr = free_mem_ptr + HEAP_SIZE;
103
104 puts("Uncompressing Linux... ");
105 cache_control(CACHE_ENABLE);
106 decompress(input_data, input_len, NULL, NULL, output_data, NULL, error);
107 cache_control(CACHE_DISABLE);
108 puts("Ok, booting the kernel.\n");
109}