aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd/nand.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mtd/nand.h')
-rw-r--r--include/linux/mtd/nand.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 9a19c65abd74..0118128ae384 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -5,7 +5,7 @@
5 * Steven J. Hill <sjhill@realitydiluted.com> 5 * Steven J. Hill <sjhill@realitydiluted.com>
6 * Thomas Gleixner <tglx@linutronix.de> 6 * Thomas Gleixner <tglx@linutronix.de>
7 * 7 *
8 * $Id: nand.h,v 1.68 2004/11/12 10:40:37 gleixner Exp $ 8 * $Id: nand.h,v 1.69 2005/01/17 18:29:18 dmarlin Exp $
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as 11 * it under the terms of the GNU General Public License version 2 as
@@ -48,6 +48,8 @@
48 * 02-08-2004 tglx added option field to nand structure for chip anomalities 48 * 02-08-2004 tglx added option field to nand structure for chip anomalities
49 * 05-25-2004 tglx added bad block table support, ST-MICRO manufacturer id 49 * 05-25-2004 tglx added bad block table support, ST-MICRO manufacturer id
50 * update of nand_chip structure description 50 * update of nand_chip structure description
51 * 01-17-2005 dmarlin added extended commands for AG-AND device and added option
52 * for BBT_AUTO_REFRESH.
51 */ 53 */
52#ifndef __LINUX_MTD_NAND_H 54#ifndef __LINUX_MTD_NAND_H
53#define __LINUX_MTD_NAND_H 55#define __LINUX_MTD_NAND_H
@@ -115,6 +117,25 @@ extern int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_
115#define NAND_CMD_READSTART 0x30 117#define NAND_CMD_READSTART 0x30
116#define NAND_CMD_CACHEDPROG 0x15 118#define NAND_CMD_CACHEDPROG 0x15
117 119
120/* Extended commands for AG-AND device */
121/*
122 * Note: the command for NAND_CMD_DEPLETE1 is really 0x00 but
123 * there is no way to distinguish that from NAND_CMD_READ0
124 * until the remaining sequence of commands has been completed
125 * so add a high order bit and mask it off in the command.
126 */
127#define NAND_CMD_DEPLETE1 0x100
128#define NAND_CMD_DEPLETE2 0x38
129#define NAND_CMD_STATUS_MULTI 0x71
130#define NAND_CMD_STATUS_ERROR 0x72
131/* multi-bank error status (banks 0-3) */
132#define NAND_CMD_STATUS_ERROR0 0x73
133#define NAND_CMD_STATUS_ERROR1 0x74
134#define NAND_CMD_STATUS_ERROR2 0x75
135#define NAND_CMD_STATUS_ERROR3 0x76
136#define NAND_CMD_STATUS_RESET 0x7f
137#define NAND_CMD_STATUS_CLEAR 0xff
138
118/* Status bits */ 139/* Status bits */
119#define NAND_STATUS_FAIL 0x01 140#define NAND_STATUS_FAIL 0x01
120#define NAND_STATUS_FAIL_N1 0x02 141#define NAND_STATUS_FAIL_N1 0x02
@@ -170,6 +191,10 @@ extern int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_
170/* Chip has a array of 4 pages which can be read without 191/* Chip has a array of 4 pages which can be read without
171 * additional ready /busy waits */ 192 * additional ready /busy waits */
172#define NAND_4PAGE_ARRAY 0x00000040 193#define NAND_4PAGE_ARRAY 0x00000040
194/* Chip requires that BBT is periodically rewritten to prevent
195 * bits from adjacent blocks from 'leaking' in altering data.
196 * This happens with the Renesas AG-AND chips, possibly others. */
197#define BBT_AUTO_REFRESH 0x00000080
173 198
174/* Options valid for Samsung large page devices */ 199/* Options valid for Samsung large page devices */
175#define NAND_SAMSUNG_LP_OPTIONS \ 200#define NAND_SAMSUNG_LP_OPTIONS \