summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/ccp/ccp-dev.h
diff options
context:
space:
mode:
authorGary R Hook <gary.hook@amd.com>2016-03-01 20:49:15 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2016-03-11 14:19:16 +0100
commitc7019c4d739e79d7baaa13c86dcaaedec8113d70 (patch)
treec24da238ee41a0692db13c0903fc7d28b02deb3a /drivers/crypto/ccp/ccp-dev.h
parentcrypto: ccp - Support for multiple CCPs (diff)
downloadlinux-c7019c4d739e79d7baaa13c86dcaaedec8113d70.tar.xz
linux-c7019c4d739e79d7baaa13c86dcaaedec8113d70.zip
crypto: ccp - CCP versioning support
Future hardware may introduce new algorithms wherein the driver will need to manage resources for different versions of the cryptographic coprocessor. This precursor patch determines the version of the available device, and marks and registers algorithms accordingly. A structure is added which manages the version-specific data. Signed-off-by: Gary R Hook <gary.hook@amd.com> Acked-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccp/ccp-dev.h')
-rw-r--r--drivers/crypto/ccp/ccp-dev.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/crypto/ccp/ccp-dev.h b/drivers/crypto/ccp/ccp-dev.h
index 974dc055e0ab..90a8cc8c7d46 100644
--- a/drivers/crypto/ccp/ccp-dev.h
+++ b/drivers/crypto/ccp/ccp-dev.h
@@ -141,6 +141,13 @@
#define CCP_ECC_RESULT_OFFSET 60
#define CCP_ECC_RESULT_SUCCESS 0x0001
+/* Structure to hold CCP version-specific values */
+struct ccp_vdata {
+ unsigned int version;
+};
+
+extern struct ccp_vdata ccpv3;
+
struct ccp_device;
struct ccp_cmd;
@@ -187,6 +194,7 @@ struct ccp_cmd_queue {
struct ccp_device {
struct list_head entry;
+ struct ccp_vdata *vdata;
unsigned int ord;
char name[MAX_CCP_NAME_LEN];
char rngname[MAX_CCP_NAME_LEN];