Thread (15 messages) 15 messages, 3 authors, 2022-09-28

Re: [PATCH v5 4/4] net: stmmac: Update the name of property 'clk_csr'

flat view

From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Date: 2022-09-23 09:10:58
Also in: linux-arm-kernel, linux-devicetree, linux-mediatek, lkml

Il 23/09/22 07:28, Jianguo Zhang ha scritto:
quoted hunk ↗ jump to hunk
Update the name of property 'clk_csr' as 'snps,clk-csr' to align with
the property name in the binding file.

Signed-off-by: Jianguo Zhang <redacted>
---
  drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 9f5cac4000da..18f9952d667f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -444,7 +444,7 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac)
  	 * or get clk_csr from device tree.
  	 */
  	plat->clk_csr = -1;
-	of_property_read_u32(np, "clk_csr", &plat->clk_csr);
+	of_property_read_u32(np, "snps,clk-csr", &plat->clk_csr);
This is going to break MT2712e on old devicetrees.

The right way of doing that is to check the return value of of_property_read_u32()
for "snps,clk-csr": if the property is not found, fall back to the old "clk_csr".

Regards,
Angelo
  
  	/* "snps,phy-addr" is not a standard property. Mark it as deprecated
  	 * and warn of its use. Remove this when phy node support is added.
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help