]> git.baikalelectronics.ru Git - uboot.git/commit
dm: Use an allocated array for run-time device info
authorSimon Glass <sjg@chromium.org>
Sat, 3 Oct 2020 17:31:33 +0000 (11:31 -0600)
committerSimon Glass <sjg@chromium.org>
Thu, 29 Oct 2020 20:42:18 +0000 (14:42 -0600)
commit0371e7739e2a7ff1b37aa42bf1fc3585b6e31ede
tree005705b193a11822a09bb0cf32dad428968b35ec
parent7effb114ff96b436c0f2f3ceea9b04dea2034c00
dm: Use an allocated array for run-time device info

At present we update the driver_info struct with a pointer to the device
that it created (i.e. caused to be bound). This works fine when U-Boot SPL
is stored in read-write memory. But on some platforms, such as Intel
Apollo Lake, it is not possible to update the data memory.

In any case, it is bad form to put this information in a structure that is
in the data region, since it expands the size of the binary.

Create a new driver_rt structure which holds runtime information about
drivers. Update the code to store the device pointer in this instead.
Also update the test check that this works.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/core/device.c
drivers/core/lists.c
drivers/core/root.c
include/asm-generic/global_data.h
include/dm/device-internal.h
include/dm/platdata.h
test/dm/of_platdata.c