diff options
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 d41d41d78ad9..54c84a492a0f 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, | |||
133 | } | 133 | } |
134 | 134 | ||
135 | /* | 135 | /* |
136 | * Round up 'size' to the nearest power of two. | ||
137 | */ | ||
138 | if ((size & (size - 1)) != 0) | ||
139 | size = 1 << fls(size); | ||
140 | |||
141 | /* | ||
136 | * Setup BAR[1] to all DRAM banks. | 142 | * Setup BAR[1] to all DRAM banks. |
137 | */ | 143 | */ |
138 | writel(dram->cs[0].base, base + PCIE_BAR_LO_OFF(1)); | 144 | writel(dram->cs[0].base, base + PCIE_BAR_LO_OFF(1)); |