From: Dmitry Rokosov <ddrokosov@sberdevices.ru>
To: Jerome Brunet <jbrunet@baylibre.com>
Cc: <neil.armstrong@linaro.org>, <mturquette@baylibre.com>,
<sboyd@kernel.org>, <robh+dt@kernel.org>,
<krzysztof.kozlowski+dt@linaro.org>, <khilman@baylibre.com>,
<martin.blumenstingl@googlemail.com>, <jian.hu@amlogic.com>,
<kernel@sberdevices.ru>, <rockosov@gmail.com>,
<linux-amlogic@lists.infradead.org>, <linux-clk@vger.kernel.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v8 04/11] clk: meson: a1: add support for Amlogic A1 Peripheral clock driver
Date: Fri, 2 Dec 2022 15:33:53 +0300 [thread overview]
Message-ID: <20221202123353.d6l5h5jb26fp5snm@CAB-WSD-L081021> (raw)
In-Reply-To: <1j359y82fn.fsf@starbuckisacylon.baylibre.com>
...
> > + .ops = &clk_regmap_gate_ro_ops,
> > + .parent_data = &(const struct clk_parent_data) {
> > + .fw_name = "xtal",
> > + },
> > + .num_parents = 1,
> > + },
> > +};
> > +
> > +static struct clk_regmap a1_xtal_fixpll = {
> > + .data = &(struct clk_regmap_gate_data){
> > + .offset = SYS_OSCIN_CTRL,
> > + .bit_idx = 1,
> > + },
> > + .hw.init = &(struct clk_init_data) {
> > + .name = "xtal_fixpll",
>
> same here, this is not a crystal.
> It is the fixpll input gate, what about "fixpll_in"
>
> Same bellow - you get the idea ...
>
Yep, got it. Will fix in the v9.
...
> > +static struct clk_regmap a1_rtc_32k_sel = {
> > + .data = &(struct clk_regmap_mux_data) {
> > + .offset = RTC_CTRL,
> > + .mask = 0x3,
> > + .shift = 0,
> > + .flags = CLK_MUX_ROUND_CLOSEST,
> > + },
> > + .hw.init = &(struct clk_init_data){
> > + .name = "rtc_32k_sel",
> > + .ops = &clk_regmap_mux_ops,
> > + .parent_hws = (const struct clk_hw *[]) {
> > + &a1_rtc_32k_xtal.hw,
> > + &a1_rtc_32k_div.hw,
> > + },
> > + .num_parents = 2,
> > + .flags = CLK_SET_RATE_PARENT,
> > + },
> > +};
> > +
> > +struct clk_regmap a1_rtc_clk = {
> > + .data = &(struct clk_regmap_gate_data){
> > + .offset = RTC_BY_OSCIN_CTRL0,
> > + .bit_idx = 30,
> > + },
> > + .hw.init = &(struct clk_init_data){
> > + .name = "rtc_clk",
>
> Everytime there is an "_clk" suffix, you can remove it.
> In this driver, we know we are going to get clocks ;)
>
Exactly! :-)
...
> > +static struct clk_regmap a1_dspa_en = {
> > + .data = &(struct clk_regmap_gate_data){
> > + .offset = DSPA_CLK_EN,
> > + .bit_idx = 1,
> > + },
> > + .hw.init = &(struct clk_init_data) {
> > + .name = "dspa_en",
> > + .ops = &clk_regmap_gate_ops,
> > + .parent_hws = (const struct clk_hw *[]) {
> > + &a1_dspa_sel.hw
> > + },
> > + .num_parents = 1,
> > + .flags = CLK_SET_RATE_PARENT,
>
> Maybe as a 2nd step, but I suspect a "CLK_SET_RATE_NOREPARENT" is going to
> be needed here at some point.
>
I will think about it, and try to mark all needed points with that in
the next version.
...
> > +static struct clk_regmap a1_dspb_a = {
> > + .data = &(struct clk_regmap_gate_data){
> > + .offset = DSPB_CLK_CTRL0,
> > + .bit_idx = 13,
> > + },
> > + .hw.init = &(struct clk_init_data) {
> > + .name = "dspb_a",
> > + .ops = &clk_regmap_gate_ops,
> > + .parent_hws = (const struct clk_hw *[]) {
> > + &a1_dspb_a_div.hw
> > + },
> > + .num_parents = 1,
> > + .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
>
> Any chance we can remove this CLK_IGNORE_UNUSED, or comment why it is
> needed ?
>
This is needed for DSP accelerator in the SoC. I'm afraid it can't be
disabled by kernel logic run on Core IP.
...
--
Thank you,
Dmitry
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2022-12-02 12:34 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-01 22:56 [PATCH v8 00/11] add Amlogic A1 clock controller drivers Dmitry Rokosov
2022-12-01 22:56 ` [PATCH v8 01/11] dt-bindings: clock: meson: add A1 PLL clock controller bindings Dmitry Rokosov
2022-12-02 4:10 ` Rob Herring
2022-12-02 9:51 ` Dmitry Rokosov
2022-12-02 10:39 ` Krzysztof Kozlowski
2022-12-02 11:04 ` Jerome Brunet
2022-12-02 11:16 ` Krzysztof Kozlowski
2022-12-02 11:28 ` Dmitry Rokosov
2022-12-02 13:36 ` neil.armstrong
2022-12-02 10:42 ` Krzysztof Kozlowski
2022-12-02 11:18 ` Dmitry Rokosov
2022-12-02 11:11 ` Jerome Brunet
2022-12-02 12:26 ` Dmitry Rokosov
2022-12-01 22:56 ` [PATCH v8 02/11] clk: meson: a1: add support for Amlogic A1 PLL clock driver Dmitry Rokosov
2022-12-02 11:16 ` Jerome Brunet
2022-12-02 11:31 ` Dmitry Rokosov
2022-12-01 22:56 ` [PATCH v8 03/11] dt-bindings: clock: meson: add A1 peripheral clock controller bindings Dmitry Rokosov
2022-12-02 4:10 ` Rob Herring
2022-12-02 9:49 ` Dmitry Rokosov
2022-12-02 10:39 ` Krzysztof Kozlowski
2022-12-02 10:58 ` Dmitry Rokosov
2022-12-02 10:43 ` Krzysztof Kozlowski
2022-12-01 22:56 ` [PATCH v8 04/11] clk: meson: a1: add support for Amlogic A1 Peripheral clock driver Dmitry Rokosov
2022-12-02 11:19 ` Jerome Brunet
2022-12-02 12:33 ` Dmitry Rokosov [this message]
2022-12-01 22:56 ` [PATCH v8 05/11] clk: meson: pll: export meson_clk_pll_wait_lock symbol Dmitry Rokosov
2022-12-01 22:56 ` [PATCH v8 06/11] clk: meson: introduce a1-clkc common driver for all A1 clock controllers Dmitry Rokosov
2022-12-02 11:36 ` Jerome Brunet
2022-12-02 11:58 ` Dmitry Rokosov
2022-12-01 22:56 ` [PATCH v8 07/11] clk: meson: a1: redesign Amlogic A1 PLL clock controller Dmitry Rokosov
2022-12-02 11:42 ` Jerome Brunet
2022-12-02 12:47 ` Dmitry Rokosov
2022-12-02 12:49 ` Jerome Brunet
2022-12-02 18:20 ` Dmitry Rokosov
2022-12-01 22:57 ` [PATCH v8 08/11] dt-bindings: clock: meson: fixup A1 PLL clkc dtb_check errors Dmitry Rokosov
2022-12-02 10:40 ` Krzysztof Kozlowski
2022-12-01 22:57 ` [PATCH v8 09/11] clk: meson: redesign A1 Peripherals CLK controller Dmitry Rokosov
2022-12-02 12:01 ` Jerome Brunet
2022-12-02 12:10 ` Dmitry Rokosov
2022-12-01 22:57 ` [PATCH v8 10/11] dt-bindings: clock: meson: fixup A1 peripherals clkc dtb_check errors Dmitry Rokosov
2022-12-02 10:40 ` Krzysztof Kozlowski
2022-12-01 22:57 ` [PATCH v8 11/11] arm64: dts: meson: a1: introduce PLL and Peripherals clk controllers Dmitry Rokosov
2022-12-02 10:43 ` Krzysztof Kozlowski
2022-12-02 12:03 ` Jerome Brunet
2022-12-02 13:37 ` neil.armstrong
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=20221202123353.d6l5h5jb26fp5snm@CAB-WSD-L081021 \
--to=ddrokosov@sberdevices.ru \
--cc=devicetree@vger.kernel.org \
--cc=jbrunet@baylibre.com \
--cc=jian.hu@amlogic.com \
--cc=kernel@sberdevices.ru \
--cc=khilman@baylibre.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=mturquette@baylibre.com \
--cc=neil.armstrong@linaro.org \
--cc=robh+dt@kernel.org \
--cc=rockosov@gmail.com \
--cc=sboyd@kernel.org \
/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®