Commit 9fe712df authored by Horia Geantă's avatar Horia Geantă Committed by Herbert Xu

crypto: caam - save Era in driver's private data

Save Era in driver's private data for further usage,
like deciding whether an erratum applies or a feature is available
based on its value.
Signed-off-by: default avatarHoria Geantă <horia.geanta@nxp.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 662f70ed
...@@ -611,6 +611,8 @@ static int caam_probe(struct platform_device *pdev) ...@@ -611,6 +611,8 @@ static int caam_probe(struct platform_device *pdev)
goto iounmap_ctrl; goto iounmap_ctrl;
} }
ctrlpriv->era = caam_get_era();
ret = of_platform_populate(nprop, caam_match, NULL, dev); ret = of_platform_populate(nprop, caam_match, NULL, dev);
if (ret) { if (ret) {
dev_err(dev, "JR platform devices creation error\n"); dev_err(dev, "JR platform devices creation error\n");
...@@ -742,7 +744,7 @@ static int caam_probe(struct platform_device *pdev) ...@@ -742,7 +744,7 @@ static int caam_probe(struct platform_device *pdev)
/* Report "alive" for developer to see */ /* Report "alive" for developer to see */
dev_info(dev, "device ID = 0x%016llx (Era %d)\n", caam_id, dev_info(dev, "device ID = 0x%016llx (Era %d)\n", caam_id,
caam_get_era()); ctrlpriv->era);
dev_info(dev, "job rings = %d, qi = %d, dpaa2 = %s\n", dev_info(dev, "job rings = %d, qi = %d, dpaa2 = %s\n",
ctrlpriv->total_jobrs, ctrlpriv->qi_present, ctrlpriv->total_jobrs, ctrlpriv->qi_present,
caam_dpaa2 ? "yes" : "no"); caam_dpaa2 ? "yes" : "no");
......
...@@ -84,6 +84,7 @@ struct caam_drv_private { ...@@ -84,6 +84,7 @@ struct caam_drv_private {
u8 qi_present; /* Nonzero if QI present in device */ u8 qi_present; /* Nonzero if QI present in device */
int secvio_irq; /* Security violation interrupt number */ int secvio_irq; /* Security violation interrupt number */
int virt_en; /* Virtualization enabled in CAAM */ int virt_en; /* Virtualization enabled in CAAM */
int era; /* CAAM Era (internal HW revision) */
#define RNG4_MAX_HANDLES 2 #define RNG4_MAX_HANDLES 2
/* RNG4 block */ /* RNG4 block */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment