]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - sim/frv/devices.c
sim: frv: delete UART device support
[thirdparty/binutils-gdb.git] / sim / frv / devices.c
CommitLineData
b34f6357 1/* frv device support
32d0add0 2 Copyright (C) 1998-2015 Free Software Foundation, Inc.
b34f6357
DB
3 Contributed by Red Hat.
4
5This file is part of the GNU simulators.
6
7This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
4744ac1b
JB
9the Free Software Foundation; either version 3 of the License, or
10(at your option) any later version.
b34f6357
DB
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
4744ac1b
JB
17You should have received a copy of the GNU General Public License
18along with this program. If not, see <http://www.gnu.org/licenses/>. */
b34f6357
DB
19
20/* ??? All of this is just to get something going. wip! */
21
22#include "sim-main.h"
23
b34f6357
DB
24device frv_devices;
25
26int
27device_io_read_buffer (device *me, void *source, int space,
28 address_word addr, unsigned nr_bytes,
29 SIM_DESC sd, SIM_CPU *cpu, sim_cia cia)
30{
31 if (STATE_ENVIRONMENT (sd) != OPERATING_ENVIRONMENT)
32 return nr_bytes;
33
b34f6357
DB
34 return nr_bytes;
35}
36
37int
38device_io_write_buffer (device *me, const void *source, int space,
39 address_word addr, unsigned nr_bytes,
40 SIM_DESC sd, SIM_CPU *cpu, sim_cia cia)
41{
42
43#if WITH_SCACHE
44 if (addr == MCCR_ADDR)
45 {
46 if ((*(const char *) source & MCCR_CP) != 0)
47 scache_flush (sd);
48 return nr_bytes;
49 }
50#endif
51
52 if (STATE_ENVIRONMENT (sd) != OPERATING_ENVIRONMENT)
53 return nr_bytes;
54
b34f6357
DB
55 return nr_bytes;
56}
57
fb0cc53e 58void device_error (device *me, const char *message, ...) {}