forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 072de836f53be56a70cecf70b43ae43b7ce17376
kernel/drivers/mmc/host/dw_mmc.c
....@@ -1,14 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Synopsys DesignWare Multimedia Card Interface driver
34 * (Based on NXP driver for lpc 31xx)
45 *
56 * Copyright (C) 2009 NXP Semiconductors
67 * Copyright (C) 2009, 2010 Imagination Technologies Ltd.
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; either version 2 of the License, or
11
- * (at your option) any later version.
128 */
139
1410 #include <linux/blkdev.h>
....@@ -40,6 +36,7 @@
4036 #include <linux/of.h>
4137 #include <linux/of_gpio.h>
4238 #include <linux/mmc/slot-gpio.h>
39
+#include <linux/soc/rockchip/rk_sdmmc.h>
4340 #include <linux/soc/rockchip/rockchip_decompress.h>
4441
4542 #include "dw_mmc.h"
....@@ -109,6 +106,24 @@
109106 /* Each descriptor can transfer up to 4KB of data in chained mode */
110107 #define DW_MCI_DESC_DATA_LENGTH 0x1000
111108
109
+#if IS_ENABLED(CONFIG_CPU_RV1106)
110
+static spinlock_t *g_sdmmc_ispvicap_lock;
111
+
112
+void rv1106_sdmmc_get_lock(void)
113
+{
114
+ if (g_sdmmc_ispvicap_lock)
115
+ spin_lock(g_sdmmc_ispvicap_lock);
116
+}
117
+EXPORT_SYMBOL(rv1106_sdmmc_get_lock);
118
+
119
+void rv1106_sdmmc_put_lock(void)
120
+{
121
+ if (g_sdmmc_ispvicap_lock)
122
+ spin_unlock(g_sdmmc_ispvicap_lock);
123
+}
124
+EXPORT_SYMBOL(rv1106_sdmmc_put_lock);
125
+#endif
126
+
112127 #if defined(CONFIG_DEBUG_FS)
113128 static int dw_mci_req_show(struct seq_file *s, void *v)
114129 {
....@@ -175,40 +190,18 @@
175190 struct mmc_host *mmc = slot->mmc;
176191 struct dw_mci *host = slot->host;
177192 struct dentry *root;
178
- struct dentry *node;
179193
180194 root = mmc->debugfs_root;
181195 if (!root)
182196 return;
183197
184
- node = debugfs_create_file("regs", S_IRUSR, root, host,
185
- &dw_mci_regs_fops);
186
- if (!node)
187
- goto err;
188
-
189
- node = debugfs_create_file("req", S_IRUSR, root, slot,
190
- &dw_mci_req_fops);
191
- if (!node)
192
- goto err;
193
-
194
- node = debugfs_create_u32("state", S_IRUSR, root, (u32 *)&host->state);
195
- if (!node)
196
- goto err;
197
-
198
- node = debugfs_create_x32("pending_events", S_IRUSR, root,
199
- (u32 *)&host->pending_events);
200
- if (!node)
201
- goto err;
202
-
203
- node = debugfs_create_x32("completed_events", S_IRUSR, root,
204
- (u32 *)&host->completed_events);
205
- if (!node)
206
- goto err;
207
-
208
- return;
209
-
210
-err:
211
- dev_err(&mmc->class_dev, "failed to initialize debugfs for slot\n");
198
+ debugfs_create_file("regs", S_IRUSR, root, host, &dw_mci_regs_fops);
199
+ debugfs_create_file("req", S_IRUSR, root, slot, &dw_mci_req_fops);
200
+ debugfs_create_u32("state", S_IRUSR, root, &host->state);
201
+ debugfs_create_xul("pending_events", S_IRUSR, root,
202
+ &host->pending_events);
203
+ debugfs_create_xul("completed_events", S_IRUSR, root,
204
+ &host->completed_events);
212205 }
213206 #endif /* defined(CONFIG_DEBUG_FS) */
214207
....@@ -246,8 +239,9 @@
246239 * ...also allow sending for SDMMC_CMD_VOLT_SWITCH where busy is
247240 * expected.
248241 */
249
-#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT
250
- if (host->slot->mmc->restrict_caps & RESTRICT_CARD_TYPE_EMMC)
242
+#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC
243
+ if (host->slot->mmc->caps2 & MMC_CAP2_NO_SD &&
244
+ host->slot->mmc->caps2 & MMC_CAP2_NO_SDIO)
251245 delay = 0;
252246 #endif
253247 if ((cmd_flags & SDMMC_CMD_PRV_DAT_WAIT) &&
....@@ -488,14 +482,20 @@
488482
489483 /* Disable and reset the IDMAC interface */
490484 temp = mci_readl(host, CTRL);
491
- temp &= ~SDMMC_CTRL_USE_IDMAC;
485
+ if (!host->is_rv1106_sd)
486
+ temp &= ~SDMMC_CTRL_USE_IDMAC;
487
+
492488 temp |= SDMMC_CTRL_DMA_RESET;
493489 mci_writel(host, CTRL, temp);
494490
495491 /* Stop the IDMAC running */
496492 temp = mci_readl(host, BMOD);
497
- temp &= ~(SDMMC_IDMAC_ENABLE | SDMMC_IDMAC_FB);
498
- temp |= SDMMC_IDMAC_SWRESET;
493
+ if (host->is_rv1106_sd) {
494
+ temp |= SDMMC_IDMAC_SWRESET;
495
+ } else {
496
+ temp &= ~(SDMMC_IDMAC_ENABLE | SDMMC_IDMAC_FB);
497
+ temp |= SDMMC_IDMAC_SWRESET;
498
+ }
499499 mci_writel(host, BMOD, temp);
500500 }
501501
....@@ -736,6 +736,13 @@
736736 }
737737 }
738738
739
+ if (host->is_rv1106_sd && (data->flags & MMC_DATA_WRITE)) {
740
+ desc->des0 = desc_last->des0;
741
+ desc->des2 = desc_last->des2;
742
+ desc->des1 = 0x8; /* Random dirty data for last one desc */
743
+ desc_last = desc;
744
+ }
745
+
739746 /* Set first descriptor */
740747 desc_first->des0 |= cpu_to_le32(IDMAC_DES0_FD);
741748
....@@ -871,12 +878,14 @@
871878 if (!host->dms)
872879 return -ENOMEM;
873880
874
- host->dms->ch = dma_request_slave_channel(host->dev, "rx-tx");
875
- if (!host->dms->ch) {
881
+ host->dms->ch = dma_request_chan(host->dev, "rx-tx");
882
+ if (IS_ERR(host->dms->ch)) {
883
+ int ret = PTR_ERR(host->dms->ch);
884
+
876885 dev_err(host->dev, "Failed to get external DMA channel.\n");
877886 kfree(host->dms);
878887 host->dms = NULL;
879
- return -ENXIO;
888
+ return ret;
880889 }
881890
882891 return 0;
....@@ -918,7 +927,7 @@
918927 * non-word-aligned buffers or lengths. Also, we don't bother
919928 * with all the DMA setup overhead for short transfers.
920929 */
921
- if (data->blocks * data->blksz < DW_MCI_DMA_THRESHOLD)
930
+ if (data->blocks * data->blksz < DW_MCI_DMA_THRESHOLD && !host->is_rv1106_sd)
922931 return -EINVAL;
923932
924933 if (data->blksz & 3)
....@@ -976,39 +985,12 @@
976985 data->host_cookie = COOKIE_UNMAPPED;
977986 }
978987
979
-static int dw_mci_set_sdio_status(struct mmc_host *mmc, int val)
980
-{
981
- struct dw_mci_slot *slot = mmc_priv(mmc);
982
- struct dw_mci *host = slot->host;
983
-
984
- if (!(mmc->restrict_caps & RESTRICT_CARD_TYPE_SDIO))
985
- return 0;
986
-
987
- spin_lock_bh(&host->lock);
988
-
989
- if (val)
990
- set_bit(DW_MMC_CARD_PRESENT, &slot->flags);
991
- else
992
- clear_bit(DW_MMC_CARD_PRESENT, &slot->flags);
993
-
994
- spin_unlock_bh(&host->lock);
995
-
996
- mmc_detect_change(slot->mmc, 20);
997
-
998
- return 0;
999
-}
1000
-
1001988 static int dw_mci_get_cd(struct mmc_host *mmc)
1002989 {
1003990 int present;
1004991 struct dw_mci_slot *slot = mmc_priv(mmc);
1005992 struct dw_mci *host = slot->host;
1006993 int gpio_cd = mmc_gpio_get_cd(mmc);
1007
-
1008
-#ifdef CONFIG_SDIO_KEEPALIVE
1009
- if (mmc->logic_remove_card)
1010
- return test_bit(DW_MMC_CARD_PRESENT, &slot->flags);
1011
-#endif
1012994
1013995 /* Use platform get_cd function, else try onboard card detect */
1014996 if (((mmc->caps & MMC_CAP_NEEDS_POLL)
....@@ -1358,10 +1340,16 @@
13581340 host->data_status = 0;
13591341 host->dir_status = 0;
13601342
1343
+ if (host->is_rv1106_sd)
1344
+ mci_writel(host, CTYPE, (slot->ctype << slot->id));
1345
+
13611346 data = cmd->data;
13621347 if (data) {
13631348 mci_writel(host, TMOUT, 0xFFFFFFFF);
1364
- mci_writel(host, BYTCNT, data->blksz*data->blocks);
1349
+ if (host->is_rv1106_sd && (data->flags & MMC_DATA_WRITE))
1350
+ mci_writel(host, BYTCNT, 0);
1351
+ else
1352
+ mci_writel(host, BYTCNT, data->blksz*data->blocks);
13651353 mci_writel(host, BLKSIZ, data->blksz);
13661354 }
13671355
....@@ -1439,6 +1427,7 @@
14391427 }
14401428 }
14411429
1430
+static bool dw_mci_reset(struct dw_mci *host);
14421431 static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq)
14431432 {
14441433 struct dw_mci_slot *slot = mmc_priv(mmc);
....@@ -1458,7 +1447,17 @@
14581447 return;
14591448 }
14601449
1450
+ if (host->is_rv1106_sd) {
1451
+ u32 reg;
1452
+
1453
+ readl_poll_timeout(host->regs + SDMMC_STATUS, reg,
1454
+ reg & BIT(2), USEC_PER_MSEC, 500 * USEC_PER_MSEC);
1455
+ }
1456
+
14611457 spin_lock_bh(&host->lock);
1458
+
1459
+ if (host->is_rv1106_sd)
1460
+ dw_mci_reset(host);
14621461
14631462 dw_mci_queue_request(host, slot, mrq);
14641463
....@@ -1469,7 +1468,7 @@
14691468 {
14701469 struct dw_mci_slot *slot = mmc_priv(mmc);
14711470 const struct dw_mci_drv_data *drv_data = slot->host->drv_data;
1472
- u32 regs;
1471
+ u32 regs, power_off_delay;
14731472 int ret;
14741473
14751474 switch (ios->bus_width) {
....@@ -1508,6 +1507,15 @@
15081507
15091508 switch (ios->power_mode) {
15101509 case MMC_POWER_UP:
1510
+ if (dw_mci_get_cd(mmc) && !IS_ERR_OR_NULL(slot->host->pinctrl)) {
1511
+ if (!pinctrl_select_state(slot->host->pinctrl, slot->host->idle_state)) {
1512
+ if (device_property_read_u32(slot->host->dev, "power-off-delay-ms",
1513
+ &power_off_delay))
1514
+ power_off_delay = 200;
1515
+ msleep(power_off_delay);
1516
+ }
1517
+ }
1518
+
15111519 if (!IS_ERR(mmc->supply.vmmc)) {
15121520 ret = mmc_regulator_set_ocr(mmc, mmc->supply.vmmc,
15131521 ios->vdd);
....@@ -1524,6 +1532,9 @@
15241532 mci_writel(slot->host, PWREN, regs);
15251533 break;
15261534 case MMC_POWER_ON:
1535
+ if (!IS_ERR_OR_NULL(slot->host->pinctrl))
1536
+ pinctrl_select_state(slot->host->pinctrl, slot->host->normal_state);
1537
+
15271538 if (!slot->host->vqmmc_enabled) {
15281539 if (!IS_ERR(mmc->supply.vqmmc)) {
15291540 ret = regulator_enable(mmc->supply.vqmmc);
....@@ -1548,17 +1559,17 @@
15481559
15491560 break;
15501561 case MMC_POWER_OFF:
1562
+ if (!IS_ERR_OR_NULL(slot->host->pinctrl))
1563
+ pinctrl_select_state(slot->host->pinctrl, slot->host->idle_state);
1564
+
15511565 /* Turn clock off before power goes down */
15521566 dw_mci_setup_bus(slot, false);
15531567
15541568 if (!IS_ERR(mmc->supply.vmmc))
15551569 mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0);
15561570
1557
- if (!IS_ERR(mmc->supply.vqmmc) && slot->host->vqmmc_enabled) {
1558
- ios->signal_voltage = MMC_SIGNAL_VOLTAGE_330;
1559
- mmc_regulator_set_vqmmc(mmc, ios);
1571
+ if (!IS_ERR(mmc->supply.vqmmc) && slot->host->vqmmc_enabled)
15601572 regulator_disable(mmc->supply.vqmmc);
1561
- }
15621573 slot->host->vqmmc_enabled = false;
15631574
15641575 regs = mci_readl(slot->host, PWREN);
....@@ -1612,8 +1623,7 @@
16121623
16131624 if (!IS_ERR(mmc->supply.vqmmc)) {
16141625 ret = mmc_regulator_set_vqmmc(mmc, ios);
1615
-
1616
- if (ret) {
1626
+ if (ret < 0) {
16171627 dev_dbg(&mmc->class_dev,
16181628 "Regulator set error %d - %s V\n",
16191629 ret, uhs & v18 ? "1.8" : "3.3");
....@@ -1843,7 +1853,6 @@
18431853 .pre_req = dw_mci_pre_req,
18441854 .post_req = dw_mci_post_req,
18451855 .set_ios = dw_mci_set_ios,
1846
- .set_sdio_status = dw_mci_set_sdio_status,
18471856 .get_ro = dw_mci_get_ro,
18481857 .get_cd = dw_mci_get_cd,
18491858 .hw_reset = dw_mci_hw_reset,
....@@ -1885,6 +1894,7 @@
18851894 }
18861895
18871896 spin_unlock(&host->lock);
1897
+
18881898 mmc_request_done(prev_mmc, mrq);
18891899 spin_lock(&host->lock);
18901900 }
....@@ -1926,6 +1936,9 @@
19261936 {
19271937 u32 status = host->data_status;
19281938
1939
+ if (host->is_rv1106_sd && (data->flags & MMC_DATA_WRITE) && (status & SDMMC_INT_DATA_OVER))
1940
+ goto finish;
1941
+
19291942 if (status & DW_MCI_DATA_ERROR_FLAGS) {
19301943 if (status & SDMMC_INT_DRTO) {
19311944 data->error = -ETIMEDOUT;
....@@ -1958,6 +1971,7 @@
19581971 */
19591972 dw_mci_reset(host);
19601973 } else {
1974
+finish:
19611975 data->bytes_xfered = data->blocks * data->blksz;
19621976 data->error = 0;
19631977 }
....@@ -2123,7 +2137,7 @@
21232137 }
21242138
21252139 prev_state = state = STATE_SENDING_DATA;
2126
- /* fall through */
2140
+ fallthrough;
21272141
21282142 case STATE_SENDING_DATA:
21292143 /*
....@@ -2184,7 +2198,7 @@
21842198 }
21852199 prev_state = state = STATE_DATA_BUSY;
21862200
2187
- /* fall through */
2201
+ fallthrough;
21882202
21892203 case STATE_DATA_BUSY:
21902204 if (!dw_mci_clear_pending_data_complete(host)) {
....@@ -2237,7 +2251,7 @@
22372251 */
22382252 prev_state = state = STATE_SENDING_STOP;
22392253
2240
- /* fall through */
2254
+ fallthrough;
22412255
22422256 case STATE_SENDING_STOP:
22432257 if (!dw_mci_clear_pending_cmd_complete(host))
....@@ -2762,11 +2776,14 @@
27622776 }
27632777
27642778 if (pending & SDMMC_INT_DATA_OVER) {
2779
+rv1106_sd:
27652780 spin_lock_irqsave(&host->irq_lock, irqflags);
27662781
27672782 del_timer(&host->dto_timer);
27682783
27692784 mci_writel(host, RINTSTS, SDMMC_INT_DATA_OVER);
2785
+ if (host->is_rv1106_sd)
2786
+ pending |= SDMMC_INT_DATA_OVER;
27702787 if (!host->data_status)
27712788 host->data_status = pending;
27722789 smp_wmb(); /* drain writebuffer */
....@@ -2836,6 +2853,9 @@
28362853 mci_writel(host, IDSTS, SDMMC_IDMAC_INT_NI);
28372854 if (!test_bit(EVENT_DATA_ERROR, &host->pending_events))
28382855 host->dma_ops->complete((void *)host);
2856
+
2857
+ if (host->is_rv1106_sd && (pending & SDMMC_IDMAC_INT_TI))
2858
+ goto rv1106_sd;
28392859 }
28402860 }
28412861
....@@ -2851,12 +2871,6 @@
28512871
28522872 if (host->pdata->caps)
28532873 mmc->caps = host->pdata->caps;
2854
-
2855
- /*
2856
- * Support MMC_CAP_ERASE by default.
2857
- * It needs to use trim/discard/erase commands.
2858
- */
2859
- mmc->caps |= MMC_CAP_ERASE;
28602874
28612875 if (host->pdata->pm_caps)
28622876 mmc->pm_caps = host->pdata->pm_caps;
....@@ -2875,15 +2889,7 @@
28752889 ctrl_id);
28762890 return -EINVAL;
28772891 }
2878
- /*
2879
- * Some sd cards violate the spec. They claim to support
2880
- * CMD23 but actually not. We don't have a good method to
2881
- * work around them except for adding MMC_QUIRK_BLK_NO_CMD23
2882
- * one by one. But it's not a acceptable way for our custmors.
2883
- * So removing CMD23 support for all sd cards to solve it.
2884
- */
2885
- if (!(mmc->restrict_caps & RESTRICT_CARD_TYPE_SD))
2886
- mmc->caps |= drv_data->caps[ctrl_id];
2892
+ mmc->caps |= drv_data->caps[ctrl_id];
28872893 }
28882894
28892895 if (host->pdata->caps2)
....@@ -2937,6 +2943,10 @@
29372943
29382944 /* Useful defaults if platform data is unset. */
29392945 if (host->use_dma == TRANS_MODE_IDMAC) {
2946
+ /* Reserve last desc for dirty data */
2947
+ if (host->is_rv1106_sd)
2948
+ host->ring_size--;
2949
+
29402950 mmc->max_segs = host->ring_size;
29412951 mmc->max_blk_size = 65535;
29422952 mmc->max_seg_size = 0x1000;
....@@ -2960,11 +2970,6 @@
29602970 }
29612971
29622972 dw_mci_get_cd(mmc);
2963
-
2964
-#ifdef CONFIG_SDIO_KEEPALIVE
2965
- if (mmc->logic_remove_card)
2966
- clear_bit(DW_MMC_CARD_PRESENT, &slot->flags);
2967
-#endif
29682973
29692974 ret = mmc_add_host(mmc);
29702975 if (ret)
....@@ -3272,6 +3277,22 @@
32723277 return ERR_PTR(ret);
32733278 }
32743279
3280
+ host->pinctrl = devm_pinctrl_get(host->dev);
3281
+ if (!IS_ERR(host->pinctrl)) {
3282
+ host->normal_state = pinctrl_lookup_state(host->pinctrl, "normal");
3283
+ if (IS_ERR(host->normal_state))
3284
+ dev_warn(dev, "No normal pinctrl state\n");
3285
+
3286
+ host->idle_state = pinctrl_lookup_state(host->pinctrl, "idle");
3287
+ if (IS_ERR(host->idle_state))
3288
+ dev_warn(dev, "No idle pinctrl state\n");
3289
+
3290
+ if (!IS_ERR(host->normal_state) && !IS_ERR(host->idle_state))
3291
+ pinctrl_select_state(host->pinctrl, host->idle_state);
3292
+ else
3293
+ host->pinctrl = NULL;
3294
+ }
3295
+
32753296 return pdata;
32763297 }
32773298
....@@ -3311,12 +3332,9 @@
33113332
33123333 if (!host->pdata) {
33133334 host->pdata = dw_mci_parse_dt(host);
3314
- if (PTR_ERR(host->pdata) == -EPROBE_DEFER) {
3315
- return -EPROBE_DEFER;
3316
- } else if (IS_ERR(host->pdata)) {
3317
- dev_err(host->dev, "platform data not available\n");
3318
- return -EINVAL;
3319
- }
3335
+ if (IS_ERR(host->pdata))
3336
+ return dev_err_probe(host->dev, PTR_ERR(host->pdata),
3337
+ "platform data not available\n");
33203338 }
33213339
33223340 host->biu_clk = devm_clk_get(host->dev, "biu");
....@@ -3329,8 +3347,10 @@
33293347 return ret;
33303348 }
33313349 }
3332
-#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT
3333
- if (device_property_read_bool(host->dev, "supports-emmc")) {
3350
+
3351
+#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT_MMC
3352
+ if (device_property_read_bool(host->dev, "no-sd") &&
3353
+ device_property_read_bool(host->dev, "no-sdio")) {
33343354 if (readl_poll_timeout(host->regs + SDMMC_STATUS,
33353355 fifo_size,
33363356 !(fifo_size & (BIT(10) | GENMASK(7, 4))),
....@@ -3507,6 +3527,24 @@
35073527 goto err_dmaunmap;
35083528 }
35093529
3530
+ if (host->is_rv1106_sd) {
3531
+#if IS_ENABLED(CONFIG_CPU_RV1106)
3532
+ g_sdmmc_ispvicap_lock = &host->lock;
3533
+#endif
3534
+ /* Select IDMAC interface */
3535
+ fifo_size = mci_readl(host, CTRL);
3536
+ fifo_size |= SDMMC_CTRL_USE_IDMAC;
3537
+ mci_writel(host, CTRL, fifo_size);
3538
+
3539
+ fifo_size = mci_readl(host, INTMASK);
3540
+ fifo_size &= ~SDMMC_INT_HTO;
3541
+ mci_writel(host, INTMASK, fifo_size);
3542
+
3543
+ host->slot->mmc->caps &= ~(MMC_CAP_UHS_DDR50 | MMC_CAP_UHS_SDR104 |
3544
+ MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_SDR25 |
3545
+ MMC_CAP_UHS_SDR12);
3546
+ }
3547
+
35103548 /* Now that slots are all setup, we can enable card detect */
35113549 dw_mci_enable_cd(host);
35123550
....@@ -3604,18 +3642,26 @@
36043642 * Restore the initial value at FIFOTH register
36053643 * And Invalidate the prev_blksz with zero
36063644 */
3607
- mci_writel(host, FIFOTH, host->fifoth_val);
3608
- host->prev_blksz = 0;
3645
+ mci_writel(host, FIFOTH, host->fifoth_val);
3646
+ host->prev_blksz = 0;
36093647
36103648 /* Put in max timeout */
36113649 mci_writel(host, TMOUT, 0xFFFFFFFF);
36123650
36133651 mci_writel(host, RINTSTS, 0xFFFFFFFF);
3614
- mci_writel(host, INTMASK, SDMMC_INT_CMD_DONE | SDMMC_INT_DATA_OVER |
3615
- SDMMC_INT_TXDR | SDMMC_INT_RXDR |
3616
- DW_MCI_ERROR_FLAGS);
3652
+ mci_writel(host, INTMASK, SDMMC_INT_CMD_DONE | SDMMC_INT_DATA_OVER | DW_MCI_ERROR_FLAGS);
36173653 mci_writel(host, CTRL, SDMMC_CTRL_INT_ENABLE);
36183654
3655
+ if (host->is_rv1106_sd) {
3656
+ /* Select IDMAC interface */
3657
+ ret = mci_readl(host, CTRL);
3658
+ ret |= SDMMC_CTRL_USE_IDMAC;
3659
+ mci_writel(host, CTRL, ret);
3660
+
3661
+ ret = mci_readl(host, INTMASK);
3662
+ ret &= ~SDMMC_INT_HTO;
3663
+ mci_writel(host, INTMASK, ret);
3664
+ }
36193665
36203666 if (host->slot->mmc->pm_flags & MMC_PM_KEEP_POWER)
36213667 dw_mci_set_ios(host->slot->mmc, &host->slot->mmc->ios);