summaryrefslogtreecommitdiff
path: root/drivers/serial/sandbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/sandbox.c')
-rw-r--r--drivers/serial/sandbox.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c
index ffff5e1..51fd871 100644
--- a/drivers/serial/sandbox.c
+++ b/drivers/serial/sandbox.c
@@ -11,9 +11,11 @@
*/
#include <common.h>
+#include <lcd.h>
#include <os.h>
#include <serial.h>
#include <linux/compiler.h>
+#include <asm/state.h>
/*
*
@@ -30,7 +32,10 @@ static unsigned int serial_buf_read;
static int sandbox_serial_init(void)
{
- os_tty_raw(0);
+ struct sandbox_state *state = state_get_current();
+
+ if (state->term_raw != STATE_TERM_COOKED)
+ os_tty_raw(0, state->term_raw == STATE_TERM_RAW_WITH_SIGS);
return 0;
}
@@ -60,6 +65,9 @@ static int sandbox_serial_tstc(void)
ssize_t count;
os_usleep(100);
+#ifdef CONFIG_LCD
+ lcd_sync();
+#endif
if (next_index == serial_buf_read)
return 1; /* buffer full */