summaryrefslogtreecommitdiff
path: root/include/dm/device-internal.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-10-03 11:31:33 -0600
committerSimon Glass <sjg@chromium.org>2020-10-29 14:42:18 -0600
commita294ead8d2531a641f87bf182fee257029973ac0 (patch)
tree005705b193a11822a09bb0cf32dad428968b35ec /include/dm/device-internal.h
parent88280529bddf0bd05c90db42b6c8e48de954cf66 (diff)
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>
Diffstat (limited to 'include/dm/device-internal.h')
-rw-r--r--include/dm/device-internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h
index 1dcc22f689..c5d7ec0650 100644
--- a/include/dm/device-internal.h
+++ b/include/dm/device-internal.h
@@ -81,7 +81,7 @@ int device_bind_with_driver_data(struct udevice *parent,
* @return 0 if OK, -ve on error
*/
int device_bind_by_name(struct udevice *parent, bool pre_reloc_only,
- struct driver_info *info, struct udevice **devp);
+ const struct driver_info *info, struct udevice **devp);
/**
* device_reparent: reparent the device to a new parent