diff options
author | Luka Perkov <luka@openwrt.org> | 2014-02-11 02:07:44 +0000 |
---|---|---|
committer | Luka Perkov <luka@openwrt.org> | 2014-02-11 02:07:44 +0000 |
commit | c9ae111a20be4c9555128cced8edded660d133df (patch) | |
tree | fd4809b562d454394cbb9ec517bf3f1ef2d5b6f2 /target/linux/mvebu/patches-3.10/0134-mtd-nand-pxa3xx-read_page-returns-max_bitflips.patch | |
parent | 3af779eb172b0438f77e8a01a97dd0eb9a146076 (diff) | |
download | upstream-c9ae111a20be4c9555128cced8edded660d133df.tar.gz upstream-c9ae111a20be4c9555128cced8edded660d133df.tar.bz2 upstream-c9ae111a20be4c9555128cced8edded660d133df.zip |
mvebu: backport mainline patches from kernel 3.13
This is a backport of the patches accepted to the Linux mainline related to
mvebu SoC (Armada XP and Armada 370) between Linux v3.12, and Linux v3.13.
This work mainly covers:
* Finishes work for sharing the pxa nand driver(drivers/mtd/nand/pxa3xx_nand.c)
between the PXA family, and the Armada family.
* timer initialization update, and access function for the Armada family.
* Generic IRQ handling backporting.
* Some bug fixes.
Signed-off-by: Seif Mazareeb <seif.mazareeb@gmail.com>
CC: Luka Perkov <luka@openwrt.org>
SVN-Revision: 39566
Diffstat (limited to 'target/linux/mvebu/patches-3.10/0134-mtd-nand-pxa3xx-read_page-returns-max_bitflips.patch')
-rw-r--r-- | target/linux/mvebu/patches-3.10/0134-mtd-nand-pxa3xx-read_page-returns-max_bitflips.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-3.10/0134-mtd-nand-pxa3xx-read_page-returns-max_bitflips.patch b/target/linux/mvebu/patches-3.10/0134-mtd-nand-pxa3xx-read_page-returns-max_bitflips.patch new file mode 100644 index 0000000000..afb81720c0 --- /dev/null +++ b/target/linux/mvebu/patches-3.10/0134-mtd-nand-pxa3xx-read_page-returns-max_bitflips.patch @@ -0,0 +1,42 @@ +From 97598678602aaea473303523ce37a45d258206ca Mon Sep 17 00:00:00 2001 +From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> +Date: Thu, 7 Nov 2013 12:17:13 -0300 +Subject: [PATCH 134/203] mtd: nand: pxa3xx: read_page() returns max_bitflips + +As per the ecc.read_page() prototype, we must return the maximum number +of bitflips that were corrected on any one region covering an ecc step. + +Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> +Tested-by: Daniel Mack <zonque@gmail.com> +Signed-off-by: Brian Norris <computersforpeace@gmail.com> +--- + drivers/mtd/nand/pxa3xx_nand.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/mtd/nand/pxa3xx_nand.c ++++ b/drivers/mtd/nand/pxa3xx_nand.c +@@ -751,6 +751,7 @@ static int pxa3xx_nand_read_page_hwecc(s + { + struct pxa3xx_nand_host *host = mtd->priv; + struct pxa3xx_nand_info *info = host->info_data; ++ int max_bitflips = 0; + + chip->read_buf(mtd, buf, mtd->writesize); + chip->read_buf(mtd, chip->oob_poi, mtd->oobsize); +@@ -758,6 +759,7 @@ static int pxa3xx_nand_read_page_hwecc(s + if (info->retcode == ERR_SBERR) { + switch (info->use_ecc) { + case 1: ++ max_bitflips = 1; + mtd->ecc_stats.corrected++; + break; + case 0: +@@ -776,7 +778,7 @@ static int pxa3xx_nand_read_page_hwecc(s + mtd->ecc_stats.failed++; + } + +- return 0; ++ return max_bitflips; + } + + static uint8_t pxa3xx_nand_read_byte(struct mtd_info *mtd) |