]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/plat-orion/pcie.c
Merge branch 'x86/oprofile' into oprofile
[linux-2.6-omap-h63xx.git] / arch / arm / plat-orion / pcie.c
index abfda53f1800aaa671afff8896d9cc45f6f290a7..883902fead8928f9ff24cdfd781fa28b3013470c 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/pci.h>
 #include <linux/mbus.h>
 #include <asm/mach/pci.h>
-#include <asm/plat-orion/pcie.h>
+#include <plat/pcie.h>
 
 /*
  * PCIe unit register offsets.
@@ -39,6 +39,7 @@
 #define PCIE_CONF_DATA_OFF     0x18fc
 #define PCIE_MASK_OFF          0x1910
 #define PCIE_CTRL_OFF          0x1a00
+#define  PCIE_CTRL_X1_MODE             0x0001
 #define PCIE_STAT_OFF          0x1a04
 #define  PCIE_STAT_DEV_OFFS            20
 #define  PCIE_STAT_DEV_MASK            0x1f
@@ -62,6 +63,11 @@ int orion_pcie_link_up(void __iomem *base)
        return !(readl(base + PCIE_STAT_OFF) & PCIE_STAT_LINK_DOWN);
 }
 
+int __init orion_pcie_x4_mode(void __iomem *base)
+{
+       return !(readl(base + PCIE_CTRL_OFF) & PCIE_CTRL_X1_MODE);
+}
+
 int orion_pcie_get_local_bus_nr(void __iomem *base)
 {
        u32 stat = readl(base + PCIE_STAT_OFF);