From c906b4b52b1617e5c65c9a6ff4de98d688d2a597 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 23 Mar 2015 21:51:35 -0400 Subject: [PATCH] sim: frv: delete UART device support This looks like copy & paste logic from the m32r port (and history suggests this as well). Since building with hw & device support enabled leads to failures: sim/frv/devices.c: In function 'device_io_read_buffer': sim/frv/devices.c:39:15: error: 'UART_INCHAR_ADDR' undeclared (first use in this function) Delete it entirely. We leave device support in place as it is used to flush the scache. --- sim/frv/ChangeLog | 6 ++++++ sim/frv/devices.c | 37 ------------------------------------- 2 files changed, 6 insertions(+), 37 deletions(-) diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog index 6957942f4a5..1ae319ca978 100644 --- a/sim/frv/ChangeLog +++ b/sim/frv/ChangeLog @@ -1,3 +1,9 @@ +2015-03-23 Mike Frysinger + + * devices.c: Delete dv-sockser.h include. + (device_io_read_buffer): Delete uart code. + (device_io_write_buffer): Likewise. + 2015-03-23 Mike Frysinger * configure: Regenerate. diff --git a/sim/frv/devices.c b/sim/frv/devices.c index 5a3336dc8ce..e417963130e 100644 --- a/sim/frv/devices.c +++ b/sim/frv/devices.c @@ -21,10 +21,6 @@ along with this program. If not, see . */ #include "sim-main.h" -#ifdef HAVE_DV_SOCKSER -#include "dv-sockser.h" -#endif - device frv_devices; int @@ -35,31 +31,6 @@ device_io_read_buffer (device *me, void *source, int space, if (STATE_ENVIRONMENT (sd) != OPERATING_ENVIRONMENT) return nr_bytes; -#ifdef HAVE_DV_SOCKSER - if (addr == UART_INCHAR_ADDR) - { - int c = dv_sockser_read (sd); - if (c == -1) - return 0; - *(char *) source = c; - return 1; - } - if (addr == UART_STATUS_ADDR) - { - int status = dv_sockser_status (sd); - unsigned char *p = source; - p[0] = 0; - p[1] = (((status & DV_SOCKSER_INPUT_EMPTY) -#ifdef UART_INPUT_READY0 - ? UART_INPUT_READY : 0) -#else - ? 0 : UART_INPUT_READY) -#endif - + ((status & DV_SOCKSER_OUTPUT_EMPTY) ? UART_OUTPUT_READY : 0)); - return 2; - } -#endif - return nr_bytes; } @@ -81,14 +52,6 @@ device_io_write_buffer (device *me, const void *source, int space, if (STATE_ENVIRONMENT (sd) != OPERATING_ENVIRONMENT) return nr_bytes; -#if HAVE_DV_SOCKSER - if (addr == UART_OUTCHAR_ADDR) - { - int rc = dv_sockser_write (sd, *(char *) source); - return rc == 1; - } -#endif - return nr_bytes; } -- 2.30.2