Lines Matching refs:ac

450 	struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev);  in artpec6_crypto_busy()  local
451 int fifo_count = ac->pending_count; in artpec6_crypto_busy()
458 struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev); in artpec6_crypto_submit() local
461 spin_lock_bh(&ac->queue_lock); in artpec6_crypto_submit()
464 list_add_tail(&req->list, &ac->pending); in artpec6_crypto_submit()
468 list_add_tail(&req->list, &ac->queue); in artpec6_crypto_submit()
473 spin_unlock_bh(&ac->queue_lock); in artpec6_crypto_submit()
480 struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev); in artpec6_crypto_start_dma() local
481 enum artpec6_crypto_variant variant = ac->variant; in artpec6_crypto_start_dma()
482 void __iomem *base = ac->base; in artpec6_crypto_start_dma()
511 ac->pending_count++; in artpec6_crypto_start_dma()
1044 struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev); in artpec6_crypto_common_init() local
1050 common->dma = kmem_cache_alloc(ac->dma_cache, flags); in artpec6_crypto_common_init()
1073 struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev); in artpec6_crypto_common_destroy() local
1077 kmem_cache_free(ac->dma_cache, common->dma); in artpec6_crypto_common_destroy()
1316 struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev); in artpec6_crypto_prepare_hash() local
1317 enum artpec6_crypto_variant variant = ac->variant; in artpec6_crypto_prepare_hash()
1385 error = artpec6_crypto_setup_in_descr(common, ac->pad_buffer, 4, false); in artpec6_crypto_prepare_hash()
1667 struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev); in artpec6_crypto_prepare_crypto() local
1668 enum artpec6_crypto_variant variant = ac->variant; in artpec6_crypto_prepare_crypto()
1772 ret = artpec6_crypto_setup_in_descr(common, ac->pad_buffer, 4, false); in artpec6_crypto_prepare_crypto()
1802 ac->pad_buffer, in artpec6_crypto_prepare_crypto()
1808 ac->pad_buffer, pad, in artpec6_crypto_prepare_crypto()
1835 struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev); in artpec6_crypto_prepare_aead() local
1836 enum artpec6_crypto_variant variant = ac->variant; in artpec6_crypto_prepare_aead()
1898 ret = artpec6_crypto_setup_in_descr(common, ac->pad_buffer, 4, false); in artpec6_crypto_prepare_aead()
1938 ac->zero_buffer, in artpec6_crypto_prepare_aead()
1955 ac->zero_buffer, in artpec6_crypto_prepare_aead()
1989 ac->pad_buffer, in artpec6_crypto_prepare_aead()
2020 ac->pad_buffer, in artpec6_crypto_prepare_aead()
2040 static void artpec6_crypto_process_queue(struct artpec6_crypto *ac, in artpec6_crypto_process_queue() argument
2045 while (!list_empty(&ac->queue) && !artpec6_crypto_busy()) { in artpec6_crypto_process_queue()
2046 req = list_first_entry(&ac->queue, in artpec6_crypto_process_queue()
2049 list_move_tail(&req->list, &ac->pending); in artpec6_crypto_process_queue()
2062 if (ac->pending_count) in artpec6_crypto_process_queue()
2063 mod_timer(&ac->timer, jiffies + msecs_to_jiffies(100)); in artpec6_crypto_process_queue()
2065 del_timer(&ac->timer); in artpec6_crypto_process_queue()
2070 struct artpec6_crypto *ac = from_timer(ac, t, timer); in artpec6_crypto_timeout() local
2074 tasklet_schedule(&ac->task); in artpec6_crypto_timeout()
2079 struct artpec6_crypto *ac = (struct artpec6_crypto *)data; in artpec6_crypto_task() local
2088 if (list_empty(&ac->pending)) { in artpec6_crypto_task()
2093 spin_lock_bh(&ac->queue_lock); in artpec6_crypto_task()
2095 list_for_each_entry_safe(req, n, &ac->pending, list) { in artpec6_crypto_task()
2125 ac->pending_count--; in artpec6_crypto_task()
2128 artpec6_crypto_process_queue(ac, &complete_in_progress); in artpec6_crypto_task()
2130 spin_unlock_bh(&ac->queue_lock); in artpec6_crypto_task()
2259 struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev); in artpec6_crypto_init_hash() local
2260 enum artpec6_crypto_variant variant = ac->variant; in artpec6_crypto_init_hash()
2436 struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev); in artpec6_crypto_hash_export() local
2437 enum artpec6_crypto_variant variant = ac->variant; in artpec6_crypto_hash_export()
2464 struct artpec6_crypto *ac = dev_get_drvdata(artpec6_crypto_dev); in artpec6_crypto_hash_import() local
2465 enum artpec6_crypto_variant variant = ac->variant; in artpec6_crypto_hash_import()
2486 static int init_crypto_hw(struct artpec6_crypto *ac) in init_crypto_hw() argument
2488 enum artpec6_crypto_variant variant = ac->variant; in init_crypto_hw()
2489 void __iomem *base = ac->base; in init_crypto_hw()
2546 static void artpec6_crypto_disable_hw(struct artpec6_crypto *ac) in artpec6_crypto_disable_hw() argument
2548 enum artpec6_crypto_variant variant = ac->variant; in artpec6_crypto_disable_hw()
2549 void __iomem *base = ac->base; in artpec6_crypto_disable_hw()
2567 struct artpec6_crypto *ac = dev_id; in artpec6_crypto_irq() local
2568 enum artpec6_crypto_variant variant = ac->variant; in artpec6_crypto_irq()
2569 void __iomem *base = ac->base; in artpec6_crypto_irq()
2610 tasklet_schedule(&ac->task); in artpec6_crypto_irq()
2852 struct artpec6_crypto *ac; in artpec6_crypto_probe() local
2875 ac = devm_kzalloc(&pdev->dev, sizeof(struct artpec6_crypto), in artpec6_crypto_probe()
2877 if (!ac) in artpec6_crypto_probe()
2880 platform_set_drvdata(pdev, ac); in artpec6_crypto_probe()
2881 ac->variant = variant; in artpec6_crypto_probe()
2883 spin_lock_init(&ac->queue_lock); in artpec6_crypto_probe()
2884 INIT_LIST_HEAD(&ac->queue); in artpec6_crypto_probe()
2885 INIT_LIST_HEAD(&ac->pending); in artpec6_crypto_probe()
2886 timer_setup(&ac->timer, artpec6_crypto_timeout, 0); in artpec6_crypto_probe()
2888 ac->base = base; in artpec6_crypto_probe()
2890 ac->dma_cache = kmem_cache_create("artpec6_crypto_dma", in artpec6_crypto_probe()
2895 if (!ac->dma_cache) in artpec6_crypto_probe()
2902 tasklet_init(&ac->task, artpec6_crypto_task, in artpec6_crypto_probe()
2903 (unsigned long)ac); in artpec6_crypto_probe()
2905 ac->pad_buffer = devm_kzalloc(&pdev->dev, 2 * ARTPEC_CACHE_LINE_MAX, in artpec6_crypto_probe()
2907 if (!ac->pad_buffer) in artpec6_crypto_probe()
2909 ac->pad_buffer = PTR_ALIGN(ac->pad_buffer, ARTPEC_CACHE_LINE_MAX); in artpec6_crypto_probe()
2911 ac->zero_buffer = devm_kzalloc(&pdev->dev, 2 * ARTPEC_CACHE_LINE_MAX, in artpec6_crypto_probe()
2913 if (!ac->zero_buffer) in artpec6_crypto_probe()
2915 ac->zero_buffer = PTR_ALIGN(ac->zero_buffer, ARTPEC_CACHE_LINE_MAX); in artpec6_crypto_probe()
2917 err = init_crypto_hw(ac); in artpec6_crypto_probe()
2922 "artpec6-crypto", ac); in artpec6_crypto_probe()
2953 artpec6_crypto_disable_hw(ac); in artpec6_crypto_probe()
2955 kmem_cache_destroy(ac->dma_cache); in artpec6_crypto_probe()
2961 struct artpec6_crypto *ac = platform_get_drvdata(pdev); in artpec6_crypto_remove() local
2968 tasklet_disable(&ac->task); in artpec6_crypto_remove()
2969 devm_free_irq(&pdev->dev, irq, ac); in artpec6_crypto_remove()
2970 tasklet_kill(&ac->task); in artpec6_crypto_remove()
2971 del_timer_sync(&ac->timer); in artpec6_crypto_remove()
2973 artpec6_crypto_disable_hw(ac); in artpec6_crypto_remove()
2975 kmem_cache_destroy(ac->dma_cache); in artpec6_crypto_remove()