alarm/uboot-dragonboard410c to 2017.11-1

This commit is contained in:
Kevin Mihelich 2017-11-25 20:36:17 +00:00
parent 4d1c81c8c4
commit ce88012533
7 changed files with 71 additions and 18 deletions

View file

@ -1,7 +1,7 @@
From 5af344398ccc2c53addf100ddee45a0d115195ea Mon Sep 17 00:00:00 2001
From 7bb2cd6db10aaa7d51d832aebf6db2185da5f2a6 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Wed, 22 Mar 2017 23:07:06 -0600
Subject: [PATCH] arch linux arm modifications
Subject: [PATCH 1/2] arch linux arm modifications
---
arch/arm/dts/dragonboard410c.dts | 8 ++++++++
@ -27,5 +27,5 @@ index 7746622dda..55deee4887 100644
#include "dragonboard410c-uboot.dtsi"
--
2.12.0
2.14.1

View file

@ -0,0 +1,48 @@
From 4f0652c7341b48075a1e197aaffd0be378e29e6f Mon Sep 17 00:00:00 2001
From: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Date: Thu, 2 Nov 2017 15:10:21 +0100
Subject: [PATCH 2/2] mmc: sdhci: don't clear SDHCI_INT_STATUS register during
CMD_INHIBIT
Fixes emmc initialization regression on the db410c platform.
Clearing this register while SDHCI_PRESENT_STATE reports
SDHCI_CMD_INHIBIT leads to undefined behaviour on the db410c.
When commit 7dde50 was merged (mmc: sdhci: Wait for SDHCI_INT_DATA_END
when transferring), SDHCI transfers transitioned to wait for bit
SDHCI_INT_DATA_END before flagging transfers done.
Without this patch, the db410 platform fails to initialize its eMMC
due to all of its transfers timing out (SDHCI_INT_DATA_END is never
raised after all the blocks have been transferred).
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
---
drivers/mmc/sdhci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 11d1f0c24c..f0c5aad7ca 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -157,7 +157,6 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
/* Timeout unit - ms */
static unsigned int cmd_timeout = SDHCI_CMD_DEFAULT_TIMEOUT;
- sdhci_writel(host, SDHCI_INT_ALL_MASK, SDHCI_INT_STATUS);
mask = SDHCI_CMD_INHIBIT | SDHCI_DATA_INHIBIT;
/* We shouldn't wait for data inihibit for stop commands, even
@@ -181,6 +180,8 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
udelay(1000);
}
+ sdhci_writel(host, SDHCI_INT_ALL_MASK, SDHCI_INT_STATUS);
+
mask = SDHCI_INT_RESPONSE;
if (!(cmd->resp_type & MMC_RSP_PRESENT))
flags = SDHCI_CMD_RESP_NONE;
--
2.14.1

View file

@ -3,10 +3,10 @@
buildarch=8
pkgname=uboot-dragonboard
pkgver=2017.03
firmver=1.4.0
pkgrel=2
pkgname=uboot-dragonboard410c
pkgver=2017.11
firmver=r1032.1.1
pkgrel=1
pkgdesc="U-Boot for Dragonboard 410c"
arch=('aarch64')
url='http://www.denx.de/wiki/U-Boot/WebHome'
@ -14,29 +14,33 @@ license=('GPL' 'custom')
install=$pkgname.install
backup=('boot/boot.txt' 'boot/boot.scr')
makedepends=('bc' 'dtc' 'git' 'skales')
replaces=('uboot-dragonboard')
options=('!strip')
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver/rc/-rc}.tar.bz2"
"https://developer.qualcomm.com/download/db410c/firmware-410c-${firmver}.bin"
"http://builds.96boards.org/releases/dragonboard410c/qualcomm/firmware/linux-board-support-package-${firmver}.zip"
'git+https://git.linaro.org/landing-teams/working/qualcomm/signlk.git'
'https://archlinuxarm.org/builder/src/dragonboard/gpt_both0.bin'
'https://archlinuxarm.org/builder/src/dragonboard/emmc_appsboot.mbn'
'0001-arch-linux-arm-modifications.patch'
'0002-mmc-sdhci-don-t-clear-SDHCI_INT_STATUS-register-duri.patch'
'boot.txt'
'mkscr'
'flashall')
md5sums=('52fed6ce16e0c4a50e2cd4defdf9097a'
'be80a375473a9308d8b4b47c4d8ff811'
md5sums=('7848f6fd197e2c6ef2eb483dd5bd2858'
'9dd72a683385079e3012cf1a8a1912df'
'SKIP'
'5ffd612a1496e7a497480ff3d3b40776'
'9a0a5a3defcc4833cbd00fe24526939e'
'2b5efb7db1444d7f10f19819383db6d1'
'f9ae23c4939dd249a75747e54714ee81'
'0a757c79e81798fbef08cb05908d3572'
'2bea1d7a70a5f3043b549d860499866c'
'021623a04afd29ac3f368977140cfbfd'
'c38dbecb437f8309a29bc04a2296284f')
'8705acaec674dd15117ec329088a7819')
prepare() {
sh firmware-410c-${firmver}.bin --auto-accept
cd u-boot-${pkgver/rc/-rc}
git apply ../0001-arch-linux-arm-modifications.patch
git apply ../0002-mmc-sdhci-don-t-clear-SDHCI_INT_STATUS-register-duri.patch
}
build() {
@ -51,8 +55,9 @@ build() {
}
package() {
install -Dpt "${pkgdir}/boot" linux-board-support-package-v${firmver%.0}/bootloaders-linux/{{hyp,rpm,tz-psci,sbl1}.mbn,NON-HLOS.bin} gpt_both0.bin emmc_appsboot.mbn
install -D -m644 linux-board-support-package-v${firmver%.0}/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.firmware"
install -Dpt "${pkgdir}/boot" linux-board-support-package-${firmver}/bootloaders-linux/{{hyp,rpm,tz,sbl1}.mbn,NON-HLOS.bin} gpt_both0.bin
install -D -m644 linux-board-support-package-${firmver}/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.firmware"
signlk/signlk.sh -i=emmc_appsboot.mbn -o="${pkgdir}/boot/emmc_appsboot.mbn" -d
cd u-boot-${pkgver/rc/-rc}

View file

@ -5,7 +5,7 @@ fastboot flash hyp hyp.mbn
fastboot flash modem NON-HLOS.bin
fastboot flash rpm rpm.mbn
fastboot flash sbl1 sbl1.mbn
fastboot flash tz tz-psci.mbn
fastboot flash tz tz.mbn
fastboot erase boot
fastboot erase rootfs

View file

@ -12,7 +12,7 @@ flash_uboot() {
dd if=/boot/NON-HLOS.bin of=${dev}p1
dd if=/boot/sbl1.mbn of=${dev}p2
dd if=/boot/rpm.mbn of=${dev}p3
dd if=/boot/tz-psci.mbn of=${dev}p4
dd if=/boot/tz.mbn of=${dev}p4
dd if=/boot/hyp.mbn of=${dev}p5
dd if=/boot/emmc_appsboot.mbn of=${dev}p7
dd if=/boot/u-boot.img of=${dev}p8