From 06377c5a1fce4d1e9b7a5dfb62a66c4fe0c076ce Mon Sep 17 00:00:00 2001 From: Roger Quadros Date: Thu, 29 Sep 2022 13:11:28 +0300 Subject: spl: spl_legacy: Fix NAND boot on OMAP3 BeagleBoard OMAP3 BeagleBoard NAND boot hangs when spl_load_legacy_img() tries to read the header into 'struct hdr' which is allocated on the stack. As the header has already been read once before by spl_nand.c, we can avoid the extra header allocation and read here by simply passing around the pointer to the header. This fixes NAND boot on OMAP3 BeagleBoard. Signed-off-by: Roger Quadros Reviewed-By: Michael Trimarchi --- common/spl/spl_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/spl/spl_nand.c') diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c index a16738818c..4f4c00f2a1 100644 --- a/common/spl/spl_nand.c +++ b/common/spl/spl_nand.c @@ -119,7 +119,7 @@ static int spl_nand_load_element(struct spl_image_info *spl_image, load.bl_len = 1; load.read = spl_nand_legacy_read; - return spl_load_legacy_img(spl_image, bootdev, &load, offset); + return spl_load_legacy_img(spl_image, bootdev, &load, offset, header); } else { err = spl_parse_image_header(spl_image, bootdev, header); if (err) -- cgit v1.2.3