Nokia RX-51: Simplify copy kernel code
[platform/kernel/u-boot.git] / boot / image.c
index c7ab034..a0d0cc2 100644 (file)
@@ -9,6 +9,7 @@
 #ifndef USE_HOSTCC
 #include <common.h>
 #include <env.h>
+#include <display_options.h>
 #include <init.h>
 #include <lmb.h>
 #include <log.h>
@@ -178,6 +179,7 @@ static const table_entry_t uimage_type[] = {
        {       IH_TYPE_MTKIMAGE,   "mtk_image",   "MediaTek BootROM loadable Image" },
        {       IH_TYPE_COPRO, "copro", "Coprocessor Image"},
        {       IH_TYPE_SUNXI_EGON, "sunxi_egon",  "Allwinner eGON Boot Image" },
+       {       IH_TYPE_SUNXI_TOC0, "sunxi_toc0",  "Allwinner TOC0 Boot Image" },
        {       -1,                 "",           "",                   },
 };
 
@@ -500,7 +502,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type,
                        struct abuf in, out;
 
                        abuf_init_set(&in, image_buf, image_len);
-                       abuf_init_set(&in, load_buf, unc_len);
+                       abuf_init_set(&out, load_buf, unc_len);
                        ret = zstd_decompress(&in, &out);
                        if (ret >= 0) {
                                image_len = ret;
@@ -550,7 +552,7 @@ static const char *unknown_msg(enum ih_category category)
  * This will scan the translation table trying to find the entry that matches
  * the given id.
  *
- * @return long entry name if translation succeeds; error string on failure
+ * Return: long entry name if translation succeeds; error string on failure
  */
 const char *genimg_get_cat_name(enum ih_category category, uint id)
 {
@@ -570,7 +572,7 @@ const char *genimg_get_cat_name(enum ih_category category, uint id)
  * This will scan the translation table trying to find the entry that matches
  * the given id.
  *
- * @return short entry name if translation succeeds; error string on failure
+ * Return: short entry name if translation succeeds; error string on failure
  */
 const char *genimg_get_cat_short_name(enum ih_category category, uint id)
 {
@@ -600,7 +602,7 @@ const char *genimg_get_cat_desc(enum ih_category category)
  * This will scan the translation table trying to find the entry that matches
  * the given id.
  *
- * @return true if category has entry id; false if not
+ * Return: true if category has entry id; false if not
  */
 bool genimg_cat_has_id(enum ih_category category, uint id)
 {