Merge branch 'for-1.3.2-ver2'
[oweals/u-boot.git] / include / asm-ppc / 4xx_pcie.h
index 1830c6a8efd57fa80fbeb253859e7afca6f1fe86..4c03b050fef28d689f8fe4089cd983d76e8e2fb2 100644 (file)
 /*
  * UTL register offsets
  */
+#define        PEUTL_PBCTL             0x00
 #define PEUTL_PBBSZ            0x20
 #define PEUTL_OPDBSZ           0x68
 #define PEUTL_IPHBSZ           0x70
 #define PEUTL_OUTTR            0x90
 #define PEUTL_INTR             0x98
 #define PEUTL_PCTL             0xa0
+#define        PEUTL_RCSTA             0xb0
 #define PEUTL_RCIRQEN          0xb8
 
 /*
 #define PECFG_BAR0LMPA         0x210
 #define PECFG_BAR0HMPA         0x214
 #define PECFG_BAR1MPA          0x218
-#define PECFG_BAR2MPA          0x220
+#define PECFG_BAR2LMPA         0x220
+#define PECFG_BAR2HMPA         0x224
 
 #define PECFG_PIMEN            0x33c
 #define PECFG_PIM0LAL          0x340
@@ -259,9 +262,13 @@ int pcie_hose_scan(struct pci_controller *hose, int bus);
  */
 static inline int is_end_point(int port)
 {
-       static char s[10], *tk;
+       char s[10], *tk;
+       char *pcie_mode = getenv("pcie_mode");
 
-       strcpy(s, getenv("pcie_mode"));
+       if (pcie_mode == NULL)
+               return 0;
+
+       strcpy(s, pcie_mode);
        tk = strtok(s, ":");
 
        switch (port) {