/*
* YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
*
- * Copyright (C) 2002-2007 Aleph One Ltd.
+ * Copyright (C) 2002-2010 Aleph One Ltd.
* for Toby Churchill Ltd and Brightstar Engineering
*
* Created by Charles Manning <charles@aleph1.co.uk>
typedef struct
{
- __u8 data[PAGE_TOTAL_SIZE]; // Data + spare
+ u8 data[PAGE_TOTAL_SIZE]; // Data + spare
int empty; // is this empty?
} nandemul_Page;
}
-static void nandemul2k_Read(void *buffer, int page, int start, int nBytes)
+static void nandemul2k_Read(void *buffer, int page, int start, int n_bytes)
{
int pg = page%PAGES_PER_BLOCK;
int blk = page/PAGES_PER_BLOCK;
- if(buffer && nBytes > 0)
+ if(buffer && n_bytes > 0)
{
- memcpy(buffer,&ned.block[blk]->page[pg]->data[start],nBytes);
+ memcpy(buffer,&ned.block[blk]->page[pg]->data[start],n_bytes);
}
}
-static void nandemul2k_Program(const void *buffer, int page, int start, int nBytes)
+static void nandemul2k_Program(const void *buffer, int page, int start, int n_bytes)
{
int pg = page%PAGES_PER_BLOCK;
int blk = page/PAGES_PER_BLOCK;
- __u8 *p;
- __u8 *b = (__u8 *)buffer;
+ u8 *p;
+ u8 *b = (u8 *)buffer;
p = &ned.block[blk]->page[pg]->data[start];
- while(buffer && nBytes>0)
+ while(buffer && n_bytes>0)
{
*p = *p & *b;
p++;
b++;
- nBytes--;
+ n_bytes--;
}
}
-static int nandemul2k_ReadId(__u8 *vendorId, __u8 *deviceId)
+static int nandemul2k_ReadId(u8 *vendorId, u8 *deviceId)
{
*vendorId = 'Y';
*deviceId = '2';
}
-static int nandemul2k_ReadStatus(__u8 *status)
+static int nandemul2k_ReadStatus(u8 *status)
{
*status = 0;
return 1;