public inbox for linux-arm-msm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sagar Cheluvegowda <quic_scheluve@quicinc.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Vinod Koul <vkoul@kernel.org>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Jose Abreu <joabreu@synopsys.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"Rob Herring" <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	Bhupesh Sharma <bhupesh.sharma@linaro.org>, <kernel@quicinc.com>,
	Andrew Halaney <ahalaney@redhat.com>,
	<linux-arm-msm@vger.kernel.org>, <netdev@vger.kernel.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>
Subject: Re: [PATCH 1/3] net: stmmac: Add interconnect support in qcom-ethqos driver
Date: Fri, 21 Jun 2024 12:22:04 -0700	[thread overview]
Message-ID: <b075e5a8-ca75-49cc-84d6-84e28bc38eee@quicinc.com> (raw)
In-Reply-To: <159700cc-f46c-4f70-82aa-972ba6e904ca@lunn.ch>



On 6/19/2024 4:13 PM, Andrew Lunn wrote:
> On Wed, Jun 19, 2024 at 03:41:29PM -0700, Sagar Cheluvegowda wrote:
>> Add interconnect support in qcom-ethqos driver to vote for bus
>> bandwidth based on the current speed of the driver.
>> This change adds support for two different paths - one from ethernet
>> to DDR and the other from Apps to ethernet.
> 
> What do you mean by Apps?
> Apps means application processor.

>> Vote from each interconnect client is aggregated and the on-chip
>> interconnect hardware is configured to the most appropriate
>> bandwidth profile.
>>
>> Signed-off-by: Sagar Cheluvegowda <quic_scheluve@quicinc.com>
>> ---
>>  .../net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c   | 19 +++++++++++++++++++
>>  1 file changed, 19 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
>> index e254b21fdb59..682e68f37dbd 100644
>> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
>> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
>> @@ -7,6 +7,7 @@
>>  #include <linux/platform_device.h>
>>  #include <linux/phy.h>
>>  #include <linux/phy/phy.h>
>> +#include <linux/interconnect.h>
> 
> If you look at these includes, you should notice they are
> alphabetical.
> Agreed, let me update it in v2 of this series.
>> +static void ethqos_set_icc_bw(struct qcom_ethqos *ethqos, unsigned int speed)
>> +{
>> +	icc_set_bw(ethqos->axi_icc_path, Mbps_to_icc(speed), Mbps_to_icc(speed));
>> +	icc_set_bw(ethqos->ahb_icc_path, Mbps_to_icc(speed), Mbps_to_icc(speed));
>> +}
>> +
>>  static void ethqos_fix_mac_speed(void *priv, unsigned int speed, unsigned int mode)
>>  {
>>  	struct qcom_ethqos *ethqos = priv;
>>  
>>  	ethqos->speed = speed;
>>  	ethqos_update_link_clk(ethqos, speed);
>> +	ethqos_set_icc_bw(ethqos, speed);
>>  	ethqos_configure(ethqos);
>>  }
>>  
>> @@ -813,6 +824,14 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
>>  		return dev_err_probe(dev, PTR_ERR(ethqos->link_clk),
>>  				     "Failed to get link_clk\n");
>>  
>> +	ethqos->axi_icc_path = devm_of_icc_get(dev, "axi_icc_path");
>> +	if (IS_ERR(ethqos->axi_icc_path))
>> +		return PTR_ERR(ethqos->axi_icc_path);
>> +
>> +	ethqos->ahb_icc_path = devm_of_icc_get(dev, "ahb_icc_path");
>> +	if (IS_ERR(ethqos->axi_icc_path))
>> +		return PTR_ERR(ethqos->axi_icc_path);
>> +
> 
> This all looks pretty generic. Any reason why this is just in the
> Qualcomm device, and not at a higher level so it could be used for all
> stmmac devices if the needed properties are found in DT?
> 
>        Andrew
ICC is a software framework to access the NOC bus topology of the
system, all though "axi" and "ahb" buses seem generic but the 
topologies of these NOC's are specific to the vendors of synopsys chipset hence
this framework might not be applicable to all the vendors of stmmac driver.

	Sagar

  reply	other threads:[~2024-06-21 19:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19 22:41 [PATCH 0/3] Add interconnect support for qcom_ethqos driver Sagar Cheluvegowda
2024-06-19 22:41 ` [PATCH 1/3] net: stmmac: Add interconnect support in qcom-ethqos driver Sagar Cheluvegowda
2024-06-19 23:13   ` Andrew Lunn
2024-06-21 19:22     ` Sagar Cheluvegowda [this message]
2024-06-21 20:01       ` Andrew Lunn
2024-06-21 20:44         ` Andrew Halaney
2024-06-20  7:12   ` Krzysztof Kozlowski
2024-06-19 22:41 ` [PATCH 2/3] net: stmmac: Bring down the clocks to lower frequencies when mac link goes down Sagar Cheluvegowda
2024-06-19 22:41 ` [PATCH 3/3] dt-bindings: net: qcom: ethernet: Add interconnect properties Sagar Cheluvegowda
2024-06-20  7:12   ` Krzysztof Kozlowski
2024-06-19 23:03 ` [PATCH 0/3] Add interconnect support for qcom_ethqos driver Andrew Lunn

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=b075e5a8-ca75-49cc-84d6-84e28bc38eee@quicinc.com \
    --to=quic_scheluve@quicinc.com \
    --cc=ahalaney@redhat.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew@lunn.ch \
    --cc=bhupesh.sharma@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=joabreu@synopsys.com \
    --cc=kernel@quicinc.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux@armlinux.org.uk \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    --cc=vkoul@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