[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/25] hw/isa/pc87312: Use uint16_t for the ISA I/O
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-devel] [PATCH 06/25] hw/isa/pc87312: Use uint16_t for the ISA I/O base address |
Date: |
Thu, 8 Mar 2018 23:39:27 +0100 |
This matches the isa_register_ioport() prototype.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
include/hw/isa/pc87312.h | 2 +-
hw/isa/pc87312.c | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/hw/isa/pc87312.h b/include/hw/isa/pc87312.h
index 710eb1c807..b65b219a8a 100644
--- a/include/hw/isa/pc87312.h
+++ b/include/hw/isa/pc87312.h
@@ -34,7 +34,7 @@
typedef struct PC87312State {
ISADevice dev;
- uint32_t iobase;
+ uint16_t iobase;
uint8_t config; /* initial configuration */
struct {
diff --git a/hw/isa/pc87312.c b/hw/isa/pc87312.c
index e9edbc6c50..105c23e680 100644
--- a/hw/isa/pc87312.c
+++ b/hw/isa/pc87312.c
@@ -69,9 +69,9 @@ static inline bool is_parallel_enabled(PC87312State *s)
return s->regs[REG_FER] & FER_PARALLEL_EN;
}
-static const uint32_t parallel_base[] = { 0x378, 0x3bc, 0x278, 0x00 };
+static const uint16_t parallel_base[] = { 0x378, 0x3bc, 0x278, 0x00 };
-static inline uint32_t get_parallel_iobase(PC87312State *s)
+static inline uint16_t get_parallel_iobase(PC87312State *s)
{
return parallel_base[s->regs[REG_FAR] & FAR_PARALLEL_ADDR];
}
@@ -92,12 +92,12 @@ static inline uint32_t get_parallel_irq(PC87312State *s)
/* UARTs */
-static const uint32_t uart_base[2][4] = {
+static const uint16_t uart_base[2][4] = {
{ 0x3e8, 0x338, 0x2e8, 0x220 },
{ 0x2e8, 0x238, 0x2e0, 0x228 }
};
-static inline uint32_t get_uart_iobase(PC87312State *s, int i)
+static inline uint16_t get_uart_iobase(PC87312State *s, int i)
{
int idx;
idx = (s->regs[REG_FAR] >> (2 * i + 2)) & 0x3;
@@ -130,7 +130,7 @@ static inline bool is_fdc_enabled(PC87312State *s)
return s->regs[REG_FER] & FER_FDC_EN;
}
-static inline uint32_t get_fdc_iobase(PC87312State *s)
+static inline uint16_t get_fdc_iobase(PC87312State *s)
{
return (s->regs[REG_FER] & FER_FDC_ADDR) ? 0x370 : 0x3f0;
}
@@ -143,7 +143,7 @@ static inline bool is_ide_enabled(PC87312State *s)
return s->regs[REG_FER] & FER_IDE_EN;
}
-static inline uint32_t get_ide_iobase(PC87312State *s)
+static inline uint16_t get_ide_iobase(PC87312State *s)
{
return (s->regs[REG_FER] & FER_IDE_ADDR) ? 0x170 : 0x1f0;
}
@@ -373,7 +373,7 @@ static const VMStateDescription vmstate_pc87312 = {
};
static Property pc87312_properties[] = {
- DEFINE_PROP_UINT32("iobase", PC87312State, iobase, 0x398),
+ DEFINE_PROP_UINT16("iobase", PC87312State, iobase, 0x398),
DEFINE_PROP_UINT8("config", PC87312State, config, 1),
DEFINE_PROP_END_OF_LIST()
};
--
2.16.2
- [Qemu-devel] [PATCH 01/25] hw/isa: Move parallel_hds_isa_init() to hw/char/parallel-isa.c, (continued)
- [Qemu-devel] [PATCH 01/25] hw/isa: Move parallel_hds_isa_init() to hw/char/parallel-isa.c, Philippe Mathieu-Daudé, 2018/03/08
- [Qemu-devel] [PATCH 02/25] hw/dma/i8257: Rename DMA_init() to i8257_dma_init(), Philippe Mathieu-Daudé, 2018/03/08
- [Qemu-devel] [PATCH 03/25] hw/input/i8042: Extract declarations from i386/pc.h into input/i8042.h, Philippe Mathieu-Daudé, 2018/03/08
- [Qemu-devel] [PATCH 04/25] MAINTAINERS: Fix the PC87312 include path, Philippe Mathieu-Daudé, 2018/03/08
- [Qemu-devel] [PATCH 05/25] hw/isa/pc87312: Rename the device type as TYPE_PC87312_SUPERIO, Philippe Mathieu-Daudé, 2018/03/08
- [Qemu-devel] [PATCH 06/25] hw/isa/pc87312: Use uint16_t for the ISA I/O base address,
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCH 07/25] hw/isa/pc87312: Use 'unsigned int' for the irq value, Philippe Mathieu-Daudé, 2018/03/08
- [Qemu-devel] [PATCH 08/25] hw/isa/superio: Add a Super I/O template based on the PC87312 device, Philippe Mathieu-Daudé, 2018/03/08
- [Qemu-devel] [PATCH 09/25] hw/isa/pc87312: Inherit from the abstract TYPE_ISA_SUPERIO, Philippe Mathieu-Daudé, 2018/03/08
- [Qemu-devel] [PATCH 11/25] hw/isa/superio: Factor out the serial code from pc87312.c, Philippe Mathieu-Daudé, 2018/03/08
- [Qemu-devel] [PATCH 13/25] hw/isa/superio: Add a keyboard/mouse controller (8042), Philippe Mathieu-Daudé, 2018/03/08
- [Qemu-devel] [PATCH 10/25] hw/isa/superio: Factor out the parallel code from pc87312.c, Philippe Mathieu-Daudé, 2018/03/08
- [Qemu-devel] [PATCH 12/25] hw/isa/superio: Factor out the floppy disc controller code from pc87312.c, Philippe Mathieu-Daudé, 2018/03/08
- [Qemu-devel] [PATCH 14/25] hw/isa/superio: Factor out the IDE code from pc87312.c, Philippe Mathieu-Daudé, 2018/03/08
- [Qemu-devel] [PATCH 16/25] hw/isa/superio: Factor out the FDC37M817 Super I/O from mips_malta.c, Philippe Mathieu-Daudé, 2018/03/08