Commit e7881d85a94b2e35b12a163c3af671057e9ca5e8

Authored by Simon Glass
Committed by Jaehoon Chung
1 parent b9a40c0c0a

dm: mmc: Drop CONFIG_DM_MMC_OPS

All boards which use DM_MMC have now been converted to use DM_MMC_OPS.
Drop the option and good riddance.

Signed-off-by: Simon Glass <sjg@chromium.org>

Showing 15 changed files with 33 additions and 65 deletions Side-by-side Diff

... ... @@ -726,7 +726,6 @@
726 726 select DM_GPIO
727 727 select SPL_DM if SPL
728 728 select DM_MMC
729   - select DM_MMC_OPS
730 729 select DM_SPI
731 730 select DM_SERIAL
732 731 select DM_SPI_FLASH
... ... @@ -1075,7 +1074,6 @@
1075 1074 select DM_GPIO
1076 1075 select DM_I2C
1077 1076 select DM_MMC
1078   - select DM_MMC_OPS
1079 1077 select DM_SERIAL
1080 1078 select DM_SPI
1081 1079 select DM_SPI_FLASH
... ... @@ -20,16 +20,6 @@
20 20 appear as block devices in U-Boot and can support filesystems such
21 21 as EXT4 and FAT.
22 22  
23   -config DM_MMC_OPS
24   - bool "Support MMC controller operations using Driver Model"
25   - depends on DM_MMC
26   - default y if DM_MMC
27   - help
28   - Driver model provides a means of supporting device operations. This
29   - option moves MMC operations under the control of driver model. The
30   - option will be removed as soon as all DM_MMC drivers use it, as it
31   - will the only supported behaviour.
32   -
33 23 config SPL_DM_MMC
34 24 bool "Enable MMC controllers using Driver Model in SPL"
35 25 depends on SPL_DM && DM_MMC
... ... @@ -41,16 +31,6 @@
41 31 appear as block devices in U-Boot and can support filesystems such
42 32 as EXT4 and FAT.
43 33  
44   -config SPL_DM_MMC_OPS
45   - bool "Support MMC controller operations using Driver Model in SPL"
46   - depends on SPL_DM_MMC && DM_MMC_OPS
47   - default y
48   - help
49   - Driver model provides a means of supporting device operations. This
50   - option moves MMC operations under the control of driver model. The
51   - option will be removed as soon as all DM_MMC drivers use it, as it
52   - will the only supported behaviour.
53   -
54 34 if MMC
55 35  
56 36 config SPL_MMC_TINY
... ... @@ -124,7 +104,7 @@
124 104  
125 105 config MMC_MESON_GX
126 106 bool "Meson GX EMMC controller support"
127   - depends on DM_MMC && BLK && DM_MMC_OPS && ARCH_MESON
  107 + depends on DM_MMC && BLK && ARCH_MESON
128 108 help
129 109 Support for EMMC host controller on Meson GX ARM SoCs platform (S905)
130 110  
... ... @@ -155,7 +135,7 @@
155 135  
156 136 config MMC_OMAP_HS
157 137 bool "TI OMAP High Speed Multimedia Card Interface support"
158   - select DM_MMC_OPS if DM_MMC
  138 + select DM_REGULATOR_PBIAS if DM_MMC && DM_REGULATOR
159 139 help
160 140 This selects the TI OMAP High Speed Multimedia card Interface.
161 141 If you have an omap2plus board with a Multimedia Card slot,
... ... @@ -184,7 +164,7 @@
184 164 config MMC_UNIPHIER
185 165 bool "UniPhier SD/MMC Host Controller support"
186 166 depends on ARCH_UNIPHIER
187   - depends on BLK && DM_MMC_OPS
  167 + depends on BLK && DM_MMC
188 168 depends on OF_CONTROL
189 169 help
190 170 This selects support for the SD/MMC Host Controller on UniPhier SoCs.
... ... @@ -192,7 +172,7 @@
192 172 config MMC_SANDBOX
193 173 bool "Sandbox MMC support"
194 174 depends on SANDBOX
195   - depends on BLK && DM_MMC_OPS && OF_CONTROL
  175 + depends on BLK && DM_MMC && OF_CONTROL
