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

static uint32_t host_owns_partition ( uint32_t  part_no  )  [static]

Determine if the host owns a given partition.

For internal use only.

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

Definition at line 1529 of file scc2_driver.c.

References FALSE, scc_config_t::partition_count, SCC_READ_REGISTER, SCM_PART_OWNERS_REG, SCM_POWN_MASK, SCM_POWN_PART_OWNED, SCM_POWN_SHIFT, and TRUE.

Referenced by scc_engage_partition(), and scc_release_partition().

{
      uint32_t value;

      if (part_no < scc_configuration.partition_count) {

            /* Check the partition owners register */
            value = SCC_READ_REGISTER(SCM_PART_OWNERS_REG);
            if (((value >> (part_no * SCM_POWN_SHIFT)) & SCM_POWN_MASK)
                == SCM_POWN_PART_OWNED)
                  return TRUE;
      }
      return FALSE;
}


Generated by  Doxygen 1.6.0   Back to index