[U-Boot] [PATCH] dm: core: Add platform specific bus translation function

Simon Glass sjg at chromium.org
Fri Nov 27 19:36:19 CET 2015


Hi,

On 27 November 2015 at 02:22, Stefan Roese <sr at denx.de> wrote:
> This patch adds the additional platform_translate_address() call to
> dev_get_addr(). A weak default with a 1-to-1 translation is also
> provided. Platforms that need a special address translation can
> overwrite this function.
>
> Here the explanation, why this is needed for MVEBU:
>
> When using DM with DT address translation, this does not work
> with the standard fdt_translate_address() function on MVEBU
> in SPL. Since the DT translates to the 0xf100.0000 base
> address for the internal registers. But SPL still has the
> registers mapped to the 0xd000.0000 (SOC_REGS_PHY_BASE)
> address that is used by the BootROM. This is because SPL
> may return to the BootROM for boot continuation (e.g. UART
> xmodem boot mode).
>
> Signed-off-by: Stefan Roese <sr at denx.de>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Luka Perkov <luka.perkov at sartura.hr>
> Cc: Dirk Eibach <dirk.eibach at gdsys.cc>
> ---
>  drivers/core/device.c | 36 +++++++++++++++++++++++++-----------
>  1 file changed, 25 insertions(+), 11 deletions(-)

I wonder if there is a way to handle this with device tree? I would
very much like to avoid adding weak functions and other types of
hooks. Are you saying that there are two values for 'ranges', one in
SPL and one for U-Boot proper? What actually triggers the change?

One option would be to have a ranges-spl property, or similar.

Regards,
Simon


More information about the U-Boot mailing list