aboutsummaryrefslogtreecommitdiff
path: root/include/asm-generic
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2019-04-12 16:42:28 +0200
committerSimon Glass <sjg@chromium.org>2019-04-23 20:26:43 -0600
commitf2100f6f77212e2a5b3db165e84eed911be5c3f6 (patch)
tree33a3dd404b7d9532f9ab34bfcc9be7fb520c14c3 /include/asm-generic
parent3a7c45f6a7725808e2e82908be4bc90d4d78e737 (diff)
downloadu-boot-f2100f6f77212e2a5b3db165e84eed911be5c3f6.zip
u-boot-f2100f6f77212e2a5b3db165e84eed911be5c3f6.tar.gz
u-boot-f2100f6f77212e2a5b3db165e84eed911be5c3f6.tar.bz2
dm: core: Change platform specific translation-offset handling
Testing has shown that the current DM implementation of a platform / board specific translation offset, as its needed for the SPL on MVEBU platforms is buggy. The translation offset is confingured too late, after the driver bind functions are run. This may result in incorrect address translations. With the current implementation its not possible to configure the offset earlier, as the DM code has not run at all. This patch now removed the set_/get_translation_offset() calls and moves the translation offset into the GD variable translation_offset. This variable will get used when CONFIG_TRANSLATION_OFFSET is enabled. This option is enabled only for MVEBU on ARM32 platforms, where its currenty needed and configured in the SPL. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Pierre Bourdon <delroth@gmail.com> Cc: Baruch Siach <baruch@tkos.co.il> Cc: Simon Glass <sjg@chromium.org> Cc: Heiko Schocher <hs@denx.de> Cc: Tom Rini <trini@konsulko.com> Tested-by: Pierre Bourdon <delroth@gmail.com> Tested-by: Baruch Siach <baruch@tkos.co.il>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/global_data.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index 78dcf40..65ee3e5 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -20,6 +20,7 @@
*/
#ifndef __ASSEMBLY__
+#include <fdtdec.h>
#include <membuff.h>
#include <linux/list.h>
@@ -133,6 +134,9 @@ typedef struct global_data {
struct spl_handoff *spl_handoff;
# endif
#endif
+#if defined(CONFIG_TRANSLATION_OFFSET)
+ fdt_addr_t translation_offset; /* optional translation offset */
+#endif
} gd_t;
#endif