nand.h (859f24350e6e4313626f85161dd03f025a4dac59) | nand.h (cfa460adfdefcc30d104e1a9ee44994ee349bb7b) |
---|---|
1/* 2 * (C) Copyright 2005 3 * 2N Telekomunikace, a.s. <www.2n.cz> 4 * Ladislav Michl <michl@2n.cz> 5 * 6 * See file CREDITS for list of people who contributed to this 7 * project. 8 * --- 70 unchanged lines hidden (view full) --- 79 int noecc; /* write without ecc */ 80 int writeoob; /* image contains oob data */ 81 int pad; /* pad to page size */ 82 int blockalign; /* 1|2|4 set multiple of eraseblocks 83 * to align to */ 84}; 85 86typedef struct nand_write_options nand_write_options_t; | 1/* 2 * (C) Copyright 2005 3 * 2N Telekomunikace, a.s. <www.2n.cz> 4 * Ladislav Michl <michl@2n.cz> 5 * 6 * See file CREDITS for list of people who contributed to this 7 * project. 8 * --- 70 unchanged lines hidden (view full) --- 79 int noecc; /* write without ecc */ 80 int writeoob; /* image contains oob data */ 81 int pad; /* pad to page size */ 82 int blockalign; /* 1|2|4 set multiple of eraseblocks 83 * to align to */ 84}; 85 86typedef struct nand_write_options nand_write_options_t; |
87typedef struct mtd_oob_ops mtd_oob_ops_t; |
|
87 88struct nand_read_options { 89 u_char *buffer; /* memory block in which read image is written*/ 90 ulong length; /* number of bytes to read */ 91 ulong offset; /* start address in NAND */ 92 int quiet; /* don't display progress messages */ 93 int readoob; /* put oob data in image */ 94}; --- 7 unchanged lines hidden (view full) --- 102 int jffs2; /* if true: format for jffs2 usage 103 * (write appropriate cleanmarker blocks) */ 104 int scrub; /* if true, really clean NAND by erasing 105 * bad blocks (UNSAFE) */ 106}; 107 108typedef struct nand_erase_options nand_erase_options_t; 109 | 88 89struct nand_read_options { 90 u_char *buffer; /* memory block in which read image is written*/ 91 ulong length; /* number of bytes to read */ 92 ulong offset; /* start address in NAND */ 93 int quiet; /* don't display progress messages */ 94 int readoob; /* put oob data in image */ 95}; --- 7 unchanged lines hidden (view full) --- 103 int jffs2; /* if true: format for jffs2 usage 104 * (write appropriate cleanmarker blocks) */ 105 int scrub; /* if true, really clean NAND by erasing 106 * bad blocks (UNSAFE) */ 107}; 108 109typedef struct nand_erase_options nand_erase_options_t; 110 |
110int nand_write_opts(nand_info_t *meminfo, const nand_write_options_t *opts); | 111int nand_write_opts(nand_info_t *mtd, loff_t to, mtd_oob_ops_t *ops); |
111 112int nand_read_opts(nand_info_t *meminfo, const nand_read_options_t *opts); 113int nand_erase_opts(nand_info_t *meminfo, const nand_erase_options_t *opts); 114 115#define NAND_LOCK_STATUS_TIGHT 0x01 116#define NAND_LOCK_STATUS_LOCK 0x02 117#define NAND_LOCK_STATUS_UNLOCK 0x04 118 119int nand_lock( nand_info_t *meminfo, int tight ); 120int nand_unlock( nand_info_t *meminfo, ulong start, ulong length ); 121int nand_get_lock_status(nand_info_t *meminfo, ulong offset); 122 123#ifdef CFG_NAND_SELECT_DEVICE 124void board_nand_select_device(struct nand_chip *nand, int chip); 125#endif 126 127#endif /* !CFG_NAND_LEGACY */ 128#endif | 112 113int nand_read_opts(nand_info_t *meminfo, const nand_read_options_t *opts); 114int nand_erase_opts(nand_info_t *meminfo, const nand_erase_options_t *opts); 115 116#define NAND_LOCK_STATUS_TIGHT 0x01 117#define NAND_LOCK_STATUS_LOCK 0x02 118#define NAND_LOCK_STATUS_UNLOCK 0x04 119 120int nand_lock( nand_info_t *meminfo, int tight ); 121int nand_unlock( nand_info_t *meminfo, ulong start, ulong length ); 122int nand_get_lock_status(nand_info_t *meminfo, ulong offset); 123 124#ifdef CFG_NAND_SELECT_DEVICE 125void board_nand_select_device(struct nand_chip *nand, int chip); 126#endif 127 128#endif /* !CFG_NAND_LEGACY */ 129#endif |