summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/ux500/cryp/cryp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/crypto/ux500/cryp/cryp.c')
-rw-r--r--drivers/crypto/ux500/cryp/cryp.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/crypto/ux500/cryp/cryp.c b/drivers/crypto/ux500/cryp/cryp.c
index bd206ffc25df..e208ceaf81c9 100644
--- a/drivers/crypto/ux500/cryp/cryp.c
+++ b/drivers/crypto/ux500/cryp/cryp.c
@@ -37,18 +37,16 @@ int cryp_check(struct cryp_device_data *device_data)
if (NULL == device_data)
return -EINVAL;
- if (cpu_is_u8500())
- peripheralid2 = CRYP_PERIPHERAL_ID2_DB8500;
- else if (cpu_is_u5500())
- peripheralid2 = CRYP_PERIPHERAL_ID2_DB5500;
+ peripheralid2 = readl_relaxed(&device_data->base->periphId2);
+
+ if (peripheralid2 != CRYP_PERIPHERAL_ID2_DB8500)
+ return -EPERM;
/* Check Peripheral and Pcell Id Register for CRYP */
if ((CRYP_PERIPHERAL_ID0 ==
readl_relaxed(&device_data->base->periphId0))
&& (CRYP_PERIPHERAL_ID1 ==
readl_relaxed(&device_data->base->periphId1))
- && (peripheralid2 ==
- readl_relaxed(&device_data->base->periphId2))
&& (CRYP_PERIPHERAL_ID3 ==
readl_relaxed(&device_data->base->periphId3))
&& (CRYP_PCELL_ID0 ==