Lines Matching refs:bam_txn
397 struct bam_transaction *bam_txn; member
481 struct bam_transaction *bam_txn = nandc->bam_txn; in free_bam_transaction() local
483 devm_kfree(nandc->dev, bam_txn); in free_bam_transaction()
490 struct bam_transaction *bam_txn; in alloc_bam_transaction() local
496 sizeof(*bam_txn) + num_cw * in alloc_bam_transaction()
497 ((sizeof(*bam_txn->bam_ce) * QPIC_PER_CW_CMD_ELEMENTS) + in alloc_bam_transaction()
498 (sizeof(*bam_txn->cmd_sgl) * QPIC_PER_CW_CMD_SGL) + in alloc_bam_transaction()
499 (sizeof(*bam_txn->data_sgl) * QPIC_PER_CW_DATA_SGL)); in alloc_bam_transaction()
505 bam_txn = bam_txn_buf; in alloc_bam_transaction()
506 bam_txn_buf += sizeof(*bam_txn); in alloc_bam_transaction()
508 bam_txn->bam_ce = bam_txn_buf; in alloc_bam_transaction()
510 sizeof(*bam_txn->bam_ce) * QPIC_PER_CW_CMD_ELEMENTS * num_cw; in alloc_bam_transaction()
512 bam_txn->cmd_sgl = bam_txn_buf; in alloc_bam_transaction()
514 sizeof(*bam_txn->cmd_sgl) * QPIC_PER_CW_CMD_SGL * num_cw; in alloc_bam_transaction()
516 bam_txn->data_sgl = bam_txn_buf; in alloc_bam_transaction()
518 init_completion(&bam_txn->txn_done); in alloc_bam_transaction()
520 return bam_txn; in alloc_bam_transaction()
526 struct bam_transaction *bam_txn = nandc->bam_txn; in clear_bam_transaction() local
531 bam_txn->bam_ce_pos = 0; in clear_bam_transaction()
532 bam_txn->bam_ce_start = 0; in clear_bam_transaction()
533 bam_txn->cmd_sgl_pos = 0; in clear_bam_transaction()
534 bam_txn->cmd_sgl_start = 0; in clear_bam_transaction()
535 bam_txn->tx_sgl_pos = 0; in clear_bam_transaction()
536 bam_txn->tx_sgl_start = 0; in clear_bam_transaction()
537 bam_txn->rx_sgl_pos = 0; in clear_bam_transaction()
538 bam_txn->rx_sgl_start = 0; in clear_bam_transaction()
539 bam_txn->last_data_desc = NULL; in clear_bam_transaction()
540 bam_txn->wait_second_completion = false; in clear_bam_transaction()
542 sg_init_table(bam_txn->cmd_sgl, nandc->max_cwperpage * in clear_bam_transaction()
544 sg_init_table(bam_txn->data_sgl, nandc->max_cwperpage * in clear_bam_transaction()
547 reinit_completion(&bam_txn->txn_done); in clear_bam_transaction()
553 struct bam_transaction *bam_txn = data; in qpic_bam_dma_done() local
562 if (bam_txn->wait_second_completion) in qpic_bam_dma_done()
563 bam_txn->wait_second_completion = false; in qpic_bam_dma_done()
565 complete(&bam_txn->txn_done); in qpic_bam_dma_done()
743 struct bam_transaction *bam_txn = nandc->bam_txn; in prepare_bam_async_desc() local
752 sgl = &bam_txn->cmd_sgl[bam_txn->cmd_sgl_start]; in prepare_bam_async_desc()
753 sgl_cnt = bam_txn->cmd_sgl_pos - bam_txn->cmd_sgl_start; in prepare_bam_async_desc()
754 bam_txn->cmd_sgl_start = bam_txn->cmd_sgl_pos; in prepare_bam_async_desc()
758 sgl = &bam_txn->data_sgl[bam_txn->tx_sgl_start]; in prepare_bam_async_desc()
759 sgl_cnt = bam_txn->tx_sgl_pos - bam_txn->tx_sgl_start; in prepare_bam_async_desc()
760 bam_txn->tx_sgl_start = bam_txn->tx_sgl_pos; in prepare_bam_async_desc()
764 sgl = &bam_txn->data_sgl[bam_txn->rx_sgl_start]; in prepare_bam_async_desc()
765 sgl_cnt = bam_txn->rx_sgl_pos - bam_txn->rx_sgl_start; in prepare_bam_async_desc()
766 bam_txn->rx_sgl_start = bam_txn->rx_sgl_pos; in prepare_bam_async_desc()
796 bam_txn->last_cmd_desc = dma_desc; in prepare_bam_async_desc()
798 bam_txn->last_data_desc = dma_desc; in prepare_bam_async_desc()
821 struct bam_transaction *bam_txn = nandc->bam_txn; in prep_bam_dma_desc_cmd() local
823 bam_ce_buffer = &bam_txn->bam_ce[bam_txn->bam_ce_pos]; in prep_bam_dma_desc_cmd()
840 bam_txn->bam_ce_pos += size; in prep_bam_dma_desc_cmd()
844 bam_ce_buffer = &bam_txn->bam_ce[bam_txn->bam_ce_start]; in prep_bam_dma_desc_cmd()
845 bam_ce_size = (bam_txn->bam_ce_pos - in prep_bam_dma_desc_cmd()
846 bam_txn->bam_ce_start) * in prep_bam_dma_desc_cmd()
848 sg_set_buf(&bam_txn->cmd_sgl[bam_txn->cmd_sgl_pos], in prep_bam_dma_desc_cmd()
850 bam_txn->cmd_sgl_pos++; in prep_bam_dma_desc_cmd()
851 bam_txn->bam_ce_start = bam_txn->bam_ce_pos; in prep_bam_dma_desc_cmd()
874 struct bam_transaction *bam_txn = nandc->bam_txn; in prep_bam_dma_desc_data() local
877 sg_set_buf(&bam_txn->data_sgl[bam_txn->rx_sgl_pos], in prep_bam_dma_desc_data()
879 bam_txn->rx_sgl_pos++; in prep_bam_dma_desc_data()
881 sg_set_buf(&bam_txn->data_sgl[bam_txn->tx_sgl_pos], in prep_bam_dma_desc_data()
883 bam_txn->tx_sgl_pos++; in prep_bam_dma_desc_data()
1295 struct bam_transaction *bam_txn = nandc->bam_txn; in submit_descs() local
1299 if (bam_txn->rx_sgl_pos > bam_txn->rx_sgl_start) { in submit_descs()
1305 if (bam_txn->tx_sgl_pos > bam_txn->tx_sgl_start) { in submit_descs()
1312 if (bam_txn->cmd_sgl_pos > bam_txn->cmd_sgl_start) { in submit_descs()
1324 bam_txn->last_cmd_desc->callback = qpic_bam_dma_done; in submit_descs()
1325 bam_txn->last_cmd_desc->callback_param = bam_txn; in submit_descs()
1326 if (bam_txn->last_data_desc) { in submit_descs()
1327 bam_txn->last_data_desc->callback = qpic_bam_dma_done; in submit_descs()
1328 bam_txn->last_data_desc->callback_param = bam_txn; in submit_descs()
1329 bam_txn->wait_second_completion = true; in submit_descs()
1336 if (!wait_for_completion_timeout(&bam_txn->txn_done, in submit_descs()
2717 nandc->bam_txn = alloc_bam_transaction(nandc); in qcom_nandc_alloc()
2718 if (!nandc->bam_txn) { in qcom_nandc_alloc()
2858 nandc->bam_txn = alloc_bam_transaction(nandc); in qcom_probe_nand_devices()
2859 if (!nandc->bam_txn) { in qcom_probe_nand_devices()