diff options
author | Andreas Westin <andreas.westin@stericsson.com> | 2012-05-10 08:14:08 (GMT) |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2012-05-15 07:25:33 (GMT) |
commit | d1cbb1447bca8eaa28b7a384365932b49c47811f (patch) | |
tree | 808a62ab2015d511f0dd1e6d0e0ed01ff70e1234 /drivers/crypto/ux500/cryp | |
parent | f7329e71626c977fee672710142eb34ed7d021c7 (diff) | |
download | linux-d1cbb1447bca8eaa28b7a384365932b49c47811f.tar.xz |
crypto: ux500 - Cleanup hardware identification
Don't use SOC specific functions to identify
which crypto hardware we are talking to and use
the ID provided in the module instead.
Signed-off-by: Andreas Westin <andreas.westin@stericsson.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ux500/cryp')
-rw-r--r-- | drivers/crypto/ux500/cryp/cryp.c | 10 | ||||
-rw-r--r-- | drivers/crypto/ux500/cryp/cryp_p.h | 1 |
2 files changed, 4 insertions, 7 deletions
diff --git a/drivers/crypto/ux500/cryp/cryp.c b/drivers/crypto/ux500/cryp/cryp.c index bd206ff..e208cea 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 == diff --git a/drivers/crypto/ux500/cryp/cryp_p.h b/drivers/crypto/ux500/cryp/cryp_p.h index 0e07082..6dcffe1 100644 --- a/drivers/crypto/ux500/cryp/cryp_p.h +++ b/drivers/crypto/ux500/cryp/cryp_p.h @@ -41,7 +41,6 @@ #define CRYP_PERIPHERAL_ID1 0x05 #define CRYP_PERIPHERAL_ID2_DB8500 0x28 -#define CRYP_PERIPHERAL_ID2_DB5500 0x29 #define CRYP_PERIPHERAL_ID3 0x00 #define CRYP_PCELL_ID0 0x0D |