Skip to content

Commit 2ae5da3

Browse files
committed
kernel: nand: force use-minimum-ecc
Signed-off-by: Ivan Belokobylskiy <belokobylskij@gmail.com>
1 parent 02d956a commit 2ae5da3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Xiaomi Gateways uses nand chips with ECC and this code forces
2+
using minimum ecc method. The same is implemented in DTB file but
3+
for 24.10 we want to keep it hardcoded to have time for migration.
4+
5+
Signed-off-by: Ivan Belokobylskiy <belokobylskij@gmail.com>
6+
7+
--- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
8+
+++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
9+
@@ -697,8 +697,7 @@ static int common_nfc_set_geometry(struct gpmi_nand_data *this)
10+
bool use_minimun_ecc;
11+
int err;
12+
13+
- use_minimun_ecc = of_property_read_bool(this->dev->of_node,
14+
- "fsl,use-minimum-ecc");
15+
+ use_minimun_ecc = true;
16+
17+
/* use legacy bch geometry settings by default*/
18+
if ((!use_minimun_ecc && mtd->oobsize < 1024) ||

0 commit comments

Comments
 (0)