powerpc/mpc86xx: Fix boot_flag for calling board_init_f()
[oweals/u-boot.git] / arch / powerpc / cpu / ppc4xx / 4xx_pci.c
index 80b0c1c6fc1819f88e82e321fb46589d55b8e8c5..33dc72585cb22b5737051d9b1d5d590ca500352f 100644 (file)
@@ -1,26 +1,5 @@
-/*-----------------------------------------------------------------------------+
- *       This source code is dual-licensed.  You may use it under the terms of
- *       the GNU General Public license version 2, or under the license below.
- *
- *       This source code has been made available to you by IBM on an AS-IS
- *       basis.  Anyone receiving this source is licensed under IBM
- *       copyrights to use it in any way he or she deems fit, including
- *       copying it, modifying it, compiling it, and redistributing it either
- *       with or without modifications.  No license under IBM patents or
- *       patent applications is to be implied by the copyright license.
- *
- *       Any user of this software should understand that IBM cannot provide
- *       technical support for this software and will not be responsible for
- *       any consequences resulting from the use of this software.
- *
- *       Any person who transfers this source code or any derivative work
- *       must include the IBM copyright notice, this paragraph, and the
- *       preceding two paragraphs in the transferred software.
- *
- *       COPYRIGHT   I B M   CORPORATION 1995
- *       LICENSED MATERIAL  -  PROGRAM PROPERTY OF I B M
- *-----------------------------------------------------------------------------*/
-/*----------------------------------------------------------------------------+
+/*
+ * SPDX-License-Identifier:    GPL-2.0 IBM-pibs
  *
  *  File Name:   405gp_pci.c
  *
@@ -164,14 +143,14 @@ void pci_405gp_init(struct pci_controller *hose)
        ptmla_str = getenv("ptm1la");
        ptmms_str = getenv("ptm1ms");
        if(NULL != ptmla_str && NULL != ptmms_str ) {
-               ptmla[0] = simple_strtoul (ptmla_str, NULL, 16);
+               ptmla[0] = simple_strtoul (ptmla_str, NULL, 16);
                ptmms[0] = simple_strtoul (ptmms_str, NULL, 16);
        }
 
        ptmla_str = getenv("ptm2la");
        ptmms_str = getenv("ptm2ms");
        if(NULL != ptmla_str && NULL != ptmms_str ) {
-               ptmla[1] = simple_strtoul (ptmla_str, NULL, 16);
+               ptmla[1] = simple_strtoul (ptmla_str, NULL, 16);
                ptmms[1] = simple_strtoul (ptmms_str, NULL, 16);
        }
 #endif
@@ -707,7 +686,7 @@ void pci_master_init(struct pci_controller *hose)
 #endif /* CONFIG_SYS_PCI_MASTER_INIT */
 
 #if defined(CONFIG_SYS_PCI_MASTER_INIT) || defined(CONFIG_SYS_PCI_TARGET_INIT)
-int pci_440_init (struct pci_controller *hose)
+static int pci_440_init (struct pci_controller *hose)
 {
        int reg_num = 0;
 
@@ -859,7 +838,9 @@ void pci_init_board(void)
         * is selected.
         */
 #if defined(CONFIG_SYS_PCI_MASTER_INIT) || defined(CONFIG_SYS_PCI_TARGET_INIT)
-       busno = pci_440_init (&ppc440_hose);
+       busno = pci_440_init(&ppc440_hose);
+       if (busno < 0)
+               return;
 #endif
 #if (defined(CONFIG_440SPE) || \
     defined(CONFIG_460EX) || defined(CONFIG_460GT)) && \