Skip to content

crypto: caam - Add i.MX8MQ support

Andrey Smirnov linux-crypto lkml 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest16 patches 7 repliesIn review
  2. v715 patches 3 repliesSuperseded
  3. v614 patches 14 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v514 patches2 repliesSuperseded
v416 patches8 repliesSuperseded
v35 patches6 repliesSuperseded
v24 patches4 repliesSuperseded

Changes in v8 from the cover letter

- Series rebase on latest cryptodev-2.6 (198429631a85)

- "crypto: caam - force DMA address to 32-bit on 64-bit i.MX SoCs" converted to use CTPR and MCFGR to determine CAAM pointer width and renamed to "crypto: caam - select DMA address size at runtime"

- Patch adding corresponding DT node added to the series

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16crypto: caam - move DMA mask selection into a functiondrivers/crypto/caam/ctrl.c drivers/crypto/caam/intern.h drivers/crypto/caam/jr.c+22 -240 replies
2/16crypto: caam - simplfy clock initializationdrivers/crypto/caam/ctrl.c drivers/crypto/caam/intern.h+95 -1100 replies
3/16crypto: caam - convert caam_jr_init() to use devresdrivers/crypto/caam/jr.c+14 -340 replies
4/16crypto: caam - request JR IRQ as the last stepdrivers/crypto/caam/jr.c+15 -190 replies
5/16crytpo: caam - make use of iowrite64*_hi_lo in wr_reg64drivers/crypto/caam/regs.h+9 -50 replies
6/16crypto: caam - use ioread64*_hi_lo in rd_reg64drivers/crypto/caam/regs.h+13 -50 replies
7/16crypto: caam - drop 64-bit only wr/rd_reg64()drivers/crypto/caam/regs.h+0 -190 replies
8/16crypto: caam - share definition for MAX_SDLENdrivers/crypto/caam/caamalg_qi2.h drivers/crypto/caam/desc_constr.h drivers/crypto/caam/qi.h+27 -530 replies
9/16crypto: caam - make CAAM_PTR_SZ dynamicdrivers/crypto/caam/caamalg.c drivers/crypto/caam/caamhash.c drivers/crypto/caam/caamrng.c +3 more+16 -60 replies
10/16crypto: caam - move cpu_to_caam_dma() selection to runtimedrivers/crypto/caam/regs.h+15 -70 replies
11/16crypto: caam - drop explicit usage of struct jr_outentrydrivers/crypto/caam/intern.h drivers/crypto/caam/jr.c drivers/crypto/caam/regs.h+43 -90 replies
12/16crypto: caam - don't hardcode inpentry sizedrivers/crypto/caam/intern.h drivers/crypto/caam/jr.c drivers/crypto/caam/regs.h+13 -30 replies
13/16crypto: caam - select DMA address size at runtimedrivers/crypto/caam/caampkc.c drivers/crypto/caam/ctrl.c drivers/crypto/caam/desc_constr.h +4 more+63 -261 reply
14/16crypto: caam - always select job ring via RSR on i.MX8MQdrivers/crypto/caam/ctrl.c+6 -10 replies
15/16crypto: caam - add clock entry for i.MX8MQdrivers/crypto/caam/ctrl.c+1 -00 replies
16/16arm64: dts: imx8mq: Add CAAM nodearch/arm64/boot/dts/freescale/imx8mq.dtsi+30 -00 replies

Reviews trailers per patch

6 of 16 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchHoria GeantăLeonard CrestezIuliana Prodan
SeriesR-b
1/16R-b
2/16R-b T-b
3/16R-b
4/16
5/16R-b
6/16R-b
7/16R-b
8/16
9/16
10/16
11/16
12/16
13/16
14/16
15/16
16/16

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v8 thread

Cover letter [PATCH v8 00/16] crypto: caam - Add i.MX8MQ support

Everyone:

Picking up where Chris left off (I chatted with him privately beforehead), this series adds support for i.MX8MQ to CAAM driver. Just like [v1], this series is i.MX8MQ only.

Feedback is welcome!
Thanks,
Andrey Smirnov

Changes since [v7]:

- Series rebase on latest cryptodev-2.6 (198429631a85)

- "crypto: caam - force DMA address to 32-bit on 64-bit i.MX SoCs" converted to use CTPR and MCFGR to determine CAAM pointer width and renamed to "crypto: caam - select DMA address size at runtime"

- Patch adding corresponding DT node added to the series

