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>
#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;
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)