Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
cryp.c File Reference
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <mach/hardware.h>
#include "cryp_p.h"
#include "cryp.h"

Go to the source code of this file.

Functions

void cryp_wait_until_done (struct cryp_device_data *device_data)
 
int cryp_check (struct cryp_device_data *device_data)
 
void cryp_activity (struct cryp_device_data *device_data, enum cryp_crypen cryp_crypen)
 
void cryp_flush_inoutfifo (struct cryp_device_data *device_data)
 
int cryp_set_configuration (struct cryp_device_data *device_data, struct cryp_config *cryp_config, u32 *control_register)
 
int cryp_configure_protection (struct cryp_device_data *device_data, struct cryp_protection_config *p_protect_config)
 
int cryp_is_logic_busy (struct cryp_device_data *device_data)
 
void cryp_configure_for_dma (struct cryp_device_data *device_data, enum cryp_dma_req_type dma_req)
 
int cryp_configure_key_values (struct cryp_device_data *device_data, enum cryp_key_reg_index key_reg_index, struct cryp_key_value key_value)
 
int cryp_configure_init_vector (struct cryp_device_data *device_data, enum cryp_init_vector_index init_vector_index, struct cryp_init_vector_value init_vector_value)
 
void cryp_save_device_context (struct cryp_device_data *device_data, struct cryp_device_context *ctx, int cryp_mode)
 
void cryp_restore_device_context (struct cryp_device_data *device_data, struct cryp_device_context *ctx)
 

Function Documentation

void cryp_activity ( struct cryp_device_data device_data,
enum cryp_crypen cryp_crypen   
)

cryp_activity - This routine enables/disable the cryptography function. : Pointer to the device data struct for base address. : Enable/Disable functionality

Definition at line 71 of file cryp.c.

int cryp_check ( struct cryp_device_data device_data)

cryp_check - This routine checks Peripheral and PCell Id : Pointer to the device data struct for base address.

Definition at line 33 of file cryp.c.

void cryp_configure_for_dma ( struct cryp_device_data device_data,
enum cryp_dma_req_type  dma_req 
)

cryp_configure_for_dma - configures the CRYP IP for DMA operation : Pointer to the device data struct for base address. : Specifies the DMA request type value.

Definition at line 198 of file cryp.c.

int cryp_configure_init_vector ( struct cryp_device_data device_data,
enum cryp_init_vector_index  init_vector_index,
struct cryp_init_vector_value  init_vector_value 
)

cryp_configure_init_vector - configures the initialization vector register : Pointer to the device data struct for base address. : Specifies the index of the init vector. : Specifies the value for the init vector.

Definition at line 256 of file cryp.c.

int cryp_configure_key_values ( struct cryp_device_data device_data,
enum cryp_key_reg_index  key_reg_index,
struct cryp_key_value  key_value 
)

cryp_configure_key_values - configures the key values for CRYP operations : Pointer to the device data struct for base address. : Key value index register : The key value struct

Definition at line 211 of file cryp.c.

int cryp_configure_protection ( struct cryp_device_data device_data,
struct cryp_protection_config p_protect_config 
)

cryp_configure_protection - set the protection bits in the CRYP logic. : Pointer to the device data struct for base address. : Pointer to the protection mode and secure mode configuration

Definition at line 166 of file cryp.c.

void cryp_flush_inoutfifo ( struct cryp_device_data device_data)

cryp_flush_inoutfifo - Resets both the input and the output FIFOs : Pointer to the device data struct for base address.

Definition at line 84 of file cryp.c.

int cryp_is_logic_busy ( struct cryp_device_data device_data)

cryp_is_logic_busy - returns the busy status of the CRYP logic : Pointer to the device data struct for base address.

Definition at line 187 of file cryp.c.

void cryp_restore_device_context ( struct cryp_device_data device_data,
struct cryp_device_context ctx 
)

cryp_restore_device_context - Restore hardware registers and other device context parameter : Pointer to the device data struct for base address. : Crypto device context

Definition at line 351 of file cryp.c.

void cryp_save_device_context ( struct cryp_device_data device_data,
struct cryp_device_context ctx,
int  cryp_mode 
)

cryp_save_device_context - Store hardware registers and other device context parameter : Pointer to the device data struct for base address. : Crypto device context

Definition at line 291 of file cryp.c.

int cryp_set_configuration ( struct cryp_device_data device_data,
struct cryp_config cryp_config,
u32 control_register 
)

cryp_set_configuration - This routine set the cr CRYP IP : Pointer to the device data struct for base address. : Pointer to the configuration parameter : The control register to be written later on.

Definition at line 112 of file cryp.c.

void cryp_wait_until_done ( struct cryp_device_data device_data)

Copyright (C) ST-Ericsson SA 2010 Author: Shujuan Chen shuju.nosp@m.an.c.nosp@m.hen@s.nosp@m.teri.nosp@m.csson.nosp@m..com for ST-Ericsson. Author: Jonas Linde jonas.nosp@m..lin.nosp@m.de@st.nosp@m.eric.nosp@m.sson..nosp@m.com for ST-Ericsson. Author: Niklas Hernaeus nikla.nosp@m.s.he.nosp@m.rnaeu.nosp@m.s@st.nosp@m.erics.nosp@m.son..nosp@m.com for ST-Ericsson. Author: Joakim Bech joaki.nosp@m.m.xx.nosp@m..bech.nosp@m.@ste.nosp@m.ricss.nosp@m.on.c.nosp@m.om for ST-Ericsson. Author: Berne Hebark berne.nosp@m..her.nosp@m.bark@.nosp@m.ster.nosp@m.icsso.nosp@m.n.co.nosp@m.m for ST-Ericsson. License terms: GNU General Public License (GPL) version 2 cryp_wait_until_done - wait until the device logic is not busy

Definition at line 23 of file cryp.c.