]> git.hungrycats.org Git - linux/commitdiff
mtd: rawnand: pl353: Fix debug prints
authorMiquel Raynal (DAVE) <miquel.raynal@bootlin.com>
Fri, 29 May 2026 16:29:58 +0000 (18:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Sep 2026 11:36:16 +0000 (13:36 +0200)
[ Upstream commit 2b7baaddf1bc3e39206a0354449fdc349945b86b ]

They are partially incorrect since "software" engine does not mean
hamming, the "none" cae is also falling into this print, and on-die
means there is some kind of hardware support; we prefer to use the
wording on-host vs. on-die.

Fix all those prints.

Fixes: 1e06dbfdfb85 ("mtd: rawnand: pl353: Add message about ECC mode")
Signed-off-by: Miquel Raynal (DAVE) <miquel.raynal@bootlin.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mtd/nand/raw/pl35x-nand-controller.c

index 7d43506b1654d5e4fd045014fe9aa72a22692526..12b9e0936c8f16c5de5a45c69e7b15a1624391db 100644 (file)
@@ -972,17 +972,19 @@ static int pl35x_nand_attach_chip(struct nand_chip *chip)
 
        switch (chip->ecc.engine_type) {
        case NAND_ECC_ENGINE_TYPE_ON_DIE:
-               dev_dbg(nfc->dev, "Using on-die ECC\n");
+               dev_dbg(nfc->dev, "Using on-die hardware ECC\n");
                /* Keep these legacy BBT descriptors for ON_DIE situations */
                chip->bbt_td = &bbt_main_descr;
                chip->bbt_md = &bbt_mirror_descr;
                fallthrough;
        case NAND_ECC_ENGINE_TYPE_NONE:
+               dev_dbg(nfc->dev, "Using no ECC engine\n");
+               break;
        case NAND_ECC_ENGINE_TYPE_SOFT:
-               dev_dbg(nfc->dev, "Using software ECC (Hamming 1-bit/512B)\n");
+               dev_dbg(nfc->dev, "Using software ECC\n");
                break;
        case NAND_ECC_ENGINE_TYPE_ON_HOST:
-               dev_dbg(nfc->dev, "Using hardware ECC\n");
+               dev_dbg(nfc->dev, "Using on-host hardware ECC\n");
                ret = pl35x_nand_init_hw_ecc_controller(nfc, chip);
                if (ret)
                        return ret;