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

scc2_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 scc2_driver.c

Compile-time flags minimally needed:

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

Definition in file scc2_internals.h.

#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/spinlock.h>
#include <linux/io.h>
#include <linux/interrupt.h>
#include <linux/mxc_scc2_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   0
#define SCC_MAX_KEY_SIZE   256
#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_PART_ADDRESS(part)   (scm_ram_base + (part*scc_configuration.partition_size_bytes))
#define SCM_PART_NUMBER(address)   ((address - (uint32_t)scm_ram_base)/scc_configuration.partition_size_bytes)
#define SCM_PART_PHYS_ADDRESS(part)   ((uint32_t)scm_ram_phys_base + (part*scc_configuration.partition_size_bytes))
#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)
 EXPORT_SYMBOL (scc_decrypt_region)
 EXPORT_SYMBOL (scc_encrypt_region)
 EXPORT_SYMBOL (scc_diminish_permissions)
 EXPORT_SYMBOL (scc_release_partition)
 EXPORT_SYMBOL (scc_engage_partition)
 EXPORT_SYMBOL (scc_allocate_partition)
 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_zeroize_memories)
 EXPORT_SYMBOL (scc_get_configuration)
static uint32_t host_owns_partition (uint32_t part_no)
static int is_cipher_done (uint32_t *scm_status)
 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 uint32_t partition_engaged (uint32_t part_no)
static void scc_cleanup (void)
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 uint32_t scc_update_state (void)
static scc_return_t scc_wait_completion (uint32_t *scm_status)
static int setup_interrupt_handling (void)


Generated by  Doxygen 1.6.0   Back to index