Skip to contentSkip to conversation

mmc: dw_mmc: fix wrong SDMMC_GET_FCNT macro

PATCH In review Jaehoon Chung 3 participants 3 messages Sep 26, 2011

Subsystems (2)
lore
Share & tools
lore

Jaehoon Chung

author maintainer
#0 lore raw

PATCH 1/1 mmc: dw_mmc: fix wrong SDMMC_GET_FCNT macro

I understood that SDMMC_GET_FCNT is used to get fifo_count. In status register, fifo_count is bit[17:29].
But this macro is control with bit[17:25].

i think right that change 0x1FFF instead of 0x1FF.

---
 drivers/mmc/host/dw_mmc.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/host/dw_mmc.h +1 -1
index bfa3c1c..193ec94 100644
@@ -117,7 +117,7 @@
 #define SDMMC_CMD_RESP_EXP		BIT(6)
 #define SDMMC_CMD_INDX(n)		((n) & 0x1F)
 /* Status register defines */
-#define SDMMC_GET_FCNT(x)		(((x)>>17) & 0x1FF)
+#define SDMMC_GET_FCNT(x)		(((x)>>17) & 0x1FFF)
 /* Internal DMAC interrupt defines */
 #define SDMMC_IDMAC_INT_AI		BIT(9)
 #define SDMMC_IDMAC_INT_NI		BIT(8)
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Jaehoon Chung

I understood that SDMMC_GET_FCNT is used to get fifo_count. In status register, fifo_count is bit[17:29].
But this macro is control with bit[17:25].

i think right that change 0x1FFF instead of 0x1FF.

nice catch.

Quoted 17 lines
---
 drivers/mmc/host/dw_mmc.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/host/dw_mmc.h +1 -1
index bfa3c1c..193ec94 100644
@@ -117,7 +117,7 @@
 #define SDMMC_CMD_RESP_EXP		BIT(6)
 #define SDMMC_CMD_INDX(n)		((n) & 0x1F)
 /* Status register defines */
-#define SDMMC_GET_FCNT(x)		(((x)>>17) & 0x1FF)
+#define SDMMC_GET_FCNT(x)		(((x)>>17) & 0x1FFF)
 /* Internal DMAC interrupt defines */
 #define SDMMC_IDMAC_INT_AI		BIT(9)
 #define SDMMC_IDMAC_INT_NI		BIT(8)
Acked-by
#2 lore raw
Quoted 5 lines · James Hogan
Quoted 4 lines · Jaehoon Chung

I understood that SDMMC_GET_FCNT is used to get fifo_count. In status register, fifo_count is bit[17:29].
But this macro is control with bit[17:25].

Quoted 8 lines
Quoted 4 lines

i think right that change 0x1FFF instead of 0x1FF.

nice catch.

Yes, looks correct.