MTD: kernel-doc fixes + additions
Fix some kernel-doc typos/spellos. Use kernel-doc syntax in places where it was almost used. Correct/add struct, struct field, and function param names where needed. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
This commit is contained in:
parent
844d3b427e
commit
ea9b6dcc15
6 changed files with 69 additions and 59 deletions
|
@ -109,7 +109,7 @@
|
||||||
for most of the implementations. These functions can be replaced by the
|
for most of the implementations. These functions can be replaced by the
|
||||||
board driver if neccecary. Those functions are called via pointers in the
|
board driver if neccecary. Those functions are called via pointers in the
|
||||||
NAND chip description structure. The board driver can set the functions which
|
NAND chip description structure. The board driver can set the functions which
|
||||||
should be replaced by board dependend functions before calling nand_scan().
|
should be replaced by board dependent functions before calling nand_scan().
|
||||||
If the function pointer is NULL on entry to nand_scan() then the pointer
|
If the function pointer is NULL on entry to nand_scan() then the pointer
|
||||||
is set to the default function which is suitable for the detected chip type.
|
is set to the default function which is suitable for the detected chip type.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
|
@ -133,7 +133,7 @@
|
||||||
[REPLACEABLE]</para><para>
|
[REPLACEABLE]</para><para>
|
||||||
Replaceable members hold hardware related functions which can be
|
Replaceable members hold hardware related functions which can be
|
||||||
provided by the board driver. The board driver can set the functions which
|
provided by the board driver. The board driver can set the functions which
|
||||||
should be replaced by board dependend functions before calling nand_scan().
|
should be replaced by board dependent functions before calling nand_scan().
|
||||||
If the function pointer is NULL on entry to nand_scan() then the pointer
|
If the function pointer is NULL on entry to nand_scan() then the pointer
|
||||||
is set to the default function which is suitable for the detected chip type.
|
is set to the default function which is suitable for the detected chip type.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
|
@ -156,9 +156,8 @@
|
||||||
<title>Basic board driver</title>
|
<title>Basic board driver</title>
|
||||||
<para>
|
<para>
|
||||||
For most boards it will be sufficient to provide just the
|
For most boards it will be sufficient to provide just the
|
||||||
basic functions and fill out some really board dependend
|
basic functions and fill out some really board dependent
|
||||||
members in the nand chip description structure.
|
members in the nand chip description structure.
|
||||||
See drivers/mtd/nand/skeleton for reference.
|
|
||||||
</para>
|
</para>
|
||||||
<sect1>
|
<sect1>
|
||||||
<title>Basic defines</title>
|
<title>Basic defines</title>
|
||||||
|
|
|
@ -19,21 +19,21 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct nand_bbt_descr - bad block table descriptor
|
* struct nand_bbt_descr - bad block table descriptor
|
||||||
* @param options options for this descriptor
|
* @options: options for this descriptor
|
||||||
* @param pages the page(s) where we find the bbt, used with
|
* @pages: the page(s) where we find the bbt, used with
|
||||||
* option BBT_ABSPAGE when bbt is searched,
|
* option BBT_ABSPAGE when bbt is searched,
|
||||||
* then we store the found bbts pages here.
|
* then we store the found bbts pages here.
|
||||||
* Its an array and supports up to 8 chips now
|
* Its an array and supports up to 8 chips now
|
||||||
* @param offs offset of the pattern in the oob area of the page
|
* @offs: offset of the pattern in the oob area of the page
|
||||||
* @param veroffs offset of the bbt version counter in the oob are of the page
|
* @veroffs: offset of the bbt version counter in the oob area of the page
|
||||||
* @param version version read from the bbt page during scan
|
* @version: version read from the bbt page during scan
|
||||||
* @param len length of the pattern, if 0 no pattern check is performed
|
* @len: length of the pattern, if 0 no pattern check is performed
|
||||||
* @param maxblocks maximum number of blocks to search for a bbt. This number of
|
* @maxblocks: maximum number of blocks to search for a bbt. This
|
||||||
* blocks is reserved at the end of the device
|
* number of blocks is reserved at the end of the device
|
||||||
* where the tables are written.
|
* where the tables are written.
|
||||||
* @param reserved_block_code if non-0, this pattern denotes a reserved
|
* @reserved_block_code: if non-0, this pattern denotes a reserved
|
||||||
* (rather than bad) block in the stored bbt
|
* (rather than bad) block in the stored bbt
|
||||||
* @param pattern pattern to identify bad block table or factory marked
|
* @pattern: pattern to identify bad block table or factory marked
|
||||||
* good / bad blocks, can be NULL, if len = 0
|
* good / bad blocks, can be NULL, if len = 0
|
||||||
*
|
*
|
||||||
* Descriptor for the bad block table marker and the descriptor for the
|
* Descriptor for the bad block table marker and the descriptor for the
|
||||||
|
@ -93,12 +93,15 @@ struct nand_bbt_descr {
|
||||||
#define ONENAND_BADBLOCK_POS 0
|
#define ONENAND_BADBLOCK_POS 0
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct bbt_info - [GENERIC] Bad Block Table data structure
|
* struct bbm_info - [GENERIC] Bad Block Table data structure
|
||||||
* @param bbt_erase_shift [INTERN] number of address bits in a bbt entry
|
* @bbt_erase_shift: [INTERN] number of address bits in a bbt entry
|
||||||
* @param badblockpos [INTERN] position of the bad block marker in the oob area
|
* @badblockpos: [INTERN] position of the bad block marker in the oob area
|
||||||
* @param bbt [INTERN] bad block table pointer
|
* @options: options for this descriptor
|
||||||
* @param badblock_pattern [REPLACEABLE] bad block scan pattern used for initial bad block scan
|
* @bbt: [INTERN] bad block table pointer
|
||||||
* @param priv [OPTIONAL] pointer to private bbm date
|
* @isbad_bbt: function to determine if a block is bad
|
||||||
|
* @badblock_pattern: [REPLACEABLE] bad block scan pattern used for
|
||||||
|
* initial bad block scan
|
||||||
|
* @priv: [OPTIONAL] pointer to private bbm date
|
||||||
*/
|
*/
|
||||||
struct bbm_info {
|
struct bbm_info {
|
||||||
int bbt_erase_shift;
|
int bbt_erase_shift;
|
||||||
|
|
|
@ -77,11 +77,11 @@ typedef enum {
|
||||||
*
|
*
|
||||||
* @len: number of bytes to write/read. When a data buffer is given
|
* @len: number of bytes to write/read. When a data buffer is given
|
||||||
* (datbuf != NULL) this is the number of data bytes. When
|
* (datbuf != NULL) this is the number of data bytes. When
|
||||||
+ no data buffer is available this is the number of oob bytes.
|
* no data buffer is available this is the number of oob bytes.
|
||||||
*
|
*
|
||||||
* @retlen: number of bytes written/read. When a data buffer is given
|
* @retlen: number of bytes written/read. When a data buffer is given
|
||||||
* (datbuf != NULL) this is the number of data bytes. When
|
* (datbuf != NULL) this is the number of data bytes. When
|
||||||
+ no data buffer is available this is the number of oob bytes.
|
* no data buffer is available this is the number of oob bytes.
|
||||||
*
|
*
|
||||||
* @ooblen: number of oob bytes per page
|
* @ooblen: number of oob bytes per page
|
||||||
* @ooboffs: offset of oob data in the oob area (only relevant when
|
* @ooboffs: offset of oob data in the oob area (only relevant when
|
||||||
|
|
|
@ -407,7 +407,6 @@ struct nand_chip {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct nand_flash_dev - NAND Flash Device ID Structure
|
* struct nand_flash_dev - NAND Flash Device ID Structure
|
||||||
*
|
|
||||||
* @name: Identify the device type
|
* @name: Identify the device type
|
||||||
* @id: device ID code
|
* @id: device ID code
|
||||||
* @pagesize: Pagesize in bytes. Either 256 or 512 or 0
|
* @pagesize: Pagesize in bytes. Either 256 or 512 or 0
|
||||||
|
@ -526,7 +525,6 @@ extern int nand_do_read(struct mtd_info *mtd, loff_t from, size_t len,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct platform_nand_chip - chip level device structure
|
* struct platform_nand_chip - chip level device structure
|
||||||
*
|
|
||||||
* @nr_chips: max. number of chips to scan for
|
* @nr_chips: max. number of chips to scan for
|
||||||
* @chip_offset: chip number offset
|
* @chip_offset: chip number offset
|
||||||
* @nr_partitions: number of partitions pointed to by partitions (or zero)
|
* @nr_partitions: number of partitions pointed to by partitions (or zero)
|
||||||
|
@ -549,7 +547,6 @@ struct platform_nand_chip {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct platform_nand_ctrl - controller level device structure
|
* struct platform_nand_ctrl - controller level device structure
|
||||||
*
|
|
||||||
* @hwcontrol: platform specific hardware control structure
|
* @hwcontrol: platform specific hardware control structure
|
||||||
* @dev_ready: platform specific function to read ready/busy pin
|
* @dev_ready: platform specific function to read ready/busy pin
|
||||||
* @select_chip: platform specific chip select function
|
* @select_chip: platform specific chip select function
|
||||||
|
|
|
@ -23,7 +23,7 @@ extern int onenand_scan(struct mtd_info *mtd, int max_chips);
|
||||||
/* Free resources held by the OneNAND device */
|
/* Free resources held by the OneNAND device */
|
||||||
extern void onenand_release(struct mtd_info *mtd);
|
extern void onenand_release(struct mtd_info *mtd);
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* onenand_state_t - chip states
|
* onenand_state_t - chip states
|
||||||
* Enumeration for OneNAND flash chip state
|
* Enumeration for OneNAND flash chip state
|
||||||
*/
|
*/
|
||||||
|
@ -42,9 +42,9 @@ typedef enum {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct onenand_bufferram - OneNAND BufferRAM Data
|
* struct onenand_bufferram - OneNAND BufferRAM Data
|
||||||
* @param block block address in BufferRAM
|
* @block: block address in BufferRAM
|
||||||
* @param page page address in BufferRAM
|
* @page: page address in BufferRAM
|
||||||
* @param valid valid flag
|
* @valid: valid flag
|
||||||
*/
|
*/
|
||||||
struct onenand_bufferram {
|
struct onenand_bufferram {
|
||||||
int block;
|
int block;
|
||||||
|
@ -54,32 +54,43 @@ struct onenand_bufferram {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct onenand_chip - OneNAND Private Flash Chip Data
|
* struct onenand_chip - OneNAND Private Flash Chip Data
|
||||||
* @param base [BOARDSPECIFIC] address to access OneNAND
|
* @base: [BOARDSPECIFIC] address to access OneNAND
|
||||||
* @param chipsize [INTERN] the size of one chip for multichip arrays
|
* @chipsize: [INTERN] the size of one chip for multichip arrays
|
||||||
* @param device_id [INTERN] device ID
|
* @device_id: [INTERN] device ID
|
||||||
* @param verstion_id [INTERN] version ID
|
* @density_mask: chip density, used for DDP devices
|
||||||
* @param options [BOARDSPECIFIC] various chip options. They can partly be set to inform onenand_scan about
|
* @verstion_id: [INTERN] version ID
|
||||||
* @param erase_shift [INTERN] number of address bits in a block
|
* @options: [BOARDSPECIFIC] various chip options. They can
|
||||||
* @param page_shift [INTERN] number of address bits in a page
|
* partly be set to inform onenand_scan about
|
||||||
* @param ppb_shift [INTERN] number of address bits in a pages per block
|
* @erase_shift: [INTERN] number of address bits in a block
|
||||||
* @param page_mask [INTERN] a page per block mask
|
* @page_shift: [INTERN] number of address bits in a page
|
||||||
* @param bufferam_index [INTERN] BufferRAM index
|
* @ppb_shift: [INTERN] number of address bits in a pages per block
|
||||||
* @param bufferam [INTERN] BufferRAM info
|
* @page_mask: [INTERN] a page per block mask
|
||||||
* @param readw [REPLACEABLE] hardware specific function for read short
|
* @bufferram_index: [INTERN] BufferRAM index
|
||||||
* @param writew [REPLACEABLE] hardware specific function for write short
|
* @bufferram: [INTERN] BufferRAM info
|
||||||
* @param command [REPLACEABLE] hardware specific function for writing commands to the chip
|
* @readw: [REPLACEABLE] hardware specific function for read short
|
||||||
* @param wait [REPLACEABLE] hardware specific function for wait on ready
|
* @writew: [REPLACEABLE] hardware specific function for write short
|
||||||
* @param read_bufferram [REPLACEABLE] hardware specific function for BufferRAM Area
|
* @command: [REPLACEABLE] hardware specific function for writing
|
||||||
* @param write_bufferram [REPLACEABLE] hardware specific function for BufferRAM Area
|
* commands to the chip
|
||||||
* @param read_word [REPLACEABLE] hardware specific function for read register of OneNAND
|
* @wait: [REPLACEABLE] hardware specific function for wait on ready
|
||||||
* @param write_word [REPLACEABLE] hardware specific function for write register of OneNAND
|
* @read_bufferram: [REPLACEABLE] hardware specific function for BufferRAM Area
|
||||||
* @param scan_bbt [REPLACEALBE] hardware specific function for scaning Bad block Table
|
* @write_bufferram: [REPLACEABLE] hardware specific function for BufferRAM Area
|
||||||
* @param chip_lock [INTERN] spinlock used to protect access to this structure and the chip
|
* @read_word: [REPLACEABLE] hardware specific function for read
|
||||||
* @param wq [INTERN] wait queue to sleep on if a OneNAND operation is in progress
|
* register of OneNAND
|
||||||
* @param state [INTERN] the current state of the OneNAND device
|
* @write_word: [REPLACEABLE] hardware specific function for write
|
||||||
* @param ecclayout [REPLACEABLE] the default ecc placement scheme
|
* register of OneNAND
|
||||||
* @param bbm [REPLACEABLE] pointer to Bad Block Management
|
* @mmcontrol: sync burst read function
|
||||||
* @param priv [OPTIONAL] pointer to private chip date
|
* @block_markbad: function to mark a block as bad
|
||||||
|
* @scan_bbt: [REPLACEALBE] hardware specific function for scanning
|
||||||
|
* Bad block Table
|
||||||
|
* @chip_lock: [INTERN] spinlock used to protect access to this
|
||||||
|
* structure and the chip
|
||||||
|
* @wq: [INTERN] wait queue to sleep on if a OneNAND
|
||||||
|
* operation is in progress
|
||||||
|
* @state: [INTERN] the current state of the OneNAND device
|
||||||
|
* @page_buf: data buffer
|
||||||
|
* @ecclayout: [REPLACEABLE] the default ecc placement scheme
|
||||||
|
* @bbm: [REPLACEABLE] pointer to Bad Block Management
|
||||||
|
* @priv: [OPTIONAL] pointer to private chip date
|
||||||
*/
|
*/
|
||||||
struct onenand_chip {
|
struct onenand_chip {
|
||||||
void __iomem *base;
|
void __iomem *base;
|
||||||
|
@ -147,9 +158,9 @@ struct onenand_chip {
|
||||||
#define ONENAND_MFR_SAMSUNG 0xec
|
#define ONENAND_MFR_SAMSUNG 0xec
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct nand_manufacturers - NAND Flash Manufacturer ID Structure
|
* struct onenand_manufacturers - NAND Flash Manufacturer ID Structure
|
||||||
* @param name: Manufacturer name
|
* @name: Manufacturer name
|
||||||
* @param id: manufacturer ID code of device.
|
* @id: manufacturer ID code of device.
|
||||||
*/
|
*/
|
||||||
struct onenand_manufacturers {
|
struct onenand_manufacturers {
|
||||||
int id;
|
int id;
|
||||||
|
|
|
@ -133,7 +133,7 @@ struct nand_ecclayout {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct mtd_ecc_stats - error correction status
|
* struct mtd_ecc_stats - error correction stats
|
||||||
*
|
*
|
||||||
* @corrected: number of corrected bits
|
* @corrected: number of corrected bits
|
||||||
* @failed: number of uncorrectable errors
|
* @failed: number of uncorrectable errors
|
||||||
|
|
Loading…
Reference in a new issue