mbox series

[v5,0/6] Drivers for Loongson security engine

Message ID 20250313090508.21252-1-zhaoqunqin@loongson.cn (mailing list archive)
Headers show
Series Drivers for Loongson security engine | expand

Message

Qunqin Zhao March 13, 2025, 9:05 a.m. UTC
Loongson security engine supports random number generation, hash,
symmetric encryption and asymmetric encryption. Based on these
encryption functions, TPM2 have been implemented in it.

mfd is the baser driver, crypto and tpm are users.

v5: Registered "ls6000se-rng" device in mfd driver.
v4: Please look at changelog in tpm and MAINTAINERS. No changes to mfd
    and crypto.
v3: Put the updates to the MAINTAINERS in a separate patch.
v2: Removed misc driver. Added tpm driver.

Qunqin Zhao (6):
  mfd: Add support for Loongson Security Module
  MAINTAINERS: Add entry for Loongson Security Module driver
  crypto: loongson - add Loongson RNG driver support
  MAINTAINERS: Add entry for Loongson RNG driver
  tpm: Add a driver for Loongson TPM device
  MAINTAINERS: Add tpm_lsse.c to LOONGSON CRYPTO DRIVER entry

 MAINTAINERS                            |  14 +
 drivers/char/tpm/Kconfig               |   9 +
 drivers/char/tpm/Makefile              |   1 +
 drivers/char/tpm/tpm_lsse.c            | 103 +++++++
 drivers/crypto/Kconfig                 |   1 +
 drivers/crypto/Makefile                |   1 +
 drivers/crypto/loongson/Kconfig        |   6 +
 drivers/crypto/loongson/Makefile       |   2 +
 drivers/crypto/loongson/ls6000se-rng.c | 190 +++++++++++++
 drivers/mfd/Kconfig                    |  10 +
 drivers/mfd/Makefile                   |   2 +
 drivers/mfd/ls6000se.c                 | 374 +++++++++++++++++++++++++
 include/linux/mfd/ls6000se.h           |  75 +++++
 13 files changed, 788 insertions(+)
 create mode 100644 drivers/char/tpm/tpm_lsse.c
 create mode 100644 drivers/crypto/loongson/Kconfig
 create mode 100644 drivers/crypto/loongson/Makefile
 create mode 100644 drivers/crypto/loongson/ls6000se-rng.c
 create mode 100644 drivers/mfd/ls6000se.c
 create mode 100644 include/linux/mfd/ls6000se.h


base-commit: 6a8f122c5f073c8610c32636663f2512514b1270

Comments

Huacai Chen March 13, 2025, 9:26 a.m. UTC | #1
You haven't seen my comments in previous version?

https://lore.kernel.org/loongarch/CAAhV-H5xyRrF1_=E7rLM3dHeYAEBdMufYQvgoxAq6+d6s5U4Eg@mail.gmail.com/

Huacai

On Thu, Mar 13, 2025 at 5:05 PM Qunqin Zhao <zhaoqunqin@loongson.cn> wrote:
>
> Loongson security engine supports random number generation, hash,
> symmetric encryption and asymmetric encryption. Based on these
> encryption functions, TPM2 have been implemented in it.
>
> mfd is the baser driver, crypto and tpm are users.
>
> v5: Registered "ls6000se-rng" device in mfd driver.
> v4: Please look at changelog in tpm and MAINTAINERS. No changes to mfd
>     and crypto.
> v3: Put the updates to the MAINTAINERS in a separate patch.
> v2: Removed misc driver. Added tpm driver.
>
> Qunqin Zhao (6):
>   mfd: Add support for Loongson Security Module
>   MAINTAINERS: Add entry for Loongson Security Module driver
>   crypto: loongson - add Loongson RNG driver support
>   MAINTAINERS: Add entry for Loongson RNG driver
>   tpm: Add a driver for Loongson TPM device
>   MAINTAINERS: Add tpm_lsse.c to LOONGSON CRYPTO DRIVER entry
>
>  MAINTAINERS                            |  14 +
>  drivers/char/tpm/Kconfig               |   9 +
>  drivers/char/tpm/Makefile              |   1 +
>  drivers/char/tpm/tpm_lsse.c            | 103 +++++++
>  drivers/crypto/Kconfig                 |   1 +
>  drivers/crypto/Makefile                |   1 +
>  drivers/crypto/loongson/Kconfig        |   6 +
>  drivers/crypto/loongson/Makefile       |   2 +
>  drivers/crypto/loongson/ls6000se-rng.c | 190 +++++++++++++
>  drivers/mfd/Kconfig                    |  10 +
>  drivers/mfd/Makefile                   |   2 +
>  drivers/mfd/ls6000se.c                 | 374 +++++++++++++++++++++++++
>  include/linux/mfd/ls6000se.h           |  75 +++++
>  13 files changed, 788 insertions(+)
>  create mode 100644 drivers/char/tpm/tpm_lsse.c
>  create mode 100644 drivers/crypto/loongson/Kconfig
>  create mode 100644 drivers/crypto/loongson/Makefile
>  create mode 100644 drivers/crypto/loongson/ls6000se-rng.c
>  create mode 100644 drivers/mfd/ls6000se.c
>  create mode 100644 include/linux/mfd/ls6000se.h
>
>
> base-commit: 6a8f122c5f073c8610c32636663f2512514b1270
> --
> 2.43.0
>
>
Qunqin Zhao March 13, 2025, 9:59 a.m. UTC | #2
在 2025/3/13 下午5:26, Huacai Chen 写道:
> You haven't seen my comments in previous version?
>
> https://lore.kernel.org/loongarch/CAAhV-H5xyRrF1_=E7rLM3dHeYAEBdMufYQvgoxAq6+d6s5U4Eg@mail.gmail.com/

