aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Xiwen <forbidden405@outlook.com>2024-02-01 22:05:44 +0800
committerJaehoon Chung <jh80.chung@samsung.com>2024-04-15 16:01:48 +0900
commit2ea7b7a42a59ffa88817cc297655fcacb1e407cc (patch)
tree504f9eddb8e78e793b44c3cdea4f47a0af371365
parent1fa6dc2879899a42ba85d4ece617c2356d048308 (diff)
downloadu-boot-2ea7b7a42a59ffa88817cc297655fcacb1e407cc.zip
u-boot-2ea7b7a42a59ffa88817cc297655fcacb1e407cc.tar.gz
u-boot-2ea7b7a42a59ffa88817cc297655fcacb1e407cc.tar.bz2
mmc: hi6220_dw_mmc: add fifoth_val to private data and set it in .probe
The value defaults to 0 and is ignored by dw_mmc code, so the other users are not affected. Setting this explicitly fixes some weird reading error found on Hi3798MV200. Fixes: 8a5dc8140e62 ("mmc: hi6220_dw_mmc: add compatible for HC2910 support") Signed-off-by: Yang Xiwen <forbidden405@outlook.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
-rw-r--r--drivers/mmc/hi6220_dw_mmc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/mmc/hi6220_dw_mmc.c b/drivers/mmc/hi6220_dw_mmc.c
index a4b8072..dc02104 100644
--- a/drivers/mmc/hi6220_dw_mmc.c
+++ b/drivers/mmc/hi6220_dw_mmc.c
@@ -37,6 +37,7 @@ struct hi6220_dwmmc_priv_data {
struct hisi_mmc_data {
unsigned int clock;
bool use_fifo;
+ u32 fifoth_val;
};
static int hi6220_dwmmc_of_to_plat(struct udevice *dev)
@@ -125,6 +126,7 @@ static int hi6220_dwmmc_probe(struct udevice *dev)
host->mmc = &plat->mmc;
host->fifo_mode = mmc_data->use_fifo;
+ host->fifoth_val = mmc_data->fifoth_val;
host->mmc->priv = &priv->host;
upriv->mmc = host->mmc;
host->mmc->dev = dev;
@@ -154,13 +156,20 @@ static const struct hisi_mmc_data hi6220_mmc_data = {
.use_fifo = false,
};
+static const struct hisi_mmc_data hi3798mv2x_mmc_data = {
+ .clock = 50000000,
+ .use_fifo = false,
+ // FIFO depth is 256
+ .fifoth_val = MSIZE(4) | RX_WMARK(0x7f) | TX_WMARK(0x80),
+};
+
static const struct udevice_id hi6220_dwmmc_ids[] = {
{ .compatible = "hisilicon,hi6220-dw-mshc",
.data = (ulong)&hi6220_mmc_data },
{ .compatible = "hisilicon,hi3798cv200-dw-mshc",
.data = (ulong)&hi6220_mmc_data },
{ .compatible = "hisilicon,hi3798mv200-dw-mshc",
- .data = (ulong)&hi6220_mmc_data },
+ .data = (ulong)&hi3798mv2x_mmc_data },
{ .compatible = "hisilicon,hi3660-dw-mshc",
.data = (ulong)&hi3660_mmc_data },
{ }