]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
dm: doc: Add a note about of-platdata and header files
authorSimon Glass <sjg@chromium.org>
Sat, 7 Dec 2019 04:42:43 +0000 (21:42 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Sun, 15 Dec 2019 03:44:22 +0000 (11:44 +0800)
We don't want to include dt-structs.h in header files, so add a note about
that.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
doc/driver-model/of-plat.rst

index 557957d2a166903110ca32c36b7b80d1cb112773..034a68bb4e414a807148edfeb9c9451568a42400 100644 (file)
@@ -279,6 +279,12 @@ For example:
     };
 
 
+Note that struct mmc_platdata is defined in the C file, not in a header. This
+is to avoid needing to include dt-structs.h in a header file. The idea is to
+keep the use of each of-platdata struct to the smallest possible code area.
+There is just one driver C file for each struct, that can convert from the
+of-platdata struct to the standard one used by the driver.
+
 In the case where SPL_OF_PLATDATA is enabled, platdata_auto_alloc_size is
 still used to allocate space for the platform data. This is different from
 the normal behaviour and is triggered by the use of of-platdata (strictly