dm: core: Change platform specific translation-offset handling
[platform/kernel/u-boot.git] / drivers / core / fdtaddr.c
index e113f1d..c287386 100644 (file)
@@ -74,13 +74,16 @@ fdt_addr_t devfdt_get_addr_index(struct udevice *dev, int index)
                }
        }
 
+#if defined(CONFIG_TRANSLATION_OFFSET)
        /*
         * Some platforms need a special address translation. Those
         * platforms (e.g. mvebu in SPL) can configure a translation
-        * offset in the DM by calling dm_set_translation_offset() that
-        * will get added to all addresses returned by devfdt_get_addr().
+        * offset by setting this value in the GD and enaling this
+        * feature via CONFIG_TRANSLATION_OFFSET. This value will
+        * get added to all addresses returned by devfdt_get_addr().
         */
-       addr += dm_get_translation_offset();
+       addr += gd->translation_offset;
+#endif
 
        return addr;
 #else