diff options
| author | Randy Dunlap <rdunlap@xenotime.net> | 2006-06-29 00:48:27 -0400 |
|---|---|---|
| committer | David Woodhouse <dwmw2@infradead.org> | 2006-06-29 03:55:00 -0400 |
| commit | 844d3b427ef1a4f96e54866747bdb6c6cbca4c6a (patch) | |
| tree | 5720169efd661df4aca6d989ce796df8fdddec1c | |
| parent | 7f8a894066b826a4baea49c2a3adbba0a56a192f (diff) | |
MTD: fix all kernel-doc warnings
Fix all kernel-doc warnings in MTD headers and source files:
- add some missing struct fields;
- correct some function parameter names;
- use kernel-doc format for function doc. headers;
- nand_ecc.c contains only exported interfaces, no internal ones;
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| -rw-r--r-- | Documentation/DocBook/mtdnand.tmpl | 4 | ||||
| -rw-r--r-- | drivers/mtd/nand/nand_base.c | 16 | ||||
| -rw-r--r-- | drivers/mtd/nand/nand_ecc.c | 3 | ||||
| -rw-r--r-- | include/linux/mtd/nand.h | 13 |
4 files changed, 22 insertions, 14 deletions
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl index 6e463d0db266..32f385605981 100644 --- a/Documentation/DocBook/mtdnand.tmpl +++ b/Documentation/DocBook/mtdnand.tmpl | |||
| @@ -1295,7 +1295,9 @@ in this page</entry> | |||
| 1295 | </para> | 1295 | </para> |
| 1296 | !Idrivers/mtd/nand/nand_base.c | 1296 | !Idrivers/mtd/nand/nand_base.c |
| 1297 | !Idrivers/mtd/nand/nand_bbt.c | 1297 | !Idrivers/mtd/nand/nand_bbt.c |
| 1298 | !Idrivers/mtd/nand/nand_ecc.c | 1298 | <!-- No internal functions for kernel-doc: |
| 1299 | X!Idrivers/mtd/nand/nand_ecc.c | ||
| 1300 | --> | ||
| 1299 | </chapter> | 1301 | </chapter> |
| 1300 | 1302 | ||
| 1301 | <chapter id="credits"> | 1303 | <chapter id="credits"> |
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/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 66559272ebcb..2266f032a8c6 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
| @@ -202,7 +202,7 @@ typedef enum { | |||
| 202 | struct nand_chip; | 202 | struct nand_chip; |
| 203 | 203 | ||
| 204 | /** | 204 | /** |
| 205 | * struct nand_hw_control - Control structure for hardware controller (e.g ECC generator) shared among independend devices | 205 | * struct nand_hw_control - Control structure for hardware controller (e.g ECC generator) shared among independent devices |
| 206 | * @lock: protection lock | 206 | * @lock: protection lock |
| 207 | * @active: the mtd device which holds the controller currently | 207 | * @active: the mtd device which holds the controller currently |
| 208 | * @wq: wait queue to sleep on if a NAND operation is in progress | 208 | * @wq: wait queue to sleep on if a NAND operation is in progress |
| @@ -223,12 +223,15 @@ struct nand_hw_control { | |||
| 223 | * @total: total number of ecc bytes per page | 223 | * @total: total number of ecc bytes per page |
| 224 | * @prepad: padding information for syndrome based ecc generators | 224 | * @prepad: padding information for syndrome based ecc generators |
| 225 | * @postpad: padding information for syndrome based ecc generators | 225 | * @postpad: padding information for syndrome based ecc generators |
| 226 | * @layout: ECC layout control struct pointer | ||
| 226 | * @hwctl: function to control hardware ecc generator. Must only | 227 | * @hwctl: function to control hardware ecc generator. Must only |
| 227 | * be provided if an hardware ECC is available | 228 | * be provided if an hardware ECC is available |
| 228 | * @calculate: function for ecc calculation or readback from ecc hardware | 229 | * @calculate: function for ecc calculation or readback from ecc hardware |
| 229 | * @correct: function for ecc correction, matching to ecc generator (sw/hw) | 230 | * @correct: function for ecc correction, matching to ecc generator (sw/hw) |
| 230 | * @read_page: function to read a page according to the ecc generator requirements | 231 | * @read_page: function to read a page according to the ecc generator requirements |
| 231 | * @write_page: function to write a page according to the ecc generator requirements | 232 | * @write_page: function to write a page according to the ecc generator requirements |
| 233 | * @read_oob: function to read chip OOB data | ||
| 234 | * @write_oob: function to write chip OOB data | ||
| 232 | */ | 235 | */ |
| 233 | struct nand_ecc_ctrl { | 236 | struct nand_ecc_ctrl { |
| 234 | nand_ecc_modes_t mode; | 237 | nand_ecc_modes_t mode; |
| @@ -300,11 +303,15 @@ struct nand_buffers { | |||
| 300 | * @cmdfunc: [REPLACEABLE] hardwarespecific function for writing commands to the chip | 303 | * @cmdfunc: [REPLACEABLE] hardwarespecific function for writing commands to the chip |
| 301 | * @waitfunc: [REPLACEABLE] hardwarespecific function for wait on ready | 304 | * @waitfunc: [REPLACEABLE] hardwarespecific function for wait on ready |
| 302 | * @ecc: [BOARDSPECIFIC] ecc control ctructure | 305 | * @ecc: [BOARDSPECIFIC] ecc control ctructure |
| 306 | * @buffers: buffer structure for read/write | ||
| 307 | * @hwcontrol: platform-specific hardware control structure | ||
| 308 | * @ops: oob operation operands | ||
| 303 | * @erase_cmd: [INTERN] erase command write function, selectable due to AND support | 309 | * @erase_cmd: [INTERN] erase command write function, selectable due to AND support |
| 304 | * @scan_bbt: [REPLACEABLE] function to scan bad block table | 310 | * @scan_bbt: [REPLACEABLE] function to scan bad block table |
| 305 | * @chip_delay: [BOARDSPECIFIC] chip dependent delay for transfering data from array to read regs (tR) | 311 | * @chip_delay: [BOARDSPECIFIC] chip dependent delay for transfering data from array to read regs (tR) |
| 306 | * @wq: [INTERN] wait queue to sleep on if a NAND operation is in progress | 312 | * @wq: [INTERN] wait queue to sleep on if a NAND operation is in progress |
| 307 | * @state: [INTERN] the current state of the NAND device | 313 | * @state: [INTERN] the current state of the NAND device |
| 314 | * @oob_poi: poison value buffer | ||
| 308 | * @page_shift: [INTERN] number of address bits in a page (column address bits) | 315 | * @page_shift: [INTERN] number of address bits in a page (column address bits) |
| 309 | * @phys_erase_shift: [INTERN] number of address bits in a physical eraseblock | 316 | * @phys_erase_shift: [INTERN] number of address bits in a physical eraseblock |
| 310 | * @bbt_erase_shift: [INTERN] number of address bits in a bbt entry | 317 | * @bbt_erase_shift: [INTERN] number of address bits in a bbt entry |
| @@ -521,7 +528,7 @@ extern int nand_do_read(struct mtd_info *mtd, loff_t from, size_t len, | |||
| 521 | * struct platform_nand_chip - chip level device structure | 528 | * struct platform_nand_chip - chip level device structure |
| 522 | * | 529 | * |
| 523 | * @nr_chips: max. number of chips to scan for | 530 | * @nr_chips: max. number of chips to scan for |
| 524 | * @chip_offs: chip number offset | 531 | * @chip_offset: chip number offset |
| 525 | * @nr_partitions: number of partitions pointed to by partitions (or zero) | 532 | * @nr_partitions: number of partitions pointed to by partitions (or zero) |
| 526 | * @partitions: mtd partition list | 533 | * @partitions: mtd partition list |
| 527 | * @chip_delay: R/B delay value in us | 534 | * @chip_delay: R/B delay value in us |
| @@ -546,7 +553,7 @@ struct platform_nand_chip { | |||
| 546 | * @hwcontrol: platform specific hardware control structure | 553 | * @hwcontrol: platform specific hardware control structure |
| 547 | * @dev_ready: platform specific function to read ready/busy pin | 554 | * @dev_ready: platform specific function to read ready/busy pin |
| 548 | * @select_chip: platform specific chip select function | 555 | * @select_chip: platform specific chip select function |
| 549 | * @priv_data: private data to transport driver specific settings | 556 | * @priv: private data to transport driver specific settings |
| 550 | * | 557 | * |
| 551 | * All fields are optional and depend on the hardware driver requirements | 558 | * All fields are optional and depend on the hardware driver requirements |
| 552 | */ | 559 | */ |
