mps2.c (d3f5433c7b4aa2d59c6de4175743f4126e181aea) mps2.c (9bca0edb282de0007a4f068d9d20f3e3c3aadef7)
1/*
2 * ARM V2M MPS2 board emulation.
3 *
4 * Copyright (c) 2017 Linaro Limited
5 * Written by Peter Maydell
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 or

--- 216 unchanged lines hidden (view full) ---

225 object_property_set_bool(orgate, true, "realized", &error_fatal);
226 orgate_dev = DEVICE(orgate);
227 qdev_connect_gpio_out(orgate_dev, 0, qdev_get_gpio_in(armv7m, 12));
228
229 for (i = 0; i < 5; i++) {
230 static const hwaddr uartbase[] = {0x40004000, 0x40005000,
231 0x40006000, 0x40007000,
232 0x40009000};
1/*
2 * ARM V2M MPS2 board emulation.
3 *
4 * Copyright (c) 2017 Linaro Limited
5 * Written by Peter Maydell
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 or

--- 216 unchanged lines hidden (view full) ---

225 object_property_set_bool(orgate, true, "realized", &error_fatal);
226 orgate_dev = DEVICE(orgate);
227 qdev_connect_gpio_out(orgate_dev, 0, qdev_get_gpio_in(armv7m, 12));
228
229 for (i = 0; i < 5; i++) {
230 static const hwaddr uartbase[] = {0x40004000, 0x40005000,
231 0x40006000, 0x40007000,
232 0x40009000};
233 Chardev *uartchr = i < MAX_SERIAL_PORTS ? serial_hds[i] : NULL;
233 Chardev *uartchr = i < MAX_SERIAL_PORTS ? serial_hd(i) : NULL;
234 /* RX irq number; TX irq is always one greater */
235 static const int uartirq[] = {0, 2, 4, 18, 20};
236 qemu_irq txovrint = NULL, rxovrint = NULL;
237
238 if (i < 3) {
239 txovrint = qdev_get_gpio_in(orgate_dev, i * 2);
240 rxovrint = qdev_get_gpio_in(orgate_dev, i * 2 + 1);
241 }

--- 23 unchanged lines hidden (view full) ---

265 qdev_connect_gpio_out(orgate_dev, 0, qdev_get_gpio_in(armv7m, 12));
266
267 for (i = 0; i < 5; i++) {
268 /* system irq numbers for the combined tx/rx for each UART */
269 static const int uart_txrx_irqno[] = {0, 2, 45, 46, 56};
270 static const hwaddr uartbase[] = {0x40004000, 0x40005000,
271 0x4002c000, 0x4002d000,
272 0x4002e000};
234 /* RX irq number; TX irq is always one greater */
235 static const int uartirq[] = {0, 2, 4, 18, 20};
236 qemu_irq txovrint = NULL, rxovrint = NULL;
237
238 if (i < 3) {
239 txovrint = qdev_get_gpio_in(orgate_dev, i * 2);
240 rxovrint = qdev_get_gpio_in(orgate_dev, i * 2 + 1);
241 }

--- 23 unchanged lines hidden (view full) ---

265 qdev_connect_gpio_out(orgate_dev, 0, qdev_get_gpio_in(armv7m, 12));
266
267 for (i = 0; i < 5; i++) {
268 /* system irq numbers for the combined tx/rx for each UART */
269 static const int uart_txrx_irqno[] = {0, 2, 45, 46, 56};
270 static const hwaddr uartbase[] = {0x40004000, 0x40005000,
271 0x4002c000, 0x4002d000,
272 0x4002e000};
273 Chardev *uartchr = i < MAX_SERIAL_PORTS ? serial_hds[i] : NULL;
273 Chardev *uartchr = i < MAX_SERIAL_PORTS ? serial_hd(i) : NULL;
274 Object *txrx_orgate;
275 DeviceState *txrx_orgate_dev;
276
277 txrx_orgate = object_new(TYPE_OR_IRQ);
278 object_property_set_int(txrx_orgate, 2, "num-lines", &error_fatal);
279 object_property_set_bool(txrx_orgate, true, "realized",
280 &error_fatal);
281 txrx_orgate_dev = DEVICE(txrx_orgate);

--- 101 unchanged lines hidden ---
274 Object *txrx_orgate;
275 DeviceState *txrx_orgate_dev;
276
277 txrx_orgate = object_new(TYPE_OR_IRQ);
278 object_property_set_int(txrx_orgate, 2, "num-lines", &error_fatal);
279 object_property_set_bool(txrx_orgate, true, "realized",
280 &error_fatal);
281 txrx_orgate_dev = DEVICE(txrx_orgate);

--- 101 unchanged lines hidden ---