summaryrefslogtreecommitdiffstats
path: root/hw/arm
diff options
context:
space:
mode:
Diffstat (limited to 'hw/arm')
-rw-r--r--hw/arm/allwinner-a10.c4
-rw-r--r--hw/arm/aspeed_soc.c4
-rw-r--r--hw/arm/bcm2835_peripherals.c4
-rw-r--r--hw/arm/digic.c2
-rw-r--r--hw/arm/fsl-imx25.c2
-rw-r--r--hw/arm/fsl-imx31.c2
-rw-r--r--hw/arm/fsl-imx6.c4
-rw-r--r--hw/arm/fsl-imx7.c2
-rw-r--r--hw/arm/highbank.c2
-rw-r--r--hw/arm/integratorcp.c4
-rw-r--r--hw/arm/kzm.c4
-rw-r--r--hw/arm/mps2-tz.c2
-rw-r--r--hw/arm/mps2.c4
-rw-r--r--hw/arm/msf2-soc.c4
-rw-r--r--hw/arm/musicpal.c8
-rw-r--r--hw/arm/omap1.c6
-rw-r--r--hw/arm/omap2.c10
-rw-r--r--hw/arm/pxa2xx.c16
-rw-r--r--hw/arm/realview.c8
-rw-r--r--hw/arm/stellaris.c2
-rw-r--r--hw/arm/stm32f205_soc.c2
-rw-r--r--hw/arm/strongarm.c2
-rw-r--r--hw/arm/versatilepb.c8
-rw-r--r--hw/arm/vexpress.c8
-rw-r--r--hw/arm/virt.c4
-rw-r--r--hw/arm/xilinx_zynq.c4
-rw-r--r--hw/arm/xlnx-zynqmp.c2
27 files changed, 62 insertions, 62 deletions
diff --git a/hw/arm/allwinner-a10.c b/hw/arm/allwinner-a10.c
index 5dbbacb7e8..c5fbc654f2 100644
--- a/hw/arm/allwinner-a10.c
+++ b/hw/arm/allwinner-a10.c
@@ -108,9 +108,9 @@ static void aw_a10_realize(DeviceState *dev, Error **errp)
sysbus_mmio_map(SYS_BUS_DEVICE(&s->sata), 0, AW_A10_SATA_BASE);
sysbus_connect_irq(SYS_BUS_DEVICE(&s->sata), 0, s->irq[56]);
- /* FIXME use a qdev chardev prop instead of serial_hds[] */
+ /* FIXME use a qdev chardev prop instead of serial_hd() */
serial_mm_init(get_system_memory(), AW_A10_UART0_REG_BASE, 2, s->irq[1],
- 115200, serial_hds[0], DEVICE_NATIVE_ENDIAN);
+ 115200, serial_hd(0), DEVICE_NATIVE_ENDIAN);
}
static void aw_a10_class_init(ObjectClass *oc, void *data)
diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c
index 407f10d0d4..1955a892f4 100644
--- a/hw/arm/aspeed_soc.c
+++ b/hw/arm/aspeed_soc.c
@@ -228,11 +228,11 @@ static void aspeed_soc_realize(DeviceState *dev, Error **errp)
sysbus_mmio_map(SYS_BUS_DEVICE(&s->scu), 0, ASPEED_SOC_SCU_BASE);
/* UART - attach an 8250 to the IO space as our UART5 */
- if (serial_hds[0]) {
+ if (serial_hd(0)) {
qemu_irq uart5 = qdev_get_gpio_in(DEVICE(&s->vic), uart_irqs[4]);
serial_mm_init(get_system_memory(),
ASPEED_SOC_IOMEM_BASE + ASPEED_SOC_UART_5_BASE, 2,
- uart5, 38400, serial_hds[0], DEVICE_LITTLE_ENDIAN);
+ uart5, 38400, serial_hd(0), DEVICE_LITTLE_ENDIAN);
}
/* I2C */
diff --git a/hw/arm/bcm2835_peripherals.c b/hw/arm/bcm2835_peripherals.c
index 13b63970d7..6be7660e8c 100644
--- a/hw/arm/bcm2835_peripherals.c
+++ b/hw/arm/bcm2835_peripherals.c
@@ -166,7 +166,7 @@ static void bcm2835_peripherals_realize(DeviceState *dev, Error **errp)
sysbus_pass_irq(SYS_BUS_DEVICE(s), SYS_BUS_DEVICE(&s->ic));
/* UART0 */
- qdev_prop_set_chr(DEVICE(s->uart0), "chardev", serial_hds[0]);
+ qdev_prop_set_chr(DEVICE(s->uart0), "chardev", serial_hd(0));
object_property_set_bool(OBJECT(s->uart0), true, "realized", &err);
if (err) {
error_propagate(errp, err);
@@ -179,7 +179,7 @@ static void bcm2835_peripherals_realize(DeviceState *dev, Error **errp)
qdev_get_gpio_in_named(DEVICE(&s->ic), BCM2835_IC_GPU_IRQ,
INTERRUPT_UART));
/* AUX / UART1 */
- qdev_prop_set_chr(DEVICE(&s->aux), "chardev", serial_hds[1]);
+ qdev_prop_set_chr(DEVICE(&s->aux), "chardev", serial_hd(1));
object_property_set_bool(OBJECT(&s->aux), true, "realized", &err);
if (err) {
diff --git a/hw/arm/digic.c b/hw/arm/digic.c
index 6184020985..726abb9b48 100644
--- a/hw/arm/digic.c
+++ b/hw/arm/digic.c
@@ -85,7 +85,7 @@ static void digic_realize(DeviceState *dev, Error **errp)
sysbus_mmio_map(sbd, 0, DIGIC4_TIMER_BASE(i));
}
- qdev_prop_set_chr(DEVICE(&s->uart), "chardev", serial_hds[0]);
+ qdev_prop_set_chr(DEVICE(&s->uart), "chardev", serial_hd(0));
object_property_set_bool(OBJECT(&s->uart), true, "realized", &err);
if (err != NULL) {
error_propagate(errp, err);
diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c
index d7d064e5ce..9731833fa5 100644
--- a/hw/arm/fsl-imx25.c
+++ b/hw/arm/fsl-imx25.c
@@ -118,7 +118,7 @@ static void fsl_imx25_realize(DeviceState *dev, Error **errp)
};
if (i < MAX_SERIAL_PORTS) {
- qdev_prop_set_chr(DEVICE(&s->uart[i]), "chardev", serial_hds[i]);
+ qdev_prop_set_chr(DEVICE(&s->uart[i]), "chardev", serial_hd(i));
}
object_property_set_bool(OBJECT(&s->uart[i]), true, "realized", &err);
diff --git a/hw/arm/fsl-imx31.c b/hw/arm/fsl-imx31.c
index e6c788049d..8509915200 100644
--- a/hw/arm/fsl-imx31.c
+++ b/hw/arm/fsl-imx31.c
@@ -107,7 +107,7 @@ static void fsl_imx31_realize(DeviceState *dev, Error **errp)
};
if (i < MAX_SERIAL_PORTS) {
- qdev_prop_set_chr(DEVICE(&s->uart[i]), "chardev", serial_hds[i]);
+ qdev_prop_set_chr(DEVICE(&s->uart[i]), "chardev", serial_hd(i));
}
object_property_set_bool(OBJECT(&s->uart[i]), true, "realized", &err);
diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c
index ea14de33c6..535ad5888b 100644
--- a/hw/arm/fsl-imx6.c
+++ b/hw/arm/fsl-imx6.c
@@ -189,7 +189,7 @@ static void fsl_imx6_realize(DeviceState *dev, Error **errp)
};
if (i < MAX_SERIAL_PORTS) {
- qdev_prop_set_chr(DEVICE(&s->uart[i]), "chardev", serial_hds[i]);
+ qdev_prop_set_chr(DEVICE(&s->uart[i]), "chardev", serial_hd(i));
}
object_property_set_bool(OBJECT(&s->uart[i]), true, "realized", &err);
@@ -438,7 +438,7 @@ static void fsl_imx6_class_init(ObjectClass *oc, void *data)
dc->realize = fsl_imx6_realize;
dc->desc = "i.MX6 SOC";
- /* Reason: Uses serial_hds[] in the realize() function */
+ /* Reason: Uses serial_hd() in the realize() function */
dc->user_creatable = false;
}
diff --git a/hw/arm/fsl-imx7.c b/hw/arm/fsl-imx7.c
index 390b4310e6..2848d76d3c 100644
--- a/hw/arm/fsl-imx7.c
+++ b/hw/arm/fsl-imx7.c
@@ -391,7 +391,7 @@ static void fsl_imx7_realize(DeviceState *dev, Error **errp)
if (i < MAX_SERIAL_PORTS) {
- qdev_prop_set_chr(DEVICE(&s->uart[i]), "chardev", serial_hds[i]);
+ qdev_prop_set_chr(DEVICE(&s->uart[i]), "chardev", serial_hd(i));
}
object_property_set_bool(OBJECT(&s->uart[i]), true, "realized",
diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c
index 88326d1bfd..6d42fce2c3 100644
--- a/hw/arm/highbank.c
+++ b/hw/arm/highbank.c
@@ -342,7 +342,7 @@ static void calxeda_init(MachineState *machine, enum cxmachines machine_id)
busdev = SYS_BUS_DEVICE(dev);
sysbus_mmio_map(busdev, 0, 0xfff34000);
sysbus_connect_irq(busdev, 0, pic[18]);
- pl011_create(0xfff36000, pic[20], serial_hds[0]);
+ pl011_create(0xfff36000, pic[20], serial_hd(0));
dev = qdev_create(NULL, TYPE_HIGHBANK_REGISTERS);
qdev_init_nofail(dev);
diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c
index 58b40efc19..4eceebb9ea 100644
--- a/hw/arm/integratorcp.c
+++ b/hw/arm/integratorcp.c
@@ -631,8 +631,8 @@ static void integratorcp_init(MachineState *machine)
sysbus_create_varargs("integrator_pit", 0x13000000,
pic[5], pic[6], pic[7], NULL);
sysbus_create_simple("pl031", 0x15000000, pic[8]);
- pl011_create(0x16000000, pic[1], serial_hds[0]);
- pl011_create(0x17000000, pic[2], serial_hds[1]);
+ pl011_create(0x16000000, pic[1], serial_hd(0));
+ pl011_create(0x17000000, pic[2], serial_hd(1));
icp = sysbus_create_simple(TYPE_ICP_CONTROL_REGS, 0xcb000000,
qdev_get_gpio_in(sic, 3));
sysbus_create_simple("pl050_keyboard", 0x18000000, pic[3]);
diff --git a/hw/arm/kzm.c b/hw/arm/kzm.c
index f9c2228e31..864c7bd411 100644
--- a/hw/arm/kzm.c
+++ b/hw/arm/kzm.c
@@ -121,10 +121,10 @@ static void kzm_init(MachineState *machine)
qdev_get_gpio_in(DEVICE(&s->soc.avic), 52));
}
- if (serial_hds[2]) { /* touchscreen */
+ if (serial_hd(2)) { /* touchscreen */
serial_mm_init(get_system_memory(), KZM_FPGA_ADDR+0x10, 0,
qdev_get_gpio_in(DEVICE(&s->soc.avic), 52),
- 14745600, serial_hds[2], DEVICE_NATIVE_ENDIAN);
+ 14745600, serial_hd(2), DEVICE_NATIVE_ENDIAN);
}
kzm_binfo.ram_size = machine->ram_size;
diff --git a/hw/arm/mps2-tz.c b/hw/arm/mps2-tz.c
index 8c86cffa9e..4ae4a5cb2a 100644
--- a/hw/arm/mps2-tz.c
+++ b/hw/arm/mps2-tz.c
@@ -172,7 +172,7 @@ static MemoryRegion *make_uart(MPS2TZMachineState *mms, void *opaque,
{
CMSDKAPBUART *uart = opaque;
int i = uart - &mms->uart[0];
- Chardev *uartchr = i < MAX_SERIAL_PORTS ? serial_hds[i] : NULL;
+ Chardev *uartchr = i < MAX_SERIAL_PORTS ? serial_hd(i) : NULL;
int rxirqno = i * 2;
int txirqno = i * 2 + 1;
int combirqno = i + 10;
diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c
index 694fb36866..eb550fad34 100644
--- a/hw/arm/mps2.c
+++ b/hw/arm/mps2.c
@@ -230,7 +230,7 @@ static void mps2_common_init(MachineState *machine)
static const hwaddr uartbase[] = {0x40004000, 0x40005000,
0x40006000, 0x40007000,
0x40009000};
- Chardev *uartchr = i < MAX_SERIAL_PORTS ? serial_hds[i] : NULL;
+ Chardev *uartchr = i < MAX_SERIAL_PORTS ? serial_hd(i) : NULL;
/* RX irq number; TX irq is always one greater */
static const int uartirq[] = {0, 2, 4, 18, 20};
qemu_irq txovrint = NULL, rxovrint = NULL;
@@ -270,7 +270,7 @@ static void mps2_common_init(MachineState *machine)
static const hwaddr uartbase[] = {0x40004000, 0x40005000,
0x4002c000, 0x4002d000,
0x4002e000};
- Chardev *uartchr = i < MAX_SERIAL_PORTS ? serial_hds[i] : NULL;
+ Chardev *uartchr = i < MAX_SERIAL_PORTS ? serial_hd(i) : NULL;
Object *txrx_orgate;
DeviceState *txrx_orgate_dev;
diff --git a/hw/arm/msf2-soc.c b/hw/arm/msf2-soc.c
index f68df56b97..75c44adf7d 100644
--- a/hw/arm/msf2-soc.c
+++ b/hw/arm/msf2-soc.c
@@ -138,10 +138,10 @@ static void m2sxxx_soc_realize(DeviceState *dev_soc, Error **errp)
system_clock_scale = NANOSECONDS_PER_SECOND / s->m3clk;
for (i = 0; i < MSF2_NUM_UARTS; i++) {
- if (serial_hds[i]) {
+ if (serial_hd(i)) {
serial_mm_init(get_system_memory(), uart_addr[i], 2,
qdev_get_gpio_in(armv7m, uart_irq[i]),
- 115200, serial_hds[i], DEVICE_NATIVE_ENDIAN);
+ 115200, serial_hd(i), DEVICE_NATIVE_ENDIAN);
}
}
diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
index 38d7322a19..c807010e83 100644
--- a/hw/arm/musicpal.c
+++ b/hw/arm/musicpal.c
@@ -1610,13 +1610,13 @@ static void musicpal_init(MachineState *machine)
pic[MP_TIMER2_IRQ], pic[MP_TIMER3_IRQ],
pic[MP_TIMER4_IRQ], NULL);
- if (serial_hds[0]) {
+ if (serial_hd(0)) {
serial_mm_init(address_space_mem, MP_UART1_BASE, 2, pic[MP_UART1_IRQ],
- 1825000, serial_hds[0], DEVICE_NATIVE_ENDIAN);
+ 1825000, serial_hd(0), DEVICE_NATIVE_ENDIAN);
}
- if (serial_hds[1]) {
+ if (serial_hd(1)) {
serial_mm_init(address_space_mem, MP_UART2_BASE, 2, pic[MP_UART2_IRQ],
- 1825000, serial_hds[1], DEVICE_NATIVE_ENDIAN);
+ 1825000, serial_hd(1), DEVICE_NATIVE_ENDIAN);
}
/* Register flash */
diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c
index b3a23a83d1..24673abfca 100644
--- a/hw/arm/omap1.c
+++ b/hw/arm/omap1.c
@@ -3963,21 +3963,21 @@ struct omap_mpu_state_s *omap310_mpu_init(MemoryRegion *system_memory,
omap_findclk(s, "uart1_ck"),
s->drq[OMAP_DMA_UART1_TX], s->drq[OMAP_DMA_UART1_RX],
"uart1",
- serial_hds[0]);
+ serial_hd(0));
s->uart[1] = omap_uart_init(0xfffb0800,
qdev_get_gpio_in(s->ih[1], OMAP_INT_UART2),
omap_findclk(s, "uart2_ck"),
omap_findclk(s, "uart2_ck"),
s->drq[OMAP_DMA_UART2_TX], s->drq[OMAP_DMA_UART2_RX],
"uart2",
- serial_hds[0] ? serial_hds[1] : NULL);
+ serial_hd(0) ? serial_hd(1) : NULL);
s->uart[2] = omap_uart_init(0xfffb9800,
qdev_get_gpio_in(s->ih[0], OMAP_INT_UART3),
omap_findclk(s, "uart3_ck"),
omap_findclk(s, "uart3_ck"),
s->drq[OMAP_DMA_UART3_TX], s->drq[OMAP_DMA_UART3_RX],
"uart3",
- serial_hds[0] && serial_hds[1] ? serial_hds[2] : NULL);
+ serial_hd(0) && serial_hd(1) ? serial_hd(2) : NULL);
s->dpll[0] = omap_dpll_init(system_memory, 0xfffecf00,
omap_findclk(s, "dpll1"));
diff --git a/hw/arm/omap2.c b/hw/arm/omap2.c
index 647b119ba9..80663533e1 100644
--- a/hw/arm/omap2.c
+++ b/hw/arm/omap2.c
@@ -2349,7 +2349,7 @@ struct omap_mpu_state_s *omap2420_mpu_init(MemoryRegion *sysmem,
s->drq[OMAP24XX_DMA_UART1_TX],
s->drq[OMAP24XX_DMA_UART1_RX],
"uart1",
- serial_hds[0]);
+ serial_hd(0));
s->uart[1] = omap2_uart_init(sysmem, omap_l4ta(s->l4, 20),
qdev_get_gpio_in(s->ih[0],
OMAP_INT_24XX_UART2_IRQ),
@@ -2358,7 +2358,7 @@ struct omap_mpu_state_s *omap2420_mpu_init(MemoryRegion *sysmem,
s->drq[OMAP24XX_DMA_UART2_TX],
s->drq[OMAP24XX_DMA_UART2_RX],
"uart2",
- serial_hds[0] ? serial_hds[1] : NULL);
+ serial_hd(0) ? serial_hd(1) : NULL);
s->uart[2] = omap2_uart_init(sysmem, omap_l4ta(s->l4, 21),
qdev_get_gpio_in(s->ih[0],
OMAP_INT_24XX_UART3_IRQ),
@@ -2367,7 +2367,7 @@ struct omap_mpu_state_s *omap2420_mpu_init(MemoryRegion *sysmem,
s->drq[OMAP24XX_DMA_UART3_TX],
s->drq[OMAP24XX_DMA_UART3_RX],
"uart3",
- serial_hds[0] && serial_hds[1] ? serial_hds[2] : NULL);
+ serial_hd(0) && serial_hd(1) ? serial_hd(2) : NULL);
s->gptimer[0] = omap_gp_timer_init(omap_l4ta(s->l4, 7),
qdev_get_gpio_in(s->ih[0], OMAP_INT_24XX_GPTIMER1),
@@ -2519,8 +2519,8 @@ struct omap_mpu_state_s *omap2420_mpu_init(MemoryRegion *sysmem,
omap_sti_init(omap_l4ta(s->l4, 18), sysmem, 0x54000000,
qdev_get_gpio_in(s->ih[0], OMAP_INT_24XX_STI),
omap_findclk(s, "emul_ck"),
- serial_hds[0] && serial_hds[1] && serial_hds[2] ?
- serial_hds[3] : NULL);
+ serial_hd(0) && serial_hd(1) && serial_hd(2) ?
+ serial_hd(3) : NULL);
s->eac = omap_eac_init(omap_l4ta(s->l4, 32),
qdev_get_gpio_in(s->ih[0], OMAP_INT_24XX_EAC_IRQ),
diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c
index 5805a2c858..928a0431d6 100644
--- a/hw/arm/pxa2xx.c
+++ b/hw/arm/pxa2xx.c
@@ -2106,21 +2106,21 @@ PXA2xxState *pxa270_init(MemoryRegion *address_space,
qdev_get_gpio_in(s->dma, PXA2XX_TX_RQ_MMCI));
for (i = 0; pxa270_serial[i].io_base; i++) {
- if (serial_hds[i]) {
+ if (serial_hd(i)) {
serial_mm_init(address_space, pxa270_serial[i].io_base, 2,
qdev_get_gpio_in(s->pic, pxa270_serial[i].irqn),
- 14857000 / 16, serial_hds[i],
+ 14857000 / 16, serial_hd(i),
DEVICE_NATIVE_ENDIAN);
} else {
break;
}
}
- if (serial_hds[i])
+ if (serial_hd(i))
s->fir = pxa2xx_fir_init(address_space, 0x40800000,
qdev_get_gpio_in(s->pic, PXA2XX_PIC_ICP),
qdev_get_gpio_in(s->dma, PXA2XX_RX_RQ_ICP),
qdev_get_gpio_in(s->dma, PXA2XX_TX_RQ_ICP),
- serial_hds[i]);
+ serial_hd(i));
s->lcd = pxa2xx_lcdc_init(address_space, 0x44000000,
qdev_get_gpio_in(s->pic, PXA2XX_PIC_LCD));
@@ -2231,21 +2231,21 @@ PXA2xxState *pxa255_init(MemoryRegion *address_space, unsigned int sdram_size)
qdev_get_gpio_in(s->dma, PXA2XX_TX_RQ_MMCI));
for (i = 0; pxa255_serial[i].io_base; i++) {
- if (serial_hds[i]) {
+ if (serial_hd(i)) {
serial_mm_init(address_space, pxa255_serial[i].io_base, 2,
qdev_get_gpio_in(s->pic, pxa255_serial[i].irqn),
- 14745600 / 16, serial_hds[i],
+ 14745600 / 16, serial_hd(i),
DEVICE_NATIVE_ENDIAN);
} else {
break;
}
}
- if (serial_hds[i])
+ if (serial_hd(i))
s->fir = pxa2xx_fir_init(address_space, 0x40800000,
qdev_get_gpio_in(s->pic, PXA2XX_PIC_ICP),
qdev_get_gpio_in(s->dma, PXA2XX_RX_RQ_ICP),
qdev_get_gpio_in(s->dma, PXA2XX_TX_RQ_ICP),
- serial_hds[i]);
+ serial_hd(i));
s->lcd = pxa2xx_lcdc_init(address_space, 0x44000000,
qdev_get_gpio_in(s->pic, PXA2XX_PIC_LCD));
diff --git a/hw/arm/realview.c b/hw/arm/realview.c
index 2139a62e25..cd585d9469 100644
--- a/hw/arm/realview.c
+++ b/hw/arm/realview.c
@@ -195,10 +195,10 @@ static void realview_init(MachineState *machine,
sysbus_create_simple("pl050_keyboard", 0x10006000, pic[20]);
sysbus_create_simple("pl050_mouse", 0x10007000, pic[21]);
- pl011_create(0x10009000, pic[12], serial_hds[0]);
- pl011_create(0x1000a000, pic[13], serial_hds[1]);
- pl011_create(0x1000b000, pic[14], serial_hds[2]);
- pl011_create(0x1000c000, pic[15], serial_hds[3]);
+ pl011_create(0x10009000, pic[12], serial_hd(0));
+ pl011_create(0x1000a000, pic[13], serial_hd(1));
+ pl011_create(0x1000b000, pic[14], serial_hd(2));
+ pl011_create(0x1000c000, pic[15], serial_hd(3));
/* DMA controller is optional, apparently. */
sysbus_create_simple("pl081", 0x10030000, pic[24]);
diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c
index de7c0fc4a6..e886f54976 100644
--- a/hw/arm/stellaris.c
+++ b/hw/arm/stellaris.c
@@ -1353,7 +1353,7 @@ static void stellaris_init(MachineState *ms, stellaris_board_info *board)
if (board->dc2 & (1 << i)) {
pl011_luminary_create(0x4000c000 + i * 0x1000,
qdev_get_gpio_in(nvic, uart_irq[i]),
- serial_hds[i]);
+ serial_hd(i));
}
}
if (board->dc2 & (1 << 4)) {
diff --git a/hw/arm/stm32f205_soc.c b/hw/arm/stm32f205_soc.c
index 1cd6374e07..f59418e7d0 100644
--- a/hw/arm/stm32f205_soc.c
+++ b/hw/arm/stm32f205_soc.c
@@ -136,7 +136,7 @@ static void stm32f205_soc_realize(DeviceState *dev_soc, Error **errp)
for (i = 0; i < STM_NUM_USARTS; i++) {
dev = DEVICE(&(s->usart[i]));
qdev_prop_set_chr(dev, "chardev",
- i < MAX_SERIAL_PORTS ? serial_hds[i] : NULL);
+ i < MAX_SERIAL_PORTS ? serial_hd(i) : NULL);
object_property_set_bool(OBJECT(&s->usart[i]), true, "realized", &err);
if (err != NULL) {
error_propagate(errp, err);
diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c
index 4cdb3a670b..ec2627374d 100644
--- a/hw/arm/strongarm.c
+++ b/hw/arm/strongarm.c
@@ -1622,7 +1622,7 @@ StrongARMState *sa1110_init(MemoryRegion *sysmem,
for (i = 0; sa_serial[i].io_base; i++) {
DeviceState *dev = qdev_create(NULL, TYPE_STRONGARM_UART);
- qdev_prop_set_chr(dev, "chardev", serial_hds[i]);
+ qdev_prop_set_chr(dev, "chardev", serial_hd(i));
qdev_init_nofail(dev);
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0,
sa_serial[i].io_base);
diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
index 418792cd02..e01e3192ff 100644
--- a/hw/arm/versatilepb.c
+++ b/hw/arm/versatilepb.c
@@ -283,10 +283,10 @@ static void versatile_init(MachineState *machine, int board_id)
n--;
}
- pl011_create(0x101f1000, pic[12], serial_hds[0]);
- pl011_create(0x101f2000, pic[13], serial_hds[1]);
- pl011_create(0x101f3000, pic[14], serial_hds[2]);
- pl011_create(0x10009000, sic[6], serial_hds[3]);
+ pl011_create(0x101f1000, pic[12], serial_hd(0));
+ pl011_create(0x101f2000, pic[13], serial_hd(1));
+ pl011_create(0x101f3000, pic[14], serial_hd(2));
+ pl011_create(0x10009000, sic[6], serial_hd(3));
sysbus_create_simple("pl080", 0x10130000, pic[17]);
sysbus_create_simple("sp804", 0x101e2000, pic[4]);
diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
index 9fad79177a..f1e33c8a36 100644
--- a/hw/arm/vexpress.c
+++ b/hw/arm/vexpress.c
@@ -622,10 +622,10 @@ static void vexpress_common_init(MachineState *machine)
sysbus_create_simple("pl050_keyboard", map[VE_KMI0], pic[12]);
sysbus_create_simple("pl050_mouse", map[VE_KMI1], pic[13]);
- pl011_create(map[VE_UART0], pic[5], serial_hds[0]);
- pl011_create(map[VE_UART1], pic[6], serial_hds[1]);
- pl011_create(map[VE_UART2], pic[7], serial_hds[2]);
- pl011_create(map[VE_UART3], pic[8], serial_hds[3]);
+ pl011_create(map[VE_UART0], pic[5], serial_hd(0));
+ pl011_create(map[VE_UART1], pic[6], serial_hd(1));
+ pl011_create(map[VE_UART2], pic[7], serial_hd(2));
+ pl011_create(map[VE_UART3], pic[8], serial_hd(3));
sysbus_create_simple("sp804", map[VE_TIMER01], pic[2]);
sysbus_create_simple("sp804", map[VE_TIMER23], pic[3]);
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 94dcb125d3..a18291c5d5 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1371,11 +1371,11 @@ static void machvirt_init(MachineState *machine)
fdt_add_pmu_nodes(vms);
- create_uart(vms, pic, VIRT_UART, sysmem, serial_hds[0]);
+ create_uart(vms, pic, VIRT_UART, sysmem, serial_hd(0));
if (vms->secure) {
create_secure_ram(vms, secure_sysmem);
- create_uart(vms, pic, VIRT_SECURE_UART, secure_sysmem, serial_hds[1]);
+ create_uart(vms, pic, VIRT_SECURE_UART, secure_sysmem, serial_hd(1));
}
create_rtc(vms, pic);
diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c
index 0f76333770..899a26326f 100644
--- a/hw/arm/xilinx_zynq.c
+++ b/hw/arm/xilinx_zynq.c
@@ -236,8 +236,8 @@ static void zynq_init(MachineState *machine)
sysbus_create_simple("xlnx,ps7-usb", 0xE0002000, pic[53-IRQ_OFFSET]);
sysbus_create_simple("xlnx,ps7-usb", 0xE0003000, pic[76-IRQ_OFFSET]);
- cadence_uart_create(0xE0000000, pic[59 - IRQ_OFFSET], serial_hds[0]);
- cadence_uart_create(0xE0001000, pic[82 - IRQ_OFFSET], serial_hds[1]);
+ cadence_uart_create(0xE0000000, pic[59 - IRQ_OFFSET], serial_hd(0));
+ cadence_uart_create(0xE0001000, pic[82 - IRQ_OFFSET], serial_hd(1));
sysbus_create_varargs("cadence_ttc", 0xF8001000,
pic[42-IRQ_OFFSET], pic[43-IRQ_OFFSET], pic[44-IRQ_OFFSET], NULL);
diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
index 465796e97c..505253e0d2 100644
--- a/hw/arm/xlnx-zynqmp.c
+++ b/hw/arm/xlnx-zynqmp.c
@@ -374,7 +374,7 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp)
}
for (i = 0; i < XLNX_ZYNQMP_NUM_UARTS; i++) {
- qdev_prop_set_chr(DEVICE(&s->uart[i]), "chardev", serial_hds[i]);
+ qdev_prop_set_chr(DEVICE(&s->uart[i]), "chardev", serial_hd(i));
object_property_set_bool(OBJECT(&s->uart[i]), true, "realized", &err);
if (err) {
error_propagate(errp, err);