diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-01-27 22:16:05 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-01-27 22:16:05 +0000 |
commit | 00e4acb1e2352477e4d0a19dcbff2af870e8b401 (patch) | |
tree | d6481ecd452d1a491f996cd897251f2b3a92c2d9 /arch/arm/plat-orion/pcie.c | |
parent | b04da8bfdfbbd79544cab2fadfdc12e87eb01600 (diff) | |
parent | cf11052a95275c942c1f45ea5fde43ce45bbba6d (diff) | |
download | op-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.c | 6 |
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)); |