int caam_jr_enqueue(struct device *dev, u32 *desc, void (*cbk)(struct device
*dev, u32 *desc, u32 status, void *areq), void *areq);
Arguments:
dev
Pointer to the struct device associated with the job ring for use. In the current
configuration, one or more struct device entries exist in the controller's private data block,
one for each ring.
desc
Pointer to a CAAM job descriptor to be executed. The driver will map the descriptor
prior to execution, and unmap it upon completion. However, since the driver can't
reasonably know anything about the data referenced by the descriptor, it is the caller's
responsibility to map/flush any of this data prior to submission, and to unmap/invalidate
data after the request completes.
cbk
Pointer to a callback function that will be called when the job has completed
processing.
areq
Pointer to metadata or context data associated with this request. Often, this can
contain referenced data mapping information that request postprocessing (via the
callback) can use to clean up or release resources once complete.
Callback Function Arguments:
dev
Pointer to the struct device associated with the job ring for use.
desc
Pointer to the original descriptor submitted for execution.
status
Completion status received back from the CAAM DECO that executed the request.
Nonzero only if an error occurred. Strings describing each error are enumerated in
error.c.
areq
Metadata/context pointer passed to the original request.
Returns:
• Zero on successful job submission
• -EBUSY if the input ring was full
• -EIO if driver could not map the job descriptor
Chapter 45 CAAM (Cryptographic Acceleration and Assurance Module)
i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013
Freescale Semiconductor, Inc.
313