* [U-Boot] [PATCH] dm: add manual relocation for devices
@ 2016-05-21 10:05 Angelo Dureghello
2016-06-08 2:42 ` Simon Glass
0 siblings, 1 reply; 3+ messages in thread
From: Angelo Dureghello @ 2016-05-21 10:05 UTC (permalink / raw)
To: u-boot
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 <angelo@sysam.it>
---
drivers/core/root.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/core/root.c b/drivers/core/root.c
index 13c2713..95886ad 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -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);
--
2.7.0.rc3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] dm: add manual relocation for devices
2016-05-21 10:05 [U-Boot] [PATCH] dm: add manual relocation for devices Angelo Dureghello
@ 2016-06-08 2:42 ` Simon Glass
2016-06-09 19:20 ` Simon Glass
0 siblings, 1 reply; 3+ messages in thread
From: Simon Glass @ 2016-06-08 2:42 UTC (permalink / raw)
To: u-boot
On 21 May 2016 at 03:05, Angelo Dureghello <angelo@sysam.it> wrote:
> 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 <angelo@sysam.it>
> ---
> drivers/core/root.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
Acked-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] dm: add manual relocation for devices
2016-06-08 2:42 ` Simon Glass
@ 2016-06-09 19:20 ` Simon Glass
0 siblings, 0 replies; 3+ messages in thread
From: Simon Glass @ 2016-06-09 19:20 UTC (permalink / raw)
To: u-boot
On 7 June 2016 at 20:42, Simon Glass <sjg@chromium.org> wrote:
> On 21 May 2016 at 03:05, Angelo Dureghello <angelo@sysam.it> wrote:
>> 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 <angelo@sysam.it>
>> ---
>> drivers/core/root.c | 15 +++++++++++++++
>> 1 file changed, 15 insertions(+)
>
> Acked-by: Simon Glass <sjg@chromium.org>
Applied to u-boot-dm, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-09 19:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-21 10:05 [U-Boot] [PATCH] dm: add manual relocation for devices Angelo Dureghello
2016-06-08 2:42 ` Simon Glass
2016-06-09 19:20 ` Simon Glass
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.