Lines Matching refs:op
141 const struct spi_mem_op *op) in _stm32_qspi_wait_cmd() argument
177 const struct spi_mem_op *op) in _stm32_qspi_poll() argument
180 u32 len = op->data.nbytes, sr; in _stm32_qspi_poll()
184 if (op->data.dir == SPI_MEM_DATA_IN) { in _stm32_qspi_poll()
186 buf = op->data.buf.in; in _stm32_qspi_poll()
190 buf = (u8 *)op->data.buf.out; in _stm32_qspi_poll()
209 const struct spi_mem_op *op) in stm32_qspi_mm() argument
211 memcpy_fromio(op->data.buf.in, priv->mm_base + op->addr.val, in stm32_qspi_mm()
212 op->data.nbytes); in stm32_qspi_mm()
218 const struct spi_mem_op *op, in _stm32_qspi_tx() argument
221 if (!op->data.nbytes) in _stm32_qspi_tx()
225 return stm32_qspi_mm(priv, op); in _stm32_qspi_tx()
227 return _stm32_qspi_poll(priv, op); in _stm32_qspi_tx()
239 const struct spi_mem_op *op) in stm32_qspi_exec_op() argument
247 op->cmd.opcode, op->cmd.buswidth, op->addr.buswidth, in stm32_qspi_exec_op()
248 op->dummy.buswidth, op->data.buswidth, in stm32_qspi_exec_op()
249 op->addr.val, op->data.nbytes); in stm32_qspi_exec_op()
251 addr_max = op->addr.val + op->data.nbytes + 1; in stm32_qspi_exec_op()
253 if (op->data.dir == SPI_MEM_DATA_IN && op->data.nbytes) { in stm32_qspi_exec_op()
254 if (addr_max < priv->mm_size && op->addr.buswidth) in stm32_qspi_exec_op()
260 if (op->data.nbytes) in stm32_qspi_exec_op()
261 writel(op->data.nbytes - 1, &priv->regs->dlr); in stm32_qspi_exec_op()
264 ccr |= op->cmd.opcode; in stm32_qspi_exec_op()
265 ccr |= (_stm32_qspi_get_mode(op->cmd.buswidth) in stm32_qspi_exec_op()
268 if (op->addr.nbytes) { in stm32_qspi_exec_op()
269 ccr |= ((op->addr.nbytes - 1) << STM32_QSPI_CCR_ADSIZE_SHIFT); in stm32_qspi_exec_op()
270 ccr |= (_stm32_qspi_get_mode(op->addr.buswidth) in stm32_qspi_exec_op()
274 if (op->dummy.buswidth && op->dummy.nbytes) in stm32_qspi_exec_op()
275 ccr |= (op->dummy.nbytes * 8 / op->dummy.buswidth in stm32_qspi_exec_op()
278 if (op->data.nbytes) in stm32_qspi_exec_op()
279 ccr |= (_stm32_qspi_get_mode(op->data.buswidth) in stm32_qspi_exec_op()
284 if (op->addr.nbytes && mode != STM32_QSPI_CCR_MEM_MAP) in stm32_qspi_exec_op()
285 writel(op->addr.val, &priv->regs->ar); in stm32_qspi_exec_op()
287 ret = _stm32_qspi_tx(priv, op, mode); in stm32_qspi_exec_op()
299 ret = _stm32_qspi_wait_cmd(priv, op); in stm32_qspi_exec_op()