All of lore.kernel.org
 help / color / mirror / Atom feed
* use default speed of the eMMC
@ 2016-05-24  9:05 장민우
  0 siblings, 0 replies; 9+ messages in thread
From: 장민우 @ 2016-05-24  9:05 UTC (permalink / raw)
  To: linux-kernel

Dear chrisball.

Hello, I'm Minwoo Jang.

I have a question about using default speed of the eMMC.

When default speed is used, mmc_select_bus_width() is never called.

So, eMMC can not be set 4 bit or 8 bit bus width, I think.

Please, give me your opinions on the following diff codes.

Thank you.

=====================================================

diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 94b4462..3b1cc4d 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -952,6 +952,8 @@ static int mmc_select_bus_width(struct mmc_card *card)

                if (!err) {
                        err = bus_width;
+                       pr_warn("%s: switch to bus width %d\n",
+                               mmc_hostname(host), (1 << bus_width));
                        break;
                } else {
                        pr_warn("%s: switch to bus width %d failed\n",
@@ -1500,6 +1502,14 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
                        if (err)
                                goto err;
                }
+       } else {
+               /* Select the bus width for normal speed mode */
+               err = mmc_select_bus_width(card);
+               if (IS_ERR_VALUE(err)) {
+                       pr_warn("%s: Selecting bus width failed\n",
+                               mmc_hostname(card->host));
+                       goto err;
+               }
        }

Best regards,

MW Jang.

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

end of thread, other threads:[~2016-05-26  9:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20160524090753epcas1p125c06a036988b476840c79048cb45428@epcas1p1.samsung.com>
2016-05-24  9:07 ` use default speed of the eMMC 장민우
2016-05-24  9:41   ` Jaehoon Chung
2016-05-26  5:16     ` 장민우
2016-05-26  5:49       ` Jaehoon Chung
2016-05-26  6:34         ` 장민우
2016-05-26  8:30           ` Jaehoon Chung
2016-05-26  9:04             ` 장민우
2016-05-26  9:45               ` Jaehoon Chung
2016-05-24  9:05 장민우

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.