diff options
author | Bin Meng | 2018-10-24 08:36:40 -0500 |
---|---|---|
committer | Simon Glass | 2018-11-14 11:16:28 -0600 |
commit | 1a6bd4717fe68ca212abca21a0e08af186fdb442 (patch) | |
tree | 3d3d9d6ad45b88c9525fcf56772ed56728a12ddb | |
parent | 8ee27da343aac7ba88b1efab620fc5ef30325ded (diff) | |
download | u-boot-1a6bd4717fe68ca212abca21a0e08af186fdb442.tar.gz u-boot-1a6bd4717fe68ca212abca21a0e08af186fdb442.tar.xz u-boot-1a6bd4717fe68ca212abca21a0e08af186fdb442.zip |
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>
-rw-r--r-- | doc/driver-model/README.txt | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/doc/driver-model/README.txt b/doc/driver-model/README.txt index 36541630a2..07b120d512 100644 --- a/doc/driver-model/README.txt +++ b/doc/driver-model/README.txt | |||
@@ -830,10 +830,18 @@ Pre-Relocation Support | |||
830 | ---------------------- | 830 | ---------------------- |
831 | 831 | ||
832 | For pre-relocation we simply call the driver model init function. Only | 832 | For pre-relocation we simply call the driver model init function. Only |
833 | drivers marked with DM_FLAG_PRE_RELOC or the device tree | 833 | drivers marked with DM_FLAG_PRE_RELOC or the device tree 'u-boot,dm-pre-reloc' |
834 | 'u-boot,dm-pre-reloc' flag are initialised prior to relocation. This helps | 834 | property are initialised prior to relocation. This helps to reduce the driver |
835 | to reduce the driver model overhead. This flag applies to SPL and TPL as | 835 | model overhead. This flag applies to SPL and TPL as well, if device tree is |
836 | well, if device tree is enabled there. | 836 | enabled (CONFIG_OF_CONTROL) there. |
837 | |||
838 | Note when device tree is enabled, the device tree 'u-boot,dm-pre-reloc' | ||
839 | property can provide better control granularity on which device is bound | ||
840 | before relocation. While with DM_FLAG_PRE_RELOC flag of the driver all | ||
841 | devices with the same driver are bound, which requires allocation a large | ||
842 | amount of memory. When device tree is not used, DM_FLAG_PRE_RELOC is the | ||
843 | only way for statically declared devices via U_BOOT_DEVICE() to be bound | ||
844 | prior to relocation. | ||
837 | 845 | ||
838 | It is possible to limit this to specific relocation steps, by using | 846 | It is possible to limit this to specific relocation steps, by using |
839 | the more specialized 'u-boot,dm-spl' and 'u-boot,dm-tpl' flags | 847 | the more specialized 'u-boot,dm-spl' and 'u-boot,dm-tpl' flags |