From e1c25514093a340ee91e9afefb22c0acee03eaf2 Mon Sep 17 00:00:00 2001 From: areviu Date: Wed, 15 Nov 2017 21:51:14 +0000 Subject: added DmaRelease when driver stops git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11015 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/SAMA/LLD/CRYPTOv1/sama_crypto_lld.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'os/hal') diff --git a/os/hal/ports/SAMA/LLD/CRYPTOv1/sama_crypto_lld.c b/os/hal/ports/SAMA/LLD/CRYPTOv1/sama_crypto_lld.c index 6f9653779..0ee83e861 100644 --- a/os/hal/ports/SAMA/LLD/CRYPTOv1/sama_crypto_lld.c +++ b/os/hal/ports/SAMA/LLD/CRYPTOv1/sama_crypto_lld.c @@ -86,6 +86,13 @@ void samaCryptoDriverStart(CRYDriver *cryp) { } void samaCryptoDriverStop(CRYDriver *cryp) { +#if defined(SAMA_DMA_REQUIRED) + if (cryp->config->transfer_mode == TRANSFER_DMA) + { + dmaChannelRelease(cryp->dmarx); + dmaChannelRelease(cryp->dmatx); + } +#endif samaCryptoDriverDisable(cryp); } -- cgit v1.2.3