]> git.sur5r.net Git - u-boot/commitdiff
pci: tegra: call tegra_pcie_board_init() earlier
authorStephen Warren <swarren@nvidia.com>
Mon, 5 Oct 2015 23:00:43 +0000 (17:00 -0600)
committerTom Warren <twarren@nvidia.com>
Thu, 12 Nov 2015 16:21:05 +0000 (09:21 -0700)
The board PCI setup code may control regulators that are required simply
to bring up the PCI controller itself (or PLLs, IOs, ... it uses). Move
the call to this function earlier so that all board-provided resources
are ready early enough for everything to work.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
drivers/pci/pci_tegra.c

index 177d48dde4771b5baec717ce5e731a2d42cd92bb..bf078b3369baf4af65463429069228c7f0643de5 100644 (file)
@@ -618,8 +618,6 @@ static int tegra_pcie_power_on(struct tegra_pcie *pcie)
                return err;
        }
 
-       tegra_pcie_board_init();
-
        err = tegra_powergate_sequence_power_up(TEGRA_POWERGATE_PCIE,
                                                PERIPH_ID_PCIE);
        if (err < 0) {
@@ -1164,6 +1162,8 @@ void pci_init_board(void)
        const void *fdt = gd->fdt_blob;
        int count, nodes[1];
 
+       tegra_pcie_board_init();
+
        count = fdtdec_find_aliases_for_id(fdt, "pcie-controller",
                                           COMPAT_NVIDIA_TEGRA124_PCIE,
                                           nodes, ARRAY_SIZE(nodes));