• Home
  • Raw
  • Download

Lines Matching +full:host +full:- +full:only

1 /* SPDX-License-Identifier: GPL-2.0 */
7 * Copyright (C) 2015-19 Renesas Electronics Corporation
8 * Copyright (C) 2016-19 Sang Engineering, Wolfram Sang
9 * Copyright (C) 2016-17 Horms Solutions, Simon Horman
70 #define TMIO_STAT_DAT0 BIT(23) /* only known on R-Car so far */
73 #define TMIO_STAT_ALWAYS_SET_27 BIT(27) /* only known on R-Car 2+ so far */
74 #define TMIO_STAT_ILL_FUNC BIT(29) /* only when !TMIO_MMC_HAS_IDLE_WAIT */
75 #define TMIO_STAT_SCLKDIVEN BIT(29) /* only when TMIO_MMC_HAS_IDLE_WAIT */
114 void (*start)(struct tmio_mmc_host *host, struct mmc_data *data);
115 void (*enable)(struct tmio_mmc_host *host, bool enable);
116 void (*request)(struct tmio_mmc_host *host,
118 void (*release)(struct tmio_mmc_host *host);
119 void (*abort)(struct tmio_mmc_host *host);
120 void (*dataend)(struct tmio_mmc_host *host);
123 void (*end)(struct tmio_mmc_host *host); /* held host->lock */
135 void (*set_pwr)(struct platform_device *host, int state);
166 spinlock_t lock; /* protect host private data */
173 int (*clk_enable)(struct tmio_mmc_host *host);
174 void (*set_clock)(struct tmio_mmc_host *host, unsigned int clock);
177 void (*clk_disable)(struct tmio_mmc_host *host);
180 int (*write16_hook)(struct tmio_mmc_host *host, int addr);
181 void (*reset)(struct tmio_mmc_host *host);
182 bool (*check_retune)(struct tmio_mmc_host *host);
183 void (*fixup_request)(struct tmio_mmc_host *host, struct mmc_request *mrq);
185 void (*prepare_hs400_tuning)(struct tmio_mmc_host *host);
186 void (*hs400_downgrade)(struct tmio_mmc_host *host);
187 void (*hs400_complete)(struct tmio_mmc_host *host);
194 void tmio_mmc_host_free(struct tmio_mmc_host *host);
195 int tmio_mmc_host_probe(struct tmio_mmc_host *host);
196 void tmio_mmc_host_remove(struct tmio_mmc_host *host);
197 void tmio_mmc_do_data_irq(struct tmio_mmc_host *host);
199 void tmio_mmc_enable_mmc_irqs(struct tmio_mmc_host *host, u32 i);
200 void tmio_mmc_disable_mmc_irqs(struct tmio_mmc_host *host, u32 i);
207 return kmap_atomic(sg_page(sg)) + sg->offset; in tmio_mmc_kmap_atomic()
213 kunmap_atomic(virt - sg->offset); in tmio_mmc_kunmap_atomic()
222 static inline u16 sd_ctrl_read16(struct tmio_mmc_host *host, int addr) in sd_ctrl_read16() argument
224 return ioread16(host->ctl + (addr << host->bus_shift)); in sd_ctrl_read16()
227 static inline void sd_ctrl_read16_rep(struct tmio_mmc_host *host, int addr, in sd_ctrl_read16_rep() argument
230 ioread16_rep(host->ctl + (addr << host->bus_shift), buf, count); in sd_ctrl_read16_rep()
233 static inline u32 sd_ctrl_read16_and_16_as_32(struct tmio_mmc_host *host, in sd_ctrl_read16_and_16_as_32() argument
236 return ioread16(host->ctl + (addr << host->bus_shift)) | in sd_ctrl_read16_and_16_as_32()
237 ioread16(host->ctl + ((addr + 2) << host->bus_shift)) << 16; in sd_ctrl_read16_and_16_as_32()
240 static inline void sd_ctrl_read32_rep(struct tmio_mmc_host *host, int addr, in sd_ctrl_read32_rep() argument
243 ioread32_rep(host->ctl + (addr << host->bus_shift), buf, count); in sd_ctrl_read32_rep()
246 static inline void sd_ctrl_write16(struct tmio_mmc_host *host, int addr, in sd_ctrl_write16() argument
249 /* If there is a hook and it returns non-zero then there in sd_ctrl_write16()
252 if (host->write16_hook && host->write16_hook(host, addr)) in sd_ctrl_write16()
254 iowrite16(val, host->ctl + (addr << host->bus_shift)); in sd_ctrl_write16()
257 static inline void sd_ctrl_write16_rep(struct tmio_mmc_host *host, int addr, in sd_ctrl_write16_rep() argument
260 iowrite16_rep(host->ctl + (addr << host->bus_shift), buf, count); in sd_ctrl_write16_rep()
263 static inline void sd_ctrl_write32_as_16_and_16(struct tmio_mmc_host *host, in sd_ctrl_write32_as_16_and_16() argument
267 val |= host->sdcard_irq_setbit_mask; in sd_ctrl_write32_as_16_and_16()
269 iowrite16(val & 0xffff, host->ctl + (addr << host->bus_shift)); in sd_ctrl_write32_as_16_and_16()
270 iowrite16(val >> 16, host->ctl + ((addr + 2) << host->bus_shift)); in sd_ctrl_write32_as_16_and_16()
273 static inline void sd_ctrl_write32(struct tmio_mmc_host *host, int addr, u32 val) in sd_ctrl_write32() argument
275 iowrite32(val, host->ctl + (addr << host->bus_shift)); in sd_ctrl_write32()
278 static inline void sd_ctrl_write32_rep(struct tmio_mmc_host *host, int addr, in sd_ctrl_write32_rep() argument
281 iowrite32_rep(host->ctl + (addr << host->bus_shift), buf, count); in sd_ctrl_write32_rep()