Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-09-07 Thread Wolfgang Denk
Dear Reinhard Meyer, In message <4c7b7c52.1040...@emk-elektronik.de> you wrote: > Reinhard Meyer schrieb: > >> + uint32_t linebuf[MAX_LINE_LENGTH_BYTES/4 + 1]; > >>> uint32_t *uip = (void*)linebuf; > >>> uint16_t *usp = (void*)linebuf; > >>> uint8_t *ucp = (void*)linebuf; > > I personally p

Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-09-07 Thread Wolfgang Denk
Dear Reinhard Meyer, In message <4c7b7864.2080...@emk-elektronik.de> you wrote: > > One could add a comment above like: > /* >* it is mandatory that linebuf stays uint32_t aligned >* since we are going to slide along it with a uint32_t >* pointer >*/ >

Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-09-02 Thread Mike Frysinger
On Tuesday, August 31, 2010 02:04:53 Reinhard Meyer wrote: > making the change to the union, I also realized that > > /* Copy from memory into linebuf and print hex values */ > for (i = 0; i < linelen; i++) { > uint32_t x; > if (width == 4) > x = lb.u32[i] = *(volatile ui

Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-09-02 Thread Wolfgang Denk
Dear Reinhard Meyer, In message <4c7c9b85.6080...@emk-elektronik.de> you wrote: > > making the change to the union, I also realized that > > /* Copy from memory into linebuf and print hex values */ > for (i = 0; i < linelen; i++) { > uint32_t x; > if (width == 4) > x =

Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-09-01 Thread Detlev Zundel
Hi Reinhard, > making the change to the union, I also realized that > > /* Copy from memory into linebuf and print hex values */ > for (i = 0; i < linelen; i++) { > uint32_t x; > if (width == 4) > x = lb.u32[i] = *(volatile uint32_t *)data; > else if (width == 2) >

Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-08-30 Thread Reinhard Meyer
Hi, making the change to the union, I also realized that /* Copy from memory into linebuf and print hex values */ for (i = 0; i < linelen; i++) { uint32_t x; if (width == 4) x = lb.u32[i] = *(volatile uint32_t *)data; else if (width == 2) x

Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-08-30 Thread Albert ARIBAUD
Le 31/08/2010 00:29, Detlev Zundel a écrit : > Hi Albert, > >> Le 30/08/2010 18:47, Detlev Zundel a écrit : >>> Hi Reinhard, >>> Detlev Zundel schrieb: >> Detlev, regarding the discussion I would only point out that we have to >> be sure that such kind of patch will be merged in t

Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-08-30 Thread Detlev Zundel
Hi Reinhard, > I'll provide a patch tomorrow, Thanks! > right now I am not near a LinuX system ;) Well at least you have the comfort a somewhat sensible mail user agent there ;) Cheers Detlev -- ... what [Microsoft] Exchange provides is *like* email, but it is *not* email. Once you start t

Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-08-30 Thread Detlev Zundel
Hi Albert, > Le 30/08/2010 18:47, Detlev Zundel a écrit : >> Hi Reinhard, >> >>> Detlev Zundel schrieb: >>> > Detlev, regarding the discussion I would only point out that we have to > be sure that such kind of patch will be merged in the current release. > It would be a real pity if a

Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-08-30 Thread Reinhard Meyer
On 30.08.2010 20:03, Albert ARIBAUD wrote: > Le 30/08/2010 18:47, Detlev Zundel a écrit : >> Hi Reinhard, >> >>> Detlev Zundel schrieb: >>> > Detlev, regarding the discussion I would only point out that we have to > be sure that such kind of patch will be merged in the current release.

Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-08-30 Thread Albert ARIBAUD
Le 30/08/2010 18:47, Detlev Zundel a écrit : > Hi Reinhard, > >> Detlev Zundel schrieb: >> Detlev, regarding the discussion I would only point out that we have to be sure that such kind of patch will be merged in the current release. It would be a real pity if a new official realease

Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-08-30 Thread Detlev Zundel
Hi Reinhard, > Detlev Zundel schrieb: > >>> Detlev, regarding the discussion I would only point out that we have to >>> be sure that such kind of patch will be merged in the current release. >>> It would be a real pity if a new official realease is published and then >>> even a simple "md" command

Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-08-30 Thread Reinhard Meyer
Detlev Zundel schrieb: >> Detlev, regarding the discussion I would only point out that we have to >> be sure that such kind of patch will be merged in the current release. >> It would be a real pity if a new official realease is published and then >> even a simple "md" command does not work on ARM

Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-08-30 Thread Detlev Zundel
Hi Stefano, > Detlev, regarding the discussion I would only point out that we have to > be sure that such kind of patch will be merged in the current release. > It would be a real pity if a new official realease is published and then > even a simple "md" command does not work on ARM. I don't see

Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-08-30 Thread Reinhard Meyer
Albert ARIBAUD schrieb: > Le 30/08/2010 12:31, Stefano Babic a écrit : >> Detlev Zundel wrote: >>> Hi Reinhard, >>> >> Hi Reinhard, hi Detlev, >> should make the buffer an union: union { uint32_t ui[MAX.../4+1]; uint16_t us[MAX.../2+1]; uint8_t uc[MAX...+1];

Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-08-30 Thread Albert ARIBAUD
Le 30/08/2010 12:31, Stefano Babic a écrit : > Detlev Zundel wrote: >> Hi Reinhard, >> > Hi Reinhard, hi Detlev, > >>> should make the buffer an union: >>> >>> union { >>> uint32_t ui[MAX.../4+1]; >>> uint16_t us[MAX.../2+1]; >>> uint8_t uc[MAX...+1]; >>> } linebuf; >> >> That also sou

Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-08-30 Thread Stefano Babic
Detlev Zundel wrote: > Hi Reinhard, > Hi Reinhard, hi Detlev, >> should make the buffer an union: >> >> union { >> uint32_t ui[MAX.../4+1]; >> uint16_t us[MAX.../2+1]; >> uint8_t uc[MAX...+1]; >> } linebuf; > > That also sounds good indeed - it even better documents the intention

Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-08-30 Thread Detlev Zundel
Hi Reinhard, > Reinhard Meyer schrieb: >>> + uint32_t linebuf[MAX_LINE_LENGTH_BYTES/4 + 1]; uint32_t *uip = (void*)linebuf; uint16_t *usp = (void*)linebuf; uint8_t *ucp = (void*)linebuf; >> I personally prefer this above an attribute. Its disputeable but I prefer >> to do

Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-08-30 Thread Detlev Zundel
Hi Reinhard, > Hi Detlev, >>> diff --git a/lib/display_options.c b/lib/display_options.c >>> index 20319e6..9048a8a 100644 >>> --- a/lib/display_options.c >>> +++ b/lib/display_options.c >>> @@ -101,7 +101,7 @@ void print_size(unsigned long long size, const char *s) >>> #define DEFAULT_LINE_LENGT

Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-08-30 Thread Reinhard Meyer
Reinhard Meyer schrieb: >> +uint32_t linebuf[MAX_LINE_LENGTH_BYTES/4 + 1]; >>> uint32_t *uip = (void*)linebuf; >>> uint16_t *usp = (void*)linebuf; >>> uint8_t *ucp = (void*)linebuf; > I personally prefer this above an attribute. Its disputeable but I prefer > to do things with "norm

Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-08-30 Thread Reinhard Meyer
Hi Detlev, >> diff --git a/lib/display_options.c b/lib/display_options.c >> index 20319e6..9048a8a 100644 >> --- a/lib/display_options.c >> +++ b/lib/display_options.c >> @@ -101,7 +101,7 @@ void print_size(unsigned long long size, const char *s) >> #define DEFAULT_LINE_LENGTH_BYTES (16) >> int p

Re: [U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-08-30 Thread Detlev Zundel
Hi Reinhard, > Signed-off-by: Reinhard Meyer > --- > lib/display_options.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/lib/display_options.c b/lib/display_options.c > index 20319e6..9048a8a 100644 > --- a/lib/display_options.c > +++ b/lib/display_options.c > @@

[U-Boot] [PATCH] display_buffer: fix misaligned buffer

2010-08-27 Thread Reinhard Meyer
Signed-off-by: Reinhard Meyer --- lib/display_options.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/display_options.c b/lib/display_options.c index 20319e6..9048a8a 100644 --- a/lib/display_options.c +++ b/lib/display_options.c @@ -101,7 +101,7 @@ void print_size