[U-Boot] [PATCH] pci: mx6: Implement reset callback
Tim Harvey
tharvey at gateworks.com
Fri Jan 31 06:33:38 CET 2014
On Fri, Jan 24, 2014 at 7:25 AM, Marek Vasut <marex at denx.de> wrote:
> 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 at denx.de>
> Cc: Stefano Babic <sbabic at 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;
> }
Tested-by: Tim Harvey <tharvey at gateworks.com>
Acked-by: Tim Harvey <tharvey at gateworks.com>
Tested on a Gateworks Ventana GW54xx board with a PLX PEX8609 switch
on the RC with 2 devices behind it:
00:01.0 - 16c3:abcd - Bridge device
01:00.0 - 10b5:8609 - Bridge device
02:01.0 - 10b5:8609 - Bridge device
02:04.0 - 10b5:8609 - Bridge device
02:05.0 - 10b5:8609 - Bridge device
02:06.0 - 10b5:8609 - Bridge device
02:07.0 - 10b5:8609 - Bridge device
02:08.0 - 10b5:8609 - Bridge device
08:00.0 - 11ab:4380 - Network controller
02:09.0 - 10b5:8609 - Bridge device
01:00.1 - 10b5:8609 - Base system peripheral
I would love to see this merged as the PCI driver won't really work
without it for boards that have a proper PCI_RST#.
Thanks Merek!
Tim
More information about the U-Boot
mailing list