196 176 help
197 177 This select a dummy sandbox MMC driver. At present this does nothing
198 178 other than allow sandbox to be build with MMC support. This
... ... @@ -227,7 +207,7 @@
227 207 config MMC_SDHCI_ATMEL
228 208 bool "Atmel SDHCI controller support"
229 209 depends on ARCH_AT91
230   - depends on DM_MMC && BLK && DM_MMC_OPS && ARCH_AT91
  210 + depends on DM_MMC && BLK && ARCH_AT91
231 211 depends on MMC_SDHCI
232 212 help
233 213 This enables support for the Atmel SDHCI controller, which supports
... ... @@ -251,7 +231,7 @@
251 231  
252 232 config MMC_SDHCI_CADENCE
253 233 bool "SDHCI support for the Cadence SD/SDIO/eMMC controller"
254   - depends on BLK && DM_MMC_OPS
  234 + depends on BLK && DM_MMC
255 235 depends on MMC_SDHCI
256 236 depends on OF_CONTROL
257 237 help
... ... @@ -273,7 +253,7 @@
273 253  
274 254 config MMC_SDHCI_MSM
275 255 bool "Qualcomm SDHCI controller"
276   - depends on BLK && DM_MMC_OPS
  256 + depends on BLK && DM_MMC
277 257 depends on MMC_SDHCI
278 258 help
279 259 Enables support for SDHCI 2.0 controller present on some Qualcomm
... ... @@ -303,7 +283,7 @@
303 283 config MMC_SDHCI_ROCKCHIP
304 284 bool "Arasan SDHCI controller for Rockchip support"
305 285 depends on ARCH_ROCKCHIP
306   - depends on DM_MMC && BLK && DM_MMC_OPS
  286 + depends on DM_MMC && BLK
307 287 depends on MMC_SDHCI
308 288 help
309 289 Support for Arasan SDHCI host controller on Rockchip ARM SoCs platform
... ... @@ -376,7 +356,7 @@
376 356 config MMC_SDHCI_ZYNQ
377 357 bool "Arasan SDHCI controller support"
378 358 depends on ARCH_ZYNQ || ARCH_ZYNQMP
379   - depends on DM_MMC && OF_CONTROL && BLK && DM_MMC_OPS
  359 + depends on DM_MMC && OF_CONTROL && BLK
380 360 depends on MMC_SDHCI
381 361 help
382 362 Support for Arasan SDHCI host controller on Zynq/ZynqMP ARM SoCs platform
... ... @@ -391,7 +371,7 @@
391 371  
392 372 config GENERIC_ATMEL_MCI
393 373 bool "Atmel Multimedia Card Interface support"
394   - depends on DM_MMC && BLK && DM_MMC_OPS && ARCH_AT91
  374 + depends on DM_MMC && BLK && ARCH_AT91
395 375 help
396 376 This enables support for Atmel High Speed Multimedia Card Interface
397 377 (HSMCI), which supports the MultiMedia Card (MMC) Specification V4.3,
drivers/mmc/dw_mmc.c
... ... @@ -184,7 +184,7 @@
184 184 return mode;
185 185 }
186 186  
187   -#ifdef CONFIG_DM_MMC_OPS
  187 +#ifdef CONFIG_DM_MMC
188 188 static int dwmci_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
189 189 struct mmc_data *data)
190 190 {
... ... @@ -383,7 +383,7 @@
383 383 return 0;
384 384 }
385 385  
386   -#ifdef CONFIG_DM_MMC_OPS
  386 +#ifdef CONFIG_DM_MMC
387 387 static int dwmci_set_ios(struct udevice *dev)
388 388 {
389 389 struct mmc *mmc = mmc_get_mmc_dev(dev);
... ... @@ -466,7 +466,7 @@
466 466 return 0;
467 467 }
468 468  
469   -#ifdef CONFIG_DM_MMC_OPS
  469 +#ifdef CONFIG_DM_MMC
