]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
env: Remove unused NEEDS_MANUAL_RELOC code bits
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Wed, 6 Sep 2023 21:29:57 +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>
env/callback.c
env/common.c
env/env.c
include/env.h

index 638a02b28f78a73a675994aa37fa7942ad127bb0..98ddba035ea74cf47ab68c31d02c366fb6418784 100644 (file)
@@ -9,10 +9,6 @@
 #include <env_internal.h>
 #include <asm/global_data.h>
 
-#if defined(CONFIG_NEEDS_MANUAL_RELOC)
-DECLARE_GLOBAL_DATA_PTR;
-#endif
-
 /*
  * Look up a callback function pointer by name
  */
@@ -71,11 +67,7 @@ void env_callback_init(struct env_entry *var_entry)
        if (!ret && strlen(callback_name)) {
                clbkp = find_env_callback(callback_name);
                if (clbkp != NULL)
-#if defined(CONFIG_NEEDS_MANUAL_RELOC)
-                       var_entry->callback = clbkp->callback + gd->reloc_off;
-#else
                        var_entry->callback = clbkp->callback;
-#endif
        }
 }
 
@@ -112,11 +104,7 @@ static int set_callback(const char *name, const char *value, void *priv)
                        /* assign the requested callback */
                        clbkp = find_env_callback(value);
                        if (clbkp != NULL)
-#if defined(CONFIG_NEEDS_MANUAL_RELOC)
-                               ep->callback = clbkp->callback + gd->reloc_off;
-#else
                                ep->callback = clbkp->callback;
-#endif
                }
        }
 
index 4cf2dadc6945e255990d7420a9ad6c9de3e10f26..21045a7eb33306f5852fe594b5cacc5871ab59b5 100644 (file)
@@ -428,10 +428,6 @@ int env_export(env_t *env_out)
 
 void env_relocate(void)
 {
-#if defined(CONFIG_NEEDS_MANUAL_RELOC)
-       env_fix_drivers();
-       env_htab.change_ok += gd->reloc_off;
-#endif
        if (gd->env_valid == ENV_INVALID) {
 #if defined(CONFIG_ENV_IS_NOWHERE) || defined(CONFIG_SPL_BUILD)
                /* Environment not changable */
index 2aa52c98f8fdb540443c76cd3db2df9817d230c0..bae3f6482aea6a9abf41591d939ee2989c79a234 100644 (file)
--- a/env/env.c
+++ b/env/env.c
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#if defined(CONFIG_NEEDS_MANUAL_RELOC)
-void env_fix_drivers(void)
-{
-       struct env_driver *drv;
-       const int n_ents = ll_entry_count(struct env_driver, env_driver);
-       struct env_driver *entry;
-
-       drv = ll_entry_start(struct env_driver, env_driver);
-       for (entry = drv; entry != drv + n_ents; entry++) {
-               if (entry->name)
-                       entry->name += gd->reloc_off;
-               if (entry->load)
-                       entry->load += gd->reloc_off;
-               if (entry->save)
-                       entry->save += gd->reloc_off;
-               if (entry->erase)
-                       entry->erase += gd->reloc_off;
-               if (entry->init)
-                       entry->init += gd->reloc_off;
-       }
-}
-#endif
-
 static struct env_driver *_env_driver_lookup(enum env_location loc)
 {
        struct env_driver *drv;
index b28886d80b92991e1e4326d9e21d99dd2299a075..430c4fa94a426362e8060f3730ef2fb6f0135d71 100644 (file)
@@ -239,11 +239,6 @@ int eth_env_get_enetaddr(const char *name, uint8_t *enetaddr);
  */
 int eth_env_set_enetaddr(const char *name, const uint8_t *enetaddr);
 
-/**
- * env_fix_drivers() - Updates envdriver as per relocation
- */
-void env_fix_drivers(void);
-
 /**
  * env_set_default_vars() - reset variables to their default value
  *