Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

static int is_cipher_done ( uint32_t *  scm_status  )  [static]

This function returns non-zero if SCM Status register indicates that a cipher has terminated or some other interrupt-generating condition has occurred.

Parameters:
scm_status Address of the SCM STATUS register
Returns:
0 if cipher operations are finished

Definition at line 1624 of file scc2_driver.c.

References SCC_READ_REGISTER, SCM_STATUS_REG, SCM_STATUS_SRS_ABUSY, SCM_STATUS_SRS_CBUSY, SCM_STATUS_SRS_MASK, SCM_STATUS_SRS_SHIFT, and SCM_STATUS_SRS_ZBUSY.

{
      register unsigned status;
      register int cipher_done;

      *scm_status = SCC_READ_REGISTER(SCM_STATUS_REG);
      status = (*scm_status & SCM_STATUS_SRS_MASK) >> SCM_STATUS_SRS_SHIFT;

      /*
       * Done when SCM is not in 'currently performing a function' states.
       */
      cipher_done = ((status != SCM_STATUS_SRS_ZBUSY)
                   && (status != SCM_STATUS_SRS_CBUSY)
                   && (status != SCM_STATUS_SRS_ABUSY));

      return cipher_done;
}                       /* is_cipher_done() */


Generated by  Doxygen 1.6.0   Back to index