From: Zhang Haijun <b42677@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3 V2] esdhc: Detecting 8 bit width before mmc initialization
Date: Fri, 10 Jan 2014 11:55:01 +0800 [thread overview]
Message-ID: <52CF6F15.9000408@freescale.com> (raw)
In-Reply-To: <18EC7954-610F-42DF-93C3-5BD2686D4AEE@antoniou-consulting.com>
Understand.
Thanks.
Best regards,
Haijun
? 2014/1/9 18:43, Pantelis Antoniou ??:
> Hi Haijun,
>
> On Dec 11, 2013, at 7:35 AM, Haijun Zhang wrote:
>
>> The upper 4 data signals of esdhc are shared with spi flash.
>> So detect if the upper 4 pins are assigned to esdhc before
>> enable sdhc 8 bit width.
>>
>> Signed-off-by: Haijun Zhang <haijun.zhang@freescale.com>
>> ---
>> changs for V2:
>> - No changes
>>
>> drivers/mmc/fsl_esdhc.c | 5 +++++
>> include/configs/T4240QDS.h | 1 +
>> 2 files changed, 6 insertions(+)
>>
>> diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
>> index b3b5f37..a5fee3c 100644
>> --- a/drivers/mmc/fsl_esdhc.c
>> +++ b/drivers/mmc/fsl_esdhc.c
>> @@ -646,6 +646,11 @@ int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg *cfg)
>> mmc->host_caps &= ~MMC_MODE_4BIT;
>> }
>>
>> + /* Detect if the upper 4 pins are used for ESDHC */
>> +#if defined(CONFIG_T4240QDS)
>> + if (!(readb(QIXIS_BASE + QIXIS_BRDCFG5) & QIXIS_MUX_SDHC_WIDTH8))
>> + mmc->host_caps &= ~MMC_MODE_8BIT;
>> +#endif
> Same comment applies as for the card detect quirk,
>
> #define CONFIG_ESDHC_DETECT_8_BIT_QUIRK etc.
>
>> if (caps & ESDHC_HOSTCAPBLT_HSS)
>> mmc->host_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS;
>>
>> diff --git a/include/configs/T4240QDS.h b/include/configs/T4240QDS.h
>> index 955e6b9..4799d38 100644
>> --- a/include/configs/T4240QDS.h
>> +++ b/include/configs/T4240QDS.h
>> @@ -167,6 +167,7 @@ unsigned long get_board_ddr_clk(void);
>> #define QIXIS_RCFG_CTL_WATCHDOG_ENBLE 0x08
>> #define QIXIS_BRDCFG5 0x55
>> #define QIXIS_MUX_SDHC 2
>> +#define QIXIS_MUX_SDHC_WIDTH8 1
>> #define QIXIS_BASE_PHYS (0xf00000000ull | QIXIS_BASE)
>>
>> #define CONFIG_SYS_CSPR3_EXT (0xf)
>> --
>> 1.8.4.1
>>
>>
> Regards
>
> -- Pantelis
>
>
>
next prev parent reply other threads:[~2014-01-10 3:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-11 5:35 [U-Boot] [PATCH 1/3 V2] esdhc: Workaround for card can't be detected on T4240QDS Haijun Zhang
2013-12-11 5:35 ` [U-Boot] [PATCH 2/3 V2] esdhc: Detecting 8 bit width before mmc initialization Haijun Zhang
2014-01-09 10:43 ` Pantelis Antoniou
2014-01-10 3:55 ` Zhang Haijun [this message]
2013-12-11 5:35 ` [U-Boot] [PATCH 3/3 V2] eSDHC: Calculate envaddr accroding to the address format Haijun Zhang
2014-01-09 10:46 ` Pantelis Antoniou
2014-01-09 10:42 ` [U-Boot] [PATCH 1/3 V2] esdhc: Workaround for card can't be detected on T4240QDS Pantelis Antoniou
2014-01-10 3:48 ` Zhang Haijun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52CF6F15.9000408@freescale.com \
--to=b42677@freescale.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.