Re: [PATCH 2/3] ARM: ixp4xx: Relax endianness
From: sashiko-bot@kernel.org
Date: 2026-07-08 22:37:22
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] Removing `depends on CPU_BIG_ENDIAN` breaks the IXP4XX flash driver on little-endian builds due to missing MTD CFI byte swapping logic. --
--- Patch [2]: [PATCH 2/3] ARM: ixp4xx: Relax endianness ---commit b77eacff0c25c139068c8fb9c88772bc9af87ae3 Author: Linus Walleij [off-list ref] ARM: ixp4xx: Relax endianness The IXP4xx can now boot in little endian mode so relax the endianness requirements. This will make IXP4xx compile to little endian by default like everyone else.
quoted hunk ↗ jump to hunk
diff --git a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig index cb46802f5ce52..2bc8a497d3180 100644 --- a/arch/arm/mach-ixp4xx/Kconfig +++ b/arch/arm/mach-ixp4xx/Kconfig@@ -2,7 +2,6 @@ menuconfig ARCH_IXP4XX bool "IXP4xx-based platforms" depends on ARCH_MULTI_V5 - depends on CPU_BIG_ENDIAN
[Severity: High] Does removing this big-endian restriction break the IXP4XX flash driver on little-endian builds? The physmap-ixp4xx.c driver documents a hard requirement for the byte swap option on LE systems: drivers/mtd/maps/physmap-ixp4xx.c:flash_read16() * This means that on LE systems each 16 bit word must be swapped. Note that * this requires CONFIG_MTD_CFI_BE_BYTE_SWAP to be enabled to 'unswap' the CFI * data and other flash commands which are always in D7-D0. However, the MTD_PHYSMAP_IXP4XX configuration conditionally selects the swap only for big-endian builds: drivers/mtd/maps/Kconfig:MTD_PHYSMAP_IXP4XX select MTD_CFI_BE_BYTE_SWAP if CPU_BIG_ENDIAN Because of this conditional, LE builds fail to select the requisite byte swap. Without the byte swap, the CFI backend defaults to host endian and the driver sends mangled commands to the flash, causing it to fail to probe.
select ARM_APPENDED_DTB # Old Redboot bootloaders deployed select CPU_XSCALE select GPIO_IXP4XX
[ ... ] -- Sashiko AI review · https://sashiko.dev/#/patchset/20260709-ixp4xx-little-endian-v1-0-e9622d0ba9e4@kernel.org?part=2