Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1658436
| From | Frank Rowand <frowand.list@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] external references for device tree overlays |
| Date | 2017-06-06 09:30 +0200 |
| Message-ID | <tPh6a-5ES-13@gated-at.bofh.it> (permalink) |
| References | <tP0yn-3wI-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 06/05/17 05:59, Stefani Seibold wrote:
> From: Stefani Seibold <stefani@seibold.net>
>
> This patch enables external references for symbols which are not
> exported by the current device tree. For example
>
> // RASPI example (only for testing)
> /dts-v1/;
> /plugin/;
>
> / {
> compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
>
> fragment@0 {
> target-path = "/soc/i2s@7e203000";
> __overlay__ {
> #address-cells = <0x00000001>;
> #size-cells = <0x00000001>;
> test = "test";
> timer = <&timer>;
> };
> };
>
> __external_symbols__ {
> timer = "/soc/timer@7e003000";
> };
> };
My hope is that the dtc compiler will stop supporting specification of the
__symbols__ node in dts source, and only generate it automatically in the dtb.
That change to dtc would not allow any node name specified in a dts to begin
with an underscore. Thus node __external_symbols__ would not be allowed.
>
> The "timer" symbol is not exported by the RASPI device tree, because it is
> missing in the __symbols__ section of the device tree.
>
> In case of the RASPI device tree this could be simple fixed by modifing
> the device tree source, but when the device tree is provided by a closed
> source BIOS this kind of missing symbol could not be fixed.
Is there a real example of this issue, or is this a theoretical concern?
If this is a real example, we should be discouraging such behavior.
The suggestion by Pantelis should work, but that is just a hack to get
you out of a bad situation, not a good practice.
>
> An additional benefit is to override a (possible broken) symbol exported
> by the currect live device tree.
>
> The patch is based and tested on linux 4.12-rc3.
>
> Signed-off-by: Stefani Seibold <stefani.seibold.ext@huawei.com>
> Signed-off-by: Stefani Seibold <stefani@seibold.net>
> ---
> drivers/of/overlay.c | 19 +++++++++++++++++++
> drivers/of/resolver.c | 27 ++++++++++++++++++++++-----
> 2 files changed, 41 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
> index 7827786718d8..de6516ea0fcd 100644
> --- a/drivers/of/overlay.c
> +++ b/drivers/of/overlay.c
< snip >
-Frank
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] external references for device tree overlays Stefani Seibold <stefani.seibold.ext@huawei.com> - 2017-06-05 15:50 +0200
Re: [PATCH] external references for device tree overlays Pantelis Antoniou <pantelis.antoniou@konsulko.com> - 2017-06-05 20:50 +0200
Re: [PATCH] external references for device tree overlays Stefani Seibold <stefani@seibold.net> - 2017-06-06 21:40 +0200
Re: [PATCH] external references for device tree overlays Rob Herring <robh+dt@kernel.org> - 2017-06-07 00:10 +0200
Re: [PATCH] external references for device tree overlays Pantelis Antoniou <pantelis.antoniou@konsulko.com> - 2017-06-07 10:20 +0200
Re: [PATCH] external references for device tree overlays Frank Rowand <frowand.list@gmail.com> - 2017-06-06 09:30 +0200
Re: [PATCH] external references for device tree overlays Frank Rowand <frowand.list@gmail.com> - 2017-06-06 18:20 +0200
Re: [PATCH] external references for device tree overlays Stefani Seibold <stefani@seibold.net> - 2017-06-06 21:30 +0200
Re: [PATCH] external references for device tree overlays Frank Rowand <frowand.list@gmail.com> - 2017-06-07 02:50 +0200
csiph-web