Bläddra i källkod

crypto: sa2ul: Add a member to store base address

Add a member to store base address of sa2ul in the
sa_crypto_data struct.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Keerthy 6 år sedan
förälder
incheckning
ff2ba370ef
2 ändrade filer med 3 tillägg och 0 borttagningar
  1. 1 0
      drivers/crypto/sa2ul.c
  2. 2 0
      drivers/crypto/sa2ul.h

+ 1 - 0
drivers/crypto/sa2ul.c

@@ -2183,6 +2183,7 @@ static int sa_ul_probe(struct platform_device *pdev)
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	saul_base = devm_ioremap_resource(dev, res);
 
+	dev_data->base = saul_base;
 	val = SA_EEC_ENCSS_EN | SA_EEC_AUTHSS_EN | SA_EEC_CTXCACH_EN |
 	    SA_EEC_CPPI_PORT_IN_EN | SA_EEC_CPPI_PORT_OUT_EN | SA_EEC_TRNG_EN;
 

+ 2 - 0
drivers/crypto/sa2ul.h

@@ -157,6 +157,7 @@ struct sa_tfm_ctx;
 
 /**
  * struct sa_crypto_data - Crypto driver instance data
+ * @base: Base address of the register space
  * @pdev: Platform device pointer
  * @sc_pool: security context pool
  * @dev: Device pointer
@@ -171,6 +172,7 @@ struct sa_tfm_ctx;
  * @dma_tx: Pointer to DMA TX channel
  */
 struct sa_crypto_data {
+	void __iomem *base;
 	struct platform_device	*pdev;
 	struct dma_pool		*sc_pool;
 	struct device *dev;