Skip to contentSkip to conversation

mtd: rawnand: arasan: select CONFIG_BCH

PATCH In review Arnd Bergmann 2 participants 3 messages May 27, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: rawnand: arasan: select CONFIG_BCH

Like several other nand flash drivers, this one requires the BCH library to be selected from Kconfig.

arm-linux-gnueabi-ld: drivers/mtd/nand/raw/arasan-nand-controller.o: in function `anfc_attach_chip':
arasan-nand-controller.c:(.text+0x894): undefined reference to `bch_init'
arm-linux-gnueabi-ld: drivers/mtd/nand/raw/arasan-nand-controller.o: in function `anfc_detach_chip':
arasan-nand-controller.c:(.text+0x98c): undefined reference to `bch_free'
arm-linux-gnueabi-ld: drivers/mtd/nand/raw/arasan-nand-controller.o: in function `anfc_read_page_hw_ecc':
arasan-nand-controller.c:(.text+0x1080): undefined reference to `bch_decode'

Fixes 197b88fecc50 ("mtd: rawnand: arasan: Add new Arasan NAND controller")
---
 drivers/mtd/nand/raw/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/mtd/nand/raw/Kconfig +1 -0
index e2bc87779bf9..113f61052269 100644
@@ -456,6 +456,7 @@ config MTD_NAND_CADENCE
 config MTD_NAND_ARASAN
 	tristate "Support for Arasan NAND flash controller"
 	depends on HAS_IOMEM && HAS_DMA
+	select BCH
 	help
 	  Enables the driver for the Arasan NAND flash controller on
 	  Zynq Ultrascale+ MPSoC.
Signature · 6 lines
2.26.2


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
maintainer
#1 lore raw

Hi Arnd,

Arnd Bergmann <[email protected]> wrote on Wed, 27 May 2020 15:42:03 +0200:

Quoted 2 lines

Like several other nand flash drivers, this one requires the BCH library to be selected from Kconfig.

Actually most of the time these drivers do not depend on BCH directly. Here it is a bit particular: the hardware ECC engine logic being broken, I found a workaround by using BCH's library functions directly to verify the hardware correctness.

Anyway, thank you very much for the fix but if I didn't make a mistake it should have been fixed yesterday night already, so it's probably not in linux-next yet.

Quoted 18 lines

arm-linux-gnueabi-ld: drivers/mtd/nand/raw/arasan-nand-controller.o: in function `anfc_attach_chip':
arasan-nand-controller.c:(.text+0x894): undefined reference to `bch_init'
arm-linux-gnueabi-ld: drivers/mtd/nand/raw/arasan-nand-controller.o: in function `anfc_detach_chip':
arasan-nand-controller.c:(.text+0x98c): undefined reference to `bch_free'
arm-linux-gnueabi-ld: drivers/mtd/nand/raw/arasan-nand-controller.o: in function `anfc_read_page_hw_ecc':
arasan-nand-controller.c:(.text+0x1080): undefined reference to `bch_decode'

Fixes 197b88fecc50 ("mtd: rawnand: arasan: Add new Arasan NAND controller")
---
 drivers/mtd/nand/raw/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/mtd/nand/raw/Kconfig +0 -0
index e2bc87779bf9..113f61052269 100644

drivers/mtd/nand/raw/Kconfig config MTD_NAND_CADENCE · line 462

Quoted 7 lines
drivers/mtd/nand/raw/Kconfig +1 -0
@@ -456,6 +456,7 @@ config MTD_NAND_CADENCE
 config MTD_NAND_ARASAN
 	tristate "Support for Arasan NAND flash controller"
 	depends on HAS_IOMEM && HAS_DMA
+	select BCH
 	help
 	  Enables the driver for the Arasan NAND flash controller on
 	  Zynq Ultrascale+ MPSoC.

Thanks,
Miquèl

#2 lore raw
Quoted 8 lines · Miquel Raynal

Hi Arnd,

Arnd Bergmann <[email protected]> wrote on Wed, 27 May 2020 15:42:03 +0200:

Quoted 2 lines

Like several other nand flash drivers, this one requires the BCH library to be selected from Kconfig.

Quoted 8 lines

Actually most of the time these drivers do not depend on BCH directly. Here it is a bit particular: the hardware ECC engine logic being broken, I found a workaround by using BCH's library functions directly to verify the hardware correctness.

Anyway, thank you very much for the fix but if I didn't make a mistake it should have been fixed yesterday night already, so it's probably not in linux-next yet.

I'm still on yesterday's linux-next, so I was probably just a little late. Thanks for fixing it already.

Arnd