linux/drivers/mxc/security/sahara2/sah_hardware_interface.c File Reference

Provides an interface to the SAHARA hardware registers. More...

Defines

#define SAH_HDR_LLO   0x01000000

Functions

sah_Execute_Status sah_Wait_On_Sahara ()
int sah_HW_Reset (void)
fsl_shw_return_t sah_HW_Set_HA (void)
uint32_t sah_HW_Read_Version (void)
uint32_t sah_HW_Read_Control (void)
uint32_t sah_HW_Read_Status (void)
uint32_t sah_HW_Read_Error_Status (void)
uint32_t sah_HW_Read_Op_Status (void)
uint32_t sah_HW_Read_DAR (void)
uint32_t sah_HW_Read_CDAR (void)
uint32_t sah_HW_Read_IDAR (void)
uint32_t sah_HW_Read_Fault_Address (void)
uint32_t sah_HW_Read_MM_Status (void)
uint32_t sah_HW_Read_Config (void)
void sah_HW_Write_Command (uint32_t command)
void sah_HW_Write_Control (uint32_t control)
void sah_HW_Write_Config (uint32_t configuration)
void sah_HW_Write_DAR (uint32_t pointer)

Variables

uint32_t dar_count

Detailed Description

Provides an interface to the SAHARA hardware registers.


Define Documentation

#define SAH_HDR_LLO   0x01000000

The "link-list optimize" bit in the Header of a Descriptor


Function Documentation

uint32_t sah_HW_Read_CDAR ( void   ) 

Read SAHARA hardware CDAR Register.

This function reads the SAHARA hardware Current Descriptor Address Register.

Returns:
uint32_t CDAR value.

References os_read32.

Referenced by sah_HW_Reset().

uint32_t sah_HW_Read_Config ( void   ) 

Read SAHARA Configuration Register.

This function reads the SAHARA hardware Configuration Register.

Returns:
uint32_t Configuration value.

References os_read32.

Referenced by sah_HW_Reset().

uint32_t sah_HW_Read_Control ( void   ) 

Read SAHARA hardware Control Register.

This function reads the SAHARA hardware Control Register.

Returns:
uint32_t Register value.

References os_read32.

Referenced by sah_HW_Set_HA().

uint32_t sah_HW_Read_DAR ( void   ) 

Read SAHARA hardware DAR Register.

This function reads the SAHARA hardware Descriptor Address Register.

Returns:
uint32_t DAR value.

References os_read32.

Referenced by sah_Handle_Interrupt(), and sah_Queue_Manager_Prime().

uint32_t sah_HW_Read_Error_Status ( void   ) 

Read SAHARA hardware Error Status Register.

This function reads the SAHARA hardware Error Status Register.

Returns:
uint32_t Error Status value.

References os_read32.

Referenced by sah_Handle_Interrupt(), and sah_HW_Reset().

uint32_t sah_HW_Read_Fault_Address ( void   ) 

Read SAHARA Fault Address Register.

This function reads the SAHARA hardware Fault Address Register.

Returns:
uint32_t Fault Address value.

References os_read32.

Referenced by sah_Handle_Interrupt(), and sah_HW_Reset().

uint32_t sah_HW_Read_IDAR ( void   ) 

Read SAHARA hardware IDAR Register.

This function reads the SAHARA hardware Initial Descriptor Address Register.

Returns:
uint32_t IDAR value.

References os_read32.

Referenced by sah_Handle_Interrupt(), and sah_HW_Reset().

uint32_t sah_HW_Read_MM_Status ( void   ) 

Read SAHARA hardware MM Stat Register.

This function reads the SAHARA hardware Multiple Master Status Register.

Returns:
uint32_t MM Stat value.

References os_read32.

uint32_t sah_HW_Read_Op_Status ( void   ) 

Read SAHARA hardware Op Status Register.

This function reads the SAHARA hardware Op Status Register.

Returns:
uint32_t Op Status value.

References os_read32.

Referenced by sah_Handle_Interrupt().

uint32_t sah_HW_Read_Status ( void   ) 

Read SAHARA hardware Status Register.

This function reads the SAHARA hardware Status Register.

Returns:
uint32_t Register value.

References os_read32.

Referenced by sah_HW_Reset(), sah_Intr_Top_Half(), sah_postprocess_queue(), and sah_Wait_On_Sahara().

uint32_t sah_HW_Read_Version ( void   ) 

Read SAHARA hardware Version Register.

This function reads the SAHARA hardware Version Register.

Returns:
uint32_t Register value.

References os_read32.

Referenced by OS_DEV_INIT().

int sah_HW_Reset ( void   ) 
fsl_shw_return_t sah_HW_Set_HA ( void   ) 

SAHARA hardware enable High Assurance mode.

This function enables High Assurance mode.

Returns:
FSL_RETURN_OK_S - if HA was set successfully
FSL_RETURN_INTERNAL_ERROR_S - if HA was not set due to SAHARA being busy.

References FSL_RETURN_INTERNAL_ERROR_S, FSL_RETURN_OK_S, sah_HW_Read_Control(), and sah_HW_Write_Control().

Referenced by OS_DEV_IOCTL().

void sah_HW_Write_Command ( uint32_t  command  ) 

Write to SAHARA hardware Command Register.

This function writes a command to the SAHARA hardware Command Register.

Parameters:
command An unsigned 32bit command value.
Returns:
void

References os_write32.

Referenced by sah_HW_Reset().

void sah_HW_Write_Config ( uint32_t  configuration  ) 

Write to SAHARA hardware Configuration Register.

This function writes a configuration value to the SAHARA hardware Configuration Register.

Parameters:
configuration An unsigned 32bit configuration value.
Returns:
void

References os_write32.

Referenced by sah_HW_Reset().

void sah_HW_Write_Control ( uint32_t  control  ) 

Write to SAHARA hardware Control Register.

This function writes a control value to the SAHARA hardware Control Register.

Parameters:
control An unsigned 32bit control value.
Returns:
void

References os_write32.

Referenced by sah_HW_Reset(), and sah_HW_Set_HA().

void sah_HW_Write_DAR ( uint32_t  pointer  ) 

Write to SAHARA Descriptor Address Register.

This function writes a descriptor address to the SAHARA Descriptor Address Register.

Parameters:
pointer An unsigned 32bit descriptor address value.
Returns:
void

References dar_count, and os_write32.

Referenced by sah_Handle_Interrupt(), sah_HW_Reset(), and sah_Queue_Manager_Prime().

sah_Execute_Status sah_Wait_On_Sahara ( void   ) 

Polls Sahara to determine when its current operation is complete

Returns:
last value found in Sahara's status register

References sah_HW_Read_Status().

Referenced by sah_HW_Reset().


Variable Documentation

uint32_t dar_count

Number of descriptors sent to Sahara. This value should only be updated with the main queue lock held.

Referenced by sah_HW_Write_DAR().

footer
©  Freescale Semiconductor, Inc., 2007.  All rights reserved.
Freescale Confidential Proprietary
NDA Required
doxygen