diff --git a/board/bf527-ezkit/video.c b/board/bf527-ezkit/video.c index 0b6b7b2e76d184c2589bc8fe7c0ae4d10a77a527..57652be293eb5e907ca9d60eb9e4cb9ffe8dc4ee 100644 --- a/board/bf527-ezkit/video.c +++ b/board/bf527-ezkit/video.c @@ -16,8 +16,6 @@ #include <linux/types.h> #include <stdio_dev.h> -int gunzip(void *, int, unsigned char *, unsigned long *); - #define DMA_SIZE16 2 #include <asm/mach-common/bits/ppi.h> diff --git a/board/bf533-stamp/video.c b/board/bf533-stamp/video.c index 28ffa618fc6c5cb083140ffef2547aa7bcfb83dd..939bd35a038fdc09bf6d6d74e82b05884319151c 100644 --- a/board/bf533-stamp/video.c +++ b/board/bf533-stamp/video.c @@ -20,8 +20,6 @@ #include <linux/types.h> #include <stdio_dev.h> -int gunzip(void *, int, unsigned char *, unsigned long *); - #define DMA_SIZE16 2 #include <asm/mach-common/bits/ppi.h> diff --git a/board/bf548-ezkit/video.c b/board/bf548-ezkit/video.c index f4f1becae2162715f2dc8a4fd1f6797318f2a856..10b08e2bf06f724558d09859e0d9991a19fef009 100644 --- a/board/bf548-ezkit/video.c +++ b/board/bf548-ezkit/video.c @@ -16,8 +16,6 @@ #include <linux/types.h> #include <stdio_dev.h> -int gunzip(void *, int, unsigned char *, unsigned long *); - #define DMA_SIZE16 2 #include <asm/mach-common/bits/eppi.h> diff --git a/board/cm-bf548/video.c b/board/cm-bf548/video.c index 078734269d744be5b514e2dbef179efab08a9c3f..4097f09e11a7073dca54fd711a6ea517abbca102 100644 --- a/board/cm-bf548/video.c +++ b/board/cm-bf548/video.c @@ -16,8 +16,6 @@ #include <linux/types.h> #include <stdio_dev.h> -int gunzip(void *, int, unsigned char *, unsigned long *); - #ifdef CONFIG_VIDEO #define DMA_SIZE16 2 diff --git a/board/dave/PPChameleonEVB/PPChameleonEVB.c b/board/dave/PPChameleonEVB/PPChameleonEVB.c index 06de6e0b1d7075870a46dd824c5d061523d4b7d9..6bc70ef9a41f77be2982eded37873c63c7b820d9 100644 --- a/board/dave/PPChameleonEVB/PPChameleonEVB.c +++ b/board/dave/PPChameleonEVB/PPChameleonEVB.c @@ -33,9 +33,6 @@ DECLARE_GLOBAL_DATA_PTR; /* ------------------------------------------------------------------------- */ -/* Prototypes */ -int gunzip(void *, int, unsigned char *, unsigned long *); - int board_early_init_f (void) { out32(GPIO0_OR, CONFIG_SYS_NAND0_CE); /* set initial outputs */ diff --git a/board/esd/apc405/apc405.c b/board/esd/apc405/apc405.c index 409a0540bf7749ccf039f479a66ef10ea5cfd99d..72c0907e015643177163e3f7891405719236d6df 100644 --- a/board/esd/apc405/apc405.c +++ b/board/esd/apc405/apc405.c @@ -54,9 +54,6 @@ const unsigned char fpgadata[] = */ #include "../common/fpga.c" -/* Prototypes */ -int gunzip(void *, int, unsigned char *, unsigned long *); - #ifdef CONFIG_LCD_USED /* logo bitmap data - gzip compressed and generated by bin2c */ unsigned char logo_bmp[] = diff --git a/board/esd/ash405/ash405.c b/board/esd/ash405/ash405.c index 5f0e67cbb4cac4ff0d1f8c4af37eaeb111af5349..0615959316c26d635a1aa50515e39fef5abaab46 100644 --- a/board/esd/ash405/ash405.c +++ b/board/esd/ash405/ash405.c @@ -48,10 +48,6 @@ const unsigned char fpgadata[] = #include "../common/fpga.c" -/* Prototypes */ -int gunzip(void *, int, unsigned char *, unsigned long *); - - int board_early_init_f (void) { /* diff --git a/board/esd/cpci405/cpci405.c b/board/esd/cpci405/cpci405.c index c29c876d6170b07a0e544616ff3ef16f8901b597..24db8830c79d0ef8f6e8f7b271675f0f2289d695 100644 --- a/board/esd/cpci405/cpci405.c +++ b/board/esd/cpci405/cpci405.c @@ -89,7 +89,6 @@ int N_AU_IMAGES = (sizeof(au_image) / sizeof(au_image[0])); /* Prototypes */ int cpci405_version(void); -int gunzip(void *, int, unsigned char *, unsigned long *); void lxt971_no_sleep(void); int board_early_init_f(void) diff --git a/board/esd/hh405/hh405.c b/board/esd/hh405/hh405.c index 132531b39c53cdfdca3a00dccd2d95b6fcfa977d..4251d51b2eeab2c018598e1bfe682db86f2fa957 100644 --- a/board/esd/hh405/hh405.c +++ b/board/esd/hh405/hh405.c @@ -251,10 +251,6 @@ const unsigned char fpgadata[] = #include "../common/fpga.c" -/* Prototypes */ -int gunzip(void *, int, unsigned char *, unsigned long *); - - /* logo bitmap data - gzip compressed and generated by bin2c */ unsigned char logo_bmp_320[] = { diff --git a/board/esd/pci405/pci405.c b/board/esd/pci405/pci405.c index 34a163240115f275c2fa2fa6664c8f1692e439f1..536485727d4f53f8293f937492c76f0f8ceec13c 100644 --- a/board/esd/pci405/pci405.c +++ b/board/esd/pci405/pci405.c @@ -34,7 +34,6 @@ DECLARE_GLOBAL_DATA_PTR; /* Prototypes */ -int gunzip(void *, int, unsigned char *, unsigned long *); int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); unsigned long fpga_done_state(void); unsigned long fpga_init_state(void); diff --git a/board/esd/plu405/plu405.c b/board/esd/plu405/plu405.c index fcffdf67c01f113241ea8430fd1db2bb65bb4be3..e385a78a2e8c65d23ae096488fe47bff09e3ab89 100644 --- a/board/esd/plu405/plu405.c +++ b/board/esd/plu405/plu405.c @@ -46,9 +46,6 @@ const unsigned char fpgadata[] = */ #include "../common/fpga.c" -/* Prototypes */ -int gunzip(void *, int, unsigned char *, unsigned long *); - int board_early_init_f(void) { /* diff --git a/board/esd/tasreg/tasreg.c b/board/esd/tasreg/tasreg.c index 18444427fedfe6358e5177c458882f371b14b1d6..bd9fb2fc2b754d8bfd8f48a8bac0e27851ef3497 100644 --- a/board/esd/tasreg/tasreg.c +++ b/board/esd/tasreg/tasreg.c @@ -29,7 +29,6 @@ /* Prototypes */ -int gunzip(void *, int, unsigned char *, unsigned long *); int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len); int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len); diff --git a/board/esd/voh405/voh405.c b/board/esd/voh405/voh405.c index 3f81665eb205b24a9e242cf56fbf290f14b69b72..a5600de6fcb6c55b8406258e5bb3a42bbd30da05 100644 --- a/board/esd/voh405/voh405.c +++ b/board/esd/voh405/voh405.c @@ -48,10 +48,6 @@ const unsigned char fpgadata[] = #include "../common/fpga.c" -/* Prototypes */ -int gunzip(void *, int, unsigned char *, unsigned long *); - - /* logo bitmap data - gzip compressed and generated by bin2c */ unsigned char logo_bmp_320[] = { diff --git a/board/esd/wuh405/wuh405.c b/board/esd/wuh405/wuh405.c index f2591d57f4f3245f6eaa6deca741060e20b2175d..01966eec263287e8b23b5e3a79ccfd9706775f15 100644 --- a/board/esd/wuh405/wuh405.c +++ b/board/esd/wuh405/wuh405.c @@ -46,10 +46,6 @@ const unsigned char fpgadata[] = #include "../common/fpga.c" -/* Prototypes */ -int gunzip(void *, int, unsigned char *, unsigned long *); - - int board_early_init_f (void) { /* diff --git a/board/mpl/common/common_util.c b/board/mpl/common/common_util.c index 61af4aea1ac01ae8826dd63732518603b3b99514..32bf244935b8992fe983e053cead92492af198fb 100644 --- a/board/mpl/common/common_util.c +++ b/board/mpl/common/common_util.c @@ -48,7 +48,6 @@ DECLARE_GLOBAL_DATA_PTR; #define FIRM_START 0xFFF00000 #endif -extern int gunzip(void *, int, uchar *, unsigned long *); extern int mem_test(ulong start, ulong ramsize, int quiet); #define I2C_BACKUP_ADDR 0x7C00 /* 0x200 bytes for backup */ diff --git a/board/prodrive/pdnb3/pdnb3.c b/board/prodrive/pdnb3/pdnb3.c index c323456d607ec1fe13e8fc8a59b1c78604c23b7c..69f8f9bbcad8dea2312cb2c904cc6552fa0f2715 100644 --- a/board/prodrive/pdnb3/pdnb3.c +++ b/board/prodrive/pdnb3/pdnb3.c @@ -29,7 +29,6 @@ DECLARE_GLOBAL_DATA_PTR; /* Prototypes */ -int gunzip(void *, int, unsigned char *, unsigned long *); int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); /* predefine these here for FPGA programming (before including fpga.c) */ diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c index faa10a4145b9658b047f64c4157888ded67e1b36..74ab24ca9467b280d7ce6a1b20a52a1cba221f30 100644 --- a/common/cmd_bmp.c +++ b/common/cmd_bmp.c @@ -35,8 +35,6 @@ static int bmp_info (ulong addr); static int bmp_display (ulong addr, int x, int y); -int gunzip(void *, int, unsigned char *, unsigned long *); - /* * Allocate and decompress a BMP image using gunzip(). * diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index efd6aec0cf19f60b36e32f15c5345db6be03865e..94ddac37cf33142db1d718b1b35d8ea22cb26147 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -63,7 +63,6 @@ DECLARE_GLOBAL_DATA_PTR; -extern int gunzip (void *dst, int dstlen, unsigned char *src, unsigned long *lenp); #ifndef CONFIG_SYS_BOOTM_LEN #define CONFIG_SYS_BOOTM_LEN 0x800000 /* use 8MByte as default max gunzip size */ #endif diff --git a/common/cmd_license.c b/common/cmd_license.c index c6f272ad34aa0429fd4a7d917d3aec0ed0638def..85a4871de0f57a2a7b858379946980ab3408e27c 100644 --- a/common/cmd_license.c +++ b/common/cmd_license.c @@ -29,7 +29,6 @@ #include <command.h> #include <malloc.h> #include <license.h> -int gunzip(void *, int, unsigned char *, unsigned long *); int do_license(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { diff --git a/common/cmd_mem.c b/common/cmd_mem.c index a34b342f09e8d27a5c0a53e4b23ed55995828c4a..1839330760c766dee1a6b9ef3c927b21b3a70791 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -1225,8 +1225,6 @@ int do_sha1sum(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #endif #ifdef CONFIG_CMD_UNZIP -int gunzip (void *, int, unsigned char *, unsigned long *); - int do_unzip ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { unsigned long src, dst; diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 16d6689f228a307cfb93c40874b0eb254481b48c..c07a26e3c0631e9108117bda1077676fd8e6ad6c 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -403,8 +403,6 @@ static const int video_font_draw_table32[16][4] = { { 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff } }; -int gunzip(void *, int, unsigned char *, unsigned long *); - /******************************************************************************/ static void video_drawchars (int xx, int yy, unsigned char *s, int count) diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h index 06772af36f71a117fffab0558cb1c0fe14ae9721..0af471afb911485508f990d1d1112dbdf12fac88 100644 --- a/fs/ubifs/ubifs.h +++ b/fs/ubifs/ubifs.h @@ -2140,7 +2140,4 @@ int ubifs_decompress(const void *buf, int len, void *out, int *out_len, /* todo: Move these to a common U-Boot header */ int lzo1x_decompress_safe(const unsigned char *in, size_t in_len, unsigned char *out, size_t *out_len); - -int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp, - int stoponerr, int offset); #endif /* !__UBIFS_H__ */ diff --git a/include/common.h b/include/common.h index 00b543408e38f93181d854e7ec52f5246f50bd4f..07897f682eb637f494aeeb0b26d5eda56ada8fb8 100644 --- a/include/common.h +++ b/include/common.h @@ -612,6 +612,11 @@ ulong usec2ticks (unsigned long usec); ulong ticks2usec (unsigned long ticks); int init_timebase (void); +/* lib_generic/gunzip.c */ +int gunzip(void *, int, unsigned char *, unsigned long *); +int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp, + int stoponerr, int offset); + /* lib_generic/time.c */ void udelay (unsigned long); diff --git a/lib_generic/gunzip.c b/lib_generic/gunzip.c index d59a4482b73c4ce3fdc968ed335dec3ab745212a..d2b7ad477916b4a03fbe6b6b439cc76456d6a9cb 100644 --- a/lib_generic/gunzip.c +++ b/lib_generic/gunzip.c @@ -36,11 +36,8 @@ #define RESERVED 0xe0 #define DEFLATED 8 -int gunzip(void *, int, unsigned char *, unsigned long *); void *zalloc(void *, unsigned, unsigned); void zfree(void *, void *, unsigned); -int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp, - int stoponerr, int offset); void *zalloc(void *x, unsigned items, unsigned size) {