Explorar o código

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>
Scott Wood %!s(int64=16) %!d(string=hai) anos
pai
achega
e053ab1903
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      cpu/mpc83xx/pci.c

+ 1 - 1
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->pibar1 = 0;
 	pci_ctrl->piebar1 = 0;
 	pci_ctrl->piebar1 = 0;
 	pci_ctrl->piwar1 = PIWAR_EN | PIWAR_PF | PIWAR_RTT_SNOOP |
 	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++;
 	i = hose->region_count++;
 	hose->regions[i].bus_start = 0;
 	hose->regions[i].bus_start = 0;