summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-12-06 21:42:43 -0700
committerBin Meng <bmeng.cn@gmail.com>2019-12-15 11:44:22 +0800
commitc59f2ac175ec895dd7ddb7921c859c641565fef9 (patch)
treedb0b2e4bf0fbd4e261ee9f6fda809bc33561cf24 /doc
parent75214b051bfbbdafa5134b4320b9e4ae6ee9b22d (diff)
dm: doc: Add a note about of-platdata and header files
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>
Diffstat (limited to 'doc')
-rw-r--r--doc/driver-model/of-plat.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/driver-model/of-plat.rst b/doc/driver-model/of-plat.rst
index 557957d2a1..034a68bb4e 100644
--- a/doc/driver-model/of-plat.rst
+++ b/doc/driver-model/of-plat.rst
@@ -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