From ec19c3a79d8c3335e6451752b00f16e5a16200bc Mon Sep 17 00:00:00 2001 From: "H. Nikolaus Schaller" Date: Fri, 29 Jan 2016 18:48:48 +0100 Subject: [PATCH] omap_hsmmc: print and abort if mmc controller reports other error/status Signed-off-by: H. Nikolaus Schaller --- drivers/mmc/omap_hsmmc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index b81b5b03a33..26f709cdbb9 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -525,7 +525,6 @@ static int mmc_write_data(struct hsmmc *mmc_base, const char *buf, return TIMEOUT; } } while (mmc_stat == 0); - if ((mmc_stat & (IE_DTO | IE_DCRC | IE_DEB)) != 0) mmc_reset_controller_fsm(mmc_base, SYSCTL_SRD); @@ -553,6 +552,10 @@ static int mmc_write_data(struct hsmmc *mmc_base, const char *buf, &mmc_base->stat); break; } + if (mmc_stat & ~(IE_DTO | IE_DCRC | IE_DEB | ERRI_MASK | BRR_MASK | BWR_MASK | TC_MASK)) { + printf("%s: unhandled mmc_stat = %x\n", __func__, mmc_stat); + return 1; + } } return 0; } -- 2.47.2