From 20ecfaeb89e11fa3b9f54ee476134669895bb153 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 8 Nov 2011 12:44:06 -0800 Subject: [PATCH] 3.0 patches added patches: mtd-provide-an-alias-for-the-redboot-module-name.patch mtd-pxa3xx_nand-fix-blank-page-ecc-mismatch.patch mtd-pxa3xx_nand-fix-nand-detection-issue.patch --- ...an-alias-for-the-redboot-module-name.patch | 37 ++++++++++ ...3xx_nand-fix-blank-page-ecc-mismatch.patch | 39 +++++++++++ ...pxa3xx_nand-fix-nand-detection-issue.patch | 68 +++++++++++++++++++ queue-3.0/series | 3 + 4 files changed, 147 insertions(+) create mode 100644 queue-3.0/mtd-provide-an-alias-for-the-redboot-module-name.patch create mode 100644 queue-3.0/mtd-pxa3xx_nand-fix-blank-page-ecc-mismatch.patch create mode 100644 queue-3.0/mtd-pxa3xx_nand-fix-nand-detection-issue.patch diff --git a/queue-3.0/mtd-provide-an-alias-for-the-redboot-module-name.patch b/queue-3.0/mtd-provide-an-alias-for-the-redboot-module-name.patch new file mode 100644 index 00000000000..5d1b41eedcb --- /dev/null +++ b/queue-3.0/mtd-provide-an-alias-for-the-redboot-module-name.patch @@ -0,0 +1,37 @@ +From d5de1907d0af22e1a02de2b16a624148517a39c2 Mon Sep 17 00:00:00 2001 +From: Andres Salomon +Date: Fri, 14 Oct 2011 07:33:20 -0700 +Subject: mtd: provide an alias for the redboot module name + +From: Andres Salomon + +commit d5de1907d0af22e1a02de2b16a624148517a39c2 upstream. + +parse_mtd_partitions takes a list of partition types; if the driver +isn't loaded, it attempts to load it, and then it grabs the partition +parser. For redboot, the module name is "redboot.ko", while the parser +name is "RedBoot". Since modprobe is case-sensitive, attempting to +modprobe "RedBoot" will never work. I suspect the embedded systems that +make use of redboot just always manually loaded redboot prior to loading +their specific nand chip drivers (or statically compiled it in). + +Signed-off-by: Andres Salomon +Signed-off-by: Artem Bityutskiy +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mtd/redboot.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/mtd/redboot.c ++++ b/drivers/mtd/redboot.c +@@ -297,6 +297,9 @@ static struct mtd_part_parser redboot_pa + .name = "RedBoot", + }; + ++/* mtd parsers will request the module by parser name */ ++MODULE_ALIAS("RedBoot"); ++ + static int __init redboot_parser_init(void) + { + return register_mtd_parser(&redboot_parser); diff --git a/queue-3.0/mtd-pxa3xx_nand-fix-blank-page-ecc-mismatch.patch b/queue-3.0/mtd-pxa3xx_nand-fix-blank-page-ecc-mismatch.patch new file mode 100644 index 00000000000..e91d309c926 --- /dev/null +++ b/queue-3.0/mtd-pxa3xx_nand-fix-blank-page-ecc-mismatch.patch @@ -0,0 +1,39 @@ +From 543e32d5ff165d0d68deedb0e3557478c7c36a4a Mon Sep 17 00:00:00 2001 +From: Daniel Mack +Date: Tue, 7 Jun 2011 03:01:07 -0700 +Subject: mtd: pxa3xx_nand: Fix blank page ECC mismatch + +From: Daniel Mack + +commit 543e32d5ff165d0d68deedb0e3557478c7c36a4a upstream. + +This bug was introduced in f8155a40 ("mtd: pxa3xx_nand: rework irq +logic") and causes the PXA3xx NAND controller fail to operate with NAND +flash that has empty pages. According to the comment in this block, the +hardware controller will report a double-bit error for empty pages, +which can and must be ignored. + +This patch restores the original behaviour of the driver. + +Signed-off-by: Daniel Mack +Acked-by: Lei Wen +Cc: Haojian Zhuang +Cc: David Woodhouse +Signed-off-by: Artem Bityutskiy +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mtd/nand/pxa3xx_nand.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/mtd/nand/pxa3xx_nand.c ++++ b/drivers/mtd/nand/pxa3xx_nand.c +@@ -685,6 +685,8 @@ static int pxa3xx_nand_read_page_hwecc(s + * OOB, ignore such double bit errors + */ + if (is_buf_blank(buf, mtd->writesize)) ++ info->retcode = ERR_NONE; ++ else + mtd->ecc_stats.failed++; + } + diff --git a/queue-3.0/mtd-pxa3xx_nand-fix-nand-detection-issue.patch b/queue-3.0/mtd-pxa3xx_nand-fix-nand-detection-issue.patch new file mode 100644 index 00000000000..dbc62f711af --- /dev/null +++ b/queue-3.0/mtd-pxa3xx_nand-fix-nand-detection-issue.patch @@ -0,0 +1,68 @@ +From 0fab028b77d714ad302404b23306cf7adb885223 Mon Sep 17 00:00:00 2001 +From: Lei Wen +Date: Tue, 7 Jun 2011 03:01:06 -0700 +Subject: mtd: pxa3xx_nand: fix nand detection issue + +From: Lei Wen + +commit 0fab028b77d714ad302404b23306cf7adb885223 upstream. + +When keep_config is set, the detection would goes different routine. +That the driver would read out the setting which is set previously +by bootloader. While most bootloader keep the irq mask as off, and +current driver need all irq default open, keep_config behavior would +lead to no irq at all. + +Signed-off-by: Lei Wen +Tested-by: Daniel Mack +Signed-off-by: Artem Bityutskiy +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mtd/nand/pxa3xx_nand.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +--- a/drivers/mtd/nand/pxa3xx_nand.c ++++ b/drivers/mtd/nand/pxa3xx_nand.c +@@ -813,7 +813,7 @@ static int pxa3xx_nand_detect_config(str + info->page_size = ndcr & NDCR_PAGE_SZ ? 2048 : 512; + /* set info fields needed to read id */ + info->read_id_bytes = (info->page_size == 2048) ? 4 : 2; +- info->reg_ndcr = ndcr; ++ info->reg_ndcr = ndcr & ~NDCR_INT_MASK; + info->cmdset = &default_cmdset; + + info->ndtr0cs0 = nand_readl(info, NDTR0CS0); +@@ -882,7 +882,7 @@ static int pxa3xx_nand_scan(struct mtd_i + struct pxa3xx_nand_info *info = mtd->priv; + struct platform_device *pdev = info->pdev; + struct pxa3xx_nand_platform_data *pdata = pdev->dev.platform_data; +- struct nand_flash_dev pxa3xx_flash_ids[2] = { {NULL,}, {NULL,} }; ++ struct nand_flash_dev pxa3xx_flash_ids[2], *def = NULL; + const struct pxa3xx_nand_flash *f = NULL; + struct nand_chip *chip = mtd->priv; + uint32_t id = -1; +@@ -942,8 +942,10 @@ static int pxa3xx_nand_scan(struct mtd_i + pxa3xx_flash_ids[0].erasesize = f->page_size * f->page_per_block; + if (f->flash_width == 16) + pxa3xx_flash_ids[0].options = NAND_BUSWIDTH_16; ++ pxa3xx_flash_ids[1].name = NULL; ++ def = pxa3xx_flash_ids; + KEEP_CONFIG: +- if (nand_scan_ident(mtd, 1, pxa3xx_flash_ids)) ++ if (nand_scan_ident(mtd, 1, def)) + return -ENODEV; + /* calculate addressing information */ + info->col_addr_cycles = (mtd->writesize >= 2048) ? 2 : 1; +@@ -954,9 +956,9 @@ KEEP_CONFIG: + info->row_addr_cycles = 2; + mtd->name = mtd_names[0]; + chip->ecc.mode = NAND_ECC_HW; +- chip->ecc.size = f->page_size; ++ chip->ecc.size = info->page_size; + +- chip->options = (f->flash_width == 16) ? NAND_BUSWIDTH_16 : 0; ++ chip->options = (info->reg_ndcr & NDCR_DWIDTH_M) ? NAND_BUSWIDTH_16 : 0; + chip->options |= NAND_NO_AUTOINCR; + chip->options |= NAND_NO_READRDY; + diff --git a/queue-3.0/series b/queue-3.0/series index 095f4830a10..e39838df0dd 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -239,3 +239,6 @@ mac80211-fix-remain_off_channel-regression.patch mac80211-config-hw-when-going-back-on-channel.patch mac80211-disable-powersave-for-broken-aps.patch mtd-mtdchar-add-missing-initializer-on-raw-write.patch +mtd-provide-an-alias-for-the-redboot-module-name.patch +mtd-pxa3xx_nand-fix-nand-detection-issue.patch +mtd-pxa3xx_nand-fix-blank-page-ecc-mismatch.patch -- 2.47.3