* [PATCH] mmc: cv1800b: Add transmit tap delay config to fix write error
@ 2024-04-16 7:31 ` Kongyang Liu
2024-04-16 23:37 ` Jaehoon Chung
2024-04-17 11:40 ` Jaehoon Chung
0 siblings, 2 replies; 3+ messages in thread
From: Kongyang Liu @ 2024-04-16 7:31 UTC (permalink / raw)
To: u-boot; +Cc: Jaehoon Chung, Leo Yu-Chi Liang, Peng Fan, Tom Rini
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>
---
drivers/mmc/cv1800b_sdhci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/cv1800b_sdhci.c b/drivers/mmc/cv1800b_sdhci.c
index 2275c53777..a50f4cff0d 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)
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] mmc: cv1800b: Add transmit tap delay config to fix write error
2024-04-16 7:31 ` [PATCH] mmc: cv1800b: Add transmit tap delay config to fix write error Kongyang Liu
@ 2024-04-16 23:37 ` Jaehoon Chung
2024-04-17 11:40 ` Jaehoon Chung
1 sibling, 0 replies; 3+ messages in thread
From: Jaehoon Chung @ 2024-04-16 23:37 UTC (permalink / raw)
To: 'Kongyang Liu', u-boot
Cc: 'Leo Yu-Chi Liang', 'Peng Fan', 'Tom Rini'
Hi,
> -----Original Message-----
> From: Kongyang Liu <seashell11234455@gmail.com>
> Sent: Tuesday, April 16, 2024 4:31 PM
> To: u-boot@lists.denx.de
> Cc: Jaehoon Chung <jh80.chung@samsung.com>; Leo Yu-Chi Liang <ycliang@andestech.com>; Peng Fan
> <peng.fan@nxp.com>; Tom Rini <trini@konsulko.com>
> Subject: [PATCH] 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>
Best Regards,
Jaehoon Chung
> ---
>
> drivers/mmc/cv1800b_sdhci.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/cv1800b_sdhci.c b/drivers/mmc/cv1800b_sdhci.c
> index 2275c53777..a50f4cff0d 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)
> --
> 2.41.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] mmc: cv1800b: Add transmit tap delay config to fix write error
2024-04-16 7:31 ` [PATCH] mmc: cv1800b: Add transmit tap delay config to fix write error Kongyang Liu
2024-04-16 23:37 ` Jaehoon Chung
@ 2024-04-17 11:40 ` Jaehoon Chung
1 sibling, 0 replies; 3+ messages in thread
From: Jaehoon Chung @ 2024-04-17 11:40 UTC (permalink / raw)
To: 'Kongyang Liu', u-boot
Cc: 'Leo Yu-Chi Liang', 'Peng Fan', 'Tom Rini'
> -----Original Message-----
> From: Kongyang Liu <seashell11234455@gmail.com>
> Sent: Tuesday, April 16, 2024 4:31 PM
> To: u-boot@lists.denx.de
> Cc: Jaehoon Chung <jh80.chung@samsung.com>; Leo Yu-Chi Liang <ycliang@andestech.com>; Peng Fan
> <peng.fan@nxp.com>; Tom Rini <trini@konsulko.com>
> Subject: [PATCH] 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>
Best Regards,
Jaehoon Chung
> ---
>
> drivers/mmc/cv1800b_sdhci.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/cv1800b_sdhci.c b/drivers/mmc/cv1800b_sdhci.c
> index 2275c53777..a50f4cff0d 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)
> --
> 2.41.0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-17 11:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20240416073148epcas1p23ad0d7f46660f71578f353a35179790b@epcas1p2.samsung.com>
2024-04-16 7:31 ` [PATCH] mmc: cv1800b: Add transmit tap delay config to fix write error Kongyang Liu
2024-04-16 23:37 ` Jaehoon Chung
2024-04-17 11:40 ` Jaehoon Chung
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.