Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
jr.h File Reference

Go to the source code of this file.

Functions

int caam_jr_register (struct device *ctrldev, struct device **rdev)
 
int caam_jr_deregister (struct device *rdev)
 
int caam_jr_enqueue (struct device *dev, u32 *desc, void(*cbk)(struct device *dev, u32 *desc, u32 status, void *areq), void *areq)
 
int caam_jr_probe (struct platform_device *pdev, struct device_node *np, int ring)
 
int caam_jr_shutdown (struct device *dev)
 

Function Documentation

int caam_jr_deregister ( struct device rdev)

caam_jr_deregister() - Deregister an API and release the queue. Returns 0 if OK, -EBUSY if queue still contains pending entries or unprocessed results at the time of the call - points to the dev that identifies the queue to be released.

Definition at line 170 of file jr.c.

int caam_jr_enqueue ( struct device dev,
u32 desc,
void(*)(struct device *dev, u32 *desc, u32 status, void *areq)  cbk,
void areq 
)

caam_jr_enqueue() - Enqueue a job descriptor head. Returns 0 if OK, -EBUSY if the queue is full, -EIO if it cannot map the caller's descriptor. : device of the job ring to be used. This device should have been assigned prior by caam_jr_register(). : points to a job descriptor that execute our request. All descriptors (and all referenced data) must be in a DMAable region, and all data references must be physical addresses accessible to CAAM (i.e. within a PAMU window granted to it). : pointer to a callback function to be invoked upon completion of this request. This has the form: callback(struct device *dev, u32 *desc, u32 stat, void *arg) where: : contains the job ring device that processed this response. : descriptor that initiated the request, same as "desc" being argued to caam_jr_enqueue(). : untranslated status received from CAAM. See the reference manual for a detailed description of error meaning, or see the JRSTA definitions in the register header file : optional pointer to an argument passed with the original request : optional pointer to a user argument for use at callback time.

Definition at line 222 of file jr.c.

int caam_jr_probe ( struct platform_device pdev,
struct device_node np,
int  ring 
)

Definition at line 418 of file jr.c.

int caam_jr_register ( struct device ctrldev,
struct device **  rdev 
)

caam_jr_register() - Alloc a ring for someone to use as needed. Returns an ordinal of the rings allocated, else returns -ENODEV if no rings are available. : points to the controller level dev (parent) that owns rings available for use. : points to where a pointer to the newly allocated queue's dev can be written to if successful.

Definition at line 137 of file jr.c.

int caam_jr_shutdown ( struct device dev)

Definition at line 389 of file jr.c.