summaryrefslogtreecommitdiff
path: root/hw/arm
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2020-07-05 13:39:53 +0200
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2020-08-21 16:22:43 +0200
commit26c5b0f4cbe19ad87d3aaba22cd1a8edc25f7ceb (patch)
tree467f3a5130d5fc374cb7a22325d1fcc95cdb2598 /hw/arm
parent0e33730c8924032eda53de6ebb7ecba232abb01d (diff)
downloadqemu-26c5b0f4cbe19ad87d3aaba22cd1a8edc25f7ceb.zip
hw/sd/pl181: Use named GPIOs
To make the code easier to manage/review/use, rename the cardstatus[0] variable as 'card_readonly' and name the GPIO "card-read-only". Similarly with cardstatus[1], renamed as 'card_inserted' and name its GPIO "card-inserted". Adapt the users accordingly by using the qdev_init_gpio_out_named() function. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Acked-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20200705204630.4133-6-f4bug@amsat.org>
Diffstat (limited to 'hw/arm')
-rw-r--r--hw/arm/integratorcp.c4
-rw-r--r--hw/arm/realview.c4
-rw-r--r--hw/arm/vexpress.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c
index f304c2b4f0..16c4d750a4 100644
--- a/hw/arm/integratorcp.c
+++ b/hw/arm/integratorcp.c
@@ -645,9 +645,9 @@ static void integratorcp_init(MachineState *machine)
sysbus_create_simple(TYPE_INTEGRATOR_DEBUG, 0x1a000000, 0);
dev = sysbus_create_varargs("pl181", 0x1c000000, pic[23], pic[24], NULL);
- qdev_connect_gpio_out(dev, 0,
+ qdev_connect_gpio_out_named(dev, "card-read-only", 0,
qdev_get_gpio_in_named(icp, ICP_GPIO_MMC_WPROT, 0));
- qdev_connect_gpio_out(dev, 1,
+ qdev_connect_gpio_out_named(dev, "card-inserted", 0,
qdev_get_gpio_in_named(icp, ICP_GPIO_MMC_CARDIN, 0));
sysbus_create_varargs("pl041", 0x1d000000, pic[25], NULL);
diff --git a/hw/arm/realview.c b/hw/arm/realview.c
index c1ff172b13..3e2360c261 100644
--- a/hw/arm/realview.c
+++ b/hw/arm/realview.c
@@ -234,8 +234,8 @@ static void realview_init(MachineState *machine,
mmc_irq[1] = qemu_irq_split(
qdev_get_gpio_in(sysctl, ARM_SYSCTL_GPIO_MMC_CARDIN),
qemu_irq_invert(qdev_get_gpio_in(gpio2, 0)));
- qdev_connect_gpio_out(dev, 0, mmc_irq[0]);
- qdev_connect_gpio_out(dev, 1, mmc_irq[1]);
+ qdev_connect_gpio_out_named(dev, "card-read-only", 0, mmc_irq[0]);
+ qdev_connect_gpio_out_named(dev, "card-inserted", 0, mmc_irq[1]);
sysbus_create_simple("pl031", 0x10017000, pic[10]);
diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
index 1dc971c34f..049a0ec2c7 100644
--- a/hw/arm/vexpress.c
+++ b/hw/arm/vexpress.c
@@ -624,9 +624,9 @@ static void vexpress_common_init(MachineState *machine)
dev = sysbus_create_varargs("pl181", map[VE_MMCI], pic[9], pic[10], NULL);
/* Wire up MMC card detect and read-only signals */
- qdev_connect_gpio_out(dev, 0,
+ qdev_connect_gpio_out_named(dev, "card-read-only", 0,
qdev_get_gpio_in(sysctl, ARM_SYSCTL_GPIO_MMC_WPROT));
- qdev_connect_gpio_out(dev, 1,
+ qdev_connect_gpio_out_named(dev, "card-inserted", 0,
qdev_get_gpio_in(sysctl, ARM_SYSCTL_GPIO_MMC_CARDIN));
sysbus_create_simple("pl050_keyboard", map[VE_KMI0], pic[12]);