From: Chen Wang <unicorn_wang@outlook.com>
To: Inochi Amaoto <inochiama@outlook.com>, Chen Wang <unicornxw@gmail.com>
Cc: aou@eecs.berkeley.edu, chao.wei@sophgo.com, conor@kernel.org,
krzysztof.kozlowski+dt@linaro.org, mturquette@baylibre.com,
palmer@dabbelt.com, paul.walmsley@sifive.com,
richardcochran@gmail.com, robh+dt@kernel.org, sboyd@kernel.org,
devicetree@vger.kernel.org, linux-clk@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, samuel.holland@sifive.com
Subject: Re: [PATCH v4 3/4] clk: sophgo: Add SG2042 clock generator driver
Date: Tue, 5 Dec 2023 13:35:48 +0800 [thread overview]
Message-ID: <MA0P287MB033276574107F5031C153DDDFE85A@MA0P287MB0332.INDP287.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <IA1PR20MB4953C3278ABEA3B840C11712BB85A@IA1PR20MB4953.namprd20.prod.outlook.com>
On 2023/12/5 9:13, Inochi Amaoto wrote:
>> From: Chen Wang <unicorn_wang@outlook.com>
>>
>> Add a driver for the SOPHGO SG2042 clock generator.
>>
>> Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
>> ---
>> MAINTAINERS | 7 +
>> drivers/clk/Kconfig | 1 +
>> drivers/clk/Makefile | 1 +
>> drivers/clk/sophgo/Kconfig | 8 +
>> drivers/clk/sophgo/Makefile | 2 +
>> drivers/clk/sophgo/clk-sophgo-sg2042.c | 1371 ++++++++++++++++++++++++
>> drivers/clk/sophgo/clk-sophgo-sg2042.h | 226 ++++
>> 7 files changed, 1616 insertions(+)
>> create mode 100644 drivers/clk/sophgo/Kconfig
>> create mode 100644 drivers/clk/sophgo/Makefile
>> create mode 100644 drivers/clk/sophgo/clk-sophgo-sg2042.c
>> create mode 100644 drivers/clk/sophgo/clk-sophgo-sg2042.h
>>
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index 97f51d5ec1cf..c9c75468f2cb 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -20269,6 +20269,13 @@ S: Maintained
>> F: arch/riscv/boot/dts/sophgo/
>> F: Documentation/devicetree/bindings/riscv/sophgo.yaml
>>
>> +SOPHGO CLOCK DRIVER
>> +M: Chen Wang <unicorn_wang@outlook.com>
>> +S: Maintained
>> +F: Documentation/devicetree/bindings/clock/sophgo/
>> +F: drivers/clk/sophgo/
>> +F: include/dt-bindings/clock/sophgo,sg2042-clkgen.h
>> +
>> SOUND
>> M: Jaroslav Kysela <perex@perex.cz>
>> M: Takashi Iwai <tiwai@suse.com>
>> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
>> index c30d0d396f7a..514343934fda 100644
>> --- a/drivers/clk/Kconfig
>> +++ b/drivers/clk/Kconfig
>> @@ -499,6 +499,7 @@ source "drivers/clk/rockchip/Kconfig"
>> source "drivers/clk/samsung/Kconfig"
>> source "drivers/clk/sifive/Kconfig"
>> source "drivers/clk/socfpga/Kconfig"
>> +source "drivers/clk/sophgo/Kconfig"
>> source "drivers/clk/sprd/Kconfig"
>> source "drivers/clk/starfive/Kconfig"
>> source "drivers/clk/sunxi/Kconfig"
>> diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
>> index ed71f2e0ee36..aa5d2cf0b6a6 100644
>> --- a/drivers/clk/Makefile
>> +++ b/drivers/clk/Makefile
>> @@ -119,6 +119,7 @@ obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/
>> obj-$(CONFIG_COMMON_CLK_SAMSUNG) += samsung/
>> obj-$(CONFIG_CLK_SIFIVE) += sifive/
>> obj-y += socfpga/
>> +obj-$(CONFIG_ARCH_SOPHGO) += sophgo/
>> obj-$(CONFIG_PLAT_SPEAR) += spear/
>> obj-y += sprd/
>> obj-$(CONFIG_ARCH_STI) += st/
>> diff --git a/drivers/clk/sophgo/Kconfig b/drivers/clk/sophgo/Kconfig
>> new file mode 100644
>> index 000000000000..b0fbe4499870
>> --- /dev/null
>> +++ b/drivers/clk/sophgo/Kconfig
>> @@ -0,0 +1,8 @@
>> +# SPDX-License-Identifier: GPL-2.0
>> +
>> +config CLK_SOPHGO_SG2042
>> + bool "Sophgo SG2042 clock support"
>> + depends on ARCH_SOPHGO || COMPILE_TEST
>> + default ARCH_SOPHGO
>> + help
>> + Say yes here to support the clock controller on the Sophgo SG2042 SoC.
> Please add RISCV to its depends. Not all the sophgo SoCs are in the RISC-V
> platform, Some are arm chips. It is not good to build this driver
> in that arch.
ARCH_SOPHGO is only defined in RISC-V arch, so I think RISCV should not
be needed as depends.
>
> Also, the condition ARCH_SOPHGO is duplicate in the Makefile. Please
> remove one of them.
Don't undestand your question "the condition ARCH_SOPHGO is duplicate in
the Makefile ", I think you are talking about Kconifg, what Makefile
are you talking about?
>> diff --git a/drivers/clk/sophgo/Makefile b/drivers/clk/sophgo/Makefile
>> new file mode 100644
>> index 000000000000..13834cce260c
>> --- /dev/null
>> +++ b/drivers/clk/sophgo/Makefile
>> @@ -0,0 +1,2 @@
>> +# SPDX-License-Identifier: GPL-2.0
>> +obj-$(CONFIG_CLK_SOPHGO_SG2042) += clk-sophgo-sg2042.o
>> diff --git a/drivers/clk/sophgo/clk-sophgo-sg2042.c b/drivers/clk/sophgo/clk-sophgo-sg2042.c
>> new file mode 100644
>> index 000000000000..421ebcc7192b
>> ......
>> + }
>> +
>> +#if defined(DEBUG)
>> + pr_info("registered [%d : %s]\n", gate->id, gate->name);
>> +#endif
> Drop, no need for this.
OK, this log should not be needed, I will remove it in next version.
next prev parent reply other threads:[~2023-12-05 5:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-05 0:22 [PATCH v4 0/4] riscv: sophgo: add clock support for sg2042 Chen Wang
2023-12-05 0:22 ` [PATCH v4 1/4] dt-bindings: soc: sophgo: Add Sophgo system control module Chen Wang
2023-12-05 8:06 ` Krzysztof Kozlowski
2023-12-05 0:23 ` [PATCH v4 2/4] dt-bindings: clock: sophgo: Add SG2042 bindings Chen Wang
2023-12-05 8:08 ` Krzysztof Kozlowski
2023-12-05 14:15 ` Chen Wang
2023-12-05 15:52 ` Krzysztof Kozlowski
2023-12-05 0:23 ` [PATCH v4 3/4] clk: sophgo: Add SG2042 clock generator driver Chen Wang
2023-12-05 1:13 ` Inochi Amaoto
2023-12-05 5:35 ` Chen Wang [this message]
2023-12-05 6:34 ` Inochi Amaoto
2023-12-06 1:35 ` Chen Wang
2023-12-05 0:24 ` [PATCH v4 4/4] riscv: dts: add clock generator for Sophgo SG2042 SoC 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=MA0P287MB033276574107F5031C153DDDFE85A@MA0P287MB0332.INDP287.PROD.OUTLOOK.COM \
--to=unicorn_wang@outlook.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-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mturquette@baylibre.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=richardcochran@gmail.com \
--cc=robh+dt@kernel.org \
--cc=samuel.holland@sifive.com \
--cc=sboyd@kernel.org \
--cc=unicornxw@gmail.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
all inboxes | Powered by JetHome®