From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Thu, 21 Nov 2019 21:18:35 -0700 Subject: [U-Boot] [PATCH v4 070/100] dm: doc: Add a note about of-platdata and header files In-Reply-To: <20191122041905.224686-1-sjg@chromium.org> References: <20191122041905.224686-1-sjg@chromium.org> Message-ID: <20191121211845.v4.70.I9b25f07ad6fbccec824c9d46fc6c9b998699e68d@changeid> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de We don't want to include dt-structs.h in header files, so add a note about that. Signed-off-by: Simon Glass --- Changes in v4: - Add a patch to explain of-platdata and header files Changes in v3: None Changes in v2: None doc/driver-model/of-plat.rst | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.24.0.432.g9d3f5f5b63-goog