netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Biao Huang <biao.huang@mediatek.com>
To: AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@collabora.com>, <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Rob Herring <robh+dt@kernel.org>
Cc: Matthias Brugger <matthias.bgg@gmail.com>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Jose Abreu <joabreu@synopsys.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	<netdev@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<srv_heupstream@mediatek.com>, <macpaul.lin@mediatek.com>,
	<dkirjanov@suse.de>
Subject: Re: [PATCH net-next v12 3/7] stmmac: dwmac-mediatek: re-arrange clock setting
Date: Tue, 18 Jan 2022 09:51:45 +0800	[thread overview]
Message-ID: <f9e3a862ecdb914a0efb52582989e975a742e918.camel@mediatek.com> (raw)
In-Reply-To: <2c62f337-5eb4-e525-7e3a-289435315c09@collabora.com>

Dear Angelo,
	Thanks for your comments.
On Mon, 2022-01-17 at 11:38 +0100, AngeloGioacchino Del Regno wrote:
> Il 17/01/22 08:07, Biao Huang ha scritto:
> > The rmii_internal clock is needed only when PHY
> > interface is RMII, and reference clock is from MAC.
> > 
> > Re-arrange the clock setting as following:
> > 1. the optional "rmii_internal" is controlled by devm_clk_get(),
> > 2. other clocks still be configured by devm_clk_bulk_get().
> > 
> > Signed-off-by: Biao Huang <biao.huang@mediatek.com>
> > ---
> >   .../ethernet/stmicro/stmmac/dwmac-mediatek.c  | 72 +++++++++++++-
> > -----
> >   1 file changed, 49 insertions(+), 23 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> > b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> > index 8747aa4403e8..2678d2deb26a 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> > @@ -49,14 +49,15 @@ struct mac_delay_struct {
> >   struct mediatek_dwmac_plat_data {
> >   	const struct mediatek_dwmac_variant *variant;
> >   	struct mac_delay_struct mac_delay;
> > +	struct clk *rmii_internal_clk;
> >   	struct clk_bulk_data *clks;
> > -	struct device_node *np;
> >   	struct regmap *peri_regmap;
> > +	struct device_node *np;
> >   	struct device *dev;
> >   	phy_interface_t phy_mode;
> > -	int num_clks_to_config;
> >   	bool rmii_clk_from_mac;
> >   	bool rmii_rxc;
> > +	int num_clks;
> 
> I don't see any need to get a num_clks here, at this point: since all
> functions
> reading this are getting passed a pointer to this entire structure,
> you can
> simply always access plat->variant->num_clks.
> 
> Please, drop the addition of num_clks in this struct.
> 
> Regards,
> Angelo
OK, will remove it in next send.


  reply	other threads:[~2022-01-18  1:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-17  7:06 [PATCH net-next v12 0/7] MediaTek Ethernet Patches on MT8195 Biao Huang
2022-01-17  7:07 ` [PATCH net-next v12 1/7] stmmac: dwmac-mediatek: add platform level clocks management Biao Huang
2022-01-17  7:07 ` [PATCH net-next v12 2/7] stmmac: dwmac-mediatek: Reuse more common features Biao Huang
2022-01-17  7:07 ` [PATCH net-next v12 3/7] stmmac: dwmac-mediatek: re-arrange clock setting Biao Huang
2022-01-17 10:38   ` AngeloGioacchino Del Regno
2022-01-18  1:51     ` Biao Huang [this message]
2022-01-17  7:07 ` [PATCH net-next v12 4/7] arm64: dts: mt2712: update ethernet device node Biao Huang
2022-01-19  1:24   ` Biao Huang
2022-01-17  7:07 ` [PATCH net-next v12 5/7] net: dt-bindings: dwmac: Convert mediatek-dwmac to DT schema Biao Huang
2022-01-17  7:07 ` [PATCH net-next v12 6/7] stmmac: dwmac-mediatek: add support for mt8195 Biao Huang
2022-01-17  7:07 ` [PATCH net-next v12 7/7] net: dt-bindings: dwmac: " Biao Huang
2022-01-17 15:35   ` Rob Herring
2022-01-19  1:21     ` Biao Huang
2022-02-01 23:48   ` Rob Herring
2022-03-14  7:13     ` Biao Huang

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=f9e3a862ecdb914a0efb52582989e975a742e918.camel@mediatek.com \
    --to=biao.huang@mediatek.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dkirjanov@suse.de \
    --cc=joabreu@synopsys.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=macpaul.lin@mediatek.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=robh+dt@kernel.org \
    --cc=srv_heupstream@mediatek.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).