This commit is contained in:
Peter Robinson 2019-01-15 07:03:28 +00:00
parent 3e7633feba
commit 965068b7e0
4 changed files with 10 additions and 141 deletions

View File

@ -1,47 +0,0 @@
From patchwork Mon Dec 17 10:05:45 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [U-Boot,2/2] mmc: bring back partition init for non-DM MMC drivers
X-Patchwork-Submitter: Andre Przywara <andre.przywara@arm.com>
X-Patchwork-Id: 1014381
X-Patchwork-Delegate: jagannadh.teki@gmail.com
Message-Id: <20181217100545.28369-3-andre.przywara@arm.com>
To: Maxime Ripard <maxime.ripard@bootlin.com>,
Jagan Teki <jagan@openedev.com>, Jaehoon Chung <jh80.chung@samsung.com>
Cc: Tom Rini <trini@konsulko.com>, u-boot@lists.denx.de
Date: Mon, 17 Dec 2018 10:05:45 +0000
From: Andre Przywara <andre.przywara@arm.com>
List-Id: U-Boot discussion <u-boot.lists.denx.de>
Commit d0851c893706 ("blk: Call part_init() in the post_probe() method")
removed the call to part_init() in mmc.c, as this is done by the DM_MMC
framework.
However Allwinner is (still) relying on a non-DM MMC driver, so we are
now missing the implicit partition init, leading to failing MMC accesses
due to the missing partition information.
Bring the call back just for non-DM MMC driver to fix this regression.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Soeren Moch <smoch@web.de>
---
drivers/mmc/mmc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index f5c821e308..d858127132 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -2449,6 +2449,10 @@ static int mmc_startup(struct mmc *mmc)
bdesc->revision[0] = 0;
#endif
+#if !defined(CONFIG_DM_MMC) && (!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBDISK_SUPPORT))
+ part_init(bdesc);
+#endif
+
return 0;
}

View File

@ -1,85 +0,0 @@
From patchwork Mon Nov 19 12:31:53 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [U-Boot,
v2] mmc: fsl_esdhc: Avoid infinite loop in esdhc_send_cmd_common()
X-Patchwork-Submitter: Fabio Estevam <festevam@gmail.com>
X-Patchwork-Id: 999792
Message-Id: <1542630713-30355-1-git-send-email-festevam@gmail.com>
To: jh80.chung@samsung.com
Cc: baruch@tkos.co.il, u-boot@lists.denx.de
Date: Mon, 19 Nov 2018 10:31:53 -0200
From: Fabio Estevam <festevam@gmail.com>
List-Id: U-Boot discussion <u-boot.lists.denx.de>
The following hang is observed on a Hummingboard 2 MicroSOM
i2eX iMX6D - rev 1.3 with no eMMC populated on board:
U-Boot SPL 2018.11+gf6206f8587 (Nov 16 2018 - 00:56:34 +0000)
Trying to boot from MMC1
U-Boot 2018.11+gf6206f8587 (Nov 16 2018 - 00:56:34 +0000)
CPU: Freescale i.MX6D rev1.5 996 MHz (running at 792 MHz)
CPU: Extended Commercial temperature grade (-20C to 105C) at 33C
Reset cause: POR
Board: MX6 HummingBoard2
DRAM: 1 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment
No panel detected: default to HDMI
Display: HDMI (1024x768)
In: serial
Out: serial
Err: serial
---> hangs
which is caused by the following infinite loop inside esdhc_send_cmd_common()
while (!(esdhc_read32(&regs->irqstat) & flags))
;
Instead of looping forever, provide an exit path so that a timeout
error can be propagated in the case irqstat does not report
any interrupts, which may happen when no eMMC is populated on
board.
Reported-by: Ricardo Salveti <rsalveti@rsalveti.net>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
Changes since v1:
- Jump to the label out on error path (Baruch).
drivers/mmc/fsl_esdhc.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 3cdfa7f..b8d0b00 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -396,6 +396,7 @@ static int esdhc_send_cmd_common(struct fsl_esdhc_priv *priv, struct mmc *mmc,
uint irqstat;
u32 flags = IRQSTAT_CC | IRQSTAT_CTOE;
struct fsl_esdhc *regs = priv->esdhc_regs;
+ unsigned long start;
#ifdef CONFIG_SYS_FSL_ERRATUM_ESDHC111
if (cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION)
@@ -453,8 +454,13 @@ static int esdhc_send_cmd_common(struct fsl_esdhc_priv *priv, struct mmc *mmc,
flags = IRQSTAT_BRR;
/* Wait for the command to complete */
- while (!(esdhc_read32(&regs->irqstat) & flags))
- ;
+ start = get_timer(0);
+ while (!(esdhc_read32(&regs->irqstat) & flags)) {
+ if (get_timer(start) > 1000) {
+ err = -ETIMEDOUT;
+ goto out;
+ }
+ }
irqstat = esdhc_read32(&regs->irqstat);

View File

@ -1 +1 @@
SHA512 (u-boot-2019.01-rc3.tar.bz2) = aa7dffd176519912c163d640dbb53aa0893283ab45c5567d031d11cb168fb68e4af5fb9a6f6b311d21cb53e5db4b09d34928852d1b7333f98c515301693af7d9
SHA512 (u-boot-2019.01.tar.bz2) = d9699cd22afe9bc747d64208068c2cf8a2c3143d161ede24536f6fd6adfd6b81e28920589722639e2e48fcf34e8dbde3ead7f691f14cbcc38cd75694d14d719b

View File

@ -1,8 +1,8 @@
%global candidate rc3
#global candidate rc3
Name: uboot-tools
Version: 2019.01
Release: 0.4%{?candidate:.%{candidate}}%{?dist}
Release: 1%{?candidate:.%{candidate}}%{?dist}
Summary: U-Boot utilities
License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+
URL: http://www.denx.de/wiki/U-Boot
@ -20,15 +20,13 @@ Patch1: uefi-use-Fedora-specific-path-name.patch
# general fixes
Patch2: uefi-distro-load-FDT-from-any-partition-on-boot-device.patch
Patch3: usb-kbd-fixes.patch
Patch4: mmc-bring-back-partition-init-for-non-DM-MMC-drivers.patch
# Board fixes and enablement
Patch10: rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch
Patch12: dragonboard-fixes.patch
Patch13: tegra186-jetson-tx2-disable-onboard-emmc.patch
Patch14: tegra-TXx-Add-CONFIG_EFI_LOADER_BOUNCE_BUFFER.patch
Patch15: tegra-fix-tx1.patch
Patch16: mmc-fsl_esdhc-Avoid-infinite-loop-in-esdhc_send_cmd_common.patch
Patch11: dragonboard-fixes.patch
Patch12: tegra186-jetson-tx2-disable-onboard-emmc.patch
Patch13: tegra-TXx-Add-CONFIG_EFI_LOADER_BOUNCE_BUFFER.patch
Patch14: tegra-fix-tx1.patch
BuildRequires: bc
BuildRequires: dtc
@ -315,6 +313,9 @@ cp -p board/warp7/README builds/docs/README.warp7
%endif
%changelog
* Tue Jan 15 2019 Peter Robinson <pbrobinson@fedoraproject.org> 2019.01-1
- 2019.01
* Tue Jan 8 2019 Peter Robinson <pbrobinson@fedoraproject.org> 2019.01-0.4-rc3
- 2019.01 RC3