mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
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.
This commit is contained in:
parent
9993d01233
commit
c906b4b52b
@ -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.
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user