diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-04 00:29:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-04 00:29:08 -0400 |
commit | 0d1782144e81faf6203075c5fcd0a2f0db91af5b (patch) | |
tree | 761dd18870e97ec9c6c14bc1c4db1429065483c0 /drivers/mtd/nand | |
parent | 67ab33db8be1cd466c09dfcba334d69d3e2f92e6 (diff) | |
parent | c7afb0f97700e73109564f83c35bfeeb14cb653b (diff) |
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6:
[JFFS2][XATTR] Fix memory leak in POSIX-ACL support
fs/jffs2/: make 2 functions static
[MTD] NAND: Fix broken sharpsl driver
[JFFS2][XATTR] Fix xd->refcnt race condition
MTD: kernel-doc fixes + additions
MTD: fix all kernel-doc warnings
[MTD] DOC: Fixup read functions and do a little cleanup
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 16 | ||||
-rw-r--r-- | drivers/mtd/nand/nand_ecc.c | 3 | ||||
-rw-r--r-- | drivers/mtd/nand/sharpsl.c | 7 |
3 files changed, 9 insertions, 17 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 80a76654d963..62b861304e03 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
@@ -155,7 +155,7 @@ static u16 nand_read_word(struct mtd_info *mtd) | |||
155 | /** | 155 | /** |
156 | * nand_select_chip - [DEFAULT] control CE line | 156 | * nand_select_chip - [DEFAULT] control CE line |
157 | * @mtd: MTD device structure | 157 | * @mtd: MTD device structure |
158 | * @chip: chipnumber to select, -1 for deselect | 158 | * @chipnr: chipnumber to select, -1 for deselect |
159 | * | 159 | * |
160 | * Default select function for 1 chip devices. | 160 | * Default select function for 1 chip devices. |
161 | */ | 161 | */ |
@@ -542,7 +542,6 @@ static void nand_command(struct mtd_info *mtd, unsigned int command, | |||
542 | * Send command to NAND device. This is the version for the new large page | 542 | * Send command to NAND device. This is the version for the new large page |
543 | * devices We dont have the separate regions as we have in the small page | 543 | * devices We dont have the separate regions as we have in the small page |
544 | * devices. We must emulate NAND_CMD_READOOB to keep the code compatible. | 544 | * devices. We must emulate NAND_CMD_READOOB to keep the code compatible. |
545 | * | ||
546 | */ | 545 | */ |
547 | static void nand_command_lp(struct mtd_info *mtd, unsigned int command, | 546 | static void nand_command_lp(struct mtd_info *mtd, unsigned int command, |
548 | int column, int page_addr) | 547 | int column, int page_addr) |
@@ -656,7 +655,7 @@ static void nand_command_lp(struct mtd_info *mtd, unsigned int command, | |||
656 | 655 | ||
657 | /** | 656 | /** |
658 | * nand_get_device - [GENERIC] Get chip for selected access | 657 | * nand_get_device - [GENERIC] Get chip for selected access |
659 | * @this: the nand chip descriptor | 658 | * @chip: the nand chip descriptor |
660 | * @mtd: MTD device structure | 659 | * @mtd: MTD device structure |
661 | * @new_state: the state which is requested | 660 | * @new_state: the state which is requested |
662 | * | 661 | * |
@@ -696,13 +695,12 @@ nand_get_device(struct nand_chip *chip, struct mtd_info *mtd, int new_state) | |||
696 | /** | 695 | /** |
697 | * nand_wait - [DEFAULT] wait until the command is done | 696 | * nand_wait - [DEFAULT] wait until the command is done |
698 | * @mtd: MTD device structure | 697 | * @mtd: MTD device structure |
699 | * @this: NAND chip structure | 698 | * @chip: NAND chip structure |
700 | * | 699 | * |
701 | * Wait for command done. This applies to erase and program only | 700 | * Wait for command done. This applies to erase and program only |
702 | * Erase can take up to 400ms and program up to 20ms according to | 701 | * Erase can take up to 400ms and program up to 20ms according to |
703 | * general NAND and SmartMedia specs | 702 | * general NAND and SmartMedia specs |
704 | * | 703 | */ |
705 | */ | ||
706 | static int nand_wait(struct mtd_info *mtd, struct nand_chip *chip) | 704 | static int nand_wait(struct mtd_info *mtd, struct nand_chip *chip) |
707 | { | 705 | { |
708 | 706 | ||
@@ -896,6 +894,7 @@ static int nand_read_page_syndrome(struct mtd_info *mtd, struct nand_chip *chip, | |||
896 | /** | 894 | /** |
897 | * nand_transfer_oob - [Internal] Transfer oob to client buffer | 895 | * nand_transfer_oob - [Internal] Transfer oob to client buffer |
898 | * @chip: nand chip structure | 896 | * @chip: nand chip structure |
897 | * @oob: oob destination address | ||
899 | * @ops: oob ops structure | 898 | * @ops: oob ops structure |
900 | */ | 899 | */ |
901 | static uint8_t *nand_transfer_oob(struct nand_chip *chip, uint8_t *oob, | 900 | static uint8_t *nand_transfer_oob(struct nand_chip *chip, uint8_t *oob, |
@@ -946,6 +945,7 @@ static uint8_t *nand_transfer_oob(struct nand_chip *chip, uint8_t *oob, | |||
946 | * | 945 | * |
947 | * @mtd: MTD device structure | 946 | * @mtd: MTD device structure |
948 | * @from: offset to read from | 947 | * @from: offset to read from |
948 | * @ops: oob ops structure | ||
949 | * | 949 | * |
950 | * Internal function. Called with chip held. | 950 | * Internal function. Called with chip held. |
951 | */ | 951 | */ |
@@ -1760,7 +1760,7 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to, | |||
1760 | /** | 1760 | /** |
1761 | * nand_write_oob - [MTD Interface] NAND write data and/or out-of-band | 1761 | * nand_write_oob - [MTD Interface] NAND write data and/or out-of-band |
1762 | * @mtd: MTD device structure | 1762 | * @mtd: MTD device structure |
1763 | * @from: offset to read from | 1763 | * @to: offset to write to |
1764 | * @ops: oob operation description structure | 1764 | * @ops: oob operation description structure |
1765 | */ | 1765 | */ |
1766 | static int nand_write_oob(struct mtd_info *mtd, loff_t to, | 1766 | static int nand_write_oob(struct mtd_info *mtd, loff_t to, |
@@ -2055,7 +2055,7 @@ static void nand_sync(struct mtd_info *mtd) | |||
2055 | /** | 2055 | /** |
2056 | * nand_block_isbad - [MTD Interface] Check if block at offset is bad | 2056 | * nand_block_isbad - [MTD Interface] Check if block at offset is bad |
2057 | * @mtd: MTD device structure | 2057 | * @mtd: MTD device structure |
2058 | * @ofs: offset relative to mtd start | 2058 | * @offs: offset relative to mtd start |
2059 | */ | 2059 | */ |
2060 | static int nand_block_isbad(struct mtd_info *mtd, loff_t offs) | 2060 | static int nand_block_isbad(struct mtd_info *mtd, loff_t offs) |
2061 | { | 2061 | { |
diff --git a/drivers/mtd/nand/nand_ecc.c b/drivers/mtd/nand/nand_ecc.c index 2a163e4084df..dd438ca47d9a 100644 --- a/drivers/mtd/nand/nand_ecc.c +++ b/drivers/mtd/nand/nand_ecc.c | |||
@@ -65,8 +65,7 @@ static const u_char nand_ecc_precalc_table[] = { | |||
65 | }; | 65 | }; |
66 | 66 | ||
67 | /** | 67 | /** |
68 | * nand_calculate_ecc - [NAND Interface] Calculate 3 byte ECC code | 68 | * nand_calculate_ecc - [NAND Interface] Calculate 3-byte ECC for 256-byte block |
69 | * for 256 byte block | ||
70 | * @mtd: MTD block structure | 69 | * @mtd: MTD block structure |
71 | * @dat: raw data | 70 | * @dat: raw data |
72 | * @ecc_code: buffer for ECC | 71 | * @ecc_code: buffer for ECC |
diff --git a/drivers/mtd/nand/sharpsl.c b/drivers/mtd/nand/sharpsl.c index 21743658d150..fbeedc3184e9 100644 --- a/drivers/mtd/nand/sharpsl.c +++ b/drivers/mtd/nand/sharpsl.c | |||
@@ -237,11 +237,6 @@ static int __init sharpsl_nand_init(void) | |||
237 | } | 237 | } |
238 | } | 238 | } |
239 | 239 | ||
240 | if (machine_is_husky() || machine_is_borzoi() || machine_is_akita()) { | ||
241 | /* Need to use small eraseblock size for backward compatibility */ | ||
242 | sharpsl_mtd->flags |= MTD_NO_VIRTBLOCKS; | ||
243 | } | ||
244 | |||
245 | add_mtd_partitions(sharpsl_mtd, sharpsl_partition_info, nr_partitions); | 240 | add_mtd_partitions(sharpsl_mtd, sharpsl_partition_info, nr_partitions); |
246 | 241 | ||
247 | /* Return happy */ | 242 | /* Return happy */ |
@@ -255,8 +250,6 @@ module_init(sharpsl_nand_init); | |||
255 | */ | 250 | */ |
256 | static void __exit sharpsl_nand_cleanup(void) | 251 | static void __exit sharpsl_nand_cleanup(void) |
257 | { | 252 | { |
258 | struct nand_chip *this = (struct nand_chip *)&sharpsl_mtd[1]; | ||
259 | |||
260 | /* Release resources, unregister device */ | 253 | /* Release resources, unregister device */ |
261 | nand_release(sharpsl_mtd); | 254 | nand_release(sharpsl_mtd); |
262 | 255 | ||