From 343864afd7ca8c4f2d9d07a40929d897ec7c359c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 1 Oct 2018 12:22:16 -0600 Subject: fdt: Document the fact that dtc is now built This documentation is out of date now that U-Boot builds dtc automatically. Update it. Signed-off-by: Simon Glass --- doc/README.fdt-control | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/README.fdt-control b/doc/README.fdt-control index 634a10616fc..88c04692f74 100644 --- a/doc/README.fdt-control +++ b/doc/README.fdt-control @@ -56,7 +56,11 @@ In case you are wondering, OF stands for Open Firmware. Tools ----- -To use this feature you will need to get the device tree compiler here: +To use this feature you will need to get the device tree compiler. This is +provided by U-Boot automatically. If you have a system version of dtc +(typically in the 'device-tree-compiler' package), it is currently not used. + +If you want to build your own dtc, it is kept here: git://git.kernel.org/pub/scm/utils/dtc/dtc.git -- cgit v1.2.3 From a15a7aa47be25580413a49f9e8f33ba02a46ede7 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 1 Oct 2018 12:22:17 -0600 Subject: doc: Update docs for device tree in SPL, TPL Make a few small updates to indicate that device tree can be used in SPL and TPL. Signed-off-by: Simon Glass --- doc/README.fdt-control | 10 ++++++++++ doc/driver-model/README.txt | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/README.fdt-control b/doc/README.fdt-control index 88c04692f74..d6ab7bf5706 100644 --- a/doc/README.fdt-control +++ b/doc/README.fdt-control @@ -174,6 +174,16 @@ After board configuration is done, fdt supported u-boot can be build in two ways $ make DEVICE_TREE= +Relocation, SPL and TPL +----------------------- + +U-Boot can be divided into three phases: TPL, SPL and U-Boot proper. + +The full device tree is available to U-Boot proper, but normally only a subset +(or none at all) is available to TPL and SPL. See 'Pre-Relocation Support' and +'SPL Support' in doc/driver-model/README.txt for more details. + + Limitations ----------- diff --git a/doc/driver-model/README.txt b/doc/driver-model/README.txt index e949ff63bae..6085f927dea 100644 --- a/doc/driver-model/README.txt +++ b/doc/driver-model/README.txt @@ -832,7 +832,8 @@ Pre-Relocation Support For pre-relocation we simply call the driver model init function. Only drivers marked with DM_FLAG_PRE_RELOC or the device tree 'u-boot,dm-pre-reloc' flag are initialised prior to relocation. This helps -to reduce the driver model overhead. +to reduce the driver model overhead. This flag applies to SPL and TPL as +well, if device tree is enabled there. It is possible to limit this to specific relocation steps, by using the more specialized 'u-boot,dm-spl' and 'u-boot,dm-tpl' flags -- cgit v1.2.3 From 06f94461a9f4769473651a34d7625f895ebe4996 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 1 Oct 2018 12:22:18 -0600 Subject: fdt: Allow indicating a node is for U-Boot proper only At present it is not possible to specify that a node should be used before relocation (in U-Boot proper) without it also ending up in SPL and TPL device trees. Add a new "u-boot,dm-pre-proper" boolean property for this. Signed-off-by: Simon Glass --- doc/driver-model/README.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/driver-model/README.txt b/doc/driver-model/README.txt index 6085f927dea..36541630a27 100644 --- a/doc/driver-model/README.txt +++ b/doc/driver-model/README.txt @@ -837,7 +837,9 @@ well, if device tree is enabled there. It is possible to limit this to specific relocation steps, by using the more specialized 'u-boot,dm-spl' and 'u-boot,dm-tpl' flags -in the devicetree. +in the device tree node. For U-Boot proper you can use 'u-boot,dm-pre-proper' +which means that it will be processed (and a driver bound) in U-Boot proper +prior to relocation, but will not be available in SPL or TPL. Then post relocation we throw that away and re-init driver model again. For drivers which require some sort of continuity between pre- and -- cgit v1.2.3