projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9da2b4
)
Fix OneNAND read
author
Kyungmin Park
<kmpark@infradead.org>
Mon, 31 Mar 2008 01:40:36 +0000
(10:40 +0900)
committer
Wolfgang Denk
<wd@denx.de>
Mon, 14 Apr 2008 06:11:16 +0000
(23:11 -0700)
It should access with 16-bit instead of 8-bit
Now it uses the generic memcpy with 8-bit access. It means it reads wrong data from OneNAND.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
drivers/mtd/onenand/onenand_base.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/onenand/onenand_base.c
b/drivers/mtd/onenand/onenand_base.c
index 3b828fb62729034c8f6f5de06ed146dc1f487224..174384eab98d03131d150ce027e481189736b0ee 100644
(file)
--- a/
drivers/mtd/onenand/onenand_base.c
+++ b/
drivers/mtd/onenand/onenand_base.c
@@
-20,6
+20,19
@@
#include <asm/io.h>
#include <asm/errno.h>
+/* It should access 16-bit instead of 8-bit */
+static inline void *memcpy(void *dst, const void *src, unsigned int len)
+{
+ void *ret = dst;
+ short *d = dst;
+ const short *s = src;
+
+ len >>= 1;
+ while (len-- > 0)
+ *d++ = *s++;
+ return ret;
+}
+
static const unsigned char ffchars[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 16 */