public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] pci: mx6: Implement reset callback
@ 2014-01-24 15:25 Marek Vasut
  2014-01-28 15:06 ` Stefano Babic
  2014-01-31  5:33 ` Tim Harvey
  0 siblings, 2 replies; 15+ messages in thread
From: Marek Vasut @ 2014-01-24 15:25 UTC (permalink / raw)
  To: u-boot

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 <marex@denx.de>
Cc: Stefano Babic <sbabic@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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-02-04 11:25 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-24 15:25 [U-Boot] [PATCH] pci: mx6: Implement reset callback Marek Vasut
2014-01-28 15:06 ` Stefano Babic
2014-01-28 19:32   ` Marek Vasut
2014-02-03 11:56     ` Stefano Babic
2014-02-03 18:17       ` Marek Vasut
2014-02-03 18:40         ` Eric Nelson
2014-02-03 19:33           ` Marek Vasut
2014-02-03 19:57             ` Eric Nelson
2014-02-03 20:16               ` Marek Vasut
2014-02-03 20:54                 ` Eric Nelson
2014-02-03 23:34                   ` Marek Vasut
2014-02-04  0:57                     ` Eric Nelson
2014-02-04 11:25                       ` Marek Vasut
2014-02-03 20:12         ` Stefano Babic
2014-01-31  5:33 ` Tim Harvey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox