summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2004-10-21 02:35:05 +0100
committerDavid Woodhouse <dwmw2@infradead.org>2004-10-21 02:35:05 +0100
commitce9ef9d9bdd861fbcd221d1722deb5ce13ded23e (patch)
treeb29445bc9cf3f3a6f2ce4bf9e6e0be1f8c6010d4 /include/linux
parent91c730410be06832fa7b0493779e943ffe80a4f5 (diff)
MTD: NAND flash driver updates.
- Use new RS library for ECC - Add support for new NAND flash chips - New board support: - iPAQ H1910 - Renesas AG-AND devel board - Simtec S3C210 - Support for shared controllers on multiple chips. Signed-Off-By: Thomas Gleixner <tglx@linutronix.de> Signed-Off-By: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mtd/nand.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 7de9f8dfa8ab..9453cb58c683 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -5,7 +5,7 @@
* Steven J. Hill <sjhill@realitydiluted.com>
* Thomas Gleixner <tglx@linutronix.de>
*
- * $Id: nand.h,v 1.63 2004/07/07 16:29:43 gleixner Exp $
+ * $Id: nand.h,v 1.66 2004/10/02 10:07:08 gleixner Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -212,6 +212,18 @@ typedef enum {
FL_CACHEDPRG,
} nand_state_t;
+/* Keep gcc happy */
+struct nand_chip;
+
+/**
+ * struct nand_hw_control - Control structure for hardware controller (e.g ECC generator) shared among independend devices
+ * @lock: protection lock
+ * @active: the mtd device which holds the controller currently
+ */
+struct nand_hw_control {
+ spinlock_t lock;
+ struct nand_chip *active;
+};
/**
* struct nand_chip - NAND Private Flash Chip Data
@@ -265,12 +277,13 @@ typedef enum {
* @bbt: [INTERN] bad block table pointer
* @bbt_td: [REPLACEABLE] bad block table descriptor for flash lookup
* @bbt_md: [REPLACEABLE] bad block table mirror descriptor
+ * @controller: [OPTIONAL] a pointer to a hardware controller structure which is shared among multiple independend devices
* @priv: [OPTIONAL] pointer to private chip date
*/
struct nand_chip {
- unsigned long IO_ADDR_R;
- unsigned long IO_ADDR_W;
+ void __iomem *IO_ADDR_R;
+ void __iomem *IO_ADDR_W;
u_char (*read_byte)(struct mtd_info *mtd);
void (*write_byte)(struct mtd_info *mtd, u_char byte);
@@ -317,6 +330,7 @@ struct nand_chip {
uint8_t *bbt;
struct nand_bbt_descr *bbt_td;
struct nand_bbt_descr *bbt_md;
+ struct nand_hw_control *controller;
void *priv;
};