summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-07-02 11:05:57 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-07-02 11:05:57 +0200
commit1510c57e93fdfdc8f5f6f6b2bbce44ac9a313172 (patch)
tree059d0c10daff1f46c288c04502242770cda2f9ef /commands
parent8c3daadecbff2674f56e057b6cb0788dff906aea (diff)
parent5f03074ea98b64b55c133b35ee144fdc909e6d69 (diff)
downloadbarebox-1510c57e93fdfdc8f5f6f6b2bbce44ac9a313172.tar.gz
barebox-1510c57e93fdfdc8f5f6f6b2bbce44ac9a313172.tar.xz
Merge branch 'for-next/resource-size'
Conflicts: drivers/base/resource.c fs/fs.c
Diffstat (limited to 'commands')
-rw-r--r--commands/bootm.c6
-rw-r--r--commands/iomem.c3
-rw-r--r--commands/mem.c2
3 files changed, 4 insertions, 7 deletions
diff --git a/commands/bootm.c b/commands/bootm.c
index 2989d39311..3c47ab5d9e 100644
--- a/commands/bootm.c
+++ b/commands/bootm.c
@@ -383,8 +383,7 @@ static int do_bootm(int argc, char *argv[])
if (data.os_res)
printf("OS image is at 0x%08x-0x%08x\n",
data.os_res->start,
- data.os_res->start +
- data.os_res->size - 1);
+ data.os_res->end);
else
printf("OS image not yet relocated\n");
@@ -399,8 +398,7 @@ static int do_bootm(int argc, char *argv[])
if (data.initrd_res)
printf("initrd is at 0x%08x-0x%08x\n",
data.initrd_res->start,
- data.initrd_res->start +
- data.initrd_res->size - 1);
+ data.initrd_res->end);
else
printf("initrd image not yet relocated\n");
}
diff --git a/commands/iomem.c b/commands/iomem.c
index 70355fd1e9..c22878c1c8 100644
--- a/commands/iomem.c
+++ b/commands/iomem.c
@@ -32,8 +32,7 @@ static void __print_resources(struct resource *res, int indent)
printf(PRINTF_CONVERSION_RESOURCE " - " PRINTF_CONVERSION_RESOURCE
" (size " PRINTF_CONVERSION_RESOURCE ") %s\n", res->start,
- res->start + res->size - 1,
- res->size, res->name);
+ res->end, resource_size(res), res->name);
list_for_each_entry(r, &res->children, sibling)
__print_resources(r, indent + 1);
diff --git a/commands/mem.c b/commands/mem.c
index 407470d7be..c1a3a54053 100644
--- a/commands/mem.c
+++ b/commands/mem.c
@@ -593,7 +593,7 @@ static int mem_probe(struct device_d *dev)
dev->priv = cdev;
cdev->name = (char*)dev->resource[0].name;
- cdev->size = (unsigned long)dev->resource[0].size;
+ cdev->size = (unsigned long)resource_size(&dev->resource[0]);
cdev->ops = &memops;
cdev->dev = dev;