Lines Matching full:ac

451 	struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev);  in artpec6_crypto_busy()  local
452 int fifo_count = ac->pending_count; in artpec6_crypto_busy()
459 struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev); in artpec6_crypto_submit() local
462 spin_lock_bh(&ac->queue_lock); in artpec6_crypto_submit()
465 list_add_tail(&req->list, &ac->pending); in artpec6_crypto_submit()
469 list_add_tail(&req->list, &ac->queue); in artpec6_crypto_submit()
474 spin_unlock_bh(&ac->queue_lock); in artpec6_crypto_submit()
481 struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev); in artpec6_crypto_start_dma() local
482 enum artpec6_crypto_variant variant = ac->variant; in artpec6_crypto_start_dma()
483 void __iomem *base = ac->base; in artpec6_crypto_start_dma()
512 ac->pending_count++; in artpec6_crypto_start_dma()
1045 struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev); in artpec6_crypto_common_init() local
1051 common->dma = kmem_cache_alloc(ac->dma_cache, flags); in artpec6_crypto_common_init()
1074 struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev); in artpec6_crypto_common_destroy() local
1078 kmem_cache_free(ac->dma_cache, common->dma); in artpec6_crypto_common_destroy()
1317 struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev); in artpec6_crypto_prepare_hash() local
1318 enum artpec6_crypto_variant variant = ac->variant; in artpec6_crypto_prepare_hash()
1386 error = artpec6_crypto_setup_in_descr(common, ac->pad_buffer, 4, false); in artpec6_crypto_prepare_hash()
1672 struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev); in artpec6_crypto_prepare_crypto() local
1673 enum artpec6_crypto_variant variant = ac->variant; in artpec6_crypto_prepare_crypto()
1777 ret = artpec6_crypto_setup_in_descr(common, ac->pad_buffer, 4, false); in artpec6_crypto_prepare_crypto()
1807 ac->pad_buffer, in artpec6_crypto_prepare_crypto()
1813 ac->pad_buffer, pad, in artpec6_crypto_prepare_crypto()
1840 struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev); in artpec6_crypto_prepare_aead() local
1841 enum artpec6_crypto_variant variant = ac->variant; in artpec6_crypto_prepare_aead()
1903 ret = artpec6_crypto_setup_in_descr(common, ac->pad_buffer, 4, false); in artpec6_crypto_prepare_aead()
1943 ac->zero_buffer, in artpec6_crypto_prepare_aead()
1960 ac->zero_buffer, in artpec6_crypto_prepare_aead()
1994 ac->pad_buffer, in artpec6_crypto_prepare_aead()
2025 ac->pad_buffer, in artpec6_crypto_prepare_aead()
2045 static void artpec6_crypto_process_queue(struct artpec6_crypto *ac, in artpec6_crypto_process_queue() argument
2050 while (!list_empty(&ac->queue) && !artpec6_crypto_busy()) { in artpec6_crypto_process_queue()
2051 req = list_first_entry(&ac->queue, in artpec6_crypto_process_queue()
2054 list_move_tail(&req->list, &ac->pending); in artpec6_crypto_process_queue()
2067 if (ac->pending_count) in artpec6_crypto_process_queue()
2068 mod_timer(&ac->timer, jiffies + msecs_to_jiffies(100)); in artpec6_crypto_process_queue()
2070 del_timer(&ac->timer); in artpec6_crypto_process_queue()
2075 struct artpec6_crypto *ac = from_timer(ac, t, timer); in artpec6_crypto_timeout() local
2079 tasklet_schedule(&ac->task); in artpec6_crypto_timeout()
2084 struct artpec6_crypto *ac = (struct artpec6_crypto *)data; in artpec6_crypto_task() local
2093 if (list_empty(&ac->pending)) { in artpec6_crypto_task()
2098 spin_lock(&ac->queue_lock); in artpec6_crypto_task()
2100 list_for_each_entry_safe(req, n, &ac->pending, list) { in artpec6_crypto_task()
2130 ac->pending_count--; in artpec6_crypto_task()
2133 artpec6_crypto_process_queue(ac, &complete_in_progress); in artpec6_crypto_task()
2135 spin_unlock(&ac->queue_lock); in artpec6_crypto_task()
2264 struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev); in artpec6_crypto_init_hash() local
2265 enum artpec6_crypto_variant variant = ac->variant; in artpec6_crypto_init_hash()
2441 struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev); in artpec6_crypto_hash_export() local
2442 enum artpec6_crypto_variant variant = ac->variant; in artpec6_crypto_hash_export()
2469 struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev); in artpec6_crypto_hash_import() local
2470 enum artpec6_crypto_variant variant = ac->variant; in artpec6_crypto_hash_import()
2491 static int init_crypto_hw(struct artpec6_crypto *ac) in init_crypto_hw() argument
2493 enum artpec6_crypto_variant variant = ac->variant; in init_crypto_hw()
2494 void __iomem *base = ac->base; in init_crypto_hw()
2551 static void artpec6_crypto_disable_hw(struct artpec6_crypto *ac) in artpec6_crypto_disable_hw() argument
2553 enum artpec6_crypto_variant variant = ac->variant; in artpec6_crypto_disable_hw()
2554 void __iomem *base = ac->base; in artpec6_crypto_disable_hw()
2572 struct artpec6_crypto *ac = dev_id; in artpec6_crypto_irq() local
2573 enum artpec6_crypto_variant variant = ac->variant; in artpec6_crypto_irq()
2574 void __iomem *base = ac->base; in artpec6_crypto_irq()
2615 tasklet_schedule(&ac->task); in artpec6_crypto_irq()
2847 struct artpec6_crypto *ac; in artpec6_crypto_probe() local
2870 ac = devm_kzalloc(&pdev->dev, sizeof(struct artpec6_crypto), in artpec6_crypto_probe()
2872 if (!ac) in artpec6_crypto_probe()
2875 platform_set_drvdata(pdev, ac); in artpec6_crypto_probe()
2876 ac->variant = variant; in artpec6_crypto_probe()
2878 spin_lock_init(&ac->queue_lock); in artpec6_crypto_probe()
2879 INIT_LIST_HEAD(&ac->queue); in artpec6_crypto_probe()
2880 INIT_LIST_HEAD(&ac->pending); in artpec6_crypto_probe()
2881 timer_setup(&ac->timer, artpec6_crypto_timeout, 0); in artpec6_crypto_probe()
2883 ac->base = base; in artpec6_crypto_probe()
2885 ac->dma_cache = kmem_cache_create("artpec6_crypto_dma", in artpec6_crypto_probe()
2890 if (!ac->dma_cache) in artpec6_crypto_probe()
2897 tasklet_init(&ac->task, artpec6_crypto_task, in artpec6_crypto_probe()
2898 (unsigned long)ac); in artpec6_crypto_probe()
2900 ac->pad_buffer = devm_kzalloc(&pdev->dev, 2 * ARTPEC_CACHE_LINE_MAX, in artpec6_crypto_probe()
2902 if (!ac->pad_buffer) in artpec6_crypto_probe()
2904 ac->pad_buffer = PTR_ALIGN(ac->pad_buffer, ARTPEC_CACHE_LINE_MAX); in artpec6_crypto_probe()
2906 ac->zero_buffer = devm_kzalloc(&pdev->dev, 2 * ARTPEC_CACHE_LINE_MAX, in artpec6_crypto_probe()
2908 if (!ac->zero_buffer) in artpec6_crypto_probe()
2910 ac->zero_buffer = PTR_ALIGN(ac->zero_buffer, ARTPEC_CACHE_LINE_MAX); in artpec6_crypto_probe()
2912 err = init_crypto_hw(ac); in artpec6_crypto_probe()
2917 "artpec6-crypto", ac); in artpec6_crypto_probe()
2948 artpec6_crypto_disable_hw(ac); in artpec6_crypto_probe()
2950 kmem_cache_destroy(ac->dma_cache); in artpec6_crypto_probe()
2956 struct artpec6_crypto *ac = platform_get_drvdata(pdev); in artpec6_crypto_remove() local
2963 tasklet_disable(&ac->task); in artpec6_crypto_remove()
2964 devm_free_irq(&pdev->dev, irq, ac); in artpec6_crypto_remove()
2965 tasklet_kill(&ac->task); in artpec6_crypto_remove()
2966 del_timer_sync(&ac->timer); in artpec6_crypto_remove()
2968 artpec6_crypto_disable_hw(ac); in artpec6_crypto_remove()
2970 kmem_cache_destroy(ac->dma_cache); in artpec6_crypto_remove()