All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] dm: Use dev_get_addr() where possible
Date: Tue, 11 Aug 2015 11:33:40 -0600	[thread overview]
Message-ID: <55CA31F4.70903@wwwdotorg.org> (raw)
In-Reply-To: <1439303609-4558-1-git-send-email-sjg@chromium.org>

On 08/11/2015 08:33 AM, Simon Glass wrote:
> This is a convenient way for a driver to get the hardware address of a
> device, when regmap or syscon are not being used. Change existing callers
> to use it as an example to others.

Ah good; I was a little worried about the tiny number of users of 
dev_get_addr().

> diff --git a/drivers/core/device.c b/drivers/core/device.c

> @@ -566,8 +566,10 @@ fdt_addr_t dev_get_addr(struct udevice *dev)
>
>   	addr = fdtdec_get_addr(gd->fdt_blob, dev->of_offset, "reg");
>   	if (addr != FDT_ADDR_T_NONE) {
> +#ifndef CONFIG_SPL_BUILD
>   		if (device_get_uclass_id(dev->parent) == UCLASS_SIMPLE_BUS)
>   			addr = simple_bus_translate(dev->parent, addr);
> +#endif

That seems like an unrelated change; is it a fix for a pre-existing 
issue? Either way, it looks like that will cause SPL to get incorrect 
values for the address since addresses won't get translated (via the 
parent's ranges property??) in SPL. Isn't that a bad thing?

The rest of the patch,
Acked-by: Stephen Warren <swarren@wwwdotorg.org>

  parent reply	other threads:[~2015-08-11 17:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-11 14:33 [U-Boot] [PATCH] dm: Use dev_get_addr() where possible Simon Glass
2015-08-11 14:59 ` Joe Hershberger
2015-08-11 17:33 ` Stephen Warren [this message]
2015-08-11 17:41   ` Simon Glass
2015-08-13  2:16     ` Simon Glass
2015-08-14 21:18       ` 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=55CA31F4.70903@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 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.