diff mbox series

dm: tpl: Add fdt address translation support in TPL

Message ID 20221014110447.1.I8b9149706ee6eb8496e05115830fd05c2f54b8a3@changeid
State Accepted
Delegated to: Simon Glass
Headers show
Series dm: tpl: Add fdt address translation support in TPL | expand

Commit Message

William Zhang Oct. 14, 2022, 6:04 p.m. UTC
This is needed in the platforms that use "ranges" node property for
address translation in their dts for TPL.

Signed-off-by: William Zhang <william.zhang@broadcom.com>

---

 drivers/core/Kconfig | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Simon Glass Oct. 15, 2022, 1:10 a.m. UTC | #1
On Fri, 14 Oct 2022 at 12:05, William Zhang <william.zhang@broadcom.com> wrote:
>
> This is needed in the platforms that use "ranges" node property for
> address translation in their dts for TPL.
>
> Signed-off-by: William Zhang <william.zhang@broadcom.com>
>
> ---
>
>  drivers/core/Kconfig | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
Simon Glass Oct. 22, 2022, 1:05 a.m. UTC | #2
On Fri, 14 Oct 2022 at 12:05, William Zhang <william.zhang@broadcom.com> wrote:
>
> This is needed in the platforms that use "ranges" node property for
> address translation in their dts for TPL.
>
> Signed-off-by: William Zhang <william.zhang@broadcom.com>
>
> ---
>
>  drivers/core/Kconfig | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>

Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-dm, thanks!
diff mbox series

Patch

diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig
index c9bf5de4332b..041d6c502690 100644
--- a/drivers/core/Kconfig
+++ b/drivers/core/Kconfig
@@ -350,6 +350,20 @@  config SPL_OF_TRANSLATE
 	  used for the address translation. This function is faster and
 	  smaller in size than fdt_translate_address().
 
+config TPL_OF_TRANSLATE
+	bool "Translate addresses using fdt_translate_address in TPL"
+	depends on TPL_DM && TPL_OF_CONTROL
+	help
+	  If this option is enabled, the reg property will be translated
+	  using the fdt_translate_address() function. This is necessary
+	  on some platforms (e.g. MVEBU) using complex "ranges"
+	  properties in many nodes. As this translation is not handled
+	  correctly in the default simple_bus_translate() function.
+
+	  If this option is not enabled, simple_bus_translate() will be
+	  used for the address translation. This function is faster and
+	  smaller in size than fdt_translate_address()
+
 config VPL_OF_TRANSLATE
 	bool "Translate addresses using fdt_translate_address in SPL"
 	depends on SPL_DM && VPL_OF_CONTROL