aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Adami <andrea.adami@gmail.com>2013-12-31 16:56:06 +0100
committerAndrea Adami <andrea.adami@gmail.com>2013-12-31 18:38:07 +0100
commit8f8102dd91a23849016b0940cfd4da02a34cf237 (patch)
tree7a59f05073f9587124bf67b4cbbaa078e04b0aaa
parent79421ad3059d5ed9173a5d73e394513b2d5ac644 (diff)
downloadmeta-handheld-8f8102dd91a23849016b0940cfd4da02a34cf237.tar.gz
linux-yocto*: collie: fixup for the CFI reading of nr of hw partitions
The Sharp CFI table doesn't match 100% with CFI 1.3 about the number of fields reserved for the Burst/Sync Read modes (unsupported here). The CFI table reports 2 asymmetric partitions (boot defaults). Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
-rw-r--r--recipes-kernel/linux/linux-yocto-3.10/collie/collie.scc1
-rw-r--r--recipes-kernel/linux/linux-yocto-3.10/patches/patches-mtd/collie-cfi-partitions.patch48
-rw-r--r--recipes-kernel/linux/linux-yocto-dev/collie/collie.scc1
-rw-r--r--recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-cfi-partitions.patch48
-rw-r--r--recipes-kernel/linux/linux-yocto-tiny-kexecboot-3.10/patches/patches-mtd/collie-cfi-partitions.patch48
-rw-r--r--recipes-kernel/linux/linux-yocto-tiny-kexecboot_3.10.bbappend1
6 files changed, 147 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-yocto-3.10/collie/collie.scc b/recipes-kernel/linux/linux-yocto-3.10/collie/collie.scc
index e81d887..4699a58 100644
--- a/recipes-kernel/linux/linux-yocto-3.10/collie/collie.scc
+++ b/recipes-kernel/linux/linux-yocto-3.10/collie/collie.scc
@@ -14,6 +14,7 @@ patch ../patches/patches-mtd/collie-mtd-resize.patch
patch ../patches/patches-mtd/collie-force-unlock.patch
patch ../patches/patches-mtd/collie-PCR.patch
patch ../patches/patches-mtd/collie-match-cfi-qry.patch
+patch ../patches/patches-mtd/collie-cfi-partitions.patch
patch ../patches/patches-mtd/collie-no-buf-write.patch
patch ../patches/patches-sa1100/collie-irda.patch
patch ../patches/patches-sa1100/collie-add-bootblock.patch
diff --git a/recipes-kernel/linux/linux-yocto-3.10/patches/patches-mtd/collie-cfi-partitions.patch b/recipes-kernel/linux/linux-yocto-3.10/patches/patches-mtd/collie-cfi-partitions.patch
new file mode 100644
index 0000000..1e16311
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto-3.10/patches/patches-mtd/collie-cfi-partitions.patch
@@ -0,0 +1,48 @@
+From 70890e8687b3d99a575a58e21fe1d13dad157bfe Mon Sep 17 00:00:00 2001
+From: Andrea Adami <andrea.adami@gmail.com>
+Date: Tue, 31 Dec 2013 16:47:48 +0100
+Subject: [PATCH 765/765] mtd: cfi_cmdset_001.c: fixup for reading nr of hw
+ partitions on Sharp LH28F640BF
+
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+---
+ drivers/mtd/chips/cfi_cmdset_0001.c | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
+index a5c984a..be0da9a 100644
+--- a/drivers/mtd/chips/cfi_cmdset_0001.c
++++ b/drivers/mtd/chips/cfi_cmdset_0001.c
+@@ -388,6 +388,14 @@ read_pri_intelext(struct map_info *map, __u16 adr)
+ if (extp->MinorVersion >= '3') {
+ int nb_parts, i;
+
++ /* Sharp LH28F640BFHE doesn't respect the nr of synch modes/fields
++ * the value is 0 but there are three fields:
++ * Synchronous mode read capability configuration 1,2,3
++ * The first one seems always present, listed as reserved
++ */
++ if (cfi->mfr == CFI_MFR_SHARP && cfi->id == 0x00b0)
++ extra_size += 3;
++
+ /* Number of hardware-partitions */
+ extra_size += 1;
+ if (extp_size < sizeof(*extp) + extra_size)
+@@ -657,6 +665,14 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd,
+ /* Burst Read info */
+ offs += extp->extra[offs+1]+2;
+
++ /* Sharp LH28F640BFHE doesn't respect the nr of synch modes/fields
++ * the value is 0 but there are three fields:
++ * Synchronous mode read capability configuration 1,2,3
++ * The first one seems always present, listed as reserved
++ */
++ if (cfi->mfr == CFI_MFR_SHARP && cfi->id == 0x00b0)
++ offs += 3;
++
+ /* Number of partition regions */
+ numregions = extp->extra[offs];
+ offs += 1;
+--
+1.8.1.5
+
diff --git a/recipes-kernel/linux/linux-yocto-dev/collie/collie.scc b/recipes-kernel/linux/linux-yocto-dev/collie/collie.scc
index f7b5f11..2351c08 100644
--- a/recipes-kernel/linux/linux-yocto-dev/collie/collie.scc
+++ b/recipes-kernel/linux/linux-yocto-dev/collie/collie.scc
@@ -8,6 +8,7 @@ patch ../patches/patches-mtd/collie-mtd-resize.patch
patch ../patches/patches-mtd/collie-force-unlock.patch
patch ../patches/patches-mtd/collie-PCR.patch
patch ../patches/patches-mtd/collie-match-cfi-qry.patch
+patch ../patches/patches-mtd/collie-cfi-partitions.patch
patch ../patches/patches-mtd/collie-no-buf-write.patch
patch ../patches/patches-sa1100/collie-irda.patch
patch ../patches/patches-sa1100/collie-add-bootblock.patch
diff --git a/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-cfi-partitions.patch b/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-cfi-partitions.patch
new file mode 100644
index 0000000..1e16311
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-cfi-partitions.patch
@@ -0,0 +1,48 @@
+From 70890e8687b3d99a575a58e21fe1d13dad157bfe Mon Sep 17 00:00:00 2001
+From: Andrea Adami <andrea.adami@gmail.com>
+Date: Tue, 31 Dec 2013 16:47:48 +0100
+Subject: [PATCH 765/765] mtd: cfi_cmdset_001.c: fixup for reading nr of hw
+ partitions on Sharp LH28F640BF
+
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+---
+ drivers/mtd/chips/cfi_cmdset_0001.c | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
+index a5c984a..be0da9a 100644
+--- a/drivers/mtd/chips/cfi_cmdset_0001.c
++++ b/drivers/mtd/chips/cfi_cmdset_0001.c
+@@ -388,6 +388,14 @@ read_pri_intelext(struct map_info *map, __u16 adr)
+ if (extp->MinorVersion >= '3') {
+ int nb_parts, i;
+
++ /* Sharp LH28F640BFHE doesn't respect the nr of synch modes/fields
++ * the value is 0 but there are three fields:
++ * Synchronous mode read capability configuration 1,2,3
++ * The first one seems always present, listed as reserved
++ */
++ if (cfi->mfr == CFI_MFR_SHARP && cfi->id == 0x00b0)
++ extra_size += 3;
++
+ /* Number of hardware-partitions */
+ extra_size += 1;
+ if (extp_size < sizeof(*extp) + extra_size)
+@@ -657,6 +665,14 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd,
+ /* Burst Read info */
+ offs += extp->extra[offs+1]+2;
+
++ /* Sharp LH28F640BFHE doesn't respect the nr of synch modes/fields
++ * the value is 0 but there are three fields:
++ * Synchronous mode read capability configuration 1,2,3
++ * The first one seems always present, listed as reserved
++ */
++ if (cfi->mfr == CFI_MFR_SHARP && cfi->id == 0x00b0)
++ offs += 3;
++
+ /* Number of partition regions */
+ numregions = extp->extra[offs];
+ offs += 1;
+--
+1.8.1.5
+
diff --git a/recipes-kernel/linux/linux-yocto-tiny-kexecboot-3.10/patches/patches-mtd/collie-cfi-partitions.patch b/recipes-kernel/linux/linux-yocto-tiny-kexecboot-3.10/patches/patches-mtd/collie-cfi-partitions.patch
new file mode 100644
index 0000000..1e16311
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto-tiny-kexecboot-3.10/patches/patches-mtd/collie-cfi-partitions.patch
@@ -0,0 +1,48 @@
+From 70890e8687b3d99a575a58e21fe1d13dad157bfe Mon Sep 17 00:00:00 2001
+From: Andrea Adami <andrea.adami@gmail.com>
+Date: Tue, 31 Dec 2013 16:47:48 +0100
+Subject: [PATCH 765/765] mtd: cfi_cmdset_001.c: fixup for reading nr of hw
+ partitions on Sharp LH28F640BF
+
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+---
+ drivers/mtd/chips/cfi_cmdset_0001.c | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
+index a5c984a..be0da9a 100644
+--- a/drivers/mtd/chips/cfi_cmdset_0001.c
++++ b/drivers/mtd/chips/cfi_cmdset_0001.c
+@@ -388,6 +388,14 @@ read_pri_intelext(struct map_info *map, __u16 adr)
+ if (extp->MinorVersion >= '3') {
+ int nb_parts, i;
+
++ /* Sharp LH28F640BFHE doesn't respect the nr of synch modes/fields
++ * the value is 0 but there are three fields:
++ * Synchronous mode read capability configuration 1,2,3
++ * The first one seems always present, listed as reserved
++ */
++ if (cfi->mfr == CFI_MFR_SHARP && cfi->id == 0x00b0)
++ extra_size += 3;
++
+ /* Number of hardware-partitions */
+ extra_size += 1;
+ if (extp_size < sizeof(*extp) + extra_size)
+@@ -657,6 +665,14 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd,
+ /* Burst Read info */
+ offs += extp->extra[offs+1]+2;
+
++ /* Sharp LH28F640BFHE doesn't respect the nr of synch modes/fields
++ * the value is 0 but there are three fields:
++ * Synchronous mode read capability configuration 1,2,3
++ * The first one seems always present, listed as reserved
++ */
++ if (cfi->mfr == CFI_MFR_SHARP && cfi->id == 0x00b0)
++ offs += 3;
++
+ /* Number of partition regions */
+ numregions = extp->extra[offs];
+ offs += 1;
+--
+1.8.1.5
+
diff --git a/recipes-kernel/linux/linux-yocto-tiny-kexecboot_3.10.bbappend b/recipes-kernel/linux/linux-yocto-tiny-kexecboot_3.10.bbappend
index 1706ccf..c6e239c 100644
--- a/recipes-kernel/linux/linux-yocto-tiny-kexecboot_3.10.bbappend
+++ b/recipes-kernel/linux/linux-yocto-tiny-kexecboot_3.10.bbappend
@@ -47,6 +47,7 @@ SRC_URI_append_collie = " \
file://patches/patches-mtd/collie-force-unlock.patch \
file://patches/patches-mtd/collie-PCR.patch \
file://patches/patches-mtd/collie-match-cfi-qry.patch \
+ file://patches/patches-mtd/collie-cfi-partitions.patch \
file://patches/patches-mtd/collie-no-buf-write.patch \
file://patches/patches-sa1100/collie-irda.patch \
file://patches/patches-sa1100/collie-add-bootblock.patch \