From 82c56a6acf38895bd4387540f7ab08a80f3bd522 Mon Sep 17 00:00:00 2001 From: Andrea Adami Date: Mon, 13 Oct 2014 00:03:46 +0200 Subject: linux-yocto(-tiny-kexecboot): collie: fixup for mtd resume after pm suspend Signed-off-by: Andrea Adami --- .../linux/linux-yocto-3.17/collie/mtd-resume.patch | 34 ++++++++++++++++++++++ .../linux/linux-yocto-tiny-kexecboot_3.17.bbappend | 1 + recipes-kernel/linux/linux-yocto_3.17.bbappend | 1 + 3 files changed, 36 insertions(+) create mode 100644 recipes-kernel/linux/linux-yocto-3.17/collie/mtd-resume.patch diff --git a/recipes-kernel/linux/linux-yocto-3.17/collie/mtd-resume.patch b/recipes-kernel/linux/linux-yocto-3.17/collie/mtd-resume.patch new file mode 100644 index 0000000..3cee9b3 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto-3.17/collie/mtd-resume.patch @@ -0,0 +1,34 @@ +From 6d34f776e8dba9cba5520db7d27a31102238f66e Mon Sep 17 00:00:00 2001 +From: Andrea Adami +Date: Sun, 12 Oct 2014 12:31:36 +0200 +Subject: [PATCH 1130/1130] mtd: cfi_cmdset_0001.c: fix resume for LH28F640BF + chips + +After '#echo mem > /sys/power/state' the device can not be resumed +because apparently the Partition Configuration Register has been reset +to default. This should only happen after cold/boot or hard reset but +the behavior is confirmed on 2 different end-user devices. + +Tested on zaurus collie with kernel 3.17-rc7 + +Signed-off-by: Dmitry Eremin-Solenikov +--- + drivers/mtd/chips/cfi_cmdset_0001.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c +index a7543ba..59e2355 100644 +--- a/drivers/mtd/chips/cfi_cmdset_0001.c ++++ b/drivers/mtd/chips/cfi_cmdset_0001.c +@@ -2590,6 +2590,8 @@ static void cfi_intelext_resume(struct mtd_info *mtd) + + /* Go to known state. Chip may have been power cycled */ + if (chip->state == FL_PM_SUSPENDED) { ++ /* Refresh LH28F640BF Partition Configuration Register */ ++ fixup_LH28F640BF(mtd); + map_write(map, CMD(0xFF), cfi->chips[i].start); + chip->oldstate = chip->state = FL_READY; + wake_up(&chip->wq); +-- +1.9.1 + diff --git a/recipes-kernel/linux/linux-yocto-tiny-kexecboot_3.17.bbappend b/recipes-kernel/linux/linux-yocto-tiny-kexecboot_3.17.bbappend index 11d7f11..909d66e 100644 --- a/recipes-kernel/linux/linux-yocto-tiny-kexecboot_3.17.bbappend +++ b/recipes-kernel/linux/linux-yocto-tiny-kexecboot_3.17.bbappend @@ -54,6 +54,7 @@ SRC_URI_append_collie = " \ file://locomolcd-suspend-resume.patch \ \ file://collie-use-gpio-charger.patch \ + file://mtd-resume.patch \ \ " diff --git a/recipes-kernel/linux/linux-yocto_3.17.bbappend b/recipes-kernel/linux/linux-yocto_3.17.bbappend index 116c7ce..992bc85 100644 --- a/recipes-kernel/linux/linux-yocto_3.17.bbappend +++ b/recipes-kernel/linux/linux-yocto_3.17.bbappend @@ -51,6 +51,7 @@ SRC_URI_append_collie = " \ file://locomolcd-suspend-resume.patch \ \ file://collie-use-gpio-charger.patch \ + file://mtd-resume.patch \ \ " -- cgit 1.2.3-korg