X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftest-framework%2Fyaffs_m18_drv.c;h=9a8ee49e903044d97e80ed4121e3ecdb38686cbf;hp=eca97ecaa1889b6d1f4ad8c83cfcfcc4b6b3a2d7;hb=597a9ecaee1fbcad4be10382dca705522a2d5a82;hpb=1c778c3bd4a01a5cad8db6ff52c24c99a3e9fa0e diff --git a/direct/test-framework/yaffs_m18_drv.c b/direct/test-framework/yaffs_m18_drv.c index eca97ec..9a8ee49 100644 --- a/direct/test-framework/yaffs_m18_drv.c +++ b/direct/test-framework/yaffs_m18_drv.c @@ -92,10 +92,10 @@ static struct nor_sim *nor_sim; static u32 *Block2Addr(struct yaffs_dev *dev, int blockNumber) { - u32 addr; + u8 *addr; dev=dev; - addr = (u32) DEVICE_BASE; + addr = (u8*) DEVICE_BASE; addr += blockNumber * BLOCK_SIZE_IN_BYTES; return (u32 *) addr; @@ -103,9 +103,9 @@ static u32 *Block2Addr(struct yaffs_dev *dev, int blockNumber) static u32 *Block2FormatAddr(struct yaffs_dev *dev,int blockNumber) { - u32 addr; + u8 *addr; - addr = (u32) Block2Addr(dev,blockNumber); + addr = (u8*) Block2Addr(dev,blockNumber); addr += FORMAT_OFFSET; return (u32 *)addr; @@ -115,12 +115,12 @@ static u32 *Chunk2DataAddr(struct yaffs_dev *dev,int chunk_id) { unsigned block; unsigned chunkInBlock; - u32 addr; + u8 *addr; block = chunk_id/dev->param.chunks_per_block; chunkInBlock = chunk_id % dev->param.chunks_per_block; - addr = (u32) Block2Addr(dev,block); + addr = (u8*) Block2Addr(dev,block); addr += chunkInBlock * DATA_BYTES_PER_CHUNK; return (u32 *)addr; @@ -130,12 +130,12 @@ static u32 *Chunk2SpareAddr(struct yaffs_dev *dev,int chunk_id) { unsigned block; unsigned chunkInBlock; - u32 addr; + u8 *addr; block = chunk_id/dev->param.chunks_per_block; chunkInBlock = chunk_id % dev->param.chunks_per_block; - addr = (u32) Block2Addr(dev,block); + addr = (u8*) Block2Addr(dev,block); addr += SPARE_AREA_OFFSET; addr += chunkInBlock * (SPARE_BYTES_PER_CHUNK + M18_SKIP); return (u32 *)addr;