From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>,
davem@davemloft.net, Rob Herring <robh+dt@kernel.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, thomas.petazzoni@bootlin.com,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
linux-arm-kernel@lists.infradead.org,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Luka Perkov <luka.perkov@sartura.hr>,
Robert Marko <robert.marko@sartura.hr>
Subject: Re: [PATCH net-next v4 1/5] net: ipqess: introduce the Qualcomm IPQESS driver
Date: Fri, 9 Sep 2022 17:39:22 +0200 [thread overview]
Message-ID: <c6d71abe-51d9-945e-bf70-c84b7c5e71bf@linaro.org> (raw)
In-Reply-To: <20220909152454.7462-2-maxime.chevallier@bootlin.com>
On 09/09/2022 17:24, Maxime Chevallier wrote:
> The Qualcomm IPQESS controller is a simple 1G Ethernet controller found
> on the IPQ4019 chip. This controller has some specificities, in that the
> IPQ4019 platform that includes that controller also has an internal
> switch, based on the QCA8K IP.
>
> It is connected to that switch through an internal link, and doesn't
> expose directly any external interface, hence it only supports the
> PHY_INTERFACE_MODE_INTERNAL for now.
>
> It has 16 RX and TX queues, with a very basic RSS fanout configured at
Thank you for your patch. There is something to discuss/improve.
> +}
> +
> +static int ipqess_axi_probe(struct platform_device *pdev)
> +{
> + struct device_node *np = pdev->dev.of_node;
> + struct net_device *netdev;
> + phy_interface_t phy_mode;
> + struct resource *res;
> + struct ipqess *ess;
> + int i, err = 0;
> +
> + netdev = devm_alloc_etherdev_mqs(&pdev->dev, sizeof(struct ipqess),
sizeof(*)
> + IPQESS_NETDEV_QUEUES,
> + IPQESS_NETDEV_QUEUES);
> + if (!netdev)
> + return -ENOMEM;
> +
> + ess = netdev_priv(netdev);
> + ess->netdev = netdev;
> + ess->pdev = pdev;
> + spin_lock_init(&ess->stats_lock);
> + SET_NETDEV_DEV(netdev, &pdev->dev);
> + platform_set_drvdata(pdev, netdev);
> +
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + ess->hw_addr = devm_ioremap_resource(&pdev->dev, res);
Use a helper for this.
> + if (IS_ERR(ess->hw_addr))
> + return PTR_ERR(ess->hw_addr);
> +
> + err = of_get_phy_mode(np, &phy_mode);
> + if (err) {
> + dev_err(&pdev->dev, "incorrect phy-mode\n");
> + return err;
> + }
> +
> + ess->ess_clk = devm_clk_get(&pdev->dev, "ess");
There is no such clock "ess"...
> + if (!IS_ERR(ess->ess_clk))
> + clk_prepare_enable(ess->ess_clk);
> +
> + ess->ess_rst = devm_reset_control_get(&pdev->dev, "ess");
Same problem.
> + if (IS_ERR(ess->ess_rst))
> + goto err_clk;
> +
> + ipqess_reset(ess);
> +
> + ess->phylink_config.dev = &netdev->dev;
> + ess->phylink_config.type = PHYLINK_NETDEV;
> + ess->phylink_config.mac_capabilities = MAC_SYM_PAUSE | MAC_10 |
> + MAC_100 | MAC_1000FD;
> +
> + __set_bit(PHY_INTERFACE_MODE_INTERNAL,
> + ess->phylink_config.supported_interfaces);
> +
> + ess->phylink = phylink_create(&ess->phylink_config,
> + of_fwnode_handle(np), phy_mode,
> + &ipqess_phylink_mac_ops);
> + if (IS_ERR(ess->phylink)) {
> + err = PTR_ERR(ess->phylink);
> + goto err_clk;
> + }
> +
Best regards,
Krzysztof
next prev parent reply other threads:[~2022-09-09 15:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-09 15:24 [PATCH net-next v4 0/5] net: ipqess: introduce Qualcomm IPQESS driver Maxime Chevallier
2022-09-09 15:24 ` [PATCH net-next v4 1/5] net: ipqess: introduce the " Maxime Chevallier
2022-09-09 15:39 ` Krzysztof Kozlowski [this message]
2022-09-11 22:11 ` kernel test robot
2022-09-09 15:24 ` [PATCH net-next v4 2/5] net: dsa: add out-of-band tagging protocol Maxime Chevallier
2022-09-17 0:15 ` Vladimir Oltean
2022-09-17 9:00 ` Maxime Chevallier
2022-09-09 15:24 ` [PATCH net-next v4 3/5] net: ipqess: Add out-of-band DSA tagging support Maxime Chevallier
2022-09-09 15:24 ` [PATCH net-next v4 4/5] net: dt-bindings: Introduce the Qualcomm IPQESS Ethernet controller Maxime Chevallier
2022-09-09 15:35 ` Krzysztof Kozlowski
2022-09-09 15:24 ` [PATCH net-next v4 5/5] ARM: dts: qcom: ipq4019: Add description for the " Maxime Chevallier
2022-09-09 15:36 ` Krzysztof Kozlowski
2022-09-17 0:20 ` [PATCH net-next v4 0/5] net: ipqess: introduce Qualcomm IPQESS driver Vladimir Oltean
2022-09-17 9:02 ` Maxime Chevallier
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=c6d71abe-51d9-945e-bf70-c84b7c5e71bf@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=luka.perkov@sartura.hr \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=robert.marko@sartura.hr \
--cc=robh+dt@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=vladimir.oltean@nxp.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).