470 470 int dwmci_probe(struct udevice *dev)
471 471 {
472 472 struct mmc *mmc = mmc_get_mmc_dev(dev);
... ... @@ -491,7 +491,7 @@
491 491 u32 max_clk, u32 min_clk)
492 492 {
493 493 cfg->name = host->name;
494   -#ifndef CONFIG_DM_MMC_OPS
  494 +#ifndef CONFIG_DM_MMC
495 495 cfg->ops = &dwmci_ops;
496 496 #endif
497 497 cfg->f_min = min_clk;
drivers/mmc/fsl_esdhc.c
... ... @@ -726,7 +726,7 @@
726 726 return 0;
727 727 }
728 728  
729   -#if !CONFIG_IS_ENABLED(DM_MMC_OPS)
  729 +#if !CONFIG_IS_ENABLED(DM_MMC)
730 730 static int esdhc_getcd(struct mmc *mmc)
731 731 {
732 732 struct fsl_esdhc_priv *priv = mmc->priv;
... ... @@ -820,7 +820,7 @@
820 820 voltage_caps |= MMC_VDD_32_33 | MMC_VDD_33_34;
821 821  
822 822 cfg->name = "FSL_SDHC";
823   -#if !CONFIG_IS_ENABLED(DM_MMC_OPS)
  823 +#if !CONFIG_IS_ENABLED(DM_MMC)
824 824 cfg->ops = &esdhc_ops;
825 825 #endif
826 826 #ifdef CONFIG_SYS_SD_VOLTAGE
... ... @@ -1127,7 +1127,7 @@
1127 1127 return esdhc_init_common(priv, mmc);
1128 1128 }
1129 1129  
1130   -#if CONFIG_IS_ENABLED(DM_MMC_OPS)
  1130 +#if CONFIG_IS_ENABLED(DM_MMC)
