From c7019c4d739e79d7baaa13c86dcaaedec8113d70 Mon Sep 17 00:00:00 2001 From: Gary R Hook Date: Tue, 1 Mar 2016 13:49:15 -0600 Subject: 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 Acked-by: Tom Lendacky Signed-off-by: Herbert Xu --- drivers/crypto/ccp/ccp-dev.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/crypto/ccp/ccp-dev.h') 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]; -- cgit v1.2.3