From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] fdt: __of_translate_address(): check parent's 'ranges' before translate
Date: Thu, 7 Jan 2016 11:25:15 -0700 [thread overview]
Message-ID: <568EAD8B.6090909@wwwdotorg.org> (raw)
In-Reply-To: <1452166849-24461-1-git-send-email-p.marczak@samsung.com>
On 01/07/2016 04:40 AM, Przemyslaw Marczak wrote:
> The present implementation of __of_translate_address() taken
> from the Linux, is designed for translate bus/child address
> mappings by using 'ranges' property - and it doesn't allow
> for checking an address for a device's node with zero size-cells.
>
> The 'size-cells > 0' is required for bus/child address mapping,
> but is not required for non-memory mapped address, e.g.: I2C chip.
> Then when we need only raw 'reg' property's value.
>
> Since the I2C device address goes to a single-cell reg property,
> support for that case is welcome, but currently calling dev_get_addr()
> for I2C device will return 'FDT_ADDR_T_NONE', and print the warning:
>
> warning:
> __of_translate_address: Bad cell count for 'some-dev'
This patch takes the wrong approach.
It simply doesn't make sense to /attempt/ to translate an I2C address
into an MMIO address space. It's a nonsensical operation; no such
translation is possible under any circumstances because I2C and MMIO
addresses mean completely different things and simply can't be
translated to each-other.
Rather than making this nonsensical operation succeed in a way that
gives the desired no-op result, the nonsensical operation simply
shouldn't be performed in the first place.
next prev parent reply other threads:[~2016-01-07 18:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-07 11:40 [U-Boot] [PATCH] fdt: __of_translate_address(): check parent's 'ranges' before translate Przemyslaw Marczak
2016-01-07 13:03 ` Lukasz Majewski
2016-01-07 18:25 ` Stephen Warren [this message]
2016-01-11 11:21 ` Przemyslaw Marczak
2016-01-11 16:47 ` Stephen Warren
2016-01-12 10:25 ` Przemyslaw Marczak
2016-01-12 13:57 ` Simon Glass
2016-01-12 14:22 ` Przemyslaw Marczak
2016-01-12 15:13 ` Simon Glass
2016-01-12 16:43 ` Stephen Warren
2016-01-13 11:10 ` Przemyslaw Marczak
2016-01-14 17:17 ` Simon Glass
2016-01-15 10:41 ` Przemyslaw Marczak
2016-01-15 16:35 ` Stephen Warren
2016-01-29 18:23 ` Simon Glass
2016-02-02 8:55 ` Przemyslaw Marczak
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=568EAD8B.6090909@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--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