All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] cmd/fdt: Make fdt get value endian-safe for single-cell properties
Date: Thu, 12 Jan 2017 19:19:35 -0700	[thread overview]
Message-ID: <CAPnjgZ0wiuVVh-+gJSunAqQ-Ae9Odu1y7r300JOW0_35sCDpjw@mail.gmail.com> (raw)
In-Reply-To: <20170109150803.6582-1-afaerber@suse.de>

On 9 January 2017 at 08:08, Andreas F?rber <afaerber@suse.de> wrote:
> On a Raspberry Pi 2 disagreements on cell endianness can be observed:
>
>   U-Boot> fdt print /soc/gpio at 7e200000 phandle
>   phandle = <0x0000000d>
>   U-Boot> fdt get value myvar /soc/gpio at 7e200000 phandle; printenv myvar
>   myvar=0x0D000000
>
> Fix this by always treating the pointer as BE and converting it in
> fdt_value_setenv(), like its counterpart fdt_parse_prop() already does.
>
> Consistently use fdt32_t, fdt32_to_cpu() and cpu_to_fdt32().
>
> Fixes: bc80295 ("fdt: Add get commands to fdt")
> Cc: Joe Hershberger <joe.hershberger@ni.com>
> Cc: Gerald Van Baren <gvb@unssw.com>
> Signed-off-by: Andreas F?rber <afaerber@suse.de>
> ---
>  cmd/fdt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

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

  reply	other threads:[~2017-01-13  2:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-09 15:08 [U-Boot] [PATCH v2] cmd/fdt: Make fdt get value endian-safe for single-cell properties Andreas Färber
2017-01-13  2:19 ` Simon Glass [this message]
2017-01-14 17:14   ` Simon Glass

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=CAPnjgZ0wiuVVh-+gJSunAqQ-Ae9Odu1y7r300JOW0_35sCDpjw@mail.gmail.com \
    --to=sjg@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.