summaryrefslogtreecommitdiffstats
path: root/include/hw
diff options
context:
space:
mode:
authorJohn Snow2020-07-24 07:22:54 +0200
committerJohn Snow2020-10-01 19:04:16 +0200
commit98d98912238d9f4f4c41bda0a3d944d0cff934ce (patch)
tree0c307926640bab9e614ad4c968a61a189918f14e /include/hw
parenthw/ide/ahci: Do not dma_memory_unmap(NULL) (diff)
downloadqemu-98d98912238d9f4f4c41bda0a3d944d0cff934ce.tar.gz
qemu-98d98912238d9f4f4c41bda0a3d944d0cff934ce.tar.xz
qemu-98d98912238d9f4f4c41bda0a3d944d0cff934ce.zip
ide: rename cmd_write to ctrl_write
It's the Control register, part of the Control block -- Command is misleading here. Rename all related functions and constants. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/ide/internal.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h
index 8a95ad8c4d..a23bb2f348 100644
--- a/include/hw/ide/internal.h
+++ b/include/hw/ide/internal.h
@@ -57,8 +57,9 @@ OBJECT_DECLARE_SIMPLE_TYPE(IDEBus, IDE_BUS)
#define REL 0x04
#define TAG_MASK 0xf8
-#define IDE_CMD_RESET 0x04
-#define IDE_CMD_DISABLE_IRQ 0x02
+/* Bits of Device Control register */
+#define IDE_CTRL_RESET 0x04
+#define IDE_CTRL_DISABLE_IRQ 0x02
/* ACS-2 T13/2015-D Table B.2 Command codes */
#define WIN_NOP 0x00
@@ -559,7 +560,7 @@ static inline IDEState *idebus_active_if(IDEBus *bus)
static inline void ide_set_irq(IDEBus *bus)
{
- if (!(bus->cmd & IDE_CMD_DISABLE_IRQ)) {
+ if (!(bus->cmd & IDE_CTRL_DISABLE_IRQ)) {
qemu_irq_raise(bus->irq);
}
}
@@ -598,7 +599,7 @@ void ide_atapi_io_error(IDEState *s, int ret);
void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val);
uint32_t ide_ioport_read(void *opaque, uint32_t addr1);
uint32_t ide_status_read(void *opaque, uint32_t addr);
-void ide_cmd_write(void *opaque, uint32_t addr, uint32_t val);
+void ide_ctrl_write(void *opaque, uint32_t addr, uint32_t val);
void ide_data_writew(void *opaque, uint32_t addr, uint32_t val);
uint32_t ide_data_readw(void *opaque, uint32_t addr);
void ide_data_writel(void *opaque, uint32_t addr, uint32_t val);