@@ -873,6 +873,11 @@ static void esdhc_writeb_le(struct sdhci_host *host, u8 val, int reg)
873
873
874
874
esdhc_clrset_le (host , mask , new_val , reg );
875
875
return ;
876
+ case SDHCI_TIMEOUT_CONTROL :
877
+ esdhc_clrset_le (host , ESDHC_SYS_CTRL_DTOCV_MASK ,
878
+ FIELD_PREP (ESDHC_SYS_CTRL_DTOCV_MASK , val ),
879
+ ESDHC_SYSTEM_CONTROL );
880
+ return ;
876
881
case SDHCI_SOFTWARE_RESET :
877
882
if (val & SDHCI_RESET_DATA )
878
883
new_val = readl (host -> ioaddr + SDHCI_HOST_CONTROL );
@@ -1399,17 +1404,6 @@ static unsigned int esdhc_get_max_timeout_count(struct sdhci_host *host)
1399
1404
return esdhc_is_usdhc (imx_data ) ? 1 << 29 : 1 << 27 ;
1400
1405
}
1401
1406
1402
- static void esdhc_set_timeout (struct sdhci_host * host , struct mmc_command * cmd )
1403
- {
1404
- struct sdhci_pltfm_host * pltfm_host = sdhci_priv (host );
1405
- struct pltfm_imx_data * imx_data = sdhci_pltfm_priv (pltfm_host );
1406
-
1407
- /* use maximum timeout counter */
1408
- esdhc_clrset_le (host , ESDHC_SYS_CTRL_DTOCV_MASK ,
1409
- esdhc_is_usdhc (imx_data ) ? 0xF0000 : 0xE0000 ,
1410
- ESDHC_SYSTEM_CONTROL );
1411
- }
1412
-
1413
1407
static u32 esdhc_cqhci_irq (struct sdhci_host * host , u32 intmask )
1414
1408
{
1415
1409
int cmd_error = 0 ;
@@ -1446,7 +1440,6 @@ static struct sdhci_ops sdhci_esdhc_ops = {
1446
1440
.get_min_clock = esdhc_pltfm_get_min_clock ,
1447
1441
.get_max_timeout_count = esdhc_get_max_timeout_count ,
1448
1442
.get_ro = esdhc_pltfm_get_ro ,
1449
- .set_timeout = esdhc_set_timeout ,
1450
1443
.set_bus_width = esdhc_pltfm_set_bus_width ,
1451
1444
.set_uhs_signaling = esdhc_set_uhs_signaling ,
1452
1445
.reset = esdhc_reset ,
@@ -1842,6 +1835,8 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
1842
1835
* to distinguish the card type.
1843
1836
*/
1844
1837
host -> mmc_host_ops .init_card = usdhc_init_card ;
1838
+
1839
+ host -> max_timeout_count = 0xF ;
1845
1840
}
1846
1841
1847
1842
if (imx_data -> socdata -> flags & ESDHC_FLAG_MAN_TUNING )
0 commit comments