Re: [U-Boot] [PATCH V4 01/11] imximage: mx53 needs transfer length a multiple of 512

2012-12-03 Thread Stefano Babic
On 29/11/2012 06:28, Wolfgang Denk wrote: > Dear Troy Kisky, > > In message <50b6cb79.4030...@boundarydevices.com> you wrote: >> >> Would you like to see the Linux way of ALIGN, or ROUND? > > Do you align some buffer or similar, or do you round (up) a size? > >> Now, back to the other topic you

Re: [U-Boot] [PATCH V4 01/11] imximage: mx53 needs transfer length a multiple of 512

2012-12-03 Thread Stefano Babic
On 28/11/2012 22:35, Wolfgang Denk wrote: > Dear Troy Kisky, > > In message <50b67c99.8080...@boundarydevices.com> you wrote: >> >> But the reason I didn't include common.h is because of the target specific >> files that it also includes. Would you mind if I moved > > Why would these hurt? They

Re: [U-Boot] [PATCH V4 01/11] imximage: mx53 needs transfer length a multiple of 512

2012-11-28 Thread Wolfgang Denk
Dear Troy Kisky, In message <50b6cb79.4030...@boundarydevices.com> you wrote: > > Would you like to see the Linux way of ALIGN, or ROUND? Do you align some buffer or similar, or do you round (up) a size? > Now, back to the other topic you raised. Should I apply the bug work-around > for all vers

Re: [U-Boot] [PATCH V4 01/11] imximage: mx53 needs transfer length a multiple of 512

2012-11-28 Thread Troy Kisky
On 11/28/2012 2:35 PM, Wolfgang Denk wrote: Dear Troy Kisky, In message <50b67c99.8080...@boundarydevices.com> you wrote: But the reason I didn't include common.h is because of the target specific files that it also includes. Would you mind if I moved Why would these hurt? They don't anywhere

Re: [U-Boot] [PATCH V4 01/11] imximage: mx53 needs transfer length a multiple of 512

2012-11-28 Thread Wolfgang Denk
Dear Troy Kisky, In message <50b67c99.8080...@boundarydevices.com> you wrote: > > But the reason I didn't include common.h is because of the target specific > files that it also includes. Would you mind if I moved Why would these hurt? They don't anywhere else. > and included common_macro.h ins

Re: [U-Boot] [PATCH V4 01/11] imximage: mx53 needs transfer length a multiple of 512

2012-11-28 Thread Troy Kisky
On 11/28/2012 1:25 PM, Wolfgang Denk wrote: Dear Troy Kisky, In message <50b65583.1070...@boundarydevices.com> you wrote: Oddly enough, I originally called it ROUND_UP. But then I saw these lines in include/common.h And why didn't you find (and use) ROUND() in include/common.h ? Best regards,

Re: [U-Boot] [PATCH V4 01/11] imximage: mx53 needs transfer length a multiple of 512

2012-11-28 Thread Wolfgang Denk
Dear Troy Kisky, In message <50b65583.1070...@boundarydevices.com> you wrote: > > Oddly enough, I originally called it ROUND_UP. But then I saw these lines > in include/common.h And why didn't you find (and use) ROUND() in include/common.h ? Best regards, Wolfgang Denk -- DENX Software Engine

Re: [U-Boot] [PATCH V4 01/11] imximage: mx53 needs transfer length a multiple of 512

2012-11-28 Thread Troy Kisky
On 11/28/2012 2:27 AM, Wolfgang Denk wrote: Dear Troy Kisky, In message <1354066303-29762-2-git-send-email-troy.ki...@boundarydevices.com> you wrote: The mx53 ROM will truncate the length at a multiple of 512. Transferring too much is not a problem, so round up. What about other SoCs using th

Re: [U-Boot] [PATCH V4 01/11] imximage: mx53 needs transfer length a multiple of 512

2012-11-28 Thread Troy Kisky
On 11/28/2012 2:27 AM, Wolfgang Denk wrote: Dear Troy Kisky, In message <1354066303-29762-2-git-send-email-troy.ki...@boundarydevices.com> you wrote: The mx53 ROM will truncate the length at a multiple of 512. Transferring too much is not a problem, so round up. What about other SoCs using th

Re: [U-Boot] [PATCH V4 01/11] imximage: mx53 needs transfer length a multiple of 512

2012-11-28 Thread Liu Hui-R64343
>-Original Message- >From: Troy Kisky [mailto:troy.ki...@boundarydevices.com] >Sent: Wednesday, November 28, 2012 9:32 AM >To: sba...@denx.de >Cc: dirk.be...@googlemail.com; u-boot@lists.denx.de; Liu Hui-R64343; >feste...@gmail.com; Troy Kisky >Subject: [PATCH V4 01/11] imximage: mx53 needs

Re: [U-Boot] [PATCH V4 01/11] imximage: mx53 needs transfer length a multiple of 512

2012-11-28 Thread Wolfgang Denk
Dear Troy Kisky, In message <1354066303-29762-2-git-send-email-troy.ki...@boundarydevices.com> you wrote: > The mx53 ROM will truncate the length at a multiple of 512. > Transferring too much is not a problem, so round up. What about other SoCs using the same code? > +#define ALIGN(a, b) (((a)

[U-Boot] [PATCH V4 01/11] imximage: mx53 needs transfer length a multiple of 512

2012-11-27 Thread Troy Kisky
The mx53 ROM will truncate the length at a multiple of 512. Transferring too much is not a problem, so round up. Problem reported by Stefano Babic. Signed-off-by: Troy Kisky --- tools/imximage.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/imximage.c b/t