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

mxc_scc_internals.h File Reference


Detailed Description

This is intended to be the file which contains most or all of the code or changes need to port the driver. It also includes other definitions needed by the driver.

This header file should only ever be included by scc_driver.c

Compile-time flags minimally needed:

Some changes which could be made when porting this driver: SCC_SPIN_COUNT

Definition in file mxc_scc_internals.h.

#include <linux/mxc_scc_driver.h>

Go to the source code of this file.

Classes

struct  scc_key_slot

Defines

#define CALC_CRC(byte_value, running_crc)
#define CRC_CCITT_START   0xFFFF
#define CRC_POLYNOMIAL   0x1021
#define CRC_SIZE_BYTES   (sizeof(crc_t))
#define FALSE   0
#define IRQ_HANDLED
#define IRQ_NONE
#define IRQ_RETVAL(x)
#define irqreturn_t   void
#define PADDING_BUFFER_MAX_BYTES   (CRC_SIZE_BYTES + sizeof(scc_block_padding))
#define SCC_BLOCK_SIZE_BYTES()   scc_configuration.block_size_bytes
#define SCC_BYTE_OFFSET(bp)   ((uint32_t)(bp) % sizeof(uint32_t))
#define SCC_CALLBACK_SIZE   4
#define SCC_CIPHER_MAX_POLL_COUNT   100
#define SCC_DRIVER_NAME   "scc"
#define SCC_DRIVER_PAD_CHAR   0x80
#define SCC_KEY_SLOT_SIZE   32
#define SCC_KEY_SLOTS   20
#define SCC_MAX_KEY_SIZE   32
#define SCC_READ_REGISTER(offset)   __raw_readl(scc_base+(offset))
#define SCC_SPIN_COUNT   1000
#define SCC_WORD_PTR(bp)   (((uint32_t)(bp)) & ~(sizeof(uint32_t)-1))
#define SCC_WRITE_REGISTER(offset, value)   (void)__raw_writel(value, scc_base+(offset))
#define SCM_NON_RESERVED_OFFSET   (SCC_KEY_SLOTS * SCC_KEY_SLOT_SIZE)
#define TRUE   1

Typedefs

typedef uint16_t crc_t

Enumerations

enum  scc_status {
  SCC_STATUS_INITIAL, SCC_STATUS_CHECKING, SCC_STATUS_UNIMPLEMENTED, SCC_STATUS_OK,
  SCC_STATUS_FAILED, SCC_STATUS_INITIAL, SCC_STATUS_CHECKING, SCC_STATUS_UNIMPLEMENTED,
  SCC_STATUS_OK, SCC_STATUS_FAILED
}

Functions

static scc_return_t check_register_accessible (uint32_t offset, uint32_t smn_status, uint32_t scm_status)
static scc_return_t check_register_offset (uint32_t offset)
static uint32_t copy_from_scc (const uint32_t from, uint8_t *to, unsigned long count_bytes, uint16_t *crc)
static uint32_t copy_to_scc (const uint8_t *from, uint32_t to, unsigned long count_bytes, uint16_t *crc)
 EXPORT_SYMBOL (scc_get_slot_info)
 EXPORT_SYMBOL (scc_decrypt_slot)
 EXPORT_SYMBOL (scc_encrypt_slot)
 EXPORT_SYMBOL (scc_load_slot)
 EXPORT_SYMBOL (scc_dealloc_slot)
 EXPORT_SYMBOL (scc_alloc_slot)
 EXPORT_SYMBOL (scc_write_register)
 EXPORT_SYMBOL (scc_read_register)
 EXPORT_SYMBOL (scc_stop_monitoring_security_failure)
 EXPORT_SYMBOL (scc_monitor_security_failure)
 EXPORT_SYMBOL (scc_set_sw_alarm)
 EXPORT_SYMBOL (scc_crypt)
 EXPORT_SYMBOL (scc_zeroize_memories)
 EXPORT_SYMBOL (scc_get_configuration)
static int is_cipher_done (void)
 MODULE_AUTHOR ("Freescale Semiconductor, Inc.")
 MODULE_DESCRIPTION ("Device Driver for SCC (SMN/SCM)")
 module_exit (scc_cleanup)
 module_init (scc_init)
 MODULE_LICENSE ("GPL")
 OS_DEV_ISR (scc_irq)
static void scc_cleanup (void)
static scc_return_t scc_decrypt (uint32_t count_in_bytes, const uint8_t *data_in, uint32_t scm_control, uint8_t *data_out, int verify_crc, unsigned long *count_out_bytes)
static scc_return_t scc_encrypt (uint32_t count_in_bytes, const uint8_t *data_in, uint32_t scm_control, uint8_t *data_out, int add_crc, unsigned long *count_out_bytes)
static uint32_t scc_grab_config_values (void)
static int scc_init (void)
static void scc_init_ccitt_crc (void)
static void scc_perform_callbacks (void)
static scc_return_t scc_strip_padding (uint8_t *from, unsigned *count_bytes_stripped)
static uint32_t scc_update_state (void)
static void scc_wait_completion (void)
static int setup_interrupt_handling (void)


Generated by  Doxygen 1.6.0   Back to index