Skip to content

Commit 603362b

Browse files
arndbmiquelraynal
authored andcommitted
mtd: fixup CFI on ixp4xx
drivers/mtd/maps/ixp4xx.c requires MTD_CFI_BE_BYTE_SWAP to be set in order to compile. drivers/mtd/maps/ixp4xx.c:57:4: error: #error CONFIG_MTD_CFI_BE_BYTE_SWAP required This patch avoids the #error output by enforcing the policy in Kconfig. Not sure if this is the right approach, but it helps doing randconfig builds. Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent b72841e commit 603362b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

drivers/mtd/chips/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,14 @@ choice
5555
LITTLE_ENDIAN_BYTE, if the bytes are reversed.
5656

5757
config MTD_CFI_NOSWAP
58+
depends on !ARCH_IXP4XX || CPU_BIG_ENDIAN
5859
bool "NO"
5960

6061
config MTD_CFI_BE_BYTE_SWAP
6162
bool "BIG_ENDIAN_BYTE"
6263

6364
config MTD_CFI_LE_BYTE_SWAP
65+
depends on !ARCH_IXP4XX
6466
bool "LITTLE_ENDIAN_BYTE"
6567

6668
endchoice

drivers/mtd/maps/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ config MTD_DC21285
302302

303303
config MTD_IXP4XX
304304
tristate "CFI Flash device mapped on Intel IXP4xx based systems"
305-
depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP4XX
305+
depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP4XX && MTD_CFI_ADV_OPTIONS
306306
help
307307
This enables MTD access to flash devices on platforms based
308308
on Intel's IXP4xx family of network processors such as the

0 commit comments

Comments
 (0)