/* * Cryptographic API. * * Support for ATMEL DES/TDES HW acceleration. * * Copyright (c) 2012 Eukréa Electromatique - ATMEL * Author: Nicolas Royer <nicolas@eukrea.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as published * by the Free Software Foundation. * * Some ideas are from omap-aes.c drivers. */#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/of_device.h>#include<linux/delay.h>#include<linux/crypto.h>#include<linux/cryptohash.h>#include<crypto/scatterwalk.h>#include<crypto/algapi.h>#include<crypto/des.h>#include<crypto/hash.h>#include<crypto/internal/hash.h>#include<linux/platform_data/crypto-atmel.h>#include"atmel-tdes-regs.h"/* TDES flags */#define TDES_FLAGS_MODE_MASK 0x00ff#define TDES_FLAGS_ENCRYPT BIT(0)#define TDES_FLAGS_CBC BIT(1)#define TDES_FLAGS_CFB B