]> git.sur5r.net Git - u-boot/blobdiff - board/keymile/kmp204x/pci.c
tools/file2include: avoid incorrect comments
[u-boot] / board / keymile / kmp204x / pci.c
index a484eb574955ad6afc1de8f9c66ed292a12f46ed..965a8ce98b6d7814a7e3d1fdd041fbade08b6713 100644 (file)
@@ -1,20 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2013 Keymile AG
  * Valentin Longchamp <valentin.longchamp@keymile.com>
  *
  * Copyright 2007-2011 Freescale Semiconductor, Inc.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <command.h>
 #include <pci.h>
 #include <asm/fsl_pci.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <asm/fsl_serdes.h>
-#include <asm/errno.h>
+#include <linux/errno.h>
 
 #include "kmp204x.h"
 
@@ -94,20 +93,23 @@ err_out:
 }
 
 #define PCIE_SW_RST    14
-#define PEXHC_SW_RST   13
-#define HOOPER_SW_RST  12
+#define PEXHC_RST      13
+#define HOOPER_RST     12
 
 void pci_init_board(void)
 {
-       /* first wait for the PCIe FPGA to be configured
+       qrio_prstcfg(PCIE_SW_RST, PRSTCFG_POWUP_UNIT_CORE_RST);
+       qrio_prstcfg(PEXHC_RST, PRSTCFG_POWUP_UNIT_CORE_RST);
+       qrio_prstcfg(HOOPER_RST, PRSTCFG_POWUP_UNIT_CORE_RST);
+
+       /* wait for the PCIe FPGA to be configured
         * it has been triggered earlier in board_early_init_r */
-       int ret = wait_for_fpga_config();
-       if (ret)
+       if (wait_for_fpga_config())
                printf("error finishing PCIe FPGA config\n");
 
        qrio_prst(PCIE_SW_RST, false, false);
-       qrio_prst(PEXHC_SW_RST, false, false);
-       qrio_prst(HOOPER_SW_RST, false, false);
+       qrio_prst(PEXHC_RST, false, false);
+       qrio_prst(HOOPER_RST, false, false);
        /* Hooper is not direcly PCIe capable */
        mdelay(50);