Browse Source

dm: doc: Update description of pre-relocation support

Add some description about pre-relocation driver binding, including
usage of DM_FLAG_PRE_RELOC flag and caveats.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Bin Meng 6 years ago
parent
commit
1a6bd4717f
1 changed files with 12 additions and 4 deletions
  1. 12 4
      doc/driver-model/README.txt

+ 12 - 4
doc/driver-model/README.txt

@@ -830,10 +830,18 @@ Pre-Relocation Support
 ----------------------
 ----------------------
 
 
 For pre-relocation we simply call the driver model init function. Only
 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. This flag applies to SPL and TPL as
-well, if device tree is enabled there.
+drivers marked with DM_FLAG_PRE_RELOC or the device tree 'u-boot,dm-pre-reloc'
+property are initialised prior to relocation. This helps to reduce the driver
+model overhead. This flag applies to SPL and TPL as well, if device tree is
+enabled (CONFIG_OF_CONTROL) there.
+
+Note when device tree is enabled, the device tree 'u-boot,dm-pre-reloc'
+property can provide better control granularity on which device is bound
+before relocation. While with DM_FLAG_PRE_RELOC flag of the driver all
+devices with the same driver are bound, which requires allocation a large
+amount of memory. When device tree is not used, DM_FLAG_PRE_RELOC is the
+only way for statically declared devices via U_BOOT_DEVICE() to be bound
+prior to relocation.
 
 
 It is possible to limit this to specific relocation steps, by using
 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
 the more specialized 'u-boot,dm-spl' and 'u-boot,dm-tpl' flags