Skip to content
Snippets Groups Projects
Commit 72404255 authored by Arnaud Ebalard's avatar Arnaud Ebalard Committed by Herbert Xu
Browse files

crypto: marvell/cesa - add support for Kirkwood and Dove SoCs


Add the Kirkwood and Dove SoC descriptions, and control the allhwsupport
module parameter to avoid probing the CESA IP when the old CESA driver is
enabled (unless it is explicitly requested to do so).

Signed-off-by: default avatarArnaud Ebalard <arno@natisbad.org>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 0bf69489
No related branches found
No related tags found
No related merge requests found
...@@ -215,6 +215,15 @@ static const struct mv_cesa_caps orion_caps = { ...@@ -215,6 +215,15 @@ static const struct mv_cesa_caps orion_caps = {
.has_tdma = false, .has_tdma = false,
}; };
static const struct mv_cesa_caps kirkwood_caps = {
.nengines = 1,
.cipher_algs = orion_cipher_algs,
.ncipher_algs = ARRAY_SIZE(orion_cipher_algs),
.ahash_algs = orion_ahash_algs,
.nahash_algs = ARRAY_SIZE(orion_ahash_algs),
.has_tdma = true,
};
static const struct mv_cesa_caps armada_370_caps = { static const struct mv_cesa_caps armada_370_caps = {
.nengines = 1, .nengines = 1,
.cipher_algs = armada_370_cipher_algs, .cipher_algs = armada_370_cipher_algs,
...@@ -235,6 +244,8 @@ static const struct mv_cesa_caps armada_xp_caps = { ...@@ -235,6 +244,8 @@ static const struct mv_cesa_caps armada_xp_caps = {
static const struct of_device_id mv_cesa_of_match_table[] = { static const struct of_device_id mv_cesa_of_match_table[] = {
{ .compatible = "marvell,orion-crypto", .data = &orion_caps }, { .compatible = "marvell,orion-crypto", .data = &orion_caps },
{ .compatible = "marvell,kirkwood-crypto", .data = &kirkwood_caps },
{ .compatible = "marvell,dove-crypto", .data = &kirkwood_caps },
{ .compatible = "marvell,armada-370-crypto", .data = &armada_370_caps }, { .compatible = "marvell,armada-370-crypto", .data = &armada_370_caps },
{ .compatible = "marvell,armada-xp-crypto", .data = &armada_xp_caps }, { .compatible = "marvell,armada-xp-crypto", .data = &armada_xp_caps },
{ .compatible = "marvell,armada-375-crypto", .data = &armada_xp_caps }, { .compatible = "marvell,armada-375-crypto", .data = &armada_xp_caps },
...@@ -383,7 +394,7 @@ static int mv_cesa_probe(struct platform_device *pdev) ...@@ -383,7 +394,7 @@ static int mv_cesa_probe(struct platform_device *pdev)
caps = match->data; caps = match->data;
} }
if (caps == &orion_caps && !allhwsupport) if ((caps == &orion_caps || caps == &kirkwood_caps) && !allhwsupport)
return -ENOTSUPP; return -ENOTSUPP;
cesa = devm_kzalloc(dev, sizeof(*cesa), GFP_KERNEL); cesa = devm_kzalloc(dev, sizeof(*cesa), GFP_KERNEL);
......
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