]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/fdt_support.c
Prepare v2009.06-rc2
[karo-tx-uboot.git] / common / fdt_support.c
index 5a83bca48177d738f6d493283214ac6ca099167e..b54f8868d9daf1cd71777135fcdbb56ae1e4f9c8 100644 (file)
@@ -610,7 +610,7 @@ int fdt_resize(void *blob)
                fdt_size_dt_strings(blob) + sizeof(struct fdt_reserve_entry);
 
        /* Make it so the fdt ends on a page boundary */
-       actualsize = ALIGN(actualsize, 0x1000);
+       actualsize = ALIGN(actualsize + ((uint)blob & 0xfff), 0x1000);
        actualsize = actualsize - ((uint)blob & 0xfff);
 
        /* Change the fdt header to reflect the correct size */
@@ -646,8 +646,8 @@ int fdt_pci_dma_ranges(void *blob, int phb_off, struct pci_controller *hose) {
        for (r = 0; r < hose->region_count; r++) {
                u64 bus_start, phys_start, size;
 
-               /* skip if !PCI_REGION_MEMORY */
-               if (!(hose->regions[r].flags & PCI_REGION_MEMORY))
+               /* skip if !PCI_REGION_SYS_MEMORY */
+               if (!(hose->regions[r].flags & PCI_REGION_SYS_MEMORY))
                        continue;
 
                bus_start = (u64)hose->regions[r].bus_start;