From 284f12bfa64779ed156262a0351e07af5379be9c Mon Sep 17 00:00:00 2001 From: Martin Schiller Date: Wed, 10 Apr 2024 13:48:50 +0200 Subject: [PATCH] lantiq: ifxmips_pcie: use dev_err_probe Use dev_err_probe() to get rid of the following warning which is seen when the PCIe PHY has not been probed yet: pcie-xrx200 1d900000.pcie: failed to get the PCIe PHY Signed-off-by: Martin Schiller --- .../0151-lantiq-ifxmips_pcie-use-of.patch | 13 ++++++------- .../0151-lantiq-ifxmips_pcie-use-of.patch | 13 ++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/target/linux/lantiq/patches-5.15/0151-lantiq-ifxmips_pcie-use-of.patch b/target/linux/lantiq/patches-5.15/0151-lantiq-ifxmips_pcie-use-of.patch index a11ec3ec98..d509c3a76a 100644 --- a/target/linux/lantiq/patches-5.15/0151-lantiq-ifxmips_pcie-use-of.patch +++ b/target/linux/lantiq/patches-5.15/0151-lantiq-ifxmips_pcie-use-of.patch @@ -151,7 +151,7 @@ Signed-off-by: Eddi De Pieri } if (i >= IFX_PCIE_PHY_LOOP_CNT) { printk(KERN_ERR "%s link up failed!!!!!\n", __func__); -@@ -1045,17 +1088,74 @@ pcie_rc_initialize(int pcie_port) +@@ -1045,17 +1088,73 @@ pcie_rc_initialize(int pcie_port) return 0; } @@ -193,10 +193,9 @@ Signed-off-by: Eddi De Pieri - + + ltq_pcie_phy = devm_phy_get(&pdev->dev, "pcie"); -+ if (IS_ERR(ltq_pcie_phy)) { -+ dev_err(&pdev->dev, "failed to get the PCIe PHY\n"); -+ return PTR_ERR(ltq_pcie_phy); -+ } ++ if (IS_ERR(ltq_pcie_phy)) ++ return dev_err_probe(&pdev->dev, PTR_ERR(ltq_pcie_phy), ++ "failed to get the PCIe PHY\n"); + + ltq_pcie_reset = devm_reset_control_get_shared(&pdev->dev, NULL); + if (IS_ERR(ltq_pcie_reset)) { @@ -228,7 +227,7 @@ Signed-off-by: Eddi De Pieri for (pcie_port = startup_port; pcie_port < IFX_PCIE_CORE_NR; pcie_port++){ if (pcie_rc_initialize(pcie_port) == 0) { IFX_PCIE_PRINT(PCIE_MSG_INIT, "%s: ifx_pcie_cfg_base 0x%p\n", -@@ -1067,6 +1167,7 @@ static int __init ifx_pcie_bios_init(voi +@@ -1067,6 +1166,7 @@ static int __init ifx_pcie_bios_init(voi return -ENOMEM; } ifx_pcie_controller[pcie_port].pcic.io_map_base = (unsigned long)io_map_base; @@ -236,7 +235,7 @@ Signed-off-by: Eddi De Pieri register_pci_controller(&ifx_pcie_controller[pcie_port].pcic); /* XXX, clear error status */ -@@ -1083,6 +1184,30 @@ static int __init ifx_pcie_bios_init(voi +@@ -1083,6 +1183,30 @@ static int __init ifx_pcie_bios_init(voi return 0; } diff --git a/target/linux/lantiq/patches-6.1/0151-lantiq-ifxmips_pcie-use-of.patch b/target/linux/lantiq/patches-6.1/0151-lantiq-ifxmips_pcie-use-of.patch index 7cfa675b49..0ab929b2e2 100644 --- a/target/linux/lantiq/patches-6.1/0151-lantiq-ifxmips_pcie-use-of.patch +++ b/target/linux/lantiq/patches-6.1/0151-lantiq-ifxmips_pcie-use-of.patch @@ -151,7 +151,7 @@ Signed-off-by: Eddi De Pieri } if (i >= IFX_PCIE_PHY_LOOP_CNT) { printk(KERN_ERR "%s link up failed!!!!!\n", __func__); -@@ -1045,17 +1088,74 @@ pcie_rc_initialize(int pcie_port) +@@ -1045,17 +1088,73 @@ pcie_rc_initialize(int pcie_port) return 0; } @@ -193,10 +193,9 @@ Signed-off-by: Eddi De Pieri - + + ltq_pcie_phy = devm_phy_get(&pdev->dev, "pcie"); -+ if (IS_ERR(ltq_pcie_phy)) { -+ dev_err(&pdev->dev, "failed to get the PCIe PHY\n"); -+ return PTR_ERR(ltq_pcie_phy); -+ } ++ if (IS_ERR(ltq_pcie_phy)) ++ return dev_err_probe(&pdev->dev, PTR_ERR(ltq_pcie_phy), ++ "failed to get the PCIe PHY\n"); + + ltq_pcie_reset = devm_reset_control_get_shared(&pdev->dev, NULL); + if (IS_ERR(ltq_pcie_reset)) { @@ -228,7 +227,7 @@ Signed-off-by: Eddi De Pieri for (pcie_port = startup_port; pcie_port < IFX_PCIE_CORE_NR; pcie_port++){ if (pcie_rc_initialize(pcie_port) == 0) { IFX_PCIE_PRINT(PCIE_MSG_INIT, "%s: ifx_pcie_cfg_base 0x%p\n", -@@ -1067,6 +1167,7 @@ static int __init ifx_pcie_bios_init(voi +@@ -1067,6 +1166,7 @@ static int __init ifx_pcie_bios_init(voi return -ENOMEM; } ifx_pcie_controller[pcie_port].pcic.io_map_base = (unsigned long)io_map_base; @@ -236,7 +235,7 @@ Signed-off-by: Eddi De Pieri register_pci_controller(&ifx_pcie_controller[pcie_port].pcic); /* XXX, clear error status */ -@@ -1083,6 +1184,30 @@ static int __init ifx_pcie_bios_init(voi +@@ -1083,6 +1183,30 @@ static int __init ifx_pcie_bios_init(voi return 0; } -- 2.30.2