* [U-Boot] [PATCH] [U-BOOT] Zoom2 & Zoom3: introduced a macro to use a different buffer size when compiling for Zoom2 or Zoom3.
@ 2010-08-30 23:58 Aldo Cedillo
2010-09-09 18:22 ` Wolfgang Denk
0 siblings, 1 reply; 3+ messages in thread
From: Aldo Cedillo @ 2010-08-30 23:58 UTC (permalink / raw)
To: u-boot
From: Aldo Brett Cedillo Martinez <aldo.cedillo@ti.com>
Zoom2 and Zoom2 used to hang with "md" command. It was due to a problem
with a buffer size in print_buffer() function. A macro was introduced
to use a different buffer size in case of compiling for Zoom2 and Zoom3.
Jeff could you please test it on your board with the Zoom3 initial support
patch.
Sandeep I also saw this behaving in Zoom2, so maybe I could send a patch
that introduces only Zoom2 change, which could be introduced in TI tree
without waiting for Zoom3 initial support for going mainline.
Signed-off-by: Aldo Brett Cedillo Martinez <aldo.cedillo@ti.com>
---
lib/display_options.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/lib/display_options.c b/lib/display_options.c
index 20319e6..99e43f7 100644
--- a/lib/display_options.c
+++ b/lib/display_options.c
@@ -101,7 +101,12 @@ void print_size(unsigned long long size, const char *s)
#define DEFAULT_LINE_LENGTH_BYTES (16)
int print_buffer (ulong addr, void* data, uint width, uint count, uint linelen)
{
+#if defined(CONFIG_OMAP3_ZOOM2) || defined(CONFIG_OMAP3_ZOOM3)
+ uint8_t linebuf[DEFAULT_LINE_LENGTH_BYTES];
+#else
uint8_t linebuf[MAX_LINE_LENGTH_BYTES + 1];
+#endif /* CONFIG_OMAP3 */
+
uint32_t *uip = (void*)linebuf;
uint16_t *usp = (void*)linebuf;
uint8_t *ucp = (void*)linebuf;
--
1.6.3.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] [U-BOOT] Zoom2 & Zoom3: introduced a macro to use a different buffer size when compiling for Zoom2 or Zoom3.
2010-08-30 23:58 [U-Boot] [PATCH] [U-BOOT] Zoom2 & Zoom3: introduced a macro to use a different buffer size when compiling for Zoom2 or Zoom3 Aldo Cedillo
@ 2010-09-09 18:22 ` Wolfgang Denk
2010-09-14 2:35 ` Martinez, Aldo
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Denk @ 2010-09-09 18:22 UTC (permalink / raw)
To: u-boot
Dear Aldo Cedillo,
In message <1283212736-32760-1-git-send-email-aldocedillo@ti.com> you wrote:
> From: Aldo Brett Cedillo Martinez <aldo.cedillo@ti.com>
>
> Zoom2 and Zoom2 used to hang with "md" command. It was due to a problem
> with a buffer size in print_buffer() function. A macro was introduced
> to use a different buffer size in case of compiling for Zoom2 and Zoom3.
NAK to this patch.
Forst, I thinkt he problem is not with buffer size, but with buffer
alignemnt as observed elasewhere, so most probably Albert's
"display_buffer: fix misaligned buffer" patch will fix this issue,
too.
> #define DEFAULT_LINE_LENGTH_BYTES (16)
> int print_buffer (ulong addr, void* data, uint width, uint count, uint linelen)
> {
> +#if defined(CONFIG_OMAP3_ZOOM2) || defined(CONFIG_OMAP3_ZOOM3)
> + uint8_t linebuf[DEFAULT_LINE_LENGTH_BYTES];
> +#else
> uint8_t linebuf[MAX_LINE_LENGTH_BYTES + 1];
> +#endif /* CONFIG_OMAP3 */
Second, it is broken to use DEFAULT_LINE_LENGTH_BYTES in the
declaration of the buffer, but then use MAX_LINE_LENGTH_BYTES+1 when
accessing it.
[Actually I think we should kill one of these defines.]
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Overflow on /dev/null, please empty the bit bucket.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] [U-BOOT] Zoom2 & Zoom3: introduced a macro to use a different buffer size when compiling for Zoom2 or Zoom3.
2010-09-09 18:22 ` Wolfgang Denk
@ 2010-09-14 2:35 ` Martinez, Aldo
0 siblings, 0 replies; 3+ messages in thread
From: Martinez, Aldo @ 2010-09-14 2:35 UTC (permalink / raw)
To: u-boot
Dear Wolfgang,
> > Zoom2 and Zoom2 used to hang with "md" command. It was due to a problem
> > with a buffer size in print_buffer() function. A macro was introduced
> > to use a different buffer size in case of compiling for Zoom2 and Zoom3.
>
>
> NAK to this patch.
>
> Forst, I thinkt he problem is not with buffer size, but with buffer
> alignemnt as observed elasewhere, so most probably Albert's
> "display_buffer: fix misaligned buffer" patch will fix this issue,
> too.
You are right, the problem is the buffer alignment, and the patch you mentioned solves this problem.
>
> Best regards,
>
> Wolfgang Denk
Thanks for the comments and best regards,
Aldo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-09-14 2:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-30 23:58 [U-Boot] [PATCH] [U-BOOT] Zoom2 & Zoom3: introduced a macro to use a different buffer size when compiling for Zoom2 or Zoom3 Aldo Cedillo
2010-09-09 18:22 ` Wolfgang Denk
2010-09-14 2:35 ` Martinez, Aldo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.