summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-orion/pcie.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-18 21:13:20 +0200
committerIngo Molnar <mingo@elte.hu>2008-07-18 21:13:20 +0200
commitf6dc8ccaab6d8f63cbae1e6c73fe972b26f5376c (patch)
treec5643fcdc884a8d0bfc3f1bc28039cab7394e5bc /arch/arm/plat-orion/pcie.c
parent323ec001c6bb98eeabb5abbdbb8c8055d9496554 (diff)
parent5b664cb235e97afbf34db9c4d77f08ebd725335e (diff)
downloadop-kernel-dev-f6dc8ccaab6d8f63cbae1e6c73fe972b26f5376c.zip
op-kernel-dev-f6dc8ccaab6d8f63cbae1e6c73fe972b26f5376c.tar.gz
Merge branch 'linus' into core/generic-dma-coherent
Conflicts: kernel/Makefile Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/arm/plat-orion/pcie.c')
-rw-r--r--arch/arm/plat-orion/pcie.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/plat-orion/pcie.c b/arch/arm/plat-orion/pcie.c
index abfda53..ca32c60 100644
--- a/arch/arm/plat-orion/pcie.c
+++ b/arch/arm/plat-orion/pcie.c
@@ -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);
OpenPOWER on IntegriCloud