Lines Matching refs:host

3  *  linux/include/linux/mmc/host.h
117 * It is optional for the host to implement pre_req and post_req in
124 void (*post_req)(struct mmc_host *host, struct mmc_request *req,
126 void (*pre_req)(struct mmc_host *host, struct mmc_request *req);
127 void (*request)(struct mmc_host *host, struct mmc_request *req);
128 /* Submit one request to host in atomic context. */
129 int (*request_atomic)(struct mmc_host *host,
146 void (*set_ios)(struct mmc_host *host, struct mmc_ios *ios);
155 int (*get_ro)(struct mmc_host *host);
164 int (*get_cd)(struct mmc_host *host);
166 void (*enable_sdio_irq)(struct mmc_host *host, int enable);
168 void (*ack_sdio_irq)(struct mmc_host *host);
171 void (*init_card)(struct mmc_host *host, struct mmc_card *card);
173 int (*start_signal_voltage_switch)(struct mmc_host *host, struct mmc_ios *ios);
176 int (*card_busy)(struct mmc_host *host);
179 int (*execute_tuning)(struct mmc_host *host, u32 opcode);
181 /* Prepare HS400 target operating frequency depending host driver */
182 int (*prepare_hs400_tuning)(struct mmc_host *host, struct mmc_ios *ios);
184 /* Execute HS400 tuning depending host driver */
185 int (*execute_hs400_tuning)(struct mmc_host *host, struct mmc_card *card);
188 int (*prepare_sd_hs_tuning)(struct mmc_host *host, struct mmc_card *card);
191 int (*execute_sd_hs_tuning)(struct mmc_host *host, struct mmc_card *card);
194 int (*hs400_prepare_ddr)(struct mmc_host *host);
197 void (*hs400_downgrade)(struct mmc_host *host);
200 void (*hs400_complete)(struct mmc_host *host);
202 /* Prepare enhanced strobe depending host driver */
203 void (*hs400_enhanced_strobe)(struct mmc_host *host,
209 void (*card_hw_reset)(struct mmc_host *host);
210 void (*card_event)(struct mmc_host *host);
220 int (*init_sd_express)(struct mmc_host *host, struct mmc_ios *ios);
225 int (*cqe_enable)(struct mmc_host *host, struct mmc_card *card);
227 void (*cqe_disable)(struct mmc_host *host);
232 int (*cqe_request)(struct mmc_host *host, struct mmc_request *mrq);
234 void (*cqe_post_req)(struct mmc_host *host, struct mmc_request *mrq);
236 * Prepare the CQE and host controller to accept non-CQ commands. There
240 void (*cqe_off)(struct mmc_host *host);
245 int (*cqe_wait_for_idle)(struct mmc_host *host);
251 bool (*cqe_timeout)(struct mmc_host *host, struct mmc_request *mrq,
254 * Stop all CQE activity and prepare the CQE and host controller to
257 void (*cqe_recovery_start)(struct mmc_host *host);
264 void (*cqe_recovery_finish)(struct mmc_host *host);
283 * Some MMC/SD host controllers implement slot-functions like card and
358 #define MMC_CAP_4_BIT_DATA (1 << 0) /* Can the host do 4 bit transfers */
364 #define MMC_CAP_8_BIT_DATA (1 << 6) /* Can the host do 8 bit transfers */
394 u32 caps2; /* More host capabilities */
435 /* host specific block data */
451 unsigned int claimed:1; /* host exclusively claimed */
471 struct mmc_card *card; /* device attached to this host */
474 struct mmc_ctx *claimer; /* context that has host claimed */
544 int mmc_of_parse(struct mmc_host *host);
545 int mmc_of_parse_voltage(struct mmc_host *host, u32 *mask);
547 static inline void *mmc_priv(struct mmc_host *host)
549 return (void *)host->private;
557 #define mmc_host_is_spi(host) ((host)->caps & MMC_CAP_SPI)
565 void mmc_command_done(struct mmc_host *host, struct mmc_request *mrq);
567 void mmc_cqe_request_done(struct mmc_host *host, struct mmc_request *mrq);
570 * May be called from host driver's system/runtime suspend/resume callbacks,
573 static inline bool sdio_irq_claimed(struct mmc_host *host)
575 return host->sdio_irqs > 0;
578 static inline void mmc_signal_sdio_irq(struct mmc_host *host)
580 host->ops->enable_sdio_irq(host, 0);
581 host->sdio_irq_pending = true;
582 if (host->sdio_irq_thread)
583 wake_up_process(host->sdio_irq_thread);
586 void sdio_signal_irq(struct mmc_host *host);
612 static inline int mmc_card_is_removable(struct mmc_host *host)
614 return !(host->caps & MMC_CAP_NONREMOVABLE);
617 static inline int mmc_card_keep_power(struct mmc_host *host)
619 return host->pm_flags & MMC_PM_KEEP_POWER;
622 static inline int mmc_card_wake_sdio_irq(struct mmc_host *host)
624 return host->pm_flags & MMC_PM_WAKE_SDIO_IRQ;
630 return card->host->ios.timing == MMC_TIMING_SD_HS ||
631 card->host->ios.timing == MMC_TIMING_MMC_HS;
637 return card->host->ios.timing >= MMC_TIMING_UHS_SDR12 &&
638 card->host->ios.timing <= MMC_TIMING_UHS_DDR50;
641 void mmc_retune_timer_stop(struct mmc_host *host);
643 static inline void mmc_retune_needed(struct mmc_host *host)
645 if (host->can_retune)
646 host->need_retune = 1;
649 static inline bool mmc_can_retune(struct mmc_host *host)
651 return host->can_retune == 1;
654 static inline bool mmc_doing_retune(struct mmc_host *host)
656 return host->doing_retune == 1;
659 static inline bool mmc_doing_tune(struct mmc_host *host)
661 return host->doing_retune == 1 || host->doing_init_tune == 1;
669 static inline void mmc_debugfs_err_stats_inc(struct mmc_host *host,
672 host->err_stats[stat] += 1;
677 int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error);
678 int mmc_send_abort_tuning(struct mmc_host *host, u32 opcode);