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

static uint32_t partition_engaged ( uint32_t  part_no  )  [static]

Determine if the given partition is engaged.

For internal use only.

Parameters:
part_no Partition number to query
Returns:
TRUE if the partition is engaged, FALSE otherwise.

Definition at line 1557 of file scc2_driver.c.

References FALSE, scc_config_t::partition_count, SCC_READ_REGISTER, SCM_PART_ENGAGED_REG, SCM_PENG_ENGAGED, SCM_PENG_SHIFT, and TRUE.

Referenced by scc_engage_partition(), and scc_partition_status().

{
      uint32_t value;

      if (part_no < scc_configuration.partition_count) {

            /* Check the partition engaged register */
            value = SCC_READ_REGISTER(SCM_PART_ENGAGED_REG);
            if (((value >> (part_no * SCM_PENG_SHIFT)) & 0x1)
                == SCM_PENG_ENGAGED)
                  return TRUE;
      }
      return FALSE;
}


Generated by  Doxygen 1.6.0   Back to index