public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* A MMC card transfer issue
@ 2010-11-09  5:39 Tomoya MORINAGA
  2010-11-09  5:53 ` Kyungmin Park
  0 siblings, 1 reply; 26+ messages in thread
From: Tomoya MORINAGA @ 2010-11-09  5:39 UTC (permalink / raw)
  To: linux-mmc, linux-kernel; +Cc: Andrew", kok.howg.ewe

I am facing the issue about some MMC cards on Intel EG20T PCH (Platform Controller Hub).
The linux version is 2.6.36.
I can not transfer data the MMC cards (e.g. Transcned MMC card).
The card is 1 bit bus width. And the card is according to MMC specification V3.x.
And the EG20T has a 4 bit bus width capability 
Linux MMC standard driver decides the card bus width as 4 bit,
if the MMC specification version is larger than or equal to V4.0 like below.

linux/drivers/mmc/core/mmc.c

 505        /*
 506         * Activate wide bus (if supported).
 507         */
 508        if ((card->csd.mmca_vsn >= CSD_SPEC_VER_4) &&
 509            (host->caps & (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA))) {
 510                unsigned ext_csd_bit, bus_width;
 511
 512                if (host->caps & MMC_CAP_8_BIT_DATA) {
 513                        ext_csd_bit = EXT_CSD_BUS_WIDTH_8;
 514                        bus_width = MMC_BUS_WIDTH_8;
 515                } else {
 516                        ext_csd_bit = EXT_CSD_BUS_WIDTH_4;
 517                        bus_width = MMC_BUS_WIDTH_4;
 518                }
 519
 520                err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
 521                                 EXT_CSD_BUS_WIDTH, ext_csd_bit);
 522
 523                if (err && err != -EBADMSG)
 524                        goto free_card;
 525
 526                if (err) {
 527                        printk(KERN_WARNING "%s: switch to bus width %d "
 528                               "failed\n", mmc_hostname(card->host),
 529                               1 << bus_width);
 530                        err = 0;
 531                } else {
 532                        mmc_set_bus_width(card->host, bus_width);
 533                }
 534        }
 535

However the MMC specification version id is the same as V3.x and V4.0.
Therefore the driver uses the 4 bit bus width for the MMC card 
even if the card has only 1 bit bus width.
I modified the driver to use 1 bit bus width only tentatively and confirmed that
we can mount the card and R/W correctly.

I think we can not support MMC_CAP_4_BIT_DATA or MMC_CAP_8_BIT_DATA in MMC V4.0.

How do you think ?

-- 
Thanks,
Tomoya MORINAGA(OKI SEMICONDUCTOR CO., LTD.)

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2011-03-25  1:22 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-09  5:39 A MMC card transfer issue Tomoya MORINAGA
2010-11-09  5:53 ` Kyungmin Park
2010-11-09  7:29   ` Tomoya MORINAGA
2010-11-11  2:59   ` Tomoya MORINAGA
2010-12-01  1:08     ` Tomoya MORINAGA
     [not found]       ` <2D50F985-2383-4406-8514-DFE462A5F546@marvell.com>
2010-12-01  3:15         ` Philip Rakity
     [not found]         ` <4D2E0464ABB54FFF9C10583336E27879@hacdom.okisemi.com>
2011-01-19  0:59           ` Philip Rakity
2011-01-19  1:29             ` Tomoya MORINAGA
2011-01-19  1:41               ` Chris Ball
2011-01-19  3:12                 ` Philip Rakity
2011-01-19  6:05           ` Philip Rakity
2011-01-19  6:30             ` Tomoya MORINAGA
2011-01-19 17:42             ` Chris Ball
2011-01-19 23:49               ` Tomoya MORINAGA
2011-01-26  8:28               ` Tomoya MORINAGA
2011-01-26 15:42                 ` Philip Rakity
2011-01-27  1:00                   ` Tomoya MORINAGA
2011-01-27  1:03                     ` Philip Rakity
2011-01-27  1:31                       ` Tomoya MORINAGA
2011-01-27  1:43                         ` Philip Rakity
2011-01-27  3:20                           ` Tomoya MORINAGA
     [not found]                             ` <0DBFCBB8-B4A3-46A6-A68D-14FAED451619@marvell.com>
     [not found]                               ` <9992F28C7C0C445E956D351E3774C821@hacdom.okisemi.com>
     [not found]                                 ` <82CB4E44-6543-4578-ACE4-37850FC4A49A@marvell.com>
     [not found]                                   ` <EE9384C765994E26857C78E3D3A19304@hacdom.okisemi.com    >
     [not found]                                   ` <EE9384C765994E26857C78E3D3A19304@hacdom.okisemi.com>
     [not found]                                   ` <EE9384C765994E26857C78E3D3A19304@hacdom.okisemi.com >
     [not found]                                   ` <EE9384C765994E26857C78E3D3A19304@hacdom.okisemi.com   >
     [not found]                                     ` <AF584C10-A796-43 5 B-8AB2-DA6D6C0E3FD7@marvell.com>
     [not found]                                       ` <DE7D3AAF538943459079D18D0CE6ED44@hacdom.okisemi.com>
     [not found]                                         ` <DDF13C55-A8A1-45C1-AE9A-A76754ED7008@marvell.com>
     [not found]                                           ` <4425BB0054B748C68A25DD1DFBBB52A7@hacdom.okisemi.com>
     [not found]                                             ` <5E1B7BBD-C96E-4CC0-B03B-ADCEB0120085@marvell.com>
     [not found]                                               ` <0C438F11-132E-4639-820D-0E42EEDCD6E7@marvell.com>
     [not found]                                                 ` <671E3EC021E946A383C65F07A0101B27@hacdom.okisemi.com>
     [not found]                                                   ` <16706427-F00E-46F3-B0B4-9B7F06AD0E71@marvell.com>
2011-01-31 16:40                                                     ` Philip Rakity
2011-01-31 17:18                                                       ` Nicolas Pitre
2011-03-23  0:31                                                       ` Tomoya MORINAGA
2011-03-24 14:19                                                         ` Philip Rakity
2011-03-25  1:22                                                           ` Tomoya MORINAGA

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox