/* * Intel IXP4xx NPE-C crypto driver * * Copyright (C) 2008 Christian Hohnstaedt <chohnstaedt@innominate.com> * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License * as published by the Free Software Foundation. * */#include<linux/platform_device.h>#include<linux/dma-mapping.h>#include<linux/dmapool.h>#include<linux/crypto.h>#include<linux/kernel.h>#include<linux/rtnetlink.h>#include<linux/interrupt.h>#include<linux/spinlock.h>#include<linux/gfp.h>#include<linux/module.h>#include<crypto/ctr.h>#include<crypto/des.h>#include<crypto/aes.h>#include<crypto/hmac.h>#include<crypto/sha.h>#include<crypto/algapi.h>#include<crypto/internal/aead.h>#include<crypto/authenc.h>#include<crypto/scatterwalk.h>#include<linux/soc/ixp4xx/npe.h>#include<linux/soc/ixp4xx/qmgr.h>#define MAX_KEYLEN 32/* hash: cfgword + 2 * digestlen; crypt: keylen + cfgword */#define NPE_CTX_LEN 80#define AES_BLOCK128 16#define NPE_OP_HASH_VERIFY 0x01#define NPE_OP_CCM_