Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Boris BREZILLON and committed by
Herbert Xu
1fa2e9ae 51b44fc8

+7 -2
+4 -1
Documentation/devicetree/bindings/crypto/mv_cesa.txt
··· 1 1 Marvell Cryptographic Engines And Security Accelerator 2 2 3 3 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" 5 8 - reg: base physical address of the engine and length of memory mapped 6 9 region. Can also contain an entry for the SRAM attached to the CESA, 7 10 but this representation is deprecated and marvell,crypto-srams should
+3 -1
drivers/crypto/mv_cesa.c
··· 1034 1034 &sram_size); 1035 1035 1036 1036 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, 1038 1038 "marvell,crypto-srams", 0); 1039 1039 if (cp->sram_pool) { 1040 1040 cp->sram = gen_pool_dma_alloc(cp->sram_pool, sram_size, ··· 1197 1197 1198 1198 static const struct of_device_id mv_cesa_of_match_table[] = { 1199 1199 { .compatible = "marvell,orion-crypto", }, 1200 + { .compatible = "marvell,kirkwood-crypto", }, 1201 + { .compatible = "marvell,dove-crypto", }, 1200 1202 {} 1201 1203 }; 1202 1204 MODULE_DEVICE_TABLE(of, mv_cesa_of_match_table);