From 420a10c6e1ac8fb40a2cc302877e46d2704573b5 Mon Sep 17 00:00:00 2001 From: Lennert Buytenhek Date: Sun, 22 Jun 2008 22:45:09 +0200 Subject: [PATCH] --- yaml --- r: 100759 b: refs/heads/master c: a9311cfed241ebcd6b5f9be5c8c6d519bf22f9e7 h: refs/heads/master i: 100757: aee0c69cb42ad7b0effd9b5c52d538e18d6f1d96 100755: 6ccc98db0b58b5278b45bcda7983e8b4211ff54e 100751: ae6689de6c163d610092c972dccfc761669556b0 v: v3 --- [refs] | 2 +- trunk/arch/arm/plat-orion/pcie.c | 6 ++++++ trunk/include/asm-arm/plat-orion/pcie.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index fd54d5d49ec4..5d1c53b301a1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0a17c7bc0b81e4556eea08c7e27923e5534d3c25 +refs/heads/master: a9311cfed241ebcd6b5f9be5c8c6d519bf22f9e7 diff --git a/trunk/arch/arm/plat-orion/pcie.c b/trunk/arch/arm/plat-orion/pcie.c index abfda53f1800..ca32c60e14d7 100644 --- a/trunk/arch/arm/plat-orion/pcie.c +++ b/trunk/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); diff --git a/trunk/include/asm-arm/plat-orion/pcie.h b/trunk/include/asm-arm/plat-orion/pcie.h index 6434ac685d21..e61b7bd97af5 100644 --- a/trunk/include/asm-arm/plat-orion/pcie.h +++ b/trunk/include/asm-arm/plat-orion/pcie.h @@ -14,6 +14,7 @@ u32 orion_pcie_dev_id(void __iomem *base); u32 orion_pcie_rev(void __iomem *base); int orion_pcie_link_up(void __iomem *base); +int orion_pcie_x4_mode(void __iomem *base); int orion_pcie_get_local_bus_nr(void __iomem *base); void orion_pcie_set_local_bus_nr(void __iomem *base, int nr); void orion_pcie_setup(void __iomem *base,