nand.h (28ac6719108e989429de2b3dfa90312ba7c4d27b) nand.h (c45912d8abc52de796b9059a58faf7c4166eab58)
1/*
2 * linux/include/linux/mtd/nand.h
3 *
1/*
2 * linux/include/linux/mtd/nand.h
3 *
4 * Copyright (c) 2000 David Woodhouse <dwmw2@mvhi.com>
4 * Copyright (c) 2000 David Woodhouse <dwmw2@infradead.org>
5 * Steven J. Hill <sjhill@realitydiluted.com>
6 * Thomas Gleixner <tglx@linutronix.de>
7 *
5 * Steven J. Hill <sjhill@realitydiluted.com>
6 * Thomas Gleixner <tglx@linutronix.de>
7 *
8 * $Id: nand.h,v 1.74 2005/09/15 13:58:50 vwool Exp $
9 *
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
12 * published by the Free Software Foundation.
13 *
14 * Info:
15 * Contains standard defines and IDs for NAND flash devices
16 *
17 * Changelog:

--- 167 unchanged lines hidden (view full) ---

185#define NAND_SAMSUNG_LP_OPTIONS \
186 (NAND_NO_PADDING | NAND_CACHEPRG | NAND_COPYBACK)
187
188/* Macros to identify the above */
189#define NAND_CANAUTOINCR(chip) (!(chip->options & NAND_NO_AUTOINCR))
190#define NAND_MUST_PAD(chip) (!(chip->options & NAND_NO_PADDING))
191#define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG))
192#define NAND_HAS_COPYBACK(chip) ((chip->options & NAND_COPYBACK))
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 * Info:
13 * Contains standard defines and IDs for NAND flash devices
14 *
15 * Changelog:

--- 167 unchanged lines hidden (view full) ---

183#define NAND_SAMSUNG_LP_OPTIONS \
184 (NAND_NO_PADDING | NAND_CACHEPRG | NAND_COPYBACK)
185
186/* Macros to identify the above */
187#define NAND_CANAUTOINCR(chip) (!(chip->options & NAND_NO_AUTOINCR))
188#define NAND_MUST_PAD(chip) (!(chip->options & NAND_NO_PADDING))
189#define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG))
190#define NAND_HAS_COPYBACK(chip) ((chip->options & NAND_COPYBACK))
191/* Large page NAND with SOFT_ECC should support subpage reads */
192#define NAND_SUBPAGE_READ(chip) ((chip->ecc.mode == NAND_ECC_SOFT) \
193 && (chip->page_shift > 9))
193
194/* Mask to zero out the chip options, which come from the id table */
195#define NAND_CHIPOPTIONS_MSK (0x0000ffff & ~NAND_NO_AUTOINCR)
196
197/* Non chip related options */
198/* Use a flash based bad block table. This option is passed to the
199 * default bad block table function. */
200#define NAND_USE_FLASH_BBT 0x00010000

--- 72 unchanged lines hidden (view full) ---

273 struct nand_chip *chip,
274 uint8_t *buf);
275 void (*write_page_raw)(struct mtd_info *mtd,
276 struct nand_chip *chip,
277 const uint8_t *buf);
278 int (*read_page)(struct mtd_info *mtd,
279 struct nand_chip *chip,
280 uint8_t *buf);
194
195/* Mask to zero out the chip options, which come from the id table */
196#define NAND_CHIPOPTIONS_MSK (0x0000ffff & ~NAND_NO_AUTOINCR)
197
198/* Non chip related options */
199/* Use a flash based bad block table. This option is passed to the
200 * default bad block table function. */
201#define NAND_USE_FLASH_BBT 0x00010000

--- 72 unchanged lines hidden (view full) ---

274 struct nand_chip *chip,
275 uint8_t *buf);
276 void (*write_page_raw)(struct mtd_info *mtd,
277 struct nand_chip *chip,
278 const uint8_t *buf);
279 int (*read_page)(struct mtd_info *mtd,
280 struct nand_chip *chip,
281 uint8_t *buf);
282 int (*read_subpage)(struct mtd_info *mtd,
283 struct nand_chip *chip,
284 uint32_t offs, uint32_t len,
285 uint8_t *buf);
281 void (*write_page)(struct mtd_info *mtd,
282 struct nand_chip *chip,
283 const uint8_t *buf);
284 int (*read_oob)(struct mtd_info *mtd,
285 struct nand_chip *chip,
286 int page,
287 int sndcmd);
288 int (*write_oob)(struct mtd_info *mtd,

--- 141 unchanged lines hidden (view full) ---

430#define NAND_MFR_TOSHIBA 0x98
431#define NAND_MFR_SAMSUNG 0xec
432#define NAND_MFR_FUJITSU 0x04
433#define NAND_MFR_NATIONAL 0x8f
434#define NAND_MFR_RENESAS 0x07
435#define NAND_MFR_STMICRO 0x20
436#define NAND_MFR_HYNIX 0xad
437#define NAND_MFR_MICRON 0x2c
286 void (*write_page)(struct mtd_info *mtd,
287 struct nand_chip *chip,
288 const uint8_t *buf);
289 int (*read_oob)(struct mtd_info *mtd,
290 struct nand_chip *chip,
291 int page,
292 int sndcmd);
293 int (*write_oob)(struct mtd_info *mtd,

--- 141 unchanged lines hidden (view full) ---

435#define NAND_MFR_TOSHIBA 0x98
436#define NAND_MFR_SAMSUNG 0xec
437#define NAND_MFR_FUJITSU 0x04
438#define NAND_MFR_NATIONAL 0x8f
439#define NAND_MFR_RENESAS 0x07
440#define NAND_MFR_STMICRO 0x20
441#define NAND_MFR_HYNIX 0xad
442#define NAND_MFR_MICRON 0x2c
443#define NAND_MFR_AMD 0x01
438
439/**
440 * struct nand_flash_dev - NAND Flash Device ID Structure
441 * @name: Identify the device type
442 * @id: device ID code
443 * @pagesize: Pagesize in bytes. Either 256 or 512 or 0
444 * If the pagesize is 0, then the real pagesize
445 * and the eraseize are determined from the

--- 179 unchanged lines hidden ---
444
445/**
446 * struct nand_flash_dev - NAND Flash Device ID Structure
447 * @name: Identify the device type
448 * @id: device ID code
449 * @pagesize: Pagesize in bytes. Either 256 or 512 or 0
450 * If the pagesize is 0, then the real pagesize
451 * and the eraseize are determined from the

--- 179 unchanged lines hidden ---