2018.11, Build with ATF 2.0, Fix Hummingboard and CuBox-i devices

This commit is contained in:
Peter Robinson 2018-12-04 10:37:53 +00:00
parent 1a5c77caf4
commit 5856918f28
4 changed files with 133 additions and 4 deletions

View File

@ -0,0 +1,37 @@
From 0775d5df2f7d076e7fdf15f517ca464623cce0fb Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Tue, 4 Dec 2018 10:27:54 +0000
Subject: [PATCH] make tools-all defconfig a thing
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
configs/tools-all_defconfig | 3 +++
tools/Makefile | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
create mode 100644 configs/tools-all_defconfig
diff --git a/configs/tools-all_defconfig b/configs/tools-all_defconfig
new file mode 100644
index 00000000000..be69bdf43ad
--- /dev/null
+++ b/configs/tools-all_defconfig
@@ -0,0 +1,3 @@
+CONFIG_SYS_TEXT_BASE=0
+CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
diff --git a/tools/Makefile b/tools/Makefile
index c93d17a42fd..29ff6ed221b 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -125,7 +125,7 @@ fit_info-objs := $(dumpimage-mkimage-objs) fit_info.o
fit_check_sign-objs := $(dumpimage-mkimage-objs) fit_check_sign.o
file2include-objs := file2include.o
-ifneq ($(CONFIG_MX23)$(CONFIG_MX28),)
+ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_FIT_SIGNATURE),)
# Add CONFIG_MXS into host CFLAGS, so we can check whether or not register
# the mxsimage support within tools/mxsimage.c .
HOSTCFLAGS_mxsimage.o += -DCONFIG_MXS
--
2.19.2

View File

@ -0,0 +1,85 @@
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-2018.11-rc3.tar.bz2) = 013bf1be169eaea88e44dec187eabc1c5806c1e813f0bf0a28da17f67b4d72b30708e55cb31767ceb7a171f6e1be07f092941009cff8d2cfdc51d3189b89111f
SHA512 (u-boot-2018.11.tar.bz2) = 1ea0bbb5f5e6d4c60b3a6bd345d1fa6e9da025daf36f47e8392bab34cb432c2e3633d903efb260f71fff87dffd6f2bf09ac900e96b3d4247073958d83b89ceff

View File

@ -1,8 +1,8 @@
%global candidate rc3
#global candidate rc3
Name: uboot-tools
Version: 2018.11
Release: 0.1%{?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,6 +20,7 @@ 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: make-tools-all-defconfig-a-thing.patch
# Board fixes and enablement
Patch10: rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch
@ -29,6 +30,7 @@ Patch13: tegra186-jetson-tx2-disable-onboard-emmc.patch
Patch14: tegra-TXx-Add-CONFIG_EFI_LOADER_BOUNCE_BUFFER.patch
Patch15: tegra-fix-tx1.patch
Patch16: sunxi-DT-A64-add-Pine64-LTS-support.patch
Patch17: mmc-fsl_esdhc-Avoid-infinite-loop-in-esdhc_send_cmd_common.patch
BuildRequires: bc
BuildRequires: dtc
@ -161,7 +163,7 @@ done
%endif
make HOSTCC="gcc $RPM_OPT_FLAGS" %{?_smp_mflags} CROSS_COMPILE="" defconfig V=1 O=builds/
make HOSTCC="gcc $RPM_OPT_FLAGS" %{?_smp_mflags} CROSS_COMPILE="" tools-all_defconfig V=1 O=builds/
make HOSTCC="gcc $RPM_OPT_FLAGS" %{?_smp_mflags} CROSS_COMPILE="" tools-all V=1 O=builds/
%install
@ -315,6 +317,11 @@ cp -p board/warp7/README builds/docs/README.warp7
%endif
%changelog
* Tue Dec 4 2018 Peter Robinson <pbrobinson@fedoraproject.org> 2018.11-1
- 2018.11
- Build with ATF 2.0
- Fix Hummingboard and CuBox-i devices
* Tue Oct 30 2018 Peter Robinson <pbrobinson@fedoraproject.org> 2018.11-0.1.rc3
- 2018.11 RC3