Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
atmel-sha.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/hw_random.h>
#include <linux/platform_device.h>
#include <linux/device.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/scatterlist.h>
#include <linux/dma-mapping.h>
#include <linux/delay.h>
#include <linux/crypto.h>
#include <linux/cryptohash.h>
#include <crypto/scatterwalk.h>
#include <crypto/algapi.h>
#include <crypto/sha.h>
#include <crypto/hash.h>
#include <crypto/internal/hash.h>
#include "atmel-sha-regs.h"

Go to the source code of this file.

Data Structures

struct  atmel_sha_reqctx
 
struct  atmel_sha_ctx
 
struct  atmel_sha_dev
 
struct  atmel_sha_drv
 

Macros

#define SHA_FLAGS_BUSY   BIT(0)
 
#define SHA_FLAGS_FINAL   BIT(1)
 
#define SHA_FLAGS_DMA_ACTIVE   BIT(2)
 
#define SHA_FLAGS_OUTPUT_READY   BIT(3)
 
#define SHA_FLAGS_INIT   BIT(4)
 
#define SHA_FLAGS_CPU   BIT(5)
 
#define SHA_FLAGS_DMA_READY   BIT(6)
 
#define SHA_FLAGS_FINUP   BIT(16)
 
#define SHA_FLAGS_SG   BIT(17)
 
#define SHA_FLAGS_SHA1   BIT(18)
 
#define SHA_FLAGS_SHA256   BIT(19)
 
#define SHA_FLAGS_ERROR   BIT(20)
 
#define SHA_FLAGS_PAD   BIT(21)
 
#define SHA_FLAGS_DUALBUFF   BIT(24)
 
#define SHA_OP_UPDATE   1
 
#define SHA_OP_FINAL   2
 
#define SHA_BUFFER_LEN   PAGE_SIZE
 
#define ATMEL_SHA_DMA_THRESHOLD   56
 
#define ATMEL_SHA_QUEUE_LENGTH   1
 

Functions

 module_platform_driver (atmel_sha_driver)
 
 MODULE_DESCRIPTION ("Atmel SHA1/SHA256 hw acceleration support.")
 
 MODULE_LICENSE ("GPL v2")
 
 MODULE_AUTHOR ("Nicolas Royer - EukrĂ©a Electromatique")
 

Macro Definition Documentation

#define ATMEL_SHA_DMA_THRESHOLD   56

Definition at line 66 of file atmel-sha.c.

#define ATMEL_SHA_QUEUE_LENGTH   1

Definition at line 100 of file atmel-sha.c.

#define SHA_BUFFER_LEN   PAGE_SIZE

Definition at line 64 of file atmel-sha.c.

#define SHA_FLAGS_BUSY   BIT(0)

Definition at line 44 of file atmel-sha.c.

#define SHA_FLAGS_CPU   BIT(5)

Definition at line 49 of file atmel-sha.c.

#define SHA_FLAGS_DMA_ACTIVE   BIT(2)

Definition at line 46 of file atmel-sha.c.

#define SHA_FLAGS_DMA_READY   BIT(6)

Definition at line 50 of file atmel-sha.c.

#define SHA_FLAGS_DUALBUFF   BIT(24)

Definition at line 59 of file atmel-sha.c.

#define SHA_FLAGS_ERROR   BIT(20)

Definition at line 56 of file atmel-sha.c.

#define SHA_FLAGS_FINAL   BIT(1)

Definition at line 45 of file atmel-sha.c.

#define SHA_FLAGS_FINUP   BIT(16)

Definition at line 52 of file atmel-sha.c.

#define SHA_FLAGS_INIT   BIT(4)

Definition at line 48 of file atmel-sha.c.

#define SHA_FLAGS_OUTPUT_READY   BIT(3)

Definition at line 47 of file atmel-sha.c.

#define SHA_FLAGS_PAD   BIT(21)

Definition at line 57 of file atmel-sha.c.

#define SHA_FLAGS_SG   BIT(17)

Definition at line 53 of file atmel-sha.c.

#define SHA_FLAGS_SHA1   BIT(18)

Definition at line 54 of file atmel-sha.c.

#define SHA_FLAGS_SHA256   BIT(19)

Definition at line 55 of file atmel-sha.c.

#define SHA_OP_FINAL   2

Definition at line 62 of file atmel-sha.c.

#define SHA_OP_UPDATE   1

Definition at line 61 of file atmel-sha.c.

Function Documentation

MODULE_AUTHOR ( "Nicolas Royer - EukrĂ©a Electromatique"  )
MODULE_DESCRIPTION ( "Atmel SHA1/SHA256 hw acceleration support."  )
MODULE_LICENSE ( "GPL v2 )
module_platform_driver ( atmel_sha_driver  )