From: Chen Wang <unicornxw@gmail.com>
To: aou@eecs.berkeley.edu, chao.wei@sophgo.com, conor@kernel.org,
krzysztof.kozlowski+dt@linaro.org, palmer@dabbelt.com,
paul.walmsley@sifive.com, robh+dt@kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org, haijiao.liu@sophgo.com,
xiaoguang.xing@sophgo.com, guoren@kernel.org, jszhang@kernel.org,
inochiama@outlook.com
Cc: Chen Wang <unicorn_wang@outlook.com>
Subject: [PATCH 2/4] reset: sophgo: add SG2042 reset generator driver
Date: Tue, 9 Jan 2024 17:17:15 +0800 [thread overview]
Message-ID: <06e493ad0d64c1ba5c5897eb452ff04095f05e7a.1704790558.git.unicorn_wang@outlook.com> (raw)
In-Reply-To: <cover.1704790558.git.unicorn_wang@outlook.com>
From: Chen Wang <unicorn_wang@outlook.com>
Reuse reset-simple driver for the Sophgo SG2042 reset generator.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
---
drivers/reset/Kconfig | 1 +
drivers/reset/reset-simple.c | 2 ++
drivers/reset/sophgo/Kconfig | 10 ++++++++++
3 files changed, 13 insertions(+)
create mode 100644 drivers/reset/sophgo/Kconfig
diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
index ccd59ddd7610..09ba59cc4bc5 100644
--- a/drivers/reset/Kconfig
+++ b/drivers/reset/Kconfig
@@ -318,6 +318,7 @@ config RESET_ZYNQ
help
This enables the reset controller driver for Xilinx Zynq SoCs.
+source "drivers/reset/sophgo/Kconfig"
source "drivers/reset/starfive/Kconfig"
source "drivers/reset/sti/Kconfig"
source "drivers/reset/hisilicon/Kconfig"
diff --git a/drivers/reset/reset-simple.c b/drivers/reset/reset-simple.c
index 7ea5adbf2097..69b631eb8127 100644
--- a/drivers/reset/reset-simple.c
+++ b/drivers/reset/reset-simple.c
@@ -151,6 +151,8 @@ static const struct of_device_id reset_simple_dt_ids[] = {
{ .compatible = "snps,dw-high-reset" },
{ .compatible = "snps,dw-low-reset",
.data = &reset_simple_active_low },
+ { .compatible = "sophgo,sg2042-reset",
+ .data = &reset_simple_active_low },
{ /* sentinel */ },
};
diff --git a/drivers/reset/sophgo/Kconfig b/drivers/reset/sophgo/Kconfig
new file mode 100644
index 000000000000..9ad96e49e1dd
--- /dev/null
+++ b/drivers/reset/sophgo/Kconfig
@@ -0,0 +1,10 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+config RESET_SOPHGO_SG2042
+ bool "Sophgo SG2042 Reset Driver"
+ depends on ARCH_SOPHGO || COMPILE_TEST
+ select RESET_SIMPLE
+ default ARCH_SOPHGO
+ help
+ This enables the reset controller driver for the Sophgo SG2042 SoC.
+
--
2.25.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2024-01-09 9:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-09 9:16 [PATCH 0/4] riscv: sophgo: add reset support for SG2042 Chen Wang
2024-01-09 9:16 ` [PATCH 1/4] dt-bindings: reset: sophgo: support SG2042 Chen Wang
2024-01-09 15:19 ` Krzysztof Kozlowski
2024-01-10 0:06 ` Chen Wang
2024-01-09 9:17 ` Chen Wang [this message]
2024-01-09 9:17 ` [PATCH 3/4] riscv: dts: add reset generator for Sophgo SG2042 SoC Chen Wang
2024-01-09 9:17 ` [PATCH 4/4] riscv: dts: add resets property for uart node Chen Wang
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=06e493ad0d64c1ba5c5897eb452ff04095f05e7a.1704790558.git.unicorn_wang@outlook.com \
--to=unicornxw@gmail.com \
--cc=aou@eecs.berkeley.edu \
--cc=chao.wei@sophgo.com \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=guoren@kernel.org \
--cc=haijiao.liu@sophgo.com \
--cc=inochiama@outlook.com \
--cc=jszhang@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh+dt@kernel.org \
--cc=unicorn_wang@outlook.com \
--cc=xiaoguang.xing@sophgo.com \
/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).