Skip to contentSkip to conversation

ARM: at91: sam9_smc: remove redundant SAMA5D2 check

PATCH Applied Alexander Shiyan 2 participants 2 messages Jun 20, 2025

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

PATCH 1/1 ARM: at91: sam9_smc: remove redundant SAMA5D2 check

The SAMA5D2 SoC uses a different SMC driver implementation (located in drivers/mfd/atmel-smc.c) and doesn't utilize this low-level sam9_smc driver. The check for AT91_SOC_SAMA5D2 in the read mode function is therefore redundant and can be safely removed.

This cleanup eliminates dead code and improves maintainability by removing an unused codepath. No functional changes are introduced.

---
 arch/arm/mach-at91/sam9_smc.c | 1 -
 1 file changed, 1 deletion(-)
arch/arm/mach-at91/sam9_smc.c +0 -1
index 257d7a07c3..6c9e169a8e 100644
@@ -101,7 +101,6 @@ static void sam9_smc_cs_read_mode(void __iomem *base,
 	void __iomem *mode_reg;
 
 	switch (at91_soc_initdata.type) {
-	case AT91_SOC_SAMA5D2:
 	case AT91_SOC_SAMA5D3:
 	case AT91_SOC_SAMA5D4:
 		mode_reg = base + AT91_SAMA5_SMC_MODE;
Signature · 1 line
2.39.1
Applied
#1 lore raw
Quoted 9 lines · Alexander Shiyan

The SAMA5D2 SoC uses a different SMC driver implementation (located in drivers/mfd/atmel-smc.c) and doesn't utilize this low-level sam9_smc driver. The check for AT91_SOC_SAMA5D2 in the read mode function is therefore redundant and can be safely removed.

This cleanup eliminates dead code and improves maintainability by removing an unused codepath. No functional changes are introduced.

[...]

Applied, thanks!

[1/1] ARM: at91: sam9_smc: remove redundant SAMA5D2 check
https://git.pengutronix.de/cgit/barebox/commit/?id=cdde08be1a5a (link may not be stable)

Best regards,

Signature · 1 line
Sascha Hauer <[email protected]>