Thread (45 messages) 45 messages, 5 authors, 2024-11-19

Re: [PATCH v4 14/16] net: stmmac: dwmac-s32: add basic NXP S32G/S32R glue driver

From: Krzysztof Kozlowski <krzk@kernel.org>
Date: 2024-10-31 17:54:02
Also in: imx, linux-arm-kernel, linux-arm-msm, linux-devicetree, lkml

On 31/10/2024 18:16, Jan Petrous wrote:
On Thu, Oct 31, 2024 at 04:44:45PM +0100, Krzysztof Kozlowski wrote:
quoted
On 31/10/2024 15:43, Jan Petrous wrote:
quoted
On Tue, Oct 29, 2024 at 08:13:40AM +0100, Krzysztof Kozlowski wrote:
quoted
On Mon, Oct 28, 2024 at 09:24:56PM +0100, Jan Petrous (OSS) wrote:
quoted
+	plat->init = s32_gmac_init;
+	plat->exit = s32_gmac_exit;
+	plat->fix_mac_speed = s32_fix_mac_speed;
+
+	plat->bsp_priv = gmac;
+
+	return stmmac_pltfr_probe(pdev, plat, &res);
+}
+
+static const struct of_device_id s32_dwmac_match[] = {
+	{ .compatible = "nxp,s32g2-dwmac" },
+	{ .compatible = "nxp,s32g3-dwmac" },
+	{ .compatible = "nxp,s32r-dwmac" },
Why do you need three same entries?
We have three different SoCs and in v3 review you told me
to return all back:
https://patchwork.kernel.org/comment/26067257/
It was about binding, not driver.

I also asked there: use proper fallback and compatibility. Both comments
of course affect your driver, but why choosing only first part?
Does it mean I should remove first two (G2/G3) members from match array
and use "nxp,s32r-dwmac" as fallback for G2/G3? And similarly change
the bindings to:

  compatible:
    oneOf:
      - const: nxp,s32r-dwmac
      - items:
	  - enum:
	      - nxp,s32g2-dwmac
	      - nxp,s32g3-dwmac
          - const: nxp,s32r-dwmac

And add here, into the driver, those members back when some device
specific feature will be needed? Am I understand your hints right?
Yes, assuming devices are compatible, but so far driver suggested they are.

Best regards,
Krzysztof
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help