From: "Swathi K S" <swathi.ks@samsung.com>
To: "'Andrew Lunn'" <andrew@lunn.ch>
Cc: <krzk@kernel.org>, <robh@kernel.org>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<conor+dt@kernel.org>, <richardcochran@gmail.com>,
<mcoquelin.stm32@gmail.com>, <alim.akhtar@samsung.com>,
<linux-fsd@tesla.com>, <netdev@vger.kernel.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-samsung-soc@vger.kernel.org>,
<alexandre.torgue@foss.st.com>, <peppe.cavallaro@st.com>,
<joabreu@synopsys.com>, <rcsekar@samsung.com>,
<ssiddha@tesla.com>, <jayati.sahu@samsung.com>,
<pankaj.dubey@samsung.com>, <ravi.patel@samsung.com>,
<gost.dev@samsung.com>
Subject: RE: [PATCH v5 2/4] net: stmmac: dwc-qos: Add FSD EQoS support
Date: Wed, 29 Jan 2025 14:45:30 +0530 [thread overview]
Message-ID: <002c01db722e$5abc8d10$1035a730$@samsung.com> (raw)
In-Reply-To: <63e64aa6-d018-4e45-acc7-f9d88a7db60f@lunn.ch>
> -----Original Message-----
> From: Andrew Lunn <andrew@lunn.ch>
> Sent: 28 January 2025 19:19
> To: Swathi K S <swathi.ks@samsung.com>
> Cc: krzk@kernel.org; robh@kernel.org; davem@davemloft.net;
> edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
> conor+dt@kernel.org; richardcochran@gmail.com;
> mcoquelin.stm32@gmail.com; alim.akhtar@samsung.com; linux-
> fsd@tesla.com; netdev@vger.kernel.org; devicetree@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-stm32@st-md-mailman.stormreply.com;
> linux-arm-kernel@lists.infradead.org; linux-samsung-soc@vger.kernel.org;
> alexandre.torgue@foss.st.com; peppe.cavallaro@st.com;
> joabreu@synopsys.com; rcsekar@samsung.com; ssiddha@tesla.com;
> jayati.sahu@samsung.com; pankaj.dubey@samsung.com;
> ravi.patel@samsung.com; gost.dev@samsung.com
> Subject: Re: [PATCH v5 2/4] net: stmmac: dwc-qos: Add FSD EQoS support
>
> > +static int fsd_clks_endisable(void *priv, bool enabled) {
> > + struct fsd_eqos_plat_data *plat = priv;
> > +
> > + if (enabled) {
> > + return clk_bulk_prepare_enable(plat->num_clks, plat->clks);
> > + } else {
> > + clk_bulk_disable_unprepare(plat->num_clks, plat->clks);
> > + return 0;
> > + }
> > +}
> > +
> > +static int fsd_eqos_probe(struct platform_device *pdev,
> > + struct plat_stmmacenet_data *data,
> > + struct stmmac_resources *res)
> > +{
> > + struct fsd_eqos_plat_data *priv_plat;
> > + struct clk *rx1 = NULL;
> > + struct clk *rx2 = NULL;
> > + int ret = 0;
> > +
> > + priv_plat = devm_kzalloc(&pdev->dev, sizeof(*priv_plat),
> GFP_KERNEL);
> > + if (!priv_plat)
> > + return -ENOMEM;
> > +
> > + priv_plat->dev = &pdev->dev;
> > +
> > + ret = devm_clk_bulk_get_all(&pdev->dev, &priv_plat->clks);
> > + if (ret < 0)
> > + return dev_err_probe(&pdev->dev, ret, "No clocks
> available\n");
> > +
> > + priv_plat->num_clks = ret;
>
> It looks like you should be able to share all the clk_bulk code with
> tegra_eqos_probe(). The stmmac driver suffers from lots of cut/paste code
> with no consolidation. You can at least not make the tegra code worse by
> doing a little refactoring.
Hi Andrew,
Just to clarify, you were referring to refactoring tegra code to use
clk_bulk APIs, right?
In that case, will look into this and evaluate the best approach for
refactoring the code.
- Swathi
>
> Andrew
next prev parent reply other threads:[~2025-01-29 11:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20250128102707epcas5p154db286b06da942e18ffe315e4767707@epcas5p1.samsung.com>
2025-01-28 10:25 ` [PATCH v5 0/4] net: stmmac: dwc-qos: Add FSD EQoS support Swathi K S
2025-01-28 10:25 ` [PATCH v5 1/4] dt-bindings: net: Add FSD EQoS device tree bindings Swathi K S
2025-01-28 14:14 ` Krzysztof Kozlowski
2025-01-29 9:18 ` Swathi K S
2025-01-30 6:05 ` Swathi K S
2025-01-28 15:40 ` Rob Herring (Arm)
2025-01-28 15:45 ` Rob Herring
2025-01-29 9:20 ` Swathi K S
2025-01-29 12:59 ` Andrew Lunn
2025-01-28 10:25 ` [PATCH v5 2/4] net: stmmac: dwc-qos: Add FSD EQoS support Swathi K S
2025-01-28 13:48 ` Andrew Lunn
2025-01-29 9:15 ` Swathi K S [this message]
2025-01-29 13:01 ` Andrew Lunn
2025-01-28 14:59 ` Russell King (Oracle)
2025-01-29 9:20 ` Swathi K S
2025-01-28 10:25 ` [PATCH v5 3/4] arm64: dts: fsd: Add Ethernet support for FSYS0 Block of FSD SoC Swathi K S
2025-01-28 10:25 ` [PATCH v5 4/4] arm64: dts: fsd: Add Ethernet support for PERIC " Swathi K S
2025-01-28 14:18 ` Krzysztof Kozlowski
2025-01-29 9:19 ` Swathi K S
2025-01-29 13:07 ` Andrew Lunn
2025-02-04 8:40 ` [PATCH v5 0/4] net: stmmac: dwc-qos: Add FSD EQoS support Krzysztof Kozlowski
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='002c01db722e$5abc8d10$1035a730$@samsung.com' \
--to=swathi.ks@samsung.com \
--cc=alexandre.torgue@foss.st.com \
--cc=alim.akhtar@samsung.com \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=gost.dev@samsung.com \
--cc=jayati.sahu@samsung.com \
--cc=joabreu@synopsys.com \
--cc=krzk@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fsd@tesla.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pankaj.dubey@samsung.com \
--cc=peppe.cavallaro@st.com \
--cc=ravi.patel@samsung.com \
--cc=rcsekar@samsung.com \
--cc=richardcochran@gmail.com \
--cc=robh@kernel.org \
--cc=ssiddha@tesla.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).