1131 1131 static int fsl_esdhc_get_cd(struct udevice *dev)
1132 1132 {
1133 1133 struct fsl_esdhc_priv *priv = dev_get_priv(dev);
1134 1134  
... ... @@ -1184,9 +1184,7 @@
1184 1184 .name = "fsl-esdhc-mmc",
1185 1185 .id = UCLASS_MMC,
1186 1186 .of_match = fsl_esdhc_ids,
1187   -#if CONFIG_IS_ENABLED(DM_MMC_OPS)
1188 1187 .ops = &fsl_esdhc_ops,
1189   -#endif
1190 1188 #if CONFIG_IS_ENABLED(BLK)
1191 1189 .bind = fsl_esdhc_bind,
1192 1190 #endif
drivers/mmc/mmc-uclass.c
... ... @@ -15,7 +15,6 @@
15 15  
16 16 DECLARE_GLOBAL_DATA_PTR;
17 17  
18   -#if CONFIG_IS_ENABLED(DM_MMC_OPS)
19 18 int dm_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
20 19 struct mmc_data *data)
21 20 {
... ... @@ -79,7 +78,6 @@
79 78 {
80 79 return dm_mmc_get_cd(mmc->dev);
81 80 }
82   -#endif
83 81  
84 82 struct mmc *mmc_get_mmc_dev(struct udevice *dev)
85 83 {
86 84  
... ... @@ -198,10 +196,8 @@
198 196 struct udevice *bdev;
199 197 int ret, devnum = -1;
200 198  
201   -#if CONFIG_IS_ENABLED(DM_MMC_OPS)
202 199 if (!mmc_get_ops(dev))
203 200 return -ENOSYS;
204   -#endif
205 201 #ifndef CONFIG_SPL_BUILD
206 202 /* Use the fixed index with aliase node's index */
207 203 ret = dev_read_alias_seq(dev, &devnum);
... ... @@ -53,7 +53,7 @@
53 53 }
54 54 #endif
55 55  
56   -#if !CONFIG_IS_ENABLED(DM_MMC_OPS)
  56 +#if !CONFIG_IS_ENABLED(DM_MMC)
57 57 __weak int board_mmc_getwp(struct mmc *mmc)
58 58 {
59 59 return -1;
... ... @@ -149,7 +149,7 @@
149 149 }
150 150 #endif
151 151  
152   -#if !CONFIG_IS_ENABLED(DM_MMC_OPS)
  152 +#if !CONFIG_IS_ENABLED(DM_MMC)
153 153 int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
154 154 {
155 155 int ret;
... ... @@ -839,7 +839,7 @@
839 839 return 0;
840 840 }
841 841  
842   -#if !CONFIG_IS_ENABLED(DM_MMC_OPS)
  842 +#if !CONFIG_IS_ENABLED(DM_MMC)
843 843 int mmc_getcd(struct mmc *mmc)
844 844 {
845 845 int cd;
... ... @@ -1075,7 +1075,7 @@
1075 1075 80,
1076 1076 };
1077 1077  
1078   -#if !CONFIG_IS_ENABLED(DM_MMC_OPS)
  1078 +#if !CONFIG_IS_ENABLED(DM_MMC)
1079 1079 static void mmc_set_ios(struct mmc *mmc)
1080 1080 {
1081 1081 if (mmc->cfg->ops->set_ios)
... ... @@ -1652,7 +1652,7 @@
1652 1652  
1653 1653 /* we pretend there's no card when init is NULL */
1654 1654 no_card = mmc_getcd(mmc) == 0;
1655   -#if !CONFIG_IS_ENABLED(DM_MMC_OPS)
  1655 +#if !CONFIG_IS_ENABLED(DM_MMC)
1656 1656 no_card = no_card || (mmc->cfg->ops->init == NULL);
1657 1657 #endif
1658 1658 if (no_card) {
... ... @@ -1673,7 +1673,7 @@
1673 1673 if (err)
1674 1674 return err;
1675 1675  
1676   -#if CONFIG_IS_ENABLED(DM_MMC_OPS)
  1676 +#if CONFIG_IS_ENABLED(DM_MMC)
1677 1677 /* The device has already been probed ready for use */
1678 1678 #else
1679 1679 /* made sure it's not NULL earlier */
drivers/mmc/mmc_legacy.c
... ... @@ -150,7 +150,7 @@
150 150 cfg->f_max == 0 || cfg->b_max == 0)
151 151 return NULL;
152 152  
153   -#if !CONFIG_IS_ENABLED(DM_MMC_OPS)
  153 +#if !CONFIG_IS_ENABLED(DM_MMC)
154 154 if (cfg->ops == NULL || cfg->ops->send_cmd == NULL)
155 155 return NULL;
156 156 #endif
... ... @@ -134,7 +134,7 @@
134 134 #define SDHCI_CMD_DEFAULT_TIMEOUT 100
135 135 #define SDHCI_READ_STATUS_TIMEOUT 1000
136 136  
137   -#ifdef CONFIG_DM_MMC_OPS
  137 +#ifdef CONFIG_DM_MMC
138 138 static int sdhci_send_command(struct udevice *dev, struct mmc_cmd *cmd,
139 139 struct mmc_data *data)
140 140 {
... ... @@ -422,7 +422,7 @@
422 422 sdhci_writeb(host, pwr, SDHCI_POWER_CONTROL);
423 423 }
424 424  
425   -#ifdef CONFIG_DM_MMC_OPS
  425 +#ifdef CONFIG_DM_MMC
426 426 static int sdhci_set_ios(struct udevice *dev)
427 427 {
428 428 struct mmc *mmc = mmc_get_mmc_dev(dev);
... ... @@ -502,7 +502,7 @@
502 502 return 0;
503 503 }
504 504  
505   -#ifdef CONFIG_DM_MMC_OPS
  505 +#ifdef CONFIG_DM_MMC
506 506 int sdhci_probe(struct udevice *dev)
507 507 {
508 508 struct mmc *mmc = mmc_get_mmc_dev(dev);
... ... @@ -543,7 +543,7 @@
543 543 host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
544 544  
545 545 cfg->name = host->name;
546   -#ifndef CONFIG_DM_MMC_OPS
  546 +#ifndef CONFIG_DM_MMC
547 547 cfg->ops = &sdhci_ops;
548 548 #endif
549 549  
include/configs/am335x_evm.h
... ... @@ -282,7 +282,6 @@
282 282 */
283 283 #ifdef CONFIG_SPL_BUILD
284 284 #undef CONFIG_DM_MMC
285   -#undef CONFIG_DM_MMC_OPS
286 285 #undef CONFIG_TIMER
287 286 #undef CONFIG_DM_USB
288 287 #endif
include/configs/am335x_shc.h
... ... @@ -256,7 +256,6 @@
256 256 */
257 257 #ifdef CONFIG_SPL_BUILD
258 258 #undef CONFIG_DM_MMC
259   -#undef CONFIG_DM_MMC_OPS
260 259 #undef CONFIG_TIMER
261 260 #endif
262 261  
include/configs/chiliboard.h
... ... @@ -183,7 +183,6 @@
183 183 */
184 184 #ifdef CONFIG_SPL_BUILD
185 185 #undef CONFIG_DM_MMC
186   -#undef CONFIG_DM_MMC_OPS
187 186 #undef CONFIG_TIMER
188 187 #undef CONFIG_DM_USB
189 188 #endif
include/configs/omap3_logic.h
... ... @@ -23,7 +23,6 @@
23 23 * DM support in SPL
24 24 */
25 25 #undef CONFIG_DM_MMC
26   -#undef CONFIG_DM_MMC_OPS
27 26 #undef OMAP_HSMMC_USE_GPIO
28 27  
29 28 /* select serial console configuration for SPL */
... ... @@ -291,7 +291,7 @@
291 291 int add_dwmci(struct dwmci_host *host, u32 max_clk, u32 min_clk);
292 292 #endif /* !CONFIG_BLK */
293 293  
294   -#ifdef CONFIG_DM_MMC_OPS
  294 +#ifdef CONFIG_DM_MMC
295 295 /* Export the operations to drivers */
296 296 int dwmci_probe(struct udevice *dev);
297 297 extern const struct dm_mmc_ops dm_dwmci_ops;
... ... @@ -321,7 +321,7 @@
321 321 /* forward decl. */
322 322 struct mmc;
323 323  
324   -#if CONFIG_IS_ENABLED(DM_MMC_OPS)
  324 +#if CONFIG_IS_ENABLED(DM_MMC)
325 325 struct dm_mmc_ops {
326 326 /**
327 327 * send_cmd() - Send a command to the MMC device
... ... @@ -385,7 +385,7 @@
385 385  
386 386 struct mmc_config {
387 387 const char *name;
388   -#if !CONFIG_IS_ENABLED(DM_MMC_OPS)
  388 +#if !CONFIG_IS_ENABLED(DM_MMC)
389 389 const struct mmc_ops *ops;
390 390 #endif
391 391 uint host_caps;
... ... @@ -519,7 +519,7 @@
519 519 int mmc_hwpart_config(struct mmc *mmc, const struct mmc_hwpart_conf *conf,
520 520 enum mmc_hwpart_conf_mode mode);
521 521  
522   -#if !CONFIG_IS_ENABLED(DM_MMC_OPS)
  522 +#if !CONFIG_IS_ENABLED(DM_MMC)
523 523 int mmc_getcd(struct mmc *mmc);
524 524 int board_mmc_getcd(struct mmc *mmc);
525 525 int mmc_getwp(struct mmc *mmc);
... ... @@ -410,7 +410,7 @@
410 410 int add_sdhci(struct sdhci_host *host, u32 f_max, u32 f_min);
411 411 #endif /* !CONFIG_BLK */
412 412  
413   -#ifdef CONFIG_DM_MMC_OPS
  413 +#ifdef CONFIG_DM_MMC
414 414 /* Export the operations to drivers */
415 415 int sdhci_probe(struct udevice *dev);
416 416 extern const struct dm_mmc_ops sdhci_ops;