Lines Matching refs:cmdq_data
98 struct spi_it8xxx2_cmdq_data cmdq_data; member
228 data->cmdq_data.command.fields.cs_active = 1; in spi_it8xxx2_tx()
230 data->cmdq_data.command.fields.cs_active = 0; in spi_it8xxx2_tx()
232 data->cmdq_data.command.fields.cmd_end = 1; in spi_it8xxx2_tx()
233 data->cmdq_data.command.fields.read_write = 0; in spi_it8xxx2_tx()
235 data->cmdq_data.spi_write_cmd_length = ctx->tx_len; in spi_it8xxx2_tx()
236 memcpy(data->cmdq_data.write_data, ctx->tx_buf, ctx->tx_len); in spi_it8xxx2_tx()
237 data->cmdq_data.data_length_lb = 0; in spi_it8xxx2_tx()
238 data->cmdq_data.data_length_hb = 0; in spi_it8xxx2_tx()
239 data->cmdq_data.data_addr_lb = 0; in spi_it8xxx2_tx()
240 data->cmdq_data.data_addr_hb = 0; in spi_it8xxx2_tx()
242 data->cmdq_data.spi_write_cmd_length = SPI_CMDQ_WR_CMD_LEN_MAX; in spi_it8xxx2_tx()
243 memcpy(data->cmdq_data.write_data, ctx->tx_buf, SPI_CMDQ_WR_CMD_LEN_MAX); in spi_it8xxx2_tx()
244 data->cmdq_data.data_length_lb = BYTE_0(ctx->tx_len - SPI_CMDQ_WR_CMD_LEN_MAX); in spi_it8xxx2_tx()
245 data->cmdq_data.data_length_hb = BYTE_1(ctx->tx_len - SPI_CMDQ_WR_CMD_LEN_MAX); in spi_it8xxx2_tx()
247 data->cmdq_data.data_addr_lb = BYTE_0(mem_address); in spi_it8xxx2_tx()
248 data->cmdq_data.data_addr_hb = BYTE_1(mem_address); in spi_it8xxx2_tx()
249 data->cmdq_data.check_bit_mask |= ((BYTE_2(mem_address)) & 0x03); in spi_it8xxx2_tx()
260 data->cmdq_data.command.fields.cs_active = 1; in spi_it8xxx2_rx()
262 data->cmdq_data.command.fields.cs_active = 0; in spi_it8xxx2_rx()
264 data->cmdq_data.command.fields.cmd_end = 1; in spi_it8xxx2_rx()
265 data->cmdq_data.command.fields.read_write = 1; in spi_it8xxx2_rx()
266 data->cmdq_data.spi_write_cmd_length = 0; in spi_it8xxx2_rx()
267 data->cmdq_data.data_length_lb = BYTE_0(ctx->rx_len); in spi_it8xxx2_rx()
268 data->cmdq_data.data_length_hb = BYTE_1(ctx->rx_len); in spi_it8xxx2_rx()
269 data->cmdq_data.data_addr_lb = 0; in spi_it8xxx2_rx()
270 data->cmdq_data.data_addr_hb = 0; in spi_it8xxx2_rx()
280 data->cmdq_data.command.fields.cmd_end = 1; in spi_it8xxx2_tx_rx()
282 data->cmdq_data.command.fields.cs_active = 0; in spi_it8xxx2_tx_rx()
283 data->cmdq_data.command.fields.read_write = 1; in spi_it8xxx2_tx_rx()
284 data->cmdq_data.spi_write_cmd_length = ctx->tx_len; in spi_it8xxx2_tx_rx()
285 memcpy(data->cmdq_data.write_data, ctx->tx_buf, ctx->tx_len); in spi_it8xxx2_tx_rx()
291 data->cmdq_data.data_length_lb = BYTE_0(ctx->rx_len); in spi_it8xxx2_tx_rx()
292 data->cmdq_data.data_length_hb = BYTE_1(ctx->rx_len); in spi_it8xxx2_tx_rx()
293 data->cmdq_data.data_addr_lb = 0; in spi_it8xxx2_tx_rx()
294 data->cmdq_data.data_addr_hb = 0; in spi_it8xxx2_tx_rx()
298 data->cmdq_data.command.fields.cs_active = 1; in spi_it8xxx2_tx_rx()
299 data->cmdq_data.command.fields.read_write = 0; in spi_it8xxx2_tx_rx()
300 data->cmdq_data.spi_write_cmd_length = SPI_CMDQ_WR_CMD_LEN_MAX; in spi_it8xxx2_tx_rx()
301 memcpy(data->cmdq_data.write_data, ctx->tx_buf, SPI_CMDQ_WR_CMD_LEN_MAX); in spi_it8xxx2_tx_rx()
302 data->cmdq_data.data_length_lb = BYTE_0(ctx->tx_len - SPI_CMDQ_WR_CMD_LEN_MAX); in spi_it8xxx2_tx_rx()
303 data->cmdq_data.data_length_hb = BYTE_1(ctx->tx_len - SPI_CMDQ_WR_CMD_LEN_MAX); in spi_it8xxx2_tx_rx()
306 data->cmdq_data.data_addr_lb = BYTE_0(mem_address); in spi_it8xxx2_tx_rx()
307 data->cmdq_data.data_addr_hb = BYTE_1(mem_address); in spi_it8xxx2_tx_rx()
308 data->cmdq_data.check_bit_mask |= ((BYTE_2(mem_address)) & 0x03); in spi_it8xxx2_tx_rx()
339 memset(&data->cmdq_data, 0, sizeof(struct spi_it8xxx2_cmdq_data)); in spi_it8xxx2_next_xfer()
352 cmd_address = (uint32_t)(&data->cmdq_data) - SRAM_BASE_ADDR; in spi_it8xxx2_next_xfer()