aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/onenand/onenand_sim.c49
1 files changed, 25 insertions, 24 deletions
diff --git a/drivers/mtd/onenand/onenand_sim.c b/drivers/mtd/onenand/onenand_sim.c
index 0d89ad5776fa..d5b4888b4655 100644
--- a/drivers/mtd/onenand/onenand_sim.c
+++ b/drivers/mtd/onenand/onenand_sim.c
@@ -88,11 +88,11 @@ do { \
88 88
89/** 89/**
90 * onenand_lock_handle - Handle Lock scheme 90 * onenand_lock_handle - Handle Lock scheme
91 * @param this OneNAND device structure 91 * @this: OneNAND device structure
92 * @param cmd The command to be sent 92 * @cmd: The command to be sent
93 * 93 *
94 * Send lock command to OneNAND device. 94 * Send lock command to OneNAND device.
95 * The lock scheme is depends on chip type. 95 * The lock scheme depends on chip type.
96 */ 96 */
97static void onenand_lock_handle(struct onenand_chip *this, int cmd) 97static void onenand_lock_handle(struct onenand_chip *this, int cmd)
98{ 98{
@@ -131,8 +131,8 @@ static void onenand_lock_handle(struct onenand_chip *this, int cmd)
131 131
132/** 132/**
133 * onenand_bootram_handle - Handle BootRAM area 133 * onenand_bootram_handle - Handle BootRAM area
134 * @param this OneNAND device structure 134 * @this: OneNAND device structure
135 * @param cmd The command to be sent 135 * @cmd: The command to be sent
136 * 136 *
137 * Emulate BootRAM area. It is possible to do basic operation using BootRAM. 137 * Emulate BootRAM area. It is possible to do basic operation using BootRAM.
138 */ 138 */
@@ -153,10 +153,10 @@ static void onenand_bootram_handle(struct onenand_chip *this, int cmd)
153 153
154/** 154/**
155 * onenand_update_interrupt - Set interrupt register 155 * onenand_update_interrupt - Set interrupt register
156 * @param this OneNAND device structure 156 * @this: OneNAND device structure
157 * @param cmd The command to be sent 157 * @cmd: The command to be sent
158 * 158 *
159 * Update interrupt register. The status is depends on command. 159 * Update interrupt register. The status depends on command.
160 */ 160 */
161static void onenand_update_interrupt(struct onenand_chip *this, int cmd) 161static void onenand_update_interrupt(struct onenand_chip *this, int cmd)
162{ 162{
@@ -189,11 +189,12 @@ static void onenand_update_interrupt(struct onenand_chip *this, int cmd)
189} 189}
190 190
191/** 191/**
192 * onenand_check_overwrite - Check over-write if happend 192 * onenand_check_overwrite - Check if over-write happened
193 * @param dest The destination pointer 193 * @dest: The destination pointer
194 * @param src The source pointer 194 * @src: The source pointer
195 * @param count The length to be check 195 * @count: The length to be check
196 * @return 0 on same, otherwise 1 196 *
197 * Returns: 0 on same, otherwise 1
197 * 198 *
198 * Compare the source with destination 199 * Compare the source with destination
199 */ 200 */
@@ -213,10 +214,10 @@ static int onenand_check_overwrite(void *dest, void *src, size_t count)
213 214
214/** 215/**
215 * onenand_data_handle - Handle OneNAND Core and DataRAM 216 * onenand_data_handle - Handle OneNAND Core and DataRAM
216 * @param this OneNAND device structure 217 * @this: OneNAND device structure
217 * @param cmd The command to be sent 218 * @cmd: The command to be sent
218 * @param dataram Which dataram used 219 * @dataram: Which dataram used
219 * @param offset The offset to OneNAND Core 220 * @offset: The offset to OneNAND Core
220 * 221 *
221 * Copy data from OneNAND Core to DataRAM (read) 222 * Copy data from OneNAND Core to DataRAM (read)
222 * Copy data from DataRAM to OneNAND Core (write) 223 * Copy data from DataRAM to OneNAND Core (write)
@@ -295,8 +296,8 @@ static void onenand_data_handle(struct onenand_chip *this, int cmd,
295 296
296/** 297/**
297 * onenand_command_handle - Handle command 298 * onenand_command_handle - Handle command
298 * @param this OneNAND device structure 299 * @this: OneNAND device structure
299 * @param cmd The command to be sent 300 * @cmd: The command to be sent
300 * 301 *
301 * Emulate OneNAND command. 302 * Emulate OneNAND command.
302 */ 303 */
@@ -350,8 +351,8 @@ static void onenand_command_handle(struct onenand_chip *this, int cmd)
350 351
351/** 352/**
352 * onenand_writew - [OneNAND Interface] Emulate write operation 353 * onenand_writew - [OneNAND Interface] Emulate write operation
353 * @param value value to write 354 * @value: value to write
354 * @param addr address to write 355 * @addr: address to write
355 * 356 *
356 * Write OneNAND register with value 357 * Write OneNAND register with value
357 */ 358 */
@@ -373,7 +374,7 @@ static void onenand_writew(unsigned short value, void __iomem * addr)
373 374
374/** 375/**
375 * flash_init - Initialize OneNAND simulator 376 * flash_init - Initialize OneNAND simulator
376 * @param flash OneNAND simulaotr data strucutres 377 * @flash: OneNAND simulator data strucutres
377 * 378 *
378 * Initialize OneNAND simulator. 379 * Initialize OneNAND simulator.
379 */ 380 */
@@ -416,7 +417,7 @@ static int __init flash_init(struct onenand_flash *flash)
416 417
417/** 418/**
418 * flash_exit - Clean up OneNAND simulator 419 * flash_exit - Clean up OneNAND simulator
419 * @param flash OneNAND simulaotr data strucutres 420 * @flash: OneNAND simulator data structures
420 * 421 *
421 * Clean up OneNAND simulator. 422 * Clean up OneNAND simulator.
422 */ 423 */
@@ -449,7 +450,7 @@ static int __init onenand_sim_init(void)
449 info->onenand.write_word = onenand_writew; 450 info->onenand.write_word = onenand_writew;
450 451
451 if (flash_init(&info->flash)) { 452 if (flash_init(&info->flash)) {
452 printk(KERN_ERR "Unable to allocat flash.\n"); 453 printk(KERN_ERR "Unable to allocate flash.\n");
453 kfree(ffchars); 454 kfree(ffchars);
454 kfree(info); 455 kfree(info);
455 return -ENOMEM; 456 return -ENOMEM;