2 * u-boot/include/linux/mtd/nand.h
4 * Copyright (c) 2000 David Woodhouse <dwmw2@mvhi.com>
5 * Steven J. Hill <sjhill@cotw.com>
7 * $Id: nand.h,v 1.8 2000/10/30 17:16:17 sjhill Exp $
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
14 * Contains standard defines and IDs for NAND flash devices
17 * 01-31-2000 DMW Created
18 * 09-18-2000 SJH Moved structure out of the Disk-On-Chip drivers
19 * so it can be used by other NAND flash device
20 * drivers. I also changed the copyright since none
21 * of the original contents of this file are specific
22 * to DoC devices. David can whack me with a baseball
23 * bat later if I did something naughty.
24 * 10-11-2000 SJH Added private NAND flash structure for driver
25 * 10-24-2000 SJH Added prototype for 'nand_scan' function
27 #ifndef __LINUX_MTD_NAND_H
28 #define __LINUX_MTD_NAND_H
31 * Standard NAND flash commands
33 #define NAND_CMD_READ0 0
34 #define NAND_CMD_READ1 1
35 #define NAND_CMD_PAGEPROG 0x10
36 #define NAND_CMD_READOOB 0x50
37 #define NAND_CMD_ERASE1 0x60
38 #define NAND_CMD_STATUS 0x70
39 #define NAND_CMD_SEQIN 0x80
40 #define NAND_CMD_READID 0x90
41 #define NAND_CMD_ERASE2 0xd0
42 #define NAND_CMD_RESET 0xff
45 * NAND Flash Manufacturer ID Codes
47 #define NAND_MFR_TOSHIBA 0x98
48 #define NAND_MFR_SAMSUNG 0xec
51 * NAND Flash Device ID Structure
55 * name - Complete name of device
57 * manufacture_id - manufacturer ID code of device.
59 * model_id - model ID code of device.
61 * chipshift - total number of address bits for the device which
62 * is used to calculate address offsets and the total
63 * number of bytes the device is capable of.
65 * page256 - denotes if flash device has 256 byte pages or not.
67 * pageadrlen - number of bytes minus one needed to hold the
68 * complete address into the flash array. Keep in
69 * mind that when a read or write is done to a
70 * specific address, the address is input serially
71 * 8 bits at a time. This structure member is used
72 * by the read/write routines as a loop index for
73 * shifting the address out 8 bits at a time.
75 * erasesize - size of an erase block in the flash device.
77 struct nand_flash_dev {
84 unsigned long erasesize;
87 #endif /* __LINUX_MTD_NAND_H */