Re: [U-Boot] [PATCH] Pad data length for nand write

2009-02-17 Thread Derek Ou
Currently, the nand_util.c does not manipulate NAND flash page by page. It's the nand_base.c provides that level of NAND control. Implementing this properly requires changes to the existing structure. Also, adding "+length" syntax means command interface change as well. Since it's not to the

Re: [U-Boot] [PATCH] Pad data length for nand write

2009-02-17 Thread Scott Wood
Derek Ou wrote: > This routine is copied from nand_write_opts() at nand_util.c of v1.3.4. v1.3.4 had its own buffer; it did not use the caller's. > It maybe better > to pad data length and data buffer in do_nand() at cmd_nand.c. Or pass a flag to nand_write_skip_bad(). But I > don't see re

Re: [U-Boot] [PATCH] Pad data length for nand write

2009-02-17 Thread Derek Ou
This routine is copied from nand_write_opts() at nand_util.c of v1.3.4. It maybe better to pad data length and data buffer in do_nand() at cmd_nand.c. But I don't see real difference. I didn't allocate a new buffer since the data length is defined in the command arguments and I have no knowle

Re: [U-Boot] [PATCH] Pad data length for nand write

2009-02-17 Thread Wolfgang Denk
Dear Derek Ou, In message <499b03fd.7050...@siconix.com> you wrote: > > Until v1.3.4, "nand write.jffs2" supports non page-aligned data write and > pad data automatically to page alignment. As a result, we can use the > following scripts to automate downloading a file and writing it to flash. > "

Re: [U-Boot] [PATCH] Pad data length for nand write

2009-02-17 Thread Scott Wood
On Tue, Feb 17, 2009 at 10:15:07AM -0700, Derek Ou wrote: > + /* Reject writes when offset is not page aligned */ > + if ((offset & (nand->writesize - 1)) != 0 ) { No space before ')'. Better yet, just get rid of the != 0 part. > + /* now, pad data with 0xff */ > + if (page_offse

Re: [U-Boot] [PATCH] Pad data length for nand write

2009-02-17 Thread Scott Wood
Derek Ou wrote: > Sorry that my patch went out twice. I ran into smtp authentication issue > with git-send-email. Also, what is the right way to add more comments > to a patch? Should I edit the patch generated by git-format-patch or I > should just add commit title, blank line and the full comm

Re: [U-Boot] [PATCH] Pad data length for nand write

2009-02-17 Thread Derek Ou
Sorry that my patch went out twice. I ran into smtp authentication issue with git-send-email. Also, what is the right way to add more comments to a patch? Should I edit the patch generated by git-format-patch or I should just add commit title, blank line and the full commit message when I git co

Re: [U-Boot] [PATCH] Pad data length for nand write

2009-02-17 Thread Mike Frysinger
On Tuesday 17 February 2009 12:15:06 Derek Ou wrote: > Signed-off-by: Derek Ou could you document what this is actually for ? -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http:/

[U-Boot] [PATCH] Pad data length for nand write

2009-02-17 Thread Derek Ou
Signed-off-by: Derek Ou --- drivers/mtd/nand/nand_util.c | 25 ++--- 1 files changed, 18 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c index 6ba52b3..b9d292a 100644 --- a/drivers/mtd/nand/nand_util.c +++ b/drivers/mtd

[U-Boot] [PATCH] Pad data length for nand write

2009-02-17 Thread Derek Ou
Signed-off-by: Derek Ou --- drivers/mtd/nand/nand_util.c | 25 ++--- 1 files changed, 18 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c index 6ba52b3..b9d292a 100644 --- a/drivers/mtd/nand/nand_util.c +++ b/drivers/mtd