[U-Boot] [PATCH] Fix OneNAND read_oob/write_oob functions compatability
Kyungmin Park
kmpark at infradead.org
Tue Aug 19 01:07:09 CEST 2008
On Tue, Aug 19, 2008 at 7:08 AM, Scott Wood <scottwood at freescale.com> wrote:
> On Sat, Aug 16, 2008 at 02:32:16PM +0900, Kyungmin Park wrote:
>> Also sync with kernel OneNAND codes
>
> Either you synced with a rather old version of the kernel's
> onenand_base.c, or you left out the Nokia/Adrian Hunter copyright and
> attribution.
Okay I add the latter.
>
>> diff --git a/common/cmd_onenand.c b/common/cmd_onenand.c
>> index 5e2062b..8d87b78 100644
>> --- a/common/cmd_onenand.c
>> +++ b/common/cmd_onenand.c
>> @@ -85,15 +85,25 @@ int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
>> ulong addr = simple_strtoul(argv[2], NULL, 16);
>> ulong ofs = simple_strtoul(argv[3], NULL, 16);
>> size_t len = simple_strtoul(argv[4], NULL, 16);
>> - size_t retlen = 0;
>> int oob = strncmp(argv[1], "read.oob", 8) ? 0 : 1;
>> + struct mtd_oob_ops ops;
>> +
>> + ops.mode = MTD_OOB_PLACE;
>
> I think this should be MTD_OOB_RAW.
What's the difference? In the code it can't support the MTD_OOB_RAW case.
>
>> diff --git a/include/onenand_uboot.h b/include/onenand_uboot.h
>> index 4260ee7..2886a6f 100644
>> --- a/include/onenand_uboot.h
>> +++ b/include/onenand_uboot.h
>> @@ -15,24 +15,18 @@
>> #define __UBOOT_ONENAND_H
>>
>> #include <linux/types.h>
>> -
>> -struct kvec {
>> - void *iov_base;
>> - size_t iov_len;
>> -};
>> -
>> -typedef int spinlock_t;
>> -typedef int wait_queue_head_t;
>> +#include <mtd_uboot.h>
>
> This is the second time you've posted this patch without adding
> mtd_uboot.h...
>
Sorry for bothering you, I will fix it.
Thank you,
Kyungmin Park
More information about the U-Boot
mailing list