diff options
author | Marian Balakowicz <m8@semihalf.com> | 2006-04-05 20:46:41 +0200 |
---|---|---|
committer | Marian Balakowicz <m8@semihalf.com> | 2006-04-05 20:46:41 +0200 |
commit | 2fc000d756920b340945a74ec1214a34d9e84858 (patch) | |
tree | 4c63187cca9aafde96a4eab2ed6c957367a38122 /include/linux/mtd/doc2000.h | |
parent | 1707626650f2cd2c716902de5a81616d7e60c85f (diff) | |
download | u-boot-imx-2fc000d756920b340945a74ec1214a34d9e84858.zip u-boot-imx-2fc000d756920b340945a74ec1214a34d9e84858.tar.gz u-boot-imx-2fc000d756920b340945a74ec1214a34d9e84858.tar.bz2 |
Remove dependencies between DoC code and old legacy NAND driver.
Necessary defines and data structures were copied to DoC specific files
so that legacy NAND code could be entirely removed from u-boot tree
in the near future.
Diffstat (limited to 'include/linux/mtd/doc2000.h')
-rw-r--r-- | include/linux/mtd/doc2000.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/include/linux/mtd/doc2000.h b/include/linux/mtd/doc2000.h index ebf9a76..eeb1d7e 100644 --- a/include/linux/mtd/doc2000.h +++ b/include/linux/mtd/doc2000.h @@ -91,6 +91,13 @@ struct DiskOnChip; #define ADDR_PAGE 2 #define ADDR_COLUMN_PAGE 3 +struct Nand { + char floor, chip; + unsigned long curadr; + unsigned char curmode; + /* Also some erase/write/pipeline info when we get that far */ +}; + struct DiskOnChip { unsigned long physadr; unsigned long virtadr; @@ -148,4 +155,62 @@ void doc_probe(unsigned long physadr); void doc_print(struct DiskOnChip*); +/* + * Standard NAND flash commands + */ +#define NAND_CMD_READ0 0 +#define NAND_CMD_READ1 1 +#define NAND_CMD_PAGEPROG 0x10 +#define NAND_CMD_READOOB 0x50 +#define NAND_CMD_ERASE1 0x60 +#define NAND_CMD_STATUS 0x70 +#define NAND_CMD_SEQIN 0x80 +#define NAND_CMD_READID 0x90 +#define NAND_CMD_ERASE2 0xd0 +#define NAND_CMD_RESET 0xff + +/* + * NAND Flash Manufacturer ID Codes + */ +#define NAND_MFR_TOSHIBA 0x98 +#define NAND_MFR_SAMSUNG 0xec + +/* + * NAND Flash Device ID Structure + * + * Structure overview: + * + * name - Complete name of device + * + * manufacture_id - manufacturer ID code of device. + * + * model_id - model ID code of device. + * + * chipshift - total number of address bits for the device which + * is used to calculate address offsets and the total + * number of bytes the device is capable of. + * + * page256 - denotes if flash device has 256 byte pages or not. + * + * pageadrlen - number of bytes minus one needed to hold the + * complete address into the flash array. Keep in + * mind that when a read or write is done to a + * specific address, the address is input serially + * 8 bits at a time. This structure member is used + * by the read/write routines as a loop index for + * shifting the address out 8 bits at a time. + * + * erasesize - size of an erase block in the flash device. + */ +struct nand_flash_dev { + char * name; + int manufacture_id; + int model_id; + int chipshift; + char page256; + char pageadrlen; + unsigned long erasesize; + int bus16; +}; + #endif /* __MTD_DOC2000_H__ */ |