summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-orion/pcie.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-01-27 22:16:05 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-01-27 22:16:05 +0000
commit00e4acb1e2352477e4d0a19dcbff2af870e8b401 (patch)
treed6481ecd452d1a491f996cd897251f2b3a92c2d9 /arch/arm/plat-orion/pcie.c
parentb04da8bfdfbbd79544cab2fadfdc12e87eb01600 (diff)
parentcf11052a95275c942c1f45ea5fde43ce45bbba6d (diff)
downloadop-kernel-dev-00e4acb1e2352477e4d0a19dcbff2af870e8b401.zip
op-kernel-dev-00e4acb1e2352477e4d0a19dcbff2af870e8b401.tar.gz
Merge branch 'for-rmk' of git://git.marvell.com/orion
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 d41d41d..54c84a4 100644
--- a/arch/arm/plat-orion/pcie.c
+++ b/arch/arm/plat-orion/pcie.c
@@ -133,6 +133,12 @@ static void __init orion_pcie_setup_wins(void __iomem *base,
}
/*
+ * Round up 'size' to the nearest power of two.
+ */
+ if ((size & (size - 1)) != 0)
+ size = 1 << fls(size);
+
+ /*
* Setup BAR[1] to all DRAM banks.
*/
writel(dram->cs[0].base, base + PCIE_BAR_LO_OFF(1));
OpenPOWER on IntegriCloud