From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heinrich Schuchardt Date: Thu, 4 Feb 2021 08:48:38 +0100 Subject: [PATCH v2 00/37] dm: Implement OF_PLATDATA_INST in driver model (part E) In-Reply-To: <20210203164353.2577985-1-sjg@chromium.org> References: <20210203164353.2577985-1-sjg@chromium.org> Message-ID: <5ebd0d61-24b8-d672-133f-d2709d032413@gmx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 2/3/21 5:43 PM, Simon Glass wrote: > This series builds on the recent dtoc implementation of build-time device > instantiation. > > It adds the required driver model support, which is basically a few more > data structures. > > With this, sandbox_spl and chromebook_coral both use the new feature. > > For coral TPL there is a 1.5KB code-size reduction and a 1.75KB data-size > increase: > > text data bss dec hex > 18836 3080 12 21928 55a8 original > 17229 4896 12 22137 5679 with OF_PLATDATA_INST > 17277 4896 12 22185 56a9 with OF_PLATDATA_RT > > The extra data size is due to the build-time devices which are now > included in the image instead of being built at runtime. Also the private > data for each device is allocated in the data region at present, even > through much of it is just zeroes. > > The reduction in code size is due to not needing to bind devices at > runtime, as a well as a simplified probe() function. Coral requires that > data be copied out to RAM before being updated, so that adds a small > amount to size (shown in the third line). > > Quite a lot of future work is possible, including reducing the size of > data structures. See [1] for more ideas. But this series implements the > basic feature. > > To try this out on your board, define CONFIG_SPL_OF_PLATDATA_INST and see > what you get. > > Note: SPL tests do not yet pass with this series. The driver_rt struct > is not set up so device_get_by_driver_info_idx() does not work. This means > that looking up phandles will fail. This will be addressed in a v2 This is v2. I see no update to doc/. Documentation would be very helpful to review the vast change-set. Best regards Heinrich > series, along with documentation updates and a little more information on > code-size impact. > > This series is available at u-boot-dm/tin-working > > [1] https://lists.denx.de/pipermail/u-boot/2020-July/418433.html > > Changes in v2: > - Update to deal with test refactoring series > - Use separate OF_PLATDATA_DRIVER_RT Kconfigs for driver run-time data > - Update the condition for dm_test_of_plat_dev() > - Leave the flags_ memeber in the same struct position