diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2019-09-09 14:27:32 +0200 |
---|---|---|
committer | James Cameron <quozl@laptop.org> | 2019-10-29 13:51:07 +1100 |
commit | 8f77a9bb3ae228e11823f05719a3380173f28e39 (patch) | |
tree | cfa8fb50f8c50892fb95330fe164ccf000fad2fd | |
parent | dc22b390f3d402f062a32d907ea85862df909837 (diff) | |
download | openfirmware-8f77a9bb3ae228e11823f05719a3380173f28e39.tar.gz |
ofwcore: allow drawing device graphs
This adds convenience words for linking device tree nodes into graphs as
described in Documentation/devicetree/bindings/graph.txt.
-rw-r--r-- | ofw/core/ofwcore.fth | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ofw/core/ofwcore.fth b/ofw/core/ofwcore.fth index 378682cf..7266c135 100644 --- a/ofw/core/ofwcore.fth +++ b/ofw/core/ofwcore.fth @@ -4237,6 +4237,21 @@ d# 32 buffer: canon-prop ; \ +\ Device graph helpers +\ + +: link-endpoint ( $endpoint1 $endpoint2 -- ) + find-device ( $endpoint1) + encode-phandle " remote-endpoint" property ( ) + device-end +; + +: link-endpoints ( $endpoint1 $endpoint2 -- ) + 2over 2over link-endpoint ( $endpoint1 $endpoint2 ) + 2swap link-endpoint ( ) +; + +\ \ Generic Client Interface Services \ |