Lines Matching refs:op

80 #define SPIFC_A1_USER_CMD(op) ( \  argument
82 FIELD_PREP(SPIFC_A1_USER_CMD_CODE, (op)->cmd.opcode) | \
83 FIELD_PREP(SPIFC_A1_USER_CMD_MODE, ilog2((op)->cmd.buswidth)))
85 #define SPIFC_A1_USER_ADDR(op) ( \ argument
87 FIELD_PREP(SPIFC_A1_USER_ADDR_MODE, ilog2((op)->addr.buswidth)) | \
88 FIELD_PREP(SPIFC_A1_USER_ADDR_BYTES, (op)->addr.nbytes - 1))
90 #define SPIFC_A1_USER_DUMMY(op) ( \ argument
92 FIELD_PREP(SPIFC_A1_USER_DUMMY_MODE, ilog2((op)->dummy.buswidth)) | \
93 FIELD_PREP(SPIFC_A1_USER_DUMMY_CLK_SYCLES, (op)->dummy.nbytes << 3))
255 const struct spi_mem_op *op) in amlogic_spifc_a1_exec_op() argument
259 size_t data_size = op->data.nbytes; in amlogic_spifc_a1_exec_op()
267 amlogic_spifc_a1_set_cmd(spifc, SPIFC_A1_USER_CMD(op)); in amlogic_spifc_a1_exec_op()
269 if (op->addr.nbytes) in amlogic_spifc_a1_exec_op()
270 amlogic_spifc_a1_set_addr(spifc, op->addr.val, in amlogic_spifc_a1_exec_op()
271 SPIFC_A1_USER_ADDR(op)); in amlogic_spifc_a1_exec_op()
273 if (op->dummy.nbytes) in amlogic_spifc_a1_exec_op()
274 amlogic_spifc_a1_set_dummy(spifc, SPIFC_A1_USER_DUMMY(op)); in amlogic_spifc_a1_exec_op()
277 u32 mode = ilog2(op->data.buswidth); in amlogic_spifc_a1_exec_op()
281 if (op->data.dir == SPI_MEM_DATA_IN) in amlogic_spifc_a1_exec_op()
282 ret = amlogic_spifc_a1_read(spifc, op->data.buf.in, in amlogic_spifc_a1_exec_op()
285 ret = amlogic_spifc_a1_write(spifc, op->data.buf.out, in amlogic_spifc_a1_exec_op()
295 struct spi_mem_op *op) in amlogic_spifc_a1_adjust_op_size() argument
297 op->data.nbytes = min(op->data.nbytes, SPIFC_A1_BUFFER_SIZE); in amlogic_spifc_a1_adjust_op_size()