6c3af95593
LS1021A is a QorIQ SoC having little endian CAAM. There are a few differences b/w QorIQ and i.MX from CAAM perspective: 1. i.MX platforms are somewhat special wrt. 64-bit registers: -big endian format at 64-bit level: MSW at address+0 and LSW at address+4 -little endian format at 32-bit level (within MSW and LSW) and thus need special handling. 2. No CCM (clock controller module) for QorIQ. No CAAM clocks to enable / disable. A new Kconfig option - CRYPTO_DEV_FSL_CAAM_LE - is added to indicate CAAM is little endian (*). It is hidden from the user (to avoid misconfiguration); when adding support for a new platform with LE CAAM, either the Kconfig needs to be updated or the corresponding defconfig needs to indicate that CAAM is LE. (*) Using a DT property to provide CAAM endianness would not allow for the ifdeffery. In order to keep changes to a minimum, the following changes are postponed: -endianness fix of the last word in the S/G (rsvd2, bpid, offset), fields are always 0 anyway; -S/G format fix for i.MX7 (yes, i.MX7 support was not added yet, but still...) Signed-off-by: Horia Geant? <horia.geanta@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
129 lines
3.8 KiB
Plaintext
129 lines
3.8 KiB
Plaintext
config CRYPTO_DEV_FSL_CAAM
|
|
tristate "Freescale CAAM-Multicore driver backend"
|
|
depends on FSL_SOC || ARCH_MXC
|
|
help
|
|
Enables the driver module for Freescale's Cryptographic Accelerator
|
|
and Assurance Module (CAAM), also known as the SEC version 4 (SEC4).
|
|
This module creates job ring devices, and configures h/w
|
|
to operate as a DPAA component automatically, depending
|
|
on h/w feature availability.
|
|
|
|
To compile this driver as a module, choose M here: the module
|
|
will be called caam.
|
|
|
|
config CRYPTO_DEV_FSL_CAAM_JR
|
|
tristate "Freescale CAAM Job Ring driver backend"
|
|
depends on CRYPTO_DEV_FSL_CAAM
|
|
default y
|
|
help
|
|
Enables the driver module for Job Rings which are part of
|
|
Freescale's Cryptographic Accelerator
|
|
and Assurance Module (CAAM). This module adds a job ring operation
|
|
interface.
|
|
|
|
To compile this driver as a module, choose M here: the module
|
|
will be called caam_jr.
|
|
|
|
config CRYPTO_DEV_FSL_CAAM_RINGSIZE
|
|
int "Job Ring size"
|
|
depends on CRYPTO_DEV_FSL_CAAM_JR
|
|
range 2 9
|
|
default "9"
|
|
help
|
|
Select size of Job Rings as a power of 2, within the
|
|
range 2-9 (ring size 4-512).
|
|
Examples:
|
|
2 => 4
|
|
3 => 8
|
|
4 => 16
|
|
5 => 32
|
|
6 => 64
|
|
7 => 128
|
|
8 => 256
|
|
9 => 512
|
|
|
|
config CRYPTO_DEV_FSL_CAAM_INTC
|
|
bool "Job Ring interrupt coalescing"
|
|
depends on CRYPTO_DEV_FSL_CAAM_JR
|
|
help
|
|
Enable the Job Ring's interrupt coalescing feature.
|
|
|
|
Note: the driver already provides adequate
|
|
interrupt coalescing in software.
|
|
|
|
config CRYPTO_DEV_FSL_CAAM_INTC_COUNT_THLD
|
|
int "Job Ring interrupt coalescing count threshold"
|
|
depends on CRYPTO_DEV_FSL_CAAM_INTC
|
|
range 1 255
|
|
default 255
|
|
help
|
|
Select number of descriptor completions to queue before
|
|
raising an interrupt, in the range 1-255. Note that a selection
|
|
of 1 functionally defeats the coalescing feature, and a selection
|
|
equal or greater than the job ring size will force timeouts.
|
|
|
|
config CRYPTO_DEV_FSL_CAAM_INTC_TIME_THLD
|
|
int "Job Ring interrupt coalescing timer threshold"
|
|
depends on CRYPTO_DEV_FSL_CAAM_INTC
|
|
range 1 65535
|
|
default 2048
|
|
help
|
|
Select number of bus clocks/64 to timeout in the case that one or
|
|
more descriptor completions are queued without reaching the count
|
|
threshold. Range is 1-65535.
|
|
|
|
config CRYPTO_DEV_FSL_CAAM_CRYPTO_API
|
|
tristate "Register algorithm implementations with the Crypto API"
|
|
depends on CRYPTO_DEV_FSL_CAAM && CRYPTO_DEV_FSL_CAAM_JR
|
|
default y
|
|
select CRYPTO_AEAD
|
|
select CRYPTO_AUTHENC
|
|
select CRYPTO_BLKCIPHER
|
|
help
|
|
Selecting this will offload crypto for users of the
|
|
scatterlist crypto API (such as the linux native IPSec
|
|
stack) to the SEC4 via job ring.
|
|
|
|
To compile this as a module, choose M here: the module
|
|
will be called caamalg.
|
|
|
|
config CRYPTO_DEV_FSL_CAAM_AHASH_API
|
|
tristate "Register hash algorithm implementations with Crypto API"
|
|
depends on CRYPTO_DEV_FSL_CAAM && CRYPTO_DEV_FSL_CAAM_JR
|
|
default y
|
|
select CRYPTO_HASH
|
|
help
|
|
Selecting this will offload ahash for users of the
|
|
scatterlist crypto API to the SEC4 via job ring.
|
|
|
|
To compile this as a module, choose M here: the module
|
|
will be called caamhash.
|
|
|
|
config CRYPTO_DEV_FSL_CAAM_RNG_API
|
|
tristate "Register caam device for hwrng API"
|
|
depends on CRYPTO_DEV_FSL_CAAM && CRYPTO_DEV_FSL_CAAM_JR
|
|
default y
|
|
select CRYPTO_RNG
|
|
select HW_RANDOM
|
|
help
|
|
Selecting this will register the SEC4 hardware rng to
|
|
the hw_random API for suppying the kernel entropy pool.
|
|
|
|
To compile this as a module, choose M here: the module
|
|
will be called caamrng.
|
|
|
|
config CRYPTO_DEV_FSL_CAAM_IMX
|
|
def_bool SOC_IMX6 || SOC_IMX7D
|
|
depends on CRYPTO_DEV_FSL_CAAM
|
|
|
|
config CRYPTO_DEV_FSL_CAAM_LE
|
|
def_bool CRYPTO_DEV_FSL_CAAM_IMX || SOC_LS1021A
|
|
depends on CRYPTO_DEV_FSL_CAAM
|
|
|
|
config CRYPTO_DEV_FSL_CAAM_DEBUG
|
|
bool "Enable debug output in CAAM driver"
|
|
depends on CRYPTO_DEV_FSL_CAAM
|
|
help
|
|
Selecting this will enable printing of various debug
|
|
information in the CAAM driver.
|