CAAM DMA User Manual

Description

The CAAM DMA module implements a DMA driver that uses the CAAM DMA controller to provide both SG and MEMCPY DMA capability which are used by the platform. It is based on the CAAM JR interface that must be enabled in the kernel config as a prerequisite for the CAAM DMA driver.

Kernel Configure Options

Tree View

To enable the CAAM DMA module, set the following options for "make menuconfig":

-*- Cryptographic API --->

    [*] Hardware crypto devices --->

            <*> Freescale CAAM-Multicore driver backend

            <*>     Freescale CAAM Job Ring driver backend

    Device Drivers --->

            <*> DMA Engine support --->

            <*>     CAAM DMA engine support

NOTE: Be aware that the CAAM DMA driver depends on the CAAM and CAAM JR drivers which must also be enabled.

Identifier

Below are the configure identifiers which are used in the kernel source code and default configuration files.

Option

Values

Default Value

Description

CRYPTO_CONFIG_DEV_FSL_CAAM_DMA

y/m/n

n

CAAM DMA engine support

Device Tree Node

Below is an example device tree node required by this feature.

caam_dma {

    compatible = "fsl,sec-v5.4-dma";

};

Source Files

Use the following source file in the Linux kernel for this feature.

Source File

Description

drivers/dma/caam_dma.c

The CAAM DMA driver

Verification in Linux

On successful probing, the driver will print the following message in dmesg:

[    1.443940] caam-dma 1700000.crypto:caam_dma: caam dma support with 4 job rings

Additionally, you can also run the following command:

ls -l /sys/class/dma/

total 0

lrwxrwxrwx 1 root root 0 Jan  1  1970 dma0chan0 -> ../../devices/platform/soc/1700000.crypto/1700000.crypto:caam_dma/dma/dma0chan0

lrwxrwxrwx 1 root root 0 Jan  1  1970 dma0chan1 -> ../../devices/platform/soc/1700000.crypto/1700000.crypto:caam_dma/dma/dma0chan1

lrwxrwxrwx 1 root root 0 Jan  1  1970 dma0chan2 -> ../../devices/platform/soc/1700000.crypto/1700000.crypto:caam_dma/dma/dma0chan2

lrwxrwxrwx 1 root root 0 Jan  1  1970 dma0chan3 -> ../../devices/platform/soc/1700000.crypto/1700000.crypto:caam_dma/dma/dma0chan3