Add a callback so that a board can implement it's own specific routine to
toggle the port's nRESET line.

Signed-off-by: Marek Vasut <ma...@denx.de>
Cc: Stefano Babic <sba...@denx.de>
---
 drivers/pci/pcie_imx.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/pcie_imx.c
index 0a74867..b554075 100644
--- a/drivers/pci/pcie_imx.c
+++ b/drivers/pci/pcie_imx.c
@@ -450,6 +450,13 @@ static int imx6_pcie_init_phy(void)
        return 0;
 }
 
+__weak int imx6_pcie_toggle_reset(void)
+{
+       /* This function ought to be overridden ! */
+       puts("WARNING: Make sure the PCIe nRESET line is connected!\n");
+       return 0;
+}
+
 static int imx6_pcie_deassert_core_reset(void)
 {
        struct iomuxc *iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR;
@@ -466,10 +473,9 @@ static int imx6_pcie_deassert_core_reset(void)
         * Wait for the clock to settle a bit, when the clock are sourced
         * from the CPU, we need about 30mS to settle.
         */
-       mdelay(30);
+       mdelay(50);
 
-       /* FIXME: GPIO reset goes here */
-       mdelay(100);
+       imx6_pcie_toggle_reset();
 
        return 0;
 }
-- 
1.8.4.2

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to