2 * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
4 * Copyright (C) 2002-2011 Aleph One Ltd.
5 * for Toby Churchill Ltd and Brightstar Engineering
7 * Created by Charles Manning <charles@aleph1.co.uk>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU Lesser General Public License version 2.1 as
11 * published by the Free Software Foundation.
13 * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
20 #include "yaffs_guts.h"
22 struct ynandif_Geometry {
27 unsigned pagesPerBlock;
32 int (*initialise)(struct yaffs_dev *dev);
33 int (*deinitialise)(struct yaffs_dev *dev);
35 int (*readChunk) (struct yaffs_dev *dev,
42 /* ECC status is set to 0 for OK, 1 for fixed, -1 for unfixed. */
44 int (*writeChunk)(struct yaffs_dev *dev,
46 const unsigned char *data,
48 const unsigned char *spare,
49 unsigned spareLength);
51 int (*eraseBlock)(struct yaffs_dev *dev, unsigned blockId);
53 int (*checkBlockOk)(struct yaffs_dev *dev, unsigned blockId);
54 int (*markBlockBad)(struct yaffs_dev *dev, unsigned blockId);
61 yaffs_add_dev_from_geometry(const YCHAR *name,
62 const struct ynandif_Geometry *geometry);