Changes since [v6]:

- Fixed build problems in "crypto: caam - make CAAM_PTR_SZ dynamic"

- Collected Reviewied-by from Horia

- "crypto: caam - force DMA address to 32-bit on 64-bit i.MX SoCs" is changed to check 'caam_ptr_sz' instead of using 'caam_imx'

- Incorporated feedback for "crypto: caam - request JR IRQ as the last step" and "crypto: caam - simplfy clock initialization"

Changes since [v5]:

- Hunk replacing sizeof(*jrp->inpring) to SIZEOF_JR_INPENTRY in "crypto: caam - don't hardcode inpentry size", lost in [v5], is back

- Collected Tested-by from Iuliana

Changes since [v4]:

- Fixed missing sentinel element in "crypto: caam - simplfy clock initialization"

- Squashed all of the devers related patches into a single one and converted IRQ allocation to use devres while at it

- Added "crypto: caam - request JR IRQ as the last step" as discussed

Changes since [v3]:

- Patchset changed to select DMA size at runtime in order to enable support for both i.MX8MQ and Layerscape at the same time. I only tested the patches on i.MX6,7 and 8MQ, since I don't have access to any of the Layerscape HW. Any help in that regard would be appareciated.

- Bulk clocks and their number are now stored as a part of struct caam_drv_private to simplify allocation and cleanup code (no special context needed)

- Renamed 'soc_attr' -> 'imx_soc_match' for clarity

Changes since [v2]:

- Dropped "crypto: caam - do not initialise clocks on the i.MX8" and replaced it with "crypto: caam - simplfy clock initialization" and "crypto: caam - add clock entry for i.MX8MQ"

Changes since [v1]

- Series reworked to continue using register based interface for queueing RNG initialization job, dropping "crypto: caam - use job ring for RNG instantiation instead of DECO"

- Added a patch to share DMA mask selection code

- Added missing Signed-off-by for authors of original NXP tree commits that this sereis is based on

[v7] lore.kernel.org/r/[email protected] [v6] lore.kernel.org/r/[email protected] [v5] lore.kernel.org/r/[email protected] [v4] lore.kernel.org/r/[email protected] [v3] lore.kernel.org/r/[email protected] [v2] lore.kernel.org/r/[email protected] [v1] https://patchwork.kernel.org/cover/10825625/

Andrey Smirnov (16):
crypto: caam - move DMA mask selection into a function
crypto: caam - simplfy clock initialization
crypto: caam - convert caam_jr_init() to use devres
crypto: caam - request JR IRQ as the last step
crytpo: caam - make use of iowrite64*_hi_lo in wr_reg64
crypto: caam - use ioread64*_hi_lo in rd_reg64
crypto: caam - drop 64-bit only wr/rd_reg64()
crypto: caam - share definition for MAX_SDLEN
crypto: caam - make CAAM_PTR_SZ dynamic
crypto: caam - move cpu_to_caam_dma() selection to runtime
crypto: caam - drop explicit usage of struct jr_outentry
crypto: caam - don't hardcode inpentry size
crypto: caam - select DMA address size at runtime
crypto: caam - always select job ring via RSR on i.MX8MQ
crypto: caam - add clock entry for i.MX8MQ
arm64: dts: imx8mq: Add CAAM node

 arch/arm64/boot/dts/freescale/imx8mq.dtsi |  30 +++
 drivers/crypto/caam/caamalg.c             |   2 +-
 drivers/crypto/caam/caamalg_qi2.h         |  27 ---
 drivers/crypto/caam/caamhash.c            |   2 +-
 drivers/crypto/caam/caampkc.c             |   8 +-
 drivers/crypto/caam/caamrng.c             |   2 +-
 drivers/crypto/caam/ctrl.c                | 221 ++++++++++------------
 drivers/crypto/caam/desc_constr.h         |  47 ++++-
 drivers/crypto/caam/error.c               |   3 +
 drivers/crypto/caam/intern.h              |  32 +++-
 drivers/crypto/caam/jr.c                  |  93 +++------
 drivers/crypto/caam/pdb.h                 |  16 +-
 drivers/crypto/caam/pkc_desc.c            |   8 +-
 drivers/crypto/caam/qi.h                  |  26 ---
 drivers/crypto/caam/regs.h                | 140 ++++++++++----
 15 files changed, 359 insertions(+), 298 deletions(-)
Signature · 1 line
2.21.0