Skip to contentSkip to conversation

mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

PATCH ALIM AKHTAR 2 participants 2 messages Oct 7, 2013 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

Hi Jaehoon,

Quoted 4 lines

------- Original Message -------
Sender : Jaehoon Chung<[email protected]> S4/Engineer/System S/W Lab./Samsung Electronics Date : Oct 06, 2013 17:28 (GMT+09:00)
Title : Re: [PATCH] mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

Quoted 11 lines

Hi Alim,

Quoted 7 lines · alim akhtar

From: Alim Akhtar

Hardware locked error set when the dw_mmc controller cannot load a command issued by software. When software sets the start_cmd bit in the CMD register, the controller tries to load the command. If the command buffer is already filled with a command, this error is raised. Currently driver does not handle HLE interrupt, which results in a system hang.

When SDMMC_INT_HLE is set into CMD_ERROR_FLAGS,.then could driver handle the HLE interrupt?

Yes, this will be handled as a part of DW_MCI_CMD_ERROR_FLAGS error handling.

Quoted 26 lines

Best Regards,
Jaehoon Chung

Quoted 24 lines

HLE can be simulated by quickly inserting and removing sd card in card slot (30 ~ 40 times in say 20 secs)

Reviewed-by Doug Anderson
Signed-off-by Alim Akhtar

---
  drivers/mmc/host/dw_mmc.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/dw_mmc.c +1 -1
index 0a6a512..24b4a52 100644
@@ -44,7 +44,7 @@
   	 SDMMC_INT_HTO | SDMMC_INT_SBE  | \
   	 SDMMC_INT_EBE)
   #define DW_MCI_CMD_ERROR_FLAGS	(SDMMC_INT_RTO | SDMMC_INT_RCRC | \
-	 SDMMC_INT_RESP_ERR)
+	 SDMMC_INT_RESP_ERR | SDMMC_INT_HLE)
   #define DW_MCI_ERROR_FLAGS	(DW_MCI_DATA_ERROR_FLAGS | \
   	 DW_MCI_CMD_ERROR_FLAGS  | SDMMC_INT_HLE)
   #define DW_MCI_SEND_STATUS	1
#1 lore raw
Quoted 12 lines · ALIM AKHTAR

Hi Jaehoon,

Quoted 10 lines

------- Original Message -------
Sender : Jaehoon Chung<[email protected]> S4/Engineer/System S/W Lab./Samsung Electronics Date : Oct 06, 2013 17:28 (GMT+09:00)
Title : Re: [PATCH] mmc: dw_mmc: Add hardware lock error (HLE) to the CMD error flag

Hi Alim,

Quoted 2 lines · alim akhtar

From: Alim Akhtar

Quoted 7 lines
Quoted 6 lines
Quoted 5 lines

Hardware locked error set when the dw_mmc controller cannot load a command issued by software. When software sets the start_cmd bit in the CMD register, the controller tries to load the command. If the command buffer is already filled with a command, this error is raised. Currently driver does not handle HLE interrupt, which results in a system hang.

When SDMMC_INT_HLE is set into CMD_ERROR_FLAGS,.then could driver handle the HLE interrupt?

Yes, this will be handled as a part of DW_MCI_CMD_ERROR_FLAGS error handling.

Could some command or data be lost?

Quoted 27 lines
Quoted 27 lines

Best Regards,
Jaehoon Chung

Quoted 24 lines

HLE can be simulated by quickly inserting and removing sd card in card slot (30 ~ 40 times in say 20 secs)

Reviewed-by Doug Anderson
Signed-off-by Alim Akhtar
---
  drivers/mmc/host/dw_mmc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/dw_mmc.c +1 -1
index 0a6a512..24b4a52 100644
@@ -44,7 +44,7 @@
  	 SDMMC_INT_HTO | SDMMC_INT_SBE  | \
  	 SDMMC_INT_EBE)
  #define DW_MCI_CMD_ERROR_FLAGS	(SDMMC_INT_RTO | SDMMC_INT_RCRC | \
-	 SDMMC_INT_RESP_ERR)
+	 SDMMC_INT_RESP_ERR | SDMMC_INT_HLE)
  #define DW_MCI_ERROR_FLAGS	(DW_MCI_DATA_ERROR_FLAGS | \
  	 DW_MCI_CMD_ERROR_FLAGS  | SDMMC_INT_HLE)
  #define DW_MCI_SEND_STATUS	1

N‹§²æìr¸›yúèšØb²X¬¶Ç§vØ^–)Þº{.nÇ+‰·¥Š{±šg"žØ^n‡r¡ö¦zË�ëh™¨è­Ú&¢ø®G«�éh®(­éšŽŠÝ¢j"�ú¶m§ÿï�êäz¹Þ–Šàþf£¢·hšˆ§~ˆmml==