summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-12-01 15:24:26 -0500
committerTom Rini <trini@ti.com>2014-12-01 15:24:26 -0500
commit88342103cccf73b39c764bfb1473e7bf29b52b88 (patch)
treec2d5accd809858328894d8e834b15752a88b2fef /common
parentf4e7e2d12164c3235c3f5e19a68a503623029d35 (diff)
parentffccb84c1a8e276fa7263ec4ca8186f06312305c (diff)
downloadu-boot-imx-88342103cccf73b39c764bfb1473e7bf29b52b88.zip
u-boot-imx-88342103cccf73b39c764bfb1473e7bf29b52b88.tar.gz
u-boot-imx-88342103cccf73b39c764bfb1473e7bf29b52b88.tar.bz2
Merge git://git.denx.de/u-boot-fdt
Diffstat (limited to 'common')
-rw-r--r--common/fdt_support.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/common/fdt_support.c b/common/fdt_support.c
index ea42c63..6254e34 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -370,22 +370,22 @@ static int fdt_pack_reg(const void *fdt, void *buf, u64 *address, u64 *size,
int n)
{
int i;
- int address_len = fdt_address_cells(fdt, 0);
- int size_len = fdt_size_cells(fdt, 0);
+ int address_cells = fdt_address_cells(fdt, 0);
+ int size_cells = fdt_size_cells(fdt, 0);
char *p = buf;
for (i = 0; i < n; i++) {
- if (address_len == 2)
+ if (address_cells == 2)
*(fdt64_t *)p = cpu_to_fdt64(address[i]);
else
*(fdt32_t *)p = cpu_to_fdt32(address[i]);
- p += address_len;
+ p += 4 * address_cells;
- if (size_len == 2)
+ if (size_cells == 2)
*(fdt64_t *)p = cpu_to_fdt64(size[i]);
else
*(fdt32_t *)p = cpu_to_fdt32(size[i]);
- p += size_len;
+ p += 4 * size_cells;
}
return p - (char *)buf;