loongarch.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: Qunqin Zhao <zhaoqunqin@loongson.cn>
Cc: herbert@gondor.apana.org.au, jarkko@kernel.org,
	linux-kernel@vger.kernel.org, loongarch@lists.linux.dev,
	davem@davemloft.net, linux-crypto@vger.kernel.org,
	peterhuewe@gmx.de, jgg@ziepe.ca, linux-integrity@vger.kernel.org,
	Yinggang Gu <guyinggang@loongson.cn>,
	Huacai Chen <chenhuacai@loongson.cn>
Subject: Re: [PATCH v12 2/4] crypto: loongson - add Loongson RNG driver support
Date: Tue, 19 Aug 2025 13:55:18 +0100	[thread overview]
Message-ID: <20250819125518.GF7508@google.com> (raw)
In-Reply-To: <20250705072045.1067-3-zhaoqunqin@loongson.cn>

On Sat, 05 Jul 2025, Qunqin Zhao wrote:

> Loongson's Random Number Generator is found inside Loongson Security
> Engine chip.
> 
> Co-developed-by: Yinggang Gu <guyinggang@loongson.cn>
> Signed-off-by: Yinggang Gu <guyinggang@loongson.cn>
> Signed-off-by: Qunqin Zhao <zhaoqunqin@loongson.cn>
> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
> ---
>  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 +++++++++++++++++++++++++
>  5 files changed, 217 insertions(+)
>  create mode 100644 drivers/crypto/loongson/Kconfig
>  create mode 100644 drivers/crypto/loongson/Makefile
>  create mode 100644 drivers/crypto/loongson/loongson-rng.c
> 
> diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
> index 9f8a3a5be..f6117bc77 100644
> --- a/drivers/crypto/Kconfig
> +++ b/drivers/crypto/Kconfig
> @@ -827,6 +827,7 @@ config CRYPTO_DEV_CCREE
>  	  If unsure say Y.
>  
>  source "drivers/crypto/hisilicon/Kconfig"
> +source "drivers/crypto/loongson/Kconfig"
>  
>  source "drivers/crypto/amlogic/Kconfig"
>  
> diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile
> index 22eadcc8f..125b99b24 100644
> --- a/drivers/crypto/Makefile
> +++ b/drivers/crypto/Makefile
> @@ -44,6 +44,7 @@ obj-y += inside-secure/
>  obj-$(CONFIG_CRYPTO_DEV_ARTPEC6) += axis/
>  obj-y += xilinx/
>  obj-y += hisilicon/
> +obj-y += loongson/
>  obj-$(CONFIG_CRYPTO_DEV_AMLOGIC_GXL) += amlogic/
>  obj-y += intel/
>  obj-y += starfive/
> diff --git a/drivers/crypto/loongson/Kconfig b/drivers/crypto/loongson/Kconfig
> new file mode 100644
> index 000000000..15475da8f
> --- /dev/null
> +++ b/drivers/crypto/loongson/Kconfig
> @@ -0,0 +1,5 @@
> +config CRYPTO_DEV_LOONGSON_RNG
> +	tristate "Support for Loongson RNG Driver"
> +	depends on MFD_LOONGSON_SE
> +	help
> +	  Support for Loongson RNG Driver.
> diff --git a/drivers/crypto/loongson/Makefile b/drivers/crypto/loongson/Makefile
> new file mode 100644
> index 000000000..1ce5ec32b
> --- /dev/null
> +++ b/drivers/crypto/loongson/Makefile
> @@ -0,0 +1 @@
> +obj-$(CONFIG_CRYPTO_DEV_LOONGSON_RNG)  += loongson-rng.o
> diff --git a/drivers/crypto/loongson/loongson-rng.c b/drivers/crypto/loongson/loongson-rng.c
> new file mode 100644
> index 000000000..3a4940260
> --- /dev/null
> +++ b/drivers/crypto/loongson/loongson-rng.c
> @@ -0,0 +1,209 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/* Copyright (c) 2019 HiSilicon Limited. */
> +/* Copyright (c) 2025 Loongson Technology Corporation Limited. */
> +
> +#include <linux/crypto.h>
> +#include <linux/err.h>
> +#include <linux/hw_random.h>
> +#include <linux/io.h>
> +#include <linux/iopoll.h>
> +#include <linux/kernel.h>
> +#include <linux/list.h>
> +#include <linux/mfd/loongson-se.h>

This depends on the first patch in the series.

Does this one have an Ack?

-- 
Lee Jones [李琼斯]

  reply	other threads:[~2025-08-19 12:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250819125518.GF7508@google.com \
    --to=lee@kernel.org \
    --cc=chenhuacai@loongson.cn \
    --cc=davem@davemloft.net \
    --cc=guyinggang@loongson.cn \
    --cc=herbert@gondor.apana.org.au \
    --cc=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=peterhuewe@gmx.de \
    --cc=zhaoqunqin@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).