mmc: dw_mmc: fix the wrong Mask bit boundary for fifo_count bit
PATCH 1/1 mmc: dw_mmc: fix the wrong Mask bit boundary for fifo_count bit
According to DesignWare TRM, FIFO_COUNT is bit[29:17]. If get the correct fifo_count value, it has to use the FIFO_MASK as 0x1FFF, not 0x1FF.
--- include/dwmmc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/dwmmc.h +1 -1
@@ -105,7 +105,7 @@/* Status Register */ #define DWMCI_BUSY (1 << 9) -#define DWMCI_FIFO_MASK 0x1ff +#define DWMCI_FIFO_MASK 0x1fff#define DWMCI_FIFO_SHIFT 17/* FIFOTH Register */
Signature · 1 line
1.9.1
PATCH 1/1 mmc: dw_mmc: fix the wrong Mask bit boundary for fifo_count bit
Hi Jaehoon,
Quoted 3 lines · Jaehoon Chung
According to DesignWare TRM,
FIFO_COUNTis bit[29:17]. If get the correctfifo_countvalue, it has to use theFIFO_MASKas0x1FFF, not0x1FF.
Ah, I have no doubt the fifo_count defined. The fifo depth of Rockchip SoCs is 256, the former work sane coincidentally.:-)
Thanks for fix.
Quoted 19 lines
Signed-off-by Jaehoon Chung <[email protected]>--- include/dwmmc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/dwmmc.h +1
-1@@ -105,7 +105,7 @@/* Status Register */ #define DWMCI_BUSY (1 << 9) -#define DWMCI_FIFO_MASK 0x1ff +#define DWMCI_FIFO_MASK 0x1fff#define DWMCI_FIFO_SHIFT 17/* FIFOTH Register */
Quoted 6 lines · Jaehoon Chung
According to DesignWare TRM,
FIFO_COUNTis bit[29:17]. If get the correctfifo_countvalue, it has to use theFIFO_MASKas0x1FFF, not0x1FF.Signed-off-by Jaehoon Chung <[email protected]>Reviewed-by Ziyuan Xu <[email protected]>
Applied on u-boot-mmc. Thanks!
Best Regards,
Jaehoon Chung
Quoted 18 lines
--- include/dwmmc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/dwmmc.h +1
-1@@ -105,7 +105,7 @@/* Status Register */ #define DWMCI_BUSY (1 << 9) -#define DWMCI_FIFO_MASK 0x1ff +#define DWMCI_FIFO_MASK 0x1fff#define DWMCI_FIFO_SHIFT 17/* FIFOTH Register */