All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
	Marek Vasut <marex@denx.de>,
	Pavel Herrmann <morpheus.ibis@gmail.com>
Subject: [PATCH v6 5/5] dm: core: Don't include ofnode functions with of-platdata
Date: Sun, 25 Jul 2021 10:13:47 -0600	[thread overview]
Message-ID: <20210725161347.457937-6-sjg@chromium.org> (raw)
In-Reply-To: <20210725161347.457937-1-sjg@chromium.org>

These functions cannot work with of-platdata since libfdt is not
available. At present when dev_read_...() functions are used it produces
error messages about ofnode which is confusing.

Adjust the Makefile and header to produce an error message for the actual
dev_read...() function which is called. This makes it easier to see what
code needs to be converted for use with of-platdata.

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

(no changes since v3)

Changes in v3:
- Fix eth_dev_get_mac_address() call dev_read...() only when available

 drivers/core/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/core/Makefile b/drivers/core/Makefile
index 5edd4e41357..725e6e94cd2 100644
--- a/drivers/core/Makefile
+++ b/drivers/core/Makefile
@@ -15,6 +15,8 @@ obj-$(CONFIG_$(SPL_)OF_LIVE) += of_access.o of_addr.o
 ifndef CONFIG_DM_DEV_READ_INLINE
 obj-$(CONFIG_OF_CONTROL) += read.o
 endif
-obj-$(CONFIG_OF_CONTROL) += of_extra.o ofnode.o read_extra.o
+ifdef CONFIG_$(SPL_TPL_)OF_LIBFDT
+obj-$(CONFIG_$(SPL_TPL_)OF_CONTROL) += of_extra.o ofnode.o read_extra.o
+endif
 
 ccflags-$(CONFIG_DM_DEBUG) += -DDEBUG
-- 
2.32.0.432.gabb21c7263-goog


  parent reply	other threads:[~2021-07-25 16:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-25 16:13 [PATCH v6 0/5] of-platdata: Avoid building libfdt Simon Glass
2021-07-25 16:13 ` [PATCH v6 1/5] omap: mmc: Avoid using libfdt with of-platdata Simon Glass
2021-07-25 16:13 ` [PATCH v6 2/5] net: atheros: Add a check for OF_CONTROL Simon Glass
2021-07-27  4:23   ` Ramon Fried
2021-07-25 16:13 ` [PATCH v6 3/5] spi: Add checks " Simon Glass
2021-07-25 16:13 ` [PATCH v6 4/5] spl: Allow SPL/TPL to use of-platdata without libfdt Simon Glass
2021-07-25 16:13 ` Simon Glass [this message]
2021-07-25 20:32 ` [PATCH v6 0/5] of-platdata: Avoid building libfdt Tom Rini
2021-07-26  3:57   ` Simon Glass
2021-07-26 12:09     ` Tom Rini
2021-07-26 13:45       ` Simon Glass
2021-07-26 14:43         ` Tom Rini
2021-07-31 23:07           ` Simon Glass
2021-07-31 23:11             ` Tom Rini

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=20210725161347.457937-6-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=marex@denx.de \
    --cc=morpheus.ibis@gmail.com \
    --cc=trini@konsulko.com \
    --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.