aboutsummaryrefslogtreecommitdiff
path: root/hw/ide
diff options
context:
space:
mode:
authorDamien Hedde <damien.hedde@greensocs.com>2020-01-30 16:02:03 +0000
committerPeter Maydell <peter.maydell@linaro.org>2020-01-30 16:02:03 +0000
commitf703a04ce558ac3c7c0587a2d919c39efb8ca3ba (patch)
treedc89c0445826aeda40f29c5129a634d48fc7afb9 /hw/ide
parent100bc4ab41a9819846a798d4eb8ad495046e8f11 (diff)
downloadqemu-f703a04ce558ac3c7c0587a2d919c39efb8ca3ba.zip
qemu-f703a04ce558ac3c7c0587a2d919c39efb8ca3ba.tar.gz
qemu-f703a04ce558ac3c7c0587a2d919c39efb8ca3ba.tar.bz2
add device_legacy_reset function to prepare for reset api change
Provide a temporary device_legacy_reset function doing what device_reset does to prepare for the transition with Resettable API. All occurrence of device_reset in the code tree are also replaced by device_legacy_reset. The new resettable API has different prototype and semantics (resetting child buses as well as the specified device). Subsequent commits will make the changeover for each call site individually; once that is complete device_legacy_reset() will be removed. Signed-off-by: Damien Hedde <damien.hedde@greensocs.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Acked-by: David Gibson <david@gibson.dropbear.id.au> Acked-by: Cornelia Huck <cohuck@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20200123132823.1117486-2-damien.hedde@greensocs.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/ide')
-rw-r--r--hw/ide/microdrive.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c
index b0272ea..6b30e36 100644
--- a/hw/ide/microdrive.c
+++ b/hw/ide/microdrive.c
@@ -173,7 +173,7 @@ static void md_attr_write(PCMCIACardState *card, uint32_t at, uint8_t value)
case 0x00: /* Configuration Option Register */
s->opt = value & 0xcf;
if (value & OPT_SRESET) {
- device_reset(DEVICE(s));
+ device_legacy_reset(DEVICE(s));
}
md_interrupt_update(s);
break;
@@ -316,7 +316,7 @@ static void md_common_write(PCMCIACardState *card, uint32_t at, uint16_t value)
case 0xe: /* Device Control */
s->ctrl = value;
if (value & CTRL_SRST) {
- device_reset(DEVICE(s));
+ device_legacy_reset(DEVICE(s));
}
md_interrupt_update(s);
break;
@@ -541,7 +541,7 @@ static int dscm1xxxx_attach(PCMCIACardState *card)
md->attr_base = pcc->cis[0x74] | (pcc->cis[0x76] << 8);
md->io_base = 0x0;
- device_reset(DEVICE(md));
+ device_legacy_reset(DEVICE(md));
md_interrupt_update(md);
return 0;
@@ -551,7 +551,7 @@ static int dscm1xxxx_detach(PCMCIACardState *card)
{
MicroDriveState *md = MICRODRIVE(card);
- device_reset(DEVICE(md));
+ device_legacy_reset(DEVICE(md));
return 0;
}