linux-ti33x-psp 3.1: add dto patch to fix problems with various sd cards
[glsdk/meta-ti-glsdk.git] / recipes-bsp / u-boot / u-boot / 2011.12 / 0006-OMAP-MMC-Add-delay-before-waiting-for-status.patch
1 From 64e971ecd4bb1dec118b5687dfa7c57790922bba Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmx.de>
3 Date: Wed, 21 Dec 2011 23:56:35 +0000
4 Subject: [PATCH 06/10] OMAP MMC: Add delay before waiting for status
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 Loading kernel from MMC created the following error message reproducable:
11 | reading uImage
12 | mmc_send_cmd: timedout waiting for stat!
13 |
14 | 2860468 bytes read
16 Tested on overo with OMAP3530:
17 * OMAP3530-GP ES3.1, CPU-OPP2, L3-165MHz, Max CPU Clock 720 mHz
18   Die ID #470e000400000000040398d31402100c
19 * OMAP3530-GP ES3.1, CPU-OPP2, L3-165MHz, Max CPU Clock 600 mHz
20   Die ID #112000040000000004035c140101b011
22 Signed-off-by: Andreas Müller <schnitzeltony@gmx.de>
23 ---
24  drivers/mmc/omap_hsmmc.c |    4 ++++
25  1 files changed, 4 insertions(+), 0 deletions(-)
27 diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
28 index c38b9e6..ac91e5d 100644
29 --- a/drivers/mmc/omap_hsmmc.c
30 +++ b/drivers/mmc/omap_hsmmc.c
31 @@ -197,6 +197,10 @@ static int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
32         unsigned int flags, mmc_stat;
33         ulong start;
34  
35 +       /* Delay added before checking the status */
36 +       if (cmd->cmdidx == MMC_CMD_SEND_STATUS)
37 +               udelay(1); /* wait 1 us */
38 +
39         start = get_timer(0);
40         while ((readl(&mmc_base->pstate) & DATI_MASK) == DATI_CMDDIS) {
41                 if (get_timer(0) - start > MAX_RETRY_MS) {
42 -- 
43 1.7.2.5