Skip to contentSkip to conversation

enable HW reset capbility

PATCH Superseded Chuanxiao Dong 2 participants 5 messages Dec 1, 2010 – Dec 9, 2010 MMC, SD and SDIO

v4 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/4 enable HW reset capbility

Quoted 1 line

From d3be0b4fe8e8a40294830dfd8d0543d1e957fd29 Mon Sep 17 00:00:00 2001

From: Chuanxiao Dong <[email protected]>
Date: Wed, 1 Dec 2010 19:14:02 +0800
Subject: [PATCH 1/4] enable HW reset caps of MMC card if card supports

HW reset capbility enable bit is byte 162 in card EXT_CSD register, only version4.4 card or later can support to enable this feature.

HW reset feature can be used to reset eMMC card when occures timeout errors during read/write/erase.

---
 drivers/mmc/core/mmc.c   |   29 +++++++++++++++++++++++++++++
 include/linux/mmc/card.h |    1 +
 include/linux/mmc/mmc.h  |    1 +
 3 files changed, 31 insertions(+), 0 deletions(-)
drivers/mmc/core/mmc.c +29 -0
index 77f93c3..85cc7f6 100644
@@ -310,6 +310,10 @@ static int mmc_read_ext_csd(struct mmc_card *card)
 			ext_csd[EXT_CSD_SEC_FEATURE_SUPPORT];
 		card->ext_csd.trim_timeout = 300 *
 			ext_csd[EXT_CSD_TRIM_MULT];
+		/*
+		 * check Hardware reset cap
+		 */
+		card->ext_csd.rst = ext_csd[EXT_CSD_RST];
 	}
 
 	if (ext_csd[EXT_CSD_ERASED_MEM_CONT])
