Hi,
I am porting YAFFS for an embedded system. Right now I am writing flash
driver. *The flash has 512 B page and no OOB region*. As can be seen from
"yaffs_guts.h" the implementer has to provide the following functions to
YAFFS:
int (*drv_write_chunk_fn) (struct yaffs_dev *dev, int nand_chunk,
const u8 *data, int data_len,
const u8 *oob, int oob_len);
int (*drv_read_chunk_fn) (struct yaffs_dev *dev, int nand_chunk,
u8 *data, int data_len,
u8 *oob, int oob_len,
enum yaffs_ecc_result *ecc_result);
int (*drv_erase_fn) (struct yaffs_dev *dev, int block_no);
int (*drv_mark_bad_fn) (struct yaffs_dev *dev, int block_no);
int (*drv_check_bad_fn) (struct yaffs_dev *dev, int block_no);
int (*drv_initialise_fn) (struct yaffs_dev *dev);
int (*drv_deinitialise_fn) (struct yaffs_dev *dev);
Please, could smbd. explain to me how to implement a write function. Since
my flash has no OOB region, should I reserve some place for OOB in the next
page or completely ommit writing OOB data. I want to use YAFFS1. Does
YAFFS1 require OOB? Should I also implement drv_mark_bad_fn and
drv_check_bad_fn
functions for YAFFS1 or leave them empty? And is there any compile time
option which makes sure that only YAFFS1 functionality is compiled? I have
seed in yaffs_dev.param there is option is_yaffs2. So is it sufficient only
to set this to 0 to have only YAFFS1 functionality?