Fixup compilation helios64 uboot (#6068)

* CONFIG_SYS_SCSI_MAX_DEVICE was replaced by a macro in U-Boot v2022.04
* Fixes u-boot for rockchip64 derivatives
* Fix missing include for cli_simple_run_command
* Do not return value in a void function
This commit is contained in:
Alban Browaeys 2023-12-24 09:14:54 +01:00 committed by GitHub
parent 06c28cd39e
commit 0b2389a03a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 11 deletions

View File

@ -2171,7 +2171,7 @@ new file mode 100644
index 0000000000..6fca9a6be0
--- /dev/null
+++ b/include/configs/helios64.h
@@ -0,0 +1,47 @@
@@ -0,0 +1,45 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * (C) Copyright 2020 Aditya Prayoga <aditya@kobol.io>
@ -2199,8 +2199,6 @@ index 0000000000..6fca9a6be0
+
+ #define CONFIG_SYS_SCSI_MAX_SCSI_ID 5
+ #define CONFIG_SYS_SCSI_MAX_LUN 1
+ #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
+ CONFIG_SYS_SCSI_MAX_LUN)
+
+ #define BOOT_TARGET_SCSI(func) \
+ func(SCSI, scsi, 0)

View File

@ -2181,7 +2181,7 @@ new file mode 100644
index 00000000..6fca9a6b
--- /dev/null
+++ b/include/configs/helios64.h
@@ -0,0 +1,47 @@
@@ -0,0 +1,45 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * (C) Copyright 2020 Aditya Prayoga <aditya@kobol.io>
@ -2209,8 +2209,6 @@ index 00000000..6fca9a6b
+
+ #define CONFIG_SYS_SCSI_MAX_SCSI_ID 5
+ #define CONFIG_SYS_SCSI_MAX_LUN 1
+ #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
+ CONFIG_SYS_SCSI_MAX_LUN)
+
+ #define BOOT_TARGET_SCSI(func) \
+ func(SCSI, scsi, 0)

View File

@ -53,17 +53,18 @@ diff --git a/arch/arm/mach-rockchip/boot_mode.c b/arch/arm/mach-rockchip/boot_mo
index 21589341..c4dcb15e 100644
--- a/arch/arm/mach-rockchip/boot_mode.c
+++ b/arch/arm/mach-rockchip/boot_mode.c
@@ -8,6 +8,9 @@
@@ -8,6 +8,10 @@
#include <command.h>
#include <env.h>
+#include <led.h>
#include <log.h>
+#include <cli.h>
+#include <mmc.h>
+#include <linux/delay.h>
#include <asm/io.h>
#include <asm/arch-rockchip/boot_mode.h>
#include <dm/device.h>
@@ -70,13 +71,158 @@ __weak int rockchip_dnl_key_pressed(void)
@@ -70,13 +71,157 @@ __weak int rockchip_dnl_key_pressed(void)
return false;
}
@ -161,11 +162,10 @@ index 21589341..c4dcb15e 100644
{
+#if defined(CONFIG_ROCKCHIP_ADVANCED_RECOVERY)
+ int mmc_device = 0;
+ int ret = 0;
+ char cmd[32];
+
+ if (!rockchip_dnl_key_pressed()) {
+ return 0;
+ return;
+ }
+
+ if (rockchip_has_mmc_device(0)) {
@ -174,7 +174,7 @@ index 21589341..c4dcb15e 100644
+ mmc_device = 1;
+ } else {
+ printf("no mmc device suitable for download mode!\n");
+ return 0;
+ return;
+ }
+
+ printf("using mmc%d device for download mode\n", mmc_device);