Re: [PATCH 1/3] net: stmmac: Add interconnect support in qcom-ethqos driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

> 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@xxxxxxxxxxx>
> ---
>  .../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.

> +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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux