OLD | NEW |
1 /* Blackfin device support. | 1 /* Blackfin device support. |
2 | 2 |
3 Copyright (C) 2010-2012 Free Software Foundation, Inc. | 3 Copyright (C) 2010-2012 Free Software Foundation, Inc. |
4 Contributed by Analog Devices, Inc. | 4 Contributed by Analog Devices, Inc. |
5 | 5 |
6 This file is part of simulators. | 6 This file is part of simulators. |
7 | 7 |
8 This program is free software; you can redistribute it and/or modify | 8 This program is free software; you can redistribute it and/or modify |
9 it under the terms of the GNU General Public License as published by | 9 it under the terms of the GNU General Public License as published by |
10 the Free Software Foundation; either version 3 of the License, or | 10 the Free Software Foundation; either version 3 of the License, or |
11 (at your option) any later version. | 11 (at your option) any later version. |
12 | 12 |
13 This program is distributed in the hope that it will be useful, | 13 This program is distributed in the hope that it will be useful, |
14 but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 GNU General Public License for more details. | 16 GNU General Public License for more details. |
17 | 17 |
18 You should have received a copy of the GNU General Public License | 18 You should have received a copy of the GNU General Public License |
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */ | 19 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
20 | 20 |
21 #include "config.h" | 21 #include "config.h" |
22 | 22 |
23 #include "sim-main.h" | 23 #include "sim-main.h" |
24 #include "sim-hw.h" | 24 #include "sim-hw.h" |
25 #include "hw-device.h" | 25 #include "hw-device.h" |
| 26 #include "devices.h" |
26 #include "dv-bfin_cec.h" | 27 #include "dv-bfin_cec.h" |
27 #include "dv-bfin_mmu.h" | 28 #include "dv-bfin_mmu.h" |
28 | 29 |
29 static void | 30 static void |
30 bfin_mmr_invalid (struct hw *me, SIM_CPU *cpu, address_word addr, | 31 bfin_mmr_invalid (struct hw *me, SIM_CPU *cpu, address_word addr, |
31 unsigned nr_bytes, bool write) | 32 unsigned nr_bytes, bool write) |
32 { | 33 { |
33 if (!cpu) | 34 if (!cpu) |
34 cpu = hw_system_cpu (me); | 35 cpu = hw_system_cpu (me); |
35 | 36 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 calls device_error() follows it with sim_hw_abort(). Since the | 155 calls device_error() follows it with sim_hw_abort(). Since the |
155 device isn't bound to the system yet, we can't call any common | 156 device isn't bound to the system yet, we can't call any common |
156 hardware error funcs on it or we'll hit a NULL pointer. */ | 157 hardware error funcs on it or we'll hit a NULL pointer. */ |
157 } | 158 } |
158 | 159 |
159 unsigned int dv_get_bus_num (struct hw *me) | 160 unsigned int dv_get_bus_num (struct hw *me) |
160 { | 161 { |
161 const hw_unit *unit = hw_unit_address (me); | 162 const hw_unit *unit = hw_unit_address (me); |
162 return unit->cells[unit->nr_cells - 1]; | 163 return unit->cells[unit->nr_cells - 1]; |
163 } | 164 } |
OLD | NEW |