2 * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
4 * Copyright (C) 2002-2007 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.
16 #ifndef __FILEEM2K_H__
17 #define __FILEEM2K_H__
21 #define SIZE_IN_MB 128
22 //#define SIZE_IN_MB 8000
23 #define PAGE_DATA_SIZE (2048)
24 #define PAGE_SPARE_SIZE (64)
25 #define PAGE_SIZE (PAGE_DATA_SIZE + PAGE_SPARE_SIZE)
26 #define PAGES_PER_BLOCK (64)
27 #define BLOCK_DATA_SIZE (PAGE_DATA_SIZE * PAGES_PER_BLOCK)
28 #define BLOCK_SIZE (PAGES_PER_BLOCK * (PAGE_SIZE))
29 #define BLOCKS_PER_MB ((1024*1024)/BLOCK_DATA_SIZE)
30 #define SIZE_IN_BLOCKS (BLOCKS_PER_MB * SIZE_IN_MB)
34 #define SIZE_IN_MB 128
35 #define PAGE_DATA_SIZE (512)
36 #define SPARE_SIZE (16)
37 #define PAGE_SIZE (PAGE_DATA_SIZE + SPARE_SIZE)
38 #define PAGES_PER_BLOCK (32)
39 #define BLOCK_DATA_SIZE (PAGE_SIZE * PAGES_PER_BLOCK)
40 #define BLOCK_SIZE (PAGES_PER_BLOCK * (PAGE_SIZE))
41 #define BLOCKS_PER_MB ((1024*1024)/BLOCK_DATA_SIZE)
42 #define SIZE_IN_BLOCKS (BLOCKS_PER_MB * SIZE_IN_MB)
47 int yflash_GetNumberOfBlocks(void);