common: Add a new lz4.h header file
Add a header file to house the lz4 compression function. Add a comment while we are here, since it not even clear from the name what the function actuall does. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
b03e0510d7
commit
6c03f9e618
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
#include <gzip.h>
|
#include <gzip.h>
|
||||||
#include <image.h>
|
#include <image.h>
|
||||||
|
#include <lz4.h>
|
||||||
#include <mapmem.h>
|
#include <mapmem.h>
|
||||||
|
|
||||||
#if IMAGE_ENABLE_FIT || IMAGE_ENABLE_OF_LIBFDT
|
#if IMAGE_ENABLE_FIT || IMAGE_ENABLE_OF_LIBFDT
|
||||||
|
|
|
@ -292,9 +292,6 @@ void wait_ticks (unsigned long);
|
||||||
ulong usec2ticks (unsigned long usec);
|
ulong usec2ticks (unsigned long usec);
|
||||||
ulong ticks2usec (unsigned long ticks);
|
ulong ticks2usec (unsigned long ticks);
|
||||||
|
|
||||||
/* lib/lz4_wrapper.c */
|
|
||||||
int ulz4fn(const void *src, size_t srcn, void *dst, size_t *dstn);
|
|
||||||
|
|
||||||
/* lib/uuid.c */
|
/* lib/uuid.c */
|
||||||
#include <uuid.h>
|
#include <uuid.h>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||||
|
/*
|
||||||
|
* Copyright 2019 Google LLC
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __LZ4_H
|
||||||
|
#define __LZ4_H
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ulz4fn() - Decompress LZ4 data
|
||||||
|
*
|
||||||
|
* @src: Source data to decompress
|
||||||
|
* @srcn: Length of source data
|
||||||
|
* @dst: Destination for uncompressed data
|
||||||
|
* @dstn: Returns length of uncompressed data
|
||||||
|
* @return 0 if OK, -EPROTONOSUPPORT if the magic number or version number are
|
||||||
|
* not recognised or independent blocks are used, -EINVAL if the reserved
|
||||||
|
* fields are non-zero, or input is overrun, -EENOBUFS if the destination
|
||||||
|
* buffer is overrun, -EEPROTO if the compressed data causes an error in
|
||||||
|
* the decompression algorithm
|
||||||
|
*/
|
||||||
|
int ulz4fn(const void *src, size_t srcn, void *dst, size_t *dstn);
|
||||||
|
|
||||||
|
#endif
|
|
@ -6,6 +6,7 @@
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <compiler.h>
|
#include <compiler.h>
|
||||||
#include <image.h>
|
#include <image.h>
|
||||||
|
#include <lz4.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include <bootm.h>
|
#include <bootm.h>
|
||||||
#include <command.h>
|
#include <command.h>
|
||||||
#include <gzip.h>
|
#include <gzip.h>
|
||||||
|
#include <lz4.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <mapmem.h>
|
#include <mapmem.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
|
Loading…
Reference in New Issue