[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/10] hw/isa: Add the ISA_IRQ_IDE_DEFAULT definition
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 10/10] hw/isa: Add the ISA_IRQ_IDE_DEFAULT definition |
Date: |
Sun, 11 Oct 2020 21:32:29 +0200 |
The IDE controller uses IRQ #14 by default. Add this
default definition to the IsaIrqNumber enum.
Avoid magic values in the code, replace them by the
newly introduced definition.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/hw/isa/isa.h | 1 +
hw/ide/isa.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h
index 43cdc3c47b6..05622ee11e2 100644
--- a/include/hw/isa/isa.h
+++ b/include/hw/isa/isa.h
@@ -17,6 +17,7 @@ enum IsaIrqNumber {
ISA_IRQ_RTC_DEFAULT = 8,
ISA_IRQ_NET_DEFAULT = 9,
ISA_IRQ_MOU_DEFAULT = 12,
+ ISA_IRQ_IDE_DEFAULT = 14,
ISA_NUM_IRQS = 16
};
diff --git a/hw/ide/isa.c b/hw/ide/isa.c
index 6bc19de2265..2412d568937 100644
--- a/hw/ide/isa.c
+++ b/hw/ide/isa.c
@@ -108,7 +108,7 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int
iobase2, int isairq,
static Property isa_ide_properties[] = {
DEFINE_PROP_UINT32("iobase", ISAIDEState, iobase, 0x1f0),
DEFINE_PROP_UINT32("iobase2", ISAIDEState, iobase2, 0x3f6),
- DEFINE_PROP_UINT32("irq", ISAIDEState, isairq, 14),
+ DEFINE_PROP_UINT32("irq", ISAIDEState, isairq, ISA_IRQ_IDE_DEFAULT),
DEFINE_PROP_END_OF_LIST(),
};
--
2.26.2
- Re: [PATCH 04/10] hw/isa: Add the ISA_IRQ_TPM_DEFAULT definition, (continued)
- [PATCH 05/10] hw/isa: Add the ISA_IRQ_FDC_DEFAULT definition, Philippe Mathieu-Daudé, 2020/10/11
- [PATCH 06/10] hw/isa: Add the ISA_IRQ_PAR_DEFAULT definition, Philippe Mathieu-Daudé, 2020/10/11
- [PATCH 07/10] hw/isa: Add the ISA_IRQ_RTC_DEFAULT definition, Philippe Mathieu-Daudé, 2020/10/11
- [PATCH 08/10] hw/isa: Add the ISA_IRQ_NET_DEFAULT definition, Philippe Mathieu-Daudé, 2020/10/11
- [PATCH 09/10] hw/isa: Add the ISA_IRQ_MOU_DEFAULT definition, Philippe Mathieu-Daudé, 2020/10/11
- [PATCH 10/10] hw/isa: Add the ISA_IRQ_IDE_DEFAULT definition,
Philippe Mathieu-Daudé <=