I am very sorry that I didn't notice your reply.

I don't think it is necessary to change the driver file name. But if you 
insist, I will do the change below  in  next revision .

"MFD_LS6000SE -> MFD_LOONGSON_SE,  ls6000se.c -> loongson-se.c
CRYPTO_DEV_LS6000SE_RNG -> CRYPTO_DEV_LOONGSON_RNG, ls6000se-rng.c 
->loongson-rng.c
TCG_LSSE -> TCG_LOONGSON, tpm_lsse.c ->tpm_loongson.c"


BR, Qunqin.

>
> Huacai
>
> On Thu, Mar 13, 2025 at 5:05 PM Qunqin Zhao <zhaoqunqin@loongson.cn> wrote:
>> Loongson security engine supports random number generation, hash,
>> symmetric encryption and asymmetric encryption. Based on these
>> encryption functions, TPM2 have been implemented in it.
>>
>> mfd is the baser driver, crypto and tpm are users.
>>
>> v5: Registered "ls6000se-rng" device in mfd driver.
>> v4: Please look at changelog in tpm and MAINTAINERS. No changes to mfd
>>      and crypto.
>> v3: Put the updates to the MAINTAINERS in a separate patch.
>> v2: Removed misc driver. Added tpm driver.
>>
>> Qunqin Zhao (6):
>>    mfd: Add support for Loongson Security Module
>>    MAINTAINERS: Add entry for Loongson Security Module driver
>>    crypto: loongson - add Loongson RNG driver support
>>    MAINTAINERS: Add entry for Loongson RNG driver
>>    tpm: Add a driver for Loongson TPM device
>>    MAINTAINERS: Add tpm_lsse.c to LOONGSON CRYPTO DRIVER entry
>>
>>   MAINTAINERS                            |  14 +
>>   drivers/char/tpm/Kconfig               |   9 +
>>   drivers/char/tpm/Makefile              |   1 +
>>   drivers/char/tpm/tpm_lsse.c            | 103 +++++++
>>   drivers/crypto/Kconfig                 |   1 +
>>   drivers/crypto/Makefile                |   1 +
>>   drivers/crypto/loongson/Kconfig        |   6 +
>>   drivers/crypto/loongson/Makefile       |   2 +
>>   drivers/crypto/loongson/ls6000se-rng.c | 190 +++++++++++++
>>   drivers/mfd/Kconfig                    |  10 +
>>   drivers/mfd/Makefile                   |   2 +
>>   drivers/mfd/ls6000se.c                 | 374 +++++++++++++++++++++++++
>>   include/linux/mfd/ls6000se.h           |  75 +++++
>>   13 files changed, 788 insertions(+)
>>   create mode 100644 drivers/char/tpm/tpm_lsse.c
>>   create mode 100644 drivers/crypto/loongson/Kconfig
>>   create mode 100644 drivers/crypto/loongson/Makefile
>>   create mode 100644 drivers/crypto/loongson/ls6000se-rng.c
>>   create mode 100644 drivers/mfd/ls6000se.c
>>   create mode 100644 include/linux/mfd/ls6000se.h
>>
>>
>> base-commit: 6a8f122c5f073c8610c32636663f2512514b1270
>> --
>> 2.43.0
>>
>>
Huacai Chen March 15, 2025, 3:47 a.m. UTC | #3
On Thu, Mar 13, 2025 at 5:59 PM Qunqin Zhao <zhaoqunqin@loongson.cn> wrote:
>
>
> 在 2025/3/13 下午5:26, Huacai Chen 写道:
> > You haven't seen my comments in previous version?
> >
> > https://lore.kernel.org/loongarch/CAAhV-H5xyRrF1_=E7rLM3dHeYAEBdMufYQvgoxAq6+d6s5U4Eg@mail.gmail.com/
>
> I am very sorry that I didn't notice your reply.
>
> I don't think it is necessary to change the driver file name. But if you
> insist, I will do the change below  in  next revision .
Changing them is a little better, but you needn't do it only for
renaming. There may be other comments for this series, you can do them
together.


