mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-15 13:22:55 +00:00
Two MTD fixes for 3.5:
- Fix a logic error in OLPC CAFÉ NAND ready() function. - Fix regression due to bitflip handling changes. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEABECAAYFAk/265wACgkQdwG7hYl686MWGgCfdnxPKE/cJnjVm5wxlp+hTBLv tbsAn3hpmrXhZNYNhQ+U34RDpw8V7SYc =IEqd -----END PGP SIGNATURE----- Merge tag 'for-linus-20120706' of git://git.infradead.org/linux-mtd Pull two MTD fixes from David Woodhouse: - Fix a logic error in OLPC CAFÉ NAND ready() function. - Fix regression due to bitflip handling changes. * tag 'for-linus-20120706' of git://git.infradead.org/linux-mtd: mtd: cafe_nand: fix an & vs | mistake mtd: nand: initialize bitflip_threshold prior to BBT scanning
This commit is contained in:
commit
af9b9a53fa
@ -102,7 +102,7 @@ static const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL };
|
||||
static int cafe_device_ready(struct mtd_info *mtd)
|
||||
{
|
||||
struct cafe_priv *cafe = mtd->priv;
|
||||
int result = !!(cafe_readl(cafe, NAND_STATUS) | 0x40000000);
|
||||
int result = !!(cafe_readl(cafe, NAND_STATUS) & 0x40000000);
|
||||
uint32_t irqs = cafe_readl(cafe, NAND_IRQ);
|
||||
|
||||
cafe_writel(cafe, irqs, NAND_IRQ);
|
||||
|
@ -3501,6 +3501,13 @@ int nand_scan_tail(struct mtd_info *mtd)
|
||||
/* propagate ecc info to mtd_info */
|
||||
mtd->ecclayout = chip->ecc.layout;
|
||||
mtd->ecc_strength = chip->ecc.strength;
|
||||
/*
|
||||
* Initialize bitflip_threshold to its default prior scan_bbt() call.
|
||||
* scan_bbt() might invoke mtd_read(), thus bitflip_threshold must be
|
||||
* properly set.
|
||||
*/
|
||||
if (!mtd->bitflip_threshold)
|
||||
mtd->bitflip_threshold = mtd->ecc_strength;
|
||||
|
||||
/* Check, if we should skip the bad block table scan */
|
||||
if (chip->options & NAND_SKIP_BBTSCAN)
|
||||
|
Loading…
Reference in New Issue
Block a user