From 57b06e572d7e46b953db5a32d96651066e9b3862 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Tue, 07 Nov 2023 06:17:22 +0000
Subject: [PATCH] enable led trigger
---
u-boot/arch/arm/mach-rockchip/boot_rkimg.c | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/u-boot/arch/arm/mach-rockchip/boot_rkimg.c b/u-boot/arch/arm/mach-rockchip/boot_rkimg.c
index 097d976..3e133fb 100644
--- a/u-boot/arch/arm/mach-rockchip/boot_rkimg.c
+++ b/u-boot/arch/arm/mach-rockchip/boot_rkimg.c
@@ -19,6 +19,8 @@
#include <key.h>
#include <mmc.h>
#include <malloc.h>
+#include <mp_boot.h>
+#include <mtd_blk.h>
#include <nvme.h>
#include <scsi.h>
#include <stdlib.h>
@@ -91,6 +93,10 @@
if (done)
return;
+
+#ifdef CONFIG_MP_BOOT
+ mpb_post(0);
+#endif
/* configuration */
if (!param_parse_assign_bootdev(&devtype, &devnum)) {
@@ -269,6 +275,9 @@
printf("PartType: %s\n", part_get_type(dev_desc));
+#ifdef CONFIG_MTD_BLK
+ mtd_blk_map_partitions(dev_desc);
+#endif
return dev_desc;
}
@@ -512,7 +521,7 @@
LOCATE_END,
};
-static int rkimg_traverse_read_dtb(void *fdt, int where)
+static int dtb_scan(void *fdt, int where)
{
if (where == LOCATE_DISTRO) {
#ifdef CONFIG_ROCKCHIP_EARLY_DISTRO_DTB
@@ -557,19 +566,13 @@
int locate, ret;
int size;
- /* init resource list */
-#ifdef CONFIG_ROCKCHIP_RESOURCE_IMAGE
- resource_traverse_init_list();
-#endif
-
- /* traverse location */
for (locate = 0; locate < LOCATE_END; locate++) {
- ret = rkimg_traverse_read_dtb(fdt, locate);
+ ret = dtb_scan(fdt, locate);
if (!ret)
break;
}
if (ret) {
- printf("No find valid DTB, ret=%d\n", ret);
+ printf("No valid DTB, ret=%d\n", ret);
return ret;
}
@@ -608,7 +611,7 @@
offset = hdr->page_size + ALIGN(hdr->kernel_size, hdr->page_size) +
ALIGN(hdr->ramdisk_size, hdr->page_size);
#ifdef CONFIG_ROCKCHIP_RESOURCE_IMAGE
- ret = resource_create_ram_list(dev_desc, (void *)hdr + offset);
+ ret = resource_setup_ram_list(dev_desc, (void *)hdr + offset);
if (ret)
return ret;
@@ -650,9 +653,9 @@
if (!dev_desc)
return -ENODEV;
- ret = resource_create_ram_list(dev_desc, (void *)data);
+ ret = resource_setup_ram_list(dev_desc, (void *)data);
if (ret) {
- printf("resource_create_ram_list fail, ret=%d\n", ret);
+ printf("resource_setup_ram_list fail, ret=%d\n", ret);
return ret;
}
--
Gitblit v1.6.2