aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/diskonchip.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/mtd/nand/diskonchip.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'drivers/mtd/nand/diskonchip.c')
-rw-r--r--drivers/mtd/nand/diskonchip.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c
index b7f8de7b2780..7837728d02ff 100644
--- a/drivers/mtd/nand/diskonchip.c
+++ b/drivers/mtd/nand/diskonchip.c
@@ -137,7 +137,7 @@ static struct rs_control *rs_decoder;
137 * 137 *
138 * Fabrice Bellard figured this out in the old docecc code. I added 138 * Fabrice Bellard figured this out in the old docecc code. I added
139 * some comments, improved a minor bit and converted it to make use 139 * some comments, improved a minor bit and converted it to make use
140 * of the generic Reed-Solomon libary. tglx 140 * of the generic Reed-Solomon library. tglx
141 */ 141 */
142static int doc_ecc_decode(struct rs_control *rs, uint8_t *data, uint8_t *ecc) 142static int doc_ecc_decode(struct rs_control *rs, uint8_t *data, uint8_t *ecc)
143{ 143{
@@ -400,7 +400,7 @@ static uint16_t __init doc200x_ident_chip(struct mtd_info *mtd, int nr)
400 doc200x_hwcontrol(mtd, 0, NAND_CTRL_ALE | NAND_CTRL_CHANGE); 400 doc200x_hwcontrol(mtd, 0, NAND_CTRL_ALE | NAND_CTRL_CHANGE);
401 doc200x_hwcontrol(mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE); 401 doc200x_hwcontrol(mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE);
402 402
403 /* We cant' use dev_ready here, but at least we wait for the 403 /* We can't use dev_ready here, but at least we wait for the
404 * command to complete 404 * command to complete
405 */ 405 */
406 udelay(50); 406 udelay(50);
@@ -986,7 +986,7 @@ static int doc200x_correct_data(struct mtd_info *mtd, u_char *dat,
986 dummy = ReadDOC(docptr, ECCConf); 986 dummy = ReadDOC(docptr, ECCConf);
987 } 987 }
988 988
989 /* Error occured ? */ 989 /* Error occurred ? */
990 if (dummy & 0x80) { 990 if (dummy & 0x80) {
991 for (i = 0; i < 6; i++) { 991 for (i = 0; i < 6; i++) {
992 if (DoC_is_MillenniumPlus(doc)) 992 if (DoC_is_MillenniumPlus(doc))
@@ -1160,7 +1160,7 @@ static inline int __init nftl_partscan(struct mtd_info *mtd, struct mtd_partitio
1160 /* NOTE: The lines below modify internal variables of the NAND and MTD 1160 /* NOTE: The lines below modify internal variables of the NAND and MTD
1161 layers; variables with have already been configured by nand_scan. 1161 layers; variables with have already been configured by nand_scan.
1162 Unfortunately, we didn't know before this point what these values 1162 Unfortunately, we didn't know before this point what these values
1163 should be. Thus, this code is somewhat dependant on the exact 1163 should be. Thus, this code is somewhat dependent on the exact
1164 implementation of the NAND layer. */ 1164 implementation of the NAND layer. */
1165 if (mh->UnitSizeFactor != 0xff) { 1165 if (mh->UnitSizeFactor != 0xff) {
1166 this->bbt_erase_shift += (0xff - mh->UnitSizeFactor); 1166 this->bbt_erase_shift += (0xff - mh->UnitSizeFactor);
@@ -1360,11 +1360,9 @@ static int __init nftl_scan_bbt(struct mtd_info *mtd)
1360 At least as nand_bbt.c is currently written. */ 1360 At least as nand_bbt.c is currently written. */
1361 if ((ret = nand_scan_bbt(mtd, NULL))) 1361 if ((ret = nand_scan_bbt(mtd, NULL)))
1362 return ret; 1362 return ret;
1363 add_mtd_device(mtd); 1363 mtd_device_register(mtd, NULL, 0);
1364#ifdef CONFIG_MTD_PARTITIONS
1365 if (!no_autopart) 1364 if (!no_autopart)
1366 add_mtd_partitions(mtd, parts, numparts); 1365 mtd_device_register(mtd, parts, numparts);
1367#endif
1368 return 0; 1366 return 0;
1369} 1367}
1370 1368
@@ -1419,11 +1417,9 @@ static int __init inftl_scan_bbt(struct mtd_info *mtd)
1419 autopartitioning, but I want to give it more thought. */ 1417 autopartitioning, but I want to give it more thought. */
1420 if (!numparts) 1418 if (!numparts)
1421 return -EIO; 1419 return -EIO;
1422 add_mtd_device(mtd); 1420 mtd_device_register(mtd, NULL, 0);
1423#ifdef CONFIG_MTD_PARTITIONS
1424 if (!no_autopart) 1421 if (!no_autopart)
1425 add_mtd_partitions(mtd, parts, numparts); 1422 mtd_device_register(mtd, parts, numparts);
1426#endif
1427 return 0; 1423 return 0;
1428} 1424}
1429 1425
@@ -1678,9 +1674,9 @@ static int __init doc_probe(unsigned long physadr)
1678 /* DBB note: i believe nand_release is necessary here, as 1674 /* DBB note: i believe nand_release is necessary here, as
1679 buffers may have been allocated in nand_base. Check with 1675 buffers may have been allocated in nand_base. Check with
1680 Thomas. FIX ME! */ 1676 Thomas. FIX ME! */
1681 /* nand_release will call del_mtd_device, but we haven't yet 1677 /* nand_release will call mtd_device_unregister, but we
1682 added it. This is handled without incident by 1678 haven't yet added it. This is handled without incident by
1683 del_mtd_device, as far as I can tell. */ 1679 mtd_device_unregister, as far as I can tell. */
1684 nand_release(mtd); 1680 nand_release(mtd);
1685 kfree(mtd); 1681 kfree(mtd);
1686 goto fail; 1682 goto fail;