SEC 2.0 Reference Device Driver User’s Guide, Rev. 0
8PRELIMINARY—SUBJECT TO CHANGE WITHOUT NOTICE Freescale Semiconductor
User Interface

The NUM_CHAS definition contains the total number of crypto hardware accelerators (CHAs) in SEC2 and is simply

defined as the sum of the individual channels.

The device name is defined as /dev/sec2.

3.3.3 Operation ID (opId) Masks

Operation Ids can be broken down into two parts, the group or type of request and the request index or descriptor

within a group or type. This is provided to help understand the structuring of the opIds. It is not specifically needed

within a user application.

3.3.4 Return Codes

A complete list of the error status results that may be returned to the callback routines follows:

Table3. Channel Defines
Define Description
NUM_AFHAS Number of ARC4 CHAs
NUM_DESAS Number of DES CHAs
NUM_MDHAS Number of MD CHAs
NUM_RNGAS Number of RNG CHAs
NUM_PKHAS Number of PK CHAs
NUM_AESAS Number of AESA CHAs
Table4. Request Operation ID Mask
Define Description Value
DESC_TYPE_MASK The mask for the group or type of an opId 0xFF00
DESC_NUM_MASK The mask for the request index or descriptor within that group or type 0x00FF
Table5. C allback Error Status Return Code
Define Description Value
SEC2_SUCCESS Successful completion of request 0
SEC2_MEMORY_ALLOCATION Driver can’t obtain memory from the host operating
system
0xE004FFFF
SEC2_INVALID_CHANNEL Channel specification was out of range. This exists for
legacy compatibility, and has no relevance for SEC2
0xE004FFFE
SEC2_INVALID_CHA_TYPE Requested CHA doesn’t exist 0xE004FFFD
SEC2_INVALID_OPERATION_ID Requested opID is out of range for this request type 0xE004FFFC
SEC2_CHANNEL_NOT_AVAILABLE Requested channel was not available. This error
exists for legacy compatibility reasons, and has no
relevance for SEC2
0xE004FFFB