On Mon, Sep 28, 2026 at 01:04:31PM +0200, Josef Schlehofer wrote:
> The CZ.NIC Turris 1.x device tree asks the eLBC FCM NAND driver for
> software BCH. Without CONFIG_NAND_ECC_BCH, nand_scan_tail() reaches
> BUG() while probing the NAND chip and the board resets:
>
> BUG at drivers/mtd/nand/raw/nand_base.c:5074/nand_scan_tail()!
>
> This broke with commit b182816c1fb4 ("turris_1x: Normalize Kconfig
> usage"), which moved the board Kconfig defaults to the defconfigs.
> NAND_ECC_BCH has no prompt, so a defconfig cannot set it.
>
> Make NAND_FSL_ELBC_DT select NAND_ECC_BCH and NAND_ECC_BCH select BCH,
> and drop the now redundant CONFIG_BCH=y from the turris_1x and
> kmcoge5ne defconfigs. This comes after enabling LTO on the Turris 1.x:
> without LTO, the turris_1x_sdcard u-boot.bin with the BCH code would
> exceed the 1 MiB its SPL loads from the card.
>
> Tested on CZ.NIC Turris 1.1.
>
> Fixes: b182816c1fb4 ("turris_1x: Normalize Kconfig usage")
> Signed-off-by: Josef Schlehofer <[email protected]>
> Cc: Tom Rini <[email protected]>
> Cc: Heiko Schocher <[email protected]>
> Cc: Michael Trimarchi <[email protected]>
> Cc: Dario Binacchi <[email protected]>
> Cc: Holger Brunck <[email protected]>
> Cc: Priyanka Jain <[email protected]>
> Cc: Marek Mojík <[email protected]>
Reviewed-by: Marek Mojík <[email protected]>