Skip to content

Commit

Permalink
mtd: fixup CFI on ixp4xx
Browse files Browse the repository at this point in the history
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 <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210927141045.1597593-1-arnd@kernel.org
  • Loading branch information
arndb authored and miquelraynal committed Oct 15, 2021
1 parent b72841e commit 603362b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions drivers/mtd/chips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,14 @@ choice
LITTLE_ENDIAN_BYTE, if the bytes are reversed.

config MTD_CFI_NOSWAP
depends on !ARCH_IXP4XX || CPU_BIG_ENDIAN
bool "NO"

config MTD_CFI_BE_BYTE_SWAP
bool "BIG_ENDIAN_BYTE"

config MTD_CFI_LE_BYTE_SWAP
depends on !ARCH_IXP4XX
bool "LITTLE_ENDIAN_BYTE"

endchoice
Expand Down
2 changes: 1 addition & 1 deletion drivers/mtd/maps/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ config MTD_DC21285

config MTD_IXP4XX
tristate "CFI Flash device mapped on Intel IXP4xx based systems"
depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP4XX
depends on MTD_CFI && MTD_COMPLEX_MAPPINGS && ARCH_IXP4XX && MTD_CFI_ADV_OPTIONS
help
This enables MTD access to flash devices on platforms based
on Intel's IXP4xx family of network processors such as the
Expand Down

0 comments on commit 603362b

Please sign in to comment.