mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 05:31:32 +00:00
Fix OneNAND read
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>
This commit is contained in:
parent
a9da2b4107
commit
77e475cc0e
1 changed files with 13 additions and 0 deletions
|
@ -20,6 +20,19 @@
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/errno.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[] = {
|
static const unsigned char ffchars[] = {
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 16 */
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 16 */
|
||||||
|
|
Loading…
Add table
Reference in a new issue