2 * YAFFS: Yet another FFS. A NAND-flash specific file system.
\r
3 * ynandif.h: Nand interface routines for WinCE version of YAFFS.
\r
5 * Copyright (C) 2002-2003 Trimble Navigaion Ltd.
\r
7 * Created by Brad Beveridge <brad.beveridge@trimble.co.nz>
\r
8 * Modified for CE 4.x by Steve Fogle <stevef@atworkcom.com>
\r
10 * This program is free software; you can redistribute it and/or modify
\r
11 * it under the terms of the GNU Lesser General Public License version 2.1 as
\r
12 * published by the Free Software Foundation.
\r
14 * This program is distributed in the hope that it will be useful,
\r
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
\r
17 * General Public License for more details. You should have received a
\r
18 * copy of the GNU General Public License along with this program;
\r
19 * if not, write to the Free Software Foundation, Inc.,
\r
20 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
\r
23 * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
\r
25 * $Id: ynandif.h,v 1.2 2003-01-31 00:52:53 charles Exp $
\r
31 #include "yaffs_guts.h"
\r
36 unsigned char *data;
\r
37 unsigned char *spare;
\r
42 YNANDIF_WRITE = 0x59AFF,
\r
48 YNANDIF_GETPARTITIONS,
\r
57 unsigned short volName[12];
\r
58 } ynandif_partition;
\r
62 * Functions that need to be provided for YAFFS
\r
64 int ynandif_WriteChunkToNAND(yaffs_Device *dev, int chunkInNAND,const __u8 *data, yaffs_Spare *spare);
\r
65 int ynandif_ReadChunkFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *data, yaffs_Spare *spare);
\r
66 int ynandif_EraseBlockInNAND(yaffs_Device *dev, int blockNumber);
\r
67 int ynandif_InitialiseNAND(yaffs_Device *dev);
\r
68 //slf021220a begin Cleanup block driver interface
\r
69 void ynandif_DeinitialiseNAND(yaffs_Device *dev);
\r
70 //slf021220a end Cleanup block driver interface
\r
73 * Additional optional functions
\r
76 int ynandif_EraseAllBlocks(yaffs_Device *dev);
\r
77 //slf021220a begin Cleanup block driver interface
\r
78 //int ynandif_GetChipSize(unsigned char chipNumber);
\r
79 int ynandif_GetChipSize(yaffs_Device *dev, unsigned char chipNumber);
\r
80 //slf021220a end Cleanup block driver interface
\r