Lines Matching +full:target +full:- +full:12 +full:v +full:- +full:supply

1 /* SPDX-License-Identifier: GPL-2.0-only */
12 #include <linux/fault-inject.h>
17 #include <linux/dma-direction.h>
18 #include <linux/blk-crypto-profile.h>
38 unsigned char power_mode; /* power supply mode */
65 #define MMC_TIMING_SD_EXP_1_2V 12
67 unsigned char signal_voltage; /* signalling voltage (1.8V or 3.3V) */
141 * ios->clock might be 0. For some controllers, setting 0Hz
151 * 1 for a read-only card
152 * -ENOSYS when not supported (equal to NULL callback)
161 * -ENOSYS when not supported (equal to NULL callback)
181 /* Prepare HS400 target operating frequency depending host driver */
187 /* Optional callback to prepare for SD high-speed tuning */
190 /* Optional callback to execute SD high-speed tuning */
226 /* Free resources, and make the CQE non-operational */
230 * effect of ->cqe_off().
236 * Prepare the CQE and host controller to accept non-CQ commands. There
237 * is no corresponding ->cqe_on(), instead ->cqe_request() is required
261 * (data->error or cmd->error for DCMD). Requests that did not error
278 * struct mmc_slot - MMC slot functions
280 * @cd_irq: MMC/SD-card slot hotplug detection IRQ or -EINVAL
281 * @handler_priv: MMC/SD-card slot context
283 * Some MMC/SD host controllers implement slot-functions like card and
284 * write-protect detection natively. However, a large number of controllers
286 * such slot-function drivers.
295 * mmc_context_info - synchronization details for mmc context
312 struct regulator *vmmc; /* Card power supply */
313 struct regulator *vqmmc; /* Optional Vccq supply */
330 u32 ocr_avail_sdio; /* SDIO-specific OCR */
331 u32 ocr_avail_sd; /* SD-specific OCR */
332 u32 ocr_avail_mmc; /* MMC-specific OCR */
338 #define MMC_VDD_165_195 0x00000080 /* VDD voltage 1.65 - 1.95 */
359 #define MMC_CAP_MMC_HIGHSPEED (1 << 1) /* Can do MMC high-speed timing */
360 #define MMC_CAP_SD_HIGHSPEED (1 << 2) /* Can do SD high-speed timing */
363 #define MMC_CAP_NEEDS_POLL (1 << 5) /* Needs polling for card-detection */
368 #define MMC_CAP_3_3V_DDR (1 << 11) /* Host supports eMMC DDR 3.3V */
369 #define MMC_CAP_1_8V_DDR (1 << 12) /* Host supports eMMC DDR 1.8V */
370 #define MMC_CAP_1_2V_DDR (1 << 13) /* Host supports eMMC DDR 1.2V */
404 #define MMC_CAP2_SD_EXP_1_2V (1 << 8) /* SD express 1.2V */
405 #define MMC_CAP2_CD_ACTIVE_HIGH (1 << 10) /* Card-detect signal active high */
406 #define MMC_CAP2_RO_ACTIVE_HIGH (1 << 11) /* Write-protect signal active high */
408 #define MMC_CAP2_HS400_1_8V (1 << 15) /* Can support HS400 1.8V */
409 #define MMC_CAP2_HS400_1_2V (1 << 16) /* Can support HS400 1.2V */
415 …_WRITE_PROTECT (1 << 18) /* No physical write protect pin, assume that card is always read-write */
422 #define MMC_CAP2_AVOID_3_3V (1 << 25) /* Host must negotiate down from 3.3V */
429 #define MMC_CAP2_ALT_GPT_TEGRA (1 << 28) /* Host with eMMC that has GPT entry at a non-standard loc…
431 int fixed_drv_type; /* fixed driver type for non-removable media */
453 unsigned int can_retune:1; /* re-tuning can be used */
454 unsigned int doing_retune:1; /* re-tuning in progress */
455 unsigned int retune_now:1; /* do re-tuning at next req */
456 unsigned int retune_paused:1; /* re-tuning is temporarily disabled */
464 int need_retune; /* re-tuning is needed */
465 int hold_retune; /* hold off re-tuning */
466 unsigned int retune_period; /* re-tuning period in secs */
467 struct timer_list retune_timer; /* for periodic re-tuning */
497 struct mmc_supply supply; member
548 return (void *)host->private; in mmc_priv()
556 #define mmc_host_is_spi(host) ((host)->caps & MMC_CAP_SPI)
558 #define mmc_dev(x) ((x)->parent)
559 #define mmc_classdev(x) (&(x)->class_dev)
560 #define mmc_hostname(x) (dev_name(&(x)->class_dev))
574 return host->sdio_irqs > 0; in sdio_irq_claimed()
579 host->ops->enable_sdio_irq(host, 0); in mmc_signal_sdio_irq()
580 host->sdio_irq_pending = true; in mmc_signal_sdio_irq()
581 if (host->sdio_irq_thread) in mmc_signal_sdio_irq()
582 wake_up_process(host->sdio_irq_thread); in mmc_signal_sdio_irq()
589 struct regulator *supply,
594 struct regulator *supply, in mmc_regulator_set_ocr() argument
603 return -EINVAL; in mmc_regulator_set_vqmmc()
613 return !(host->caps & MMC_CAP_NONREMOVABLE); in mmc_card_is_removable()
618 return host->pm_flags & MMC_PM_KEEP_POWER; in mmc_card_keep_power()
623 return host->pm_flags & MMC_PM_WAKE_SDIO_IRQ; in mmc_card_wake_sdio_irq()
629 return card->host->ios.timing == MMC_TIMING_SD_HS || in mmc_card_hs()
630 card->host->ios.timing == MMC_TIMING_MMC_HS; in mmc_card_hs()
636 return card->host->ios.timing >= MMC_TIMING_UHS_SDR12 && in mmc_card_uhs()
637 card->host->ios.timing <= MMC_TIMING_UHS_DDR50; in mmc_card_uhs()
644 if (host->can_retune) in mmc_retune_needed()
645 host->need_retune = 1; in mmc_retune_needed()
650 return host->can_retune == 1; in mmc_can_retune()
655 return host->doing_retune == 1; in mmc_doing_retune()
660 return host->doing_retune == 1 || host->doing_init_tune == 1; in mmc_doing_tune()
665 return data->flags & MMC_DATA_WRITE ? DMA_TO_DEVICE : DMA_FROM_DEVICE; in mmc_get_dma_dir()
671 host->err_stats[stat] += 1; in mmc_debugfs_err_stats_inc()