sim: frv: delete UART device support
authorMike Frysinger <vapier@gentoo.org>
Tue, 24 Mar 2015 01:51:35 +0000 (21:51 -0400)
committerMike Frysinger <vapier@gentoo.org>
Tue, 24 Mar 2015 01:58:12 +0000 (21:58 -0400)
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
sim/frv/devices.c

index 6957942f4a58ce0325d9580be74c5e7486b6ff9c..1ae319ca978e4b025be5a2c3b1f884dd30140a41 100644 (file)
@@ -1,3 +1,9 @@
+2015-03-23  Mike Frysinger  <vapier@gentoo.org>
+
+       * devices.c: Delete dv-sockser.h include.
+       (device_io_read_buffer): Delete uart code.
+       (device_io_write_buffer): Likewise.
+
 2015-03-23  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 5a3336dc8ce56f9a88ae5cb794dba3a43171c99e..e417963130efcaa203c3470a0b0e32f1f4598372 100644 (file)
@@ -21,10 +21,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #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;
 }