Skip to content

Commit 1fa2e9a

Browse files
Boris BREZILLONherbertx
authored andcommitted
crypto: mv_cesa - explicitly define kirkwood and dove compatible strings
We are about to add a new driver to support new features like using the TDMA engine to offload the CPU. Orion, Dove and Kirkwood platforms are already using the mv_cesa driver, but Orion SoCs do not embed the TDMA engine, which means we will have to differentiate them if we want to get TDMA support on Dove and Kirkwood. In the other hand, the migration from the old driver to the new one is not something all people are willing to do without first auditing the new driver. Hence we have to support the new compatible in the mv_cesa driver so that new platforms with updated DTs can still attach their crypto engine device to this driver. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 51b44fc commit 1fa2e9a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Documentation/devicetree/bindings/crypto/mv_cesa.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
Marvell Cryptographic Engines And Security Accelerator
22

33
Required properties:
4-
- compatible : should be "marvell,orion-crypto"
4+
- compatible: should be one of the following string
5+
"marvell,orion-crypto"
6+
"marvell,kirkwood-crypto"
7+
"marvell,dove-crypto"
58
- reg: base physical address of the engine and length of memory mapped
69
region. Can also contain an entry for the SRAM attached to the CESA,
710
but this representation is deprecated and marvell,crypto-srams should

drivers/crypto/mv_cesa.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ static int mv_cesa_get_sram(struct platform_device *pdev,
10341034
&sram_size);
10351035

10361036
cp->sram_size = sram_size;
1037-
cp->sram_pool = of_get_named_gen_pool(&pdev->dev.of_node,
1037+
cp->sram_pool = of_get_named_gen_pool(pdev->dev.of_node,
10381038
"marvell,crypto-srams", 0);
10391039
if (cp->sram_pool) {
10401040
cp->sram = gen_pool_dma_alloc(cp->sram_pool, sram_size,
@@ -1197,6 +1197,8 @@ static int mv_remove(struct platform_device *pdev)
11971197

11981198
static const struct of_device_id mv_cesa_of_match_table[] = {
11991199
{ .compatible = "marvell,orion-crypto", },
1200+
{ .compatible = "marvell,kirkwood-crypto", },
1201+
{ .compatible = "marvell,dove-crypto", },
12001202
{}
12011203
};
12021204
MODULE_DEVICE_TABLE(of, mv_cesa_of_match_table);

0 commit comments

Comments
 (0)