projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tests will now delete the emfiles with make clean
[yaffs2.git]
/
mtdemul
/
nandemul2k.c
diff --git
a/mtdemul/nandemul2k.c
b/mtdemul/nandemul2k.c
index 7efa8d45d6e383f0764413d14e7d5f341014a99a..8b10f52c8e0df261630167a730c9225b167877ca 100644
(file)
--- a/
mtdemul/nandemul2k.c
+++ b/
mtdemul/nandemul2k.c
@@
-1,8
+1,7
@@
/*
* YAFFS: Yet Another Flash File System. 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
+ * Copyright (C) 2002-2018 Aleph One Ltd.
*
* Created by Charles Manning <charles@aleph1.co.uk>
*
*
* Created by Charles Manning <charles@aleph1.co.uk>
*
@@
-66,7
+65,7
@@
static struct mtd_info nandemul2k_mtd;
typedef struct
{
typedef struct
{
-
__
u8 data[PAGE_TOTAL_SIZE]; // Data + spare
+ u8 data[PAGE_TOTAL_SIZE]; // Data + spare
int empty; // is this empty?
} nandemul_Page;
int empty; // is this empty?
} nandemul_Page;
@@
-99,32
+98,32
@@
static void nandemul_yield(int n)
}
}
-static void nandemul2k_Read(void *buffer, int page, int start, int n
B
ytes)
+static void nandemul2k_Read(void *buffer, int page, int start, int n
_b
ytes)
{
int pg = page%PAGES_PER_BLOCK;
int blk = page/PAGES_PER_BLOCK;
{
int pg = page%PAGES_PER_BLOCK;
int blk = page/PAGES_PER_BLOCK;
- if(buffer && n
B
ytes > 0)
+ if(buffer && n
_b
ytes > 0)
{
{
- memcpy(buffer,&ned.block[blk]->page[pg]->data[start],n
B
ytes);
+ memcpy(buffer,&ned.block[blk]->page[pg]->data[start],n
_b
ytes);
}
}
}
}
-static void nandemul2k_Program(const void *buffer, int page, int start, int n
B
ytes)
+static void nandemul2k_Program(const void *buffer, int page, int start, int n
_b
ytes)
{
int pg = page%PAGES_PER_BLOCK;
int blk = page/PAGES_PER_BLOCK;
{
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];
p = &ned.block[blk]->page[pg]->data[start];
- while(buffer && n
B
ytes>0)
+ while(buffer && n
_b
ytes>0)
{
*p = *p & *b;
p++;
b++;
{
*p = *p & *b;
p++;
b++;
- n
B
ytes--;
+ n
_b
ytes--;
}
}
}
}
@@
-255,7
+254,7
@@
int nandemul2k_GetNumberOfBlocks(void) {return nandemul2k_CalcNBlocks();}
-static int nandemul2k_ReadId(
__u8 *vendorId, __
u8 *deviceId)
+static int nandemul2k_ReadId(
u8 *vendorId,
u8 *deviceId)
{
*vendorId = 'Y';
*deviceId = '2';
{
*vendorId = 'Y';
*deviceId = '2';
@@
-264,7
+263,7
@@
static int nandemul2k_ReadId(__u8 *vendorId, __u8 *deviceId)
}
}
-static int nandemul2k_ReadStatus(
__
u8 *status)
+static int nandemul2k_ReadStatus(u8 *status)
{
*status = 0;
return 1;
{
*status = 0;
return 1;