X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Fyaffscfg.c;h=dd95a7477585d240f41f42b8ed4dd521d9f29e5a;hp=42c9dd2bbcfa3b363918d3f5b52542b0d7365992;hb=49942b13d7cfbdba72c18de0f37d16d81b4372a8;hpb=2e51ed27a28a076ee9eb870ba8c0eb09b8114b01 diff --git a/direct/yaffscfg.c b/direct/yaffscfg.c index 42c9dd2..dd95a74 100644 --- a/direct/yaffscfg.c +++ b/direct/yaffscfg.c @@ -1,5 +1,17 @@ /* - * YAFFS: Yet another FFS. A NAND-flash specific file system. + * YAFFS: Yet Another Flash File System. A NAND-flash specific file system. + * + * Copyright (C) 2002-2007 Aleph One Ltd. + * for Toby Churchill Ltd and Brightstar Engineering + * + * Created by Charles Manning + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/* * yaffscfg.c The configuration for the "direct" use of yaffs. * * This file is intended to be modified to your requirements. @@ -32,6 +44,16 @@ __u32 yaffsfs_CurrentTime(void) return 0; } +void *yaffs_malloc(size_t size) +{ + return malloc(size); +} + +void yaffs_free(void *ptr) +{ + free(ptr); +} + void yaffsfs_LocalInitialisation(void) { // Define locking semaphore. @@ -71,7 +93,7 @@ int yaffs_StartUp(void) // Set up devices // /ram - ramDev.nBytesPerChunk = 512; + ramDev.nDataBytesPerChunk = 512; ramDev.nChunksPerBlock = 32; ramDev.nReservedBlocks = 2; // Set this smaller for RAM ramDev.startBlock = 1; // Can't use block 0 @@ -85,7 +107,7 @@ int yaffs_StartUp(void) ramDev.initialiseNAND = yramdisk_InitialiseNAND; // /boot - bootDev.nBytesPerChunk = 612; + bootDev.nDataBytesPerChunk = 512; bootDev.nChunksPerBlock = 32; bootDev.nReservedBlocks = 5; bootDev.startBlock = 1; // Can't use block 0 @@ -99,7 +121,7 @@ int yaffs_StartUp(void) bootDev.initialiseNAND = yflash_InitialiseNAND; // /flash - flashDev.nBytesPerChunk = 512; + flashDev.nDataBytesPerChunk = 512; flashDev.nChunksPerBlock = 32; flashDev.nReservedBlocks = 5; flashDev.startBlock = 128; // First block after 2MB