mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ryan Chen <ryan_chen@aspeedtech.com>
To: Krzysztof Kozlowski <krzk@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v9 1/3] dt-binding: clock: ast2700: modify soc0/1 clock define
Date: Thu, 27 Feb 2025 08:04:03 +0000	[thread overview]
Message-ID: <OS8PR06MB7541CBC30DBFF4553A295302F2CD2@OS8PR06MB7541.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <1175a8d2-65ac-439e-94b8-cf7af8db37b3@kernel.org>

> Subject: Re: [PATCH v9 1/3] dt-binding: clock: ast2700: modify soc0/1 clock
> define
> 
> On 26/02/2025 06:10, Ryan Chen wrote:
> >> Subject: Re: [PATCH v9 1/3] dt-binding: clock: ast2700: modify soc0/1
> >> clock define
> >>
> >> On 25/02/2025 10:49, Ryan Chen wrote:
> >>>>>> Subject: Re: [PATCH v9 1/3] dt-binding: clock: ast2700: modify
> >>>>>> soc0/1 clock define
> >>>>>>
> >>>>>> On 24/02/2025 10:55, Ryan Chen wrote:
> >>>>>>> -remove redundant SOC0_CLK_UART_DIV13:
> >>>>>>> SOC0_CLK_UART_DIV13 is not use at clk-ast2700.c, the clock
> >>>>>>> source tree is uart clk src -> uart_div_table -> uart clk.
> >>>>>>>
> >>>>>>> -Change SOC0_CLK_HPLL_DIV_AHB to SOC0_CLK_AHBMUX:
> >>>>>>> modify clock tree implement.
> >>>>>>> older CLK_AHB use mpll_div_ahb/hpll_div_ahb to be ahb clock
> source.
> >>>>>>> mpll->mpll_div_ahb
> >>>>>>>                   -> clk_ahb
> >>>>>>> hpll->hpll_div_ahb
> >>>>>>
> >>>>>>
> >>>>>> I can barely understand it and from the pieces I got, it does not
> >>>>>> explain need for ABI break.
> >>>>>>
> >>>>>
> >>>>> #1. SCU0_CLK_UART_DIV13 is redundant, it does not impact ABI break
> >>>>
> >>>> You did not explain how it does not impact. Clock was exported,
> >>>> there was a user and now there is no clock. User stops working. ABI
> break.
> >>>>
> >>>
> >>> Sorry, SCU0_CLK_UART_DIV13 was defined, but was never referenced in
> >>> any
> >> upstream device trees.
> >>
> >>
> >> That's incomplete definition of ABI
> >>
> >>> Since there is no in-tree usage of `SCU0_CLK_UART_DIV13`, its
> >>> removal does
> >> not cause an ABI break.
> >>
> >>
> >> You ignored out of tree users. Please read carefully ABI docs.
> >>
> >>
> >>>
> >>>>> #2. Change SOC0_CLK_HPLL_DIV_AHB to SOC0_CLK_AHBMUX Older
> >>>> implement
> >>>>> where `mpll_div_ahb` and `hpll_div_ahb` were **hardcoded
> >>>>> dividers** for
> >>>> AHB.
> >>>>> In **the new approach (v8)**, I refactored the clock tree to clock tree.
> >>>>
> >>>> I still cannot parse sentences like "refactoring A to A". It's
> >>>> meaningless to
> >> me.
> >>>>
> >>>>> It should be ABI-safe change
> >>>>
> >>>> No, you do not understand the ABI. You removed a clock ID, that's
> >>>> the ABI change.
> >>>>
> >>>> Otherwise explain how this is not changing ABI.
> >>>>
> >>>>
> >>>>>
> >>>>> Or you want to keep original SOC0_CLK_HPLL_DIV_AHB define and
> then
> >>>>> add
> >>>> SOC0_CLK_AHBMUX.
> >>>>> To be 1st patch, then 2n patch remove redundant
> >>>> SOC0_CLK_HPLL_DIV_AHB?
> >>>>
> >>>> If you break the ABI you need to clearly explain why. We have long
> >>>> conversations and you still did not say why.
> >>>>
> >>> Sorry, my point will be following steps to avoid potential ABI
> >>> issues, I can modify the patch series as follows:
> >>> 1. **Patch 1:** Add `SOC0_CLK_AHBMUX` without removing
> >> `SOC0_CLK_HPLL_DIV_AHB`.
> >>> 2. **Patch 2:** Finally remove `SOC0_CLK_HPLL_DIV_AHB`.
> >>
> >>
> >> I do not understand what changed here. You remove exported clock
> >> which is ABI, so how is this answering my question.
> >>
> >> You keep dodging my questions. Here I asked "why". I do not see any
> >> answer why.
> >
> > Apology, I can't catch your point. But I still need your guideline.
> >
> > **Regarding `SCU0_CLK_UART_DIV13`:**
> >    - This clock ID was originally defined but was never used in any in-tree
> device trees. (i2c-ast2700.c v1 ~ v9)
> >    - So there should not have ABI-break am I correct?
> 
> 
> No, because there are other users of bindings. All forks, out of tree DTS, other
> projects etc. You defined ABI for them.
> 
> >
> > **Regarding `SOC0_CLK_HPLL_DIV_AHB` → `SOC0_CLK_AHBMUX`:**
> >    - The previous implementation used dividers (`mpll_div_ahb`,
> > `hpll_div_ahb`) for AHB clock selection. (i2c-ast2700.c v1 ~ v8)
> > mpll->mpll_div_ahb
> >                   -> clk_ahb
> > hpll->hpll_div_ahb
> >    - The new approach use `SOC0_CLK_AHBMUX`, which AHB clock sources
> > via a mux. (i2c-ast2700.c v9)
> > mpll->
> >       ahb_mux -> div_table -> clk_ahb
> > hpll->
> 
> Your formatting is one of the problems I have troubles understanding it.
> Above is not wrapped or wrapped oddly. You keep using bold * but double **,
> which is not a standard markup. Please switch to standard mailing list
> formatting - proper wrapping, only text mode and use client which actually can
> parse and create that.
> 
> What I don't understand is how clocks could change in hardware. You described
> implementation, but the clock IDS do not describe implementation but the the
> mapping to real hardware clocks. So how SOC0_CLK_HPLL_DIV_AHB clock
> disappeared from hardware?

