Lines Matching refs:hcu_dev

46 	struct ocs_hcu_dev *hcu_dev;  member
73 struct ocs_hcu_dev *hcu_dev; member
170 if (tctx->hcu_dev) in kmb_ocs_hcu_find_dev()
171 return tctx->hcu_dev; in kmb_ocs_hcu_find_dev()
178 tctx->hcu_dev = list_first_entry_or_null(&ocs_hcu.dev_list, in kmb_ocs_hcu_find_dev()
183 return tctx->hcu_dev; in kmb_ocs_hcu_find_dev()
190 struct ocs_hcu_dev *hcu_dev = rctx->hcu_dev; in kmb_ocs_hcu_dma_cleanup() local
191 struct device *dev = hcu_dev->dev; in kmb_ocs_hcu_dma_cleanup()
208 ocs_hcu_dma_list_free(hcu_dev, rctx->dma_list); in kmb_ocs_hcu_dma_cleanup()
230 struct device *dev = rctx->hcu_dev->dev; in kmb_ocs_dma_prepare()
289 rctx->dma_list = ocs_hcu_dma_list_alloc(rctx->hcu_dev, nents); in kmb_ocs_dma_prepare()
297 rc = ocs_hcu_dma_list_add_tail(rctx->hcu_dev, rctx->dma_list, in kmb_ocs_dma_prepare()
321 rc = ocs_hcu_dma_list_add_tail(rctx->hcu_dev, in kmb_ocs_dma_prepare()
367 struct ocs_hcu_dev *hcu_dev = kmb_ocs_hcu_find_dev(req); in kmb_ocs_hcu_handle_queue() local
369 if (!hcu_dev) in kmb_ocs_hcu_handle_queue()
372 return crypto_transfer_hash_request_to_engine(hcu_dev->engine, req); in kmb_ocs_hcu_handle_queue()
415 struct ocs_hcu_dev *hcu_dev = kmb_ocs_hcu_find_dev(req); in kmb_ocs_hcu_do_one_request() local
422 if (!hcu_dev) { in kmb_ocs_hcu_do_one_request()
438 rc = ocs_hcu_hmac(hcu_dev, rctx->algo, tctx->key, tctx->key_len, in kmb_ocs_hcu_do_one_request()
463 rc = ocs_hcu_hash_update(hcu_dev, &rctx->hash_ctx, in kmb_ocs_hcu_do_one_request()
502 rc = ocs_hcu_hash_finup(hcu_dev, &rctx->hash_ctx, in kmb_ocs_hcu_do_one_request()
513 rc = ocs_hcu_hash_final(hcu_dev, &rctx->hash_ctx, req->result, in kmb_ocs_hcu_do_one_request()
542 rc = ocs_hcu_digest(hcu_dev, rctx->algo, rctx->buffer, in kmb_ocs_hcu_do_one_request()
552 crypto_finalize_hash_request(hcu_dev->engine, req, 0); in kmb_ocs_hcu_do_one_request()
563 struct ocs_hcu_dev *hcu_dev = kmb_ocs_hcu_find_dev(req); in kmb_ocs_hcu_init() local
568 if (!hcu_dev) in kmb_ocs_hcu_init()
574 rctx->hcu_dev = hcu_dev; in kmb_ocs_hcu_init()
713 struct ocs_hcu_dev *hcu_dev = kmb_ocs_hcu_find_dev(req); in kmb_ocs_hcu_digest() local
715 if (!hcu_dev) in kmb_ocs_hcu_digest()
1157 struct ocs_hcu_dev *hcu_dev = platform_get_drvdata(pdev); in kmb_ocs_hcu_remove() local
1161 crypto_engine_exit(hcu_dev->engine); in kmb_ocs_hcu_remove()
1164 list_del(&hcu_dev->list); in kmb_ocs_hcu_remove()
1171 struct ocs_hcu_dev *hcu_dev; in kmb_ocs_hcu_probe() local
1174 hcu_dev = devm_kzalloc(dev, sizeof(*hcu_dev), GFP_KERNEL); in kmb_ocs_hcu_probe()
1175 if (!hcu_dev) in kmb_ocs_hcu_probe()
1178 hcu_dev->dev = dev; in kmb_ocs_hcu_probe()
1180 platform_set_drvdata(pdev, hcu_dev); in kmb_ocs_hcu_probe()
1185 hcu_dev->io_base = devm_platform_ioremap_resource(pdev, 0); in kmb_ocs_hcu_probe()
1186 if (IS_ERR(hcu_dev->io_base)) in kmb_ocs_hcu_probe()
1187 return PTR_ERR(hcu_dev->io_base); in kmb_ocs_hcu_probe()
1189 init_completion(&hcu_dev->irq_done); in kmb_ocs_hcu_probe()
1192 hcu_dev->irq = platform_get_irq(pdev, 0); in kmb_ocs_hcu_probe()
1193 if (hcu_dev->irq < 0) in kmb_ocs_hcu_probe()
1194 return hcu_dev->irq; in kmb_ocs_hcu_probe()
1196 rc = devm_request_threaded_irq(&pdev->dev, hcu_dev->irq, in kmb_ocs_hcu_probe()
1198 "keembay-ocs-hcu", hcu_dev); in kmb_ocs_hcu_probe()
1204 INIT_LIST_HEAD(&hcu_dev->list); in kmb_ocs_hcu_probe()
1207 list_add_tail(&hcu_dev->list, &ocs_hcu.dev_list); in kmb_ocs_hcu_probe()
1211 hcu_dev->engine = crypto_engine_alloc_init(dev, 1); in kmb_ocs_hcu_probe()
1212 if (!hcu_dev->engine) { in kmb_ocs_hcu_probe()
1217 rc = crypto_engine_start(hcu_dev->engine); in kmb_ocs_hcu_probe()
1234 crypto_engine_exit(hcu_dev->engine); in kmb_ocs_hcu_probe()
1237 list_del(&hcu_dev->list); in kmb_ocs_hcu_probe()