mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 06:33:41 +00:00
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>
This commit is contained in:
parent
783c3aace2
commit
284f12bfa6
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user