All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] fdt: Fix uncompress_blob() for U-Boot proper
@ 2018-10-18 18:37 Marek Vasut
  2018-11-17  0:14 ` Simon Glass
  2018-11-22 20:21 ` sjg at google.com
  0 siblings, 2 replies; 3+ messages in thread
From: Marek Vasut @ 2018-10-18 18:37 UTC (permalink / raw)
  To: u-boot

When U-Boot proper is compiled with CONFIG_MULTI_DTB_FIT and tries
to call uncompress_blob(), it fails with -ENOTSUPP. This is because
the full implementation of this function which includes compression
is available only in SPL. In U-Boot proper or if the compression is
not enabled, the blob is not compressed and thus can be passed to
locate_dtb_in_fit() in fdtdec_setup() without any changes. Pass the
blob without any changes if compression is not enabled instead of
failing.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Tom Rini <trini@konsulko.com>
---
 lib/fdtdec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index a420ba1885..d28f2cbb1c 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1198,7 +1198,8 @@ static int uncompress_blob(const void *src, ulong sz_src, void **dstp)
 # else
 static int uncompress_blob(const void *src, ulong sz_src, void **dstp)
 {
-	return -ENOTSUPP;
+	*dstp = (void *)src;
+	return 0;
 }
 # endif
 #endif
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] fdt: Fix uncompress_blob() for U-Boot proper
  2018-10-18 18:37 [U-Boot] [PATCH] fdt: Fix uncompress_blob() for U-Boot proper Marek Vasut
@ 2018-11-17  0:14 ` Simon Glass
  2018-11-22 20:21 ` sjg at google.com
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2018-11-17  0:14 UTC (permalink / raw)
  To: u-boot

On Thu, 18 Oct 2018 at 12:38, Marek Vasut <marek.vasut@gmail.com> wrote:
>
> When U-Boot proper is compiled with CONFIG_MULTI_DTB_FIT and tries
> to call uncompress_blob(), it fails with -ENOTSUPP. This is because
> the full implementation of this function which includes compression
> is available only in SPL. In U-Boot proper or if the compression is
> not enabled, the blob is not compressed and thus can be passed to
> locate_dtb_in_fit() in fdtdec_setup() without any changes. Pass the
> blob without any changes if compression is not enabled instead of
> failing.
>
> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: Tom Rini <trini@konsulko.com>
> ---
>  lib/fdtdec.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] fdt: Fix uncompress_blob() for U-Boot proper
  2018-10-18 18:37 [U-Boot] [PATCH] fdt: Fix uncompress_blob() for U-Boot proper Marek Vasut
  2018-11-17  0:14 ` Simon Glass
@ 2018-11-22 20:21 ` sjg at google.com
  1 sibling, 0 replies; 3+ messages in thread
From: sjg at google.com @ 2018-11-22 20:21 UTC (permalink / raw)
  To: u-boot

On Thu, 18 Oct 2018 at 12:38, Marek Vasut <marek.vasut@gmail.com> wrote:
>
> When U-Boot proper is compiled with CONFIG_MULTI_DTB_FIT and tries
> to call uncompress_blob(), it fails with -ENOTSUPP. This is because
> the full implementation of this function which includes compression
> is available only in SPL. In U-Boot proper or if the compression is
> not enabled, the blob is not compressed and thus can be passed to
> locate_dtb_in_fit() in fdtdec_setup() without any changes. Pass the
> blob without any changes if compression is not enabled instead of
> failing.
>
> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: Tom Rini <trini@konsulko.com>
> ---
>  lib/fdtdec.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-dm/master, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-22 20:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-18 18:37 [U-Boot] [PATCH] fdt: Fix uncompress_blob() for U-Boot proper Marek Vasut
2018-11-17  0:14 ` Simon Glass
2018-11-22 20:21 ` sjg at google.com

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.