Sorry, It's not disappeared, it is replaced by implement.

- The previous implementation hardcoded `mpll_div_ahb` and `hpll_div_ahb` as the only AHB clock sources:
     mpll -> mpll_div_ahb 
						-> clk_ahb
     hpll -> hpll_div_ahb> 

- The new approach introduces `SOC0_CLK_AHBMUX`, clear clock tree selection of AHB clock sources via a mux:
 Than through div_table to get ahb clk.
     mpll ->
       		-> ahb_mux -> div_table -> clk_ahb
     hpll ->

> 
> >    - And since i2c-ast2700.c (v8) is not applied, so there should also no one
> use this ABI. Am I correct?
> 
> If binding was not applied, then what are you changing here?

My point is only i2c-ast2700.c (v8) used, which not be applied in Linux. 
And i2c-ast2700.c (v9) no need anymore.

> 
> Does it mean header described clock which was in the hardware but its
> handling was not yet implemented in the driver?
> 
> 
> >
> > If this is not acceptable, my next patch will keep
> SCU0_CLK_UART_DIV13/SCU0_CLK_HPLL_DIV_AHB define.
> 
> Maybe my last message was not clear, so: you need to explain why you are
> breaking ABI and/or explain the ABI impact in the commit msg.
Understood your concern about this.
I think add new SCU0_CLK_AHBMUX to avoid ABI impact will be the better way.

Thank your guideline. 
> 
> > But add new SCU0_CLK_AHBMUX define for avoid your point ABI break. Is
> this acceptable?
> 
> 
> Best regards,
> Krzysztof

  reply	other threads:[~2025-02-27  8:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-24  9:55 [PATCH v9 0/3] Add support for AST2700 clk driver Ryan Chen
2025-02-24  9:55 ` [PATCH v9 1/3] dt-binding: clock: ast2700: modify soc0/1 clock define Ryan Chen
2025-02-24 10:10   ` Krzysztof Kozlowski
2025-02-25  0:41     ` Ryan Chen
2025-02-25  7:54       ` Krzysztof Kozlowski
2025-02-25  9:49         ` Ryan Chen
2025-02-25 13:13           ` Krzysztof Kozlowski
2025-02-26  5:10             ` Ryan Chen
2025-02-26  9:52               ` Krzysztof Kozlowski
2025-02-27  8:04                 ` Ryan Chen [this message]
2025-02-24  9:55 ` [PATCH v9 2/3] reset: aspeed: register AST2700 reset auxiliary bus device Ryan Chen
2025-02-24 10:12   ` Krzysztof Kozlowski
2025-02-24 10:15     ` Krzysztof Kozlowski
2025-02-24 16:27       ` Philipp Zabel
2025-02-25  2:20         ` Ryan Chen
2025-02-25  7:51           ` Krzysztof Kozlowski
2025-02-24  9:55 ` [PATCH v9 3/3] clk: aspeed: add AST2700 clock driver Ryan Chen
2025-03-06 18:01   ` kernel test robot

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=OS8PR06MB7541CBC30DBFF4553A295302F2CD2@OS8PR06MB7541.apcprd06.prod.outlook.com \
    --to=ryan_chen@aspeedtech.com \
    --cc=andrew@aj.id.au \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=joel@jms.id.au \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --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®