summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-07-29 05:25:32 +0800
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-07-29 14:04:24 +0800
commitaaefaddde3d2673af281418f789ddc0b519bc7e5 (patch)
tree49d0ac391b4209635659c9de47d4e41b793226f8 /drivers
parent7a68c0fac731fdac4b8de5d33f9d994fad108c6b (diff)
downloadbarebox-aaefaddde3d2673af281418f789ddc0b519bc7e5.tar.gz
barebox-aaefaddde3d2673af281418f789ddc0b519bc7e5.tar.xz
devinfo: switch to resource
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/driver.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 3069c49092..4ceb346ddc 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -339,6 +339,8 @@ static int do_devinfo(struct command *cmdtp, int argc, char *argv[])
struct device_d *dev;
struct driver_d *drv;
struct param_d *param;
+ int i;
+ struct resource *res;
if (argc == 1) {
printf("devices:\n");
@@ -359,9 +361,17 @@ static int do_devinfo(struct command *cmdtp, int argc, char *argv[])
return -1;
}
- printf("base : 0x%08x\nsize : 0x%08x\ndriver: %s\n\n",
- dev->map_base, dev->size,
- dev->driver ?
+ printf("resources:\n");
+ for (i = 0; i < dev->num_resources; i++) {
+ res = &dev->resource[i];
+ printf("num : %d\n", i);
+ if (res->name)
+ printf("name : %s\n", res->name);
+ printf("start : 0x%08x\nsize : 0x%08x\n",
+ res->start, res->size);
+ }
+
+ printf("driver: %s\n\n", dev->driver ?
dev->driver->name : "none");
if (dev->driver)