summaryrefslogtreecommitdiffstats
path: root/include/linux/mtd/onenand.h
diff options
context:
space:
mode:
authorKyungmin Park <kyungmin.park@samsung.com>2005-09-03 07:15:48 +0100
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-11-06 21:20:53 +0100
commitcdc001305da4f057353911018e28f26f8f879061 (patch)
tree3672f12af5da82b646aee7ed2d923225fe279a3b /include/linux/mtd/onenand.h
parent52b0eea73de05df33c51ca652e288a3ba1bba03b (diff)
downloadblackbird-op-linux-cdc001305da4f057353911018e28f26f8f879061.tar.gz
blackbird-op-linux-cdc001305da4f057353911018e28f26f8f879061.zip
[PATCH] OneNAND: Simple Bad Block handling support
Based on NAND memory bad block table code Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/mtd/onenand.h')
-rw-r--r--include/linux/mtd/onenand.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h
index c557caa24a6c..89aaffbc9576 100644
--- a/include/linux/mtd/onenand.h
+++ b/include/linux/mtd/onenand.h
@@ -14,6 +14,7 @@
#include <linux/spinlock.h>
#include <linux/mtd/onenand_regs.h>
+#include <linux/mtd/bbm.h>
#define MAX_BUFFERRAM 2
@@ -67,10 +68,14 @@ struct onenand_bufferram {
* @param wait [REPLACEABLE] hardware specific function for wait on ready
* @param read_bufferram [REPLACEABLE] hardware specific function for BufferRAM Area
* @param write_bufferram [REPLACEABLE] hardware specific function for BufferRAM Area
+ * @param read_word [REPLACEABLE] hardware specific function for read register of OneNAND
+ * @param write_word [REPLACEABLE] hardware specific function for write register of OneNAND
+ * @param scan_bbt [REPLACEALBE] hardware specific function for scaning Bad block Table
* @param chip_lock [INTERN] spinlock used to protect access to this structure and the chip
* @param wq [INTERN] wait queue to sleep on if a OneNAND operation is in progress
* @param state [INTERN] the current state of the OneNAND device
* @param autooob [REPLACEABLE] the default (auto)placement scheme
+ * @param bbm [REPLACEABLE] pointer to Bad Block Management
* @param priv [OPTIONAL] pointer to private chip date
*/
struct onenand_chip {
@@ -96,6 +101,8 @@ struct onenand_chip {
unsigned short (*read_word)(void __iomem *addr);
void (*write_word)(unsigned short value, void __iomem *addr);
void (*mmcontrol)(struct mtd_info *mtd, int sync_read);
+ int (*block_markbad)(struct mtd_info *mtd, loff_t ofs);
+ int (*scan_bbt)(struct mtd_info *mtd);
spinlock_t chip_lock;
wait_queue_head_t wq;
@@ -103,6 +110,8 @@ struct onenand_chip {
struct nand_oobinfo *autooob;
+ void *bbm;
+
void *priv;
};
OpenPOWER on IntegriCloud