summaryrefslogtreecommitdiffstats
path: root/commands/devinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/devinfo.c')
-rw-r--r--commands/devinfo.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/commands/devinfo.c b/commands/devinfo.c
index 81956b1cc0..6001b00cfa 100644
--- a/commands/devinfo.c
+++ b/commands/devinfo.c
@@ -6,9 +6,9 @@
#include <complete.h>
#include <driver.h>
-static int do_devinfo_subtree(struct device_d *dev, int depth)
+static int do_devinfo_subtree(struct device *dev, int depth)
{
- struct device_d *child;
+ struct device *child;
struct cdev *cdev, *cdevl;
int i;
@@ -46,7 +46,7 @@ static int do_devinfo_subtree(struct device_d *dev, int depth)
static int do_devinfo(int argc, char *argv[])
{
- struct device_d *dev;
+ struct device *dev;
struct param_d *param;
int i;
int first;
@@ -85,6 +85,9 @@ static int do_devinfo(int argc, char *argv[])
if (dev->info)
dev->info(dev);
+ if (dev->parent && (!dev->bus || dev->bus->dev != dev->parent))
+ printf("Parent: %s\n", dev_name(dev->parent));
+
first = true;
list_for_each_entry(param, &dev->parameters, list) {
if (first) {
@@ -99,9 +102,22 @@ static int do_devinfo(int argc, char *argv[])
printf("\n");
}
#ifdef CONFIG_OFDEVICE
- if (dev->device_node) {
- printf("Device node: %s\n", dev->device_node->full_name);
- of_print_nodes(dev->device_node, 0);
+ if (dev->of_node) {
+ struct device *main_dev = dev->of_node->dev;
+
+ printf("DMA Coherent: %s%s\n",
+ dev_is_dma_coherent(dev) ? "true" : "false",
+ dev->dma_coherent == DEV_DMA_COHERENCE_DEFAULT ? " (default)" : "");
+
+ printf("Device node: %pOF", dev->of_node);
+ if (!main_dev) {
+ printf(" (unpopulated)\n");
+ } else if (main_dev != dev) {
+ printf(" (populated by %s)\n", dev_name(main_dev));
+ } else {
+ printf("\n");
+ of_print_nodes(dev->of_node, 0, ~0);
+ }
}
#endif
}