]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: Remove unused NEEDS_MANUAL_RELOC code bits
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Wed, 6 Sep 2023 21:29:56 +0000 (23:29 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 14 Sep 2023 14:42:24 +0000 (10:42 -0400)
The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
drivers/core/root.c

index 79d871ab291aece7dcbf234bfa8ab194d4e0dcf3..47b1320a441f62148e65872340750b0c864db43f 100644 (file)
@@ -55,81 +55,6 @@ void dm_fixup_for_gd_move(struct global_data *new_gd)
        }
 }
 
-void fix_drivers(void)
-{
-       struct driver *drv =
-               ll_entry_start(struct driver, driver);
-       const int n_ents = ll_entry_count(struct driver, driver);
-       struct driver *entry;
-
-       for (entry = drv; entry != drv + n_ents; entry++) {
-               if (entry->of_match)
-                       entry->of_match = (const struct udevice_id *)
-                               ((ulong)entry->of_match + gd->reloc_off);
-               if (entry->bind)
-                       entry->bind += gd->reloc_off;
-               if (entry->probe)
-                       entry->probe += gd->reloc_off;
-               if (entry->remove)
-                       entry->remove += gd->reloc_off;
-               if (entry->unbind)
-                       entry->unbind += gd->reloc_off;
-               if (entry->of_to_plat)
-                       entry->of_to_plat += gd->reloc_off;
-               if (entry->child_post_bind)
-                       entry->child_post_bind += gd->reloc_off;
-               if (entry->child_pre_probe)
-                       entry->child_pre_probe += gd->reloc_off;
-               if (entry->child_post_remove)
-                       entry->child_post_remove += gd->reloc_off;
-               /* OPS are fixed in every uclass post_probe function */
-               if (entry->ops)
-                       entry->ops += gd->reloc_off;
-       }
-}
-
-void fix_uclass(void)
-{
-       struct uclass_driver *uclass =
-               ll_entry_start(struct uclass_driver, uclass_driver);
-       const int n_ents = ll_entry_count(struct uclass_driver, uclass_driver);
-       struct uclass_driver *entry;
-
-       for (entry = uclass; entry != uclass + n_ents; entry++) {
-               if (entry->post_bind)
-                       entry->post_bind += gd->reloc_off;
-               if (entry->pre_unbind)
-                       entry->pre_unbind += gd->reloc_off;
-               if (entry->pre_probe)
-                       entry->pre_probe += gd->reloc_off;
-               if (entry->post_probe)
-                       entry->post_probe += gd->reloc_off;
-               if (entry->pre_remove)
-                       entry->pre_remove += gd->reloc_off;
-               if (entry->child_post_bind)
-                       entry->child_post_bind += gd->reloc_off;
-               if (entry->child_pre_probe)
-                       entry->child_pre_probe += gd->reloc_off;
-               if (entry->init)
-                       entry->init += gd->reloc_off;
-               if (entry->destroy)
-                       entry->destroy += 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->plat)
-                       entry->plat += gd->reloc_off;
-       }
-}
-
 static int dm_setup_inst(void)
 {
        DM_ROOT_NON_CONST = DM_DEVICE_GET(root);
@@ -181,12 +106,6 @@ int dm_init(bool of_live)
                INIT_LIST_HEAD(DM_UCLASS_ROOT_NON_CONST);
        }
 
-       if (IS_ENABLED(CONFIG_NEEDS_MANUAL_RELOC)) {
-               fix_drivers();
-               fix_uclass();
-               fix_devices();
-       }
-
        if (CONFIG_IS_ENABLED(OF_PLATDATA_INST)) {
                ret = dm_setup_inst();
                if (ret) {