Skip to content
Snippets Groups Projects
Commit 3ea05205 authored by Fabio Estevam's avatar Fabio Estevam Committed by Tom Rini
Browse files

disk: part_dos: Use the original allocation scheme for the SPL case


Since commit ff98cb90 ("part: extract MBR signature from partitions")
SPL boot on i.MX6 starts to fail:

U-Boot SPL 2017.09-00221-g0d6ab32 (Oct 02 2017 - 15:13:19)
Trying to boot from MMC1
(keep in loop)

Use the original allocation scheme for the SPL case, so that MX6 boards
can boot again.

This is a temporary solution to avoid the boot regression.

Signed-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Acked-by: default avatarRob Clark <robdclark@gmail.com>
Tested-by: default avatarPeter Robinson <pbrobinson@gmail.com>
parent 4f42a0d7
No related branches found
No related tags found
No related merge requests found
...@@ -89,6 +89,7 @@ static int test_block_type(unsigned char *buffer) ...@@ -89,6 +89,7 @@ static int test_block_type(unsigned char *buffer)
static int part_test_dos(struct blk_desc *dev_desc) static int part_test_dos(struct blk_desc *dev_desc)
{ {
#ifndef CONFIG_SPL_BUILD
ALLOC_CACHE_ALIGN_BUFFER(legacy_mbr, mbr, dev_desc->blksz); ALLOC_CACHE_ALIGN_BUFFER(legacy_mbr, mbr, dev_desc->blksz);
if (blk_dread(dev_desc, 0, 1, (ulong *)mbr) != 1) if (blk_dread(dev_desc, 0, 1, (ulong *)mbr) != 1)
...@@ -102,6 +103,15 @@ static int part_test_dos(struct blk_desc *dev_desc) ...@@ -102,6 +103,15 @@ static int part_test_dos(struct blk_desc *dev_desc)
dev_desc->sig_type = SIG_TYPE_MBR; dev_desc->sig_type = SIG_TYPE_MBR;
dev_desc->mbr_sig = mbr->unique_mbr_signature; dev_desc->mbr_sig = mbr->unique_mbr_signature;
} }
#else
ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz);
if (blk_dread(dev_desc, 0, 1, (ulong *)buffer) != 1)
return -1;
if (test_block_type(buffer) != DOS_MBR)
return -1;
#endif
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment