From ce88012533e7f33d82e93a973d08e5c8831d039f Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Sat, 25 Nov 2017 20:36:17 +0000 Subject: [PATCH] alarm/uboot-dragonboard410c to 2017.11-1 --- .../0001-arch-linux-arm-modifications.patch | 6 +-- ...clear-SDHCI_INT_STATUS-register-duri.patch | 48 +++++++++++++++++++ .../PKGBUILD | 31 +++++++----- .../boot.txt | 0 .../flashall | 2 +- .../mkscr | 0 .../uboot-dragonboard410c.install} | 2 +- 7 files changed, 71 insertions(+), 18 deletions(-) rename alarm/{uboot-dragonboard => uboot-dragonboard410c}/0001-arch-linux-arm-modifications.patch (82%) create mode 100644 alarm/uboot-dragonboard410c/0002-mmc-sdhci-don-t-clear-SDHCI_INT_STATUS-register-duri.patch rename alarm/{uboot-dragonboard => uboot-dragonboard410c}/PKGBUILD (60%) rename alarm/{uboot-dragonboard => uboot-dragonboard410c}/boot.txt (100%) rename alarm/{uboot-dragonboard => uboot-dragonboard410c}/flashall (91%) rename alarm/{uboot-dragonboard => uboot-dragonboard410c}/mkscr (100%) rename alarm/{uboot-dragonboard/uboot-dragonboard.install => uboot-dragonboard410c/uboot-dragonboard410c.install} (94%) diff --git a/alarm/uboot-dragonboard/0001-arch-linux-arm-modifications.patch b/alarm/uboot-dragonboard410c/0001-arch-linux-arm-modifications.patch similarity index 82% rename from alarm/uboot-dragonboard/0001-arch-linux-arm-modifications.patch rename to alarm/uboot-dragonboard410c/0001-arch-linux-arm-modifications.patch index 6ed3a1930..feb3260e6 100644 --- a/alarm/uboot-dragonboard/0001-arch-linux-arm-modifications.patch +++ b/alarm/uboot-dragonboard410c/0001-arch-linux-arm-modifications.patch @@ -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 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 diff --git a/alarm/uboot-dragonboard410c/0002-mmc-sdhci-don-t-clear-SDHCI_INT_STATUS-register-duri.patch b/alarm/uboot-dragonboard410c/0002-mmc-sdhci-don-t-clear-SDHCI_INT_STATUS-register-duri.patch new file mode 100644 index 000000000..a1d522778 --- /dev/null +++ b/alarm/uboot-dragonboard410c/0002-mmc-sdhci-don-t-clear-SDHCI_INT_STATUS-register-duri.patch @@ -0,0 +1,48 @@ +From 4f0652c7341b48075a1e197aaffd0be378e29e6f Mon Sep 17 00:00:00 2001 +From: Jorge Ramirez-Ortiz +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 +--- + 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 + diff --git a/alarm/uboot-dragonboard/PKGBUILD b/alarm/uboot-dragonboard410c/PKGBUILD similarity index 60% rename from alarm/uboot-dragonboard/PKGBUILD rename to alarm/uboot-dragonboard410c/PKGBUILD index 2cb26e7c3..b120e864c 100644 --- a/alarm/uboot-dragonboard/PKGBUILD +++ b/alarm/uboot-dragonboard410c/PKGBUILD @@ -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} diff --git a/alarm/uboot-dragonboard/boot.txt b/alarm/uboot-dragonboard410c/boot.txt similarity index 100% rename from alarm/uboot-dragonboard/boot.txt rename to alarm/uboot-dragonboard410c/boot.txt diff --git a/alarm/uboot-dragonboard/flashall b/alarm/uboot-dragonboard410c/flashall similarity index 91% rename from alarm/uboot-dragonboard/flashall rename to alarm/uboot-dragonboard410c/flashall index a80d20de5..83f2ca4e2 100755 --- a/alarm/uboot-dragonboard/flashall +++ b/alarm/uboot-dragonboard410c/flashall @@ -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 diff --git a/alarm/uboot-dragonboard/mkscr b/alarm/uboot-dragonboard410c/mkscr similarity index 100% rename from alarm/uboot-dragonboard/mkscr rename to alarm/uboot-dragonboard410c/mkscr diff --git a/alarm/uboot-dragonboard/uboot-dragonboard.install b/alarm/uboot-dragonboard410c/uboot-dragonboard410c.install similarity index 94% rename from alarm/uboot-dragonboard/uboot-dragonboard.install rename to alarm/uboot-dragonboard410c/uboot-dragonboard410c.install index e98a246b5..5593b6878 100644 --- a/alarm/uboot-dragonboard/uboot-dragonboard.install +++ b/alarm/uboot-dragonboard410c/uboot-dragonboard410c.install @@ -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