[Pdbg] [PATCH 00/23] Add system device tree to libpdbg
Amitay Isaacs
amitay at ozlabs.org
Thu Sep 19 12:33:10 AEST 2019
In the current design of libpdbg, there are multiple device trees for
a system depending on the backend. This means the same hardware unit
is represented with different device tree paths based on the backend.
It's a problem when trying to assign certain properties to hardware
units in a backend agnostic fashion.
These patches introduce a system device tree (view) which is overlaid
on top of the backend device trees using virtual nodes. The virtual
nodes are specified using "device-tree-path" property (denoting the
attachment point in the system device tree view) or by adding nodes to
backend device tree without "compatible" property.
Amitay Isaacs (23):
libpdbg: class name and name should be const
libpdbg: Drop const from pdbg_target_path() argument
libpdbg: Rename function to reflect the functionality
libpdbg: Add virtual node target
libpdbg: Support paths including virutal nodes
libpdbg: Construct unique path based on virtual nodes
libpdbg: Create virtual nodes based on device-tree-path property
libpdbg: Child traversal should not include virtual nodes
libpdbg: Parent retrieval should skip over virtual nodes
libpdbg: Use pdbg api to get parent
libpdbg: Probe should traverse all nodes
main: Use dn_name for printing virtual nodes
fake: Add virtual nodes for pib targets
tests: Add device tree traversal tests
libpdbg: Pass root node to dt_expand
libpdbg: Drop argument from pdbg_targets_init()
libpdbg: Make pdbg_set_backend() return boolean
libpdbg: Do not make pdbg_default_dtb public
libpdbg: Add a structure to hold fdt pointer
libpdbg: Add parsing of backend device tree
dts: Split P8 device trees into system and backend trees
dts: Split P9 device trees into system and backend trees
libpdbg: Separate backend and system device trees
Makefile.am | 13 +-
fake.dts.m4 | 53 +++---
libpdbg/cfam.c | 2 +-
libpdbg/device.c | 132 ++++++++++++---
libpdbg/dtb.c | 221 ++++++++++++++++---------
libpdbg/libpdbg.c | 78 +++++++--
libpdbg/libpdbg.h | 17 +-
libpdbg/target.c | 20 ++-
libpdbg/target.h | 7 +
p8-cronus.dts.m4 | 64 +++-----
p8-fsi.dts.m4 | 9 +-
p8-host.dts.m4 | 2 +-
p8-i2c.dts.m4 | 8 +-
p8-kernel.dts.m4 | 7 +-
p8-pib.dts.m4 | 1 +
p8.dts.m4 | 55 +++++++
p9-cronus.dts.m4 | 50 ++----
p9-fsi.dtsi.m4 | 7 +-
p9-host.dts.m4 | 4 +-
p9-kernel.dts.m4 | 13 +-
p9-pib.dts.m4 | 5 +
p9.dts.m4 | 27 ++++
src/main.c | 16 +-
src/scom.c | 2 +-
src/tests/libpdbg_dtree_test.c | 85 ++++++++++
src/tests/libpdbg_probe_test.c | 12 +-
src/tests/libpdbg_target_test.c | 14 +-
tests/test_selection.sh | 98 +++++++++--
tests/test_selection2.sh | 178 ++++++++++++++++++--
tests/test_tree.sh | 278 ++++++++++++++++++++++++++++++++
30 files changed, 1179 insertions(+), 299 deletions(-)
create mode 100644 p8.dts.m4
create mode 100644 p9.dts.m4
create mode 100644 src/tests/libpdbg_dtree_test.c
create mode 100755 tests/test_tree.sh
--
2.21.0
More information about the Pdbg
mailing list