From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Robinson Date: Thu, 5 Oct 2017 12:01:11 +0100 Subject: [U-Boot] [PATCH] disk: part_dos: Use the original allocation scheme for the SPL case In-Reply-To: <1507134597-6831-1-git-send-email-fabio.estevam@nxp.com> References: <1507134597-6831-1-git-send-email-fabio.estevam@nxp.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Oct 4, 2017 at 5:29 PM, Fabio Estevam wrote: > Since commit ff98cb90514d ("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: Fabio Estevam Tested-by: Peter Robinson Tested on both a wandboard quad and a hummingboard2 (mx6cuboxi) and it works for me. Peter > --- > Hi Tom, > > I do not have time this week to further investigate and narrow down > this problem. > > Using the old allocation scheme fixes the mx6 SPL boot problem. > > > disk/part_dos.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/disk/part_dos.c b/disk/part_dos.c > index 1a36be0..6dd2c2d 100644 > --- a/disk/part_dos.c > +++ b/disk/part_dos.c > @@ -89,6 +89,7 @@ static int test_block_type(unsigned char *buffer) > > static int part_test_dos(struct blk_desc *dev_desc) > { > +#ifndef CONFIG_SPL_BUILD > ALLOC_CACHE_ALIGN_BUFFER(legacy_mbr, mbr, dev_desc->blksz); > > if (blk_dread(dev_desc, 0, 1, (ulong *)mbr) != 1) > @@ -102,6 +103,15 @@ static int part_test_dos(struct blk_desc *dev_desc) > dev_desc->sig_type = SIG_TYPE_MBR; > 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; > } > -- > 2.7.4 > > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > https://lists.denx.de/listinfo/u-boot