summaryrefslogtreecommitdiff
path: root/cpu/mpc83xx/pci.c
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2008-10-28 11:45:04 -0500
committerKim Phillips <kim.phillips@freescale.com>2008-10-30 15:22:22 -0500
commite053ab1903ccae6048ef759025b9f675bba91450 (patch)
treeedcb0add89b298d9c8663331c60b687bef4f6d09 /cpu/mpc83xx/pci.c
parentb1d0db1805c3395149777e507b6da53410abac4e (diff)
mpc83xx pci: Round up memory size in inbound window.
The current calculation will fail to cover all memory if its size is not a power of two. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Diffstat (limited to 'cpu/mpc83xx/pci.c')
-rw-r--r--cpu/mpc83xx/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpu/mpc83xx/pci.c b/cpu/mpc83xx/pci.c
index 5b8eeb7758..ab0760bce6 100644
--- a/cpu/mpc83xx/pci.c
+++ b/cpu/mpc83xx/pci.c
@@ -83,7 +83,7 @@ static void pci_init_bus(int bus, struct pci_region *reg)
pci_ctrl->pibar1 = 0;
pci_ctrl->piebar1 = 0;
pci_ctrl->piwar1 = PIWAR_EN | PIWAR_PF | PIWAR_RTT_SNOOP |
- PIWAR_WTT_SNOOP | (__ilog2(gd->ram_size) - 1);
+ PIWAR_WTT_SNOOP | (__ilog2(gd->ram_size - 1));
i = hose->region_count++;
hose->regions[i].bus_start = 0;