Skip to content

Commit bed97c9

Browse files
arndbgregkh
authored andcommitted
mtd: fixup CFI on ixp4xx
commit 603362b upstream. 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] Cc: Anders Roxell <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f50803b commit bed97c9

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
@@ -325,7 +325,7 @@ config MTD_DC21285
325325

326326
config MTD_IXP4XX
327327
tristate "CFI Flash device mapped on Intel IXP4xx based systems"
328-
depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP4XX
328+
depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP4XX && MTD_CFI_ADV_OPTIONS
329329
help
330330
This enables MTD access to flash devices on platforms based
331331
on Intel's IXP4xx family of network processors such as the

0 commit comments

Comments
 (0)