summaryrefslogtreecommitdiff
path: root/include/spl.h
diff options
context:
space:
mode:
authorSean Anderson <[email protected]>2023-11-08 11:48:45 -0500
committerTom Rini <[email protected]>2023-11-16 13:49:14 -0500
commitefe92cd2f9eff3699d4a6b5e1c3d261c4b88b342 (patch)
tree09df25920278c27a1244e1ea19a707a2a86ce5c0 /include/spl.h
parent0ddfa868ba45903babf19039c80dfeb1503f9001 (diff)
spl: legacy: Split off LZMA decompression into its own function
To allow for easier reuse of this functionality, split it off into its own function. Signed-off-by: Sean Anderson <[email protected]> Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'include/spl.h')
-rw-r--r--include/spl.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/spl.h b/include/spl.h
index 03c5c5c66b4..09521889014 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -408,6 +408,19 @@ int spl_load_simple_fit(struct spl_image_info *spl_image,
#define SPL_FIT_FOUND 2
/**
+ * spl_load_legacy_lzma() - Load an LZMA-compressed legacy image
+ * @spl_image: Image description (already set up)
+ * @load: Structure containing the information required to load data.
+ * @offset: Pointer to image
+ *
+ * Load/decompress an LZMA-compressed legacy image from the device.
+ *
+ * Return: 0 on success, or a negative error on failure
+ */
+int spl_load_legacy_lzma(struct spl_image_info *spl_image,
+ struct spl_load_info *load, ulong offset);
+
+/**
* spl_load_legacy_img() - Loads a legacy image from a device.
* @spl_image: Image description to set up
* @load: Structure containing the information required to load data.