aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m32r/boot/compressed/misc.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-03-07 15:36:19 -0500
committerArnd Bergmann <arnd@arndb.de>2018-03-09 17:20:00 -0500
commit553b085c2075f6a4a2591108554f830fa61e881f (patch)
tree68d63911f2c12e0fb9fa23498df9300442a88f92 /arch/m32r/boot/compressed/misc.c
parentfd8773f9f544955f6f47dc2ac3ab85ad64376b7f (diff)
arch: remove m32r port
The Mitsubishi/Renesas m32r architecture has been around for many years, but the Linux port has been obsolete for a very long time as well, with the last significant updates done for linux-2.6.14. While some m32r microcontrollers are still being marketed by Renesas, those are apparently no longer possible to support, mainly due to the lack of an external memory interface. Hirokazu Takata was the maintainer until the architecture got marked Orphaned in 2014. Link: http://www.linux-m32r.org/ Link: https://www.renesas.com/en-eu/products/microcontrollers-microprocessors/m32r.html Cc: Hirokazu Takata <takata@linux-m32r.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/m32r/boot/compressed/misc.c')
-rw-r--r--arch/m32r/boot/compressed/misc.c93
1 files changed, 0 insertions, 93 deletions
diff --git a/arch/m32r/boot/compressed/misc.c b/arch/m32r/boot/compressed/misc.c
deleted file mode 100644
index 43e367055669..000000000000
--- a/arch/m32r/boot/compressed/misc.c
+++ /dev/null
@@ -1,93 +0,0 @@
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * arch/m32r/boot/compressed/misc.c
4 *
5 * This is a collection of several routines from gzip-1.0.3
6 * adapted for Linux.
7 *
8 * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
9 *
10 * Adapted for SH by Stuart Menefy, Aug 1999
11 *
12 * 2003-02-12: Support M32R by Takeo Takahashi
13 */
14
15/*
16 * gzip declarations
17 */
18#define STATIC static
19
20#undef memset
21#undef memcpy
22#define memzero(s, n) memset ((s), 0, (n))
23
24static void error(char *m);
25
26#include "m32r_sio.c"
27
28static unsigned long free_mem_ptr;
29static unsigned long free_mem_end_ptr;
30
31#ifdef CONFIG_KERNEL_BZIP2
32void *memset(void *s, int c, size_t n)
33{
34 char *ss = s;
35
36 while (n--)
37 *ss++ = c;
38 return s;
39}
40#endif
41
42#ifdef CONFIG_KERNEL_GZIP
43void *memcpy(void *dest, const void *src, size_t n)
44{
45 char *d = dest;
46 const char *s = src;
47 while (n--)
48 *d++ = *s++;
49
50 return dest;
51}
52
53#define BOOT_HEAP_SIZE 0x10000
54#include "../../../../lib/decompress_inflate.c"
55#endif
56
57#ifdef CONFIG_KERNEL_BZIP2
58#define BOOT_HEAP_SIZE 0x400000
59#include "../../../../lib/decompress_bunzip2.c"
60#endif
61
62#ifdef CONFIG_KERNEL_LZMA
63#define BOOT_HEAP_SIZE 0x10000
64#include "../../../../lib/decompress_unlzma.c"
65#endif
66
67static void error(char *x)
68{
69 puts("\n\n");
70 puts(x);
71 puts("\n\n -- System halted");
72
73 while(1); /* Halt */
74}
75
76void
77decompress_kernel(int mmu_on, unsigned char *zimage_data,
78 unsigned int zimage_len, unsigned long heap)
79{
80 unsigned char *input_data = zimage_data;
81 int input_len = zimage_len;
82 unsigned char *output_data;
83
84 output_data = (unsigned char *)CONFIG_MEMORY_START + 0x2000
85 + (mmu_on ? 0x80000000 : 0);
86 free_mem_ptr = heap;
87 free_mem_end_ptr = free_mem_ptr + BOOT_HEAP_SIZE;
88
89 puts("\nDecompressing Linux... ");
90 __decompress(input_data, input_len, NULL, NULL, output_data, 0,
91 NULL, error);
92 puts("done.\nBooting the kernel.\n");
93}