linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v12 0/4] Add Loongson Security Engine chip driver
@ 2025-07-05  7:20 Qunqin Zhao
  2025-07-05  7:20 ` [PATCH v12 1/4] mfd: Add support for Loongson Security Engine chip controller Qunqin Zhao
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Qunqin Zhao @ 2025-07-05  7:20 UTC (permalink / raw)
  To: lee, herbert, jarkko
  Cc: linux-kernel, loongarch, davem, linux-crypto, peterhuewe, jgg,
	linux-integrity, Qunqin Zhao

The Loongson Security Engine chip supports RNG, SM2, SM3 and SM4
accelerator engines. Each engine have its own DMA buffer provided
by the controller. The kernel cannot directly send commands to the
engine and must first send them to the controller, which will
forward them to the corresponding engine. Based on these engines,
TPM2 have been implemented in the chip, then let's treat TPM2 itself
as an engine.

v12: "loongson-tpm" -> "tmp_loongson"

v11: Put all updates to the MAINTAINERS in one patch
     crypto: statically initialize rng_devices.lock, use this lock in
             loongson_rng_probe().

v10: mfd: Cleanned up coding style.
     crypto: Unlimited tfm
     tpm: Added error check

v9: Moved the base driver back to drivers/mfd. Cleanned up coding style.

v8: Like Lee said, the base driver goes beyond MFD scope. Since these
    are all encryption related drivers and SM2, SM3, and SM4 drivers
    will be added to the crypto subsystem in the future, the base driver
    need to be changed when adding these drivers. Therefore, it may be
    more appropriate to place the base driver within the crypto
    subsystem.

    Removed complete callback in all driver. Removed the concepts of
    "channel", "msg" and "request" as they may be confusing. Used the
    concepts of "egnine" and "command" may be better.

v7: Addressed Huacai's comments.

v6: mfd :MFD_LS6000SE -> MFD_LOONGSON_SE,  ls6000se.c -> loongson-se.c

    crypto :CRYPTO_DEV_LS6000SE_RNG -> CRYPTO_DEV_LOONGSON_RNG,
    ls6000se-rng.c ->loongson-rng.c

    tpm: TCG_LSSE -> TCG_LOONGSON, tpm_lsse.c ->tpm_loongson.c

v5: mfd: Registered "ls6000se-rng" device in mfd driver
    tpm: Prefix all with tpm_loongson instead of tpm_lsse.
         Replace all "ls6000se" with "loongson"

v4: tpm: Removed MODULE_AUTHOR fields.
         Prefix all with tpm_lsse instead of tpm.

v3: Put the updates to the MAINTAINERS in a separate patch.
    tpm: Added reminder about Loongson security engine to git log.

v2: Removed misc driver. Added tpm driver.

Qunqin Zhao (4):
  mfd: Add support for Loongson Security Engine chip controller
  crypto: loongson - add Loongson RNG driver support
  tpm: Add a driver for Loongson TPM device
  MAINTAINERS: Add entry for Loongson Security Engine drivers

 MAINTAINERS                            |   9 +
 drivers/char/tpm/Kconfig               |   9 +
 drivers/char/tpm/Makefile              |   1 +
 drivers/char/tpm/tpm_loongson.c        |  84 ++++++++
 drivers/crypto/Kconfig                 |   1 +
 drivers/crypto/Makefile                |   1 +
 drivers/crypto/loongson/Kconfig        |   5 +
 drivers/crypto/loongson/Makefile       |   1 +
 drivers/crypto/loongson/loongson-rng.c | 209 ++++++++++++++++++++
 drivers/mfd/Kconfig                    |  11 ++
 drivers/mfd/Makefile                   |   2 +
 drivers/mfd/loongson-se.c              | 253 +++++++++++++++++++++++++
 include/linux/mfd/loongson-se.h        |  53 ++++++
 13 files changed, 639 insertions(+)
 create mode 100644 drivers/char/tpm/tpm_loongson.c
 create mode 100644 drivers/crypto/loongson/Kconfig
 create mode 100644 drivers/crypto/loongson/Makefile
 create mode 100644 drivers/crypto/loongson/loongson-rng.c
 create mode 100644 drivers/mfd/loongson-se.c
 create mode 100644 include/linux/mfd/loongson-se.h


base-commit: a79a588fc1761dc12a3064fc2f648ae66cea3c5a
-- 
2.45.2


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-09-02 12:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-05  7:20 [PATCH v12 0/4] Add Loongson Security Engine chip driver Qunqin Zhao
2025-07-05  7:20 ` [PATCH v12 1/4] mfd: Add support for Loongson Security Engine chip controller Qunqin Zhao
2025-07-05  7:20 ` [PATCH v12 2/4] crypto: loongson - add Loongson RNG driver support Qunqin Zhao
2025-08-19 12:55   ` Lee Jones
2025-08-20  2:33     ` Herbert Xu
2025-07-05  7:20 ` [PATCH v12 3/4] tpm: Add a driver for Loongson TPM device Qunqin Zhao
2025-07-07  9:48   ` Stefano Garzarella
2025-07-26  7:05     ` Qunqin Zhao
2025-07-19 12:09   ` Jarkko Sakkinen
2025-07-20  1:05     ` Huacai Chen
2025-07-05  7:20 ` [PATCH v12 4/4] MAINTAINERS: Add entry for Loongson Security Engine drivers Qunqin Zhao
2025-09-02 11:32 ` [PATCH v12 0/4] Add Loongson Security Engine chip driver Lee Jones
2025-09-02 11:33   ` Lee Jones
2025-09-02 12:42 ` [GIT PULL] Immutable branch between MFD, Char and Crypto due for the v6.18 merge window Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).