diff options
author | Cyril Bur <cyrilbur@gmail.com> | 2017-09-21 17:29:31 +1000 |
---|---|---|
committer | Alistair Popple <alistair@popple.id.au> | 2017-09-22 12:11:47 +1000 |
commit | f7eecff75cc4efddafe6e5dc911572a287402d50 (patch) | |
tree | ec392a72de8ab340bb303c7a2a78fc3000d14b7c | |
parent | 502fe36f58be7a6752291fc8c95565a321bad7ec (diff) | |
download | pdbg-f7eecff75cc4efddafe6e5dc911572a287402d50.tar.gz pdbg-f7eecff75cc4efddafe6e5dc911572a287402d50.zip |
Look for 'chip-id' as opposed to 'ibm,chip-id'
The device trees inside pdbg use 'chip-id'. This function can tell the
consumer of any target what chip it is on, if it searches for the correct
attribute.
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Alistair Popple <alistair@popple.id.au>
-rw-r--r-- | libpdbg/device.c | 2 | ||||
-rw-r--r-- | libpdbg/device.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libpdbg/device.c b/libpdbg/device.c index 8995f20..95abe52 100644 --- a/libpdbg/device.c +++ b/libpdbg/device.c @@ -878,7 +878,7 @@ static u32 __dt_get_chip_id(const struct dt_node *node) const struct dt_property *prop; for (; node; node = node->parent) { - prop = dt_find_property(node, "ibm,chip-id"); + prop = dt_find_property(node, "chip-id"); if (prop) return dt_property_get_cell(prop, 0); } diff --git a/libpdbg/device.h b/libpdbg/device.h index 3fcf5c3..c0650de 100644 --- a/libpdbg/device.h +++ b/libpdbg/device.h @@ -220,7 +220,7 @@ u32 dt_n_address_cells(const struct dt_node *node); u32 dt_n_size_cells(const struct dt_node *node); u64 dt_get_number(const void *pdata, unsigned int cells); -/* Find an ibm,chip-id property in this node; if not found, walk up the parent +/* Find an chip-id property in this node; if not found, walk up the parent * nodes. Returns -1 if no chip-id property exists. */ u32 dt_get_chip_id(const struct dt_node *node); |