Skip to contentSkip to conversation

mpc83xx pci: Round up memory size in inbound window.

PATCH New Scott Wood 2 participants 2 messages Oct 28, 2008 – Oct 30, 2008

lore
Share & tools
lore

Scott Wood

author
#0 lore raw

PATCH 1/1 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.

---
 cpu/mpc83xx/pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
cpu/mpc83xx/pci.c +1 -1
index 5b8eeb7..ab0760b 100644
@@ -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;
Signature · 1 line
1.5.6.rc1.6.gc53ad
Applied
#1 lore raw

PATCH 1/1 mpc83xx pci: Round up memory size in inbound window.

Quoted 4 lines · On Tue, 28 Oct 2008 11:45:04 -0500 Scott Wood <[email protected]> wrote:

The current calculation will fail to cover all memory if its size is not a power of two.

applied, thanks.

Kim