
On sandbox, if you add a printf() to malloc() for debugging, the output will eventually cause the screen to scroll. Since lcd_sync() calls SDL functions which allocate memory, and this happens before we have updated console_curr_row, U-Boot gets locked in an infinite loop.
Flip the order of the two statements to avoid this.
Signed-off-by: Simon Glass sjg@chromium.org ---
common/lcd_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/lcd_console.c b/common/lcd_console.c index 8bf83b9..ab48fd6 100644 --- a/common/lcd_console.c +++ b/common/lcd_console.c @@ -120,8 +120,8 @@ static void console_scrollup(void) *ppix++ = bg_color; } #endif - lcd_sync(); console_curr_row -= rows; + lcd_sync(); }
static inline void console_back(void)