diff options
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/Kconfig | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 6 | ||||
-rw-r--r-- | drivers/mtd/nand/sharpsl.c | 7 |
3 files changed, 9 insertions, 6 deletions
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 3db77eec0ed2..c99302ed3823 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig | |||
@@ -11,7 +11,7 @@ config MTD_NAND | |||
11 | help | 11 | help |
12 | This enables support for accessing all type of NAND flash | 12 | This enables support for accessing all type of NAND flash |
13 | devices. For further information see | 13 | devices. For further information see |
14 | <http://www.linux-mtd.infradead.org/tech/nand.html>. | 14 | <http://www.linux-mtd.infradead.org/doc/nand.html>. |
15 | 15 | ||
16 | config MTD_NAND_VERIFY_WRITE | 16 | config MTD_NAND_VERIFY_WRITE |
17 | bool "Verify NAND page writes" | 17 | bool "Verify NAND page writes" |
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index c8cbc00243fe..975b2ef61121 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
@@ -1204,7 +1204,7 @@ static int nand_write_oob_syndrome(struct mtd_info *mtd, | |||
1204 | pos = steps * (eccsize + chunk); | 1204 | pos = steps * (eccsize + chunk); |
1205 | steps = 0; | 1205 | steps = 0; |
1206 | } else | 1206 | } else |
1207 | pos = eccsize + chunk; | 1207 | pos = eccsize; |
1208 | 1208 | ||
1209 | chip->cmdfunc(mtd, NAND_CMD_SEQIN, pos, page); | 1209 | chip->cmdfunc(mtd, NAND_CMD_SEQIN, pos, page); |
1210 | for (i = 0; i < steps; i++) { | 1210 | for (i = 0; i < steps; i++) { |
@@ -1567,7 +1567,7 @@ static uint8_t *nand_fill_oob(struct nand_chip *chip, uint8_t *oob, | |||
1567 | bytes = min_t(size_t, len, free->length); | 1567 | bytes = min_t(size_t, len, free->length); |
1568 | boffs = free->offset; | 1568 | boffs = free->offset; |
1569 | } | 1569 | } |
1570 | memcpy(chip->oob_poi + woffs, oob, bytes); | 1570 | memcpy(chip->oob_poi + boffs, oob, bytes); |
1571 | oob += bytes; | 1571 | oob += bytes; |
1572 | } | 1572 | } |
1573 | return oob; | 1573 | return oob; |
@@ -2224,7 +2224,7 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd, | |||
2224 | } | 2224 | } |
2225 | 2225 | ||
2226 | /* Try to identify manufacturer */ | 2226 | /* Try to identify manufacturer */ |
2227 | for (maf_idx = 0; nand_manuf_ids[maf_idx].id != 0x0; maf_id++) { | 2227 | for (maf_idx = 0; nand_manuf_ids[maf_idx].id != 0x0; maf_idx++) { |
2228 | if (nand_manuf_ids[maf_idx].id == *maf_id) | 2228 | if (nand_manuf_ids[maf_idx].id == *maf_id) |
2229 | break; | 2229 | break; |
2230 | } | 2230 | } |
diff --git a/drivers/mtd/nand/sharpsl.c b/drivers/mtd/nand/sharpsl.c index fbeedc3184e9..51c7288ab49a 100644 --- a/drivers/mtd/nand/sharpsl.c +++ b/drivers/mtd/nand/sharpsl.c | |||
@@ -78,7 +78,7 @@ static struct mtd_partition sharpsl_nand_default_partition_info[] = { | |||
78 | /* | 78 | /* |
79 | * hardware specific access to control-lines | 79 | * hardware specific access to control-lines |
80 | * ctrl: | 80 | * ctrl: |
81 | * NAND_CNE: bit 0 -> bit 0 & 4 | 81 | * NAND_CNE: bit 0 -> ! bit 0 & 4 |
82 | * NAND_CLE: bit 1 -> bit 1 | 82 | * NAND_CLE: bit 1 -> bit 1 |
83 | * NAND_ALE: bit 2 -> bit 2 | 83 | * NAND_ALE: bit 2 -> bit 2 |
84 | * | 84 | * |
@@ -92,7 +92,10 @@ static void sharpsl_nand_hwcontrol(struct mtd_info *mtd, int cmd, | |||
92 | unsigned char bits = ctrl & 0x07; | 92 | unsigned char bits = ctrl & 0x07; |
93 | 93 | ||
94 | bits |= (ctrl & 0x01) << 4; | 94 | bits |= (ctrl & 0x01) << 4; |
95 | writeb((readb(FLASHCTL) & 0x17) | bits, FLASHCTL); | 95 | |
96 | bits ^= 0x11; | ||
97 | |||
98 | writeb((readb(FLASHCTL) & ~0x17) | bits, FLASHCTL); | ||
96 | } | 99 | } |
97 | 100 | ||
98 | if (cmd != NAND_CMD_NONE) | 101 | if (cmd != NAND_CMD_NONE) |