Skip to contentSkip to conversation

ARM: socfpga: fix broken function call for arria10

PATCH In review Lothar Rubusch 2 participants 3 messages Jul 1, 2024 – Jul 2, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: socfpga: fix broken function call for arria10

Remove obsolete arguments in the function call. The call's argument list differs from its more recent definition. This breaks compilation of the 'socfpga_arria10_defconfig' target, with additionally enabled:

CONFIG_CADENCE_QSPI=y'

The removed arguments are obtained from device-tree declaration.

---
The patch makes the problem disappear. While messing with some old Intels, it looked to me as if this usually turned off code region of the misc_arria10.c still contains legacy arguments in the call. Thus broke my compilation. I'm unsure. Please verify.

---
 arch/arm/mach-socfpga/misc_arria10.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
arch/arm/mach-socfpga/misc_arria10.c +1 -3
index 93c9e8b0..5c782f6b 100644
@@ -211,11 +211,9 @@ int qspi_flash_software_reset(void)
 	struct udevice *flash;
 	int ret;
 
-	/* Get the flash info */
+	/* Get the flash info, speed and mode will be read from DT */
 	ret = spi_flash_probe_bus_cs(CONFIG_SF_DEFAULT_BUS,
 				     CONFIG_SF_DEFAULT_CS,
-				     CONFIG_SF_DEFAULT_SPEED,
-				     CONFIG_SF_DEFAULT_MODE,
 				     &flash);
 
 	if (ret) {
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 23 lines · Lothar Rubusch

Remove obsolete arguments in the function call. The call's argument list differs from its more recent definition. This breaks compilation of the 'socfpga_arria10_defconfig' target, with additionally enabled:

CONFIG_CADENCE_QSPI=y'

The removed arguments are obtained from device-tree declaration.

---
The patch makes the problem disappear. While messing with some old Intels, it looked to me as if this usually turned off code region of the misc_arria10.c still contains legacy arguments in the call. Thus broke my compilation. I'm unsure. Please verify.

---
  arch/arm/mach-socfpga/misc_arria10.c | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)
arch/arm/mach-socfpga/misc_arria10.c +0 -0
index 93c9e8b0..5c782f6b 100644

arch/arm/mach-socfpga/misc_arria10.c int qspi_flash_software_reset(void) · line 217

Quoted 10 lines
arch/arm/mach-socfpga/misc_arria10.c +1 -3
@@ -211,11 +211,9 @@ int qspi_flash_software_reset(void)
  	struct udevice *flash;
  	int ret;
 
-	/* Get the flash info */
+	/* Get the flash info, speed and mode will be read from DT */
  	ret = spi_flash_probe_bus_cs(CONFIG_SF_DEFAULT_BUS,
  				     CONFIG_SF_DEFAULT_CS,
-				     CONFIG_SF_DEFAULT_SPEED,
-				     CONFIG_SF_DEFAULT_MODE,
  				     &flash);

Could you by any chance also send a patch to enable this QSPI NOR support on one of the A10 targets, so the CI would compile this code and this code wouldn't bitrot again ?

Thanks

#2 lore raw

Hi U-boot-teers!

(...)

Quoted 7 lines

Could you by any chance also send a patch to enable this QSPI NOR support on one of the A10 targets, so the CI would compile this code and this code wouldn't bitrot again ?

Thanks

I've sent you now a series of one patch showing the error for me. And another one with the above fix. NB: I did not apply reviewed-by tags, so far.
Also note, it is not supposed to turn on the (bloody) cadence QSPI flash permanently. We have this piece and having turned on, it can lead into situations due to ...interesting hardware behavior.

Best,
L