summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci-imx6.c
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2018-12-16 21:19:20 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-01-08 16:28:48 +0100
commit8aff03ca6b1078dd6a77b3836320329380351b22 (patch)
tree71c2b79bdc7b631b1c0ca631f9c5085c2a27dd5b /drivers/pci/pci-imx6.c
parente24f672e4fed0995f77c66b963f14d3d87c9ee67 (diff)
downloadbarebox-8aff03ca6b1078dd6a77b3836320329380351b22.tar.gz
barebox-8aff03ca6b1078dd6a77b3836320329380351b22.tar.xz
PCI: dwc: designware: Handle ->host_init() failures
Port of a Linux commit 4a301766f5263dd94c1b95d1b1bbdf338afb1a37 In several dwc-based drivers, ->host_init() can fail, so make sure to propagate and handle this to avoid continuing operation of a driver or hardware in an invalid state. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Joao Pinto <jpinto@synopsys.com> Acked-by: Jingoo Han <jingoohan1@gmail.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/pci/pci-imx6.c')
-rw-r--r--drivers/pci/pci-imx6.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/pci-imx6.c b/drivers/pci/pci-imx6.c
index 78aa5215ad..1807f29c9e 100644
--- a/drivers/pci/pci-imx6.c
+++ b/drivers/pci/pci-imx6.c
@@ -477,7 +477,7 @@ err_reset_phy:
return ret;
}
-static void imx6_pcie_host_init(struct pcie_port *pp)
+static int imx6_pcie_host_init(struct pcie_port *pp)
{
struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
struct imx6_pcie *imx6_pcie = to_imx6_pcie(pci);
@@ -487,6 +487,8 @@ static void imx6_pcie_host_init(struct pcie_port *pp)
imx6_pcie_deassert_core_reset(imx6_pcie);
dw_pcie_setup_rc(pp);
imx6_pcie_establish_link(imx6_pcie);
+
+ return 0;
}
static int imx6_pcie_link_up(struct dw_pcie *pci)