Lines Matching refs:bam_txn

401 	struct bam_transaction *bam_txn;  member
569 struct bam_transaction *bam_txn = nandc->bam_txn; in free_bam_transaction() local
571 devm_kfree(nandc->dev, bam_txn); in free_bam_transaction()
578 struct bam_transaction *bam_txn; in alloc_bam_transaction() local
584 sizeof(*bam_txn) + num_cw * in alloc_bam_transaction()
585 ((sizeof(*bam_txn->bam_ce) * QPIC_PER_CW_CMD_ELEMENTS) + in alloc_bam_transaction()
586 (sizeof(*bam_txn->cmd_sgl) * QPIC_PER_CW_CMD_SGL) + in alloc_bam_transaction()
587 (sizeof(*bam_txn->data_sgl) * QPIC_PER_CW_DATA_SGL)); in alloc_bam_transaction()
593 bam_txn = bam_txn_buf; in alloc_bam_transaction()
594 bam_txn_buf += sizeof(*bam_txn); in alloc_bam_transaction()
596 bam_txn->bam_ce = bam_txn_buf; in alloc_bam_transaction()
598 sizeof(*bam_txn->bam_ce) * QPIC_PER_CW_CMD_ELEMENTS * num_cw; in alloc_bam_transaction()
600 bam_txn->cmd_sgl = bam_txn_buf; in alloc_bam_transaction()
602 sizeof(*bam_txn->cmd_sgl) * QPIC_PER_CW_CMD_SGL * num_cw; in alloc_bam_transaction()
604 bam_txn->data_sgl = bam_txn_buf; in alloc_bam_transaction()
606 init_completion(&bam_txn->txn_done); in alloc_bam_transaction()
608 return bam_txn; in alloc_bam_transaction()
614 struct bam_transaction *bam_txn = nandc->bam_txn; in clear_bam_transaction() local
619 bam_txn->bam_ce_pos = 0; in clear_bam_transaction()
620 bam_txn->bam_ce_start = 0; in clear_bam_transaction()
621 bam_txn->cmd_sgl_pos = 0; in clear_bam_transaction()
622 bam_txn->cmd_sgl_start = 0; in clear_bam_transaction()
623 bam_txn->tx_sgl_pos = 0; in clear_bam_transaction()
624 bam_txn->tx_sgl_start = 0; in clear_bam_transaction()
625 bam_txn->rx_sgl_pos = 0; in clear_bam_transaction()
626 bam_txn->rx_sgl_start = 0; in clear_bam_transaction()
627 bam_txn->last_data_desc = NULL; in clear_bam_transaction()
628 bam_txn->wait_second_completion = false; in clear_bam_transaction()
630 sg_init_table(bam_txn->cmd_sgl, nandc->max_cwperpage * in clear_bam_transaction()
632 sg_init_table(bam_txn->data_sgl, nandc->max_cwperpage * in clear_bam_transaction()
635 reinit_completion(&bam_txn->txn_done); in clear_bam_transaction()
641 struct bam_transaction *bam_txn = data; in qpic_bam_dma_done() local
650 if (bam_txn->wait_second_completion) in qpic_bam_dma_done()
651 bam_txn->wait_second_completion = false; in qpic_bam_dma_done()
653 complete(&bam_txn->txn_done); in qpic_bam_dma_done()
868 struct bam_transaction *bam_txn = nandc->bam_txn; in prepare_bam_async_desc() local
877 sgl = &bam_txn->cmd_sgl[bam_txn->cmd_sgl_start]; in prepare_bam_async_desc()
878 sgl_cnt = bam_txn->cmd_sgl_pos - bam_txn->cmd_sgl_start; in prepare_bam_async_desc()
879 bam_txn->cmd_sgl_start = bam_txn->cmd_sgl_pos; in prepare_bam_async_desc()
883 sgl = &bam_txn->data_sgl[bam_txn->tx_sgl_start]; in prepare_bam_async_desc()
884 sgl_cnt = bam_txn->tx_sgl_pos - bam_txn->tx_sgl_start; in prepare_bam_async_desc()
885 bam_txn->tx_sgl_start = bam_txn->tx_sgl_pos; in prepare_bam_async_desc()
889 sgl = &bam_txn->data_sgl[bam_txn->rx_sgl_start]; in prepare_bam_async_desc()
890 sgl_cnt = bam_txn->rx_sgl_pos - bam_txn->rx_sgl_start; in prepare_bam_async_desc()
891 bam_txn->rx_sgl_start = bam_txn->rx_sgl_pos; in prepare_bam_async_desc()
921 bam_txn->last_cmd_desc = dma_desc; in prepare_bam_async_desc()
923 bam_txn->last_data_desc = dma_desc; in prepare_bam_async_desc()
946 struct bam_transaction *bam_txn = nandc->bam_txn; in prep_bam_dma_desc_cmd() local
948 bam_ce_buffer = &bam_txn->bam_ce[bam_txn->bam_ce_pos]; in prep_bam_dma_desc_cmd()
965 bam_txn->bam_ce_pos += size; in prep_bam_dma_desc_cmd()
969 bam_ce_buffer = &bam_txn->bam_ce[bam_txn->bam_ce_start]; in prep_bam_dma_desc_cmd()
970 bam_ce_size = (bam_txn->bam_ce_pos - in prep_bam_dma_desc_cmd()
971 bam_txn->bam_ce_start) * in prep_bam_dma_desc_cmd()
973 sg_set_buf(&bam_txn->cmd_sgl[bam_txn->cmd_sgl_pos], in prep_bam_dma_desc_cmd()
975 bam_txn->cmd_sgl_pos++; in prep_bam_dma_desc_cmd()
976 bam_txn->bam_ce_start = bam_txn->bam_ce_pos; in prep_bam_dma_desc_cmd()
999 struct bam_transaction *bam_txn = nandc->bam_txn; in prep_bam_dma_desc_data() local
1002 sg_set_buf(&bam_txn->data_sgl[bam_txn->rx_sgl_pos], in prep_bam_dma_desc_data()
1004 bam_txn->rx_sgl_pos++; in prep_bam_dma_desc_data()
1006 sg_set_buf(&bam_txn->data_sgl[bam_txn->tx_sgl_pos], in prep_bam_dma_desc_data()
1008 bam_txn->tx_sgl_pos++; in prep_bam_dma_desc_data()
1311 struct bam_transaction *bam_txn = nandc->bam_txn; in submit_descs() local
1315 if (bam_txn->rx_sgl_pos > bam_txn->rx_sgl_start) { in submit_descs()
1321 if (bam_txn->tx_sgl_pos > bam_txn->tx_sgl_start) { in submit_descs()
1328 if (bam_txn->cmd_sgl_pos > bam_txn->cmd_sgl_start) { in submit_descs()
1340 bam_txn->last_cmd_desc->callback = qpic_bam_dma_done; in submit_descs()
1341 bam_txn->last_cmd_desc->callback_param = bam_txn; in submit_descs()
1342 if (bam_txn->last_data_desc) { in submit_descs()
1343 bam_txn->last_data_desc->callback = qpic_bam_dma_done; in submit_descs()
1344 bam_txn->last_data_desc->callback_param = bam_txn; in submit_descs()
1345 bam_txn->wait_second_completion = true; in submit_descs()
1352 if (!wait_for_completion_timeout(&bam_txn->txn_done, in submit_descs()
2466 nandc->bam_txn = alloc_bam_transaction(nandc); in qcom_nand_attach_chip()
2467 if (!nandc->bam_txn) { in qcom_nand_attach_chip()
3118 nandc->bam_txn = alloc_bam_transaction(nandc); in qcom_nandc_alloc()
3119 if (!nandc->bam_txn) { in qcom_nandc_alloc()