@@ -484,6 +488,31 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
 	}
 
 	/*
+	 * eMMC4.4 version card has HW reset capbility.
+	 * Enable this feature here:
+	 * RST_N_FUNCTION register is W/R, one time programmable
+	 * or readable.
+	 * So need to enable this register only once after power on
+	 */
+	if (card->csd.mmca_vsn >= CSD_SPEC_VER_4 &&
+			card->ext_csd.rev >= 4 &&
+			card->ext_csd.rst == 0) {
+		err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
+				EXT_CSD_RST, 1);
+
+		if (err && err != -EBADMSG)
+			goto free_card;
+
+		if (err) {
+			printk(KERN_WARNING "%s: switch to rst enable "
+				   "failed %d\n",
+				   mmc_hostname(card->host), err);
+			err = 0;
+		} else
+			card->ext_csd.rst = 1;
+	}
+
+	/*
 	 * Activate high speed (if supported)
 	 */
 	if ((card->ext_csd.hs_max_dtr != 0) &&
include/linux/mmc/card.h +1 -0
index 8ce0827..ebee676 100644
@@ -54,6 +54,7 @@ struct mmc_ext_csd {
 	unsigned int		sec_trim_mult;	/* Secure trim multiplier  */
 	unsigned int		sec_erase_mult;	/* Secure erase multiplier */
 	unsigned int		trim_timeout;		/* In milliseconds */
+	unsigned int		rst; /* hardware reset enable bit */
 };
 
 struct sd_scr {
include/linux/mmc/mmc.h +1 -0
index 956fbd8..b7ab0da 100644
@@ -251,6 +251,7 @@ struct _mmc_csd {
  * EXT_CSD fields
  */
 
+#define EXT_CSD_RST		162	/* onetime programmable R/W */
 #define EXT_CSD_ERASE_GROUP_DEF		175	/* R/W */
 #define EXT_CSD_ERASED_MEM_CONT		181	/* RO */
 #define EXT_CSD_BUS_WIDTH		183	/* R/W */
Signature · 1 line
1.6.6.1
#1 lore raw
Quoted 25 lines · Chuanxiao Dong

From d3be0b4fe8e8a40294830dfd8d0543d1e957fd29 Mon Sep 17 00:00:00 2001
From: Chuanxiao Dong <[email protected]>
Date: Wed, 1 Dec 2010 19:14:02 +0800
Subject: [PATCH 1/4] enable HW reset caps of MMC card if card supports

HW reset capbility enable bit is byte 162 in card EXT_CSD register, only version4.4 card or later can support to enable this feature.

HW reset feature can be used to reset eMMC card when occures timeout errors during read/write/erase.

---
 drivers/mmc/core/mmc.c   |   29 +++++++++++++++++++++++++++++ include/linux/mmc/card.h |    1 + include/linux/mmc/mmc.h  |    1 +

 3 files changed, 31 insertions(+), 0 deletions(-)
drivers/mmc/core/mmc.c +0 -0
index 77f93c3..85cc7f6 100644
@@ -310,6 +310,10 @@ static int mmc_read_ext_csd(struct mmc_card *card)
                        ext_csd[EXT_CSD_SEC_FEATURE_SUPPORT];
Quoted 4 lines

               card->ext_csd.trim_timeout = 300 * ext_csd[EXT_CSD_TRIM_MULT];
+               /*
+                * check Hardware reset cap

Check hardware.

drivers/mmc/core/mmc.c static int mmc_init_card(struct mmc_host *host, u32 ocr, · line 491

Quoted 10 lines

+                */
+               card->ext_csd.rst = ext_csd[EXT_CSD_RST]; }

       if (ext_csd[EXT_CSD_ERASED_MEM_CONT])

drivers/mmc/core/mmc.c +1 -0
@@ -484,6 +488,31 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
        }
 
        /*
+        * eMMC4.4 version card has HW reset capbility.

capability.

drivers/mmc/core/mmc.c static int mmc_init_card(struct mmc_host *host, u32 ocr, · line 493

Quoted 2 lines
drivers/mmc/core/mmc.c +2 -0
+        * Enable this feature here:
+        * RST_N_FUNCTION register is W/R, one time programmable

Use RST_n_FUNCTION as spec.

drivers/mmc/core/mmc.c static int mmc_init_card(struct mmc_host *host, u32 ocr, · line 498

Quoted 5 lines
drivers/mmc/core/mmc.c +5 -0
+        * or readable.
+        * So need to enable this register only once after power on
+        */
+       if (card->csd.mmca_vsn >= CSD_SPEC_VER_4 &&
+                       card->ext_csd.rev >= 4 &&

it should be card->ext_csd.rev >= 5 since 4 is obsolete.

Thank you,
Kyungmin Park

Quoted 52 lines
drivers/mmc/core/mmc.c +17 -0
+                       card->ext_csd.rst == 0) {
+               err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
+                               EXT_CSD_RST, 1);
+
+               if (err && err != -EBADMSG)
+                       goto free_card;
+
+               if (err) {
+                       printk(KERN_WARNING "%s: switch to rst enable "
+                                  "failed %d\n",
+                                  mmc_hostname(card->host), err);
+                       err = 0;
+               } else
+                       card->ext_csd.rst = 1;
+       }
+
+       /*
         * Activate high speed (if supported)
         */

       if ((card->ext_csd.hs_max_dtr != 0) &&

include/linux/mmc/card.h +0 -0
index 8ce0827..ebee676 100644
@@ -54,6 +54,7 @@ struct mmc_ext_csd {

       unsigned int            sec_trim_mult;  /* Secure trim multiplier  */ unsigned int            sec_erase_mult; /* Secure erase multiplier */ unsigned int            trim_timeout;           /* In milliseconds */
+       unsigned int            rst; /* hardware reset enable bit */ };

 struct sd_scr {

include/linux/mmc/mmc.h +1 -1
index 956fbd8..b7ab0da 100644
@@ -251,6 +251,7 @@ struct _mmc_csd {
  * EXT_CSD fields
  */
 
+#define EXT_CSD_RST            162     /* onetime programmable R/W */
  #define EXT_CSD_ERASE_GROUP_DEF                175     /* R/W */
  #define EXT_CSD_ERASED_MEM_CONT                181     /* RO */
  #define EXT_CSD_BUS_WIDTH              183     /* R/W */
--

1.6.6.1

--
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

#2 lore raw
Quoted 63 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Kyungmin Park
Sent: Thursday, December 09, 2010 1:24 PM
To: Dong, Chuanxiao
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v4 1/4]enable HW reset capbility

Quoted 25 lines · Chuanxiao Dong

From d3be0b4fe8e8a40294830dfd8d0543d1e957fd29 Mon Sep 17 00:00:00 2001
From: Chuanxiao Dong <[email protected]>
Date: Wed, 1 Dec 2010 19:14:02 +0800
Subject: [PATCH 1/4] enable HW reset caps of MMC card if card supports

HW reset capbility enable bit is byte 162 in card EXT_CSD register, only version4.4 card or later can support to enable this feature.

HW reset feature can be used to reset eMMC card when occures timeout errors during read/write/erase.

---
 drivers/mmc/core/mmc.c   |   29 +++++++++++++++++++++++++++++ include/linux/mmc/card.h |    1 + include/linux/mmc/mmc.h  |    1 +

 3 files changed, 31 insertions(+), 0 deletions(-)
drivers/mmc/core/mmc.c +0 -0
index 77f93c3..85cc7f6 100644
@@ -310,6 +310,10 @@ static int mmc_read_ext_csd(struct mmc_card *card)
                        ext_csd[EXT_CSD_SEC_FEATURE_SUPPORT];
Quoted 4 lines

               card->ext_csd.trim_timeout = 300 * ext_csd[EXT_CSD_TRIM_MULT];
+               /*
+                * check Hardware reset cap

Check hardware.

drivers/mmc/core/mmc.c static int mmc_init_card(struct mmc_host *host, u32

Quoted 6 lines

+                */
+               card->ext_csd.rst = ext_csd[EXT_CSD_RST]; }

       if (ext_csd[EXT_CSD_ERASED_MEM_CONT])

drivers/mmc/core/mmc.c +0 -0
@@ -484,6 +488,31 @@ static int mmc_init_card(struct mmc_host *host, u32

ocr,

drivers/mmc/core/mmc.c static int mmc_init_card(struct mmc_host *host, u32 ocr, · line 491

Quoted 4 lines
drivers/mmc/core/mmc.c +1 -0
        }
 
        /*
+        * eMMC4.4 version card has HW reset capbility.

capability.

drivers/mmc/core/mmc.c static int mmc_init_card(struct mmc_host *host, u32 ocr, · line 493

Quoted 2 lines
drivers/mmc/core/mmc.c +2 -0
+        * Enable this feature here:
+        * RST_N_FUNCTION register is W/R, one time programmable

Use RST_n_FUNCTION as spec.

drivers/mmc/core/mmc.c static int mmc_init_card(struct mmc_host *host, u32 ocr, · line 498

Quoted 5 lines
drivers/mmc/core/mmc.c +5 -0
+        * or readable.
+        * So need to enable this register only once after power on
+        */
+       if (card->csd.mmca_vsn >= CSD_SPEC_VER_4 &&
+                       card->ext_csd.rev >= 4 &&
Quoted 4 lines

it should be card->ext_csd.rev >= 5 since 4 is obsolete.

Thank you,
Kyungmin Park

Thanks, Park. I will fix this.
And by the way, I noticed mmc_read_ext_csd function also used card->ext_csd.rev >=4. Is there some other reason for this kind of using? Or it is just because at that time the value 4 has not be obsolete yet....?

Thanks.
Chuanxiao

Quoted 57 lines

drivers/mmc/core/mmc.c static int mmc_init_card(struct mmc_host *host, u32 ocr,

Quoted 9 lines
drivers/mmc/core/mmc.c +9 -0
+                       card->ext_csd.rst == 0) {
+               err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
+                               EXT_CSD_RST, 1);
+
+               if (err && err != -EBADMSG)
+                       goto free_card;
+
+               if (err) {
+                       printk(KERN_WARNING "%s: switch to rst enable

"

Quoted 16 lines
drivers/mmc/core/mmc.c +8 -0
+                                  "failed %d\n",
+                                  mmc_hostname(card->host), err);
+                       err = 0;
+               } else
+                       card->ext_csd.rst = 1;
+       }
+
+       /*
         * Activate high speed (if supported)
         */

       if ((card->ext_csd.hs_max_dtr != 0) &&

include/linux/mmc/card.h +0 -0
index 8ce0827..ebee676 100644
@@ -54,6 +54,7 @@ struct mmc_ext_csd {
Quoted 1 line

       unsigned int            sec_trim_mult;  /* Secure trim

multiplier  */

Quoted 1 line

       unsigned int            sec_erase_mult; /* Secure erase multiplier

*/

Quoted 1 line

       unsigned int            trim_timeout;           /* In

milliseconds */

include/linux/mmc/mmc.h struct _mmc_csd { · line 254

Quoted 13 lines

+       unsigned int            rst; /* hardware reset enable bit */ };

 struct sd_scr {

include/linux/mmc/mmc.h +1 -0
index 956fbd8..b7ab0da 100644
@@ -251,6 +251,7 @@ struct _mmc_csd {
  * EXT_CSD fields
  */
 
+#define EXT_CSD_RST            162     /* onetime programmable R/W

*/

Quoted 11 lines
include/linux/mmc/mmc.h +0 -1
  #define EXT_CSD_ERASE_GROUP_DEF                175     /* R/W */
  #define EXT_CSD_ERASED_MEM_CONT                181     /* RO */
  #define EXT_CSD_BUS_WIDTH              183     /* R/W */
--

1.6.6.1

--
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

#3 lore raw
Quoted 63 lines · Chuanxiao
Quoted 63 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Kyungmin Park
Sent: Thursday, December 09, 2010 1:24 PM
To: Dong, Chuanxiao
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v4 1/4]enable HW reset capbility

Quoted 25 lines · Chuanxiao Dong

From d3be0b4fe8e8a40294830dfd8d0543d1e957fd29 Mon Sep 17 00:00:00 2001
From: Chuanxiao Dong <[email protected]>
Date: Wed, 1 Dec 2010 19:14:02 +0800
Subject: [PATCH 1/4] enable HW reset caps of MMC card if card supports

HW reset capbility enable bit is byte 162 in card EXT_CSD register, only version4.4 card or later can support to enable this feature.

HW reset feature can be used to reset eMMC card when occures timeout errors during read/write/erase.

---
 drivers/mmc/core/mmc.c   |   29 +++++++++++++++++++++++++++++ include/linux/mmc/card.h |    1 + include/linux/mmc/mmc.h  |    1 +

 3 files changed, 31 insertions(+), 0 deletions(-)
drivers/mmc/core/mmc.c +0 -0
index 77f93c3..85cc7f6 100644
@@ -310,6 +310,10 @@ static int mmc_read_ext_csd(struct mmc_card *card)
                        ext_csd[EXT_CSD_SEC_FEATURE_SUPPORT];
Quoted 4 lines

               card->ext_csd.trim_timeout = 300 * ext_csd[EXT_CSD_TRIM_MULT];
+               /*
+                * check Hardware reset cap

Check hardware.

drivers/mmc/core/mmc.c static int mmc_init_card(struct mmc_host *host, u32

Quoted 6 lines

+                */
+               card->ext_csd.rst = ext_csd[EXT_CSD_RST]; }

       if (ext_csd[EXT_CSD_ERASED_MEM_CONT])

drivers/mmc/core/mmc.c +0 -0
@@ -484,6 +488,31 @@ static int mmc_init_card(struct mmc_host *host, u32

ocr,

drivers/mmc/core/mmc.c static int mmc_init_card(struct mmc_host *host, u32 ocr, · line 491

Quoted 4 lines
drivers/mmc/core/mmc.c +1 -0
        }
 
        /*
+        * eMMC4.4 version card has HW reset capbility.

capability.

drivers/mmc/core/mmc.c static int mmc_init_card(struct mmc_host *host, u32 ocr, · line 493

Quoted 2 lines
drivers/mmc/core/mmc.c +2 -0
+        * Enable this feature here:
+        * RST_N_FUNCTION register is W/R, one time programmable

Use RST_n_FUNCTION as spec.

Quoted 5 lines
drivers/mmc/core/mmc.c +5 -0
+        * or readable.
+        * So need to enable this register only once after power on
+        */
+       if (card->csd.mmca_vsn >= CSD_SPEC_VER_4 &&
+                       card->ext_csd.rev >= 4 &&
Quoted 7 lines
Quoted 4 lines

it should be card->ext_csd.rev >= 5 since 4 is obsolete.

Thank you,
Kyungmin Park

Thanks, Park. I will fix this.
And by the way, I noticed mmc_read_ext_csd function also used card->ext_csd.rev >=4. Is there some other reason for this kind of using? Or it is just because at that time the value 4 has not be obsolete yet....?

Maybe need to fix it also.

And remaining patches also need to fix 'capability' typo.

Thank you,
Kyungmin Park

Quoted 65 lines

Thanks.
Chuanxiao

Quoted 44 lines

drivers/mmc/core/mmc.c static int mmc_init_card(struct mmc_host *host, u32 ocr,

Quoted 9 lines
drivers/mmc/core/mmc.c +9 -0
+                       card->ext_csd.rst == 0) {
+               err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
+                               EXT_CSD_RST, 1);
+
+               if (err && err != -EBADMSG)
+                       goto free_card;
+
+               if (err) {
+                       printk(KERN_WARNING "%s: switch to rst enable

"

Quoted 16 lines
drivers/mmc/core/mmc.c +8 -0
+                                  "failed %d\n",
+                                  mmc_hostname(card->host), err);
+                       err = 0;
+               } else
+                       card->ext_csd.rst = 1;
+       }
+
+       /*
         * Activate high speed (if supported)
         */

       if ((card->ext_csd.hs_max_dtr != 0) &&

include/linux/mmc/card.h +0 -0
index 8ce0827..ebee676 100644
@@ -54,6 +54,7 @@ struct mmc_ext_csd {
Quoted 1 line

       unsigned int            sec_trim_mult;  /* Secure trim

multiplier  */

Quoted 1 line

       unsigned int            sec_erase_mult; /* Secure erase multiplier

*/

Quoted 1 line

       unsigned int            trim_timeout;           /* In

milliseconds */

Quoted 12 lines

+       unsigned int            rst; /* hardware reset enable bit */ };

 struct sd_scr {

include/linux/mmc/mmc.h +0 -0
index 956fbd8..b7ab0da 100644
@@ -251,6 +251,7 @@ struct _mmc_csd {
  * EXT_CSD fields
  */
 
Quoted 13 lines

include/linux/mmc/mmc.h struct _mmc_csd { · line 254

Quoted 1 line
include/linux/mmc/mmc.h +1 -0
+#define EXT_CSD_RST            162     /* onetime programmable R/W

*/

Quoted 11 lines
include/linux/mmc/mmc.h +0 -1
  #define EXT_CSD_ERASE_GROUP_DEF                175     /* R/W */
  #define EXT_CSD_ERASED_MEM_CONT                181     /* RO */
  #define EXT_CSD_BUS_WIDTH              183     /* R/W */
--

1.6.6.1

--
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

#4 lore raw
Quoted 84 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Kyungmin Park
Sent: Thursday, December 09, 2010 2:05 PM
To: Dong, Chuanxiao
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v4 1/4]enable HW reset capbility

Quoted 11 lines · Chuanxiao
Quoted 11 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Kyungmin Park
Sent: Thursday, December 09, 2010 1:24 PM
To: Dong, Chuanxiao
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v4 1/4]enable HW reset capbility

Quoted 3 lines
Quoted 3 lines
Quoted 1 line · Chuanxiao Dong

From d3be0b4fe8e8a40294830dfd8d0543d1e957fd29 Mon Sep 17 00:00:00

2001

Quoted 18 lines
Quoted 18 lines
Quoted 18 lines

From: Chuanxiao Dong <[email protected]>
Date: Wed, 1 Dec 2010 19:14:02 +0800
Subject: [PATCH 1/4] enable HW reset caps of MMC card if card supports

HW reset capbility enable bit is byte 162 in card EXT_CSD register, only version4.4 card or later can support to enable this feature.

HW reset feature can be used to reset eMMC card when occures timeout errors during read/write/erase.

---
 drivers/mmc/core/mmc.c   |   29 +++++++++++++++++++++++++++++ include/linux/mmc/card.h |    1 + include/linux/mmc/mmc.h  |    1 +

 3 files changed, 31 insertions(+), 0 deletions(-)
Quoted 5 lines
Quoted 5 lines

drivers/mmc/core/mmc.c static int mmc_read_ext_csd(struct mmc_card

Quoted 5 lines
drivers/mmc/core/mmc.c +0 -0
index 77f93c3..85cc7f6 100644
@@ -310,6 +310,10 @@ static int mmc_read_ext_csd(struct mmc_card

*card)

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/mmc/core/mmc.c +0 -0
                        ext_csd[EXT_CSD_SEC_FEATURE_SUPPORT];

               card->ext_csd.trim_timeout = 300 * ext_csd[EXT_CSD_TRIM_MULT];
+               /*
+                * check Hardware reset cap

Quoted 7 lines
Quoted 7 lines

Check hardware.

drivers/mmc/core/mmc.c static int mmc_init_card(struct mmc_host *host,

Quoted 6 lines

+                */
+               card->ext_csd.rst = ext_csd[EXT_CSD_RST]; }

       if (ext_csd[EXT_CSD_ERASED_MEM_CONT])

drivers/mmc/core/mmc.c +0 -0
@@ -484,6 +488,31 @@ static int mmc_init_card(struct mmc_host *host,

u32

Quoted 19 lines
Quoted 18 lines

ocr,

drivers/mmc/core/mmc.c static int mmc_init_card(struct mmc_host *host, u32 ocr, · line 491

Quoted 4 lines
drivers/mmc/core/mmc.c +1 -0
        }
 
        /*
+        * eMMC4.4 version card has HW reset capbility.

capability.

drivers/mmc/core/mmc.c static int mmc_init_card(struct mmc_host *host, u32 ocr, · line 493

Quoted 2 lines
drivers/mmc/core/mmc.c +2 -0
+        * Enable this feature here:
+        * RST_N_FUNCTION register is W/R, one time programmable

Use RST_n_FUNCTION as spec.

drivers/mmc/core/mmc.c static int mmc_init_card(struct mmc_host *host, u32 ocr, · line 498

Quoted 5 lines
drivers/mmc/core/mmc.c +5 -0
+        * or readable.
+        * So need to enable this register only once after power on
+        */
+       if (card->csd.mmca_vsn >= CSD_SPEC_VER_4 &&
+                       card->ext_csd.rev >= 4 &&

it should be card->ext_csd.rev >= 5 since 4 is obsolete.

Thank you,
Kyungmin Park

Quoted 8 lines
Quoted 2 lines

Thanks, Park. I will fix this.
And by the way, I noticed mmc_read_ext_csd function also used

card->ext_csd.rev >=4. Is there some other reason for this kind of using? Or it is just because at that time the value 4 has not be obsolete yet....?

Maybe need to fix it also.

And remaining patches also need to fix 'capability' typo.

Thanks. Will pay more attention on this. And will resubmit new version for review. Thanks

Quoted 68 lines
Quoted 9 lines
Quoted 9 lines

drivers/mmc/core/mmc.c static int mmc_init_card(struct mmc_host *host, u32 ocr,

Quoted 9 lines
drivers/mmc/core/mmc.c +9 -0
+                       card->ext_csd.rst == 0) {
+               err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
+                               EXT_CSD_RST, 1);
+
+               if (err && err != -EBADMSG)
+                       goto free_card;
+
+               if (err) {
+                       printk(KERN_WARNING "%s: switch to rst

enable

Quoted 3 lines
Quoted 3 lines

"

Quoted 2 lines
drivers/mmc/core/mmc.c +2 -0
+                                  "failed %d\n",
+                                  mmc_hostname(card->host),

err);

Quoted 16 lines
Quoted 16 lines
Quoted 14 lines
drivers/mmc/core/mmc.c +6 -0
+                       err = 0;
+               } else
+                       card->ext_csd.rst = 1;
+       }
+
+       /*
         * Activate high speed (if supported)
         */

       if ((card->ext_csd.hs_max_dtr != 0) &&

include/linux/mmc/card.h +0 -0
index 8ce0827..ebee676 100644
@@ -54,6 +54,7 @@ struct mmc_ext_csd {
Quoted 1 line

       unsigned int            sec_trim_mult;  /* Secure trim

multiplier  */

Quoted 1 line
Quoted 1 line
Quoted 1 line

       unsigned int            sec_erase_mult; /* Secure erase

multiplier

Quoted 15 lines
Quoted 15 lines

*/

Quoted 1 line

       unsigned int            trim_timeout;           /* In

milliseconds */

Quoted 12 lines

+       unsigned int            rst; /* hardware reset enable bit */ };

 struct sd_scr {

include/linux/mmc/mmc.h +0 -0
index 956fbd8..b7ab0da 100644
@@ -251,6 +251,7 @@ struct _mmc_csd {
  * EXT_CSD fields
  */
 
Quoted 1 line
Quoted 1 line

include/linux/mmc/mmc.h struct _mmc_csd { · line 254

Quoted 1 line
include/linux/mmc/mmc.h +1 -0
+#define EXT_CSD_RST            162     /* onetime programmable

R/W

Quoted 2 lines
Quoted 2 lines

*/

Quoted 1 line
include/linux/mmc/mmc.h +0 -0
  #define EXT_CSD_ERASE_GROUP_DEF                175     /*

R/W */

Quoted 1 line
Quoted 1 line

include/linux/mmc/mmc.h struct _mmc_csd { · line 256

Quoted 1 line
include/linux/mmc/mmc.h +0 -0
  #define EXT_CSD_ERASED_MEM_CONT                181     /*

RO */

Quoted 14 lines
Quoted 9 lines
Quoted 9 lines
include/linux/mmc/mmc.h +0 -1
  #define EXT_CSD_BUS_WIDTH              183     /* R/W */
--

1.6.6.1

--
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