public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: E Shattow <e@freeshell.de>
To: Tom Rini <trini@konsulko.com>, Leo Liang <ycliang@andestech.com>
Cc: u-boot@lists.denx.de, rick@andestech.com
Subject: Re: [GIT PULL] u-boot-riscv/master
Date: Fri, 25 Apr 2025 18:13:38 -0700	[thread overview]
Message-ID: <756019b8-60f6-4cab-92b0-cd1e857a375c@freeshell.de> (raw)
In-Reply-To: <174562459055.746741.13011026537921584133.b4-ty@konsulko.com>

The outcome of that merge went a bit weird for
board/starfive/visionfive2/spl.c

On 4/25/25 16:43, Tom Rini wrote:
> On Fri, 25 Apr 2025 18:07:54 +0800, Leo Liang wrote:
> 
>> The following changes since commit 10f48365112b164bee6564033ab682747efcb483:
>>
>>   Merge patch series "Add PCIe support for TI AM64 SoC" (2025-04-24 10:46:17 -0600)
>>
>> are available in the Git repository at:
>>
>>   https://source.denx.de/u-boot/custodians/u-boot-riscv.git
>>
>> [...]
> 
> Merged into u-boot/master, thanks!
> 

# The fix:

diff --git a/board/starfive/visionfive2/spl.c
b/board/starfive/visionfive2/spl.c
index 353313b9e88..5b9f2530470 100644
--- a/board/starfive/visionfive2/spl.c
+++ b/board/starfive/visionfive2/spl.c
@@ -116,44 +116,23 @@ void board_init_f(ulong dummy)
 #if CONFIG_IS_ENABLED(LOAD_FIT)
 int board_fit_config_name_match(const char *name)
 {
-	const char *product_id;
-	u8 version;
-
-	product_id = get_product_id_from_eeprom();
-
-	/* Strip off prefix */
-	if (strncmp(name, "starfive/", 9))
-		return -EINVAL;
-	name += 9;
-	if (!strncmp(product_id, "FML13V01", 8) &&
-	    !strcmp(name, "jh7110-deepcomputing-fml13v01")) {
-		return 0;
-	} else if (!strncmp(product_id, "VF7110", 6)) {
-		version = get_pcb_revision_from_eeprom();
-		if ((version == 'b' || version == 'B') &&
-		    !strcmp(name, "jh7110-starfive-visionfive-2-v1.3b"))
-			return 0;
-
-		if ((version == 'a' || version == 'A') &&
-		    !strcmp(name, "jh7110-starfive-visionfive-2-v1.2a"))
-			return 0;
-	} else if (!strncmp(product_id, "MARS", 4) &&
-		   !strcmp(name, "jh7110-milkv-mars")) {
+	if (!strcmp(name, "starfive/jh7110-deepcomputing-fml13v01") &&
+		    !strncmp(get_product_id_from_eeprom(), "FML13V01", 8)) {
 		return 0;
 	} else if (!strcmp(name, "starfive/jh7110-milkv-mars") &&
-		   !strncmp(get_product_id_from_eeprom(), "MARS", 4)) {
+		    !strncmp(get_product_id_from_eeprom(), "MARS", 4)) {
 		return 0;
-	} else if ((!strcmp(name, "starfive/jh7110-pine64-star64")) &&
+	} else if (!strcmp(name, "starfive/jh7110-pine64-star64") &&
 		    !strncmp(get_product_id_from_eeprom(), "STAR64", 6)) {
 		return 0;
-	} else if ((!strcmp(name,
"starfive/jh7110-starfive-visionfive-2-v1.2a")) &&
+	} else if (!strcmp(name, "starfive/jh7110-starfive-visionfive-2-v1.2a") &&
 		    !strncmp(get_product_id_from_eeprom(), "VF7110", 6)) {
 		switch (get_pcb_revision_from_eeprom()) {
 		case 'a':
 		case 'A':
 			return 0;
 		}
-	} else if ((!strcmp(name,
"starfive/jh7110-starfive-visionfive-2-v1.2b")) &&
+	} else if (!strcmp(name, "starfive/jh7110-starfive-visionfive-2-v1.2b") &&
 		    !strncmp(get_product_id_from_eeprom(), "VF7110", 6)) {
 		switch (get_pcb_revision_from_eeprom()) {
 		case 'b':


# So when applied that function should end up like this:

#if CONFIG_IS_ENABLED(LOAD_FIT)
int board_fit_config_name_match(const char *name)
{
	if (!strcmp(name, "starfive/jh7110-deepcomputing-fml13v01") &&
		    !strncmp(get_product_id_from_eeprom(), "FML13V01", 8)) {
		return 0;
	} else if (!strcmp(name, "starfive/jh7110-milkv-mars") &&
		    !strncmp(get_product_id_from_eeprom(), "MARS", 4)) {
		return 0;
	} else if (!strcmp(name, "starfive/jh7110-pine64-star64") &&
		    !strncmp(get_product_id_from_eeprom(), "STAR64", 6)) {
		return 0;
	} else if (!strcmp(name, "starfive/jh7110-starfive-visionfive-2-v1.2a") &&
		    !strncmp(get_product_id_from_eeprom(), "VF7110", 6)) {
		switch (get_pcb_revision_from_eeprom()) {
		case 'a':
		case 'A':
			return 0;
		}
	} else if (!strcmp(name, "starfive/jh7110-starfive-visionfive-2-v1.2b") &&
		    !strncmp(get_product_id_from_eeprom(), "VF7110", 6)) {
		switch (get_pcb_revision_from_eeprom()) {
		case 'b':
		case 'B':
			return 0;
		}
	}

	return -EINVAL;
}
#endif


  reply	other threads:[~2025-04-26  1:13 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-25 10:07 [GIT PULL] u-boot-riscv/master Leo Liang
2025-04-25 10:35 ` Yao Zi
2025-04-26 14:14   ` Tom Rini
2025-04-26 17:26     ` [PATCH] riscv: dts: binman.dtsi: Drop filename property for proper U-Boot Yao Zi
2025-05-08  6:52       ` Leo Liang
2025-04-25 12:57 ` [GIT PULL] u-boot-riscv/master E Shattow
2025-04-25 13:02   ` E Shattow
2025-04-25 23:43 ` Tom Rini
2025-04-26  1:13   ` E Shattow [this message]
2025-04-26 14:14     ` Tom Rini
2025-04-27  7:47       ` E Shattow
  -- strict thread matches above, loose matches on Subject: below --
2025-10-16 12:07 [GIT,PULL] u-boot-riscv/master Leo Liang
2025-10-16 17:38 ` Tom Rini
2025-08-12  8:04 [GIT PULL] u-boot-riscv/master Leo Liang
2025-08-12 15:22 ` Tom Rini
2025-08-13  6:57   ` Leo Liang
2025-08-13 11:16     ` Martin Herren
2025-08-13 11:59       ` Leo Liang
2025-05-21  9:50 Leo Liang
2025-05-21 18:39 ` Tom Rini
2025-05-22 11:28   ` Conor Dooley
2025-05-22 14:45     ` Tom Rini
2025-05-22 15:36       ` Leo Liang
2025-05-22 15:54         ` Tom Rini
2025-05-22 16:40     ` Yao Zi
2025-05-23  9:18       ` Conor Dooley
2025-05-26  3:32       ` Mayuresh Chitale
2025-05-26  9:17         ` Conor Dooley
2025-05-26 14:56           ` Tom Rini
2025-05-26 17:34             ` Mayuresh Chitale
2025-05-26 18:16               ` Tom Rini
2025-05-27 17:10                 ` Mayuresh Chitale
2025-05-27 17:34                   ` Tom Rini
2025-03-25  6:19 Leo Liang
2025-03-25 20:18 ` Tom Rini
2025-03-06 12:18 Leo Liang
2025-03-07 11:20 ` Yao Zi
2025-02-20  5:13 Leo Liang
2025-02-20 17:19 ` Tom Rini
2025-02-03  8:17 Leo Liang
2025-02-03 21:26 ` Tom Rini
2025-01-17  1:53 Leo Liang
2025-01-17 17:56 ` Tom Rini
2024-11-27 13:08 Leo Liang
2024-11-27 18:54 ` Tom Rini
2024-11-06 12:12 Leo Liang
2024-11-08 16:51 ` Tom Rini
2024-11-11 13:24 ` Tom Rini
2024-10-29 12:33 Leo Liang
2024-10-29 16:37 ` Tom Rini
2024-10-28 12:24 Leo Liang
2024-10-28 19:33 ` Tom Rini
2024-07-22  8:29 Leo Liang
2024-07-22 19:31 ` Tom Rini
2024-05-30  8:56 Leo Liang
2024-06-03 17:42 ` Tom Rini
2024-05-14 13:28 Leo Liang
2024-05-14 16:14 ` Tom Rini
2024-05-01 16:38 Leo Liang
2024-05-02 14:42 ` Tom Rini
2024-04-09  8:25 Leo Liang
2024-04-10  0:43 ` Tom Rini
2024-03-26 13:22 Leo Liang
2024-03-27 12:12 ` Tom Rini
2024-03-12  8:51 Leo Liang
2024-03-12 18:52 ` Tom Rini
2024-01-31 10:21 Leo Liang
2024-01-31 14:14 ` Tom Rini
2023-12-14  2:38 Leo Yu-Chi Liang(梁育齊)
2023-12-14 12:19 ` Tom Rini
2023-12-14 12:46   ` Leo Liang
2023-12-14 14:39     ` Tom Rini
2023-12-07 13:46 Leo Liang
2023-12-09 20:59 ` Tom Rini
2023-11-02 10:49 Leo Liang
2023-11-02 14:53 ` Tom Rini
2021-02-26  1:53 Leo Liang
2021-02-26 17:40 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=756019b8-60f6-4cab-92b0-cd1e857a375c@freeshell.de \
    --to=e@freeshell.de \
    --cc=rick@andestech.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=ycliang@andestech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox