Skip to content

Commit

Permalink
crypto: mv_cesa - explicitly define kirkwood and dove compatible strings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Boris BREZILLON authored and herbertx committed Jun 19, 2015
1 parent 51b44fc commit 1fa2e9a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Documentation/devicetree/bindings/crypto/mv_cesa.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
Marvell Cryptographic Engines And Security Accelerator

Required properties:
- compatible : should be "marvell,orion-crypto"
- compatible: should be one of the following string
"marvell,orion-crypto"
"marvell,kirkwood-crypto"
"marvell,dove-crypto"
- reg: base physical address of the engine and length of memory mapped
region. Can also contain an entry for the SRAM attached to the CESA,
but this representation is deprecated and marvell,crypto-srams should
Expand Down
4 changes: 3 additions & 1 deletion drivers/crypto/mv_cesa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ static int mv_cesa_get_sram(struct platform_device *pdev,
&sram_size);

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

static const struct of_device_id mv_cesa_of_match_table[] = {
{ .compatible = "marvell,orion-crypto", },
{ .compatible = "marvell,kirkwood-crypto", },
{ .compatible = "marvell,dove-crypto", },
{}
};
MODULE_DEVICE_TABLE(of, mv_cesa_of_match_table);
Expand Down

0 comments on commit 1fa2e9a

Please sign in to comment.