hc
2023-11-22 d0a428a6556ea5a006e22e28b0b1cd037885fe20
u-boot/arch/arm/mach-rockchip/kernel_dtb.c
old mode 100755new mode 100644
....@@ -815,12 +815,10 @@
815815 return -ENODEV;
816816 }
817817
818
- if (IS_ENABLED(CONFIG_EMBED_KERNEL_DTB_ALWAYS)) {
819
- resource_init_list();
820
- printf("Always embed kernel dtb\n");
821
- goto dtb_embed;
822
- }
823
-
818
+#ifdef CONFIG_EMBED_KERNEL_DTB_ALWAYS
819
+ printf("Always embed kernel dtb\n");
820
+ goto dtb_embed;
821
+#endif
824822 ret = rockchip_read_dtb_file((void *)fdt_addr);
825823 if (!ret) {
826824 if (!dtb_check_ok((void *)fdt_addr, (void *)gd->fdt_blob)) {
....@@ -831,7 +829,10 @@
831829 }
832830 }
833831
832
+#ifdef CONFIG_EMBED_KERNEL_DTB
833
+#ifdef CONFIG_EMBED_KERNEL_DTB_ALWAYS
834834 dtb_embed:
835
+#endif
835836 if (gd->fdt_blob_kern) {
836837 if (!dtb_check_ok((void *)gd->fdt_blob_kern, (void *)gd->fdt_blob)) {
837838 printf("Embedded kernel dtb mismatch this platform!\n");
....@@ -850,7 +851,9 @@
850851 memcpy((void *)fdt_addr, gd->fdt_blob_kern,
851852 fdt_totalsize(gd->fdt_blob_kern));
852853 printf("DTB: %s\n", CONFIG_EMBED_KERNEL_DTB_PATH);
853
- } else {
854
+ } else
855
+#endif
856
+ {
854857 printf("Failed to get kernel dtb, ret=%d\n", ret);
855858 return -ENOENT;
856859 }