Skip to contentSkip to conversation

fsl_esdhc: fix wrong clock mask

PATCH New Li Yang 3 participants 5 messages Jan 7, 2010 – Jan 26, 2010 MMC, SD and SDIO

lore
Share & tools
lore

Li Yang

author
#0 lore raw

PATCH 1/2 fsl_esdhc: fix wrong clock mask

Fix typo in SYSCTL_CLOCK_MASK, which caused residual in high bits of SDCLKFS.

---
 include/fsl_esdhc.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/fsl_esdhc.h +1 -1
index 13ff652..caa784f 100644
@@ -32,7 +32,7 @@
 #define SYSCTL			0x0002e02c
 #define SYSCTL_INITA		0x08000000
 #define SYSCTL_TIMEOUT_MASK	0x000f0000
-#define SYSCTL_CLOCK_MASK	0x00000fff
+#define SYSCTL_CLOCK_MASK	0x0000fff0
 #define SYSCTL_PEREN		0x00000004
 #define SYSCTL_HCKEN		0x00000002
 #define SYSCTL_IPGEN		0x00000001
Signature · 1 line
1.6.6-rc1.GIT
author
#1 lore raw

PATCH 2/2 p2020ds: use maximum timeout for esdhc

From: Jin Qing <[email protected]>

Use timeout value to maximum due to hardware problem. The hardware may take longer to timeout, but it's much better than having a too-short timeout value.

---
 drivers/mmc/fsl_esdhc.c   |    4 ++++
 include/configs/P2020DS.h |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)
drivers/mmc/fsl_esdhc.c +4 -0
index 4a86365..d30e15a 100644
@@ -202,6 +202,10 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)
 	if (timeout < 0)
 		timeout = 0;
 
+#ifdef CONFIG_SYS_FSL_ESDHC_BROKEN_TIMEOUT
+	timeout = 14;
+#endif
+
 	clrsetbits_be32(&regs->sysctl, SYSCTL_TIMEOUT_MASK, timeout << 16);
 
 	return 0;
include/configs/P2020DS.h +1 -0
index 577d2b5..9bdc9c5 100644
@@ -714,6 +714,7 @@ extern unsigned long calculate_board_ddr_clk(unsigned long dummy);
 #ifdef CONFIG_MMC
 #define CONFIG_FSL_ESDHC
 #define CONFIG_SYS_FSL_ESDHC_ADDR	CONFIG_SYS_MPC85xx_ESDHC_ADDR
+#define CONFIG_SYS_FSL_ESDHC_BROKEN_TIMEOUT
 #define CONFIG_CMD_MMC
 #define CONFIG_GENERIC_MMC
 #define CONFIG_CMD_EXT2
Signature · 1 line
1.6.6-rc1.GIT
#2 lore raw

PATCH 2/2 p2020ds: use maximum timeout for esdhc

Quoted 11 lines · Li Yang

From: Jin Qing <[email protected]>

Use timeout value to maximum due to hardware problem. The hardware may take longer to timeout, but it's much better than having a too-short timeout value.

---

drivers/mmc/fsl_esdhc.c   |    4 ++++
include/configs/P2020DS.h |    1 +
2 files changed, 5 insertions(+), 0 deletions(-)

Is this associated with an errata on P2020, a board issue?

- k

#3 lore raw

PATCH 2/2 p2020ds: use maximum timeout for esdhc

Quoted 9 lines · Li Yang
Quoted 5 lines

From: Jin Qing <[email protected]>

Use timeout value to maximum due to hardware problem. The hardware may take longer to timeout, but it's much better than having

a too-short timeout value.

Quoted 1 line
Quoted 8 lines
Quoted 6 lines

---

drivers/mmc/fsl_esdhc.c   |    4 ++++
include/configs/P2020DS.h |    1 +
2 files changed, 5 insertions(+), 0 deletions(-)

Is this associated with an errata on P2020, a board issue?

I'm not very sure. Looks like a silicon issue. We are using the same workaround as in kernel.

- Leo