Lines Matching defs:host

3  *  linux/drivers/mmc/host/sdhci.h - Secure Digital Host Controller Interface driver
20 #include <linux/mmc/host.h>
332 #define SDHCI_ADMA2_64_DESC_SZ(host) ((host)->v4_mode ? 16 : 12)
367 #define sdhci_err_stats_inc(host, err_name) \
368 mmc_debugfs_err_stats_inc((host)->mmc, MMC_ERR_##err_name)
447 /* The system physically doesn't support 1.8v, even if the host does */
451 /* Controller has a non-standard host control register */
501 struct mmc_host_ops mmc_host_ops; /* MMC host ops */
570 unsigned int alloc_desc_sz; /* ADMA descr. max size host supports */
608 unsigned int tuning_mode; /* Re-tuning mode supported by host */
630 u32 (*read_l)(struct sdhci_host *host, int reg);
631 u16 (*read_w)(struct sdhci_host *host, int reg);
632 u8 (*read_b)(struct sdhci_host *host, int reg);
633 void (*write_l)(struct sdhci_host *host, u32 val, int reg);
634 void (*write_w)(struct sdhci_host *host, u16 val, int reg);
635 void (*write_b)(struct sdhci_host *host, u8 val, int reg);
638 void (*set_clock)(struct sdhci_host *host, unsigned int clock);
639 void (*set_power)(struct sdhci_host *host, unsigned char mode,
642 u32 (*irq)(struct sdhci_host *host, u32 intmask);
644 int (*set_dma_mask)(struct sdhci_host *host);
645 int (*enable_dma)(struct sdhci_host *host);
646 unsigned int (*get_max_clock)(struct sdhci_host *host);
647 unsigned int (*get_min_clock)(struct sdhci_host *host);
649 unsigned int (*get_timeout_clock)(struct sdhci_host *host);
650 unsigned int (*get_max_timeout_count)(struct sdhci_host *host);
651 void (*set_timeout)(struct sdhci_host *host,
653 void (*set_bus_width)(struct sdhci_host *host, int width);
654 void (*platform_send_init_74_clocks)(struct sdhci_host *host,
656 unsigned int (*get_ro)(struct sdhci_host *host);
657 void (*reset)(struct sdhci_host *host, u8 mask);
658 int (*platform_execute_tuning)(struct sdhci_host *host, u32 opcode);
659 void (*set_uhs_signaling)(struct sdhci_host *host, unsigned int uhs);
660 void (*hw_reset)(struct sdhci_host *host);
661 void (*adma_workaround)(struct sdhci_host *host, u32 intmask);
662 void (*card_event)(struct sdhci_host *host);
663 void (*voltage_switch)(struct sdhci_host *host);
664 void (*adma_write_desc)(struct sdhci_host *host, void **desc,
666 void (*copy_to_bounce_buffer)(struct sdhci_host *host,
669 void (*request_done)(struct sdhci_host *host,
671 void (*dump_vendor_regs)(struct sdhci_host *host);
676 static inline void sdhci_writel(struct sdhci_host *host, u32 val, int reg)
678 if (unlikely(host->ops->write_l))
679 host->ops->write_l(host, val, reg);
681 writel(val, host->ioaddr + reg);
684 static inline void sdhci_writew(struct sdhci_host *host, u16 val, int reg)
686 if (unlikely(host->ops->write_w))
687 host->ops->write_w(host, val, reg);
689 writew(val, host->ioaddr + reg);
692 static inline void sdhci_writeb(struct sdhci_host *host, u8 val, int reg)
694 if (unlikely(host->ops->write_b))
695 host->ops->write_b(host, val, reg);
697 writeb(val, host->ioaddr + reg);
700 static inline u32 sdhci_readl(struct sdhci_host *host, int reg)
702 if (unlikely(host->ops->read_l))
703 return host->ops->read_l(host, reg);
705 return readl(host->ioaddr + reg);
708 static inline u16 sdhci_readw(struct sdhci_host *host, int reg)
710 if (unlikely(host->ops->read_w))
711 return host->ops->read_w(host, reg);
713 return readw(host->ioaddr + reg);
716 static inline u8 sdhci_readb(struct sdhci_host *host, int reg)
718 if (unlikely(host->ops->read_b))
719 return host->ops->read_b(host, reg);
721 return readb(host->ioaddr + reg);
726 static inline void sdhci_writel(struct sdhci_host *host, u32 val, int reg)
728 writel(val, host->ioaddr + reg);
731 static inline void sdhci_writew(struct sdhci_host *host, u16 val, int reg)
733 writew(val, host->ioaddr + reg);
736 static inline void sdhci_writeb(struct sdhci_host *host, u8 val, int reg)
738 writeb(val, host->ioaddr + reg);
741 static inline u32 sdhci_readl(struct sdhci_host *host, int reg)
743 return readl(host->ioaddr + reg);
746 static inline u16 sdhci_readw(struct sdhci_host *host, int reg)
748 return readw(host->ioaddr + reg);
751 static inline u8 sdhci_readb(struct sdhci_host *host, int reg)
753 return readb(host->ioaddr + reg);
759 void sdhci_free_host(struct sdhci_host *host);
761 static inline void *sdhci_priv(struct sdhci_host *host)
763 return host->private;
766 void __sdhci_read_caps(struct sdhci_host *host, const u16 *ver,
768 int sdhci_setup_host(struct sdhci_host *host);
769 void sdhci_cleanup_host(struct sdhci_host *host);
770 int __sdhci_add_host(struct sdhci_host *host);
771 int sdhci_add_host(struct sdhci_host *host);
772 void sdhci_remove_host(struct sdhci_host *host, int dead);
774 static inline void sdhci_read_caps(struct sdhci_host *host)
776 __sdhci_read_caps(host, NULL, NULL, NULL);
779 u16 sdhci_calc_clk(struct sdhci_host *host, unsigned int clock,
781 void sdhci_set_clock(struct sdhci_host *host, unsigned int clock);
782 void sdhci_enable_clk(struct sdhci_host *host, u16 clk);
783 void sdhci_set_power(struct sdhci_host *host, unsigned char mode,
785 void sdhci_set_power_and_bus_voltage(struct sdhci_host *host,
788 void sdhci_set_power_noreg(struct sdhci_host *host, unsigned char mode,
793 void sdhci_set_bus_width(struct sdhci_host *host, int width);
794 void sdhci_reset(struct sdhci_host *host, u8 mask);
795 void sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned timing);
797 int __sdhci_execute_tuning(struct sdhci_host *host, u32 opcode);
802 void sdhci_adma_write_desc(struct sdhci_host *host, void **desc,
806 int sdhci_suspend_host(struct sdhci_host *host);
807 int sdhci_resume_host(struct sdhci_host *host);
808 int sdhci_runtime_suspend_host(struct sdhci_host *host);
809 int sdhci_runtime_resume_host(struct sdhci_host *host, int soft_reset);
814 bool sdhci_cqe_irq(struct sdhci_host *host, u32 intmask, int *cmd_error,
817 void sdhci_dumpregs(struct sdhci_host *host);
818 void sdhci_enable_v4_mode(struct sdhci_host *host);
820 void sdhci_start_tuning(struct sdhci_host *host);
821 void sdhci_end_tuning(struct sdhci_host *host);
822 void sdhci_reset_tuning(struct sdhci_host *host);
823 void sdhci_send_tuning(struct sdhci_host *host, u32 opcode);
824 void sdhci_abort_tuning(struct sdhci_host *host, u32 opcode);
825 void sdhci_switch_external_dma(struct sdhci_host *host, bool en);
826 void sdhci_set_data_timeout_irq(struct sdhci_host *host, bool enable);
827 void __sdhci_set_timeout(struct sdhci_host *host, struct mmc_command *cmd);