Lines Matching full:qup
343 struct spi_qup *qup = data; in spi_qup_dma_done() local
345 complete(&qup->done); in spi_qup_dma_done()
393 struct spi_qup *qup = spi_master_get_devdata(master); in spi_qup_prep_sg() local
409 desc->callback_param = qup; in spi_qup_prep_sg()
450 struct spi_qup *qup = spi_master_get_devdata(master); in spi_qup_do_dma() local
466 qup->n_words = spi_qup_sgl_get_nents_len(rx_sgl, in spi_qup_do_dma()
467 SPI_MAX_XFER, &rx_nents) / qup->w_size; in spi_qup_do_dma()
469 qup->n_words = spi_qup_sgl_get_nents_len(tx_sgl, in spi_qup_do_dma()
470 SPI_MAX_XFER, &tx_nents) / qup->w_size; in spi_qup_do_dma()
471 if (!qup->n_words) in spi_qup_do_dma()
478 /* before issuing the descriptors, set the QUP to run */ in spi_qup_do_dma()
479 ret = spi_qup_set_state(qup, QUP_STATE_RUN); in spi_qup_do_dma()
481 dev_warn(qup->dev, "cannot set RUN state\n"); in spi_qup_do_dma()
501 if (!wait_for_completion_timeout(&qup->done, timeout)) in spi_qup_do_dma()
518 struct spi_qup *qup = spi_master_get_devdata(master); in spi_qup_do_pio() local
521 n_words = qup->n_words; in spi_qup_do_pio()
523 qup->rx_buf = xfer->rx_buf; in spi_qup_do_pio()
524 qup->tx_buf = xfer->tx_buf; in spi_qup_do_pio()
528 qup->n_words = SPI_MAX_XFER; in spi_qup_do_pio()
530 qup->n_words = n_words % SPI_MAX_XFER; in spi_qup_do_pio()
532 if (qup->tx_buf && offset) in spi_qup_do_pio()
533 qup->tx_buf = xfer->tx_buf + offset * SPI_MAX_XFER; in spi_qup_do_pio()
535 if (qup->rx_buf && offset) in spi_qup_do_pio()
536 qup->rx_buf = xfer->rx_buf + offset * SPI_MAX_XFER; in spi_qup_do_pio()
542 if (qup->n_words <= (qup->in_fifo_sz / sizeof(u32))) in spi_qup_do_pio()
543 qup->mode = QUP_IO_M_MODE_FIFO; in spi_qup_do_pio()
549 ret = spi_qup_set_state(qup, QUP_STATE_RUN); in spi_qup_do_pio()
551 dev_warn(qup->dev, "cannot set RUN state\n"); in spi_qup_do_pio()
555 ret = spi_qup_set_state(qup, QUP_STATE_PAUSE); in spi_qup_do_pio()
557 dev_warn(qup->dev, "cannot set PAUSE state\n"); in spi_qup_do_pio()
561 if (qup->mode == QUP_IO_M_MODE_FIFO) in spi_qup_do_pio()
562 spi_qup_write(qup); in spi_qup_do_pio()
564 ret = spi_qup_set_state(qup, QUP_STATE_RUN); in spi_qup_do_pio()
566 dev_warn(qup->dev, "cannot set RUN state\n"); in spi_qup_do_pio()
570 if (!wait_for_completion_timeout(&qup->done, timeout)) in spi_qup_do_pio()
694 /* prep qup for another spi transaction of specific type */
891 struct spi_qup *qup = spi_master_get_devdata(master); in spi_qup_can_dma() local
899 if (qup->qup_v1 && (xfer->len % qup->in_blk_sz)) in spi_qup_can_dma()
907 if (qup->qup_v1 && (xfer->len % qup->out_blk_sz)) in spi_qup_can_dma()
912 if (n_words <= (qup->in_fifo_sz / sizeof(u32))) in spi_qup_can_dma()
1136 /* if earlier version of the QUP, disable INPUT_OVERRUN */ in spi_qup_probe()
1286 { .compatible = "qcom,spi-qup-v1.1.1", .data = (void *)1, },
1287 { .compatible = "qcom,spi-qup-v2.1.1", },
1288 { .compatible = "qcom,spi-qup-v2.2.1", },