Some tinkering on test harness and st_xxx to yst_xxx changes
[yaffs2.git] / direct / yaffs_fileem2k.h
1 /*
2  * YAFFS: Yet another FFS. A NAND-flash specific file system. 
3  * yaffs_ramdisk.c: yaffs ram disk component
4  *
5  * Copyright (C) 2002 Aleph One Ltd.
6  *
7  * Created by Charles Manning <charles@aleph1.co.uk>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License version 2 as
11  * published by the Free Software Foundation.
12  *
13  */
14
15 #ifndef __FILEEM2K_H__
16 #define __FILEEM2K_H__
17
18 #if 1
19
20 #define SIZE_IN_MB 32
21 #define PAGE_DATA_SIZE (2048)
22 #define PAGE_SPARE_SIZE  (64)
23 #define PAGE_SIZE  (PAGE_DATA_SIZE + PAGE_SPARE_SIZE)
24 #define PAGES_PER_BLOCK (64)
25 #define BLOCK_DATA_SIZE (PAGE_DATA_SIZE * PAGES_PER_BLOCK)
26 #define BLOCK_SIZE (PAGES_PER_BLOCK * (PAGE_SIZE))
27 #define BLOCKS_PER_MB ((1024*1024)/BLOCK_DATA_SIZE)
28 #define SIZE_IN_BLOCKS (BLOCKS_PER_MB * SIZE_IN_MB)
29
30 #else
31
32 #define SIZE_IN_MB 128
33 #define PAGE_DATA_SIZE (512)
34 #define SPARE_SIZE  (16)
35 #define PAGE_SIZE  (PAGE_DATA_SIZE + SPARE_SIZE)
36 #define PAGES_PER_BLOCK (32)
37 #define BLOCK_DATA_SIZE (PAGE_SIZE * PAGES_PER_BLOCK)
38 #define BLOCK_SIZE (PAGES_PER_BLOCK * (PAGE_SIZE))
39 #define BLOCKS_PER_MB ((1024*1024)/BLOCK_DATA_SIZE)
40 #define SIZE_IN_BLOCKS (BLOCKS_PER_MB * SIZE_IN_MB)
41
42 #endif
43
44
45 int yflash_GetNumberOfBlocks(void);
46
47 #endif
48