]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ppc4xx: Fix msg "initialization as root-complex failed" upon PCIe scan
authorStefan Roese <sr@denx.de>
Fri, 2 Oct 2009 12:35:16 +0000 (14:35 +0200)
committerStefan Roese <sr@denx.de>
Wed, 7 Oct 2009 07:13:46 +0000 (09:13 +0200)
This message is printed upon PCIe bus scan, not only upon error, but also
if no PCIe device is detected at all. Since this is not an error, let's
remove this message in this case. We already have the message
"link is not up." if there is no PCIe device present.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Wolfgang Denk <wd@denx.de>
board/amcc/canyonlands/canyonlands.c
board/amcc/katmai/katmai.c
board/amcc/kilauea/kilauea.c
board/amcc/makalu/makalu.c
board/amcc/yucca/yucca.c
cpu/ppc4xx/4xx_pcie.c

index f359d2377af22d5bb53f7c42f931d781cb350954..9495b621aca6948542c6fd151832155b4d172129 100644 (file)
@@ -28,6 +28,7 @@
 #include <asm/mmu.h>
 #include <asm/4xx_pcie.h>
 #include <asm/gpio.h>
+#include <asm/errno.h>
 
 extern flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */
 
@@ -414,6 +415,8 @@ void pcie_setup_hoses(int busno)
                        ret = ppc4xx_init_pcie_endport(i);
                else
                        ret = ppc4xx_init_pcie_rootport(i);
+               if (ret == -ENODEV)
+                       continue;
                if (ret) {
                        printf("PCIE%d: initialization as %s failed\n", i,
                               is_end_point(i) ? "endpoint" : "root-complex");
index bcef707403d856ce15811ea452c7faf3499901f2..aa6d0abddb8a5445614a015368e28ba61455a4b3 100644 (file)
@@ -32,6 +32,7 @@
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/4xx_pcie.h>
+#include <asm/errno.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -391,6 +392,8 @@ void pcie_setup_hoses(int busno)
                        ret = ppc4xx_init_pcie_endport(i);
                else
                        ret = ppc4xx_init_pcie_rootport(i);
+               if (ret == -ENODEV)
+                       continue;
                if (ret) {
                        printf("PCIE%d: initialization as %s failed\n", i,
                               is_end_point(i) ? "endpoint" : "root-complex");
index 5ebe69272c49d243b682eb5c1e1dd007d5a4b013..5cd822a7fa6b9b63dc7fd50b8284e00023bbf8b5 100644 (file)
@@ -28,6 +28,7 @@
 #include <fdt_support.h>
 #include <asm/processor.h>
 #include <asm/io.h>
+#include <asm/errno.h>
 
 #if defined(CONFIG_PCI)
 #include <pci.h>
@@ -317,6 +318,8 @@ void pcie_setup_hoses(int busno)
                        ret = ppc4xx_init_pcie_endport(i);
                else
                        ret = ppc4xx_init_pcie_rootport(i);
+               if (ret == -ENODEV)
+                       continue;
                if (ret) {
                        printf("PCIE%d: initialization as %s failed\n", i,
                               is_end_point(i) ? "endpoint" : "root-complex");
index fb0e7b75eb9bad44dfbd5bc65b9cfedc4508e7bc..d4277dda99c7c29cafacbab2cf6cc34b36e994a6 100644 (file)
@@ -29,6 +29,7 @@
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <fdt_support.h>
+#include <asm/errno.h>
 
 #if defined(CONFIG_PCI)
 #include <pci.h>
@@ -273,6 +274,8 @@ void pcie_setup_hoses(int busno)
                        ret = ppc4xx_init_pcie_endport(i);
                else
                        ret = ppc4xx_init_pcie_rootport(i);
+               if (ret == -ENODEV)
+                       continue;
                if (ret) {
                        printf("PCIE%d: initialization as %s failed\n", i,
                               is_end_point(i) ? "endpoint" : "root-complex");
index 033bdd20fa7b825d2fe0c3783c2bc21000488976..5c9d49178cf61c8ea0543a9d7d326bbddd333cb4 100644 (file)
@@ -32,6 +32,7 @@
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/4xx_pcie.h>
+#include <asm/errno.h>
 
 #include "yucca.h"
 
@@ -830,6 +831,8 @@ void pcie_setup_hoses(int busno)
                        yucca_setup_pcie_fpga_rootpoint(i);
                        ret = ppc4xx_init_pcie_rootport(i);
                }
+               if (ret == -ENODEV)
+                       continue;
                if (ret) {
                        printf("PCIE%d: initialization as %s failed\n", i,
                               is_end_point(i) ? "endpoint" : "root-complex");
index e880c288e1f2e2e01e700034639ab607d4b3110d..19d2c7dd2f46affa43e2f64c98bf30a5c62b85d7 100644 (file)
@@ -30,6 +30,7 @@
 #include <ppc4xx.h>
 #include <asm/processor.h>
 #include <asm-ppc/io.h>
+#include <asm/errno.h>
 
 #if (defined(CONFIG_440SPE) || defined(CONFIG_405EX) ||        \
     defined(CONFIG_460EX) || defined(CONFIG_460GT)) && \
@@ -874,7 +875,7 @@ int ppc4xx_init_pcie_port(int port, int rootport)
        val = SDR_READ(SDRN_PESDR_LOOP(port));
        if (!(val & 0x00001000)) {
                printf("PCIE%d: link is not up.\n", port);
-               return -1;
+               return -ENODEV;
        }
 
        /*