sha_dd 1431 drivers/crypto/atmel-sha.c struct atmel_sha_dev *sha_dd = dev_id; sha_dd 1434 drivers/crypto/atmel-sha.c reg = atmel_sha_read(sha_dd, SHA_ISR); sha_dd 1435 drivers/crypto/atmel-sha.c if (reg & atmel_sha_read(sha_dd, SHA_IMR)) { sha_dd 1436 drivers/crypto/atmel-sha.c atmel_sha_write(sha_dd, SHA_IDR, reg); sha_dd 1437 drivers/crypto/atmel-sha.c if (SHA_FLAGS_BUSY & sha_dd->flags) { sha_dd 1438 drivers/crypto/atmel-sha.c sha_dd->flags |= SHA_FLAGS_OUTPUT_READY; sha_dd 1439 drivers/crypto/atmel-sha.c if (!(SHA_FLAGS_CPU & sha_dd->flags)) sha_dd 1440 drivers/crypto/atmel-sha.c sha_dd->flags |= SHA_FLAGS_DMA_READY; sha_dd 1441 drivers/crypto/atmel-sha.c tasklet_schedule(&sha_dd->done_task); sha_dd 1443 drivers/crypto/atmel-sha.c dev_warn(sha_dd->dev, "SHA interrupt when no active requests.\n"); sha_dd 2739 drivers/crypto/atmel-sha.c struct atmel_sha_dev *sha_dd; sha_dd 2745 drivers/crypto/atmel-sha.c sha_dd = devm_kzalloc(&pdev->dev, sizeof(*sha_dd), GFP_KERNEL); sha_dd 2746 drivers/crypto/atmel-sha.c if (sha_dd == NULL) { sha_dd 2751 drivers/crypto/atmel-sha.c sha_dd->dev = dev; sha_dd 2753 drivers/crypto/atmel-sha.c platform_set_drvdata(pdev, sha_dd); sha_dd 2755 drivers/crypto/atmel-sha.c INIT_LIST_HEAD(&sha_dd->list); sha_dd 2756 drivers/crypto/atmel-sha.c spin_lock_init(&sha_dd->lock); sha_dd 2758 drivers/crypto/atmel-sha.c tasklet_init(&sha_dd->done_task, atmel_sha_done_task, sha_dd 2759 drivers/crypto/atmel-sha.c (unsigned long)sha_dd); sha_dd 2760 drivers/crypto/atmel-sha.c tasklet_init(&sha_dd->queue_task, atmel_sha_queue_task, sha_dd 2761 drivers/crypto/atmel-sha.c (unsigned long)sha_dd); sha_dd 2763 drivers/crypto/atmel-sha.c crypto_init_queue(&sha_dd->queue, ATMEL_SHA_QUEUE_LENGTH); sha_dd 2772 drivers/crypto/atmel-sha.c sha_dd->phys_base = sha_res->start; sha_dd 2775 drivers/crypto/atmel-sha.c sha_dd->irq = platform_get_irq(pdev, 0); sha_dd 2776 drivers/crypto/atmel-sha.c if (sha_dd->irq < 0) { sha_dd 2777 drivers/crypto/atmel-sha.c err = sha_dd->irq; sha_dd 2781 drivers/crypto/atmel-sha.c err = devm_request_irq(&pdev->dev, sha_dd->irq, atmel_sha_irq, sha_dd 2782 drivers/crypto/atmel-sha.c IRQF_SHARED, "atmel-sha", sha_dd); sha_dd 2789 drivers/crypto/atmel-sha.c sha_dd->iclk = devm_clk_get(&pdev->dev, "sha_clk"); sha_dd 2790 drivers/crypto/atmel-sha.c if (IS_ERR(sha_dd->iclk)) { sha_dd 2792 drivers/crypto/atmel-sha.c err = PTR_ERR(sha_dd->iclk); sha_dd 2796 drivers/crypto/atmel-sha.c sha_dd->io_base = devm_ioremap_resource(&pdev->dev, sha_res); sha_dd 2797 drivers/crypto/atmel-sha.c if (IS_ERR(sha_dd->io_base)) { sha_dd 2799 drivers/crypto/atmel-sha.c err = PTR_ERR(sha_dd->io_base); sha_dd 2803 drivers/crypto/atmel-sha.c err = clk_prepare(sha_dd->iclk); sha_dd 2807 drivers/crypto/atmel-sha.c atmel_sha_hw_version_init(sha_dd); sha_dd 2809 drivers/crypto/atmel-sha.c atmel_sha_get_cap(sha_dd); sha_dd 2811 drivers/crypto/atmel-sha.c if (sha_dd->caps.has_dma) { sha_dd 2825 drivers/crypto/atmel-sha.c err = atmel_sha_dma_init(sha_dd, pdata); sha_dd 2830 drivers/crypto/atmel-sha.c dma_chan_name(sha_dd->dma_lch_in.chan)); sha_dd 2834 drivers/crypto/atmel-sha.c list_add_tail(&sha_dd->list, &atmel_sha.dev_list); sha_dd 2837 drivers/crypto/atmel-sha.c err = atmel_sha_register_algs(sha_dd); sha_dd 2842 drivers/crypto/atmel-sha.c sha_dd->caps.has_sha224 ? "/SHA224" : "", sha_dd 2843 drivers/crypto/atmel-sha.c sha_dd->caps.has_sha_384_512 ? "/SHA384/SHA512" : ""); sha_dd 2849 drivers/crypto/atmel-sha.c list_del(&sha_dd->list); sha_dd 2851 drivers/crypto/atmel-sha.c if (sha_dd->caps.has_dma) sha_dd 2852 drivers/crypto/atmel-sha.c atmel_sha_dma_cleanup(sha_dd); sha_dd 2855 drivers/crypto/atmel-sha.c clk_unprepare(sha_dd->iclk); sha_dd 2857 drivers/crypto/atmel-sha.c tasklet_kill(&sha_dd->queue_task); sha_dd 2858 drivers/crypto/atmel-sha.c tasklet_kill(&sha_dd->done_task); sha_dd 2867 drivers/crypto/atmel-sha.c struct atmel_sha_dev *sha_dd; sha_dd 2869 drivers/crypto/atmel-sha.c sha_dd = platform_get_drvdata(pdev); sha_dd 2870 drivers/crypto/atmel-sha.c if (!sha_dd) sha_dd 2873 drivers/crypto/atmel-sha.c list_del(&sha_dd->list); sha_dd 2876 drivers/crypto/atmel-sha.c atmel_sha_unregister_algs(sha_dd); sha_dd 2878 drivers/crypto/atmel-sha.c tasklet_kill(&sha_dd->queue_task); sha_dd 2879 drivers/crypto/atmel-sha.c tasklet_kill(&sha_dd->done_task); sha_dd 2881 drivers/crypto/atmel-sha.c if (sha_dd->caps.has_dma) sha_dd 2882 drivers/crypto/atmel-sha.c atmel_sha_dma_cleanup(sha_dd); sha_dd 2884 drivers/crypto/atmel-sha.c clk_unprepare(sha_dd->iclk);