aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKongyang Liu <seashell11234455@gmail.com>2024-04-16 15:31:05 +0800
committerLeo Yu-Chi Liang <ycliang@andestech.com>2024-05-01 22:40:08 +0800
commit085b3b22d32fa48804c58709ac05b69c03f572eb (patch)
treecbea7c16122d7517e66627352b1a135c2a61dd94
parentfd55792e143f7ec46c5e70a8683183163d8c6878 (diff)
downloadu-boot-085b3b22d32fa48804c58709ac05b69c03f572eb.zip
u-boot-085b3b22d32fa48804c58709ac05b69c03f572eb.tar.gz
u-boot-085b3b22d32fa48804c58709ac05b69c03f572eb.tar.bz2
mmc: cv1800b: Add transmit tap delay config to fix write error
Currently, only the receive delay is configured while the transmit delay is not set, which may result in errors when writing to the file. This issue can be resolved by setting PHY_TX_SRC_INVERT to SDHCI_PHY_TX_RX_DLY. Signed-off-by: Kongyang Liu <seashell11234455@gmail.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
-rw-r--r--drivers/mmc/cv1800b_sdhci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/cv1800b_sdhci.c b/drivers/mmc/cv1800b_sdhci.c
index 9af6b97..4e75051 100644
--- a/drivers/mmc/cv1800b_sdhci.c
+++ b/drivers/mmc/cv1800b_sdhci.c
@@ -12,6 +12,8 @@
#define MMC_MAX_CLOCK 375000000
#define TUNE_MAX_PHCODE 128
+#define PHY_TX_SRC_INVERT BIT(8)
+
struct cv1800b_sdhci_plat {
struct mmc_config cfg;
struct mmc mmc;
@@ -19,7 +21,7 @@ struct cv1800b_sdhci_plat {
static void cv1800b_set_tap_delay(struct sdhci_host *host, u16 tap)
{
- sdhci_writel(host, tap << 16, SDHCI_PHY_TX_RX_DLY);
+ sdhci_writel(host, PHY_TX_SRC_INVERT | tap << 16, SDHCI_PHY_TX_RX_DLY);
}
static void cv1800b_sdhci_reset(struct sdhci_host *host, u8 mask)