From d0a428a6556ea5a006e22e28b0b1cd037885fe20 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Wed, 22 Nov 2023 01:07:12 +0000
Subject: [PATCH] add gmac0 read mac form eeprom,pcie30x1

---
 u-boot/arch/arm/mach-rockchip/kernel_dtb.c |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/u-boot/arch/arm/mach-rockchip/kernel_dtb.c b/u-boot/arch/arm/mach-rockchip/kernel_dtb.c
old mode 100755
new mode 100644
index 74da167..ce492b9
--- a/u-boot/arch/arm/mach-rockchip/kernel_dtb.c
+++ b/u-boot/arch/arm/mach-rockchip/kernel_dtb.c
@@ -815,12 +815,10 @@
 		return -ENODEV;
 	}
 
-	if (IS_ENABLED(CONFIG_EMBED_KERNEL_DTB_ALWAYS)) {
-		resource_init_list();
-		printf("Always embed kernel dtb\n");
-		goto dtb_embed;
-	}
-
+#ifdef CONFIG_EMBED_KERNEL_DTB_ALWAYS
+       	printf("Always embed kernel dtb\n");
+       	goto dtb_embed;
+#endif
 	ret = rockchip_read_dtb_file((void *)fdt_addr);
 	if (!ret) {
 		if (!dtb_check_ok((void *)fdt_addr, (void *)gd->fdt_blob)) {
@@ -831,7 +829,10 @@
 		}
 	}
 
+#ifdef CONFIG_EMBED_KERNEL_DTB
+#ifdef CONFIG_EMBED_KERNEL_DTB_ALWAYS
 dtb_embed:
+#endif
 	if (gd->fdt_blob_kern) {
 		if (!dtb_check_ok((void *)gd->fdt_blob_kern, (void *)gd->fdt_blob)) {
 			printf("Embedded kernel dtb mismatch this platform!\n");
@@ -850,7 +851,9 @@
 		memcpy((void *)fdt_addr, gd->fdt_blob_kern,
 		       fdt_totalsize(gd->fdt_blob_kern));
 		printf("DTB: %s\n", CONFIG_EMBED_KERNEL_DTB_PATH);
-	} else {
+	} else
+#endif
+	{
 		printf("Failed to get kernel dtb, ret=%d\n", ret);
 		return -ENOENT;
 	}

--
Gitblit v1.6.2