mtd: fixup CFI on ixp4xx
RFC PATCH 1/1 mtd: fixup CFI on ixp4xx
From: Arnd Bergmann <[email protected]>
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.
---
Any other ideas for how to address it?
--- drivers/mtd/chips/Kconfig | 2 ++ drivers/mtd/maps/Kconfig | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/mtd/chips/Kconfig +2 -0
@@ -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
drivers/mtd/maps/Kconfig +1 -1
@@ -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
Signature · 1 line
2.29.2
Miquel Raynal
maintainerHi Arnd,
[email protected] wrote on Mon, 27 Sep 2021 16:10:37 +0200:
Quoted 7 lines
From: Arnd Bergmann <[email protected]>
drivers/mtd/maps/ixp4xx.crequiresMTD_CFI_BE_BYTE_SWAPto be set in order to compile.
drivers/mtd/maps/ixp4xx.c:57:4: error: #errorCONFIG_MTD_CFI_BE_BYTE_SWAPrequired
Quoted 7 lines
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]>---
Any other ideas for how to address it?
I am fine with the approach. Should I wait for someone else's Ack?
Thanks,
Miquèl
Quoted 37 lines
--- drivers/mtd/chips/Kconfig | 2 ++ drivers/mtd/maps/Kconfig | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)drivers/mtd/chips/Kconfig +2
-0@@ -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" endchoicedrivers/mtd/maps/Kconfig +1
-1@@ -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
Quoted 16 lines · Miquel Raynal
Hi Arnd,
[email protected] wrote on Mon, 27 Sep 2021 16:10:37 +0200:
Quoted 11 lines
From: Arnd Bergmann <[email protected]>
drivers/mtd/maps/ixp4xx.crequiresMTD_CFI_BE_BYTE_SWAPto be set in order to compile.
drivers/mtd/maps/ixp4xx.c:57:4: error: #errorCONFIG_MTD_CFI_BE_BYTE_SWAPrequiredThis 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.
Quoted 5 lines
Quoted 3 lines
Signed-off-by Arnd Bergmann <[email protected]>---
Any other ideas for how to address it?I am fine with the approach. Should I wait for someone else's Ack?
Maybe wait a few days to see if there are objections or any better ideas then. I'd certainly be happy to never run into this problem again.
Arnd
Quoted 5 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
drivers/mtd/maps/ixp4xx.crequiresMTD_CFI_BE_BYTE_SWAPto be set in order to compile.
Quoted 7 lines
drivers/mtd/maps/ixp4xx.c:57:4: error: #errorCONFIG_MTD_CFI_BE_BYTE_SWAPrequiredThis 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]>
Quoted 1 line
Any other ideas for how to address it?
We will "soon" have IXP4xx transitioned to device tree and then physmap-ixp4xx.c is used instead, and this entire driver can be deleted. I will get there, we just need to remember to mop of cruft like this at the end of it.
Yours,
Linus Walleij
Quoted 8 lines · Linus Walleij
Quoted 1 line · Arnd Bergmann
Any other ideas for how to address it?
We will "soon" have IXP4xx transitioned to device tree and then
physmap-ixp4xx.cis used instead, and this entire driver can be deleted. I will get there, we just need to remember to mop of cruft like this at the end of it.
Ah, perfect. In that case I'm not worried about my patch doing anything wrong at all, and we can just backport that to stable kernels after it's merged, while future kernels will won't even need it.
Arnd
Quoted 5 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
drivers/mtd/maps/ixp4xx.crequiresMTD_CFI_BE_BYTE_SWAPto be set in order to compile.
Quoted 8 lines
drivers/mtd/maps/ixp4xx.c:57:4: error: #errorCONFIG_MTD_CFI_BE_BYTE_SWAPrequiredThis 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]>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel