]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/serial/sandbox.c
mtd: nand: omap: fix error-codes returned from omap-elm driver
[karo-tx-uboot.git] / drivers / serial / sandbox.c
index ffff5e149774bb6950ec6f9097ea1c6730fa5261..51fd871dff9b3fbfd939ac4cd6d54c88bb01502f 100644 (file)
  */
 
 #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 */