Huacai

>
> "MFD_LS6000SE -> MFD_LOONGSON_SE,  ls6000se.c -> loongson-se.c
> CRYPTO_DEV_LS6000SE_RNG -> CRYPTO_DEV_LOONGSON_RNG, ls6000se-rng.c
> ->loongson-rng.c
> TCG_LSSE -> TCG_LOONGSON, tpm_lsse.c ->tpm_loongson.c"
>
>
> BR, Qunqin.
>
> >
> > Huacai
> >
> > On Thu, Mar 13, 2025 at 5:05 PM Qunqin Zhao <zhaoqunqin@loongson.cn> wrote:
> >> Loongson security engine supports random number generation, hash,
> >> symmetric encryption and asymmetric encryption. Based on these
> >> encryption functions, TPM2 have been implemented in it.
> >>
> >> mfd is the baser driver, crypto and tpm are users.
> >>
> >> v5: Registered "ls6000se-rng" device in mfd driver.
> >> v4: Please look at changelog in tpm and MAINTAINERS. No changes to mfd
> >>      and crypto.
> >> v3: Put the updates to the MAINTAINERS in a separate patch.
> >> v2: Removed misc driver. Added tpm driver.
> >>
> >> Qunqin Zhao (6):
> >>    mfd: Add support for Loongson Security Module
> >>    MAINTAINERS: Add entry for Loongson Security Module driver
> >>    crypto: loongson - add Loongson RNG driver support
> >>    MAINTAINERS: Add entry for Loongson RNG driver
> >>    tpm: Add a driver for Loongson TPM device
> >>    MAINTAINERS: Add tpm_lsse.c to LOONGSON CRYPTO DRIVER entry
> >>
> >>   MAINTAINERS                            |  14 +
> >>   drivers/char/tpm/Kconfig               |   9 +
> >>   drivers/char/tpm/Makefile              |   1 +
> >>   drivers/char/tpm/tpm_lsse.c            | 103 +++++++
> >>   drivers/crypto/Kconfig                 |   1 +
> >>   drivers/crypto/Makefile                |   1 +
> >>   drivers/crypto/loongson/Kconfig        |   6 +
> >>   drivers/crypto/loongson/Makefile       |   2 +
> >>   drivers/crypto/loongson/ls6000se-rng.c | 190 +++++++++++++
> >>   drivers/mfd/Kconfig                    |  10 +
> >>   drivers/mfd/Makefile                   |   2 +
> >>   drivers/mfd/ls6000se.c                 | 374 +++++++++++++++++++++++++
> >>   include/linux/mfd/ls6000se.h           |  75 +++++
> >>   13 files changed, 788 insertions(+)
> >>   create mode 100644 drivers/char/tpm/tpm_lsse.c
> >>   create mode 100644 drivers/crypto/loongson/Kconfig
> >>   create mode 100644 drivers/crypto/loongson/Makefile
> >>   create mode 100644 drivers/crypto/loongson/ls6000se-rng.c
> >>   create mode 100644 drivers/mfd/ls6000se.c
> >>   create mode 100644 include/linux/mfd/ls6000se.h
> >>
> >>
> >> base-commit: 6a8f122c5f073c8610c32636663f2512514b1270
> >> --
> >> 2.43.0
> >>
> >>
>
>