dm: add manual relocation for devices
PATCH 1/1 dm: add manual relocation for devices
Some architectures as m68k still need to use CONFIG_NEEDS_MANUAL_RELOC, and are not still using the device tree.
Signed-off-by Angelo Dureghello <[email protected]>
--- drivers/core/root.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
drivers/core/root.c +15 -0
@@ -122,6 +122,20 @@ void fix_uclass(void) entry->ops += gd->reloc_off; } } + +void fix_devices (void ) +{ +struct driver_info *dev = + ll_entry_start(struct driver_info, driver_info); + const int n_ents = ll_entry_count(struct driver_info, driver_info); +struct driver_info *entry; + +for (entry = dev; entry != dev + n_ents; entry++) { +if (entry->platdata) + entry->platdata += gd->reloc_off; + } +} +#endif int dm_init (void )
@@ -137,6 +151,7 @@ int dm_init(void)#if defined(CONFIG_NEEDS_MANUAL_RELOC )fix_drivers ();fix_uclass (); +fix_devices ();#endif ret =device_bind_by_name (NULL , false, &root_info, &DM_ROOT_NON_CONST );
Signature · 1 line
2.7.0.rc3
PATCH 1/1 dm: add manual relocation for devices
Quoted 7 lines · Angelo Dureghello
Some architectures as m68k still need to use
CONFIG_NEEDS_MANUAL_RELOC, and are not still using the device tree.Signed-off-by Angelo Dureghello <[email protected]>--- drivers/core/root.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
Acked-by Simon Glass <[email protected]>
PATCH 1/1 dm: add manual relocation for devices
Quoted 10 lines · Simon Glass
Quoted 7 lines · Angelo Dureghello
Some architectures as m68k still need to use
CONFIG_NEEDS_MANUAL_RELOC, and are not still using the device tree.Signed-off-by Angelo Dureghello <[email protected]>--- drivers/core/root.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)Acked-by Simon Glass <[email protected]>
Applied to u-boot-dm, thanks!