[PATCH v2] mtd: nand: realtek: select REGMAP_MMIO
From: Pengpeng Hou
Date: Wed Dec 02 2026 - 22:32:09 EST
The Realtek ECC engine uses devm_regmap_init_mmio() but does not select
REGMAP_MMIO. Select the backend so the driver can link without depending
on another driver to enable it.
The issue was found by our static-analysis tool and manually reviewed.
Fixes: 3148d0e5b1c5 ("mtd: nand: realtek-ecc: Add Realtek external ECC engine support")
Signed-off-by: Pengpeng Hou <hppiscas@xxxxxxx>
---
Changes since v1:
Use Kconfig tab indentation throughout the affected entry, as Andrew
Davis suggested.
Previous version: https://lore.kernel.org/r/20261130130844.79829-1-hppiscas@xxxxxxx
Codex assisted with patch preparation and the changelog.
Current review: Codex (Assisted-by: gpt 5).
Static review only; this revision was not built.
drivers/mtd/nand/Kconfig | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 1e57c8de857825d7ff87519b5b0d9a768aa293cc..7a7e8854a2bf7ec0120eaf56e23252e863344aac 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -62,12 +62,13 @@ config MTD_NAND_ECC_MEDIATEK
This enables support for the hardware ECC engine from Mediatek.
config MTD_NAND_ECC_REALTEK
- tristate "Realtek RTL93xx hardware ECC engine"
- depends on HAS_IOMEM && HAS_DMA
- depends on MACH_REALTEK_RTL || COMPILE_TEST
- select MTD_NAND_ECC
- help
- This enables support for the hardware ECC engine from Realtek.
+ tristate "Realtek RTL93xx hardware ECC engine"
+ depends on HAS_IOMEM && HAS_DMA
+ depends on MACH_REALTEK_RTL || COMPILE_TEST
+ select MTD_NAND_ECC
+ select REGMAP_MMIO
+ help
+ This enables support for the hardware ECC engine from Realtek.
endmenu
base-commit: 693c2e04e3f1d4c59af236e1211b7b8cb165a790