| /linux/drivers/mmc/host/ |
| H A D | bcm2835.c | 49 #include <linux/mmc/host.h> 61 #define SDHSTS 0x20 /* SD host status - 11 R/W */ 64 #define SDHCFG 0x38 /* Host configuration - 2 R/W */ 65 #define SDHBCT 0x3c /* Host byte count (debug) - 32 R/W */ 67 #define SDHBLC 0x50 /* Host block count (SDIO/SDHC) - 9 R/W */ 194 static void bcm2835_dumpcmd(struct bcm2835_host *host, struct mmc_command *cmd, in bcm2835_dumpcmd() argument 197 struct device *dev = &host->pdev->dev; in bcm2835_dumpcmd() 203 (cmd == host->cmd) ? '>' : ' ', in bcm2835_dumpcmd() 209 static void bcm2835_dumpregs(struct bcm2835_host *host) in bcm2835_dumpregs() argument 211 struct mmc_request *mrq = host->mrq; in bcm2835_dumpregs() [all …]
|
| H A D | dw_mmc.c | 31 #include <linux/mmc/host.h> 117 spin_lock_bh(&slot->host->lock); in dw_mci_req_show() 143 spin_unlock_bh(&slot->host->lock); in dw_mci_req_show() 151 struct dw_mci *host = s->private; in dw_mci_regs_show() local 153 pm_runtime_get_sync(host->dev); in dw_mci_regs_show() 155 seq_printf(s, "STATUS:\t0x%08x\n", mci_readl(host, STATUS)); in dw_mci_regs_show() 156 seq_printf(s, "RINTSTS:\t0x%08x\n", mci_readl(host, RINTSTS)); in dw_mci_regs_show() 157 seq_printf(s, "CMD:\t0x%08x\n", mci_readl(host, CMD)); in dw_mci_regs_show() 158 seq_printf(s, "CTRL:\t0x%08x\n", mci_readl(host, CTRL)); in dw_mci_regs_show() 159 seq_printf(s, "INTMASK:\t0x%08x\n", mci_readl(host, INTMASK)); in dw_mci_regs_show() [all …]
|
| H A D | mxcmmc.c | 3 * linux/drivers/mmc/host/mxcmmc.c - Freescale i.MX MMCI driver 25 #include <linux/mmc/host.h> 175 static inline int is_imx31_mmc(struct mxcmci_host *host) in is_imx31_mmc() argument 177 return host->devtype == IMX31_MMC; in is_imx31_mmc() 180 static inline int is_mpc512x_mmc(struct mxcmci_host *host) in is_mpc512x_mmc() argument 182 return host->devtype == MPC512X_MMC; in is_mpc512x_mmc() 185 static inline u32 mxcmci_readl(struct mxcmci_host *host, int reg) in mxcmci_readl() argument 188 return ioread32be(host->base + reg); in mxcmci_readl() 190 return readl(host->base + reg); in mxcmci_readl() 193 static inline void mxcmci_writel(struct mxcmci_host *host, u32 val, int reg) in mxcmci_writel() argument [all …]
|
| H A D | usdhi6rol0.c | 16 #include <linux/mmc/host.h> 209 static void usdhi6_write(struct usdhi6_host *host, u32 reg, u32 data) in usdhi6_write() argument 211 iowrite32(data, host->base + reg); in usdhi6_write() 212 dev_vdbg(mmc_dev(host->mmc), "%s(0x%p + 0x%x) = 0x%x\n", __func__, in usdhi6_write() 213 host->base, reg, data); in usdhi6_write() 216 static void usdhi6_write16(struct usdhi6_host *host, u32 reg, u16 data) in usdhi6_write16() argument 218 iowrite16(data, host->base + reg); in usdhi6_write16() 219 dev_vdbg(mmc_dev(host->mmc), "%s(0x%p + 0x%x) = 0x%x\n", __func__, in usdhi6_write16() 220 host->base, reg, data); in usdhi6_write16() 223 static u32 usdhi6_read(struct usdhi6_host *host, u32 reg) in usdhi6_read() argument [all …]
|
| H A D | wbsd.c | 3 * linux/drivers/mmc/host/wbsd.c - Winbond W83L51xD SD/MMC driver 30 #include <linux/mmc/host.h> 84 static inline void wbsd_unlock_config(struct wbsd_host *host) in wbsd_unlock_config() argument 86 BUG_ON(host->config == 0); in wbsd_unlock_config() 88 outb(host->unlock_code, host->config); in wbsd_unlock_config() 89 outb(host->unlock_code, host->config); in wbsd_unlock_config() 92 static inline void wbsd_lock_config(struct wbsd_host *host) in wbsd_lock_config() argument 94 BUG_ON(host->config == 0); in wbsd_lock_config() 96 outb(LOCK_CODE, host->config); in wbsd_lock_config() 99 static inline void wbsd_write_config(struct wbsd_host *host, u8 reg, u8 value) in wbsd_write_config() argument [all …]
|
| H A D | pxamci.c | 3 * linux/drivers/mmc/host/pxa.c - PXA MMCI driver 26 #include <linux/mmc/host.h> 76 static int pxamci_init_ocr(struct pxamci_host *host) in pxamci_init_ocr() argument 78 struct mmc_host *mmc = host->mmc; in pxamci_init_ocr() 87 mmc->ocr_avail = host->pdata ? in pxamci_init_ocr() 88 host->pdata->ocr_mask : in pxamci_init_ocr() 95 static inline int pxamci_set_power(struct pxamci_host *host, in pxamci_set_power() argument 99 struct mmc_host *mmc = host->mmc; in pxamci_set_power() 105 if (host->power) { in pxamci_set_power() 106 bool on = !!((1 << vdd) & host->pdata->ocr_mask); in pxamci_set_power() [all …]
|
| H A D | moxart-mmc.c | 2 * MOXA ART MMC host driver. 25 #include <linux/mmc/host.h> 151 static inline void moxart_init_sg(struct moxart_host *host, in moxart_init_sg() argument 154 host->cur_sg = data->sg; in moxart_init_sg() 155 host->num_sg = data->sg_len; in moxart_init_sg() 156 host->data_remain = host->cur_sg->length; in moxart_init_sg() 158 if (host->data_remain > host->data_len) in moxart_init_sg() 159 host->data_remain = host->data_len; in moxart_init_sg() 162 static inline int moxart_next_sg(struct moxart_host *host) in moxart_next_sg() argument 165 struct mmc_data *data = host->mrq->cmd->data; in moxart_next_sg() [all …]
|
| H A D | jz4740_mmc.c | 18 #include <linux/mmc/host.h> 189 static void jz4740_mmc_write_irq_mask(struct jz4740_mmc_host *host, in jz4740_mmc_write_irq_mask() argument 192 if (host->version >= JZ_MMC_JZ4725B) in jz4740_mmc_write_irq_mask() 193 return writel(val, host->base + JZ_REG_MMC_IMASK); in jz4740_mmc_write_irq_mask() 195 return writew(val, host->base + JZ_REG_MMC_IMASK); in jz4740_mmc_write_irq_mask() 198 static void jz4740_mmc_write_irq_reg(struct jz4740_mmc_host *host, in jz4740_mmc_write_irq_reg() argument 201 if (host->version >= JZ_MMC_JZ4780) in jz4740_mmc_write_irq_reg() 202 writel(val, host->base + JZ_REG_MMC_IREG); in jz4740_mmc_write_irq_reg() 204 writew(val, host->base + JZ_REG_MMC_IREG); in jz4740_mmc_write_irq_reg() 207 static uint32_t jz4740_mmc_read_irq_reg(struct jz4740_mmc_host *host) in jz4740_mmc_read_irq_reg() argument [all …]
|
| H A D | sunplus-mmc.c | 15 #include <linux/mmc/host.h> 176 static inline int spmmc_wait_finish(struct spmmc_host *host) in spmmc_wait_finish() argument 180 return readl_poll_timeout(host->base + SPMMC_SD_STATE_REG, state, in spmmc_wait_finish() 185 static inline int spmmc_wait_sdstatus(struct spmmc_host *host, unsigned int status_bit) in spmmc_wait_sdstatus() argument 189 return readl_poll_timeout(host->base + SPMMC_SD_STATUS_REG, status, in spmmc_wait_sdstatus() 194 #define spmmc_wait_rspbuf_full(host) spmmc_wait_sdstatus(host, SPMMC_SDSTATUS_RSP_BUF_FULL) argument 195 #define spmmc_wait_rxbuf_full(host) spmmc_wait_sdstatus(host, SPMMC_SDSTATUS_RX_DATA_BUF_FULL) argument 196 #define spmmc_wait_txbuf_empty(host) spmmc_wait_sdstatus(host, SPMMC_SDSTATUS_TX_DATA_BUF_EMPTY) argument 198 static void spmmc_get_rsp(struct spmmc_host *host, struct mmc_command *cmd) in spmmc_get_rsp() argument 205 if (spmmc_wait_rspbuf_full(host)) in spmmc_get_rsp() [all …]
|
| H A D | mmci_stm32_sdmmc.c | 10 #include <linux/mmc/host.h> 69 int (*tuning_prepare)(struct mmci_host *host); 81 static int sdmmc_idma_validate_data(struct mmci_host *host, in sdmmc_idma_validate_data() argument 84 struct sdmmc_idma *idma = host->dma_priv; in sdmmc_idma_validate_data() 85 struct device *dev = mmc_dev(host->mmc); in sdmmc_idma_validate_data() 97 host->variant->stm32_idmabsize_align)) { in sdmmc_idma_validate_data() 98 dev_dbg(mmc_dev(host->mmc), in sdmmc_idma_validate_data() 106 dev_dbg(mmc_dev(host->mmc), in sdmmc_idma_validate_data() 117 host->mmc->max_req_size, in sdmmc_idma_validate_data() 131 static int _sdmmc_idma_prep_data(struct mmci_host *host, in _sdmmc_idma_prep_data() argument [all …]
|
| H A D | uniphier-sd.c | 12 #include <linux/mmc/host.h> 82 static void *uniphier_sd_priv(struct tmio_mmc_host *host) in uniphier_sd_priv() argument 84 return container_of(host->pdata, struct uniphier_sd_priv, tmio_data); in uniphier_sd_priv() 87 static void uniphier_sd_dma_endisable(struct tmio_mmc_host *host, int enable) in uniphier_sd_dma_endisable() argument 89 sd_ctrl_write16(host, CTL_DMA_ENABLE, enable ? DMA_ENABLE_DMASDRW : 0); in uniphier_sd_dma_endisable() 95 struct tmio_mmc_host *host = from_work(host, t, dma_issue); in uniphier_sd_external_dma_issue() local 96 struct uniphier_sd_priv *priv = uniphier_sd_priv(host); in uniphier_sd_external_dma_issue() 98 uniphier_sd_dma_endisable(host, 1); in uniphier_sd_external_dma_issue() 105 struct tmio_mmc_host *host = param; in uniphier_sd_external_dma_callback() local 106 struct uniphier_sd_priv *priv = uniphier_sd_priv(host); in uniphier_sd_external_dma_callback() [all …]
|
| H A D | cavium-thunderx.c | 21 static void thunder_mmc_acquire_bus(struct cvm_mmc_host *host) in thunder_mmc_acquire_bus() argument 23 down(&host->mmc_serializer); in thunder_mmc_acquire_bus() 26 static void thunder_mmc_release_bus(struct cvm_mmc_host *host) in thunder_mmc_release_bus() argument 28 up(&host->mmc_serializer); in thunder_mmc_release_bus() 31 static void thunder_mmc_int_enable(struct cvm_mmc_host *host, u64 val) in thunder_mmc_int_enable() argument 33 writeq(val, host->base + MIO_EMM_INT(host)); in thunder_mmc_int_enable() 34 writeq(val, host->base + MIO_EMM_INT_EN_SET(host)); in thunder_mmc_int_enable() 37 static int thunder_mmc_register_interrupts(struct cvm_mmc_host *host, in thunder_mmc_register_interrupts() argument 50 0, cvm_mmc_irq_names[i], host); in thunder_mmc_register_interrupts() 63 struct cvm_mmc_host *host; in thunder_mmc_probe() local [all …]
|
| H A D | tifm_sd.c | 12 #include <linux/mmc/host.h> 112 /* for some reason, host won't respond correctly to readw/writew */ 113 static void tifm_sd_read_fifo(struct tifm_sd *host, struct page *pg, in tifm_sd_read_fifo() argument 116 struct tifm_dev *sock = host->dev; in tifm_sd_read_fifo() 121 if (host->cmd_flags & DATA_CARRY) { in tifm_sd_read_fifo() 122 buf[pos++] = host->bounce_buf_data[0]; in tifm_sd_read_fifo() 123 host->cmd_flags &= ~DATA_CARRY; in tifm_sd_read_fifo() 130 host->bounce_buf_data[0] = (val >> 8) & 0xff; in tifm_sd_read_fifo() 131 host->cmd_flags |= DATA_CARRY; in tifm_sd_read_fifo() 139 static void tifm_sd_write_fifo(struct tifm_sd *host, struct page *pg, in tifm_sd_write_fifo() argument [all …]
|
| H A D | sdhci-pci-gli.c | 306 static inline void gl9750_wt_on(struct sdhci_host *host) in gl9750_wt_on() argument 311 wt_value = sdhci_readl(host, SDHCI_GLI_9750_WT); in gl9750_wt_on() 320 sdhci_writel(host, wt_value, SDHCI_GLI_9750_WT); in gl9750_wt_on() 323 static inline void gl9750_wt_off(struct sdhci_host *host) in gl9750_wt_off() argument 328 wt_value = sdhci_readl(host, SDHCI_GLI_9750_WT); in gl9750_wt_off() 337 sdhci_writel(host, wt_value, SDHCI_GLI_9750_WT); in gl9750_wt_off() 340 static void gli_set_9750(struct sdhci_host *host) in gli_set_9750() argument 350 gl9750_wt_on(host); in gli_set_9750() 352 driving_value = sdhci_readl(host, SDHCI_GLI_9750_DRIVING); in gli_set_9750() 353 pll_value = sdhci_readl(host, SDHCI_GLI_9750_PLL); in gli_set_9750() [all …]
|
| H A D | meson-mx-sdhc-mmc.c | 3 * Amlogic Meson6/Meson8/Meson8b/Meson8m2 SDHC MMC host controller driver. 21 #include <linux/mmc/host.h> 68 static void meson_mx_sdhc_reset(struct meson_mx_sdhc_host *host) in meson_mx_sdhc_reset() argument 70 regmap_write(host->regmap, MESON_SDHC_SRST, MESON_SDHC_SRST_MAIN_CTRL | in meson_mx_sdhc_reset() 76 regmap_write(host->regmap, MESON_SDHC_SRST, 0); in meson_mx_sdhc_reset() 82 struct meson_mx_sdhc_host *host = mmc_priv(mmc); in meson_mx_sdhc_clear_fifo() local 85 regmap_read(host->regmap, MESON_SDHC_STAT, &stat); in meson_mx_sdhc_clear_fifo() 90 regmap_write(host->regmap, MESON_SDHC_SRST, MESON_SDHC_SRST_RXFIFO | in meson_mx_sdhc_clear_fifo() 94 regmap_read(host->regmap, MESON_SDHC_STAT, &stat); in meson_mx_sdhc_clear_fifo() 97 dev_warn(mmc_dev(host->mmc), in meson_mx_sdhc_clear_fifo() [all …]
|
| H A D | sdhci-of-dwcmshc.c | 3 * Driver for Synopsys DesignWare Cores Mobile Storage Host Controller 289 int (*init)(struct device *dev, struct sdhci_host *host, struct dwcmshc_priv *dwc_priv); 290 void (*postinit)(struct sdhci_host *host, struct dwcmshc_priv *dwc_priv); 293 static void dwcmshc_enable_card_clk(struct sdhci_host *host) in dwcmshc_enable_card_clk() argument 297 ctrl = sdhci_readw(host, SDHCI_CLOCK_CONTROL); in dwcmshc_enable_card_clk() 300 sdhci_writew(host, ctrl, SDHCI_CLOCK_CONTROL); in dwcmshc_enable_card_clk() 336 static void dwcmshc_adma_write_desc(struct sdhci_host *host, void **desc, in dwcmshc_adma_write_desc() argument 342 sdhci_adma_write_desc(host, desc, addr, len, cmd); in dwcmshc_adma_write_desc() 348 sdhci_adma_write_desc(host, desc, addr, tmplen, cmd); in dwcmshc_adma_write_desc() 352 sdhci_adma_write_desc(host, desc, addr, len, cmd); in dwcmshc_adma_write_desc() [all …]
|
| H A D | cavium.c | 44 * The Cavium MMC host hardware assumes that all commands have fixed 47 * response types that are unexpected by the host hardware. 165 static void check_switch_errors(struct cvm_mmc_host *host) in check_switch_errors() argument 169 emm_switch = readq(host->base + MIO_EMM_SWITCH(host)); in check_switch_errors() 171 dev_err(host->dev, "Switch power class error\n"); in check_switch_errors() 173 dev_err(host->dev, "Switch hs timing error\n"); in check_switch_errors() 175 dev_err(host->dev, "Switch bus width error\n"); in check_switch_errors() 200 static void do_switch(struct cvm_mmc_host *host, u64 emm_switch) in do_switch() argument 212 writeq(emm_switch, host->base + MIO_EMM_SWITCH(host)); in do_switch() 215 writeq(emm_switch, host->base + MIO_EMM_SWITCH(host)); in do_switch() [all …]
|
| H A D | litex_mmc.c | 23 #include <linux/mmc/host.h> 123 static int litex_mmc_send_cmd(struct litex_mmc_host *host, in litex_mmc_send_cmd() argument 126 struct device *dev = mmc_dev(host->mmc); in litex_mmc_send_cmd() 131 litex_write32(host->sdcore + LITEX_CORE_CMDARG, arg); in litex_mmc_send_cmd() 132 litex_write32(host->sdcore + LITEX_CORE_CMDCMD, in litex_mmc_send_cmd() 134 litex_write8(host->sdcore + LITEX_CORE_CMDSND, 1); in litex_mmc_send_cmd() 140 if (host->irq > 0 && in litex_mmc_send_cmd() 143 reinit_completion(&host->cmd_done); in litex_mmc_send_cmd() 144 litex_write32(host->sdirq + LITEX_IRQ_ENABLE, in litex_mmc_send_cmd() 146 wait_for_completion(&host->cmd_done); in litex_mmc_send_cmd() [all …]
|
| H A D | rtsx_pci_sdmmc.c | 17 #include <linux/mmc/host.h> 51 static inline struct device *sdmmc_dev(struct realtek_pci_sdmmc *host) in sdmmc_dev() argument 53 return &(host->pdev->dev); in sdmmc_dev() 56 static inline void sd_clear_error(struct realtek_pci_sdmmc *host) in sd_clear_error() argument 58 rtsx_pci_write_register(host->pcr, CARD_STOP, in sd_clear_error() 63 static void dump_reg_range(struct realtek_pci_sdmmc *host, u16 start, u16 end) in dump_reg_range() argument 75 rtsx_pci_read_register(host->pcr, start + i + j, in dump_reg_range() 77 dev_dbg(sdmmc_dev(host), "0x%04X(%d): %8ph\n", in dump_reg_range() 82 static void sd_print_debug_regs(struct realtek_pci_sdmmc *host) in sd_print_debug_regs() argument 84 dump_reg_range(host, 0xFDA0, 0xFDB3); in sd_print_debug_regs() [all …]
|
| /linux/drivers/memstick/host/ |
| H A D | jmb38x_ms.c | 154 static unsigned int jmb38x_ms_read_data(struct jmb38x_ms_host *host, in jmb38x_ms_read_data() argument 159 while (host->io_pos && length) { in jmb38x_ms_read_data() 160 buf[off++] = host->io_word[0] & 0xff; in jmb38x_ms_read_data() 161 host->io_word[0] >>= 8; in jmb38x_ms_read_data() 163 host->io_pos--; in jmb38x_ms_read_data() 169 while (!(STATUS_FIFO_EMPTY & readl(host->addr + STATUS))) { in jmb38x_ms_read_data() 172 *(unsigned int *)(buf + off) = __raw_readl(host->addr + DATA); in jmb38x_ms_read_data() 178 && !(STATUS_FIFO_EMPTY & readl(host->addr + STATUS))) { in jmb38x_ms_read_data() 179 host->io_word[0] = readl(host->addr + DATA); in jmb38x_ms_read_data() 180 for (host->io_pos = 4; host->io_pos; --host->io_pos) { in jmb38x_ms_read_data() [all …]
|
| H A D | tifm_ms.c | 82 static unsigned int tifm_ms_read_data(struct tifm_ms *host, in tifm_ms_read_data() argument 85 struct tifm_dev *sock = host->dev; in tifm_ms_read_data() 88 while (host->io_pos && length) { in tifm_ms_read_data() 89 buf[off++] = host->io_word & 0xff; in tifm_ms_read_data() 90 host->io_word >>= 8; in tifm_ms_read_data() 92 host->io_pos--; in tifm_ms_read_data() 109 host->io_word = readl(sock->addr + SOCK_MS_DATA); in tifm_ms_read_data() 110 for (host->io_pos = 4; host->io_pos; --host->io_pos) { in tifm_ms_read_data() 111 buf[off++] = host->io_word & 0xff; in tifm_ms_read_data() 112 host->io_word >>= 8; in tifm_ms_read_data() [all …]
|
| /linux/fs/lockd/ |
| H A D | host.c | 3 * linux/fs/lockd/host.c 37 #define for_each_host(host, chain, table) \ argument 40 hlist_for_each_entry((host), (chain), h_hash) 42 #define for_each_host_safe(host, next, chain, table) \ argument 45 hlist_for_each_entry_safe((host), (next), \ 114 struct nlm_host *host = NULL; in nlm_alloc_host() local 129 host = kmalloc_obj(*host); in nlm_alloc_host() 130 if (unlikely(host == NULL)) { in nlm_alloc_host() 136 memcpy(nlm_addr(host), ni->sap, ni->salen); in nlm_alloc_host() 137 host->h_addrlen = ni->salen; in nlm_alloc_host() [all …]
|
| /linux/drivers/mtd/nand/raw/ |
| H A D | hisi504_nand.c | 144 static inline unsigned int hinfc_read(struct hinfc_host *host, unsigned int reg) in hinfc_read() argument 146 return readl(host->iobase + reg); in hinfc_read() 149 static inline void hinfc_write(struct hinfc_host *host, unsigned int value, in hinfc_write() argument 152 writel(value, host->iobase + reg); in hinfc_write() 155 static void wait_controller_finished(struct hinfc_host *host) in wait_controller_finished() argument 161 val = hinfc_read(host, HINFC504_STATUS); in wait_controller_finished() 162 if (host->command == NAND_CMD_ERASE2) { in wait_controller_finished() 166 val = hinfc_read(host, HINFC504_STATUS); in wait_controller_finished() 176 dev_err(host->dev, "Wait NAND controller exec cmd timeout.\n"); in wait_controller_finished() 179 static void hisi_nfc_dma_transfer(struct hinfc_host *host, int todev) in hisi_nfc_dma_transfer() argument [all …]
|
| /linux/drivers/memstick/core/ |
| H A D | memstick.c | 179 struct memstick_host *host = container_of(dev, struct memstick_host, in memstick_free() local 181 kfree(host); in memstick_free() 202 * memstick_detect_change - schedule media detection on memstick host 203 * @host: host to use 205 void memstick_detect_change(struct memstick_host *host) in memstick_detect_change() argument 207 queue_work(workqueue, &host->media_checker); in memstick_detect_change() 212 * memstick_next_req - called by host driver to obtain next request to process 213 * @host: host to use 216 * Host calls this function from idle state (*mrq == NULL) or after finishing 220 * Returns: value of 0 means that new request was assigned to the host. [all …]
|
| /linux/drivers/gpu/host1x/ |
| H A D | dev.h | 33 int (*init)(struct host1x_channel *channel, struct host1x *host, 56 void (*show_channel_cdma)(struct host1x *host, 59 void (*show_channel_fifo)(struct host1x *host, 62 void (*show_mlocks)(struct host1x *host, struct output *output); 74 void (*enable_protection)(struct host1x *host); 78 int (*init_host_sync)(struct host1x *host, u32 cpm); 80 struct host1x *host, unsigned int id, u32 thresh); 81 void (*enable_syncpt_intr)(struct host1x *host, unsigned int id); 82 void (*disable_syncpt_intr)(struct host1x *host, unsigned int id); 83 void (*disable_all_syncpt_intrs)(struct host1x *host); [all …]
|