Skip to contentSkip to conversation

at91: xload: Fix MCI instance selection for SAMA5D3

PATCH Applied Alexander Shiyan 2 participants 2 messages May 23, 2025 – May 26, 2025

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

PATCH 1/1 at91: xload: Fix MCI instance selection for SAMA5D3

Use the result of sama5_bootsource_instance(r4) instead of raw r4 to determine the MCI instance index.

---
 arch/arm/mach-at91/xload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-at91/xload.c +1 -1
index 709bf05487..fd3878269e 100644
@@ -218,7 +218,7 @@ void __noreturn sama5d3_atmci_start_image(u32 r4, unsigned int clock,
 	if (ret > ARRAY_SIZE(sama5d3_mci_instances) - 1)
 		panic("Couldn't determine boot MCI instance\n");
 
-	instance = &sama5d3_mci_instances[r4];
+	instance = &sama5d3_mci_instances[ret];
 
 	sama5d3_pmc_enable_periph_clock(SAMA5D3_ID_PIOD);
 	for (pin = instance->pins; *pin >= 0; pin++) {
Signature · 1 line
2.39.1