Skip to content

Commit

Permalink
kernel: nand: force use-minimum-ecc
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Belokobylskiy <[email protected]>
  • Loading branch information
devbis committed Dec 19, 2024
1 parent 6b81ef8 commit d959d8c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions target/linux/imx/patches-6.6/400-gpmi-nand.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Xiaomi Gateways uses nand chips with ECC and this code forces
using minimum ecc method. The same is implemented in DTB file but
for 24.10 we want to keep it hardcoded to have time for migration.

Signed-off-by: Ivan Belokobylskiy <[email protected]>

--- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
@@ -697,8 +697,7 @@ static int common_nfc_set_geometry(struct gpmi_nand_data *this)
bool use_minimun_ecc;
int err;

- use_minimun_ecc = of_property_read_bool(this->dev->of_node,
- "fsl,use-minimum-ecc");
+ use_minimun_ecc = true;

/* use legacy bch geometry settings by default*/
if ((!use_minimun_ecc && mtd->oobsize < 1024) ||

0 comments on commit d959d8c

Please sign in to comment.