mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
42 lines
1.4 KiB
Diff
42 lines
1.4 KiB
Diff
diff --git a/drivers/core/Makefile b/drivers/core/Makefile
|
|
index bce7467da1..b9e4a2aab1 100644
|
|
--- a/drivers/core/Makefile
|
|
+++ b/drivers/core/Makefile
|
|
@@ -13,6 +13,8 @@ obj-$(CONFIG_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
|
|
diff --git a/include/dm/read.h b/include/dm/read.h
|
|
index d37fcb504d..4f02d07d00 100644
|
|
--- a/include/dm/read.h
|
|
+++ b/include/dm/read.h
|
|
@@ -43,8 +43,7 @@ static inline bool dev_of_valid(struct udevice *dev)
|
|
return ofnode_valid(dev_ofnode(dev));
|
|
}
|
|
|
|
-#ifndef CONFIG_DM_DEV_READ_INLINE
|
|
-
|
|
+#if !defined(CONFIG_DM_DEV_READ_INLINE) || CONFIG_IS_ENABLED(OF_PLATDATA)
|
|
/**
|
|
* dev_read_u32() - read a 32-bit integer from a device's DT property
|
|
*
|
|
diff --git a/net/eth-uclass.c b/net/eth-uclass.c
|
|
index 3bd98b01ad..e3bfcdb6cc 100644
|
|
--- a/net/eth-uclass.c
|
|
+++ b/net/eth-uclass.c
|
|
@@ -467,7 +467,7 @@ static int eth_pre_unbind(struct udevice *dev)
|
|
|
|
static bool eth_dev_get_mac_address(struct udevice *dev, u8 mac[ARP_HLEN])
|
|
{
|
|
-#if IS_ENABLED(CONFIG_OF_CONTROL)
|
|
+#if CONFIG_IS_ENABLED(OF_CONTROL)
|
|
const uint8_t *p;
|
|
|
|
p = dev_read_u8_array_ptr(dev, "mac-address", ARP_HLEN);
|