public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] DM: Problem with DT bus translation dev_get_addr()
Date: Tue, 1 Sep 2015 17:23:53 +0200	[thread overview]
Message-ID: <55E5C309.6060102@denx.de> (raw)
In-Reply-To: <55E544DA.9010608@denx.de>

Hi Simon,

On 01.09.2015 08:25, Stefan Roese wrote:
> I'm currently enabling DM support for the Marvell MVEBU SoC's I've
> been working lately on (Armada XP and 38x right now). A problem I'm
> facing here is the bus translation, as this is quite complex for these
> SoC's. With multiple levels of translation ranges (multiple simple-bus
> nodes to walk through).
>
> The current implementation in dev_get_addr() does not work. This has
> 2 reasons:
>
> a) It only translates 1 simple-bus node - we need to walk the
>     complete DT to get the correct address.
>
> b) The "ranges" property can have different sizes for "address"
>     and "size" in all these busses / nodes. And also multiple
>     ranges tuples are allowed and used in these dts files.
>
> Of course this can be solved in the current implementation (device.c /
> simple_bus.c). But especially b) is not that trivial to solve in
> a generic way.
>
> So my main question is, why don't you use fdt_translate_address()
> from fdt_support.c instead of implementing your own translation
> function simple_bus_translate()? Is this a size question because
> this may be used in SPL as well?

The attached small patch demonstrates the usage of 
fdt_translate_address() and enables bus translation on the MVEBU platforms.

Thanks,
Stefan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-use-translate_bus-from-fdt_common.c-testing-only.patch
Type: text/x-diff
Size: 1137 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150901/cd5e1473/attachment.patch>

  reply	other threads:[~2015-09-01 15:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-01  6:25 [U-Boot] DM: Problem with DT bus translation dev_get_addr() Stefan Roese
2015-09-01 15:23 ` Stefan Roese [this message]
2015-09-01 15:30   ` Simon Glass
2015-09-01 16:52     ` Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55E5C309.6060102@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox