Ghorai, Sukumar wrote:

-----Original Message-----
From: Adrian Hunter [mailto:[email protected]]
Sent: Monday, July 26, 2010 6:13 PM
To: Ghorai, Sukumar
Cc: [email protected]; Andrew Morton
Subject: Re: [PATCH] mmc: add device class attribute for ext_csd

Ghorai, Sukumar wrote:
All,
EXT_CSD is 512byte information (read using CMD8) for the MMC (eMMC)
device.
And for the latest and upcoming specification, ext_csd are much relevant
then past.
So please let me know your idea to add and get the same ext_csd as MMC
device attribute. This is the same way currently available for csd, cid,
src, etc.
(# cat /sys/class/mmc_host/mmc1/mmc1\:0001/ext_csd)
Some of the values in Extended CSD can change so storing
it could cause incorrect values to be reported.
[Ghorai] I was thinking to get the original value as reference, such that we 
know that host is capable for maximum negotiation, like 8-bit, DDR mode, 
voltage, etc.
1. Is there any other way to get the original value supported by card?
2. If yes, is it worth full to do?

If it is for debugging, would a debug prints do instead e.g.

diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 89f7a25..cba87b0 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -249,6 +249,9 @@ static int mmc_read_ext_csd(struct mmc_card *card)
                                       1 << ext_csd[EXT_CSD_S_A_TIMEOUT];
       }

+       pr_debug("%s: initial ext_csd bus width code %02x",
+                mmc_hostname(host), ext_csd[EXT_CSD_BUS_WIDTH]);
+
out:
       kfree(ext_csd);




Note that Extended CSD is available via debugfs
e.g. for device mmc0:0001 with debugfs mounted on /sys/kernel/debug

    cat /sys/kernel/debug/mmc0/mmc0\:0001/ext_csd
[Ghorai] Thanks. I got it.

<<snip>>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to