]> git.baikalelectronics.ru Git - uboot.git/commit
dm: core: Avoid registering an inaccessible tree
authorSimon Glass <sjg@chromium.org>
Thu, 1 Jun 2023 16:22:31 +0000 (10:22 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 14 Jul 2023 16:54:50 +0000 (12:54 -0400)
commit7ff46937a8db24ac06d52c7b02c9aa3561588c19
treeab76ae4e898e1f4ddd1cf753ce950b442d80245c
parent5d261a9de2e3b6ed4b8bcfa024f65f4ffb5c533a
dm: core: Avoid registering an inaccessible tree

At present there are various restrictions on the use of livetree:

- It is only available once the tree is unflattened, i.e. after relocation
- It is designed to be used with the control FDT
- It can (in principle) be used with other FDTs, but only if they are
  unflattened first; this is not supported

Add a few checks to make sure that any tree that is created is actually
valid. Otherwise it can be confusing when nodes and properties cannot
actually be accessed.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/core/ofnode.c