aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-08-30 18:30:38 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-08-30 18:30:38 -0400
commit0a7d5f8ce960e74fa22986bda4af488539796e49 (patch)
treee29ad17808a5c3410518e22dae8dfe94801b59f3 /drivers/mtd
parent0165508c80a2b5d5268d9c5dfa9b30c534a33693 (diff)
parentdc709bd190c130b299ac19d596594256265c042a (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/ams-delta.c10
-rw-r--r--drivers/mtd/nand/nand_base.c6
2 files changed, 10 insertions, 6 deletions
diff --git a/drivers/mtd/nand/ams-delta.c b/drivers/mtd/nand/ams-delta.c
index d7897dc6b3c8..a0ba07c36ee9 100644
--- a/drivers/mtd/nand/ams-delta.c
+++ b/drivers/mtd/nand/ams-delta.c
@@ -130,11 +130,13 @@ static void ams_delta_hwcontrol(struct mtd_info *mtd, int cmd,
130 if (ctrl & NAND_CTRL_CHANGE) { 130 if (ctrl & NAND_CTRL_CHANGE) {
131 unsigned long bits; 131 unsigned long bits;
132 132
133 bits = (~ctrl & NAND_NCE) << 2; 133 bits = (~ctrl & NAND_NCE) ? AMS_DELTA_LATCH2_NAND_NCE : 0;
134 bits |= (ctrl & NAND_CLE) << 7; 134 bits |= (ctrl & NAND_CLE) ? AMS_DELTA_LATCH2_NAND_CLE : 0;
135 bits |= (ctrl & NAND_ALE) << 6; 135 bits |= (ctrl & NAND_ALE) ? AMS_DELTA_LATCH2_NAND_ALE : 0;
136 136
137 ams_delta_latch2_write(0xC2, bits); 137 ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_CLE |
138 AMS_DELTA_LATCH2_NAND_ALE |
139 AMS_DELTA_LATCH2_NAND_NCE, bits);
138 } 140 }
139 141
140 if (cmd != NAND_CMD_NONE) 142 if (cmd != NAND_CMD_NONE)
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 119d17cdb780..975b2ef61121 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -1093,9 +1093,10 @@ static int nand_read(struct mtd_info *mtd, loff_t from, size_t len,
1093 1093
1094 ret = nand_do_read_ops(mtd, from, &chip->ops); 1094 ret = nand_do_read_ops(mtd, from, &chip->ops);
1095 1095
1096 *retlen = chip->ops.retlen;
1097
1096 nand_release_device(mtd); 1098 nand_release_device(mtd);
1097 1099
1098 *retlen = chip->ops.retlen;
1099 return ret; 1100 return ret;
1100} 1101}
1101 1102
@@ -1691,9 +1692,10 @@ static int nand_write(struct mtd_info *mtd, loff_t to, size_t len,
1691 1692
1692 ret = nand_do_write_ops(mtd, to, &chip->ops); 1693 ret = nand_do_write_ops(mtd, to, &chip->ops);
1693 1694
1695 *retlen = chip->ops.retlen;
1696
1694 nand_release_device(mtd); 1697 nand_release_device(mtd);
1695 1698
1696 *retlen = chip->ops.retlen;
1697 return ret; 1699 return ret;
1698} 1700}
1699 1701