aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-kernel
diff options
context:
space:
mode:
authorAndrea Adami <andrea.adami@gmail.com>2014-01-17 21:04:41 +0100
committerAndrea Adami <andrea.adami@gmail.com>2014-01-22 00:42:51 +0100
commitc6a8de4178eca022fdb6e48296f57614a1854968 (patch)
tree0155a38aea88fc9a25cd90292987aeda5556788a /recipes-kernel
parent10c89598f68e2f6980065d51982d3eb33d420d65 (diff)
downloadmeta-handheld-c6a8de4178eca022fdb6e48296f57614a1854968.tar.gz
linux-yocto*: collie: update collie-match-cfi-qry.patch
Fix compilation warning linux/drivers/mtd/chips/cfi_util.c:47:2: warni ng: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] unsigned long mask; ^ Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Diffstat (limited to 'recipes-kernel')
-rw-r--r--recipes-kernel/linux/linux-yocto-3.10/patches/patches-mtd/collie-match-cfi-qry.patch15
-rw-r--r--recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-match-cfi-qry.patch15
-rw-r--r--recipes-kernel/linux/linux-yocto-tiny-kexecboot-3.10/patches/patches-mtd/collie-match-cfi-qry.patch15
3 files changed, 30 insertions, 15 deletions
diff --git a/recipes-kernel/linux/linux-yocto-3.10/patches/patches-mtd/collie-match-cfi-qry.patch b/recipes-kernel/linux/linux-yocto-3.10/patches/patches-mtd/collie-match-cfi-qry.patch
index 1333f94..e3fbf2e 100644
--- a/recipes-kernel/linux/linux-yocto-3.10/patches/patches-mtd/collie-match-cfi-qry.patch
+++ b/recipes-kernel/linux/linux-yocto-3.10/patches/patches-mtd/collie-match-cfi-qry.patch
@@ -2,19 +2,24 @@ diff --git a/drivers/mtd/chips/cfi_util.c b/drivers/mtd/chips/cfi_util.c
index f992418..7139d028 100644
--- a/drivers/mtd/chips/cfi_util.c
+++ b/drivers/mtd/chips/cfi_util.c
-@@ -38,6 +38,24 @@ int __xipram cfi_qry_present(struct map_info *map, __u32 base,
+@@ -29,6 +29,7 @@
+ int osf = cfi->interleave * cfi->device_type; /* scale factor */
+ map_word val[3];
+ map_word qry[3];
++ unsigned long mask = (1 << (cfi->device_type * 8)) - 1;
+
+ qry[0] = cfi_build_cmd('Q', map, cfi);
+ qry[1] = cfi_build_cmd('R', map, cfi);
+@@ -38,6 +39,21 @@
val[1] = map_read(map, base + osf*0x11);
val[2] = map_read(map, base + osf*0x12);
-+ /* Apparently only one of the 2 interleaved LH28F640BFHE 16 bit chips on
++ /* Apparently only one of the 2 interleaved LH28F640BF 16 bit chips on
+ * a 32 bit wide bus is answering to the CFI Query.
+ * Using the expected map bankwidth=4 and chip interleave=2 we get wrong
+ * readings like 0xffff0051 instead of 0x00510051 etc.
+ * We take the valid bytes and recreate the expected answer as workaround.
+ */
-+ unsigned long mask;
-+ mask = (1 << (cfi->device_type * 8)) - 1;
-+
+ if (((val[0].x[0] >> (cfi->device_type * 8)) == mask) &&
+ ((val[1].x[0] >> (cfi->device_type * 8)) == mask) &&
+ ((val[2].x[0] >> (cfi->device_type * 8)) == mask))
diff --git a/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-match-cfi-qry.patch b/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-match-cfi-qry.patch
index 1333f94..e3fbf2e 100644
--- a/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-match-cfi-qry.patch
+++ b/recipes-kernel/linux/linux-yocto-dev/patches/patches-mtd/collie-match-cfi-qry.patch
@@ -2,19 +2,24 @@ diff --git a/drivers/mtd/chips/cfi_util.c b/drivers/mtd/chips/cfi_util.c
index f992418..7139d028 100644
--- a/drivers/mtd/chips/cfi_util.c
+++ b/drivers/mtd/chips/cfi_util.c
-@@ -38,6 +38,24 @@ int __xipram cfi_qry_present(struct map_info *map, __u32 base,
+@@ -29,6 +29,7 @@
+ int osf = cfi->interleave * cfi->device_type; /* scale factor */
+ map_word val[3];
+ map_word qry[3];
++ unsigned long mask = (1 << (cfi->device_type * 8)) - 1;
+
+ qry[0] = cfi_build_cmd('Q', map, cfi);
+ qry[1] = cfi_build_cmd('R', map, cfi);
+@@ -38,6 +39,21 @@
val[1] = map_read(map, base + osf*0x11);
val[2] = map_read(map, base + osf*0x12);
-+ /* Apparently only one of the 2 interleaved LH28F640BFHE 16 bit chips on
++ /* Apparently only one of the 2 interleaved LH28F640BF 16 bit chips on
+ * a 32 bit wide bus is answering to the CFI Query.
+ * Using the expected map bankwidth=4 and chip interleave=2 we get wrong
+ * readings like 0xffff0051 instead of 0x00510051 etc.
+ * We take the valid bytes and recreate the expected answer as workaround.
+ */
-+ unsigned long mask;
-+ mask = (1 << (cfi->device_type * 8)) - 1;
-+
+ if (((val[0].x[0] >> (cfi->device_type * 8)) == mask) &&
+ ((val[1].x[0] >> (cfi->device_type * 8)) == mask) &&
+ ((val[2].x[0] >> (cfi->device_type * 8)) == mask))
diff --git a/recipes-kernel/linux/linux-yocto-tiny-kexecboot-3.10/patches/patches-mtd/collie-match-cfi-qry.patch b/recipes-kernel/linux/linux-yocto-tiny-kexecboot-3.10/patches/patches-mtd/collie-match-cfi-qry.patch
index 1333f94..e3fbf2e 100644
--- a/recipes-kernel/linux/linux-yocto-tiny-kexecboot-3.10/patches/patches-mtd/collie-match-cfi-qry.patch
+++ b/recipes-kernel/linux/linux-yocto-tiny-kexecboot-3.10/patches/patches-mtd/collie-match-cfi-qry.patch
@@ -2,19 +2,24 @@ diff --git a/drivers/mtd/chips/cfi_util.c b/drivers/mtd/chips/cfi_util.c
index f992418..7139d028 100644
--- a/drivers/mtd/chips/cfi_util.c
+++ b/drivers/mtd/chips/cfi_util.c
-@@ -38,6 +38,24 @@ int __xipram cfi_qry_present(struct map_info *map, __u32 base,
+@@ -29,6 +29,7 @@
+ int osf = cfi->interleave * cfi->device_type; /* scale factor */
+ map_word val[3];
+ map_word qry[3];
++ unsigned long mask = (1 << (cfi->device_type * 8)) - 1;
+
+ qry[0] = cfi_build_cmd('Q', map, cfi);
+ qry[1] = cfi_build_cmd('R', map, cfi);
+@@ -38,6 +39,21 @@
val[1] = map_read(map, base + osf*0x11);
val[2] = map_read(map, base + osf*0x12);
-+ /* Apparently only one of the 2 interleaved LH28F640BFHE 16 bit chips on
++ /* Apparently only one of the 2 interleaved LH28F640BF 16 bit chips on
+ * a 32 bit wide bus is answering to the CFI Query.
+ * Using the expected map bankwidth=4 and chip interleave=2 we get wrong
+ * readings like 0xffff0051 instead of 0x00510051 etc.
+ * We take the valid bytes and recreate the expected answer as workaround.
+ */
-+ unsigned long mask;
-+ mask = (1 << (cfi->device_type * 8)) - 1;
-+
+ if (((val[0].x[0] >> (cfi->device_type * 8)) == mask) &&
+ ((val[1].x[0] >> (cfi->device_type * 8)) == mask) &&
+ ((val[2].x[0] >> (cfi->device_type * 8)) == mask))