From f2100f6f77212e2a5b3db165e84eed911be5c3f6 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Fri, 12 Apr 2019 16:42:28 +0200 Subject: 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 Cc: Pierre Bourdon Cc: Baruch Siach Cc: Simon Glass Cc: Heiko Schocher Cc: Tom Rini Tested-by: Pierre Bourdon Tested-by: Baruch Siach --- drivers/core/Kconfig | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/core/Kconfig') diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig index ddf2fb3fb8..2d195ae35e 100644 --- a/drivers/core/Kconfig +++ b/drivers/core/Kconfig @@ -225,6 +225,15 @@ config SPL_OF_TRANSLATE used for the address translation. This function is faster and smaller in size than fdt_translate_address(). +config TRANSLATION_OFFSET + bool "Platforms specific translation offset" + depends on DM && OF_CONTROL + help + Some platforms need a special address translation. Those + platforms (e.g. mvebu in SPL) can configure a translation + offset by enabling this option and setting the translation_offset + variable in the GD in their platform- / board-specific code. + config OF_ISA_BUS bool depends on OF_TRANSLATE -- cgit v1.2.3