summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/imx-kobs/imx-kobs/fix-cal_nfc_geometry.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/imx-kobs/imx-kobs/fix-cal_nfc_geometry.patch')
-rw-r--r--recipes-bsp/imx-kobs/imx-kobs/fix-cal_nfc_geometry.patch31
1 files changed, 0 insertions, 31 deletions
diff --git a/recipes-bsp/imx-kobs/imx-kobs/fix-cal_nfc_geometry.patch b/recipes-bsp/imx-kobs/imx-kobs/fix-cal_nfc_geometry.patch
deleted file mode 100644
index dddb49a..0000000
--- a/recipes-bsp/imx-kobs/imx-kobs/fix-cal_nfc_geometry.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1The Freescale downstream vendor kernel has a patch that exports the bch
2flash geometry via a debugfs file. This is not available in mainline linux
3kernels so the fallback method calculates the geometry based on known info
4from the mtd partition. A bug exists in this funcion where it fails to
5assume that block0 ECC is the same as the other blocks by default.
6
7Upstream-Status: Pending
8
9--- a/src/mtd.c
10+++ b/src/mtd.c
11@@ -610,7 +610,7 @@ static int cal_nfc_geometry(struct mtd_d
12 /* The two are fixed, please change them when the driver changes. */
13 geo->metadata_size_in_bytes = 10;
14 geo->gf_len = 13;
15- geo->ecc_chunkn_size_in_bytes = 512;
16+ geo->ecc_chunkn_size_in_bytes = geo->ecc_chunk0_size_in_bytes = 512;
17
18 if (mtd->oobsize > geo->ecc_chunkn_size_in_bytes) {
19 geo->gf_len = 14;
20@@ -700,8 +700,9 @@ int parse_nfc_geometry(struct mtd_data *
21 unsigned int value;
22
23 if (!plat_config_data->m_u32UseNfcGeo) {
24+ /* fsl kernel patch provides bch_geometry via debugfs */
25 if (!(node = fopen(dbg_geometry_node_path, "r"))) {
26- fprintf(stderr, "Cannot open BCH geometry node: \"%s\"",
27+ fprintf(stderr, "Cannot open BCH geometry node: \"%s\"\n",
28 dbg_geometry_node_path);
29 return cal_nfc_geometry(md);
30 }
31