]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
imx: ventana: fix pcie reset for GW522x
authorTim Harvey <tharvey@gateworks.com>
Sat, 9 May 2015 01:28:33 +0000 (18:28 -0700)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 13:00:30 +0000 (15:00 +0200)
The re-assignment of pcie_rst gpio for GW522x needs to occur earlier, before
the PCI subsystem calls the toggle funciton.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
board/gateworks/gw_ventana/gw_ventana.c

index 554cd844b8ee2bdeecabf9bb956f89c12f64f344..8cfc1f2d5ac95befbca6fde9c8e96e3dbb733f43 100644 (file)
@@ -1184,10 +1184,6 @@ static void setup_board_gpio(int board)
        }
 
 #if !defined(CONFIG_CMD_PCI)
-       /* GW522x Uses GPIO3_IO23 for PCIE_RST# */
-       if (board_type == GW52xx && info->model[4] == '2')
-               gpio_cfg[board].pcie_rst = IMX_GPIO_NR(3, 23);
-
        /* assert PCI_RST# (released by OS when clock is valid) */
        gpio_request(gpio_cfg[board].pcie_rst, "pci_rst#");
        gpio_direction_output(gpio_cfg[board].pcie_rst, 0);
@@ -1435,6 +1431,10 @@ int board_init(void)
                int count = gpio_cfg[board_type].num_pads;
 
                imx_iomux_v3_setup_multiple_pads(p, count);
+
+               /* GW522x Uses GPIO3_IO23 for PCIE_RST# */
+               if (board_type == GW52xx && ventana_info.model[4] == '2')
+                       gpio_cfg[board_type].pcie_rst = IMX_GPIO_NR(3, 23);
        }
 
        return 0;