mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
mtd: rawnand: pl353: Add message about ECC mode
This just add some information on kernel log about the selected ECC Signed-off-by: Andrea Scian <andrea.scian@dave.eu> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:
parent
89b831ebda
commit
1e06dbfdfb
|
|
@ -970,15 +970,18 @@ static int pl35x_nand_attach_chip(struct nand_chip *chip)
|
||||||
|
|
||||||
switch (chip->ecc.engine_type) {
|
switch (chip->ecc.engine_type) {
|
||||||
case NAND_ECC_ENGINE_TYPE_ON_DIE:
|
case NAND_ECC_ENGINE_TYPE_ON_DIE:
|
||||||
|
dev_dbg(nfc->dev, "Using on-die ECC\n");
|
||||||
/* Keep these legacy BBT descriptors for ON_DIE situations */
|
/* Keep these legacy BBT descriptors for ON_DIE situations */
|
||||||
chip->bbt_td = &bbt_main_descr;
|
chip->bbt_td = &bbt_main_descr;
|
||||||
chip->bbt_md = &bbt_mirror_descr;
|
chip->bbt_md = &bbt_mirror_descr;
|
||||||
fallthrough;
|
fallthrough;
|
||||||
case NAND_ECC_ENGINE_TYPE_NONE:
|
case NAND_ECC_ENGINE_TYPE_NONE:
|
||||||
case NAND_ECC_ENGINE_TYPE_SOFT:
|
case NAND_ECC_ENGINE_TYPE_SOFT:
|
||||||
|
dev_dbg(nfc->dev, "Using software ECC (Hamming 1-bit/512B)\n");
|
||||||
chip->ecc.write_page_raw = nand_monolithic_write_page_raw;
|
chip->ecc.write_page_raw = nand_monolithic_write_page_raw;
|
||||||
break;
|
break;
|
||||||
case NAND_ECC_ENGINE_TYPE_ON_HOST:
|
case NAND_ECC_ENGINE_TYPE_ON_HOST:
|
||||||
|
dev_dbg(nfc->dev, "Using hardware ECC\n");
|
||||||
ret = pl35x_nand_init_hw_ecc_controller(nfc, chip);
|
ret = pl35x_nand_init_hw_ecc_controller(nfc, chip);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user