Lines Matching +full:supports +full:- +full:cqe
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * linux/drivers/mmc/host/sdhci.h - Secure Digital Host Controller Interface driver
7 * Copyright (C) 2005-2008 Pierre Ossman, All Rights Reserved.
103 * VDD2 - UHS2 or PCIe/NVMe
173 #define SDHCI_INT_ALL_MASK ((unsigned int)-1)
195 #define SDHCI_CTRL_HS400 0x0005 /* Non-standard */
242 #define SDHCI_SUPPORT_HS400 0x80000000 /* Non-standard */
251 /* 4C-4F reserved for more max current */
258 /* 55-57 reserved */
263 /* 60-FB reserved */
271 #define SDHCI_PRESET_FOR_HS400 0x74 /* Non-standard */
301 #define SDHCI_DEFAULT_BOUNDARY_ARG (ilog2(SDHCI_DEFAULT_BOUNDARY_SIZE) - 12)
303 /* ADMA2 32-bit DMA descriptor size */
306 /* ADMA2 32-bit descriptor */
315 #define SDHCI_ADMA2_MASK (SDHCI_ADMA2_ALIGN - 1)
319 * alignment for the descriptor table even in 32-bit DMA mode. Memory
325 * ADMA2 64-bit DMA descriptor size
327 * descriptors for 64-bit addressing mode: 96-bit Descriptor and 128-bit
329 * register, 128-bit Descriptor will be selected.
331 #define SDHCI_ADMA2_64_DESC_SZ(host) ((host)->v4_mode ? 16 : 12)
334 * ADMA2 64-bit descriptor. Note 12-byte descriptor can't always be 8-byte
367 mmc_debugfs_err_stats_inc((host)->mmc, MMC_ERR_##err_name)
383 /* Controller has bad caps bits, but really supports DMA */
393 /* Controller can only DMA from 32-bit aligned addresses */
407 /* Controller does not provide transfer-complete interrupt when not busy */
411 /* Controller reports inverted write-protect state */
421 /* Controller cannot do multi-block transfers */
423 /* Controller can only handle 1-bit data transfers */
435 /* Controller doesn't have HISPD bit field in HI-SPEED SD card */
439 /* The read-only detection via SDHCI_PRESENT_STATE register is unstable */
450 /* Controller has a non-standard host control register */
458 /* Controller does not support 64-bit DMA */
462 /* Capability register bit-63 indicates HS400 support */
480 * 32-bit block count may not support eMMC where upper bits of CMD23 are used
481 * for other purposes. Consequently we support 16-bit block count by default.
482 * Otherwise, SDHCI_QUIRK2_USE_32BIT_BLK_CNT can be selected to use 32-bit
519 #define SDHCI_USE_64_BIT_DMA (1<<12) /* Use 64-bit DMA */
534 u8 drv_type; /* Current UHS-I driver type */
535 bool reinit_uhs; /* Force UHS-related re-initialization */
569 unsigned int alloc_desc_sz; /* ADMA descr. max size host supports */
599 bool cqe_on; /* CQE is operating */
600 u32 cqe_ier; /* CQE interrupt mask */
601 u32 cqe_err_ier; /* CQE error interrupt mask */
606 unsigned int tuning_count; /* Timer count for re-tuning */
607 unsigned int tuning_mode; /* Re-tuning mode supported by host */
608 unsigned int tuning_err; /* Error code for re-tuning */
677 if (unlikely(host->ops->write_l)) in sdhci_writel()
678 host->ops->write_l(host, val, reg); in sdhci_writel()
680 writel(val, host->ioaddr + reg); in sdhci_writel()
685 if (unlikely(host->ops->write_w)) in sdhci_writew()
686 host->ops->write_w(host, val, reg); in sdhci_writew()
688 writew(val, host->ioaddr + reg); in sdhci_writew()
693 if (unlikely(host->ops->write_b)) in sdhci_writeb()
694 host->ops->write_b(host, val, reg); in sdhci_writeb()
696 writeb(val, host->ioaddr + reg); in sdhci_writeb()
701 if (unlikely(host->ops->read_l)) in sdhci_readl()
702 return host->ops->read_l(host, reg); in sdhci_readl()
704 return readl(host->ioaddr + reg); in sdhci_readl()
709 if (unlikely(host->ops->read_w)) in sdhci_readw()
710 return host->ops->read_w(host, reg); in sdhci_readw()
712 return readw(host->ioaddr + reg); in sdhci_readw()
717 if (unlikely(host->ops->read_b)) in sdhci_readb()
718 return host->ops->read_b(host, reg); in sdhci_readb()
720 return readb(host->ioaddr + reg); in sdhci_readb()
727 writel(val, host->ioaddr + reg); in sdhci_writel()
732 writew(val, host->ioaddr + reg); in sdhci_writew()
737 writeb(val, host->ioaddr + reg); in sdhci_writeb()
742 return readl(host->ioaddr + reg); in sdhci_readl()
747 return readw(host->ioaddr + reg); in sdhci_readw()
752 return readb(host->ioaddr + reg); in sdhci_readb()
762 return host->private; in sdhci_priv()