summaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq
diff options
context:
space:
mode:
authorMartin Schiller <ms@dev.tdt.de>2024-04-10 13:48:50 +0200
committerMartin Schiller <ms@dev.tdt.de>2024-05-15 08:54:58 +0200
commit284f12bfa64779ed156262a0351e07af5379be9c (patch)
tree7e7e81d97db64915fce94cda498d5a04639020c5 /target/linux/lantiq
parent783c3aace252b5eb596fad15ca91d6aa25a3fbe1 (diff)
downloadopenwrt-284f12bfa64779ed156262a0351e07af5379be9c.tar.gz
openwrt-284f12bfa64779ed156262a0351e07af5379be9c.tar.bz2
openwrt-284f12bfa64779ed156262a0351e07af5379be9c.zip
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 <ms@dev.tdt.de>
Diffstat (limited to 'target/linux/lantiq')
-rw-r--r--target/linux/lantiq/patches-5.15/0151-lantiq-ifxmips_pcie-use-of.patch13
-rw-r--r--target/linux/lantiq/patches-6.1/0151-lantiq-ifxmips_pcie-use-of.patch13
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 <eddi@depieri.net>
}
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 <eddi@depieri.net>
-
+
+ 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 <eddi@depieri.net>
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 <eddi@depieri.net>
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 <eddi@depieri.net>
}
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 <eddi@depieri.net>
-
+
+ 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 <eddi@depieri.net>
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 <eddi@depieri.net>
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;
}