From e1c04a60a82918ff5e8d00a7ac5b7888c4ab41dd Mon Sep 17 00:00:00 2001 From: Kirill Kapranov Date: Sun, 3 Oct 2021 02:10:51 +0300 Subject: [PATCH] u-boot: Fix booting delay Signed-off-by: Kirill Kapranov --- recipes-bsp/u-boot/compulab/imx8mm.inc | 1 + ...97-mmc-Fix-mmc_switch-workflow-issue.patch | 36 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 recipes-bsp/u-boot/compulab/imx8mm/0097-mmc-Fix-mmc_switch-workflow-issue.patch diff --git a/recipes-bsp/u-boot/compulab/imx8mm.inc b/recipes-bsp/u-boot/compulab/imx8mm.inc index 81e5658..1b0f307 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm.inc +++ b/recipes-bsp/u-boot/compulab/imx8mm.inc @@ -95,4 +95,5 @@ SRC_URI_append = " \ file://0094-Fix-mmc_autodetect.patch \ file://0095-config-Enable-video.patch \ file://0096-readout-some-cleannig.patch \ + file://0097-mmc-Fix-mmc_switch-workflow-issue.patch \ " diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0097-mmc-Fix-mmc_switch-workflow-issue.patch b/recipes-bsp/u-boot/compulab/imx8mm/0097-mmc-Fix-mmc_switch-workflow-issue.patch new file mode 100644 index 0000000..970ad96 --- /dev/null +++ b/recipes-bsp/u-boot/compulab/imx8mm/0097-mmc-Fix-mmc_switch-workflow-issue.patch @@ -0,0 +1,36 @@ +From e6b1432e42c06a2a1200731f91e0be99b70c01cc Mon Sep 17 00:00:00 2001 +From: Kirill Kapranov +Date: Sun, 3 Oct 2021 01:41:43 +0300 +Subject: [PATCH 97/97] mmc: Fix mmc_switch workflow issue + +Revert the patch 9a461acedebe664cf1e557c3b9ec983e6b04e805, that introduces +premature falling back on a long timeout instead of continuation of the +initialization. +Clear the ambiguity of the comment that led this. + +Signed-off-by: Kirill Kapranov +--- + drivers/mmc/mmc.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c +index 785ebc0cd3..6d9766a697 100644 +--- a/drivers/mmc/mmc.c ++++ b/drivers/mmc/mmc.c +@@ -819,11 +819,11 @@ static int __mmc_switch(struct mmc *mmc, u8 set, u8 index, u8 value, + return ret; + + /* +- * In cases when not allowed to poll by using CMD13 or because we aren't ++ * In cases we aren't allowed to poll by using CMD13, nor are we + * capable of polling by using mmc_wait_dat0, then rely on waiting the + * stated timeout to be sufficient. + */ +- if (ret == -ENOSYS || !send_status) { ++ if (ret == -ENOSYS && !send_status) { + mdelay(timeout_ms); + return 0; + } +-- +2.11.0 +