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 128 21//#define SIZE_IN_MB 8000 22#define PAGE_DATA_SIZE (2048) 23#define PAGE_SPARE_SIZE (64) 24#define PAGE_SIZE (PAGE_DATA_SIZE + PAGE_SPARE_SIZE) 25#define PAGES_PER_BLOCK (64) 26#define BLOCK_DATA_SIZE (PAGE_DATA_SIZE * PAGES_PER_BLOCK) 27#define BLOCK_SIZE (PAGES_PER_BLOCK * (PAGE_SIZE)) 28#define BLOCKS_PER_MB ((1024*1024)/BLOCK_DATA_SIZE) 29#define SIZE_IN_BLOCKS (BLOCKS_PER_MB * SIZE_IN_MB) 30 31#else 32 33#define SIZE_IN_MB 128 34#define PAGE_DATA_SIZE (512) 35#define SPARE_SIZE (16) 36#define PAGE_SIZE (PAGE_DATA_SIZE + SPARE_SIZE) 37#define PAGES_PER_BLOCK (32) 38#define BLOCK_DATA_SIZE (PAGE_SIZE * PAGES_PER_BLOCK) 39#define BLOCK_SIZE (PAGES_PER_BLOCK * (PAGE_SIZE)) 40#define BLOCKS_PER_MB ((1024*1024)/BLOCK_DATA_SIZE) 41#define SIZE_IN_BLOCKS (BLOCKS_PER_MB * SIZE_IN_MB) 42 43#endif 44 45 46int yflash_GetNumberOfBlocks(void); 47 48#endif 49 50