at91: xload: Fix MCI instance selection for SAMA5D3
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.
Signed-off-by Alexander Shiyan <[email protected]>
--- arch/arm/mach-at91/xload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-at91/xload.c +1 -1
@@ -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
Sascha Hauer
AppliedQuoted 4 lines · Alexander Shiyan
Use the result of
sama5_bootsource_instance(r4)instead of raw r4 to determine the MCI instance index.
Applied, thanks!
[1/1] at91: xload: Fix MCI instance selection for SAMA5D3
https://git.pengutronix.de/cgit/barebox/commit/?id=50f879245235 (link may not be stable)
Best regards,
Signature · 1 line
Sascha Hauer <[email protected]>